@font-face { font-family: Inter; src: url(/inter-cyrillic.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116 }
@font-face { font-family: Inter; src: url(/inter-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap }

:root {
  --bg: #0b0f0d; --card: #141917; --card2: #1c2320; --line: rgba(244, 239, 229, .08); --text: #f4efe5; --mute: #8b938c; --dim: #5c645e;
  --brass: #c9a266; --brass-ink: #15120b; --red: #e8705a; --green: #8cc09d;
  --pad: 20px; --top: env(safe-area-inset-top, 0px); --bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent }
html { background: var(--bg); height: 100% }
body { min-height: 100%; background: var(--bg); color: var(--text); font: 400 17px/1.35 Inter, -apple-system, system-ui, sans-serif; letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; touch-action: manipulation }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; outline: 0; -webkit-appearance: none; appearance: none; border-radius: 0 }
button { cursor: pointer; text-align: left; user-select: none; -webkit-user-select: none }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
::placeholder { color: var(--dim) }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column }
.view { flex: 1; display: flex; flex-direction: column; padding: calc(var(--top) + 14px) var(--pad) calc(var(--bottom) + 116px); animation: in .28s cubic-bezier(.2, .8, .2, 1) }
.view.bare { padding-bottom: calc(var(--bottom) + 24px) }
@keyframes in { from { opacity: 0; transform: translateY(8px) } }
@media (prefers-reduced-motion: reduce) { .view, .sheet-body, .fact { animation: none !important } }

