/* Стиль «наклеек»: см. docs/art-direction.md */
:root {
  --ink: #2B2320; --cream: #FFF8E7; --muted: #6B5F55; --yellow: #FFD21F; --green: #2FA65A;
  --red: #E5484D; --green-ink: #1E8544; --red-ink: #C9353B; --blue: #3D7BE0; --purple: #6B46E0; --track: #E4D8BF;
  --display: 'Unbounded', system-ui, sans-serif;
  /* Общие токены меню и игры: контур, скругления, «жёсткая» тень наклейки и её отклик на наведение и нажатие */
  --line: 3px; --r-card: 18px; --r-btn: 14px;
  --lift: 0 5px 0 var(--ink); --lift-hover: 0 7px 0 var(--ink); --lift-press: 0 2px 0 var(--ink); --lift-card: 0 8px 0 var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #16202B; overflow: hidden; }
body { font-family: 'Golos Text', system-ui, sans-serif; font-size: 14px; color: var(--ink); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Сцена фиксированного размера, масштабируется под окно */
#stage { position: absolute; left: 50%; top: 50%; width: 1440px; height: 810px; transform-origin: 0 0; overflow: hidden; background: #8FD3F4; }
#map { position: absolute; left: 0; top: 0; width: 1440px; height: 810px; display: block; user-select: none; transform-origin: 0 0; }

.sticker { background: var(--cream); border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: 0 3px 0 var(--ink); }
.display { font-family: var(--display); font-weight: 800; }
.muted { color: var(--muted); }

/* Верхняя полоса */
#hud { position: absolute; left: 16px; top: 12px; right: 16px; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.logo { background: var(--red); color: #fff; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ink); padding: 6px 16px; font-family: var(--display); font-weight: 800; font-size: 22px; text-decoration: none; transform: rotate(-3deg); }
.spacer { flex: 1; }
.pill { height: 44px; padding: 0 14px; display: flex; align-items: center; gap: 8px; }
.pill.yellow { background: var(--yellow); }
.pill.red { background: var(--red-ink); color: #fff; font-weight: 800; }
.pill.green { background: var(--green-ink); color: #fff; font-weight: 800; }
.pill b.display { font-size: 15px; }
.meter { height: 44px; width: 150px; padding: 0 12px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.meter .row { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; }
.bar { height: 8px; background: var(--track); border-radius: 4px; border: 1.5px solid var(--ink); overflow: hidden; }
.bar i { display: block; height: 100%; transition: width .35s ease; }
.sep { width: 1px; height: 22px; background: #CDBFA6; }

/* Подключение к сессии */
#game-connection { position: absolute; top: 78px; right: 16px; z-index: 10; width: 300px; padding: 10px 12px; }
#game-connection span:not(:empty) { display: block; }
#game-connection .ghost { height: 42px; margin: 4px 0; }

/* Левая колонка */
#side { position: absolute; left: 16px; top: 78px; bottom: 16px; width: 226px; display: flex; flex-direction: column; gap: 8px; }
.panel { padding: 9px 12px; }
.panel h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 800; font-size: 12px; }
.lead-row { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.lead-row.me { background: var(--yellow); border: 2px solid var(--ink); border-radius: 8px; padding: 2px 6px; margin: 0 -8px; font-weight: 800; }
.lead-row .n { width: 12px; font-weight: 700; }
.lead-row .who { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); flex: none; }
.event { background: #fff; padding: 0; overflow: hidden; transform: rotate(-1.5deg); }
.event .head { background: #2E2350; color: #fff; padding: 5px 12px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.event .body { padding: 8px 12px 10px; font-size: 13px; line-height: 1.3; }
.event .body b { display: block; font-family: var(--display); font-size: 15px; margin-bottom: 3px; }
.event.calm .head { background: var(--green); }
#chat { flex: 1; min-height: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; font-size: 12.5px; line-height: 1.3; }
#chat .head { background: var(--ink); color: #fff; padding: 5px 10px; display: flex; justify-content: space-between; align-items: center; }
#chat .head b { font-family: var(--display); font-size: 11px; }
#chat .head span { font-size: 11px; color: #D9CFBF; }
#chatlog { flex: 1; min-height: 0; overflow-y: auto; padding: 7px 8px 9px; display: flex; flex-direction: column; gap: 5px; scrollbar-width: thin; }
.msg { align-self: flex-start; max-width: 100%; background: #fff; border: 2px solid var(--ink); border-radius: 4px 11px 11px 11px; padding: 3px 8px; }
.msg.me { align-self: flex-end; background: var(--yellow); border-radius: 11px 4px 11px 11px; }
.msg.sys { align-self: center; text-align: center; border-radius: 999px; padding: 2px 10px; font-weight: 700; }
.msg.bad { background: #FBDCD3; border-color: #A31621; color: #7A1019; }
.msg.good { background: #D9EFDF; border-color: #0F5A2E; color: #0F5A2E; }
.msg.day { align-self: stretch; text-align: center; background: transparent; border: 0; border-top: 2px dashed #CDBFA6; border-radius: 0; color: var(--muted); font-weight: 700; padding-top: 5px; margin-top: 2px; }
.goals { background: #FFF3A8; border-radius: 4px 14px 14px 14px; font-size: 12.5px; }
.goals .row { display: flex; justify-content: space-between; gap: 8px; }
.goals .row b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 96px; }
.goals hr { border: 0; height: 2px; background: var(--ink); opacity: .25; margin: 6px 0; }
.goals .secret.done { color: #0F5A2E; font-weight: 700; }

/* Таблички зданий и фишки */
.chip { position: absolute; transform: translateX(-50%); height: 26px; padding: 0 9px; background: var(--cream); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 0 2px 0 var(--ink); font-weight: 700; font-size: 12px; white-space: nowrap; display: flex; align-items: center; gap: 6px; transition: transform .12s ease, background .12s ease; }
.chip span { font-weight: 600; color: var(--muted); }
.chip:hover, .chip.hot { transform: translateX(-50%) translateY(-2px); background: #fff; }
.chip.selected { background: #fff; border-width: 2.5px; height: 30px; font-size: 13px; z-index: 3; box-shadow: 0 3px 0 var(--ink), 0 0 0 4px rgba(255, 210, 31, .9); }
.chip.here { background: var(--yellow); border-width: 2.5px; height: 30px; font-size: 13px; font-weight: 800; z-index: 2; }
.chip.here span { background: var(--ink); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.chip.far { background: #EFE6D2; color: var(--muted); border-color: var(--muted); box-shadow: 0 2px 0 var(--muted); }
.pawn { position: absolute; width: 44px; height: 58px; margin: -50px 0 0 -22px; pointer-events: none; z-index: 4; }
.pawn.me { z-index: 5; }
.tag { position: absolute; transform-origin: 0 100%; background: var(--cream); color: var(--ink); border: 2px solid var(--ink); border-left-width: 10px; border-radius: 999px; padding: 1px 9px; font-weight: 700; font-size: 11.5px; white-space: nowrap; pointer-events: none; z-index: 6; }

/* Карточки действий */
/* Карточек у места не больше трёх (≈ 640 px): панель прижата к кнопке «Готов», левый нижний угол карты свободен. */
#dock { position: absolute; left: 470px; bottom: 16px; right: 332px; display: flex; flex-direction: column; align-items: flex-start; }
#dock .title { background: var(--ink); color: #fff; border-radius: 10px 10px 0 0; padding: 5px 14px; font-family: var(--display); font-weight: 600; font-size: 12px; }
#cards { display: flex; gap: 10px; align-items: stretch; }
.card { width: 204px; height: 148px; text-align: left; background: var(--yellow); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 5px 0 var(--ink); padding: 9px 12px; display: flex; flex-direction: column; gap: 5px; transition: transform .1s ease, box-shadow .1s ease; }
.card:first-child { border-top-left-radius: 0; }
.card:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 8px 0 var(--ink); }
.card:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.card .top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.card .top b:first-child { font-family: var(--display); font-size: 13.5px; line-height: 1.15; }
.card .top b:last-child { white-space: nowrap; }
.card .road { font-size: 12px; font-weight: 600; }
.card .fx { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; }
.fx span { background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 700; }
.fx .money { background: var(--ink); color: #fff; }
.fx .minus { color: #A31621; }
.fx .plus { color: #0F5A2E; }
.fx .food { background: var(--green-ink); color: #fff; }
.card:disabled { background: #E9E2D2; border-color: var(--muted); box-shadow: 0 4px 0 var(--muted); color: #4A4038; border-width: 2.5px; }
.card:disabled .fx span { background: #D3C9B4; border-color: transparent; color: #4A4038; }
.card .why { color: #A31621; font-weight: 700; font-size: 12.5px; margin-top: auto; }

/* Кнопка хода */
#ready { position: absolute; right: 16px; bottom: 16px; width: 300px; height: 84px; background: var(--green-ink); color: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 6px 0 var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: transform .1s ease, box-shadow .1s ease; }
#ready:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
#ready:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
#ready b { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: .02em; }
#ready span { font-size: 13px; font-weight: 600; }
#hint { position: absolute; right: 16px; bottom: 112px; width: 300px; padding: 8px 12px; font-size: 13px; line-height: 1.3; }

/* Всплывающие окна */
.veil { position: absolute; inset: 0; background: rgba(22, 16, 12, .62); display: flex; align-items: center; justify-content: center; z-index: 20; }
.modal { width: 560px; max-height: 760px; overflow: auto; background: var(--cream); border: var(--line) solid var(--ink); border-radius: var(--r-card); box-shadow: var(--lift-card); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.modal.wide { width: 820px; }
.modal h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.1; }
.modal h1 em { font-style: normal; background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 10px; padding: 0 8px; }
.modal .sub { color: var(--muted); font-weight: 600; margin-top: -6px; }
.list { background: #fff; border: 2.5px solid var(--ink); border-radius: 12px; padding: 2px 14px; }
.list .li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--track); }
.list .li:last-child { border-bottom: 0; }
.list .li.bad { color: #A31621; font-weight: 700; }
.list .li.good { color: #0F5A2E; font-weight: 700; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: right; font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px 8px; }
.table th:first-child, .table td:first-child { text-align: left; }
.table td { padding: 7px 8px; text-align: right; border-top: 1px solid var(--track); font-variant-numeric: tabular-nums; }
.table tr.me td { background: var(--yellow); font-weight: 800; }
.table td .dot { display: inline-block; vertical-align: -4px; margin-right: 8px; }
.table td.total { font-family: var(--display); font-weight: 800; font-size: 16px; }
.table .small { font-size: 12px; color: var(--muted); text-align: left; }
.big { height: 56px; background: var(--green-ink); color: #fff; border: var(--line) solid var(--ink); border-radius: var(--r-btn); box-shadow: var(--lift); font-family: var(--display); font-weight: 800; font-size: 18px; }
.big:hover, .ghost:hover { transform: translateY(-2px); box-shadow: var(--lift-hover); }
.ghost { height: 56px; background: #fff; border: var(--line) solid var(--ink); border-radius: var(--r-btn); box-shadow: var(--lift); font-family: var(--display); font-weight: 600; font-size: 14px; padding: 0 18px; }
.rowbtn { display: flex; gap: 10px; }
.rowbtn > * { flex: 1; }
.note { font-size: 13px; color: var(--muted); line-height: 1.35; }

/* ------------------------------------------------------------ движение */
:root { --spring: cubic-bezier(.3, 1.5, .5, 1); }

/* Облака плывут над городом */
.clouds { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.clouds i { position: absolute; left: -220px; width: 132px; height: 36px; background: #fff; border-radius: 999px; opacity: .3; animation: drift 95s linear infinite; }
.clouds i::before { content: ''; position: absolute; left: 24px; top: -20px; width: 54px; height: 44px; background: #fff; border-radius: 50%; box-shadow: 38px 6px 0 -5px #fff; }
.clouds i:nth-child(1) { top: 150px; animation-delay: -20s; }
.clouds i:nth-child(2) { top: 330px; scale: .7; animation-duration: 130s; animation-delay: -85s; opacity: .24; }
.clouds i:nth-child(3) { top: 560px; animation-duration: 110s; animation-delay: -55s; }
/* Сдвиг через transform: браузер двигает готовую картинку, не пересчитывая раскладку страницы. */
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(1720px); } }

/* Верхняя полоса: подсветка изменений и предпросмотр действия */
.meter, .pill.money { position: relative; }
.pill.up, .meter.up { animation: glow-up .8s ease-out; }
.lead-row b.up, .lead-row b.down { animation: mark .9s ease-out; }
@keyframes mark { 0%, 40% { background: rgba(47, 166, 90, .4); } }
.pill.down, .meter.down { animation: glow-down .8s ease-out; }
@keyframes glow-up { 0%, 35% { box-shadow: 0 3px 0 var(--ink), 0 0 0 5px rgba(47, 166, 90, .85); } }
@keyframes glow-down { 0%, 35% { box-shadow: 0 3px 0 var(--ink), 0 0 0 5px rgba(229, 72, 77, .85); } }
.bar { position: relative; }
.bar u { position: absolute; top: 0; height: 100%; width: 0; }
.bar u.down { background: repeating-linear-gradient(-45deg, #fff 0 3px, transparent 3px 6px); opacity: .85; }
.bar u.up { background: var(--green); animation: blink .7s ease-in-out infinite alternate; }
@keyframes blink { from { opacity: .45; } to { opacity: 1; } }
.delta { position: absolute; left: 50%; top: 100%; margin-top: 7px; padding: 1px 9px; border: 2px solid var(--ink); border-radius: 999px; box-shadow: 0 2px 0 var(--ink); font-weight: 800; font-size: 12.5px; color: #fff; white-space: nowrap; opacity: 0; transform: translate(-50%, -8px) scale(.7); transition: opacity .14s ease, transform .2s var(--spring); pointer-events: none; z-index: 8; }
.delta.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.delta.up { background: var(--green-ink); }
.delta.down { background: var(--red-ink); }
.meter.low .bar { animation: low .9s ease-in-out infinite alternate; }
@keyframes low { to { box-shadow: 0 0 0 3px rgba(229, 72, 77, .8); } }
.pill.red.nag { animation: nag 4s ease-in-out infinite; }
@keyframes nag { 0%, 16%, 100% { transform: rotate(0); } 4% { transform: rotate(-4deg) scale(1.06); } 8% { transform: rotate(4deg) scale(1.06); } 12% { transform: rotate(-2deg); } }
.pill.red.will { background: var(--green); box-shadow: 0 3px 0 var(--ink), 0 0 0 4px rgba(47, 166, 90, .5); }

/* Таблица игроков */
.lead-list { display: flex; flex-direction: column; }
.lead-row b.up { border-radius: 6px; }

/* Чат: новые реплики выпрыгивают по очереди */
.msg.new { animation: msg-in .34s var(--spring) both; animation-delay: calc(var(--i, 0) * 120ms); transform-origin: 0 100%; }
.msg.me.new { transform-origin: 100% 100%; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.7); } }

/* Карта: выбранная табличка, маршрут, фишки */
.chip.selected { animation: ring 2.4s ease-in-out infinite alternate; }
@keyframes ring { to { box-shadow: 0 3px 0 var(--ink), 0 0 0 7px rgba(255, 210, 31, .55); } }
#route { position: absolute; inset: 0; width: 1440px; height: 810px; pointer-events: none; }
#route path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
#route .under { stroke: #fff; stroke-width: 9; opacity: .9; }
#route .dash { stroke: var(--ink); stroke-width: 4; stroke-dasharray: 2 12; animation: march .6s linear infinite; }
#route .end { fill: var(--yellow); stroke: var(--ink); stroke-width: 3; }
@keyframes march { to { stroke-dashoffset: -14; } }
.pawn svg { display: block; transform-origin: 50% 88%; }
.pawn.me::before { content: ''; position: absolute; left: 50%; top: 50px; width: 46px; height: 20px; margin: -10px 0 0 -23px; border: 3px solid var(--yellow); border-radius: 50%; animation: beacon 1.5s ease-out infinite; }
@keyframes beacon { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
.pawn.me svg { animation: idle 1.8s ease-in-out infinite; }
@keyframes idle { 50% { transform: translateY(-4px) scale(.98, 1.03); } }
.floater { position: absolute; padding: 2px 11px; background: #fff; border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: 0 3px 0 var(--ink); font-weight: 800; font-size: 15px; white-space: nowrap; pointer-events: none; z-index: 9; }
.floater.money { background: var(--green-ink); color: #fff; }
.floater.spend { background: var(--ink); color: #fff; }
.floater.up { color: #0F5A2E; }
.floater.down { color: #A31621; }
.floater.time { background: var(--cream); color: var(--muted); font-size: 13px; }

/* Карточки действий */
.card.in { animation: card-in .36s var(--spring) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(26px) rotate(-3deg); } }
.card .dur { background: var(--ink); color: #fff; border-radius: 999px; padding: 1px 9px; font-size: 13px; }
.card:disabled .dur { background: var(--muted); }
#ready.pulse { animation: ready-pulse .9s ease-in-out infinite alternate; }
@keyframes ready-pulse { to { transform: scale(1.04); box-shadow: 0 6px 0 var(--ink), 0 0 0 8px rgba(47, 166, 90, .45); } }
#hint { animation: rise .3s ease-out; }

/* Наклейка нового дня */
.daybanner { position: absolute; left: 790px; top: 300px; padding: 14px 34px 16px; background: var(--yellow); border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 9px 0 var(--ink); text-align: center; pointer-events: none; z-index: 15; animation: day-drop 2.2s both; }
.daybanner b { display: block; font-family: var(--display); font-weight: 800; font-size: 54px; line-height: 1.05; }
.daybanner span { display: inline-block; margin-top: 6px; background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 14px; font-weight: 700; font-size: 15px; }
@keyframes day-drop {
  0% { transform: translate(-50%, -420px) rotate(-14deg); opacity: 0; animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
  16% { transform: translate(-50%, 0) rotate(-4deg) scale(1.1, .88); opacity: 1; }
  24% { transform: translate(-50%, -14px) rotate(-4deg) scale(.97, 1.04); }
  31%, 76% { transform: translate(-50%, 0) rotate(-4deg) scale(1); opacity: 1; }
  100% { transform: translate(-50%, 30px) rotate(6deg) scale(.5); opacity: 0; }
}

/* Окна */
.veil { animation: veil-in .25s ease-out both; }
@keyframes veil-in { from { background: rgba(22, 16, 12, 0); } }
.modal { position: relative; z-index: 1; animation: pop-in .42s var(--spring) both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(40px) scale(.86) rotate(-2deg); } }
.modal .li, .modal .table tr { animation: rise .32s ease-out both; animation-delay: calc(.2s + var(--i, 0) * 55ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.modal h1 em { display: inline-block; }
.modal.final h1 { animation: win 1.2s var(--spring) .3s both; }
@keyframes win { from { transform: scale(.4) rotate(-6deg); opacity: 0; } }
.big, .ghost { transition: transform .1s ease, box-shadow .1s ease; }
.big:active, .ghost:active { transform: translateY(3px); box-shadow: var(--lift-press); }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -24px; border: 1.5px solid var(--ink); border-radius: 3px; animation: fall var(--t) linear var(--d) 2 both; }
@keyframes fall { to { transform: translate(var(--x), 860px) rotate(var(--r)); } }

/* Здания на карте: приподнимаются и светятся под курсором, выбранное держит свет */
/* Поверх карты лежат слои света и виньетки: курсор должен проходить сквозь них к зданиям. */
svg#map { pointer-events: none; }
svg#map .place { pointer-events: auto; cursor: pointer; transform-box: fill-box; transform-origin: 50% 100%; transition: transform .24s var(--spring), filter .18s ease; }
svg#map .place.sel { filter: drop-shadow(0 0 5px #FFD21F) drop-shadow(0 0 2px #FFD21F); }
svg#map .place.hot { transform: translateY(-7px) scale(1.05); filter: brightness(1.1) drop-shadow(0 0 8px #FFE766) drop-shadow(0 0 2px #FFD21F); }
#dock { pointer-events: none; }
#dock > * { pointer-events: auto; }

/* Вечер: город темнеет по мере того, как уходит время дня, у зданий загораются огни */
.dusk, .lights { position: absolute; inset: 0; pointer-events: none; }
.dusk { background: linear-gradient(180deg, #0E1640 0%, #1B2558 60%, #2A2A5C 100%); opacity: calc(var(--dusk, 0) * .42); transition: opacity 1.4s ease; }
.lights { opacity: var(--dusk, 0); transition: opacity 1.4s ease; }
.lights i { position: absolute; }
.lights .glow { width: 170px; height: 120px; margin: -62px 0 0 -85px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 208, 110, .8), rgba(255, 180, 70, 0)); }
.lights .lamp { width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 236, 150, .95), rgba(255, 220, 120, 0)); }
.lights .star { width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px 1px #fff; animation: twinkle 2s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .3; } }
.lights .moon { width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; background: radial-gradient(circle at 38% 36%, #FFFBE6, #F4E3A1 70%); box-shadow: 0 0 26px 8px rgba(255, 244, 190, .55); }
/* Клуб: неоновый ореол переливается, прожекторы с диско-шара шарят по небу */
/* Перелив розовый ↔ голубой — две подложки и прозрачность: дешевле, чем фильтр на каждом кадре. */
.lights .neon { width: 260px; height: 170px; margin: -85px 0 0 -130px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 79, 216, .9), rgba(255, 79, 216, .3) 55%, rgba(255, 79, 216, 0)); animation: neon 1.4s ease-in-out infinite alternate; }
.lights .neon::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(110, 240, 255, .9), rgba(110, 240, 255, .3) 55%, rgba(110, 240, 255, 0)); animation: neon-fade 1.4s ease-in-out infinite alternate; }
@keyframes neon { to { transform: scale(1.12); } }
@keyframes neon-fade { from { opacity: 0; } to { opacity: 1; } }
.lights .beam { width: 46px; height: 260px; margin: -260px 0 0 -23px; transform-origin: 50% 100%; background: linear-gradient(to top, rgba(255, 110, 230, .85), rgba(255, 110, 230, 0)); clip-path: polygon(46% 100%, 54% 100%, 100% 0, 0 0); animation: sweep 3.2s ease-in-out infinite alternate; }
.lights .beam.b2 { background: linear-gradient(to top, rgba(110, 240, 255, .85), rgba(110, 240, 255, 0)); animation-duration: 2.6s; animation-direction: alternate-reverse; }
.lights .beam.b3 { background: linear-gradient(to top, rgba(255, 230, 90, .7), rgba(255, 230, 90, 0)); animation-duration: 4s; animation-delay: -1s; }
@keyframes sweep { from { transform: rotate(-38deg); } to { transform: rotate(38deg); } }
svg#map .night { opacity: var(--dusk, 0); transition: opacity 1.4s ease; }
svg#map .traffic { pointer-events: none; }

/* Свой день закончен: ждём соперников */
#ready.waiting { background: var(--muted); cursor: default; }
#ready:disabled:hover, #ready:disabled:active { transform: none; box-shadow: 0 6px 0 var(--ink); }
.card.wait { width: 360px; background: var(--cream); cursor: default; }

/* Мир: всё, что стоит на карте и двигается вместе с ней */
#world { position: absolute; inset: 0; pointer-events: none; }
#world .chip { pointer-events: auto; }
#stage.dragging, #stage.dragging * { cursor: grabbing !important; }

/* Сборка города: детали зданий падают сверху */
svg#map .brick { transform-box: view-box; }

/* Иконки-наклейки */
.ico { width: 18px; height: 18px; flex: none; vertical-align: -4px; overflow: visible; }
.meter .lbl { display: inline-flex; align-items: center; gap: 4px; }
.meter .lbl .ico { width: 15px; height: 15px; }
.pill .ico { width: 20px; height: 20px; }
.pill.red .ico, .pill.green .ico { filter: drop-shadow(0 0 1px #fff); }
.fx .ic { display: inline-flex; align-items: center; gap: 3px; padding-left: 4px; }
.fx .ic .ico { width: 15px; height: 15px; }
.floater { display: inline-flex; align-items: center; gap: 4px; }
.floater .ico { width: 17px; height: 17px; }

.modal .legend { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.table th[title] { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }

/* Стартовое окно */
.modal > .ghost { align-self: stretch; }

/* Правки по ревью */
.card .perk { font-size: 11.5px; line-height: 1.2; font-weight: 600; }
.card:disabled .perk { color: var(--muted); }
.pill .unit { font-size: 12px; font-weight: 700; }
.goal { margin-bottom: 4px; }
.goal small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.2; }
#hint .warn { color: #A31621; font-weight: 700; }
#hint div + div { margin-top: 3px; }
.table tr.me td:first-child { border-radius: 8px 0 0 8px; }
.table tr.me td:last-child { border-radius: 0 8px 8px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------ Экстренные новости Чата подъезда */
.news-card { position: absolute; left: 50%; top: 150px; z-index: 30; width: 440px; margin-left: -220px; padding: 0 18px 16px;
  background: var(--cream); border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 10px 0 var(--ink);
  text-align: center; overflow: hidden; pointer-events: none; animation: news-in .6s var(--spring) both; }
.news-card.out { animation: news-out .42s ease-in both; }
@keyframes news-in { 0% { transform: translateY(-260px) rotate(-14deg) scale(.6); opacity: 0; } 60% { transform: translateY(10px) rotate(3deg) scale(1.04); opacity: 1; } 100% { transform: rotate(-2deg); } }
@keyframes news-out { to { transform: translateY(40px) rotate(6deg) scale(.7); opacity: 0; } }
.news-kicker { margin: 0 -18px 4px; padding: 7px 12px; background: var(--red); color: #fff; font: 800 13px var(--display); letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 8px; }
.news-card.party .news-kicker { background: var(--green-ink); }
.news-card.gloom .news-kicker { background: #5C6470; }
.news-card.sick .news-kicker { background: #2F8F3D; }
.news-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: news-blink .5s steps(2) infinite; }
@keyframes news-blink { 50% { opacity: .2; } }
.news-scene { height: 100px; position: relative; overflow: hidden; margin: 0 -18px; }
.news-scene svg { width: 100%; height: 100px; overflow: visible; }
.news-who { font: 800 40px/1.05 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.news-phrase { display: inline-block; margin-top: 6px; padding: 3px 14px; background: var(--yellow); border: 3px solid var(--ink); border-radius: 12px;
  font: 800 22px/1.2 var(--display); transform: rotate(-1.5deg); animation: news-stamp .5s var(--spring) .35s both; }
@keyframes news-stamp { from { transform: scale(2.2) rotate(-12deg); opacity: 0; } }
.news-line { margin-top: 10px; font-size: 15px; font-weight: 600; color: #4A4038; }

/* Эффекты на весь экран */
.news-flash { position: absolute; inset: 0; z-index: 29; pointer-events: none; }
.news-flash.out { animation: news-fade .42s ease-in both; }
@keyframes news-fade { to { opacity: 0; } }
.news-flash.siren { animation: siren .5s steps(1) infinite; }
@keyframes siren { 0% { box-shadow: inset 0 0 160px 40px rgba(229, 72, 77, .55); } 50% { box-shadow: inset 0 0 160px 40px rgba(61, 123, 224, .55); } }
.news-flash.siren.out { animation: news-fade .42s ease-in both; }
.news-flash.gloom { background: rgba(70, 78, 90, .35); backdrop-filter: grayscale(.8); }
.news-flash.sick { background: radial-gradient(circle at 50% 40%, rgba(120, 220, 90, 0), rgba(90, 170, 60, .35)); animation: queasy 1.2s ease-in-out infinite alternate; }
@keyframes queasy { to { transform: skewX(1.5deg) scale(1.01); } }
.news-flash.party { background: radial-gradient(circle at 50% 30%, rgba(255, 210, 31, .35), rgba(255, 210, 31, 0) 60%); }

/* Сценки */
.sc-ambulance .van { animation: drive 3.4s ease-in-out both; }
/* Машина подъезжает, тормозит посередине, мигает и уезжает — сценка живёт всё время показа */
@keyframes drive { 0% { transform: translateX(260px); } 30% { transform: translateX(10px); } 34% { transform: translateX(-6px); } 38%, 72% { transform: translateX(0); } 100% { transform: translateX(-280px); } }
.sc-ambulance .van { transform-box: view-box; }
.sc-ambulance .siren-r { animation: news-blink .3s steps(2) infinite; }
.sc-ambulance .siren-b { animation: news-blink .3s steps(2) infinite reverse; }
.sc-ambulance .dust, .sc-thief .dust { opacity: 0; }
.sc-rain .drops { animation: rain .6s linear infinite; }
@keyframes rain { from { transform: translateY(-8px); opacity: .2; } to { transform: translateY(10px); opacity: 1; } }
.sc-rain { animation: sulk 2s ease-in-out infinite alternate; }
@keyframes sulk { to { transform: translateX(14px); } }
.sc-poison .roll { transform-box: fill-box; transform-origin: 50% 50%; animation: wobble-x .25s ease-in-out infinite alternate; }
@keyframes wobble-x { from { transform: rotate(-6deg); } to { transform: rotate(6deg) translateY(-3px); } }
.sc-poison .stink { animation: rise .9s ease-in-out infinite alternate; }
.sc-thief .runner { animation: drive 3.4s ease-in-out both; }
.sc-thief .runner { transform-box: view-box; }
.sc-thief .bag { transform-box: fill-box; transform-origin: 50% 0; animation: wobble-x .18s ease-in-out infinite alternate; }
.sc-party .hat { transform-box: fill-box; transform-origin: 50% 100%; animation: hop-up .5s ease-out infinite alternate; }
@keyframes hop-up { to { transform: translateY(-8px) rotate(-4deg); } }
.sc-money .bills { animation: rain-money 1.2s linear infinite; }
@keyframes rain-money { from { transform: translateY(-30px); } to { transform: translateY(30px); opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .news-card, .news-card * , .news-flash { animation: none !important; } }

/* ------------------------------------------------------------ обучение */
.tour-spot { position: absolute; z-index: 40; border-radius: 16px; pointer-events: none; box-shadow: 0 0 0 4px var(--yellow), 0 0 0 4000px rgba(22, 16, 12, .58); transition: left .35s var(--spring), top .35s var(--spring), width .35s var(--spring), height .35s var(--spring); }
.tour-spot.tap { animation: tour-tap 1.1s ease-in-out infinite; }
@keyframes tour-tap { 50% { box-shadow: 0 0 0 8px var(--yellow), 0 0 0 4000px rgba(22, 16, 12, .58); } }
.tour-bubble { position: absolute; z-index: 42; width: 360px; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 6px; transition: left .3s ease, top .3s ease; }
.tour-bubble .tour-title { font-family: var(--display); font-weight: 800; font-size: 17px; line-height: 1.15; }
.tour-bubble p { margin: 0; font-size: 14px; line-height: 1.4; }
.tour-count { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.tour-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.tour-next { height: 44px; padding: 0 22px; font-size: 15px; }
.tour-skip { background: none; border: 0; padding: 0; color: var(--muted); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tour-arrow { position: absolute; z-index: 42; width: 0; height: 0; border: 11px solid transparent; pointer-events: none; }
.tour-arrow.up { border-bottom: 16px solid var(--yellow); border-top: 0; animation: tour-bob-y 0.9s ease-in-out infinite alternate; }
.tour-arrow.down { border-top: 16px solid var(--yellow); border-bottom: 0; animation: tour-bob-y 0.9s ease-in-out infinite alternate-reverse; }
.tour-arrow.left { border-right: 16px solid var(--yellow); border-left: 0; animation: tour-bob-x 0.9s ease-in-out infinite alternate; }
.tour-arrow.right { border-left: 16px solid var(--yellow); border-right: 0; animation: tour-bob-x 0.9s ease-in-out infinite alternate-reverse; }
@keyframes tour-bob-y { to { translate: 0 -6px; } }
@keyframes tour-bob-x { to { translate: -6px 0; } }
.tour-link { display: flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; }
.tour-link.big { color: #fff; }
.tour-home { align-self: center; color: var(--muted); font-weight: 600; }

/* Производительность: всё, что двигается, живёт в отдельных слоях видеокарты — браузер двигает готовую
   картинку и не перерисовывает карту. Внутри SVG карты нет размытий: они пересчитывались при каждом кадре. */
#map, #world, .clouds i, .pawn, .pin, .floater, .tag, .news-card, .lights .beam, .lights .neon { will-change: transform; }

/* Метки игроков над зданиями (игрок «внутри») */
.pin { position: absolute; width: 26px; height: 35px; margin: -35px 0 0 -13px; z-index: 7; pointer-events: none; transition: left .3s ease, top .3s ease; }
.pin svg { display: block; width: 100%; height: 100%; overflow: visible; transform-origin: 50% 100%; animation: pin-bob 1.3s ease-in-out infinite alternate; }
.pin.me { width: 34px; height: 46px; margin: -46px 0 0 -17px; z-index: 8; }
.pin.me svg { animation-duration: .9s; filter: drop-shadow(0 0 4px rgba(255, 210, 31, .9)); }
@keyframes pin-bob { to { transform: translateY(-5px); } }
.pawn { opacity: 0; }

/* Прогноз очков под плашкой очков, «держишься» у тайных целей, мягкие подсказки, сводка про соседей */
#hud .pill.yellow { position: relative; }
.delta.same { background: var(--muted); }
.goals .secret.hold { color: #8A6A10; font-weight: 700; }
#hint .soft { color: #8A6A10; font-weight: 600; }
.list.gossip .li.head { color: var(--muted); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
/* Чужие новости — компактная наклейка у края, без вспышки */
.news-card.mini { top: 92px; left: auto; right: 24px; margin-left: 0; width: 300px; padding: 0 12px 10px; border-width: 3px; box-shadow: 0 6px 0 var(--ink); }
.news-card.mini .news-kicker { margin: 0 -12px 2px; font-size: 11px; padding: 5px 8px; }
.news-card.mini .news-scene, .news-card.mini .news-scene svg { height: 44px; }
.news-card.mini .news-who { font-size: 24px; }
.news-card.mini .news-phrase { font-size: 15px; padding: 2px 10px; }
.news-card.mini .news-line { font-size: 12.5px; margin-top: 6px; }

/* ------------------------------------------------------------ Финал: пьедестал */
.modal.final { width: 720px; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 14px; height: 280px; padding-top: 10px; }
.p-col { position: relative; width: 170px; display: flex; flex-direction: column; align-items: center; animation: p-rise .7s var(--spring) var(--d) both; }
@keyframes p-rise { from { transform: translateY(160px); opacity: 0; } }
.p-pawn svg { width: 56px; height: 74px; display: block; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .15)); }
.p-col.rank1 .p-pawn svg { width: 72px; height: 95px; animation: p-hop .6s ease-in-out calc(var(--d) + .8s) 3 alternate; }
@keyframes p-hop { to { transform: translateY(-14px); } }
.p-crown { position: absolute; top: -34px; font-size: 34px; animation: p-crown 1s var(--spring) calc(var(--d) + .9s) both; }
@keyframes p-crown { from { transform: translateY(-80px) rotate(-30deg); opacity: 0; } }
.p-name { margin: 4px 0 6px; padding: 2px 12px; background: #fff; border: 2.5px solid var(--ink); border-radius: 999px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-col.me .p-name { background: var(--yellow); }
.p-block { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding-top: 10px;
  background: var(--c); border: 3px solid var(--ink); border-bottom: 0; border-radius: 14px 14px 0 0; box-shadow: inset 0 -12px 0 rgba(0, 0, 0, .12); }
.p-col.rank1 .p-block { height: 130px; }
.p-col.rank2 .p-block { height: 95px; }
.p-col.rank3 .p-block { height: 70px; }
.p-rank { font: 800 34px/1 var(--display); color: #fff; -webkit-text-stroke: 2px var(--ink); }
.p-score { font: 800 20px var(--display); background: #fff; border: 2.5px solid var(--ink); border-radius: 10px; padding: 0 10px; }
.score-break { display: flex; flex-direction: column; gap: 8px; }
.sb-bar { display: flex; height: 22px; border: 2.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.sb-bar i { min-width: 6px; animation: sb-grow .8s ease-out 1.6s both; transform-origin: 0 50%; }
@keyframes sb-grow { from { transform: scaleX(0); } }
.sb-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; font-weight: 600; }
.sb-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sb-legend span i { width: 12px; height: 12px; border: 2px solid var(--ink); border-radius: 3px; }
.sb-days, .sb-legend .sb-days i { background: #74C0FC; }
.sb-goals, .sb-legend .sb-goals i { background: var(--yellow); }
.sb-common, .sb-legend .sb-common i { background: #8CE99A; }
.sb-secret, .sb-legend .sb-secret i { background: #B197FC; }
.sb-legend span.sb-days, .sb-legend span.sb-goals, .sb-legend span.sb-common, .sb-legend span.sb-secret { background: none; }
.secret-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { padding: 3px 10px; border: 2px solid var(--ink); border-radius: 999px; font-weight: 700; font-size: 13px; }
.badge.ok { background: #D9EFDF; color: #0F5A2E; transform: rotate(-1.5deg); }
.badge.fail { background: #EFE6D2; color: var(--muted); text-decoration: line-through; }
.final-more summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.final-more[open] summary { margin-bottom: 8px; }
.list .li.me { background: var(--yellow); margin: 0 -14px; padding: 8px 14px; }
.modal.final .confetti, .veil > .confetti { z-index: 0; }

/* Правки по визуальному ревью */
.news-who.long { font-size: 28px; }
.lights .neon { width: 170px !important; height: 110px !important; margin: -55px 0 0 -85px !important; opacity: .85; }
.lights .beam { width: 30px; margin-left: -15px; opacity: .45; }
.lead-row.me .ava svg { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 1.5px #fff); }
#chatlog.quiet::after { content: 'В подъезде пока тихо… Соседи ещё спят.'; align-self: center; margin: auto 0; color: var(--muted); font-weight: 600; font-size: 12.5px; text-align: center; }
.hunger-head { display: flex; align-items: center; gap: 10px; }
.hunger-head .ico { width: 40px; height: 40px; animation: wobble-x .3s ease-in-out infinite alternate; }
.modal .stamp { align-self: flex-start; padding: 4px 14px; background: var(--red-ink); color: #fff; border: 3px solid var(--ink); border-radius: 12px; font: 800 17px var(--display); transform: rotate(-2deg); }
svg#map .place.sel { filter: drop-shadow(0 0 3px #FFD21F); }

/* Картинка-наклейка действия: в правом нижнем углу карточки, слегка наклонена; при наведении подпрыгивает */
.card { position: relative; overflow: hidden; }
.card .card-art { position: absolute; right: 8px; bottom: 8px; width: 54px; height: 54px; transform: rotate(-6deg); filter: drop-shadow(0 2px 0 rgba(43, 35, 32, .25)); pointer-events: none; transition: transform .2s var(--spring); }
.card:hover:not(:disabled) .card-art { transform: rotate(4deg) scale(1.12) translateY(-3px); }
.card:disabled .card-art { filter: grayscale(1) opacity(.45); }
.card .fx { padding-right: 58px; }
.card .fx span { font-size: 13px; }
.card .fx .ico { width: 17px; height: 17px; }
.card .top, .card .road, .card .perk { position: relative; z-index: 1; }
.card .why { position: relative; z-index: 1; padding-right: 54px; }
.card .fx span { white-space: nowrap; }

/* Вечером стекло всех окон теплеет: от голубого днём к горящему жёлтому ночью */
svg#map { --glass1: color-mix(in srgb, #FFF4C2 calc(var(--dusk, 0) * 100%), #D9F4FF); --glass2: color-mix(in srgb, #FFD36B calc(var(--dusk, 0) * 100%), #7CC9EE); --glass3: color-mix(in srgb, #F2A33A calc(var(--dusk, 0) * 100%), #3E8FC7); }
.lights .glow { background: radial-gradient(closest-side, rgba(255, 214, 120, .55), rgba(255, 190, 90, .18) 60%, rgba(255, 180, 70, 0)); }

/* Выключатель звука в шапке */
#hud .pill.sound { width: 44px; padding: 0; justify-content: center; font-size: 18px; cursor: pointer; }
#hud .pill.sound:hover { transform: translateY(-2px); }

/* Время наглядно: шкала поделена на часы; при наведении съеденный кусок — дорога штриховкой, дело заливкой */
.meter.m-time .bar::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 16 - 1.5px), rgba(43, 35, 32, .35) calc(100% / 16 - 1.5px) calc(100% / 16)); }
.bar u.split { opacity: 1; animation: none;
  background: linear-gradient(rgba(43, 35, 32, .55), rgba(43, 35, 32, .55)) left / var(--work, 0%) 100% no-repeat,
    repeating-linear-gradient(-45deg, #fff 0 3px, rgba(255, 255, 255, .25) 3px 6px); }
.delta.wide { white-space: nowrap; font-size: 12px; }
.hover-tag, .route-tag { position: absolute; transform: translateX(-50%); padding: 2px 10px; background: var(--ink); color: #fff; border-radius: 999px;
  font-weight: 700; font-size: 12.5px; white-space: nowrap; pointer-events: none; z-index: 9; }
.hover-tag { opacity: 0; transition: opacity .12s ease, transform .18s var(--spring); transform: translate(-50%, 6px); }
.hover-tag.show { opacity: 1; transform: translate(-50%, 0); }
.route-tag { background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); }

/* Обучение: мягкий круг света вместо рамки, цель светится и пульсирует */
.tour-spot.soft { border-radius: 0; box-shadow: none; transition: background .35s ease; }
svg#map .place.tour-glow { animation: tour-glow 1.1s ease-in-out infinite alternate; }
@keyframes tour-glow { from { filter: drop-shadow(0 0 4px #FFE766) drop-shadow(0 0 2px #FFD21F); } to { filter: drop-shadow(0 0 14px #FFE766) drop-shadow(0 0 6px #FFD21F) brightness(1.08); } }
.chip.tour-glow { animation: chip-glow 1.1s ease-in-out infinite alternate; }
@keyframes chip-glow { to { box-shadow: 0 2px 0 var(--ink), 0 0 0 5px rgba(255, 210, 31, .85), 0 0 18px 6px rgba(255, 210, 31, .6); } }

/* Цели: строка-сводка, полный список — всплывашкой справа от колонки */
#side .goals { position: relative; padding: 8px 10px; overflow: visible; }
.goals-sum { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; cursor: default; outline: none; }
.goals-sum b { font-family: var(--display); font-size: 12px; margin-right: 2px; }
.gs-chip { padding: 1px 8px; border: 2px solid var(--ink); border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #fff; }
.gs-chip.ok { background: #D9EFDF; }
.gs-chip.secret { background: #EDE5FF; }
.gs-more { margin-left: auto; font-style: normal; font-weight: 800; transition: transform .2s ease; }
.goals-full { position: absolute; left: calc(100% + 10px); bottom: 0; width: 300px; padding: 10px 12px; background: #FFF3A8; font-size: 12.5px;
  opacity: 0; transform: translateX(-8px); pointer-events: none; transition: opacity .15s ease, transform .2s var(--spring); z-index: 12; }
#side .goals:hover .goals-full, #side .goals:focus-within .goals-full { opacity: 1; transform: none; pointer-events: auto; }
#side .goals:hover .gs-more, #side .goals:focus-within .gs-more { transform: rotate(90deg); }
.goals-full h2 { margin: 0 0 6px; font-family: var(--display); font-size: 12px; }

/* «Готов»: что спишут вечером — всплывашкой при наведении, а не постоянной подсказкой */
#ready { position: absolute; }
.ready-info { position: absolute; right: 0; bottom: calc(100% + 12px); width: 300px; padding: 8px 12px; color: var(--ink); text-align: left;
  font: 600 13px/1.35 'Golos Text', system-ui, sans-serif; opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .15s ease, transform .2s var(--spring); }
#ready:hover .ready-info, #ready:focus-visible .ready-info { opacity: 1; transform: none; }

/* Деньги — только иконки и суммы */
.pill.money { gap: 6px; }
.pill.money .cash-part, .pill.money .card-part { display: inline-flex; align-items: center; gap: 5px; cursor: help; }

/* Время — главный ресурс: шире, крупнее, с часовыми ячейками */
.meter.m-time { width: 250px; height: 48px; gap: 4px; }
.meter.m-time .row { align-items: center; }
.meter.m-time .lbl .ico { width: 22px; height: 22px; }
.meter.m-time .tval { display: inline-flex; align-items: baseline; gap: 4px; }
.meter.m-time .tval b { font-size: 16px; }
.meter.m-time .tval .muted { font-size: 11px; font-weight: 700; }
.meter.m-time .bar { height: 12px; border-width: 2px; border-radius: 6px; }
.meter.m-time .bar::after { background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 16 - 2px), var(--cream) calc(100% / 16 - 2px) calc(100% / 16)); }
.meter.m-time .bar i { background: linear-gradient(180deg, #74C0FC, #3D7BE0) !important; }
.meter.m-time .bar s { position: absolute; top: 0; height: 100%; background: #E5484D; opacity: 0; pointer-events: none; transform-origin: 50% 0; }

/* ------------------------------------------------------------ Событие дня на карте */
.event-layer { position: absolute; inset: 0; pointer-events: none; }
.ev { position: absolute; transform: translate(-50%, -50%); pointer-events: none; will-change: transform; }
/* Ливень */
.ev-rain { position: absolute; inset: -40px; pointer-events: none; opacity: .55;
  background: repeating-linear-gradient(105deg, transparent 0 22px, rgba(220, 235, 255, .55) 22px 23.5px, transparent 23.5px 46px);
  background-size: 92px 92px; animation: rain-fall .45s linear infinite; }
@keyframes rain-fall { to { transform: translate(-12px, 46px); } }
.puddle { width: 70px; height: 20px; border-radius: 50%; background: radial-gradient(closest-side, rgba(120, 180, 230, .75), rgba(120, 180, 230, .35) 70%, transparent); animation: puddle 1.4s ease-in-out infinite alternate; }
@keyframes puddle { to { transform: translate(-50%, -50%) scale(1.15, 1.1); } }
/* Пробка */
.jam-car { width: 34px; height: 17px; box-shadow: inset -9px 0 0 rgba(255, 255, 255, .45); border: 2px solid var(--ink); border-radius: 4px; transform: translate(-50%, -50%) rotate(30deg); animation: jam-nudge 2.2s ease-in-out infinite; }
.jam-car .brake { position: absolute; left: -4px; top: 1px; width: 5px; height: 9px; background: #FF3B30; border-radius: 2px; box-shadow: 0 0 8px 3px rgba(255, 59, 48, .8); animation: news-blink .8s steps(2) infinite; }
@keyframes jam-nudge { 50% { transform: translate(calc(-50% + 3px), calc(-50% + 2px)) rotate(30deg); } }
.ev-sign { padding: 3px 10px; background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 8px; box-shadow: 0 3px 0 var(--ink); font: 800 13px var(--display); transform: translate(-50%, -50%) rotate(-4deg); animation: sign-sway .9s ease-in-out infinite alternate; }
@keyframes sign-sway { to { transform: translate(-50%, -50%) rotate(4deg); } }
.ev-sign.small { font-size: 11px; background: #fff; }
/* Распродажа */
.ev-banner { display: flex; flex-direction: column; align-items: center; padding: 4px 12px; background: var(--red); color: #fff; border: 3px solid var(--ink); border-radius: 10px; box-shadow: 0 4px 0 var(--ink);
  transform-origin: 50% -20px; animation: banner-swing 1.6s ease-in-out infinite alternate; }
.ev-banner b { font: 800 20px var(--display); line-height: 1; }
.ev-banner span { font-weight: 700; font-size: 11px; }
@keyframes banner-swing { from { transform: translate(-50%, -50%) rotate(-6deg); } to { transform: translate(-50%, -50%) rotate(6deg); } }
/* Опрессовка: пар из Хрущёвки */
.ev-steam i { position: absolute; width: 26px; height: 26px; border-radius: 50%; background: #E9EEF2; border: 2px solid rgba(43, 35, 32, .35); animation: steam 2.4s ease-out infinite; }
.ev-steam i:nth-child(2) { left: 14px; animation-delay: -.8s; }
.ev-steam i:nth-child(3) { left: -12px; animation-delay: -1.6s; }
@keyframes steam { from { transform: translateY(0) scale(.5); opacity: .9; } to { transform: translateY(-60px) scale(1.6); opacity: 0; } }
/* Щипачи: тени шныряют у ТЦ, рынка, бара и клуба */
.ev-thief i { display: block; width: 20px; height: 32px; border-radius: 10px 10px 4px 4px; background: radial-gradient(circle at 35% 28%, #fff 0 2px, transparent 2.5px), radial-gradient(circle at 65% 28%, #fff 0 2px, transparent 2.5px), rgba(20, 20, 30, .82); box-shadow: 10px 2px 0 -2px rgba(20, 20, 30, .6); animation: sneak 2.8s ease-in-out infinite; }
@keyframes sneak { 0%, 100% { transform: translateX(-22px); } 46% { transform: translateX(22px); } 50%, 96% { transform: translateX(22px) scaleX(-1); } 98% { transform: translateX(-22px) scaleX(-1); } }
/* Магнитные бури: сияние по небу */
.ev-aurora { position: absolute; left: -10%; right: -10%; top: 0; height: 170px; pointer-events: none; opacity: .55; mix-blend-mode: screen;
  background: linear-gradient(100deg, transparent 10%, rgba(120, 255, 200, .7) 25%, transparent 40%, rgba(180, 130, 255, .6) 55%, transparent 70%, rgba(120, 200, 255, .6) 85%, transparent);
  filter: blur(10px); animation: aurora 6s ease-in-out infinite alternate; }
@keyframes aurora { to { transform: translateX(8%) skewX(-10deg); } }
/* Грипп: зелёные микробы летают по спальнику */
.ev-germ { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #B2F2BB, #2F9E44); border: 2px solid #1B5E20; animation: germ 3s ease-in-out infinite; }
.ev-germ::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px dotted #2F9E44; }
@keyframes germ { 50% { transform: translate(-50%, -50%) translate(14px, -18px) rotate(120deg); } }
/* Премия: монеты над местами работы */
.ev-coins i { position: absolute; width: 20px; height: 20px; margin: -10px; display: grid; place-items: center; font: 800 11px var(--display); color: #8A6A10; font-style: normal; border-radius: 50%; background: #FFD43B; border: 2px solid #8A6A10; animation: coin-up 1.6s ease-out infinite; }
.ev-coins i:nth-child(2) { left: 14px; animation-delay: -.5s; }
.ev-coins i:nth-child(3) { left: -14px; animation-delay: -1s; }
@keyframes coin-up { from { transform: translateY(10px) scaleX(1); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(-40px) scaleX(-1); opacity: 0; } }

@media (prefers-reduced-motion: reduce) { .event-layer .ev, .event-layer .ev *, .ev-rain, .ev-aurora { animation: none !important; } }

/* ------------------------------------------------------------ Аватары с настроением */
.ava { display: inline-block; width: var(--s, 22px); height: var(--s, 22px); flex: none; vertical-align: middle; }
.ava svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ava.pop { animation: ava-pop .5s var(--spring); }
@keyframes ava-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35) rotate(-8deg); } 100% { transform: scale(1); } }
.ava[data-mood="sad"] .tear { animation: ava-tear 1.8s ease-in infinite; }
@keyframes ava-tear { 0%, 40% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(6px); opacity: 0; } }
.ava[data-mood="sick"] svg { animation: ava-woozy 2.4s ease-in-out infinite; }
@keyframes ava-woozy { 50% { transform: rotate(-7deg); } }
.ava[data-mood="sleep"] svg { opacity: .8; }
.table td .ava { margin-right: 8px; vertical-align: -6px; }
.news-who .ava { margin-right: 10px; vertical-align: -6px; animation: ava-pop .6s var(--spring) .3s both; }
@media (prefers-reduced-motion: reduce) { .ava, .ava svg, .ava .tear { animation: none !important; } }

/* ------------------------------------------------------------ Сценки над зданиями */
.scene-layer { position: absolute; inset: 0; pointer-events: none; }
.act-scene { position: absolute; width: 0; height: 0; animation: scene-in .5s var(--spring) both; }
@keyframes scene-in { from { opacity: 0; transform: scale(.3); } }
.act-scene i { position: absolute; left: 0; top: 0; display: grid; place-items: center; font-style: normal; font-weight: 800; line-height: 1; white-space: nowrap;
  animation: scene-rise 2.4s ease-out infinite; animation-delay: calc(var(--i) * -.8s); opacity: 0; }
.act-scene i svg { width: 100%; height: 100%; display: block; }
@keyframes scene-rise { 0% { opacity: 0; transform: translate(-50%, 0) scale(.6); } 20% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 8px)), -46px) scale(1.15); } }
.act-scene i:nth-child(2) { --dx: -12px; }
.act-scene i:nth-child(3) { --dx: 16px; }
.act-scene i:nth-child(4) { --dx: -4px; }
.act-scene.zzz i { font: 800 16px var(--display); color: #fff; -webkit-text-stroke: 1.2px var(--ink); paint-order: stroke; animation-duration: 3s; animation-delay: calc(var(--i) * -1s); }
.act-scene.code i { padding: 1px 4px; border-radius: 4px; background: #1E2A22; color: #8CE99A; font: 700 10px ui-monospace, Consolas, monospace; border: 1.5px solid var(--ink); }
.act-scene.lift i { width: 34px; height: 22px; opacity: 1; animation: scene-lift 1.1s ease-in-out infinite; }
@keyframes scene-lift { 0%, 100% { transform: translate(-50%, 4px); } 50% { transform: translate(-50%, -12px); } }
.act-scene.foam i { width: 12px; height: 12px; border-radius: 50%; background: #FFF9DB; border: 1.5px solid var(--ink); animation-duration: 1.8s; animation-delay: calc(var(--i) * -.45s); }
.act-scene.music i { width: 18px; height: 18px; animation-name: scene-dance; }
@keyframes scene-dance { 0% { opacity: 0; transform: translate(-50%, 0) rotate(-15deg); } 20% { opacity: 1; }
  50% { transform: translate(calc(-50% + var(--dx, 8px)), -24px) rotate(15deg); } 100% { opacity: 0; transform: translate(-50%, -48px) rotate(-10deg); } }
.act-scene.smoke i { width: 16px; height: 16px; border-radius: 50%; border: 3px solid rgba(233, 236, 239, .95); box-shadow: 0 0 0 1px rgba(43, 35, 32, .25); animation-duration: 3s; animation-delay: calc(var(--i) * -1s); }
.act-scene.steam i { width: 18px; height: 18px; border-radius: 50%; background: #F1F3F5; border: 1.5px solid rgba(43, 35, 32, .35); animation-duration: 2s; animation-delay: calc(var(--i) * -.66s); }
.act-scene.coins i { width: 18px; height: 18px; border-radius: 50%; background: #FFD43B; border: 2px solid #8A6A10; color: #8A6A10; font: 800 10px var(--display); }
.act-scene.heal i { width: 16px; height: 16px; }
.act-scene.study i { padding: 0 4px; border-radius: 4px; background: #fff; border: 1.5px solid var(--ink); color: var(--blue); font: 800 11px var(--display); }
.act-scene.movie i { color: #FFD21F; font-size: 18px; -webkit-text-stroke: 1px var(--ink); paint-order: stroke; }
.act-scene.shop i { width: 18px; height: 18px; animation-duration: 2s; animation-delay: calc(var(--i) * -1s); }
@media (prefers-reduced-motion: reduce) { .act-scene, .act-scene i { animation: none !important; opacity: 1; transform: translate(-50%, -20px); } }

/* ------------------------------------------------------------ Полные сутки */
.sky-dawn, .sky-golden { position: absolute; inset: 0; pointer-events: none; transition: opacity 1.6s ease; }
.sky-dawn { background: linear-gradient(180deg, rgba(255, 140, 180, .55), rgba(255, 196, 170, .28) 45%, rgba(255, 220, 200, 0) 80%); opacity: calc(var(--dawn, 0) * .55); }
.sky-golden { background: linear-gradient(170deg, rgba(255, 190, 80, .42), rgba(255, 150, 70, .2) 60%, rgba(255, 120, 60, .12)); opacity: calc(var(--golden, 0) * .6); }
/* Огни: слой виден с первых сумерек, а каждое окно и фонарь загорается на своём пороге — волной. */
.lights { opacity: 1; }
.lights i { opacity: clamp(0, calc((var(--dusk, 0) - var(--on, 0)) * 5), 1); transition: opacity .9s ease; }
@keyframes twinkle { from { transform: scale(.35); } }
svg#map .headlight { fill: rgba(255, 238, 160, .55); opacity: calc(var(--dusk, 0) * 1.2 - .2); transition: opacity 1.4s ease; }
.lights .neon { opacity: calc(clamp(0, calc((var(--dusk, 0) - var(--on, 0)) * 5), 1) * .85); }
.lights .beam { opacity: calc(clamp(0, calc((var(--dusk, 0) - var(--on, 0)) * 5), 1) * .45); }

/* ------------------------------------------------------------ Вечерняя сводка: «Газета подъезда» */
.modal.paper { --m: 9px; width: 700px; max-height: 790px; padding: 26px 30px 34px; border: 0; border-radius: 4px; gap: 10px;
  background: repeating-linear-gradient(0deg, rgba(43, 35, 32, .035) 0 1px, transparent 1px 22px), #FBF4E2;
  box-shadow: none; transform: rotate(-.6deg);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--m)) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--m)) 100%;
  animation: paper-in .6s var(--spring) both; }
@keyframes paper-in { from { opacity: 0; transform: translateY(-60px) rotate(-6deg) scale(.9); } }
.modal.paper .masthead { text-align: center; border-bottom: 4px double var(--ink); padding-bottom: 6px; }
.modal.paper .mh-title { font: 800 34px/1 var(--display); text-transform: uppercase; letter-spacing: .06em; }
.modal.paper .mh-line { display: flex; justify-content: space-between; margin-top: 6px; padding-top: 4px; border-top: 1.5px solid var(--ink);
  font: italic 600 12px Georgia, 'Times New Roman', serif; color: var(--muted); }
.modal.paper h1 { font-size: 30px; text-align: center; }
.modal.paper .sub { text-align: center; font: italic 600 14px Georgia, 'Times New Roman', serif; margin-top: -4px; }
.modal.paper .paper-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; align-items: start; }
.modal.paper .paper-cols.one { grid-template-columns: 1fr; }
.modal.paper .list { background: transparent; border: 0; border-radius: 0; padding: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 14.5px; }
.modal.paper .list .li { border-bottom: 1px dashed rgba(43, 35, 32, .3); padding: 6px 0; }
.modal.paper .list.gossip { border-left: 1.5px solid var(--ink); padding-left: 14px; }
.modal.paper .list.gossip .li { justify-content: flex-start; align-items: center; gap: 8px; }
.modal.paper .list.gossip .li.head { font-family: var(--display); }
.modal.paper .table { font-family: Georgia, 'Times New Roman', serif; border-top: 4px double var(--ink); }
.modal.paper .table td.total { font-family: var(--display); }
.modal.paper .tack { position: absolute; top: 10px; width: 20px; height: 20px; border-radius: 50%; z-index: 2;
  background: radial-gradient(circle at 35% 35%, #FF8A8A, #E5484D 55%, #A31621); box-shadow: 1px 3px 0 rgba(0, 0, 0, .3); border: 1.5px solid var(--ink); }
.modal.paper .tack.l { left: 14px; } .modal.paper .tack.r { right: 14px; background: radial-gradient(circle at 35% 35%, #8AB8FF, #3D7BE0 55%, #1D4FA3); }
.modal.paper .paper-head { display: flex; align-items: center; justify-content: center; gap: 18px; }
.modal.paper .paper-stamp { flex: none; padding: 2px 12px; border: 3.5px solid #C9353B; border-radius: 6px; color: #C9353B;
  font: 800 22px var(--display); text-transform: uppercase; letter-spacing: .08em; transform: rotate(12deg); opacity: .85; mix-blend-mode: multiply;
  animation: stamp-hit .45s cubic-bezier(.2, 1.6, .4, 1) .55s both; }
@keyframes stamp-hit { from { opacity: 0; transform: rotate(12deg) scale(2.4); } }
@media (prefers-reduced-motion: reduce) { .modal.paper, .modal.paper .paper-stamp { animation: none; } }

/* ------------------------------------------------------------ Чат: аватары и компактные строки */
#chatlog { gap: 3px; }
.mrow { display: flex; align-items: flex-end; gap: 5px; max-width: 100%; }
.mrow:not(.cont) { margin-top: 3px; }
.mrow.me { justify-content: flex-end; }
.mrow .ava-gap { width: 22px; flex: none; }
.mrow .msg { align-self: auto; min-width: 0; padding: 2px 8px; }
.mrow .msg .who { display: block; font-size: 11px; line-height: 1.2; }
.mrow.cont .msg { border-top-left-radius: 4px; }
.mrow.me.cont .msg { border-top-right-radius: 4px; border-top-left-radius: 11px; }
.mrow .msg.sys { text-align: left; border-radius: 4px 11px 11px 11px; padding: 2px 8px; }
.mrow.me .msg.sys { border-radius: 11px 4px 11px 11px; }

/* Вышла новая версия клиента (во время партии) */
.update-toast { position: fixed; left: 50%; bottom: 18px; z-index: 1000; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px;
  transform: translateX(-50%); font-weight: 700; animation: update-in .42s var(--spring) both; }
@keyframes update-in { from { opacity: 0; transform: translate(-50%, 40px); } }
.update-toast .big { height: 40px; padding: 0 16px; font-size: 14px; }
.update-toast .ghost { height: 40px; width: 40px; padding: 0; }

/* Здоровье и Кайф без подписей: крупная иконка слева, шкала и число справа */
.meter.iconic { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 8px; width: 160px; padding: 0 10px 0 7px; }
.meter.iconic .big-ico { display: grid; place-items: center; width: 32px; height: 32px; }
.meter.iconic .big-ico .ico { width: 30px; height: 30px; filter: drop-shadow(0 2px 0 rgba(43, 35, 32, .25)); transition: transform .25s var(--spring); }
.meter.iconic:hover .big-ico .ico, .meter.iconic.up .big-ico .ico { transform: scale(1.15) rotate(-6deg); }
.meter.iconic.low .big-ico .ico { animation: ico-pulse .9s ease-in-out infinite alternate; }
@keyframes ico-pulse { to { transform: scale(1.18); } }
.meter.iconic .bar { height: 10px; }
.meter.iconic > b { min-width: 24px; text-align: right; font: 800 15px var(--display); font-variant-numeric: tabular-nums; }
.meter.m-time .lbl .ico { width: 30px; height: 30px; }
@media (prefers-reduced-motion: reduce) { .meter.iconic .big-ico .ico { animation: none; transition: none; } }

/* ------------------------------------------------------------ Вечерний подсчёт: шкалы перетекают в очки */
.tally { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px 10px; background: #fff; border: 2px solid var(--ink); border-radius: 10px; }
.tl-head { display: flex; justify-content: space-between; align-items: baseline; font: 700 12px var(--display); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tl-total { font: 800 18px var(--display); color: var(--green-ink); text-transform: none; letter-spacing: 0; }
.tl-row { display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; gap: 8px; }
.tl-ico .ico { width: 26px; height: 26px; }
.tl-v { font: 800 14px var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.tl-cells { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.tl-cells i { position: relative; height: 16px; border: 1.5px solid var(--ink); border-radius: 4px; background: linear-gradient(90deg, var(--c) var(--part, 0%), var(--track) 0); }
.tl-health { --c: #FF8787; } .tl-kaif { --c: #B197FC; }
.tl-cells i.on { background: var(--c); animation: tl-pop .35s var(--spring) var(--d) both; }
.tl-cells i.on::after { content: '+1'; position: absolute; left: 50%; top: -4px; font: 800 12px var(--display); color: var(--green-ink); opacity: 0; pointer-events: none;
  animation: tl-fly .7s ease-out var(--d) both; }
@keyframes tl-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); background: #FFD43B; } 100% { transform: scale(1); } }
@keyframes tl-fly { 0% { opacity: 0; transform: translate(-50%, 0); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -26px) scale(1.3); } }
@media (prefers-reduced-motion: reduce) { .tl-cells i.on, .tl-cells i.on::after { animation: none; } }

/* Вход в партию: ждём карту, чтобы сборка города не началась с уже стоящих домов */
#stage.intro-wait > *:not(.clouds) { opacity: 0; }

/* ------------------------------------------------------------ Партия на одном устройстве */
/* Заслонка непрозрачная и появляется сразу: за ней деньги и тайные цели предыдущего игрока. */
.handoff { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px;
  background: #2E2350 repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 22px, transparent 22px 44px); }
.handoff-card { width: min(460px, 100%); padding: 22px 24px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  border-width: var(--line); border-radius: var(--r-card); box-shadow: var(--lift-card); animation: pop-in .42s var(--spring) both; }
.handoff-kicker { background: var(--ink); color: #fff; border-radius: 999px; padding: 3px 12px; font: 600 11px var(--display); }
.handoff-ava .ava { animation: p-hop .6s ease-in-out .3s 3 alternate; }
.handoff-label { font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.handoff-card h1 { margin: 0; font: 800 34px/1.1 var(--display); overflow-wrap: anywhere; }
.handoff-card p { margin: 0 0 8px; color: var(--muted); font-weight: 600; }
.handoff-card .big { align-self: stretch; padding: 0 14px; }
#hud .pill.who-pill { gap: 6px; padding: 0 12px 0 8px; background: #fff; max-width: 190px; }
#hud .pill.who-pill b { font-family: var(--display); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.final-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.final-tabs .ghost { height: 40px; padding: 0 14px; border-bottom-width: 6px; border-bottom-color: var(--c); }
.final-tabs .ghost[aria-selected="true"] { background: var(--yellow); }
.final-own { display: flex; flex-direction: column; gap: 10px; }
