/* Раздел «Нарды» в оформлении приложения МЭТР.
   Собрано из исходного style.css проекта «турнир»: все правила ограничены контейнером .nd,
   цвета подменены на палитру приложения. Дальше правится вручную. */

.nd {
  --bg: var(--mtr-bg-primary);
  --bg-elevated: var(--mtr-bg-card);
  --bg-panel: var(--mtr-bg-secondary);
  --border: var(--mtr-border);
  --text: var(--mtr-text-primary);
  --text-muted: var(--mtr-text-secondary);
  --accent: #d4b876;
  --accent-dim: #b8923f;
  --win: #7fae6f;
  --loss: #c1665c;
  --font-display: var(--sans);
  --font-body: var(--sans);
}

.nd .table-wrap {
  overflow-x: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.nd .rating-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.nd .rating-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.nd .rating-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.nd .rating-table tr:last-child td { border-bottom: none; }
.nd .rating-table tbody tr:hover { background: rgba(201, 160, 108, 0.07); }
.nd .rank { color: var(--text-muted); font-weight: 700; }
.nd .rating-cell { color: var(--accent); font-weight: 700; }
.nd .muted { color: var(--text-muted); }
.nd .win-color { color: var(--win); font-weight: 600; }
.nd .loss-color { color: var(--loss); font-weight: 600; }
.nd .player-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.nd .player-link:hover { color: var(--accent); }
.nd .form { display: inline-flex; gap: 4px; }
.nd .form-dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block;
}
.nd .form-dot.win { background: var(--win); }
.nd .form-dot.loss { background: var(--loss); }
.nd .result-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.78rem;
}
.nd .result-badge.win { background: rgba(127, 174, 111, 0.15); color: var(--win); }
.nd .result-badge.loss { background: rgba(193, 102, 92, 0.15); color: var(--loss); }
.nd .profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 26px;
  flex-wrap: wrap;
  gap: 14px;
}
.nd .profile-name h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.6rem;
}
.nd .rank-badge {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.nd .profile-rating { text-align: right; }
.nd .rating-big {
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--accent);
}
.nd .rating-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.nd .stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.nd .stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}
.nd .stat-value { display: block; font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.nd .stat-name { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.nd .graph-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.nd .rating-graph { width: 100%; height: auto; display: block; }
.nd .graph-grid { stroke: var(--border); stroke-width: 1; }
.nd .graph-label { fill: var(--text-muted); font-size: 11px; }
.nd .graph-empty { fill: var(--text-muted); font-size: 13px; }
@media (max-width: 600px) {
.nd .profile-header { flex-direction: column; align-items: flex-start; }
.nd .profile-rating { text-align: left; }
}
.nd .tournament-meta { margin-top: -12px; margin-bottom: 20px; }
.nd .form-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 14px 0 6px;
}
.nd .form-label:first-child { margin-top: 0; }
.nd .form-input {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 0.95rem;
  font-family: var(--font-body);
}
.nd .form-input:focus { outline: none; border-color: var(--accent); }
.nd .rules-source { margin-top: -12px; margin-bottom: 24px; font-size: 0.88rem; }
.nd .rules-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 8px;
}
.nd .rules-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}
.nd .rules-nav a:hover { color: var(--accent); }
.nd .rules-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
}
.nd .rules-list li { margin-bottom: 10px; line-height: 1.55; }
.nd .rules-list li:last-child { margin-bottom: 0; }
.nd .rule-anim {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 14px 10px;
  margin: 10px 0 18px;
  max-width: 340px;
}
.nd .rule-anim svg { display: block; width: 100%; height: auto; }
.nd .anim-caption {
  margin: 8px 0 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}