/* ——— шапка экрана */
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-bottom: 6px }
.kick { font-size: 15px; color: var(--mute) }
.round { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--card2); display: grid; place-items: center; color: var(--text); transition: transform .12s, background .2s }
.round svg { width: 20px; height: 20px }
.round:active, .btn:active, .row:active, .chip:active { transform: scale(.97) }
.me { font-size: 14px; font-weight: 600; color: var(--brass); background: linear-gradient(145deg, #2c3a31, #18211c); box-shadow: inset 0 0 0 1px rgba(201, 162, 102, .3) }
h1 { font-size: 38px; line-height: 1.04; font-weight: 700; letter-spacing: -.035em; margin: 4px 0 22px; text-wrap: balance }
h1 span { color: var(--dim) }
h2 { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin: 26px 0 10px }

/* ——— строка гостя */
.list { display: grid; gap: 8px }
.row { display: flex; align-items: center; gap: 14px; width: 100%; background: var(--card); border-radius: 24px; padding: 14px 16px 14px 14px; transition: transform .12s }
.row.flat { background: none; padding: 10px 0; border-radius: 0; border-top: 1px solid var(--line) }
.row.flat:first-child { border-top: 0 }
.av { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 600; letter-spacing: .02em; color: var(--brass);
  background: linear-gradient(145deg, #2c3a31, #18211c); box-shadow: inset 0 0 0 1px rgba(201, 162, 102, .3) }
.row .who { flex: 1; min-width: 0 }
.row b { display: block; font-size: 18px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.row .sub { display: block; font-size: 15px; color: var(--mute); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.row .go { flex: none; color: var(--dim) }
.row .go svg { width: 18px; height: 18px }
.pill { display: inline-flex; align-items: center; max-width: 100%; height: 28px; padding: 0 11px; margin-top: 8px; border-radius: 14px; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.pill.gold { color: var(--brass); background: rgba(201, 162, 102, .14) }
.pill.red { color: var(--red); background: rgba(232, 112, 90, .14) }
.pill.green { color: var(--green); background: rgba(140, 192, 157, .13) }
.pill.mute { color: var(--mute); background: var(--card2) }
.empty { color: var(--mute); font-size: 16px; padding: 18px 0; line-height: 1.4 }
.add { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: 24px; color: var(--mute); font-size: 17px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line) }
.add i { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--card2); color: var(--text) }
.add svg { width: 20px; height: 20px }

/* заметки в работе */
.draft { display: flex; align-items: center; gap: 12px; width: 100%; background: rgba(201, 162, 102, .12); color: var(--brass); border-radius: 20px; padding: 14px 16px; font-size: 16px; font-weight: 500 }
.draft.bad { background: rgba(232, 112, 90, .12); color: var(--red) }
.draft span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.draft svg { width: 18px; height: 18px; flex: none }
.spin { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite }
@keyframes spin { to { transform: rotate(1turn) } }

/* ——— нижняя панель */
.tabs { position: fixed; z-index: 5; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; display: grid; grid-template-columns: 1fr 96px 1fr; align-items: center;
  padding: 10px 14px calc(var(--bottom) + 10px); background: linear-gradient(to top, var(--bg) 62%, rgba(11, 15, 13, 0)) }
.tab { display: grid; justify-items: center; gap: 4px; padding: 6px 0; font-size: 12px; font-weight: 500; color: var(--dim); transition: color .2s }
.tab svg { width: 24px; height: 24px }
.tab.on { color: var(--text) }
.mic { justify-self: center; width: 68px; height: 68px; border-radius: 50%; background: var(--brass); color: var(--brass-ink); display: grid; place-items: center; box-shadow: 0 0 0 7px rgba(201, 162, 102, .14), 0 12px 30px rgba(0, 0, 0, .5); transition: transform .12s }
.mic:active { transform: scale(.94) }
.mic svg { width: 26px; height: 26px; stroke-width: 2 }

/* ——— кнопки */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 58px; border-radius: 29px; font-size: 17px; font-weight: 600; text-align: center; transition: transform .12s, opacity .2s }
.btn svg { width: 20px; height: 20px }
.btn.brass { background: var(--brass); color: var(--brass-ink) }
.btn.cream { background: var(--text); color: #101412 }
.btn.dark { background: var(--card2) }
.btn.ghost { color: var(--mute); font-weight: 500 }
.btn.danger { color: var(--red); background: rgba(232, 112, 90, .12) }
.btn[disabled] { opacity: .4; pointer-events: none }
.dock { position: fixed; z-index: 4; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; display: grid; gap: 6px; padding: 28px var(--pad) calc(var(--bottom) + 14px);
  background: linear-gradient(to top, var(--bg) 70%, rgba(11, 15, 13, 0)) }
.chips { display: flex; flex-wrap: wrap; gap: 8px }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--pad) * -1) 14px; padding: 0 var(--pad); scrollbar-width: none }
.chips.scroll::-webkit-scrollbar { display: none }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 19px; background: var(--card2); font-size: 15px; font-weight: 500; white-space: nowrap; transition: transform .12s, background .2s, color .2s }
.chip svg { width: 16px; height: 16px }
.chip.on { background: var(--text); color: #101412 }
.chip.line { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--mute) }
.chip.set { background: rgba(201, 162, 102, .14); color: var(--brass) }

/* ——— поиск и поля */
.search { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 26px; background: var(--card); margin-bottom: 12px }
.search svg { width: 20px; height: 20px; color: var(--dim); flex: none }
.search input { flex: 1; min-width: 0; font-size: 17px }
.field { display: block; margin-bottom: 12px }
.field span { display: block; font-size: 13px; color: var(--mute); margin: 0 0 6px 4px }
.field input, .field textarea, .field select { width: 100%; min-height: 54px; padding: 15px 16px; border-radius: 18px; background: var(--card2); font-size: 17px; resize: none }
.field input:focus, .field textarea:focus, .search:focus-within { box-shadow: inset 0 0 0 1.5px rgba(201, 162, 102, .55) }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 22px; background: var(--card); margin-bottom: 18px }
.seg button { height: 36px; border-radius: 18px; text-align: center; font-size: 15px; font-weight: 500; color: var(--mute); transition: background .2s, color .2s }
.seg button.on { background: var(--card2); color: var(--text) }

