:root {
  --ink: #241c55;
  --ink-2: #413a78;
  --muted: #6f6a94;
  --glacier: #efeaf7;
  --snow: #fffdf9;
  --line: #e3dcef;
  --lake: #c9441f;
  --accent-bg: #fdebe3;
  --lake-dark: #9f3213;
  --flag: #ff9f1c;
  --pine: #2f7a5a;
  --alert: #cf4a3f;
  --alert-bg: #fdeceb;
  --halt: #7a5cc7;
  --halt-bg: #f0ebfb;
  --ok-bg: #e3f6f1;
  --stand-bg: #fff2dd;
  --font: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --tabs-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #e6dcf2 0%, #f8f1ea 360px, #f8f1ea 100%) fixed;
  line-height: 1.4;
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--flag); outline-offset: 2px; }

.boot { display: grid; place-items: center; height: 100vh; font-size: 28px; font-weight: 800; letter-spacing: .02em; color: var(--ink-2); }
.loading { padding: 60px 20px; text-align: center; color: var(--muted); }

/* ---------- каркас ---------- */
.main {
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 14px calc(var(--tabs-h) + 28px + env(safe-area-inset-bottom));
  display: grid;
  gap: 14px;
}

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--snow);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs-in { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.tab {
  position: relative;
  height: var(--tabs-h);
  border: 0; background: none;
  display: grid; place-items: center; align-content: center; gap: 2px;
  font-size: 12px; font-weight: 600; color: var(--muted);
}
.tab .ic { font-size: 22px; line-height: 1; filter: grayscale(1) opacity(.7); }
.tab.on { color: var(--lake-dark); }
.tab.on .ic { filter: none; }
.tab.on::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--lake); }