.nd .anim-label { fill: var(--text-muted); font-size: 10px; font-family: var(--font-body); }
.nd .anim-note { fill: var(--text-muted); font-size: 12px; font-family: var(--font-display); }
.nd .cube-face { fill: var(--bg-elevated); stroke: var(--accent); stroke-width: 2; }
.nd .cube-number { fill: var(--accent); font-weight: 700; font-size: 20px; font-family: var(--font-display); opacity: 0; animation: cubeNumberCycle 4.5s ease-in-out infinite; }
.nd .cube-number.n1 { animation-delay: 0s; }
.nd .cube-number.n2 { animation-delay: 1.5s; }
.nd .cube-number.n3 { animation-delay: 3s; }
@keyframes cubeNumberCycle {
  0%, 3% { opacity: 0; }
  8%, 25% { opacity: 1; }
  30%, 100% { opacity: 0; }
}
.nd .cube-token { transform-origin: 130px 53px; animation: cubePulse 4.5s ease-in-out infinite; }
@keyframes cubePulse {
  0%, 92%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}
.nd .cube-arrow { fill: var(--text-muted); opacity: 0.15; animation: cubeArrowBlink 4.5s ease-in-out infinite; }
.nd .arrow-left { animation-delay: 0.2s; }
.nd .arrow-right { animation-delay: 2.7s; }
@keyframes cubeArrowBlink {
  0%, 12% { opacity: 0.15; }
  17%, 27% { opacity: 0.9; fill: var(--accent); }
  32%, 100% { opacity: 0.15; }
}
.nd .anim-point { fill: var(--bg-elevated); stroke: var(--border); }
.nd .checker { stroke: var(--border); stroke-width: 1.5; }
.nd .checker-base { fill: var(--text-muted); opacity: 0.45; }
.nd .checker-move { fill: var(--accent); animation: headCheckerMove 4s ease-in-out infinite; }
@keyframes headCheckerMove {
  0%, 6% { transform: translate(0, 0); opacity: 1; }
  38%, 60% { transform: translate(88px, -20px); opacity: 1; }
  72%, 98% { transform: translate(0, 0); opacity: 0; }
  100% { transform: translate(0, 0); opacity: 1; }
}
.nd .checker-blot { fill: var(--accent); animation: blotHit 5s ease-in-out infinite; }
.nd .checker-attacker {
  fill: var(--text-muted);
  opacity: 0;
  animation: attackerMove 5s ease-in-out infinite;
}
.nd .anim-bar { fill: var(--border); }
@keyframes blotHit {
  0%, 16% { transform: translate(0, 0); opacity: 1; }
  30%, 55% { transform: translate(38px, -48px); opacity: 1; }
  72%, 96% { transform: translate(160px, 0); opacity: 1; }
  100% { transform: translate(160px, 0); opacity: 0; }
}
@keyframes attackerMove {
  0%, 10% { transform: translate(-40px, 0); opacity: 0; }
  22%, 96% { transform: translate(0, 0); opacity: 1; }
  100% { transform: translate(-40px, 0); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
.nd .cube-number,
.nd .cube-token,
.nd .cube-arrow,
.nd .checker-move,
.nd .checker-blot,
.nd .checker-attacker {
    animation: none !important;
  }
.nd .cube-number.n1,
.nd .checker-blot { opacity: 1 !important; }
.nd .cube-number.n2,
.nd .cube-number.n3,
.nd .checker-attacker { opacity: 0 !important; }
}
.nd .about-hero {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #080706;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 56px 24px 28px;
  margin: -4px 0 32px;
  text-align: center;
  color: #f2ede3;
}
.nd .about-hero-photo {
  position: absolute;
  inset: 0;
  background-image: url("/static/brand/about-hero.jpg");
  background-size: cover;
  background-position: 60% 35%;
  filter: grayscale(1) contrast(1.15) brightness(0.5);
}
.nd .about-hero-pattern {
  position: absolute;
  inset: -10%;
  background-image: url("/static/brand/pattern.svg");
  background-size: 640px auto;
  background-position: center;
  opacity: 0.12;
  mix-blend-mode: screen;
}
.nd .about-hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6,5,4,0.35) 0%, rgba(6,5,4,0.25) 45%, rgba(6,5,4,0.85) 100%),
    radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.55) 100%);
}
.nd .about-eyebrow {
  position: relative;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.nd .about-kicker {
  position: relative;
  font-family: "Bodoni Moda", Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  color: #cfc6b8;
  margin: 0;
}
.nd .about-headline {
  position: relative;
  font-family: "Bodoni Moda", Georgia, serif;
  font-weight: 700;
  font-size: clamp(3rem, 12vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin: 6px 0 4px;
  color: #f7f2e8;
}
.nd .about-tagline {
  position: relative;
  font-family: "Bodoni Moda", Georgia, serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--accent);
  margin: 0 0 30px;
}
.nd .about-hero-footer {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8072;
  border-top: 1px solid rgba(239, 231, 218, 0.14);
  padding-top: 16px;
}
.nd .about-hero-dot { color: var(--accent); }
.nd .about-lead {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 640px;
  margin-bottom: 8px;
}
.nd .sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.nd .sponsor-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 24px;
}
.nd .sponsor-main { border-color: var(--accent); }
.nd .sponsor-eyebrow {
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 8px;
}
.nd .sponsor-name {
  font-family: "Bodoni Moda", Georgia, serif;
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--accent);
  margin-bottom: 4px;
  line-height: 1.1;
}
.nd .sponsor-role { color: var(--text-muted); font-size: 0.88rem; }
.nd .sponsor-logo {
  display: block;
  max-width: 100%;
  height: 56px;
  width: auto;
  object-fit: contain;
  object-position: left center;
  margin: 4px 0 12px;
}
@media (max-width: 600px) {
.nd .about-hero { padding: 44px 16px 22px; }
}
.nd .bracket-player-picker {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  background: var(--bg-panel);
}
.nd .bracket-player-picker .form-checkbox { margin: 10px 0; }
.nd .champion-banner {
  text-align: center;
  background: linear-gradient(180deg, rgba(201, 160, 108, 0.14), transparent);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 32px;
}
.nd .champion-label {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
}
.nd .champion-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.8rem;
  margin-top: 6px;
  color: var(--text);
  text-decoration: none;
}
.nd .champion-name:hover { color: var(--accent); }
.nd .bracket-section { margin-bottom: 8px; }
.nd .reset-note { font-size: 0.82rem; color: var(--text-muted); margin: -4px 0 16px; max-width: 480px; }
.nd .rounds-scroll {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  padding-bottom: 14px;
}
.nd .round-col {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  min-width: 220px;
  flex-shrink: 0;
}
.nd .round-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-align: center;
}
.nd .bmatch {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 10px 0;
}
.nd .bmatch.bmatch-done { border-color: rgba(201, 160, 108, 0.35); }
.nd .bslot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.nd .bslot:last-of-type { border-bottom: none; }
.nd .bslot.winner { color: var(--accent); font-weight: 700; }
.nd .bslot.bye { color: var(--text-faint, var(--text-muted)); font-style: italic; }
.nd .bdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.nd .bslot.winner .bdot { background: var(--accent); }
.nd .bslot-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nd .bslot-link { color: inherit; text-decoration: none; }
.nd .bslot-link:hover { text-decoration: underline; }
.nd .bslot-score { font-variant-numeric: tabular-nums; color: var(--text-muted); }
.nd .bslot.winner .bslot-score { color: var(--accent); }
.nd .bmatch-score-btn {
  display: block;
  text-align: center;
  margin: 8px 10px 10px;
}
@media (max-width: 640px) {
.nd .round-col { min-width: 180px; }
}
@keyframes portalSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(18deg); }
}
@keyframes portalDismiss {
  to { opacity: 0; visibility: hidden; }
}
@keyframes portalFly {
  0% { transform: translate(-50%, -50%) rotate(45deg) scale(0.15); opacity: 0; }
  12% { opacity: 0.9; }
  65% { opacity: 0.35; }
  100% { transform: translate(-50%, -50%) rotate(45deg) scale(16); opacity: 0; }
}
@keyframes portalGlow {
  0% { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(4); }
}
@keyframes portalMark {
  0%, 55% { opacity: 0; transform: scale(0.6); }
  75% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}
