/* Айдентика 13.11: тёмно-синие экраны, молочные «стеклянные» карточки, лайм — действия, оранжевый — акценты */
:root {
  --navy: #191b4b;
  --navy-2: #232770;
  --blue: #526fff;
  --lime: #ccff00;
  --lime-d: #a8d400;
  --orange: #ff982e;
  --milk: #fff8f2;
  --milk-2: #f3ece6;
  --glass: rgba(255, 248, 242, .92);
  --glass-2: rgba(255, 248, 242, .14);
  --ink: #191b4b;
  --muted: #6b6d92;
  --red: #ff5a5f;
  --green: #2fbf71;
  --r: 22px;
  --shadow: 0 10px 30px rgba(8, 10, 40, .28);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --dock-h: 72px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink); font-size: 16px; line-height: 1.45;
  background: var(--navy) linear-gradient(180deg, #171a4f 0%, #252c86 40%, #4058d6 78%, #5a77ff 100%) fixed;
  overscroll-behavior-y: none;
}
body.has-bg { background: var(--navy) var(--bg-url) center / cover fixed; }
.qr-wait { aspect-ratio: 1; border-radius: 10px; background: linear-gradient(90deg, #eee 25%, #f8f8f8 50%, #eee 75%) 0 0 / 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.screen { position: relative; z-index: 1; min-height: 100vh; }
[hidden] { display: none !important; }
b { font-weight: 800; }
img { max-width: 100%; }

/* --- общие элементы --- */
.glass { background: var(--glass); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.stack { display: grid; gap: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > .btn { flex: 1 1 auto; }
.small { font-size: 13px; color: var(--muted); }
.error { color: var(--red); font-size: 14px; font-weight: 700; }
label { display: grid; gap: 6px; font-weight: 800; font-size: 14px; }
label small { color: var(--muted); font-weight: 500; }
input, textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink); font-weight: 600;
  background: #fff; border: 2px solid transparent; border-radius: 14px; padding: 12px 14px; outline: none;
  box-shadow: inset 0 0 0 1.5px #e3dcd6;
}
textarea { resize: vertical; min-height: 92px; font-size: 15px; line-height: 1.4; font-weight: 500; }
input::placeholder, textarea::placeholder { color: #a7a8c2; font-weight: 500; }
input:focus, textarea:focus { border-color: var(--blue); box-shadow: none; }
.key-input { letter-spacing: .3em; text-align: center; font-size: 26px; font-weight: 900; text-transform: uppercase; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 800; color: var(--ink); cursor: pointer; text-decoration: none;
  background: #fff; border: 0; border-radius: 16px; padding: 12px 16px;
  box-shadow: 0 2px 0 rgba(25, 27, 75, .12), inset 0 0 0 1.5px #e6dfd9;
  transition: transform .08s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; }
.btn.lime { background: var(--lime); box-shadow: 0 4px 0 var(--lime-d); }
.btn.navy { background: var(--navy); color: #fff; box-shadow: none; }
.btn.orange { background: var(--orange); color: #fff; box-shadow: 0 4px 0 #d9761a; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--muted); }
.btn.danger { color: var(--red); }
.btn.glass-btn { background: var(--glass-2); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25); }
.btn.big { padding: 16px; font-size: 18px; width: 100%; border-radius: 18px; }
.btn.sm { padding: 8px 12px; font-size: 14px; border-radius: 12px; }
.arrow-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--lime); display: grid; place-items: center; border: 0; color: var(--ink); }

/* бренд: Sk Сколково × ИНЖИ */
.brandline { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 900; }
.brandline .sk { display: flex; flex-direction: column; line-height: .9; }
.brandline .sk b { font-size: 26px; letter-spacing: -.04em; }
.brandline .sk small { font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.brandline .sk-img { height: 34px; }
.brandline .x { opacity: .7; font-weight: 500; font-size: 18px; }
.brandline .inzhi { display: flex; align-items: center; gap: 6px; font-size: 19px; letter-spacing: .02em; }
.brandline .inzhi img { width: 38px; height: 38px; object-fit: contain; }

/* --- старт --- */
.start-wrap { max-width: 520px; margin: 0 auto; padding: calc(18px + var(--safe-t)) 18px calc(32px + var(--safe-b)); text-align: center; color: #fff; }
.start .brandline { justify-content: center; }
.title { margin: 18px 0 0; font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.title .t1 { display: block; font-size: 30px; }
.title .t2 { display: inline-block; font-size: 40px; color: var(--ink); background: var(--lime); padding: 2px 12px 6px; border-radius: 14px; transform: rotate(-2deg); margin-top: 6px; }
.hero-wrap { position: relative; margin: 6px auto 0; width: min(78vw, 340px); aspect-ratio: 1; }
.hero-wrap::before { content: ""; position: absolute; inset: 14% 8% 4%; border-radius: 50%; background: radial-gradient(circle, rgba(204, 255, 0, .35), rgba(82, 111, 255, 0) 68%); }
.hero { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .35)); animation: float 4s ease-in-out infinite; }
.hero.small { width: 70%; height: 70%; margin-top: 15%; }
@keyframes float { 50% { transform: translateY(-8px); } }
.lead { margin: 4px 0 18px; font-weight: 500; color: rgba(255, 255, 255, .85); }
.lead b { color: var(--lime); }
.start-card { text-align: left; display: grid; gap: 14px; color: var(--ink); }

/* --- шапка квеста --- */
.topbar {
  position: sticky; top: 0; z-index: 20; padding: calc(10px + var(--safe-t)) 16px 10px;
  background: rgba(20, 22, 74, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 0 0 24px 24px; box-shadow: 0 8px 24px rgba(5, 6, 30, .35);
}
.topline { display: grid; grid-template-columns: 50px 1fr 50px; align-items: center; gap: 10px; }
.topline .brandline { justify-content: center; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.hint-btn {
  position: relative; width: 50px; height: 50px; border-radius: 16px; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--glass-2); color: #fff; transition: background .2s, color .2s;
}
.hint-btn b { position: absolute; right: -5px; top: -5px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; background: var(--milk); color: var(--ink); font-size: 13px; line-height: 22px; font-weight: 900; }
.hint-btn.ready { background: rgba(204, 255, 0, .18); color: var(--lime); box-shadow: 0 0 0 2px rgba(204, 255, 0, .55), 0 0 18px rgba(204, 255, 0, .45); animation: glow 1.8s ease-in-out infinite; }
.hint-btn.empty { opacity: .45; }
@keyframes glow { 50% { box-shadow: 0 0 0 2px rgba(204, 255, 0, .9), 0 0 26px rgba(204, 255, 0, .7); } }
.lab-btn { position: relative; width: 50px; height: 50px; border-radius: 16px; border: 0; background: var(--lime); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 0 var(--lime-d); }
.lab-btn .dot { position: absolute; top: -4px; right: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--orange); border: 3px solid var(--navy); animation: pulse 1s infinite; }
.lab-btn.signal { animation: wiggle .6s infinite; }
@keyframes pulse { 50% { transform: scale(1.3); } }
@keyframes wiggle { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.progress-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 8px auto 0; max-width: 420px; min-height: 26px; }
.crystals { display: flex; gap: 4px; justify-content: center; cursor: pointer; margin: 0; min-width: 0; flex: 0 1 auto; }
.crystals svg { width: 18px; flex: none; height: auto; }
.crystals .new { animation: pop .8s ease; }
@keyframes pop { 0% { transform: scale(.2); } 60% { transform: scale(1.5); } 100% { transform: scale(1); } }
.keychip { flex: none; width: max-content; font-weight: 900; letter-spacing: .14em; color: var(--ink); background: var(--lime); border-radius: 99px; padding: 3px 10px; font-size: 13px; white-space: nowrap; }

/* --- вкладки --- */
.view { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 6px 14px calc(var(--dock-h) + 20px + var(--safe-b)); }
.view.pad { padding-top: 10px; }
.feed { padding-top: 12px; }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 12px calc(10px + var(--safe-b)); background: linear-gradient(0deg, rgba(84, 112, 252, .96) 55%, rgba(84, 112, 252, 0)); }
.dock > * { max-width: 616px; margin-left: auto; margin-right: auto; }
.tabbar { display: grid; grid-template-columns: 4fr 1fr 1fr; gap: 4px; margin: 10px auto 0; max-width: 420px; padding: 4px; border-radius: 16px; background: var(--glass-2); }
.tabbar button { font: inherit; font-size: 15px; font-weight: 800; color: #fff; background: transparent; border: 0; border-radius: 12px; height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.tabbar button svg { width: 20px; height: 20px; }
.tabbar button[data-tab="gallery"] svg, .tabbar .exit-btn svg { width: 24px; height: 24px; }
.tabbar .exit-btn { opacity: .75; }
.tabbar button.on { background: var(--lime); color: var(--ink); box-shadow: 0 2px 0 var(--lime-d); }
.tabbar .badge-dot { position: absolute; }
body:not(.tab-missions) .dock { display: none; }
.composer { display: flex; gap: 8px; align-items: center; }
.composer .clip { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--glass); color: var(--ink); display: grid; place-items: center; }
.composer .clip.attn { background: var(--orange); color: #fff; animation: pulse 1.2s infinite; }
.composer input { flex: 1; min-width: 0; border-radius: 99px; padding: 11px 16px; font-size: 16px; background: var(--glass); box-shadow: none; }
.composer .send { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; background: var(--lime); color: var(--ink); display: grid; place-items: center; box-shadow: 0 3px 0 var(--lime-d); }
.composer.waiting input { box-shadow: 0 0 0 3px var(--lime); }
.composer.shake { animation: shake .4s; }

/* --- лента чата --- */
.feed { display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; animation: rise .25s ease; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.ava { width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--milk); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); overflow: hidden; display: grid; place-items: center; }
.ava img { width: 120%; height: 120%; object-fit: contain; }
.bubble { background: var(--glass); border-radius: 20px 20px 20px 6px; padding: 10px 14px 8px; box-shadow: var(--shadow); font-size: 15.5px; overflow-wrap: anywhere; }
.bubble b { color: var(--ink); background: linear-gradient(transparent 60%, rgba(204, 255, 0, .7) 60%); }
.bubble .time { display: block; text-align: right; font-size: 11px; color: var(--muted); margin-top: 2px; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.user .bubble { background: var(--lime); border-radius: 20px 20px 6px 20px; font-weight: 700; }
.msg.user.bad .bubble { background: #ffd9cf; text-decoration: line-through; text-decoration-color: rgba(255, 90, 95, .6); }
.msg.typing .bubble { display: flex; gap: 4px; padding: 14px; }
.msg.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; } .msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }
.media-img { display: block; width: 100%; border-radius: 14px; margin-top: 8px; }
.pic-bubble { padding: 5px; }
.pic-bubble img { display: block; max-width: 230px; border-radius: 16px; }

.reward { align-self: center; display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; font-size: 14px; background: rgba(204, 255, 0, .16); border: 1.5px solid rgba(204, 255, 0, .5); padding: 6px 14px; border-radius: 99px; animation: rise .3s ease; }
.reward svg { width: 20px; height: 24px; }

.widget { align-self: stretch; margin-left: 50px; display: grid; gap: 10px; animation: rise .25s ease; }
.widget.glass { padding: 14px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* голосовое */
.voice { display: flex; align-items: center; gap: 10px; }
.voice .play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--navy); color: var(--lime); display: grid; place-items: center; flex: none; }
.voice .wave { flex: 1; height: 30px; display: flex; align-items: center; gap: 2px; }
.voice .wave i { flex: 1; background: var(--navy); opacity: .35; border-radius: 2px; }
.voice.playing .wave i { animation: wave .7s infinite alternate; opacity: .8; }
@keyframes wave { to { transform: scaleY(.3); } }
details summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 700; }
.media-frame { position: relative; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.media-frame iframe, .media-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.widget .small a { color: var(--lime); }

/* генератор */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font: inherit; font-size: 13px; font-weight: 800; color: var(--ink); background: #fff; border: 0; border-radius: 99px; padding: 7px 12px; box-shadow: inset 0 0 0 1.5px #e3dcd6; cursor: pointer; }
.tag.on { background: var(--lime); box-shadow: none; }
.counter { text-align: right; font-size: 12px; color: var(--muted); margin-top: -6px; }
/* окно «Картина нейросети»: на всю ширину, идеи — одной строкой с прокруткой, поле побольше */
.widget.gen { margin-left: 0; gap: 8px; }
.gen-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.gen-meta { display: flex; gap: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.gen .tags { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 2px 14px; scrollbar-width: none; }
.gen .tags::-webkit-scrollbar { display: none; }
.gen .tag { flex: none; }
.gen textarea { min-height: 120px; font-size: 16px; }
.art-wrap { position: relative; border-radius: 18px; overflow: hidden; background: var(--milk-2); aspect-ratio: 1; display: grid; place-items: center; }
.art-wrap:has(img) { aspect-ratio: auto; }
.art-wrap img { width: 100%; height: auto; display: block; }
.loading { display: grid; gap: 12px; justify-items: center; padding: 20px; text-align: center; font-weight: 700; }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 6px solid rgba(25, 27, 75, .12); border-top-color: var(--blue); border-right-color: var(--lime); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* правда/ложь */
.facts-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.facts-grid span { aspect-ratio: 1; border-radius: 8px; background: var(--milk-2); display: grid; place-items: center; font-size: 12px; font-weight: 900; color: var(--muted); }
.facts-grid .ok { background: var(--lime); color: var(--ink); }
.facts-grid .no { background: #ffd2c4; color: var(--red); }
.fact-card { background: #fff; border-radius: 16px; padding: 12px; display: grid; gap: 10px; font-weight: 700; }
.btn.tf-true { background: var(--lime); }
.btn.tf-false { background: var(--orange); color: #fff; }

/* ядро */
.core-wrap { justify-items: center; margin-left: 0; text-align: center; color: #fff; }
.core { width: 210px; height: 210px; border-radius: 50%; border: 0; cursor: pointer; font: inherit; font-weight: 900; font-size: 17px; color: var(--ink); padding: 30px;
  background: radial-gradient(circle at 35% 30%, #fff, var(--lime) 35%, #6fd400 70%, #2f6b00); box-shadow: 0 0 0 10px rgba(204, 255, 0, .2), 0 0 60px rgba(204, 255, 0, .6); animation: corepulse 1.6s infinite; }
@keyframes corepulse { 50% { box-shadow: 0 0 0 22px rgba(204, 255, 0, .12), 0 0 90px rgba(204, 255, 0, .8); } }
.core.boom { animation: boom 1.4s forwards; }
@keyframes boom { 40% { transform: scale(1.25); } 100% { transform: scale(0); opacity: 0; } }

/* финал */
.finale { text-align: center; display: grid; gap: 10px; justify-items: center; }
.finale img.pose { width: 180px; height: 180px; object-fit: contain; margin-top: -60px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .3)); }
.finale h2, .view .finale h2 { margin: 0; font-size: 28px; font-weight: 900; color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.stats div { background: #fff; border-radius: 14px; padding: 8px; display: grid; }
.stats b { font-size: 22px; }
.stats small { color: var(--muted); font-weight: 700; }

/* открытка в чате */
.card-msg { display: grid; gap: 10px; }
.card-msg img.card-img { width: 100%; border-radius: 16px; display: block; }
.qr-box { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 16px; padding: 10px; }
.qr-box svg, .qr-box img { width: 104px; height: 104px; flex: none; }
.qr-box .small { color: var(--ink); }

/* --- галерея --- */
.view h2 { color: #fff; font-size: 22px; font-weight: 900; margin: 10px 2px 12px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.filters button { font: inherit; font-weight: 800; font-size: 15px; color: var(--ink); background: var(--glass); border: 0; border-radius: 99px; padding: 10px 18px; white-space: nowrap; cursor: pointer; }
.filters button.on { background: var(--lime); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid .tile { position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--glass-2); cursor: pointer; border: 0; padding: 0; box-shadow: var(--shadow); }
.grid .tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grid .tile .who { position: absolute; left: 6px; bottom: 6px; right: 6px; font-size: 11px; font-weight: 800; color: #fff; background: rgba(25, 27, 75, .7); border-radius: 99px; padding: 2px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.grid .tile.add { display: grid; place-items: center; align-content: center; gap: 8px; background: var(--glass); color: var(--ink); font: inherit; font-weight: 900; font-size: 14px; }
.grid .tile.add img { width: 70%; height: auto; object-fit: contain; }
.empty { color: rgba(255, 255, 255, .8); text-align: center; padding: 30px 10px; font-weight: 600; }
.final-card { display: flex; align-items: center; gap: 12px; background: var(--glass); border-radius: var(--r); padding: 10px; margin-top: 14px; box-shadow: var(--shadow); cursor: pointer; border: 0; width: 100%; font: inherit; text-align: left; color: var(--ink); }
.final-card .cover { width: 92px; height: 70px; border-radius: 14px; overflow: hidden; flex: none; background: linear-gradient(135deg, var(--orange), var(--navy)); display: grid; place-items: center; }
.final-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.final-card .cover svg { width: 34px; height: 44px; }
.final-card b { flex: 1; font-size: 17px; }

/* --- команда --- */
.team-head { display: flex; gap: 12px; align-items: center; color: #fff; }
.team-head img { width: 110px; height: 110px; object-fit: contain; flex: none; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .3)); }
.team-head h2 { margin: 0 0 4px; }
.team-head .small { color: rgba(255, 255, 255, .75); }
.section { margin-top: 12px; }
.section h3 { margin: 0 0 8px; font-size: 17px; font-weight: 900; }
.mlist { display: grid; gap: 6px; }
.mlist div { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.mlist svg { width: 18px; height: 22px; flex: none; }
.mlist .cur { color: var(--blue); }
.lab-status { display: flex; align-items: center; gap: 12px; }
.lab-status img { width: 70px; height: 70px; object-fit: contain; flex: none; }
.pill { display: inline-block; font-size: 12px; font-weight: 900; padding: 3px 10px; border-radius: 99px; background: var(--milk-2); }
.pill.lime { background: var(--lime); }
.pill.orange { background: var(--orange); color: #fff; }

/* --- модалки --- */
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 40, .6); display: grid; align-items: end; justify-items: center; padding: 12px 12px calc(12px + var(--safe-b)); animation: fade .2s; backdrop-filter: blur(4px); }
@keyframes fade { from { opacity: 0; } }
.sheet-card { width: 100%; max-width: 480px; max-height: 88vh; overflow: auto; background: var(--milk); border-radius: 26px; padding: 18px; box-shadow: var(--shadow); animation: rise .25s ease; }
.sheet-card h3 { margin: 0; font-size: 21px; font-weight: 900; }
.sheet-card .pose { width: 140px; height: 140px; object-fit: contain; display: block; margin: 0 auto -6px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .3)); }
.sheet-card.signal { background: var(--navy); color: #fff; box-shadow: 0 0 0 3px var(--lime), 0 0 50px rgba(204, 255, 0, .5); }
.sheet-card.signal b { color: var(--lime); }
.center { text-align: center; }
.code-input { letter-spacing: .5em; text-align: center; font-size: 30px; font-weight: 900; }
.toast { position: fixed; left: 50%; top: calc(16px + var(--safe-t)); transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 99px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); max-width: 90vw; text-align: center; }

/* --- камера / селфи и просмотр --- */
#overlay { position: fixed; inset: 0; z-index: 70; background: linear-gradient(180deg, #14164a, #2b3aa6); color: #fff; display: flex; flex-direction: column; padding: calc(10px + var(--safe-t)) 14px calc(14px + var(--safe-b)); }
.cam-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; }
.cam-top h3 { margin: 0; font-size: 21px; font-weight: 900; }
.cam-top p { margin: 2px 0 0; font-size: 14px; opacity: .85; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--glass-2); color: #fff; display: grid; place-items: center; cursor: pointer; }
.cam-stage { position: relative; flex: 1; min-height: 0; margin: 12px 0; border-radius: 24px; overflow: hidden; background: #000; touch-action: none; }
.cam-stage video, .cam-stage .still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-stage video.mirror { transform: scaleX(-1); }
.cam-stage .corner { position: absolute; width: 34px; height: 34px; border: 4px solid #fff; opacity: .9; pointer-events: none; }
.cam-stage .c1 { top: 12px; left: 12px; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.cam-stage .c2 { top: 12px; right: 12px; border-left: 0; border-bottom: 0; border-radius: 0 12px 0 0; }
.cam-stage .c3 { bottom: 12px; left: 12px; border-right: 0; border-top: 0; border-radius: 0 0 0 12px; }
.cam-stage .c4 { bottom: 12px; right: 12px; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }
.cam-stage .sticker { position: absolute; transform: translate(-50%, -50%); touch-action: none; cursor: grab; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); user-select: none; -webkit-user-drag: none; }
.cam-stage .cam-msg { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; text-align: center; padding: 30px; font-weight: 700; }
.cam-stage .cam-msg:has(.btn) { background: rgba(10,12,40,.82); }
.cam-stage .cam-msg .row { flex-wrap: wrap; gap: 10px; }
.cam-zoom { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: grid; gap: 8px; }
.cam-zoom button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); font-size: 24px; font-weight: 900; color: var(--ink); }
.strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.strip button { flex: none; width: 66px; height: 66px; border-radius: 16px; border: 0; background: var(--milk); padding: 4px; scroll-snap-align: center; cursor: pointer; }
.strip button.on { box-shadow: 0 0 0 3px var(--lime); }
.strip img { width: 100%; height: 100%; object-fit: contain; }
.cam-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: center; }
.shutter { width: 78px; height: 78px; border-radius: 50%; border: 5px solid #fff; background: rgba(255, 255, 255, .2); cursor: pointer; padding: 0; }
.shutter::after { content: ""; display: block; width: 58px; height: 58px; margin: auto; border-radius: 50%; background: #fff; }
.shutter:disabled { opacity: .4; }
/* камера на весь экран: кадр под шапкой и кнопками, как в iPhone */
#overlay.cam-mode { padding: 0; background: #000; }
#overlay.cam-mode .cam-stage { position: absolute; inset: 0; margin: 0; border-radius: 0; }
#overlay.cam-mode .cam-top { position: absolute; z-index: 4; top: 0; left: 0; right: 0; padding: calc(8px + var(--safe-t)) 10px 18px; grid-template-columns: 40px 1fr 40px;
  background: linear-gradient(rgba(0, 0, 0, .55), transparent); pointer-events: none; }
#overlay.cam-mode .cam-top > * { pointer-events: auto; }
#overlay.cam-mode .cam-top h3 { font-size: 17px; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
#overlay.cam-mode .icon-btn { width: 40px; height: 40px; background: rgba(0, 0, 0, .35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#overlay.cam-mode .cam-controls { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; padding: 26px 12px calc(14px + var(--safe-b));
  background: linear-gradient(transparent, rgba(0, 0, 0, .55)); pointer-events: none; }
#overlay.cam-mode .cam-controls > * { pointer-events: auto; }
#overlay.cam-mode .strip { padding: 4px 2px 12px; }
#overlay.cam-mode .strip button { width: 54px; height: 54px; border-radius: 14px; background: rgba(255, 248, 242, .82); }
#overlay.cam-mode .shutter { width: 74px; height: 74px; background: transparent; }
#overlay.cam-mode .shutter::after { width: 60px; height: 60px; margin-top: 2px; }
#overlay.cam-mode .shutter:active::after { transform: scale(.9); }
#overlay.cam-mode .corner { display: none; }
#overlay.cam-mode .cam-zoom { top: 40%; }
.viewer { position: relative; flex: 1; display: grid; place-items: center; min-height: 0; margin: 12px 0; touch-action: pan-y; }
.viewer .nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; padding: 0 0 4px;
  background: rgba(0, 0, 0, .4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }
.viewer .nav-btn.prev { left: 8px; }
.viewer .nav-btn.next { right: 8px; }
.viewer-save { width: 100%; }
.viewer img { max-width: 100%; max-height: 100%; border-radius: 18px; object-fit: contain; }
.viewer-meta { text-align: center; font-size: 13px; opacity: .85; margin-bottom: 10px; }

canvas#confetti { position: fixed; inset: 0; z-index: 95; pointer-events: none; }

@media (min-width: 700px) {
  .msg { max-width: 80%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}

/* --- «Чат замёрз»: разбей лёд тапами (ice-lock.js) --- */
.ice-lock {
  position: fixed; inset: 0; z-index: 100; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; outline: none;
  backdrop-filter: blur(var(--blur, 8px)) saturate(.7); -webkit-backdrop-filter: blur(var(--blur, 8px)) saturate(.7);
  transition: backdrop-filter .5s, -webkit-backdrop-filter .5s, opacity .35s;
}
.ice-lock canvas { position: absolute; inset: 0; }
.ice-lock .ice-fx { pointer-events: none; }
.ice-lock.hit { animation: ice-shake .18s; }
.ice-lock.quake { animation: ice-quake .5s cubic-bezier(.36, .07, .19, .97); }
@keyframes ice-quake {
  10%, 90% { transform: translate(-2px, 1px) rotate(-.3deg); }
  20%, 80% { transform: translate(5px, -3px) rotate(.5deg); }
  30%, 50%, 70% { transform: translate(-12px, 4px) rotate(-1deg); }
  40%, 60% { transform: translate(12px, -5px) rotate(1deg); }
}
.ice-ui.pulse .ice-text { animation: ice-txt .5s cubic-bezier(.3, 1.6, .5, 1); color: var(--navy); }
@keyframes ice-txt { from { transform: scale(.6); } to { transform: scale(1); } }
.ice-lock.broken { backdrop-filter: none; -webkit-backdrop-filter: none; }
.ice-lock.out { opacity: 0; }
@keyframes ice-shake {
  25% { transform: translate(var(--shake, 3px), calc(var(--shake, 3px) * -.6)); }
  50% { transform: translate(calc(var(--shake, 3px) * -1), calc(var(--shake, 3px) * .5)); }
  75% { transform: translate(calc(var(--shake, 3px) * .5), var(--shake, 3px)); }
}
.ice-ui {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: min(300px, 82vw);
  display: grid; justify-items: center; gap: 8px; text-align: center; pointer-events: none;
  color: var(--navy); transition: opacity .25s, transform .25s;
}
.ice-ui.gone { opacity: 0; transform: translate(-50%, -50%) scale(1.15); }
.ice-flake { width: 64px; height: 64px; color: #fff; filter: drop-shadow(0 2px 6px rgba(40, 80, 160, .5)); animation: ice-spin 9s linear infinite; }
@keyframes ice-spin { to { transform: rotate(360deg); } }
.ice-title { font-size: 24px; font-weight: 900; line-height: 1.15; text-shadow: 0 1px 0 rgba(255, 255, 255, .8); }
.ice-text { font-size: 16px; font-weight: 700; color: #2c3a7a; }
.ice-meter { width: 70%; height: 10px; border-radius: 99px; background: rgba(25, 27, 75, .18); overflow: hidden; margin-top: 6px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .15); }
.ice-meter i { display: block; width: 0; height: 100%; background: var(--lime); border-radius: inherit; box-shadow: 0 0 10px var(--lime); transition: width .15s; }
.ice-tap { position: relative; width: 74px; height: 74px; margin-top: 18px; }
.ice-tap::before, .ice-tap span { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid #fff; animation: ice-ping 1.4s ease-out infinite; }
.ice-tap span { animation-delay: .7s; }
.ice-tap::after { content: ""; position: absolute; inset: 26px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px #fff; }
.ice-ui.started .ice-tap { opacity: 0; transition: opacity .3s; }
@keyframes ice-ping { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ice-flake, .ice-tap::before, .ice-tap span { animation: none; } .ice-lock.hit, .ice-lock.quake { animation: none; } }

/* --- сеть: плашка и фото в очереди --- */
.net-pill {
  position: fixed; left: 50%; bottom: calc(var(--dock-h) + var(--safe-b) + 10px); transform: translateX(-50%); z-index: 60; pointer-events: none;
  background: var(--milk); color: var(--navy); font-weight: 800; font-size: 13px; padding: 7px 14px; border-radius: 99px;
  box-shadow: var(--shadow); white-space: nowrap;
}
.net-pill.off { background: var(--orange); color: #fff; }
.pic-bubble.queued { position: relative; }
.pic-bubble.queued::after {
  content: "ждёт сети"; position: absolute; right: 10px; bottom: 10px; font-size: 12px; font-weight: 800;
  background: rgba(25, 27, 75, .75); color: #fff; padding: 4px 9px; border-radius: 99px;
}

.parents-btn { display: block; margin: 14px auto 0; }
.qr-big { width: min(240px, 70vw); margin: 0 auto; background: #fff; border-radius: 16px; padding: 10px; }

/* --- живые эффекты --- */
.ava, .topline .brandline .inzhi img { cursor: pointer; }
img.poked { animation: poke .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes poke { 0% { transform: scale(1); } 35% { transform: scale(1.25) rotate(-8deg); } 70% { transform: scale(.92) rotate(4deg); } 100% { transform: scale(1); } }
.poke-p { position: fixed; z-index: 120; pointer-events: none; color: var(--lime); font-weight: 900; text-shadow: 0 2px 6px rgba(0, 0, 0, .35); animation: pokep 1s ease-out forwards; }
@keyframes pokep { to { transform: translate(var(--dx), -70px) scale(1.4); opacity: 0; } }
.poke-bubble { position: fixed; z-index: 121; transform: translate(-50%, -100%); background: var(--lime); color: var(--ink); font-weight: 900; padding: 8px 14px; border-radius: 16px; box-shadow: var(--shadow); animation: bub 1.4s ease forwards; white-space: nowrap; }
@keyframes bub { 0% { transform: translate(-50%, -80%) scale(.4); opacity: 0; } 15% { transform: translate(-50%, -100%) scale(1.1); opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(-50%, -130%); opacity: 0; } }
/* сбой */
body.glitching .topbar, body.glitching .view, body.glitching .scene > *:not(.scene-x) { animation: glitch .65s steps(2, end); }
@keyframes glitch {
  0% { transform: translate(0); filter: none; }
  15% { transform: translate(-6px, 2px) skewX(6deg); filter: drop-shadow(4px 0 0 rgba(255, 0, 90, .8)) drop-shadow(-4px 0 0 rgba(0, 240, 255, .8)); clip-path: inset(10% 0 55% 0); }
  30% { transform: translate(5px, -2px); clip-path: inset(50% 0 8% 0); }
  45% { transform: translate(-3px, 0) skewX(-4deg); filter: drop-shadow(-5px 0 0 rgba(204, 255, 0, .8)) drop-shadow(5px 0 0 rgba(255, 0, 90, .7)); clip-path: none; }
  60% { transform: translate(4px, 1px); filter: hue-rotate(90deg); }
  80% { transform: translate(-2px, 0); filter: drop-shadow(2px 0 0 rgba(0, 240, 255, .8)); }
  100% { transform: translate(0); filter: none; clip-path: none; }
}
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 90; pointer-events: none; }
/* ночное небо под салютом — на нём вспышки выглядят в разы ярче */
.fx-canvas.night { background: radial-gradient(ellipse at 50% 35%, rgba(20, 22, 70, .82), rgba(3, 4, 18, .94)); opacity: 0; transition: opacity .2s ease; }
.fx-canvas.night.on { opacity: 1; }
.wave-flash { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: var(--lime); pointer-events: none; animation: wave .9s ease-out forwards; }
.wave-flash b { font-size: 34vw; font-weight: 900; color: var(--ink); }
@keyframes wave { 0% { opacity: 0; } 10% { opacity: 1; } 100% { opacity: 0; } }

/* --- сцены пульта съёмки --- */
.scene { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; align-content: center; gap: 18px; padding: calc(20px + var(--safe-t)) 16px calc(20px + var(--safe-b));
  background: var(--navy) linear-gradient(180deg, #171a4f 0%, #252c86 40%, #4058d6 78%, #5a77ff 100%); color: #fff; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.scene-x { position: absolute; top: calc(12px + var(--safe-t)); right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--glass-2); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.scene-hint { font-size: 24px; font-weight: 900; text-align: center; }
.scene-face { width: min(72vw, 320px); filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .35)); cursor: pointer; }
.wr-head { position: relative; width: min(64vw, 280px); margin: 40px 0 70px; }
.wr-face { width: 100%; display: block; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .35)); cursor: pointer; }
.wr-acc { position: absolute; pointer-events: none; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3)); }
.wr-acc.pop { animation: accpop .3s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes accpop { from { opacity: 0; scale: .5; } to { opacity: 1; scale: 1; } }
.wr-strip { display: flex; gap: 8px; overflow-x: auto; max-width: 100%; padding: 4px 2px 8px; scrollbar-width: none; }
.wr-strip::-webkit-scrollbar { display: none; }
.wr-strip button { flex: none; width: 64px; height: 64px; border-radius: 16px; border: 0; background: var(--glass); padding: 6px; cursor: pointer; }
.wr-strip button.on { box-shadow: 0 0 0 3px var(--lime); }
.wr-strip img { width: 100%; height: 100%; object-fit: contain; }
.wr-auto.on { background: var(--lime); }
.ba-stage { width: min(80vw, 360px); aspect-ratio: 3 / 4; display: grid; place-items: center; cursor: pointer; }
.ba-img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .35)); }
.pult { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pult .btn { justify-content: center; text-align: center; white-space: normal; }

/* ---------- варианты ответа кнопками ---------- */
.widget.choices { grid-template-columns: 1fr; }
.btn.choice { justify-content: flex-start; text-align: left; padding: 14px 16px; font-size: 16px; }

/* ---------- ёлка ИНЖИ-Сити: огоньки за фрагменты памяти ---------- */
.reward.tree-reward { border-radius: 22px; padding: 8px 16px 8px 8px; }
.tree { position: relative; width: 190px; margin: 0 auto; }
.tree.sm { width: 66px; margin: 0; flex: none; }
.tree.sm .bulb { width: 14%; }
.tree img { display: block; width: 100%; height: auto; }
.tree .bulb { position: absolute; width: 11%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, .35); box-shadow: inset 0 0 0 1px rgba(25, 27, 75, .25); }
.tree .bulb.on { background: var(--c); box-shadow: 0 0 4px 1px var(--c), 0 0 12px 2px var(--c); }
.tree .bulb.new { animation: bulb-on 1.4s ease; }
@keyframes bulb-on { 0%, 30% { background: rgba(255, 255, 255, .35); box-shadow: none; transform: translate(-50%, -50%) scale(.6); }
  60% { transform: translate(-50%, -50%) scale(1.8); } 100% { transform: translate(-50%, -50%) scale(1); } }
.widget.tree-final { margin-left: 0; justify-items: center; padding: 10px 0 0; }
.tree.final { width: min(260px, 70vw); }
.tree.final .bulb { animation: bulb-on .7s var(--d) ease both, twinkle 1.3s calc(var(--d) + .7s) ease-in-out infinite alternate; }
.tree-star { position: absolute; left: 50%; top: -4%; transform: translate(-50%, -50%); font-size: 46px; line-height: 1; color: var(--lime);
  text-shadow: 0 0 12px var(--lime), 0 0 30px rgba(204, 255, 0, .8); animation: star-in 1s 2.2s ease both; }
@keyframes twinkle { to { filter: brightness(1.5); box-shadow: 0 0 8px 3px var(--c), 0 0 24px 6px var(--c); } }
@keyframes star-in { from { transform: translate(-50%, -50%) scale(0) rotate(-120deg); opacity: 0; } }

/* ---------- иней на картине ---------- */
.widget.frost-wrap { margin-left: 0; justify-items: center; }
.frost { position: relative; width: min(330px, 86vw); aspect-ratio: 1; border-radius: 22px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(10, 12, 50, .45), 0 0 0 3px rgba(255, 255, 255, .7); background: #fff; }
.frost .frost-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frost-ice { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity 1.8s ease, filter 1.8s ease; }
.frost-tip { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); pointer-events: none; white-space: nowrap;
  background: rgba(25, 27, 75, .78); color: #fff; font-weight: 800; font-size: 14px; padding: 7px 14px; border-radius: 99px; transition: opacity .4s; }
.frost-tip.gone { opacity: 0; }
.frost.shake { animation: shake .26s ease; }
.frost.thawed .frost-ice { opacity: 0; filter: blur(10px) saturate(.6); }
.frost .frost-pic { transition: filter 1.8s ease; }
.frost:not(.thawed) .frost-pic { filter: saturate(.75) brightness(1.05); }
.frost-bar { width: min(330px, 86vw); height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.frost-bar i { display: block; height: 100%; width: 0; background: var(--lime); border-radius: inherit; transition: width .2s; }
@media (prefers-reduced-motion: reduce) { .tree .bulb, .tree-star { animation: none !important; } }

/* ---------- режим ведущего (?guide=…) ---------- */
.guide-status { font-size: 12px; color: #fff; text-align: center; padding: 4px 8px 6px; opacity: .9; }
.guide-status .on { color: var(--lime); font-weight: 800; }
.guide-bar { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 8px; }
.guide-bar .btn { padding: 14px 8px; font-size: 15px; }
.guide-now { margin-left: 0; border: 2px dashed rgba(204, 255, 0, .7); }
.guide-ans .answers { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-ans .answers span { background: var(--lime); color: var(--ink); font-weight: 900; border-radius: 10px; padding: 6px 12px; font-size: 18px; }
.guide-ans .choice-row { border-radius: 12px; padding: 10px 12px; background: #f1ece8; font-weight: 700; }
.guide-ans .choice-row.ok { background: var(--lime); }
.facts-tab { display: grid; gap: 6px; max-height: 55vh; overflow: auto; }
.facts-tab > div { display: grid; grid-template-columns: 50px 1fr auto; gap: 8px; align-items: center; font-size: 13px; padding: 6px 8px; border-radius: 10px; background: #f6f1ed; }
.facts-tab > div.done { opacity: .5; }
.facts-tab b { font-family: ui-monospace, Menlo, monospace; }
.facts-tab i { font-style: normal; font-weight: 900; border-radius: 8px; padding: 2px 8px; }
.facts-tab i.t { background: var(--lime); } .facts-tab i.f { background: var(--orange); color: #fff; }
.guide-qr .qr-big { background: #fff; padding: 12px; border-radius: 18px; width: min(320px, 78vw); margin: 0 auto; }
.guide-qr .qr-big svg { width: 100%; height: auto; display: block; }
.guide-qr .key-big { font: 900 30px ui-monospace, Menlo, monospace; letter-spacing: .2em; background: var(--lime); color: var(--ink); border-radius: 12px; padding: 4px 14px; justify-self: center; }

/* ---------- стартовый экран: картинка-сцена сверху, всё помещается в высоту телефона ---------- */
.start-wrap { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; padding: 0 0 calc(12px + var(--safe-b)); }
.start-scene { position: relative; flex: 1 1 auto; min-height: 210px; max-height: 56svh; overflow: hidden; border-radius: 0 0 28px 28px; box-shadow: 0 10px 30px rgba(5, 6, 30, .35); }
.start-scene .hero { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 64%; filter: none; animation: none; }
.start-scene.pose .hero { object-fit: contain; object-position: 50% 30%; animation: float 4s ease-in-out infinite; }
.start-scene::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(23, 26, 79, .55) 0%, rgba(23, 26, 79, 0) 22%, rgba(23, 26, 79, 0) 55%, rgba(23, 26, 79, .92) 100%); }
.start-scene .brandline { position: absolute; z-index: 1; left: 0; right: 0; top: calc(10px + var(--safe-t)); text-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.start-scene .title { position: absolute; z-index: 1; left: 0; right: 0; bottom: 14px; margin: 0; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.start-scene .title .t1 { font-size: 22px; }
.start-scene .title .t2 { font-size: 30px; text-shadow: none; }
.start-wrap > .lead { margin: 10px 20px 10px; font-size: 15px; line-height: 1.35; }
.start-wrap > .start-card { margin: 0 14px; gap: 10px; padding: 14px; }
.start-card .lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.start-card .lbl small { font-weight: 500; font-size: 12px; color: var(--muted); text-align: right; }
.start-card .key-input { font-size: 24px; padding-top: 10px; padding-bottom: 10px; }
.start-card .btn.big { padding: 14px; }
@media (max-height: 640px) { .start-wrap > .lead { display: none; } .start-scene { min-height: 170px; } }

/* ---------- начало миссии: тонкий разделитель ---------- */
.mission-sep { align-self: center; display: inline-flex; align-items: center; gap: 6px; margin: 12px 0 2px; padding: 5px 14px 5px 10px; border: 0; border-radius: 99px;
  background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .9); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; animation: rise .3s ease; max-width: 92%; }
.mission-sep b { font-weight: 900; color: #fff; white-space: nowrap; }
.mission-sep > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mission-sep svg { width: 14px; height: 18px; display: block; }
.mission-sep.done b { color: var(--lime); }

/* ---------- стрелочка «дальше» между сообщениями ИНЖИ ---------- */
.more-row { align-self: stretch; margin-left: 50px; animation: rise .25s ease; }
.more-btn { width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--lime); color: var(--ink); box-shadow: 0 3px 0 var(--lime-d), 0 0 0 0 rgba(204, 255, 0, .6); animation: more-pulse 1.8s ease-in-out 1s infinite; }
.more-btn:active { transform: scale(.92); }
@keyframes more-pulse { 0%, 100% { box-shadow: 0 3px 0 var(--lime-d), 0 0 0 0 rgba(204, 255, 0, .55); } 50% { box-shadow: 0 3px 0 var(--lime-d), 0 0 0 10px rgba(204, 255, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .more-btn { animation: none; } }

/* выбор названия команды */
.name-big { font-size: 28px; font-weight: 900; line-height: 1.15; color: var(--ink); background: var(--lime); border-radius: 18px; padding: 16px 12px; animation: rise .25s ease; }
/* ведущий смотрит чат команды — выходить ему не из чего */
.guide-mode #exit-btn { display: none; }
.guide-mode .tabbar { grid-template-columns: 4fr 1fr; }