.card {
  background: var(--snow);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.card h2 { font-size: 17px; font-weight: 750; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 14px; }
.card > * + * { margin-top: 12px; }
.card > h2 + .sub { margin-top: 2px; }

/* ---------- кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  border-radius: 14px; border: 1px solid var(--line);
  background: var(--snow); font-weight: 700; font-size: 16px;
  transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--lake); border-color: var(--lake); color: #fff; }
.btn.primary:active { background: var(--lake-dark); }
.btn.smoke { background: var(--stand-bg); border-color: #f1d4a3; color: #7a4a05; }
.btn.danger { background: var(--alert-bg); border-color: #f2c4c0; color: var(--alert); }
.btn.ghost { background: transparent; }
.btn.small { white-space: nowrap; min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > .btn { flex: 1 1 140px; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.input {
  width: 100%; min-height: 48px; padding: 0 14px;
  border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; font-size: 16px;
}
.input:focus { outline: none; border-color: var(--lake); box-shadow: 0 0 0 3px rgba(201, 68, 31, .18); }
.input:disabled { background: var(--glacier); color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); }
form { display: grid; gap: 12px; }

/* ---------- вход ---------- */
.auth { max-width: 440px; margin: 0 auto; padding: 0 16px 40px; }
.auth-hero { position: relative; margin: 0 -16px; height: 280px; overflow: hidden; color: #fff; }
.auth-hero .hs { position: absolute; inset: 0; height: 100%; }
.auth-txt { position: relative; z-index: 3; padding: 32px 24px 0; text-shadow: 0 2px 12px rgba(20, 16, 52, .5); }
.auth-hero h1 { font-size: 40px; font-weight: 850; letter-spacing: .01em; }
.auth-hero p { margin-top: 6px; font-size: 16px; max-width: 250px; color: #fff4e6; }
.auth-card { margin-top: -22px; position: relative; z-index: 3; background: var(--snow); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: grid; gap: 14px; box-shadow: 0 10px 30px rgba(17, 40, 59, .12); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--glacier); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: none; min-height: 40px; border-radius: 9px; font-weight: 700; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(17, 40, 59, .15); }

/* ---------- шапка путника ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; color: #fff;
  background: linear-gradient(165deg, #241c55 0%, #3a2f78 100%);
  box-shadow: 0 12px 28px rgba(36, 28, 85, .28);
}
.hero .hs { border-radius: 0; }
.hs-name { position: absolute; left: 14px; top: 12px; display: grid; gap: 2px; z-index: 3; text-shadow: 0 1px 8px rgba(20, 16, 52, .6); }
.hs-name b { font-size: 19px; font-weight: 800; }
.hs-name span { font-size: 13px; opacity: .92; }
.hs-alt { position: absolute; right: 14px; top: 6px; text-align: right; z-index: 3; text-shadow: 0 1px 10px rgba(20, 16, 52, .6); }
.hs-alt b { font-size: 46px; line-height: 1; font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hs-alt small { display: block; font-size: 13px; opacity: .92; }
.hero-body { padding: 2px 16px 16px; }
.bar { margin-top: 12px; height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #ffd27a, #ff9f1c); transition: width .6s ease; }
.bar-note { margin-top: 8px; font-size: 13px; color: #d6cff0; }
.status { margin-top: 12px; display: flex; align-items: center; gap: 8px; border-radius: 12px; padding: 10px 12px; font-weight: 700; font-size: 15px; background: rgba(255, 255, 255, .14); }
.status.stand { background: var(--stand-bg); color: #7a4a05; }
.status.halt { background: var(--halt-bg); color: var(--halt); }
.status.win { background: #fff3cf; color: #7a5200; }

.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 20px; padding: 3px 10px; font-size: 12.5px; font-weight: 700; background: var(--ok-bg); color: var(--pine); white-space: nowrap; }
.chip.stand { background: var(--stand-bg); color: #7a4a05; }
.chip.halt { background: var(--halt-bg); color: var(--halt); }
.chip.win { background: #fff3cf; color: #7a5200; }

/* ---------- карта ---------- */
.map-card { padding: 0; overflow: hidden; }
.map-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; }
.map-head h2 { margin: 0; }
.stage-slot { position: relative; border-top: 1px solid var(--line); background: #6a56a5; }
.cloud { animation: drift 40s linear infinite alternate; }
.cloud.b { animation-duration: 55s; animation-direction: alternate-reverse; }
@keyframes drift { from { transform: translateX(-14px); } to { transform: translateX(22px); } }
@media (prefers-reduced-motion: reduce) { .cloud { animation: none; } .bar i { transition: none; } }
.pulse { animation: pulse 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 0%, 100% { opacity: .9; transform: scale(1); } 50% { opacity: .35; transform: scale(1.35); } }

/* ---------- списки ---------- */
.list { display: grid; gap: 2px; margin-top: 8px !important; }
.li { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.li:first-child { border-top: 0; }
.av-box { width: 40px; height: 48px; display: grid; place-items: end center; background: var(--glacier); border-radius: 12px; padding-bottom: 2px; }
.li .nm { font-weight: 700; }
.li .meta { font-size: 13px; color: var(--muted); }
.li .rank { font-weight: 800; color: var(--muted); font-size: 13px; }
.li.me .nm::after { content: " (ты)"; color: var(--lake-dark); font-weight: 650; }
.li[data-act] { cursor: pointer; }

.events { display: grid; gap: 8px; margin-top: 10px !important; }
.ev { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-size: 14.5px; padding: 10px 12px; border-radius: 12px; background: var(--glacier); }
.ev time { font-size: 12px; color: var(--muted); white-space: nowrap; padding-top: 2px; }
.ev.smoke { background: var(--stand-bg); }
.ev.vote { background: var(--halt-bg); }

.mark { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--stand-bg); font-size: 14.5px; }
.mark .btn { min-height: 32px; }

/* ---------- голосование ---------- */
.rec { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 10px; background: #fff; }
.rec-top { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; }
.rec .pen { text-align: right; font-weight: 800; font-size: 20px; line-height: 1; }
.rec .pen small { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-top: 3px; }
.vote-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vote { min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--snow); font-weight: 700; font-size: 14px; padding: 0 8px; }
.vote.forgive.on { background: var(--ok-bg); border-color: var(--lake); color: var(--lake-dark); }
.vote.increase.on { background: var(--alert-bg); border-color: var(--alert); color: var(--alert); }

.code { display: flex; align-items: center; gap: 10px; background: var(--glacier); border-radius: 12px; padding: 10px 12px; }
.code b { font-size: 22px; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.code .btn { margin-left: auto; }

/* ---------- аватар-редактор ---------- */
.av-preview { border-radius: 16px; overflow: hidden; }
.pose-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.opt { display: grid; gap: 6px; }
.opt > b { font-size: 13px; color: var(--ink-2); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--snow); box-shadow: 0 0 0 1.5px var(--line); }
.sw.on { box-shadow: 0 0 0 3px var(--lake); }
.pill { min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--snow); font-size: 14px; font-weight: 650; }
.pill.on { border-color: var(--lake); background: var(--accent-bg); color: var(--lake-dark); }

/* ---------- шторка ---------- */
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(10, 25, 38, .5); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
.sheet { width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; background: var(--snow); border-radius: 22px 22px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); display: grid; gap: 14px; animation: up .22s ease; }
.grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 4px; }
.sheet h3 { font-size: 20px; font-weight: 800; }
.sheet-who { display: flex; align-items: center; gap: 14px; }
.sheet-av { width: 92px; height: 112px; display: grid; place-items: end center; background: var(--glacier); border-radius: 18px; padding-bottom: 4px; flex: none; }
.cheers { display: flex; gap: 8px; }
.cheers button { flex: 1; min-height: 52px; font-size: 26px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; }
.stepper { display: grid; grid-template-columns: 56px 1fr 56px; gap: 10px; align-items: center; }
.stepper button { height: 56px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font-size: 26px; font-weight: 700; }
.stepper output { text-align: center; font-size: 44px; font-weight: 850; font-variant-numeric: tabular-nums; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

#toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 18px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 60; max-width: min(92vw, 440px); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 15px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

details.rules summary { cursor: pointer; font-weight: 750; font-size: 16px; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 28px; }
details.rules summary::-webkit-details-marker { display: none; }
details.rules summary::after { content: "＋"; color: var(--muted); }
details.rules[open] summary::after { content: "－"; }
details.rules ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; }