.nd .player-banner {
  position: relative;
  height: 300px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-elevated));
  border: 1px solid var(--border);
  margin-bottom: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.nd .player-banner-pattern {
  position: absolute;
  inset: 0;
  background-image: url("/static/brand/pattern.svg");
  background-size: 520px auto;
  background-position: center 20%;
  opacity: 0.12;
}
.nd .player-banner-photo {
  position: relative;
  height: 100%;
  max-width: 92%;
  object-fit: contain;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.55));
}
.nd .row-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  vertical-align: middle;
  margin-right: 6px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
}
.nd .player-link-avatar { display: inline-flex; align-items: center; }
.nd .rating-delta {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 5px;
  white-space: nowrap;
}
.nd .rating-delta.positive { color: var(--win); }
.nd .rating-delta.negative { color: var(--loss); }
.nd .rating-big .rating-delta { font-size: 0.9rem; vertical-align: middle; }

/* ===================== компоненты раздела в стиле приложения ===================== */

.nd .nd-tabs { display: flex; gap: 8px; overflow-x: auto; margin: 4px -2px 16px; padding: 2px; scrollbar-width: none; }
.nd .nd-tabs::-webkit-scrollbar { display: none; }
.nd .nd-tab {
  flex-shrink: 0; padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: var(--mtr-text-secondary); border: 1px solid var(--mtr-border); background: transparent; white-space: nowrap;
}
.nd .nd-tab.is-active { color: var(--mtr-accent-text); background: var(--mtr-accent); border-color: transparent; }
.nd .nd-tab-admin { border-style: dashed; color: var(--accent); }