/* ——— карточка гостя */
.hero { display: flex; align-items: center; gap: 16px; margin: 6px 0 4px }
.hero .av { width: 76px; height: 76px; font-size: 25px }
.hero b { display: block; font-size: 30px; line-height: 1.06; font-weight: 700; letter-spacing: -.03em; text-wrap: balance }
.hero span { display: block; font-size: 15px; color: var(--mute); margin-top: 5px }
.hero span + span { margin-top: 1px }
.alert { display: flex; align-items: center; gap: 13px; border-radius: 22px; padding: 14px 16px; margin-top: 10px; background: var(--card) }
.alert svg { width: 24px; height: 24px; flex: none }
.alert b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2 }
.alert span { display: block; font-size: 14px; margin-top: 2px; opacity: .72 }
.alert.gold { background: var(--brass); color: var(--brass-ink) }
.alert.red { background: rgba(232, 112, 90, .13); color: var(--red) }
.alert.green { background: rgba(140, 192, 157, .12); color: var(--green) }
.alert.mute { color: var(--mute) }
.alerts { margin-top: 12px }
.stats { display: flex; background: var(--card); border-radius: 22px; margin-top: 10px; padding: 15px 0 }
.stats div { flex: 1; text-align: center; border-right: 1px solid var(--line) }
.stats div:last-child { border: 0 }
.stats b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums }
.stats span { font-size: 13px; color: var(--mute) }
.facts { display: grid }
.fact-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; width: 100%; padding: 13px 0; border-top: 1px solid var(--line) }
.fact-row:first-child { border-top: 0; padding-top: 4px }
.fact-row p { font-size: 18px; font-weight: 500; letter-spacing: -.015em; line-height: 1.25 }
.fact-row p small { display: block; font-size: 13px; font-weight: 500; color: var(--brass); letter-spacing: .01em; margin-bottom: 3px }
.fact-row i { flex: none; font-style: normal; font-size: 14px; color: var(--dim); white-space: nowrap }
.fact-row.new p { animation: glow 2.4s ease-out }
@keyframes glow { from { color: var(--brass) } }
.mark { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .022; font-size: 13px; line-height: 3.4; word-spacing: 2.2em; overflow: hidden; transform: rotate(-24deg) scale(1.5); white-space: pre-wrap; text-align: center }

/* ——— запись */
.rec { flex: 1; display: flex; flex-direction: column; min-height: calc(100dvh - var(--top) - var(--bottom) - 40px) }
.whom { display: inline-flex; align-items: center; gap: 10px; background: var(--card); border-radius: 26px; padding: 6px 16px 6px 6px; font-size: 16px; font-weight: 600; max-width: 70% }
.whom .av { width: 36px; height: 36px; font-size: 12px }
.whom span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.timer { text-align: center; font-size: 96px; font-weight: 300; letter-spacing: -.045em; font-variant-numeric: tabular-nums; line-height: 1; margin-top: 7vh }
.state { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; color: var(--mute); margin-top: 12px; min-height: 22px }
.state i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: blink 1.2s ease-in-out infinite }
@keyframes blink { 50% { opacity: .25 } }
.wave { margin-top: 5vh; height: 120px; border-radius: 28px; background: var(--card); overflow: hidden }
.wave canvas { width: 100%; height: 100%; display: block }
.tip { margin-top: 22px; text-align: center; color: var(--mute); font-size: 16px; line-height: 1.45; text-wrap: balance }
.tip b { display: block; color: var(--text); font-weight: 500; margin-bottom: 4px }
.ctrl { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 24px 14px 6px }
.ctrl .round { width: 58px; height: 58px }
.ctrl .round svg { width: 22px; height: 22px }
.stop { width: 92px; height: 92px; border-radius: 50%; background: var(--brass); display: grid; place-items: center; box-shadow: 0 0 0 9px rgba(201, 162, 102, .15); transition: transform .12s }
.stop:active { transform: scale(.94) }
.stop i { width: 28px; height: 28px; border-radius: 8px; background: var(--brass-ink) }
.steps { margin: 9vh auto 0; display: grid; gap: 18px; width: fit-content }
.steps li { list-style: none; display: flex; align-items: center; gap: 14px; font-size: 19px; font-weight: 500; color: var(--dim); transition: color .4s }
.steps li i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px currentColor; display: grid; place-items: center; flex: none }
.steps li.now { color: var(--text) }
.steps li.now i { box-shadow: none; border: 2px solid var(--brass); border-right-color: transparent; animation: spin .8s linear infinite }
.steps li.done { color: var(--mute) }
.steps li.done i { background: rgba(140, 192, 157, .18); box-shadow: none; color: var(--green) }
.steps li.done i::after { content: ""; width: 9px; height: 5px; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg) }
textarea.say { width: 100%; flex: 1; min-height: 200px; margin-top: 22px; padding: 18px; border-radius: 24px; background: var(--card); font-size: 20px; line-height: 1.4; resize: none }

