:root {
  color-scheme: dark;
  --bg: #0d1522; --panel: #142033f2; --panel2: #1c2b40; --line: #2f4259;
  --text: #eef5ff; --muted: #9fb0c5; --accent: #5fd8b0; --warn: #ffbe68; --red: #ff7d88; --blue: #7bb6ff;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
  font: 15px/1.4 -apple-system, system-ui, "Segoe UI", sans-serif; overscroll-behavior: none; }
canvas#map { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; touch-action: none; display: block; }
.hidden { display: none !important; }
button { font: inherit; color: var(--text); background: #2a4559; border: 1px solid #47667a; border-radius: 12px;
  padding: 10px 14px; font-weight: 650; cursor: pointer; }
button:active { transform: scale(.97); }
button:disabled { opacity: .45; }
button.primary { background: #1f7d6a; border-color: #45bda0; }
button.warn { background: #6b5124; border-color: #c28d3c; }
button.danger { background: #683f48; border-color: #b15b66; }
button.big { width: 100%; padding: 14px; font-size: 16px; }
button.small { padding: 7px 10px; font-size: 13px; border-radius: 10px; }

#hud { position: fixed; left: 0; right: 0; top: 0; padding: calc(var(--safe-t) + 8px) calc(var(--safe-r) + 10px) 0 calc(var(--safe-l) + 10px); pointer-events: none; z-index: 5; }
.hud-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.chip { pointer-events: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 11px; font-weight: 700; font-size: 14px; white-space: nowrap; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.me-chip { display: flex; gap: 6px; align-items: center; max-width: 44vw; overflow: hidden; }
.me-chip span:last-child { overflow: hidden; text-overflow: ellipsis; }
.money { color: #b9f5e2; }
.clock { margin-left: auto; font-variant-numeric: tabular-nums; }
.needs { gap: 8px; }
.need { pointer-events: auto; display: flex; align-items: center; gap: 4px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 8px; font-size: 13px; }
.need b { display: block; width: 42px; height: 6px; background: #314257; border-radius: 9px; overflow: hidden; }
.need i { display: block; height: 100%; background: var(--accent); width: 100%; transition: width .4s; }
.need i.low { background: var(--warn); } .need i.crit { background: var(--red); }
.need[data-v]:not([data-v=""]) b { width: 24px; }
.need[data-v]:not([data-v=""])::after { content: attr(data-v); font-size: 11px; font-weight: 750; color: var(--warn); }
.need.wide { display: block; padding: 6px 8px; margin: 4px 0 6px; } .need.wide b { width: 100%; height: 8px; }
.need.alarm { border-color: var(--red); animation: alarm 1.2s ease-in-out infinite; } .need.alarm::after { color: var(--red) !important; }
@keyframes alarm { 50% { box-shadow: 0 0 0 3px #ff7d8855; } }
@media (prefers-reduced-motion: reduce) { .need.alarm { animation: none; } }
.status.good { color: var(--accent); border-color: #2e6b5a; }
.away { display: grid; gap: 6px; margin: 8px 0 12px; }
.away-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.away-row .plus { color: var(--accent); } .away-row .minus { color: var(--red); }
.status { margin-left: auto; font-size: 12px; font-weight: 650; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status.auto { color: var(--warn); border-color: #7a5d2c; } .status.bad { color: var(--red); border-color: #7a3640; }

#dock { position: fixed; right: calc(var(--safe-r) + 10px); bottom: calc(var(--safe-b) + 30px); display: flex; flex-direction: column; gap: 8px; z-index: 6; }
#dock button { width: 46px; height: 46px; border-radius: 16px; font-size: 22px; padding: 0; background: var(--panel);
  border-color: var(--line); position: relative; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#quick { position: fixed; left: calc(var(--safe-l) + 10px); bottom: calc(var(--safe-b) + 30px); display: flex; flex-direction: column; gap: 8px; z-index: 6; }
.qbtn { width: 46px; height: 46px; padding: 0; border-radius: 16px; font-size: 22px; background: var(--panel);
  border-color: var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.qbtn.hot { border-color: #e8b45a; box-shadow: 0 0 0 2px #e8b45a55; }
.navform { display: flex; gap: 8px; margin: 8px 0; }
.navform input { flex: 1; min-width: 0; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.chipbtn { padding: 7px 11px; border-radius: 999px; font-size: 14px; font-weight: 650; }
.chipbtn.on { border-color: var(--accent, #7bb6ff); background: #7bb6ff22; }
.navrow { padding: 10px 0; border-top: 1px solid var(--line); }
.navrow .t { font-weight: 750; } .navrow .s { color: var(--muted); font-size: 13px; margin: 2px 0 6px; }
.navrow .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.ver { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 4px); z-index: 6;
  padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 650; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line); white-space: nowrap; }
.ver.new { color: var(--accent); border-color: var(--accent); }
.news li { margin: 6px 0; line-height: 1.4; }
/* телефон боком: кнопки — в ряд внизу, чтобы не залезать на часы и деньги */
@media (orientation: landscape) and (max-height: 520px) {
  #dock, #quick { flex-direction: row; bottom: calc(var(--safe-b) + 8px); }
  #dock button, .qbtn { width: 42px; height: 42px; font-size: 20px; }
  .ver { left: calc(var(--safe-l) + 10px); transform: none; bottom: calc(var(--safe-b) + 58px); }
}
.badge { position: absolute; top: -5px; right: -5px; background: var(--red); color: #fff; border-radius: 999px; font-size: 11px;
  min-width: 19px; height: 19px; line-height: 19px; padding: 0 5px; font-weight: 800; }

.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 62vh; max-height: 62dvh; overflow-y: auto; z-index: 8;
  background: var(--panel); border-top: 1px solid var(--line); border-radius: 22px 22px 0 0;
  padding: 10px 16px calc(var(--safe-b) + 18px); box-shadow: 0 -10px 30px #0008; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  -webkit-overflow-scrolling: touch; }
@media (min-width: 760px) { .sheet { left: auto; right: 74px; bottom: 14px; width: 420px; border-radius: 20px; border: 1px solid var(--line); max-height: 80vh; } }
.grab { width: 40px; height: 5px; background: #4a5d74; border-radius: 9px; margin: 0 auto 8px; }
.close { position: absolute; right: 10px; top: 8px; background: transparent; border: none; font-size: 18px; color: var(--muted); padding: 6px 10px; }
.sheet h2 { margin: 2px 34px 2px 0; font-size: 19px; }
.sheet h3 { margin: 16px 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sub { color: var(--muted); font-size: 13px; margin: 2px 0 8px; }
.row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #ffffff10; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 650; } .row .s { color: var(--muted); font-size: 12px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.btns button { flex: 1 1 auto; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.kv div { background: #0b1624; border: 1px solid #293e53; border-radius: 12px; padding: 9px 10px; }
.kv small { display: block; color: var(--muted); font-size: 11px; } .kv strong { font-size: 15px; }
.pill { display: inline-block; font-size: 11px; border-radius: 999px; padding: 2px 8px; border: 1px solid var(--line); color: var(--muted); }
.pill.ok { color: var(--accent); border-color: #2e6b5a; } .pill.no { color: var(--red); border-color: #7a3640; }
.event { border-left: 3px solid #4c8d93; margin: 0 0 10px; padding: 2px 0 4px 11px; }
.event.warn { border-color: var(--warn); } .event.danger { border-color: var(--red); } .event.good { border-color: var(--accent); }
.event b { font-size: 13px; } .event p { margin: 3px 0 0; color: #c2cedc; font-size: 13px; }
.event .when { color: var(--muted); font-size: 11px; margin-left: 4px; font-weight: 400; }
.notice { background: #2a2416; border: 1px solid #6b5124; color: #ffd9a1; border-radius: 12px; padding: 10px; font-size: 13px; margin: 8px 0; }
.notice.red { background: #2c1a1e; border-color: #7a3640; color: #ffc1c7; }
.empty { color: var(--muted); font-size: 13px; padding: 8px 0; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--safe-t) + 92px); z-index: 20; max-width: 90vw;
  background: #1d2c40; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 14px; box-shadow: 0 8px 20px #0007; }
.toast.err { border-color: #b15b66; background: #3a2028; }

.overlay { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(circle at 70% 0%, #213b52 0%, #090f1bf2 60%); overflow-y: auto; }
.card { background: linear-gradient(145deg, #19293b, #101a29); border: 1px solid var(--line); border-radius: 20px; padding: 20px; width: 100%; max-width: 380px; }
.brand { font-weight: 900; letter-spacing: .12em; font-size: 22px; } .brand b { color: var(--accent); }
.tabs { display: flex; gap: 6px; margin: 12px 0; }
.tab { flex: 1; background: #0b1624; } .tab.active { background: #2a4559; border-color: var(--accent); }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 0; }
input { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 16px; color: var(--text); background: #0b1624;
  border: 1px solid #34506a; border-radius: 10px; padding: 11px 12px; }
.emoji-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.emoji-pick button { font-size: 22px; padding: 6px 8px; background: #0b1624; }
.emoji-pick button.sel { border-color: var(--accent); background: #1d3a3a; }
.err { color: var(--red); min-height: 1em; font-size: 13px; }
.fine { color: #7d91a6; font-size: 11px; }
.auth-card .big { margin-top: 16px; }

/* ---------- interiors ---------- */
#interior { position: fixed; inset: 0; z-index: 12; background: #111; }
#roomCanvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: manipulation; }
.roomhead { position: absolute; left: 0; right: 0; top: 0; display: flex; gap: 8px; align-items: center; padding: calc(var(--safe-t) + 8px) 10px 0; }
.roomhead .chip { pointer-events: auto; background: rgba(20,24,32,.82); color: #fff; }
.roomtitle { display: flex; flex-direction: column; color: #fff; text-shadow: 0 1px 3px #000a; font-size: 12px; min-width: 0; }
.roomtitle b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roomhint { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 18px); background: rgba(20,24,32,.72); color: #fff; font-size: 12px;
  padding: 6px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap; }
.dlg { position: absolute; left: 0; right: 0; bottom: 0; max-height: 46%; overflow-y: auto; background: #fbf8f2; color: #2b2118;
  border-radius: 20px 20px 0 0; padding: 12px 16px calc(var(--safe-b) + 14px); box-shadow: 0 -10px 30px #0006; }
@media (min-width: 760px) { .dlg { left: 50%; transform: translateX(-50%); width: 560px; bottom: 16px; border-radius: 20px; } }
.dlghead { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.dlghead canvas { width: 48px; height: 48px; border-radius: 50%; flex: none; }
.dlghead b { display: block; font-size: 16px; } .dlghead span { font-size: 12px; color: #6b5b4b; }
.dlgtext { font-size: 15px; line-height: 1.45; min-height: 40px; }
.dlgopts { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.dlgopts button { background: #efe6d8; border: 1px solid #d8cbb6; color: #2b2118; text-align: left; }
.dlgopts button.primary { background: #b44a24; border-color: #b44a24; color: #fff; }
.ipanel .row { border-bottom: 1px solid #0001; } .ipanel .s { color: #6b5b4b; } .ipanel .empty { color: #6b5b4b; }
.ipanel button.primary { background: #b44a24; border-color: #b44a24; color: #fff; }
#doors { position: fixed; inset: 0; z-index: 14; pointer-events: none; }
#doors .door { position: absolute; top: 0; bottom: 0; width: 50%; background: var(--door, #333);
  background-image: linear-gradient(90deg, #0002 0 2px, transparent 2px), linear-gradient(#fff2, #0003);
  transition: transform .75s cubic-bezier(.6,.05,.3,1); }
#doors .door.l { left: 0; box-shadow: inset -6px 0 12px #0005; } #doors .door.r { right: 0; box-shadow: inset 6px 0 12px #0005; }
#doors .door::after { content: ""; position: absolute; top: 48%; width: 10px; height: 46px; border-radius: 5px; background: #e6c76a; }
#doors .door.l::after { right: 14px; } #doors .door.r::after { left: 14px; }
#doors.open .door.l { transform: translateX(-100%); } #doors.open .door.r { transform: translateX(100%); }

/* shift mini-games */
#task { position: fixed; inset: 0; z-index: 16; background: #0b1220d9; display: flex; align-items: center; justify-content: center; padding: 12px; }
.taskcard { background: #fbf8f2; color: #2b2118; width: 100%; max-width: 440px; max-height: 96vh; overflow-y: auto; border-radius: 20px; padding: 14px; }
.taskhead { display: flex; justify-content: space-between; align-items: center; } .taskhead .close { position: static; color: #6b5b4b; }
.tintro { color: #6b5b4b; font-size: 13px; margin: 4px 0 8px; }
.tclient { display: flex; gap: 10px; align-items: center; } .tclient canvas { width: 48px; height: 48px; border-radius: 50%; }
.bubble { background: #fff; border: 1px solid #e3d8c6; border-radius: 14px; padding: 8px 12px; font-size: 14px; }
.tneed { margin: 12px 0 6px; font-weight: 700; font-size: 17px; }
.tray { min-height: 44px; display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: #efe6d8; border-radius: 10px; }
.tsum { margin: 6px 0; font-size: 14px; }
.notes, .menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.menu { grid-template-columns: repeat(2, 1fr); }
.note { border: 0; border-radius: 6px; padding: 9px 2px; font-size: 12px; font-weight: 700; color: #1b2a1b; cursor: pointer; }
span.note { padding: 5px 7px; }
.n20000 { background: #c9b6e4; } .n10000 { background: #e7b7a8; } .n5000 { background: #a9cfe8; } .n2000 { background: #b7dcb0; }
.n1000 { background: #ecd9a0; } .n500 { background: #f0c9a4; } .n200 { background: #d9d9d9; } .n100 { background: #e8e1c8; }
.mitem { background: #fff; border: 1px solid #d8cbb6; color: #2b2118; padding: 10px; }
.mitem.on { background: #b44a24; border-color: #b44a24; color: #fff; }
.tbtns { display: flex; gap: 8px; margin-top: 12px; } .tbtns button { flex: 1; background: #efe6d8; border-color: #d8cbb6; color: #2b2118; }
.tbtns .primary { background: #b44a24; border-color: #b44a24; color: #fff; }
.tdone { text-align: center; padding: 16px 0; } .tdone .big { font-size: 40px; font-weight: 800; } .tdone .bonus { margin: 10px 0 14px; font-size: 18px; }
.tdone button { background: #b44a24; color: #fff; border: 0; }
@media (prefers-reduced-motion: reduce) { #doors .door { transition: none; } }

/* ---------- phone / messages ---------- */
#phone { position: fixed; inset: 0; z-index: 15; background: #0b1220c4; display: flex; align-items: flex-end; justify-content: center; }
.pframe { width: 100%; max-width: 430px; height: 88vh; height: 88dvh; background: #f4f6fa; color: #1b2330; border-radius: 22px 22px 0 0;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 -10px 40px #0007; }
#phone.device .pframe { border-radius: 38px; margin-bottom: 10px; border: 8px solid #111; height: 86vh; height: 86dvh; }
@media (min-width: 760px) { #phone { align-items: center; } .pframe { border-radius: 22px; } }
.pstatus { display: flex; justify-content: space-between; padding: 8px 18px 2px; font-size: 12px; font-weight: 600; color: #4a5568; }
.phead { display: flex; align-items: center; gap: 8px; padding: 6px 10px 8px; border-bottom: 1px solid #e2e8f0; }
.phead b { flex: 1; text-align: center; font-size: 16px; } .pbtn { background: none; border: 0; color: #2b6cb0; font-size: 20px; min-width: 44px; min-height: 40px; }
.pbody { flex: 1; overflow-y: auto; padding: 10px 12px calc(var(--safe-b) + 12px); -webkit-overflow-scrolling: touch; }
.pbody button { background: #e2e8f0; border: 0; color: #1b2330; }
.pbody button.primary { background: #2b6cb0; color: #fff; }
.apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px; padding: 12px 4px; }
.app { display: flex !important; flex-direction: column; align-items: center; gap: 4px; background: none !important; font-size: 11px; font-weight: 600; padding: 0 !important; }
.app span { width: 58px; height: 58px; border-radius: 15px; background: linear-gradient(145deg, #fff, #dfe6ef); display: flex; align-items: center;
  justify-content: center; font-size: 28px; box-shadow: 0 3px 8px #0002; }
.app.off { opacity: .35; }
.pwarn { background: #fff4e5; color: #8a4b0f; border-radius: 12px; padding: 10px; font-size: 13px; margin-bottom: 8px; }
.pnote { background: #e9f1fb; color: #2a4365; border-radius: 12px; padding: 10px; font-size: 13px; margin-bottom: 8px; }
.pempty { color: #718096; text-align: center; padding: 30px 10px; font-size: 14px; }
.crow { display: flex !important; width: 100%; align-items: center; gap: 10px; text-align: left; background: #fff !important; border-radius: 14px !important;
  padding: 10px !important; margin-bottom: 6px; }
.cava { width: 42px; height: 42px; border-radius: 50%; background: #e2e8f0; display: flex; align-items: center; justify-content: center; font-size: 22px; flex: none; }
.cmid { flex: 1; min-width: 0; } .cmid b { display: block; } .cmid small { display: block; color: #718096; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbadge { background: #e53e3e; color: #fff; border-radius: 999px; min-width: 22px; padding: 2px 7px; font-size: 12px; font-weight: 700; text-align: center; }
.msgs { display: flex; flex-direction: column; gap: 6px; min-height: 40vh; max-height: 52vh; overflow-y: auto; padding: 4px 0 10px; }
.msg { max-width: 78%; align-self: flex-start; background: #fff; border-radius: 16px 16px 16px 4px; padding: 8px 12px; box-shadow: 0 1px 2px #0001; }
.msg.me { align-self: flex-end; background: #2b6cb0; color: #fff; border-radius: 16px 16px 4px 16px; }
.msg small { display: block; font-size: 10px; opacity: .6; text-align: right; margin-top: 2px; }
.cbar { display: flex; gap: 8px; align-items: flex-end; margin-top: 6px; }
.cbar textarea, .cbar input, .pbody > input, .pbody select { flex: 1; font: inherit; font-size: 16px; border: 1px solid #cbd5e0; border-radius: 12px; padding: 10px; background: #fff; color: #1b2330; width: 100%; }
.cbar .primary { min-width: 52px; min-height: 44px; border-radius: 12px; }
.cactions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; } .cactions button { font-size: 12px; padding: 8px 10px; background: #edf2f7; color: #c53030; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; } .chips button { font-size: 12px; padding: 6px 10px; border-radius: 999px; }
.chips button.on { background: #2b6cb0; color: #fff; }
.prow, .hrow { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: #fff; border-radius: 12px; padding: 10px; margin-bottom: 6px; }
.prow small, .hrow small { display: block; color: #718096; font-size: 12px; } .prow button { flex: none; font-size: 13px; }
.hrow b { flex: none; } .hrow b.plus { color: #2f855a; }
.bal { background: linear-gradient(135deg, #2b6cb0, #2c5282); color: #fff; border-radius: 16px; padding: 16px; margin-bottom: 10px; }
.bal small { opacity: .8; } .bal b { display: block; font-size: 28px; } .pbody h4 { margin: 14px 0 6px; }
.fitem { background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 8px; } .fitem p { margin: 4px 0 8px; color: #4a5568; font-size: 14px; }
.fitem.sp { border: 1px solid #f6ad55; } .spl { display: inline-block; font-size: 10px; font-weight: 700; color: #c05621; border: 1px solid #f6ad55; border-radius: 6px; padding: 1px 6px; margin-bottom: 4px; }

/* ---------- the day of the city ---------- */
.board { background: #12301c; color: #fff; border-radius: 14px; padding: 12px; text-align: center; margin: 4px 0 8px; }
.teams { display: flex; align-items: center; justify-content: space-between; gap: 6px; } .teams b { flex: 1; font-size: 13px; }
.score { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mstatus { font-size: 12px; color: #e8a33d; margin-top: 4px; } .mstatus.live { color: #ff6b6b; }
.mev { font-size: 12px; color: #cfe8d6; margin-top: 6px; }
.picks { display: flex; flex-direction: column; gap: 6px; } .picks button { text-align: left; }
.roomm { max-height: 28vh; min-height: 0; }
.ipanel .msg { background: #fff; } .ipanel .msg.me { background: #b44a24; color: #fff; }
.ipanel .msg small { text-align: left; }
.ipanel .cbar input { flex: 1; font: inherit; font-size: 16px; border: 1px solid #d8cbb6; border-radius: 10px; padding: 9px; }
.ipanel .pnote { background: #efe6d8; border-radius: 10px; padding: 10px; font-size: 13px; margin: 8px 0; }
.ipanel h4 { margin: 12px 0 4px; } .ipanel .big { width: 100%; }
.ipanel .spl, .spl { display: inline-block; font-size: 10px; font-weight: 700; color: #c05621; border: 1px solid #f6ad55; border-radius: 6px; padding: 0 5px; }
.rxn { height: 46vh; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 26px;
  font-weight: 800; user-select: none; cursor: pointer; } .rxn small { font-size: 13px; font-weight: 500; margin-top: 8px; }
.rxn.wait { background: #b23a3a; color: #fff; } .rxn.go { background: #2f9e44; color: #fff; } .rxn.bad { background: #444; color: #fff; }
.einfo { background: #fff; border: 1px solid #e3d8c6; border-radius: 12px; padding: 10px; font-size: 14px; line-height: 1.5; }
.q { margin: 10px 0; } .q b { display: block; margin-bottom: 6px; font-size: 14px; } .q .mitem { display: block; width: 100%; text-align: left; margin-bottom: 5px; }
.evbox { background: #2a2416; border: 1px solid #6b5124; border-radius: 12px; padding: 10px; margin: 8px 0; font-size: 13px; color: #ffd9a1; }

.quest { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #ffffff10; }
.quest .qi { font-size: 20px; width: 26px; text-align: center; } .quest .grow { flex: 1; } .quest .s { color: var(--muted); font-size: 12px; }
.quest.claimed { opacity: .5; }

.chips2 { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.nowrap { white-space: nowrap; }

#needsRow .need { cursor: pointer; }
.assist h3 { display: flex; align-items: center; gap: 6px; }
.assist .why { color: var(--muted); font-size: 12px; margin: -2px 0 6px; }
.arow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #ffffff10; }
.arow .grow { flex: 1; min-width: 0; } .arow .t { font-weight: 650; } .arow .s { color: var(--muted); font-size: 12px; }
.arow .acts { display: flex; gap: 6px; flex: none; }
.urgent { color: var(--red); font-weight: 700; }

/* телефон боком: карточки — панелью справа на всю высоту */
@media (orientation: landscape) and (max-height: 520px) {
  .sheet { left: auto; right: calc(var(--safe-r) + 8px); top: 8px; bottom: 8px; width: min(440px, 58vw);
    max-height: none; border-radius: 18px; border: 1px solid var(--line); padding-bottom: 14px; }
}

/* 3D city */
#view3d { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; background: #b9c8d6; }
#labels3d { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#map.off { display: none; }

/* «что можно сделать здесь» — над версией, по центру */
.ctx { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 34px); z-index: 6;
  display: flex; gap: 6px; max-width: calc(100vw - 150px); }
.ctx button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; padding: 9px 13px;
  border-radius: 999px; font-size: 14px; font-weight: 700; background: var(--panel); border-color: var(--accent); }
.emotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.emotes button { min-height: 58px; font-size: 15px; }
@media (orientation: landscape) and (max-height: 520px) { .ctx { bottom: calc(var(--safe-b) + 10px); } }
