/* «Панелька»: ночь, тёплый свет окон, бумага, рукописные записки */
:root {
  --night: #0b1230; --night2: #17234a; --night3: #22325c;
  --warm: #ffcf6b; --warm2: #ffb347;
  --paper: #f7f0df; --paper2: #efe5cc; --ink: #2a2016; --ink2: #6b5a45; --rule: rgba(63, 111, 179, .14);
  --red: #b8322a; --red2: #8f241e; --gold: #e2b04a; --green: #2f6b45; --blue: #3f6fb3;
  --text: #f3f1ea; --dim: #a9b2cf; --line: rgba(255,255,255,.14);
  --hand: 'Marck Script', 'Segoe Script', cursive;
  --body: 'PT Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(120% 60% at 50% 100%, #2b3d6b 0%, transparent 60%), linear-gradient(#070d24 0%, #111b3d 50%, #1d2b55 100%) fixed;
  background-color: var(--night);
  color: var(--text); font: 16px/1.4 var(--body);
  overscroll-behavior-y: none;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; position: relative; z-index: 1; }
#snow, #fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#snow { z-index: 2; }
#fx { z-index: 30; }
body.indoors #snow { display: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
.hand { font-family: var(--hand); }
.ico { width: 22px; height: 22px; flex: none; display: inline-block; vertical-align: middle; }