/* ——— подтверждение фактов */
.fact { position: relative; background: var(--card); border-radius: 24px; padding: 16px 62px 16px 18px; margin-bottom: 10px; transition: opacity .25s, background .25s; animation: in .4s cubic-bezier(.2, .8, .2, 1) backwards }
.fact:nth-child(2) { animation-delay: .06s } .fact:nth-child(3) { animation-delay: .12s } .fact:nth-child(4) { animation-delay: .18s } .fact:nth-child(n+5) { animation-delay: .24s }
.fact .tag { font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--brass) }
.fact textarea { display: block; width: 100%; font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin-top: 6px; resize: none; overflow: hidden }
.fact .quo { font-size: 15px; color: var(--mute); margin-top: 6px; line-height: 1.3 }
.fact .rem { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; margin-top: 10px; border-radius: 15px; font-size: 14px; font-weight: 500; color: var(--brass); background: rgba(201, 162, 102, .13) }
.fact .ok { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(140, 192, 157, .16); color: var(--green); transition: background .2s, color .2s }
.fact .ok svg { width: 18px; height: 18px; stroke-width: 2.6 }
.fact.off { opacity: .45 }
.fact.off .ok { background: var(--card2); color: var(--dim) }
.fact.off textarea { text-decoration: line-through; text-decoration-thickness: 1.5px }
.note-foot { color: var(--mute); font-size: 15px; line-height: 1.4; margin: 6px 4px 0 }
details.heard { margin: 14px 4px 0; color: var(--mute); font-size: 15px; line-height: 1.45 }
details.heard summary { list-style: none; color: var(--dim); cursor: pointer }
details.heard summary::-webkit-details-marker { display: none }
details.heard p { margin-top: 8px }

/* ——— вход */
.login { align-items: center; text-align: center; padding-top: calc(var(--top) + 9vh) }
.logo { font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--brass) }
.login h1 { margin-top: 18px; font-size: 34px }
.login p { color: var(--mute); font-size: 16px; max-width: 280px; margin: -8px auto 0; min-height: 44px; text-wrap: balance }
.login p.err { color: var(--red) }
.code { display: flex; gap: 10px; justify-content: center; margin: 22px 0 4px }
.code i { width: 44px; height: 58px; border-radius: 16px; background: var(--card); display: grid; place-items: center; font-style: normal; font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; transition: box-shadow .15s, background .15s }
.code i.at { box-shadow: inset 0 0 0 1.5px var(--brass) }
.code.shake { animation: shake .4s }
@keyframes shake { 20%, 60% { transform: translateX(-8px) } 40%, 80% { transform: translateX(8px) } }
.keys { margin-top: auto; display: grid; grid-template-columns: repeat(3, 76px); gap: 14px 26px; justify-content: center; padding-bottom: 10px }
.keys button { width: 76px; height: 76px; border-radius: 50%; background: var(--card); text-align: center; font-size: 30px; font-weight: 500; transition: background .15s, transform .1s }
.keys button:active { background: var(--card2); transform: scale(.94) }
.keys button.nil { background: none; color: var(--mute); display: grid; place-items: center }
.keys button.nil svg { width: 26px; height: 26px }