.nd .nd-list { display: flex; flex-direction: column; gap: 8px; }
.nd .nd-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--mtr-bg-card); border: 1px solid var(--mtr-border); color: var(--mtr-text-primary);
}
.nd .nd-row:active { background: var(--mtr-bg-card-hover); }
.nd .nd-rank { width: 22px; text-align: center; font-weight: 700; color: var(--mtr-text-muted); flex-shrink: 0; }
.nd .nd-row:nth-child(-n+3) .nd-rank { color: var(--accent); }
.nd .nd-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; flex-shrink: 0; background: var(--mtr-bg-secondary); }
.nd .nd-avatar-ph { display: grid; place-items: center; font-weight: 600; color: var(--accent); border: 1px solid var(--mtr-border); }
.nd .nd-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nd .nd-name { font-weight: 600; font-size: 15px; color: var(--mtr-text-primary); overflow: hidden; text-overflow: ellipsis; }
.nd .nd-sub { font-size: 12.5px; color: var(--mtr-text-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nd .nd-rating { font-weight: 700; color: var(--accent); font-size: 17px; text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.nd .nd-rating .rating-delta { font-size: 11.5px; }

.nd .nd-me { margin: 0 0 16px; }
.nd .nd-me-card {
  display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px;
  background: var(--mtr-bg-card); border: 1px solid var(--mtr-border-active); color: var(--mtr-text-primary);
}
.nd .nd-me-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.nd .nd-me-card b { font-size: 17px; }
.nd .nd-me-card span:last-child { color: var(--mtr-text-secondary); font-size: 13px; }
.nd .nd-me-card input {
  width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit; font-size: 16px;
  background: var(--mtr-bg-primary); border: 1px solid var(--mtr-border); color: var(--mtr-text-primary);
}

.nd .nd-card {
  display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px;
  background: var(--mtr-bg-card); border: 1px solid var(--mtr-border); color: var(--mtr-text-primary);
}
.nd .nd-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 16px; }
.nd .nd-muted { color: var(--mtr-text-muted); font-size: 12.5px; }

.nd .nd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nd .nd-title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 26px; color: var(--mtr-text-primary); }
.nd .nd-h3 { margin: 22px 0 10px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--mtr-text-secondary); font-weight: 600; }
.nd .nd-meta { margin: 6px 0 10px; }
.nd .nd-text { color: var(--mtr-text-secondary); line-height: 1.55; white-space: pre-line; }
.nd .nd-big { font-family: var(--serif); font-size: 44px; line-height: 1.1; color: var(--accent); margin: 6px 0 4px; }
.nd .nd-big .nd-sub { font-family: var(--sans); font-size: 12.5px; display: block; }
.nd .nd-ok { color: var(--win); font-weight: 600; margin: 10px 0 0; }