/* кнопки: красная «советская» и контурная */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; width: 100%;
  border-radius: 10px; background: var(--red); color: #fff7ea; font-weight: 700; font-size: 16px; letter-spacing: .01em;
  box-shadow: inset 0 -3px 0 var(--red2), 0 2px 0 rgba(0,0,0,.18);
}
.btn .ico { width: 22px; height: 22px; }
.btn:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 var(--red2); }
.btn[disabled] { background: #b9ae98; color: #f4eee0; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; border: 1.5px solid rgba(42,32,22,.35); font-weight: 700; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.fine { font-size: 12.5px; color: var(--ink2); margin: 0 0 12px; line-height: 1.45; }
.fine a { color: var(--red); }

/* ---------- вход: ордер на вселение ---------- */
.join { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 18px 18px calc(22px + env(safe-area-inset-bottom)); gap: 8px; text-align: center; }
/* панелька — фон на весь экран, всё остальное перед ней */
.join .hero { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: #0b1230; }
.join .hero svg { width: 100%; height: 100%; display: block; }
.join .hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(8,12,34,.72), rgba(8,12,34,.15) 26%, rgba(8,12,34,0) 45%, rgba(8,12,34,.55) 78%, rgba(8,12,34,.8)); }
.join > :not(.hero) { position: relative; z-index: 1; }
.join { justify-content: flex-start; }
.join .cert { margin-top: auto; }
.join .lead { text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.logo { font: 400 56px/1 var(--hand); margin: 2px 0 0; color: var(--warm); text-shadow: 0 0 18px rgba(255,190,90,.55), 0 2px 0 rgba(0,0,0,.35); }
.join .lead { margin: 0 0 6px; color: var(--text); font-size: 17px; }
.join > .fine { color: var(--dim); }
.join > .fine a { color: var(--warm); }
.order {
  position: relative; text-align: left; color: var(--ink); background: var(--paper); border-radius: 3px; padding: 16px 16px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45); transform: rotate(-.6deg);
  background-image: repeating-linear-gradient(transparent 0 27px, var(--rule) 27px 28px);
}
.o-head { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 15px; text-align: center; margin-bottom: 10px; }
.o-head small { display: block; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink2); }
.o-row { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; font-size: 14px; color: var(--ink2); }
.o-row span { color: var(--ink); font-family: var(--hand); font-size: 18px; }
.o-row input { flex: 1; min-width: 0; font: 22px var(--hand); color: #1d3d8f; background: transparent; border: 0; border-bottom: 1.5px dashed rgba(42,32,22,.45); padding: 2px 4px; outline: none; }
.o-row input:focus { border-bottom-color: var(--red); }
.o-note { font-size: 13.5px; color: var(--ink2); margin: 6px 0 10px; }
.order .err { color: var(--red); min-height: 20px; font-size: 14px; }
.stamp {
  position: absolute; right: 10px; bottom: 66px; width: 74px; height: 74px; opacity: .85; border: 2.5px solid rgba(43, 76, 168, .55); border-radius: 50%;
  color: rgba(43, 76, 168, .6); font: 700 10.5px/1.15 var(--body); text-transform: uppercase; display: flex; align-items: center; justify-content: center; text-align: center;
  transform: rotate(-14deg); pointer-events: none; box-shadow: inset 0 0 0 4px rgba(43,76,168,.08);
}

/* ---------- двор ---------- */
.screen { height: 100dvh; display: flex; flex-direction: column; }
.top { display: flex; gap: 8px; align-items: stretch; padding: calc(8px + env(safe-area-inset-top)) 10px 2px; }
.cal {
  font: inherit; text-align: center; padding: 0;
  flex: none; width: 66px; background: var(--paper); color: var(--ink); border-radius: 3px; display: flex; flex-direction: column; align-items: center; overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.35); position: relative;
}
.cal::before { content: ''; position: absolute; top: 3px; left: 14px; right: 14px; height: 4px; border-left: 3px solid #8d8d8d; border-right: 3px solid #8d8d8d; }
.c-top { width: 100%; background: var(--red); color: #fff3e0; font-size: 9.5px; line-height: 1.1; text-align: center; padding: 9px 2px 3px; }
.c-big { font: 700 26px/1.05 var(--body); margin-top: 3px; }
.c-bot { font-size: 11px; color: var(--ink2); padding-bottom: 4px; }
.note {
  flex: 1; min-width: 0; position: relative; background: #fff3b4; color: var(--ink); padding: 8px 10px 6px; border-radius: 2px;
  box-shadow: 0 6px 14px rgba(0,0,0,.35); transform: rotate(-.7deg); display: flex; flex-direction: column;
}
.note::before { content: ''; position: absolute; top: -7px; left: 50%; width: 54px; height: 15px; margin-left: -27px; background: rgba(255,255,255,.55); transform: rotate(2deg); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.n-title { font: 400 17px/1 var(--hand); color: var(--red); margin-bottom: 2px; }
.n-item { display: flex; align-items: center; gap: 5px; text-align: left; font: 15px/1.18 var(--hand); color: #1f2f6b; padding: 1px 0; }
.n-item i { font-style: normal; width: 12px; color: var(--ink2); }
.n-item.done { color: rgba(42,32,22,.45); text-decoration: line-through; text-decoration-color: rgba(184,50,42,.55); }
.n-item.done i { color: var(--green); text-decoration: none; }
.n-item em { font-style: normal; color: var(--red); }
.n-item.go { color: var(--red); font-size: 17px; margin: 4px 0; }
.n-small { font-size: 12px; color: var(--ink2); }
.side { display: flex; flex-direction: column; gap: 6px; }
.ibtn { width: 40px; flex: 1; min-height: 30px; border-radius: 10px; background: rgba(255,255,255,.07); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.ibtn .ico { width: 24px; height: 24px; }
.info { font-size: 11.5px; color: var(--dim); text-align: center; padding: 6px 10px 0; }
.banner { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 10px 0; padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.banner.glow { background: linear-gradient(90deg, #1f5e3a, #2f7a46); border: 1.5px solid var(--warm); color: #fff7ea; box-shadow: 0 0 20px rgba(255,207,107,.35); animation: callme 1.6s ease-in-out infinite; }
.banner.glow b { background: var(--red); padding: 4px 10px; border-radius: 8px; white-space: nowrap; }
.banner.sal { color: var(--warm); font-size: 13px; padding: 2px 10px; }
@keyframes callme { 50% { box-shadow: 0 0 34px rgba(255,207,107,.6); } }
.housewrap { flex: 1; min-height: 0; padding: 2px 4px 0; position: relative; }
svg.house { width: 100%; height: 100%; display: block; touch-action: manipulation; }
.names { position: absolute; top: 4px; right: 10px; font: 15px var(--hand); color: var(--warm); background: rgba(11,18,48,.72); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; }
.names.on { background: var(--warm); color: var(--ink); }
.nav { position: absolute; top: 74%; width: 38px; height: 38px; margin-top: -19px; border-radius: 50%; background: rgba(11,18,48,.75); border: 1px solid var(--line); color: var(--warm); font-size: 28px; line-height: 1; display: flex; align-items: center; justify-content: center; padding-bottom: 4px; }
.nav.l { left: 2px; } .nav.r { right: 2px; }
.bar { display: flex; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); gap: 4px; background: linear-gradient(rgba(7,11,30,0), rgba(7,11,30,.85) 35%); }
.bar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; font-size: 12.5px; color: #e6e2d6; position: relative; }
.bar button:active { background: rgba(255,255,255,.08); }
.bar .ico { width: 30px; height: 30px; }
.badge { position: absolute; top: 0; right: calc(50% - 26px); min-width: 20px; height: 20px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11.5px; display: flex; align-items: center; justify-content: center; padding: 0 5px; box-shadow: 0 0 0 2px var(--night); }

.win { cursor: pointer; }
.lbl { font: 700 7.2px var(--body); fill: #fff; text-anchor: middle; pointer-events: none; }
.lbl.me { fill: var(--warm); }
.b1 { animation: blink 1.8s infinite; } .b2 { animation: blink 1.8s .6s infinite; } .b3 { animation: blink 1.8s 1.2s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.flick { animation: flick 1.1s infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes flick { from { transform: scale(1, 1); opacity: 1; } to { transform: scale(.85, 1.15); opacity: .8; } }
.mine { animation: mine 2.4s infinite; }
@keyframes mine { 0%, 100% { stroke-opacity: .95; } 50% { stroke-opacity: .25; } }
.tv { animation: tv 3s steps(6) infinite; }
.tvs { animation: tv 4s steps(8) infinite; }
@keyframes tv { 0% { opacity: .45; } 30% { opacity: .7; } 55% { opacity: .5; } 80% { opacity: .8; } 100% { opacity: .55; } }
.cf { animation: cf 2.2s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes cf { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(36px) rotate(320deg); opacity: 0; } }

/* ---------- квартира ---------- */
.apt { flex: 1; display: flex; flex-direction: column; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.apthead { display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; }
.back { min-height: 42px; padding: 0 14px; border-radius: 10px; background: var(--paper); color: var(--ink); font-weight: 700; white-space: nowrap; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.who { flex: 1; min-width: 0; }
.who b { display: block; font: 400 24px/1.05 var(--hand); color: var(--warm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who span { font-size: 12.5px; color: var(--dim); }
svg.room { width: 100%; display: block; background: #3b2a20; }
.panel { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.card {
  background: var(--paper); color: var(--ink); border-radius: 3px; padding: 12px 14px; box-shadow: 0 6px 16px rgba(0,0,0,.3);
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px); background-size: 14px 14px;
}
.card h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font: 400 22px/1.1 var(--hand); color: var(--red); }
.card h3 .ico { width: 24px; height: 24px; }
.card p { margin: 0 0 10px; color: var(--ink2); font-size: 14.5px; }
.card p:last-child { margin-bottom: 0; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.chip { border-radius: 10px; padding: 6px 4px; text-align: center; font-size: 12.5px; background: rgba(255,255,255,.6); border: 1.5px dashed rgba(42,32,22,.25); color: var(--ink2); display: flex; flex-direction: column; align-items: center; min-height: 66px; }
.chip .ico { width: 26px; height: 26px; }
.chip small { font-size: 11.5px; }
.chip.have { border: 1.5px solid var(--green); background: #e6f1df; color: var(--ink); }
.chip.own { border: 1.5px solid var(--gold); background: #fbf0cf; color: var(--ink); }
.gifts { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; color: var(--ink) !important; font-size: 15px !important; }
.gifts .ico { width: 22px; height: 22px; margin-left: 6px; }
.gifts .ico:first-child { margin-left: 0; }
.cardlist { margin: 6px 0 0; padding: 0; list-style: none; font: 17px/1.25 var(--hand); color: #1f2f6b; }
.cardlist li { padding: 5px 0; border-top: 1px dashed rgba(42,32,22,.2); }
.cardlist li span { color: var(--ink2); font-size: 15px; }

/* ---------- листки снизу ---------- */
#sheet { position: fixed; inset: 0; z-index: 20; background: rgba(5,8,22,.6); display: flex; align-items: flex-end; justify-content: center; }
#sheet[hidden] { display: none; }
.sheet {
  width: 100%; max-width: 480px; max-height: 84dvh; overflow: auto; color: var(--ink); background: var(--paper);
  border-radius: 14px 14px 0 0; padding: 18px 14px calc(16px + env(safe-area-inset-bottom));
  background-image: repeating-linear-gradient(transparent 0 27px, var(--rule) 27px 28px);
  box-shadow: 0 -10px 30px rgba(0,0,0,.4);
}
.sheet h2 { margin: 0 0 10px; font: 400 30px/1.05 var(--hand); color: var(--red); }
.sheet p { margin: 0 0 10px; color: var(--ink2); font-size: 15px; }
.sheet .list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.sheet .card { box-shadow: 0 2px 6px rgba(0,0,0,.12); background-color: #fffaf0; }
.ev { display: flex; align-items: center; gap: 10px; background: #fffaf0; border: 1px solid rgba(42,32,22,.14); border-radius: 10px; padding: 10px; }
.ev.new { border: 1.5px solid var(--red); }
.ev .ic .ico { width: 30px; height: 30px; }
.ev .tx { flex: 1; min-width: 0; font-size: 14.5px; }
.ev .tx b { display: block; }
.ev .tx span { color: var(--ink2); font-size: 12.5px; display: block; }
.ev button { min-height: 40px; padding: 0 12px; border-radius: 9px; background: var(--red); color: #fff7ea; font-weight: 700; font-size: 13.5px; white-space: nowrap; box-shadow: inset 0 -2px 0 var(--red2); }
.ev button.alt { background: transparent; color: var(--ink); border: 1.5px solid rgba(42,32,22,.35); box-shadow: none; }
.ev .own { font-size: 12.5px; color: var(--ink2); text-align: center; white-space: nowrap; line-height: 1.25; }
.ev.flat { background: rgba(255,255,255,.55); }
.pick { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pick .btn { font: 19px var(--hand); color: #1f2f6b; }
.shelf { margin: 14px 0 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink2); border-bottom: 1.5px solid rgba(42,32,22,.2); padding-bottom: 3px; }
.sheet h2 + .shelf { margin-top: 2px; }
.lab { font-size: 13px; color: var(--ink2); margin: 0 0 6px; }
.sw { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 10px; border: 2px solid rgba(42,32,22,.15); }
.swatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--warm); }
.walls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.wallb { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; padding: 6px 2px; border-radius: 10px; background: rgba(255,255,255,.6); border: 1.5px solid rgba(42,32,22,.15); min-height: 66px; color: var(--ink); }
.wallb svg { width: 44px; height: 30px; border-radius: 4px; display: block; }
.wallb i { font-style: normal; font-size: 10.5px; color: var(--ink2); }
.wallb.on { border-color: var(--red); background: #fdecd6; }
.wallb[disabled] { opacity: .5; cursor: default; }
.prog { display: block; height: 6px; border-radius: 3px; background: rgba(42,32,22,.12); margin-top: 7px; overflow: hidden; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--red)); }
.btns { display: flex; flex-direction: column; gap: 6px; }
.field { font: inherit; font-size: 17px; padding: 13px; border-radius: 10px; border: 1.5px solid rgba(42,32,22,.3); background: #fffaf0; color: var(--ink); outline: none; width: 100%; }
.field:focus { border-color: var(--red); }
.bowlbig svg { width: 180px; display: block; margin: 0 auto; }
.big-num { text-align: center; font: 400 26px var(--hand) !important; color: var(--ink) !important; margin-bottom: 8px !important; }
.sheet .btn + .btn { margin-top: 8px; }

/* записка-тост */
#toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%) rotate(-1deg); z-index: 40;
  width: max-content; max-width: min(88vw, 420px); background: #fff3b4; color: var(--ink); padding: 14px 16px 12px; border-radius: 2px;
  font: 19px/1.25 var(--hand); text-align: center; box-shadow: 0 10px 26px rgba(0,0,0,.45);
}
#toast::before { content: ''; position: absolute; top: -8px; left: 50%; width: 60px; height: 16px; margin-left: -30px; background: rgba(255,255,255,.6); transform: rotate(-3deg); }
#toast.in { animation: drop .25s ease-out; }
@keyframes drop { from { transform: translateX(-50%) translateY(10px) rotate(2deg); opacity: 0; } }
#toast[hidden] { display: none; }

/* ---------- мини-игра ---------- */
.game { position: fixed; inset: 0; z-index: 25; background: rgba(5,8,22,.72); display: flex; align-items: center; justify-content: center; padding: 12px; }
.g-paper { width: 100%; max-width: 440px; background: var(--paper); color: var(--ink); border-radius: 6px; padding: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.5); }
.g-head { display: flex; align-items: baseline; justify-content: space-between; }
.g-head b { font: 400 30px var(--hand); color: var(--red); }
.g-head span { font: 20px var(--hand); color: #1f2f6b; }
.g-time { height: 8px; border-radius: 4px; background: rgba(42,32,22,.12); margin: 6px 0 10px; overflow: hidden; }
.g-time i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--red), var(--gold)); }
.g-board {
  position: relative; height: 230px; border-radius: 12px; overflow: hidden; touch-action: none; user-select: none; cursor: pointer;
  background: repeating-linear-gradient(90deg, #c9975c 0 22px, #c08d52 22px 24px), #c9975c; box-shadow: inset 0 -6px 0 #9c6b38, inset 0 0 0 3px #a8753f;
}
.g-ing { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -55%); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.ico.big { width: 132px; height: 132px; padding: 14px; border-radius: 50%; background: radial-gradient(circle at 50% 52%, #f7f2e8 0 62%, #ddd2bd 63% 67%, transparent 68%); filter: drop-shadow(0 4px 3px rgba(0,0,0,.25)); }
.g-ing span { font: 22px var(--hand); color: #3a2a1c; }
.g-cuts { position: absolute; inset: 40px 25% 50px; pointer-events: none; }
.g-cuts b { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.75); box-shadow: 0 0 0 1px rgba(0,0,0,.15); transform: rotate(8deg); }
.g-knife { position: absolute; right: 18px; top: -10px; width: 34px; height: 124px; pointer-events: none; transform-origin: 50% 0; }
.g-knife.hit { animation: hit .12s ease-out; }
@keyframes hit { 50% { transform: translateY(46px) rotate(-6deg); } }
.piece { position: absolute; width: 9px; height: 9px; border-radius: 2px; pointer-events: none; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); animation: fly .9s ease-in forwards; }
@keyframes fly { 30% { transform: translate(calc(var(--dx) * .5), -20px) rotate(90deg); } 100% { transform: translate(var(--dx), 260px) rotate(260deg); opacity: .2; } }
.g-hint { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font: 20px var(--hand); color: #3a2a1c; pointer-events: none; }
.g-board.snowfield { cursor: grab; background: radial-gradient(ellipse at 50% 120%, #dfe8f5 0 40%, transparent 41%), linear-gradient(#f5f8ff, #e3ebf8); box-shadow: inset 0 0 0 3px #b9c8e0, inset 0 -8px 0 #cbd7ea; }
.g-board.snowfield canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.g-ball { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(circle at 34% 30%, #fff 0 30%, #e8eef8 55%, #bccbe2); box-shadow: 0 6px 8px rgba(40,60,110,.25), inset -4px -6px 0 rgba(150,170,205,.35); }
.g-ball::after { content: ''; position: absolute; left: 30%; top: 22%; width: 18%; height: 10%; border-radius: 50%; background: rgba(150,170,205,.5); }
.g-res { position: absolute; inset: 0; background: rgba(247,240,223,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; text-align: center; }
.g-res b { font: 400 38px var(--hand); color: var(--red); }
.g-res span { color: var(--ink2); margin-bottom: 8px; }
.g-foot { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 8px 0; }
.g-bowl svg { width: 90px; display: block; }
.g-foot span { font: 20px var(--hand); color: var(--ink2); }

/* ---------- вся панелька ---------- */
.street { position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column; background: #0b1230; }
.sthead { max-width: 480px; width: 100%; margin: 0 auto; }
.stwrap { position: relative; flex: 1; min-height: 0; }
.stcv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stscroll { position: absolute; inset: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; cursor: pointer; }
.stscroll::-webkit-scrollbar { display: none; }
.stspace { height: 100%; }
.stfoot { padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); max-width: 480px; width: 100%; margin: 0 auto; }
.stfoot .fine { text-align: center; margin: 0 0 8px; color: var(--dim); }
.stfoot .btn.ghost { color: var(--text); border-color: var(--line); }

/* ---------- полночь ---------- */
.ny { position: fixed; inset: 0; z-index: 31; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; background: rgba(5,8,22,.62); }
.ny h1 { font: 400 52px/1.05 var(--hand); margin: 0; color: var(--warm); text-shadow: 0 0 30px rgba(255,200,100,.7); }
.ny .big { font-size: 96px; font-weight: 800; line-height: 1; color: #fff; text-shadow: 0 0 40px rgba(255,220,150,.8); }
.ny p { margin: 0; font-size: 18px; }
.ny .btn { max-width: 320px; }
.ny .close { color: var(--dim); text-decoration: underline; min-height: 44px; }

@media (max-height: 700px) { .note .n-item { font-size: 13.5px; } .c-big { font-size: 22px; } }
@media (prefers-reduced-motion: reduce) { .b1, .b2, .b3, .flick, .mine, .tv, .tvs, .cf, .banner.glow { animation: none; } }

/* ---------- прогресс: календарь, игрушки, настроение ---------- */
.cal.fresh { animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-4deg); } 82% { transform: rotate(3deg); } 88% { transform: rotate(-2deg); } }
.c-tab { position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%) rotate(-4deg); background: #fff3b4; color: var(--red); font: 13px/1 var(--hand); padding: 3px 6px; border-radius: 2px; box-shadow: 0 2px 4px rgba(0,0,0,.3); white-space: nowrap; }
.leafwrap { display: flex; justify-content: center; margin: 6px 0 14px; cursor: pointer; perspective: 600px; }
.leaf {
  width: 170px; height: 190px; background: #fbf7ec; border: 1px solid #d8ccb0; box-shadow: 0 8px 18px rgba(0,0,0,.25), 3px 3px 0 #efe6d0, 6px 6px 0 #e6dbc0;
  display: flex; flex-direction: column; align-items: center; color: var(--ink); transform-origin: 50% 0; transition: transform .5s ease-in, opacity .5s ease-in;
  background-image: linear-gradient(#b8322a 0 34px, transparent 34px);
}
.leaf.gone { transform: rotateX(-70deg) translateY(-40px) rotate(-12deg); opacity: 0; }
.l-top { color: #fff3e0; font-size: 14px; line-height: 34px; }
.l-big { font: 700 84px/1 var(--body); margin-top: 14px; }
.l-bot { font-size: 18px; color: var(--ink2); }
.l-hint { margin-top: auto; padding-bottom: 8px; font: 15px var(--hand); color: var(--ink2); }
.reveal { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; margin: 4px 0 12px; animation: pop .45s cubic-bezier(.2, 1.6, .5, 1); }
.reveal .ico.big { width: 140px; height: 140px; padding: 18px; background: radial-gradient(circle, #fff7d8 0 45%, rgba(255,220,140,.35) 46% 62%, transparent 63%); filter: drop-shadow(0 6px 4px rgba(0,0,0,.2)); }
.reveal.small .ico.big { width: 96px; height: 96px; padding: 10px; }
.reveal b { font: 400 28px/1.1 var(--hand); color: var(--red); }
.reveal span { font-size: 13.5px; color: var(--ink2); max-width: 300px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.wish { font: 20px/1.3 var(--hand) !important; color: #1f2f6b !important; text-align: center; }
.news { background: #fff3b4; border-radius: 4px; padding: 8px 10px; color: var(--ink) !important; font-weight: 700; text-align: center; }
.box { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.slot { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 6px 2px; border-radius: 8px; background: #fffaf0; border: 1px solid rgba(42,32,22,.14); min-height: 86px; }
.slot .ico { width: 40px; height: 40px; }
.slot span { font-size: 10.5px; line-height: 1.15; color: var(--ink2); }
.box.six { grid-template-columns: repeat(3, 1fr); }
.slot.pickable { cursor: pointer; font: inherit; color: inherit; }
.slot.pickable.on, .pick .btn.on { outline: 3px solid var(--gold); background: #fff3c4; }
.tip { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 12px; padding: 10px 12px; border-radius: 8px; background: #fffaf0; border: 1px dashed rgba(42,32,22,.25); }
.tip i { font-style: normal; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.tip b { font: 400 21px/1.15 var(--hand); color: #1f2f6b; }
.tip span { font-size: 13.5px; color: var(--ink2); }
.slot.empty { background: repeating-linear-gradient(45deg, rgba(42,32,22,.04) 0 6px, transparent 6px 12px); border-style: dashed; }
.slot.empty b { font: 400 26px/40px var(--hand); color: rgba(42,32,22,.35); }
.mood .bulbs { display: flex; gap: 8px; margin: 2px 0 8px; padding-left: 4px; }
.mood .bulbs i { width: 14px; height: 20px; border-radius: 50% 50% 45% 45%; background: #cbbfa6; position: relative; }
.mood .bulbs i::before { content: ''; position: absolute; top: -5px; left: 4px; width: 6px; height: 5px; background: #8d8d8d; border-radius: 1px; }
.mood .bulbs i.on { background: var(--c); box-shadow: 0 0 10px var(--c); }
.mood p b { color: var(--ink); }
.mood .btn { margin-top: 8px; }
.neon { filter: drop-shadow(0 0 2.5px #ffb347); }

/* сертификат вместо ордера */
.cert {
  position: relative; color: var(--ink); text-align: center; padding: 18px 18px 16px; border-radius: 6px;
  background: radial-gradient(120% 90% at 50% 0%, #fffaf0 0%, #f6ecd2 100%);
  box-shadow: 0 12px 30px rgba(0,0,0,.5), inset 0 0 0 5px #f6ecd2, inset 0 0 0 7px #c9a24a, inset 0 0 0 9px #f6ecd2, inset 0 0 0 10px #c9a24a;
}
.cert::before, .cert::after { content: '❄'; position: absolute; top: 12px; color: #c9a24a; font-size: 18px; }
.cert::before { left: 16px; } .cert::after { right: 16px; }
.c-ribbon { position: absolute; top: -10px; left: 50%; width: 120px; height: 20px; margin-left: -60px; background: var(--red); clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%, 8% 50%); box-shadow: 0 2px 0 var(--red2); }
.c-title { font: 400 46px/1 var(--hand); color: var(--red); margin-top: 4px; text-shadow: 0 1px 0 #fff; }
.c-sub { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #8a6a2a; margin-top: 2px; }
.c-text { font-size: 14px; color: var(--ink2); margin: 10px 4px; }
.c-row { display: flex; align-items: baseline; gap: 10px; margin: 0 4px 6px; font-size: 14px; color: var(--ink2); text-align: left; }
.c-row input { flex: 1; min-width: 0; font: 24px var(--hand); color: #1d3d8f; background: transparent; border: 0; border-bottom: 1.5px solid #c9a24a; padding: 2px 4px; outline: none; text-align: center; }
.c-row input:focus { border-bottom-color: var(--red); }
.cert .err { color: var(--red); min-height: 20px; font-size: 14px; }
.c-sign { display: flex; align-items: baseline; justify-content: flex-start; gap: 8px; margin: 10px 4px 0; font-size: 12.5px; color: var(--ink2); }
.c-sign b { font: 400 24px var(--hand); color: #1d3d8f; font-weight: 400; transform: rotate(-4deg); }
.seal {
  position: absolute; right: 16px; bottom: 12px; width: 62px; height: 62px; border-radius: 50%; background: radial-gradient(circle, #d8493d 0 55%, #b8322a 56%);
  color: #ffe9b0; font: 12px/1.05 var(--hand); display: flex; align-items: center; justify-content: center; text-align: center;
  box-shadow: 0 3px 6px rgba(0,0,0,.3), inset 0 0 0 3px rgba(255,233,176,.5); transform: rotate(10deg); pointer-events: none;
}

/* жалобы и новое имя */
.report { display: block; margin: 10px 0 0 auto; font-size: 12.5px; color: var(--ink2); text-decoration: underline; text-underline-offset: 2px; }
#renameerr { color: var(--red); min-height: 22px; font-size: 14px; margin: 6px 0; }

/* согласия и «Мои данные» */
.tick { display: flex; gap: 8px; align-items: flex-start; text-align: left; font-size: 12.5px; line-height: 1.35; color: var(--ink2); margin: 6px 4px; cursor: pointer; }
.tick input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--red); }
.tick a { color: var(--red); }
.mydata .tick { font-size: 14px; margin: 4px 0 8px; }
.mydata .fine { margin-bottom: 4px; }

/* по-соседски */
.reacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.react { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; background: rgba(255,255,255,.65); border: 1.5px solid rgba(42,32,22,.2); color: var(--ink); font-size: 13px; }
.react .ico { width: 28px; height: 28px; }
.react small { color: var(--ink2); font-size: 11.5px; }
.react[disabled] { opacity: .55; }
.react:not([disabled]):active { transform: scale(.96); }
a.btn { text-decoration: none; }

/* поддержать игру — тихо, в конце ларька */
.donate p a { color: var(--red); }
.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.amounts button { min-height: 42px; border-radius: 10px; background: #fffaf0; border: 1.5px solid rgba(42,32,22,.25); color: var(--ink); font-weight: 700; }
.amounts button:active { background: #fdecd6; }
.amounts button[disabled] { opacity: .5; }
.pick.wishes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pick.wishes .btn { font-size: 16px; line-height: 1.15; padding: 8px 6px; min-height: 0; }
@media (min-aspect-ratio: 4/5) { .join .hero::after { background: linear-gradient(rgba(8,12,34,.6), rgba(8,12,34,.1) 24%, rgba(8,12,34,0) 50%, rgba(8,12,34,.12) 85%, rgba(8,12,34,.3)); } }
