/* wordinggo.com — «газета одного слова» */
:root {
  --paper: #f2eee5;
  --paper-2: #e8e2d4;
  --card: #f8f5ee;
  --ink: #121110;
  --ink-2: #3b3833;
  --muted: #857e72;
  --line: #d5cdbd;
  --accent: #d0381c;
  --ok: #2f6b3a;
  --display: "Prata", "Bodoni 72", "Didot", "Bodoni MT", Georgia, serif;
  --sans: "Golos Text", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(16px, 4vw, 40px);
  --serif: var(--display);
  --gold: var(--accent);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.demo-banner { background: var(--accent); color: #fff; text-align: center; font-size: 13px; padding: 6px var(--pad); }

/* ---------- Шапка ---------- */
.top {
  max-width: 1240px; margin: 0 auto; padding: 18px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--ink);
}
.logo { text-decoration: none; display: inline-flex; align-items: baseline; font-family: var(--display); font-size: 24px; letter-spacing: -.01em; line-height: 1; }
.logo-tld { color: var(--accent); }
.logo-mark, .logo-text { display: none; }   /* старая разметка кабинета */
.logo::before { content: none; }
.top-nav { display: flex; align-items: center; gap: 18px; }
.me-link { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-size: 14px; font-weight: 500; }
.me-link:hover span { text-decoration: underline; text-underline-offset: 4px; }
.lang { display: flex; gap: 2px; font-size: 13px; font-weight: 600; letter-spacing: .06em; }
.lang a { text-decoration: none; padding: 4px 6px; color: var(--muted); }
.lang a.on, html[lang="ru"] .lang .ru-on, html[lang="en"] .lang .en-on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

main { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }

/* ---------- Главное слово ---------- */
.hero { min-height: calc(100svh - 70px); display: flex; flex-direction: column; justify-content: center; padding: 28px 0 56px; }
.meta {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.meta > :first-child { justify-self: start; }
.meta > :last-child { justify-self: end; text-align: right; }
.meta b { color: var(--ink); font-weight: 600; letter-spacing: .04em; }
.meta-timer b { font-variant-numeric: tabular-nums; }
.meta-timer { white-space: nowrap; }
.lbl-short { display: none; }
.word-wrap { margin: clamp(28px, 6vh, 64px) 0 clamp(18px, 3vh, 30px); text-align: center; font-weight: 400; overflow: hidden; }
.word {
  display: inline-block; font-family: var(--display); font-weight: 400;
  font-size: 200px; line-height: 1.05; letter-spacing: -.025em; white-space: nowrap;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .4s;
}
.word.swap { transform: translateY(40%); opacity: 0; }
.byline { text-align: center; margin: 0 0 34px; font-size: 14px; color: var(--ink-2); min-height: 1.5em; }
.byline .sep { color: var(--line); margin: 0 8px; }

.cta { display: flex; justify-content: center; gap: 10px; }
.buy {
  appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: stretch;
  background: var(--ink); color: var(--paper); height: 60px; padding: 0; font-size: 17px; font-weight: 600;
  transition: background .15s, transform .15s;
}
.buy > span { display: flex; align-items: center; padding: 0 26px; }
.buy-price { background: var(--accent); color: #fff; min-width: 76px; justify-content: center; font-variant-numeric: tabular-nums; }
.buy:hover { background: #000; }
.buy:active { transform: translateY(1px); }
.buy:disabled { background: var(--muted); cursor: default; transform: none; }
.icon-btn {
  appearance: none; width: 60px; height: 60px; border: 1px solid var(--ink); background: transparent; cursor: pointer;
  display: grid; place-items: center; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--ink); color: var(--paper); }
.after { text-align: center; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.after b { color: var(--ink-2); font-weight: 600; }

/* ---------- Правила ---------- */
.rules { border-top: 1px solid var(--ink); padding: 26px 0 30px; }
.rules ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: r; }
.rules li { counter-increment: r; padding: 0 22px 0 0; }
.rules li + li { border-left: 1px solid var(--line); padding-left: 22px; }
.rules li::before { content: counter(r, decimal-leading-zero); display: block; font-size: 12px; color: var(--accent); font-weight: 600; letter-spacing: .1em; margin-bottom: 8px; }
.rules b { display: block; font-weight: 600; margin-bottom: 2px; }
.rules p { margin: 0; color: var(--muted); font-size: 14px; }
.track { display: flex; flex-wrap: wrap; gap: 0; margin-top: 26px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.track span { padding: 9px 14px; font-size: 13px; color: var(--muted); border-right: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.track span.done { text-decoration: line-through; text-decoration-color: var(--line); }
.track span.now { background: var(--ink); color: var(--paper); }

/* ---------- Заголовки разделов ---------- */
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--ink); padding-bottom: 12px; }
h2 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4.4vw, 48px); line-height: 1.05; margin: 0; letter-spacing: -.01em; }
.sec-head span { font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); padding: 22px 0; margin: 0; }