.nd .nd-reg { padding: 14px; border-radius: 14px; background: var(--mtr-bg-card); border: 1px solid var(--mtr-border); }
.nd .nd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.nd .nd-chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--mtr-border); color: var(--mtr-text-primary); font-size: 13px; }

.nd .nd-match {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 12px; flex-wrap: wrap;
  background: var(--mtr-bg-card); border: 1px solid var(--mtr-border); color: var(--mtr-text-primary); font-size: 14px;
}
.nd .nd-match-date { width: 100%; font-size: 11.5px; color: var(--mtr-text-muted); }
.nd .nd-score { color: var(--mtr-text-primary); }
.nd .nd-loser { color: var(--mtr-text-secondary); }
a.nd-match { justify-content: space-between; flex-wrap: nowrap; }

.nd .nd-hist { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: var(--mtr-bg-card); border: 1px solid var(--mtr-border); }
.nd .nd-hist-score { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; flex-shrink: 0; }
.nd .nd-hist-score b { font-size: 15px; color: var(--mtr-text-primary); }

.nd .nd-rule { margin-bottom: 6px; scroll-margin-top: calc(var(--safe-top) + 16px); }
.nd .rules-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.nd .rules-nav a { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--mtr-border); font-size: 12.5px; color: var(--mtr-text-secondary); }
.nd .rules-list { color: var(--mtr-text-primary); padding-left: 20px; }
.nd .rules-source { font-size: 12.5px; color: var(--mtr-text-muted); line-height: 1.5; }
.nd .about-lead { color: var(--mtr-text-secondary); line-height: 1.6; }
.nd .table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--mtr-border); background: var(--mtr-bg-card); }
.nd .rating-table td, .nd .rating-table th { padding: 10px 12px; }
.nd .player-link { color: var(--mtr-text-primary); }
.nd .empty { color: var(--mtr-text-muted); }
.nd .btn-ghost { background: transparent; border: 1px solid var(--mtr-border); color: var(--mtr-text-primary); }

/* ---------- «О проекте»: компактная верхняя плашка ---------- */
.nd .about-hero { min-height: 0; padding: 24px 16px 16px; margin: 0 0 20px; justify-content: center; }
.nd .about-hero-footer { margin-top: 16px; }

/* ---------- «Правила»: шрифты как на «О проекте» (засечки для заголовков, спокойный основной текст) ---------- */
.nd { --nd-display: "Bodoni Moda", Georgia, "Times New Roman", serif; }
.nd .nd-title { font-family: var(--nd-display); font-weight: 600; font-size: 30px; letter-spacing: .01em; }
.nd .nd-rule .nd-h3 {
  font-family: var(--nd-display); font-weight: 600; font-size: 22px; letter-spacing: 0; text-transform: none;
  color: var(--mtr-text-primary); margin: 26px 0 10px;
}
.nd .rules-list { padding-left: 20px; color: var(--mtr-text-secondary); line-height: 1.6; }
.nd .rules-list li { margin-bottom: 10px; }
.nd .rules-list b { color: var(--mtr-text-primary); font-weight: 600; }
.nd .rules-source { font-size: 13px; line-height: 1.6; }

.nd .nd-input {
  width: 100%; margin-top: 10px; padding: 12px 14px; border-radius: 12px; font: inherit; font-size: 16px;
  background: var(--mtr-bg-primary); border: 1px solid var(--mtr-border); color: var(--mtr-text-primary);
}

.nd .nd-input {
  width: 100%; margin-top: 10px; padding: 12px 14px; border-radius: 12px; font: inherit; font-size: 16px;
  background: var(--mtr-bg-primary); border: 1px solid var(--mtr-border); color: var(--mtr-text-primary);
}