@media (min-width: 700px) {
  .mapbox { height: 600px; }
}

/* ---------- фото и кружки ---------- */
.m-photo { margin-top: 8px; cursor: zoom-in; }
.m-photo img { display: block; width: 100%; max-height: 440px; object-fit: cover; border-radius: 14px; background: var(--glacier); aspect-ratio: 4 / 3; }
.m-photo img.ok { aspect-ratio: auto; }
.m-gone { padding: 14px; border-radius: 12px; background: var(--glacier); color: var(--muted); font-size: 13px; }
.circle, .rec-circle { position: relative; display: block; width: min(240px, 64vw); aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 0; padding: 0; background: #17324a; margin: 8px auto 0; }
.circle video, .rec-circle video { display: block; width: 100%; height: 100%; object-fit: cover; background: #17324a; }
.circle .play, .rec-circle .play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 44px; color: #fff; background: rgba(10, 25, 38, .3); }
.circle.playing .play, .rec-circle.playing .play { display: none; }
.circle.loading .play { opacity: .5; }
.mirror { transform: scaleX(-1); }
.rec-ring { width: min(264px, 70vw); aspect-ratio: 1; border-radius: 50%; margin: 4px auto 0; padding: 7px; display: grid; place-items: center; background: conic-gradient(var(--alert) var(--p, 0%), var(--line) 0); }
.rec-ring .rec-circle { width: 100%; margin: 0; }
.rec-time { text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 18px; }
.rec-time.live { color: var(--alert); }
.photo-prev, .photo-big { display: block; width: 100%; max-height: 52vh; object-fit: contain; border-radius: 14px; background: var(--glacier); }
.post { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; display: grid; gap: 8px; }
.post-top { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; }
.post-text { font-size: 15px; }
.ev.media, .ev.post { background: var(--ok-bg); }
.ev > div { min-width: 0; }
@media (prefers-reduced-motion: reduce) { .circle .play { transition: none; } }
.post .nm, .rec .nm { font-weight: 700; }
.post .meta, .rec .meta { font-size: 13px; color: var(--muted); }
.post .av-box, .rec .av-box { width: 40px; }

.seg { display: flex; gap: 8px; margin: 6px 0; }
.seg .btn { flex: 1; }
.cl-list { display: grid; gap: 10px; max-height: 52vh; overflow: auto; margin: 8px 0; }
.cl-item { display: flex; gap: 12px; align-items: center; }
.cl-item .circle { width: 84px; height: 84px; flex: none; margin: 0; cursor: pointer; transition: width .2s, height .2s; }
.cl-item .circle.playing { width: min(220px, 56vw); height: min(220px, 56vw); }
.cl-item:has(.circle.playing) { flex-wrap: wrap; justify-content: center; }
.cl-meta { display: grid; gap: 4px; justify-items: start; font-size: 14px; }
.cl-meta span { color: var(--muted, #6b6590); font-size: 13px; }

.daily .dtask { display: flex; gap: 12px; align-items: center; margin: 6px 0 10px; }
.daily .de { font-size: 38px; line-height: 1; }
.daily .dtask b { display: block; font-size: 17px; }
.daily .dtask span:not(.de) { color: var(--lake, #c9441f); font-weight: 800; font-size: 22px; }
.ok-s { background: #e6f6ea; color: #1d5a33; }
.forfeit { margin-top: 8px; padding: 10px; border-radius: 14px; background: #f1eefb; display: grid; gap: 6px; }
.forfeit.done { background: #e6f6ea; }
.ff-t { font-weight: 800; }
.ff-list { display: grid; gap: 8px; margin: 10px 0; }
.ff-list .btn { text-align: left; }
.pill.locked, .sw.locked { opacity: .5; position: relative; }
.sw.locked::after { content: "🔒"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; }
.ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.ach { display: grid; gap: 2px; padding: 10px; border-radius: 14px; background: #f1eefb; opacity: .6; }
.ach.on { opacity: 1; background: #fff3d6; }
.ach .ai { font-size: 26px; }
.ach small { color: var(--muted, #6b6590); }
.ach em { font-style: normal; font-size: 12px; font-weight: 700; color: #9a5b00; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin: 10px 0; }
.pcard { border-radius: 14px; min-height: 130px; padding: 8px; display: grid; align-content: center; justify-items: center; gap: 4px; text-align: center; font-size: 13px; border: 0; }
.pcard.back { background: repeating-linear-gradient(45deg, #3b2d83 0 8px, #4a3ba3 8px 16px); color: #fff; font-size: 44px; box-shadow: 0 3px 0 #241c55; cursor: pointer; transition: transform .15s; }
.pcard.back:active { transform: translateY(2px) rotate(-2deg); }
.pcard.face { background: #fffaf0; box-shadow: inset 0 0 0 2px #e4d9bd; animation: pflip .35s; }
.pcard.face.mine { box-shadow: inset 0 0 0 3px #ff9f1c; }
.pcard.face.done { opacity: .7; }
.pcard .pe { font-size: 28px; }
.pcard .pt { font-weight: 700; }
.pcard .pw { color: var(--muted, #6b6590); font-size: 12px; }
@keyframes pflip { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }
@media (prefers-reduced-motion: reduce) { .pcard.face { animation: none; } }

/* чат */
.tab { position: relative; }
.tab.dot::after { content: ""; position: absolute; top: 8px; left: calc(50% + 10px); width: 10px; height: 10px; border-radius: 50%; background: #e63946; box-shadow: 0 0 0 2px #fff; }
.chat-card { display: grid; gap: 8px; }
.chat-list { display: grid; gap: 10px; align-content: start; height: min(52vh, 460px); overflow-y: auto; padding: 4px 2px; scroll-behavior: smooth; }
.cm { display: flex; gap: 8px; align-items: flex-start; }
.cm .av-box { flex: none; width: 38px; height: 38px; }
.cb2 { min-width: 0; background: #f1eefb; border-radius: 6px 16px 16px 16px; padding: 7px 11px; max-width: 100%; }
.cm.mine .cb2 { background: #fff1d6; }
.cmeta { display: flex; gap: 8px; align-items: baseline; font-size: 12px; }
.cmeta time { color: var(--muted, #6b6590); }
.ct { display: block; overflow-wrap: anywhere; white-space: pre-wrap; }
.cact button { border: 0; background: none; color: var(--muted, #6b6590); font-size: 11px; padding: 2px 0; cursor: pointer; }
.chat-form { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.vrec { display: flex; align-items: center; gap: 10px; }
.vrec .live { color: #e63946; animation: blink 1s steps(2) infinite; }
.vrec b { flex: 1; font-size: 18px; }
@keyframes blink { 50% { opacity: .2; } }
.voice { display: flex; align-items: center; gap: 8px; border: 0; background: #fff; border-radius: 20px; padding: 6px 12px 6px 8px; min-width: 150px; cursor: pointer; }
.voice .vp { width: 28px; height: 28px; border-radius: 50%; background: var(--lake, #c9441f); color: #fff; display: grid; place-items: center; font-size: 12px; }
.voice.playing .vp::before { content: "❚❚"; font-size: 10px; }
.voice.playing .vp { font-size: 0; }
.voice .vb { display: flex; gap: 3px; align-items: center; height: 22px; flex: 1; }
.voice .vb i { width: 3px; border-radius: 2px; background: #b9b2dd; height: 40%; }
.voice .vb i:nth-child(2n) { height: 70%; } .voice .vb i:nth-child(3n) { height: 100%; }
.voice.playing .vb i { background: var(--lake, #c9441f); animation: vbar .6s ease-in-out infinite alternate; }
.voice.playing .vb i:nth-child(2n) { animation-delay: .2s; }
@keyframes vbar { to { transform: scaleY(.45); } }
.voice.loading { opacity: .6; }

/* тетрис */
.tet-head { display: flex; justify-content: space-between; align-items: center; }
.tet-wrap { display: flex; gap: 12px; justify-content: center; align-items: flex-start; }
#tet { border-radius: 12px; touch-action: none; box-shadow: 0 0 0 3px #241c55; background: #1b1547; }
.tet-side { display: grid; gap: 8px; width: 92px; }
.tet-stat { background: #f1eefb; border-radius: 12px; padding: 6px 8px; display: grid; }
.tet-stat small { color: var(--muted, #6b6590); font-size: 11px; }
.tet-stat b { font-size: 18px; }
#tet-next { width: 72px; height: 72px; background: #1b1547; border-radius: 8px; }
.tet-pad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.tet-pad .btn { font-size: 22px; padding: 14px 0; touch-action: none; user-select: none; -webkit-user-select: none; }
.lb { display: grid; gap: 6px; margin: 8px 0; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: #f1eefb; border-radius: 12px; }
.lb-row.me { background: #fff1d6; }
.lb-row b { width: 22px; text-align: center; }
.lb-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.lb-s { text-align: right; font-weight: 800; }
.lb-s small { display: block; font-weight: 400; color: var(--muted, #6b6590); font-size: 11px; }

/* бильярд */
.pool-wrap { display: flex; justify-content: center; margin-top: 10px; }
#pool { border-radius: 14px; touch-action: none; display: block; box-shadow: 0 6px 18px rgba(20, 16, 52, .3); }
.pool-stats { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 8px; align-items: stretch; }

.trk { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.trk .btn { padding: 10px 6px; font-size: 14px; }
.pool-turn { margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: #fff1d6; text-align: center; font-size: 15px; }

.hero[data-act=toMap] { cursor: pointer; }
.hero-go { margin-top: 8px; text-align: center; font-size: 13px; opacity: .75; animation: hero-bob 2s ease-in-out infinite; }
@keyframes hero-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .hero-go { animation: none; } }
.map-card { scroll-margin-top: 8px; }

/* верхний блок: путник + гора в одной карточке (компактно) */
.hero-map { padding-top: 10px; }
.hm-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 14px; }
.hm-name { display: grid; gap: 0; min-width: 0; }
.hm-name b { font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-name span { font-size: 12px; opacity: .85; }
.hm-alt { text-align: right; white-space: nowrap; }
.hm-alt b { font-size: 26px; line-height: 1; font-weight: 850; font-variant-numeric: tabular-nums; }
.hm-alt small { font-size: 12px; opacity: .85; margin-left: 4px; }
.hero-map .hero-body { padding: 0 14px 10px; }
.hero-map .bar { margin-top: 8px; height: 7px; }
.hm-line { display: flex; align-items: center; gap: 8px; margin-top: 7px; min-width: 0; }
.hm-line .status { margin: 0; padding: 4px 9px; font-size: 12.5px; border-radius: 10px; white-space: nowrap; flex: none; }
.hm-line .bar-note { margin: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.stage-wrap { position: relative; }
.hero-map .stage-slot { border-top: 0; }
.stage-btns { position: absolute; left: 38px; right: 38px; bottom: 12px; z-index: 30; display: flex; justify-content: center; }
.stage-find { flex: 0 0 auto; padding-left: 16px !important; padding-right: 16px !important; min-width: 0; border: 0; border-radius: 22px; padding: 10px 6px; font: 800 13px/1 var(--font, sans-serif); white-space: nowrap; cursor: pointer; box-shadow: 0 3px 10px rgba(20, 16, 52, .4); }
.stage-find { background: rgba(255, 255, 255, .92); color: #241c55; }
.hero-map .hint { color: #d6cff0; }

html.tg { overscroll-behavior: none; }

/* админ-панель */
.adm-search { display: flex; gap: 8px; margin: 8px 0; }
.adm-search .input { flex: 1; min-width: 0; }
.adm-row { padding: 10px 0; border-top: 1px solid var(--line, #e3ddf0); }
.adm-row.blk { opacity: .75; }
.adm-top { font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.adm-login { color: var(--muted, #7a7290); font-size: 13px; }
.adm-meta { font-size: 12.5px; color: var(--muted, #7a7290); margin-top: 2px; }
.adm-text { margin: 6px 0; padding: 8px 10px; background: #f6f2ff; border-radius: 10px; font-size: 14px; word-break: break-word; }
.adm-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.adm-log { font-size: 12.5px; padding: 4px 0; border-top: 1px solid var(--line, #e3ddf0); }
.adm-log time { color: var(--muted, #7a7290); margin-right: 4px; }
.adm-pass { font: 800 26px/1.2 monospace; letter-spacing: .06em; text-align: center; padding: 14px; background: #f6f2ff; border-radius: 12px; user-select: all; }