/* ---------- Зал славы ---------- */
.hall { padding: 64px 0 0; }
.fame-list { list-style: none; margin: 0; padding: 0; }
.fame-list li { display: grid; grid-template-columns: 170px 1fr auto; gap: 20px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.fame-m { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.fame-w { font-family: var(--display); font-size: clamp(30px, 4vw, 46px); line-height: 1.1; word-break: break-word; }
.fame-w.mod { font-family: var(--sans); font-size: 15px; color: var(--muted); }
.fame-meta { font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; }
.fame-list li:first-child .fame-m { color: var(--accent); }
.fame-list li:first-child .fame-m::before { content: "★ "; }

/* ---------- Летопись ---------- */
.chron { padding: 64px 0 20px; }
.hist { list-style: none; margin: 0; padding: 0; }
.hist li { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 18px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.hist .n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hist .w { font-family: var(--display); font-size: 26px; line-height: 1.15; word-break: break-word; }
.hist .w.mod { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.hist .by { font-size: 13px; color: var(--muted); }
.hist .p { font-weight: 600; font-size: 14px; text-align: right; min-width: 64px; }
.hist .t { font-size: 13px; color: var(--muted); text-align: right; min-width: 110px; }
.hist li.current .w::after { content: attr(data-now); font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-left: 10px; vertical-align: middle; }
.more { display: block; margin: 18px auto 0; background: none; border: 0; border-bottom: 1px solid var(--ink); padding: 4px 0; cursor: pointer; font-size: 14px; }

/* ---------- Подвал ---------- */
.foot { max-width: 1240px; margin: 70px auto 0; padding: 22px var(--pad) 40px; border-top: 1px solid var(--ink); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Нижняя панель на телефоне ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(242,238,229,.94); backdrop-filter: blur(8px); border-top: 1px solid var(--ink); transform: translateY(110%); transition: transform .25s; }
.dock.show { transform: none; }
.dock .buy { width: 100%; }
@media (min-width: 641px) { .dock { display: none; } }
.dock .buy > span:first-child { flex: 1; justify-content: center; }

/* ---------- Окна ---------- */
.modal { border: 1px solid var(--ink); padding: 0; width: min(480px, calc(100vw - 24px)); background: var(--card); color: var(--ink); box-shadow: 14px 14px 0 rgba(18,17,16,.12); }
.modal::backdrop { background: rgba(18,17,16,.45); }
.modal[open] { animation: pop .2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }
.modal-in { padding: 34px 30px 28px; position: relative; }
.close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
.close:hover { color: var(--ink); }
.modal .close:focus-visible { outline: none; color: var(--ink); }
.eyebrow { margin: 0 0 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.modal h2 { font-size: 32px; margin-bottom: 22px; }

.word-input {
  width: 100%; border: 0; border-bottom: 2px solid var(--ink); background: transparent; outline: none;
  font-family: var(--display); font-size: clamp(34px, 8vw, 52px); line-height: 1.2; padding: 6px 0 8px; text-align: center; color: var(--ink);
  border-radius: 0;
}
.word-input::placeholder { color: var(--line); }
.word-input.bad { border-bottom-color: var(--accent); }
.hint { min-height: 20px; font-size: 13px; color: var(--accent); text-align: center; margin: 8px 0 14px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.field em { font-style: normal; color: var(--muted); font-weight: 400; }
.field input, .input {
  width: 100%; font: 400 16px var(--sans); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 0; padding: 13px 14px; outline: none;
}
.field input:focus, .input:focus { border-color: var(--ink); }
.methods { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--ink); margin: 0 0 14px; }
.methods button { appearance: none; background: transparent; border: 0; padding: 12px 6px; cursor: pointer; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.methods button + button { border-left: 1px solid var(--ink); }
.methods button[aria-checked="true"] { background: var(--ink); color: var(--paper); }
.methods button small { display: block; font-size: 11px; font-weight: 400; opacity: .7; margin-top: 2px; }
.topup-link { margin: -4px 0 14px; font-size: 14px; text-align: right; }
.topup-link a { color: var(--ink); }
.need-tg { border-left: 3px solid #229ed9; padding: 10px 0 10px 14px; margin: 0 0 14px; }
.need-tg p { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.err { color: var(--accent); font-size: 14px; min-height: 1.2em; margin: 4px 0 8px; }
.err.okmsg { color: var(--ok); }
.terms { font-size: 12px; color: var(--muted); text-align: center; margin: 12px 0 0; }
.terms a { color: var(--ink-2); }

.btn-primary {
  appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: var(--paper); font: 600 16px var(--sans); padding: 16px 26px; text-decoration: none;
  transition: background .15s;
}
.btn-primary:hover { background: #000; }
.btn-primary:disabled { opacity: .5; cursor: default; }
.btn-primary .gold, .btn-primary .acc { color: #ffb19f; }
.btn-primary.wide, .wide { width: 100%; }
.btn-ghost {
  appearance: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; border: 1px solid var(--ink); color: var(--ink); font: 500 15px var(--sans); padding: 14px 22px; text-decoration: none;
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-ghost.sm { padding: 8px 14px; font-size: 14px; }
.btn-link { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 14px; padding: 8px; text-decoration: underline; text-underline-offset: 4px; }
.btn-tg { background: #229ed9; }
.btn-tg:hover { background: #1b8bc0; }

.status { text-align: center; }
.status .word-big { font-family: var(--display); font-size: clamp(40px, 9vw, 64px); line-height: 1.1; margin: 4px 0 6px; word-break: break-word; }
.status p { color: var(--ink-2); margin: 0 0 22px; }
.status .actions { display: grid; gap: 10px; }
.spinner { width: 36px; height: 36px; margin: 6px auto 18px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mark { font-family: var(--display); font-size: 44px; line-height: 1; color: var(--accent); margin-bottom: 6px; }

.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 10px; }
.share-grid a, .share-grid button { display: block; padding: 14px; border: 1px solid var(--line); text-align: center; text-decoration: none; font-weight: 500; background: var(--paper); cursor: pointer; font-size: 15px; }
.share-grid a:hover, .share-grid button:hover { border-color: var(--ink); }
.share-grid .wide2 { grid-column: 1 / -1; }

/* ---------- Мои слова ---------- */
.me { max-width: 900px; margin: 0 auto; padding: 0 var(--pad) 30px; }
.me-title { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 8vw, 84px); line-height: 1; margin: 38px 0 26px; letter-spacing: -.02em; }
.notice { border-left: 3px solid var(--accent); padding: 10px 14px; background: var(--card); margin: 0 0 18px; }
.me-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin-bottom: 40px; }
.me-stats > div { padding: 16px 14px; }
.me-stats > div + div { border-left: 1px solid var(--line); }
.me-stats b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(26px, 4vw, 38px); line-height: 1.1; }
.me-stats span { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.me-sec { margin-bottom: 44px; }
.me-sec h2 { font-size: 30px; border-bottom: 1px solid var(--ink); padding-bottom: 10px; margin-bottom: 0; }
.me-list { list-style: none; margin: 0; padding: 0; }
.me-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ml-w { font-family: var(--display); font-size: 30px; line-height: 1.1; }
.ml-meta { font-size: 13px; color: var(--muted); }
.ml-st { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; font-size: 13px; color: var(--ink-2); max-width: 280px; }
.st-now { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; display: block; }
.me-list li.hidden .ml-w { color: var(--muted); }
.me-empty { padding: 30px 0; border-top: 1px solid var(--ink); }
.me-empty p { font-size: 18px; margin: 0 0 20px; color: var(--ink-2); }
.tg-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 0; border-bottom: 1px solid var(--line); }
.tg-row p { margin: 0; color: var(--ink-2); max-width: 520px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }

.bal { display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap; padding: 18px 0 8px; }
.bal-num { font-family: var(--display); font-size: clamp(44px, 7vw, 72px); line-height: 1; }
.bal p { margin: 0; max-width: 420px; }
.topup { padding: 10px 0 6px; max-width: 520px; }
.presets { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.presets button { appearance: none; border: 1px solid var(--line); background: var(--paper); padding: 10px 16px; cursor: pointer; font-size: 15px; }
.presets button.on, .presets button:hover { border-color: var(--ink); }
.field.amount { position: relative; }
.field.amount input { font-size: 22px; padding-right: 40px; }
.field.amount span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 18px; margin: 0; }
.ops li .ml-w { font-family: var(--sans); font-size: 17px; font-weight: 500; }
.ops .plus { color: var(--ok); }

/* ---------- Оферта и политика ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 10px var(--pad) 80px; }
.doc h1 { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 6vw, 60px); line-height: 1.05; margin: 34px 0 10px; }
.doc h2 { font-size: 26px; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--ink-2); }

/* ---------- 404 ---------- */
.nf { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 8px; padding: 20px; }
.nf-code { font-family: var(--display); font-size: 140px; line-height: 1; margin: 0; }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .rules ol { grid-template-columns: 1fr 1fr; row-gap: 22px; }
  .rules li:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 640px) {
  .top { padding-top: 14px; padding-bottom: 14px; }
  .logo { font-size: 21px; }
  .me-link span { display: none; }
  .hero { min-height: calc(100svh - 120px); padding-bottom: 30px; }
  .meta { grid-template-columns: 1fr 1fr; font-size: 11px; letter-spacing: .1em; }
  .meta > :nth-child(2) { display: none; }
  .buy { height: 56px; font-size: 16px; }
  .buy > span { padding: 0 18px; }
  .icon-btn { width: 56px; height: 56px; }
  .rules ol { grid-template-columns: 1fr; }
  .track { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .track::-webkit-scrollbar { display: none; }
  .track span { flex: none; }
  .lbl-full { display: none; }
  .lbl-short { display: inline; }
  .rules li, .rules li + li { border-left: 0; padding: 0; }
  .fame-list li { grid-template-columns: 1fr; gap: 2px; }
  .fame-meta { text-align: left; }
  .hist li { grid-template-columns: 34px 1fr auto; }
  .hist .t { display: none; }
  .me-stats { grid-template-columns: 1fr 1fr; }
  .me-stats > div:nth-child(3) { border-left: 0; }
  .me-stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .me-list li { grid-template-columns: 1fr; }
  .ml-st { grid-column: 1; grid-row: auto; text-align: left; max-width: none; margin-top: 4px; }
  .modal-in { padding: 30px 20px 22px; }
  .foot { margin-top: 40px; padding-bottom: 100px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