/* ——— шторка */
#sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(4, 6, 5, .62); animation: fade .2s }
#sheet[hidden] { display: none }
@keyframes fade { from { opacity: 0 } }
.sheet-body { width: 100%; max-width: 480px; max-height: 88dvh; overflow-y: auto; background: #111614; border-radius: 30px 30px 0 0; padding: 10px var(--pad) calc(var(--bottom) + 20px); animation: up .32s cubic-bezier(.2, .9, .25, 1); overscroll-behavior: contain }
@keyframes up { from { transform: translateY(100%) } }
.grab { width: 38px; height: 5px; border-radius: 3px; background: var(--card2); margin: 0 auto 16px }
.sheet-body h3 { font-size: 24px; font-weight: 700; letter-spacing: -.025em; margin-bottom: 16px }
.sheet-body .btn + .btn { margin-top: 8px }
.sheet-body .list { margin-bottom: 14px }
.big-code { text-align: center; font-size: 56px; font-weight: 600; letter-spacing: .12em; font-variant-numeric: tabular-nums; padding: 8px 0 4px; color: var(--brass) }
.sheet-note { color: var(--mute); font-size: 15px; line-height: 1.4; text-align: center; margin-bottom: 18px; text-wrap: balance }

/* ——— клуб */
.num { background: var(--card); border-radius: 24px; padding: 18px; margin-bottom: 10px }
.num b { display: block; font-size: 44px; font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums }
.num b small { font-size: 20px; font-weight: 500; color: var(--dim); letter-spacing: -.02em }
.num span { display: block; color: var(--mute); font-size: 15px; margin-top: 8px }
.meter { height: 6px; border-radius: 3px; background: var(--card2); margin-top: 14px; overflow: hidden }
.meter i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--brass); transition: width .8s cubic-bezier(.2, .8, .2, 1) }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px }
.pair .num b { font-size: 34px }
.staff { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border-top: 1px solid var(--line) }
.staff:first-child { border-top: 0 }
.staff .av { width: 42px; height: 42px; font-size: 14px }
.staff div { flex: 1; min-width: 0 }
.staff b { display: block; font-size: 17px; font-weight: 600 }
.staff span { font-size: 14px; color: var(--mute) }
.staff em { font-style: normal; font-size: 15px; color: var(--mute); font-variant-numeric: tabular-nums; white-space: nowrap }
.staff.off { opacity: .45 }
.jr { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.35 }
.jr:first-child { border-top: 0 }
.jr time { flex: none; width: 76px; color: var(--dim); font-variant-numeric: tabular-nums }
.jr b { font-weight: 600 }
.jr.alert-row { color: var(--red) }
.bars { display: grid; gap: 9px; margin-top: 4px }
.bars div { display: grid; grid-template-columns: 1fr 34px; align-items: center; gap: 10px; font-size: 15px }
.bars span { position: relative; height: 34px; border-radius: 12px; background: var(--card); overflow: hidden; display: flex; align-items: center; padding: 0 12px; white-space: nowrap }
.bars span i { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(201, 162, 102, .16); transition: width .8s cubic-bezier(.2, .8, .2, 1) }
.bars span u { position: relative; text-decoration: none }
.bars em { font-style: normal; color: var(--mute); text-align: right; font-variant-numeric: tabular-nums }
.demo-tag { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brass); box-shadow: inset 0 0 0 1px rgba(201, 162, 102, .4); border-radius: 10px; padding: 3px 9px; margin-bottom: 14px }

#toast { position: fixed; z-index: 30; left: 50%; bottom: calc(var(--bottom) + 130px); transform: translateX(-50%); max-width: 86vw; background: var(--text); color: #101412; font-size: 15px; font-weight: 600; padding: 12px 18px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: in .25s; text-align: center }
#toast[hidden] { display: none }
@media (min-width: 560px) { body { background: #060807 } #app { background: var(--bg); box-shadow: 0 0 0 1px var(--line) } }
.gap { margin-top: 14px }
.state.far { margin-top: 30vh }
.bar .demo-tag { margin: 0 }
.demo-tag { align-self: flex-start }
