@font-face {
  font-family: 'Nunito';
  src: url('fonts/nunito-latin.woff2') format('woff2');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --panel: rgba(255, 252, 246, 0.94);
  --panel-2: rgba(248, 244, 236, 0.96);
  --ink: #2c3440;
  --ink-2: #5d6775;
  --ink-3: #8b94a0;
  --line: rgba(44, 52, 64, 0.1);
  --res: #45b25a;
  --com: #3d8fd6;
  --ind: #e5a02e;
  --good: #2fa86a;
  --bad: #e0533f;
  --warn: #e8a33a;
  --gold: #e3a91c;
  --accent: #f0a73a;
  --sel: #ffcf4a;
  --shadow: 0 8px 24px rgba(28, 40, 58, 0.18), 0 2px 6px rgba(28, 40, 58, 0.1);
  --r: 14px;
  font-size: clamp(12px, 0.55vw + 7px, 15px);
}

html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #cfe6f5; }
body { font-family: 'Nunito', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; }
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
#ui * { box-sizing: border-box; }
.ic { display: inline-flex; width: 1.15em; height: 1.15em; vertical-align: -0.2em; }
.ic svg { width: 100%; height: 100%; }
button { font: inherit; color: inherit; }
.hidden { display: none !important; }

.panel { pointer-events: auto; background: var(--panel); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* ---------- Top bar ---------- */
.topbar { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 8px; align-items: stretch; justify-content: space-between; }
.tb { display: flex; align-items: center; gap: 10px; padding: 6px 12px; min-height: 44px; }
.tb-left { min-width: 0; flex: 0 1 auto; gap: 10px; }
.city-name { font-weight: 900; font-size: 1.12rem; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 11em; }
.rank { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; background: linear-gradient(180deg, #f3b54a, #e38f22); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.popbox { display: flex; flex-direction: column; gap: 3px; min-width: 7.5em; cursor: pointer; }
.popline { display: flex; align-items: center; gap: 5px; font-weight: 800; font-size: 1.02rem; }
.popline small { font-weight: 700; color: var(--ink-3); font-size: 0.72rem; }
.bar { height: 6px; border-radius: 6px; background: rgba(44,52,64,0.1); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #66c483, #3fae6a); transition: width 0.4s; }
.tb-center { gap: 12px; }
.money { display: flex; flex-direction: column; line-height: 1.1; cursor: pointer; min-width: 7.5em; }
.money b { font-size: 1.15rem; font-weight: 900; color: #2b3a2f; }
.money span { font-size: 0.75rem; font-weight: 800; }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.speed { display: flex; gap: 3px; background: rgba(44,52,64,0.06); padding: 3px; border-radius: 10px; }
.speed button { border: 0; background: transparent; width: 2.1em; height: 1.9em; border-radius: 7px; cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.speed button:hover { background: rgba(255,255,255,0.8); }
.speed button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.speed button.paused { background: #ffe3a3; color: #8a5a00; }
.date { font-weight: 800; font-size: 0.85rem; color: var(--ink-2); white-space: nowrap; min-width: 6.2em; }
.tb-right { gap: 10px; }
.happy { display: flex; align-items: center; gap: 4px; font-weight: 900; font-size: 1rem; cursor: pointer; }
.happy .ic { width: 1.35em; height: 1.35em; }
.util { display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.util-row { display: flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 800; color: var(--ink-2); }
.util-row .bar { width: 3.6em; height: 5px; }
.util-row.short { color: var(--bad); }
.util-row.short .bar > i { background: var(--bad) !important; }
.demand { display: flex; gap: 4px; align-items: flex-end; height: 34px; padding: 0 2px; cursor: help; }
.dcol { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dbar { width: 9px; height: 26px; background: rgba(44,52,64,0.08); border-radius: 4px; position: relative; overflow: hidden; }
.dbar i { position: absolute; left: 0; right: 0; border-radius: 3px; transition: all 0.5s; }
.dcol small { font-size: 0.6rem; font-weight: 900; color: var(--ink-3); line-height: 1; }
.iconbtn { border: 0; background: rgba(44,52,64,0.06); width: 2.2em; height: 2.2em; border-radius: 10px; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.iconbtn:hover { background: #fff; color: var(--ink); }
.iconbtn .ic { width: 1.2em; height: 1.2em; }

/* ---------- Goals ---------- */
.goals { position: absolute; left: 10px; top: 66px; width: 17.5em; padding: 10px 12px 10px; max-height: calc(100% - 190px); overflow-y: auto; }
.goals h3, .insp h3 { margin: 0 0 6px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 900; display: flex; align-items: center; justify-content: space-between; }
.goal { padding: 7px 8px; border-radius: 10px; margin: 0 -4px 4px; cursor: pointer; transition: background 0.2s; position: relative; }
.goal:hover { background: rgba(255,255,255,0.9); }
.goal .gt { display: flex; gap: 7px; align-items: flex-start; font-weight: 800; font-size: 0.92rem; line-height: 1.2; }
.goal .dot { flex: none; width: 1em; height: 1em; border-radius: 50%; border: 2px solid #c8cdd4; margin-top: 0.1em; }
.goal .gh { font-size: 0.78rem; color: var(--ink-2); margin: 3px 0 4px 1.55em; line-height: 1.3; font-weight: 600; }
.goal .gp { display: flex; align-items: center; gap: 6px; margin-left: 1.55em; }
.goal .gp .bar { flex: 1; }
.goal .gp small { font-size: 0.7rem; font-weight: 800; color: var(--ink-3); white-space: nowrap; }
.goal .rw { font-size: 0.7rem; font-weight: 900; color: #8a6a10; background: #fff3c4; border-radius: 99px; padding: 1px 6px; white-space: nowrap; }
.goal.tut { background: linear-gradient(180deg, #fffaf0, #fff4dc); box-shadow: inset 0 0 0 2px #f6d58a; }
.goal.done { animation: goaldone 1.15s ease forwards; }
@keyframes goaldone { 0% { background: #c9f2d7; transform: scale(1); } 20% { transform: scale(1.03); } 75% { background: #d9f7e4; opacity: 1; } 100% { background: #d9f7e4; opacity: 0; } }
.goal .dot.checked { border-color: var(--good); background: var(--good); color: #fff; display: grid; place-items: center; }
.goal .dot.checked .ic { width: 0.8em; height: 0.8em; }
.reqs { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.req { display: flex; gap: 7px; align-items: center; font-size: 0.82rem; font-weight: 700; padding: 5px 6px; margin: 0 -4px; border-radius: 9px; cursor: pointer; line-height: 1.2; }
.req:hover { background: rgba(255,255,255,0.9); }
.req .rq { flex: none; width: 1.7em; height: 1.7em; border-radius: 50%; display: grid; place-items: center; background: #7a5af0; color: #fff; }
.req .rq .ic { width: 1em; height: 1em; }
.req small { display: block; color: var(--ink-3); font-weight: 700; font-size: 0.72rem; }
.collapse-btn { border: 0; background: none; cursor: pointer; color: var(--ink-3); font-weight: 900; padding: 0 2px; }
.goals.min .goal, .goals.min .reqs { display: none; }

/* ---------- Inspector ---------- */
.insp { position: absolute; right: 10px; top: 66px; width: 18.5em; padding: 12px 14px; max-height: calc(100% - 190px); overflow-y: auto; }
.insp .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.insp .title { font-size: 1.15rem; font-weight: 900; line-height: 1.15; }
.insp .sub { font-size: 0.78rem; color: var(--ink-2); font-weight: 700; margin-top: 2px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; font-weight: 900; padding: 2px 7px; border-radius: 99px; color: #fff; text-transform: uppercase; letter-spacing: 0.04em; }
.stars { color: #f1b733; letter-spacing: 1px; font-size: 0.9rem; }
.stars .off { color: #d8dce1; }
.kv { display: flex; justify-content: space-between; font-size: 0.86rem; padding: 3px 0; font-weight: 700; }
.kv span:first-child { color: var(--ink-2); font-weight: 700; }
.needs { margin: 8px 0 4px; }
.needs h4 { margin: 8px 0 4px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); font-weight: 900; }
.need { display: flex; align-items: flex-start; gap: 6px; font-size: 0.84rem; font-weight: 700; padding: 2px 0; line-height: 1.25; }
.need .ok { color: var(--good); }
.need .no { color: var(--bad); }
.need small { display: block; color: var(--ink-3); font-weight: 600; font-size: 0.74rem; }
.need .ic { flex: none; margin-top: 0.05em; }
.note { font-size: 0.8rem; color: var(--ink-2); font-weight: 600; line-height: 1.35; margin: 6px 0; }
.note.bad { color: var(--bad); font-weight: 800; }
.note.good { color: var(--good); font-weight: 800; }
.btn { pointer-events: auto; border: 0; border-radius: 10px; padding: 0.55em 1em; font-weight: 800; cursor: pointer; background: #eef0f3; color: var(--ink); transition: transform 0.08s, background 0.15s, box-shadow 0.15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #ffbf4d, #f09a24); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,0.15); box-shadow: 0 3px 0 #c97710, 0 4px 12px rgba(240,154,36,0.35); }
.btn.primary:hover { background: linear-gradient(180deg, #ffc964, #f5a434); }
.btn.danger { background: #fde5e1; color: #b03a28; }
.btn.danger:hover { background: #fbd3cc; }
.btn.small { padding: 0.35em 0.7em; font-size: 0.82rem; }
.btn.wide { width: 100%; }
.xbtn { border: 0; background: rgba(44,52,64,0.06); border-radius: 8px; width: 1.9em; height: 1.9em; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); flex: none; }
.xbtn:hover { background: rgba(44,52,64,0.12); color: var(--ink); }

/* ---------- Toolbar ---------- */
.bottom { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toolbar { display: flex; gap: 4px; padding: 6px; }
.tbtn { position: relative; border: 0; background: transparent; border-radius: 11px; padding: 6px 6px 4px; min-width: 4.6em; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--ink-2); font-weight: 800; font-size: 0.72rem; transition: background 0.15s, color 0.15s, transform 0.1s; }
.tbtn .ic { width: 1.65em; height: 1.65em; }
.tbtn:hover { background: rgba(255,255,255,0.95); color: var(--ink); transform: translateY(-1px); }
.tbtn.on { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--sel), 0 2px 6px rgba(0,0,0,0.1); }
.tbtn kbd { position: absolute; top: 3px; right: 5px; font: 800 0.6rem/1 inherit; color: var(--ink-3); font-family: inherit; }
.tbtn.pulse::after, .card.pulse::after, .goal-pulse::after { content: ''; position: absolute; inset: -3px; border-radius: 13px; box-shadow: 0 0 0 3px #ffcf4a; animation: pulse 1.1s ease-in-out infinite; pointer-events: none; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(1.04); } }
.tbtn .lockb { position: absolute; top: 2px; left: 4px; width: 0.95em; height: 0.95em; color: var(--ink-3); }
.tray { display: flex; gap: 6px; padding: 8px; max-width: calc(100vw - 20px); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.card { position: relative; flex: none; width: 6.6em; border: 0; background: rgba(255,255,255,0.75); border-radius: 12px; padding: 5px 4px 6px; display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: background 0.15s, transform 0.12s, box-shadow 0.15s; }
.card:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.card.on { background: #fff; box-shadow: inset 0 0 0 2px var(--sel), 0 4px 12px rgba(0,0,0,0.1); }
.card img, .card .cico { width: 4.4em; height: 4.4em; object-fit: contain; display: block; }
.card .cico { display: grid; place-items: center; border-radius: 12px; color: #fff; }
.card .cico .ic { width: 2.3em; height: 2.3em; }
.card .cn { font-size: 0.72rem; font-weight: 800; text-align: center; line-height: 1.1; margin-top: 3px; min-height: 2.2em; display: flex; align-items: center; }
.card .cc { font-size: 0.72rem; font-weight: 900; color: #6b5a12; }
.card.locked { cursor: default; }
.card.locked img, .card.locked .cico { filter: grayscale(1) opacity(0.45); }
.card.locked .cc { color: var(--ink-3); }
.card .lk { position: absolute; top: 5px; right: 6px; color: var(--ink-3); }
.card.cant .cc { color: var(--bad); }
.hintbar { pointer-events: none; background: rgba(32,40,52,0.82); color: #fff; font-weight: 700; font-size: 0.8rem; padding: 5px 12px; border-radius: 99px; white-space: nowrap; }
.hintbar kbd { background: rgba(255,255,255,0.2); border-radius: 4px; padding: 0 4px; font-family: inherit; font-weight: 900; }

/* ---------- Tooltip ---------- */
.tip { position: fixed; z-index: 30; pointer-events: none; background: rgba(255,252,246,0.98); border-radius: 12px; box-shadow: var(--shadow); padding: 10px 12px; width: 16em; font-size: 0.82rem; line-height: 1.35; }
.tip b { font-size: 0.95rem; font-weight: 900; }
.tip .tr { display: flex; justify-content: space-between; font-weight: 700; color: var(--ink-2); margin-top: 2px; }
.tip .tr span:last-child { color: var(--ink); font-weight: 800; }
.tip p { margin: 4px 0 6px; color: var(--ink-2); font-weight: 600; }
.ctip { position: fixed; z-index: 25; pointer-events: none; background: rgba(32,40,52,0.88); color: #fff; font-weight: 800; font-size: 0.8rem; padding: 4px 9px; border-radius: 8px; white-space: nowrap; transform: translate(14px, 16px); }
.ctip.bad { background: rgba(196,60,44,0.92); }

/* ---------- Toasts ---------- */
.toasts { position: absolute; top: 66px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.toast { pointer-events: auto; background: rgba(255,252,246,0.97); border-radius: 12px; box-shadow: var(--shadow); padding: 8px 14px; font-weight: 800; font-size: 0.88rem; display: flex; align-items: center; gap: 8px; animation: toastin 0.35s cubic-bezier(.2,1.4,.4,1); max-width: 30em; cursor: pointer; }
.toast.good { border-left: 5px solid var(--good); }
.toast.bad { border-left: 5px solid var(--bad); }
.toast.info { border-left: 5px solid var(--com); }
.toast.gold { border-left: 5px solid var(--gold); }
.toast.out { animation: toastout 0.4s ease forwards; }
@keyframes toastin { from { opacity: 0; transform: translateY(-12px) scale(0.95); } to { opacity: 1; transform: none; } }
@keyframes toastout { to { opacity: 0; transform: translateY(-8px); } }
.mpop { position: fixed; z-index: 26; pointer-events: none; font-weight: 900; font-size: 1rem; text-shadow: 0 1px 0 #fff, 0 0 6px rgba(255,255,255,0.8); animation: mpop 1.2s ease-out forwards; }
@keyframes mpop { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -40px); } }

/* ---------- Advisor ---------- */
.advisor { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: flex-end; gap: 8px; max-width: 26em; pointer-events: none; }
.advisor .face { pointer-events: auto; width: 4.6em; height: 4.6em; flex: none; border-radius: 50%; background: #fff5df; box-shadow: var(--shadow); border: 3px solid #fff; cursor: pointer; animation: bob 3s ease-in-out infinite; }
.advisor .face svg { width: 100%; height: 100%; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.advisor .bubble { pointer-events: auto; padding: 10px 13px; font-size: 0.88rem; font-weight: 700; line-height: 1.38; position: relative; margin-bottom: 1.2em; animation: toastin 0.4s cubic-bezier(.2,1.4,.4,1); }
.advisor .bubble .who { font-size: 0.7rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.07em; color: #c07a10; margin-bottom: 2px; }
.advisor .bubble .acts { display: flex; gap: 6px; margin-top: 8px; justify-content: flex-end; }
.advisor.min .bubble { display: none; }
.tray-open .advisor { bottom: 178px; }
@media (max-height: 760px) { .tray-open .advisor .bubble { display: none; } .tray-open .advisor .face::after { content: '!'; position: absolute; top: -4px; right: -4px; width: 1.3em; height: 1.3em; border-radius: 50%; background: #e0533f; color: #fff; font-weight: 900; display: grid; place-items: center; font-size: 0.8rem; } .tray-open .advisor .face { position: relative; } }
.tray-open .advisor .bubble { max-width: 21em; }
.advisor { transition: bottom 0.25s ease; }

/* ---------- Modals ---------- */
.modal-layer { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(24,32,46,0.35); pointer-events: auto; animation: fadein 0.25s ease; z-index: 20; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(34em, calc(100vw - 30px)); max-height: calc(100vh - 30px); overflow-y: auto; padding: 18px 20px; animation: toastin 0.35s cubic-bezier(.2,1.3,.4,1); }
.modal h2 { margin: 0 0 4px; font-size: 1.45rem; font-weight: 900; }
.modal h4 { margin: 14px 0 6px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 900; }
.modal p { margin: 6px 0; line-height: 1.45; color: var(--ink-2); font-weight: 600; }
.modal .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.modal .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; font-weight: 700; }
.modal input[type=range] { width: 11em; accent-color: #f09a24; }
.modal select, .modal input[type=text] { font: inherit; font-weight: 700; padding: 6px 9px; border-radius: 9px; border: 1px solid #d6d9de; background: #fff; color: var(--ink); }
.modal input[type=text] { width: 100%; font-size: 1.05rem; }
.unlocks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.unlock { display: flex; flex-direction: column; align-items: center; width: 6.2em; font-size: 0.74rem; font-weight: 800; text-align: center; line-height: 1.15; }
.unlock img, .unlock .cico { width: 4.6em; height: 4.6em; }
.unlock .cico { display: grid; place-items: center; border-radius: 12px; color: #fff; }
.unlock .cico .ic { width: 2.2em; height: 2.2em; }
.ms-banner { text-align: center; padding: 6px 0 2px; }
.ms-banner .ms-kicker { font-size: 0.78rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: #c07a10; }
.ms-banner h2 { font-size: 2rem; }
.reward { display: inline-flex; align-items: center; gap: 6px; background: #fff3c4; color: #7a5a00; font-weight: 900; padding: 4px 12px; border-radius: 99px; margin-top: 6px; }
.budget-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.budget-table td { padding: 4px 2px; font-weight: 700; }
.budget-table td:last-child { text-align: right; font-weight: 800; }
.budget-table tr.total td { border-top: 1px solid var(--line); font-weight: 900; padding-top: 7px; }
.chart { width: 100%; height: 90px; display: block; background: rgba(44,52,64,0.04); border-radius: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.mapcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mapcard { border: 0; border-radius: 12px; padding: 10px; background: #f3f1ec; cursor: pointer; text-align: left; transition: box-shadow 0.15s, background 0.15s; }
.mapcard:hover { background: #fff; }
.mapcard.on { background: #fff; box-shadow: inset 0 0 0 2px var(--sel); }
.mapcard b { display: block; font-weight: 900; margin-bottom: 3px; }
.mapcard span { font-size: 0.78rem; color: var(--ink-2); font-weight: 600; line-height: 1.3; display: block; }
.mapcard canvas { width: 100%; aspect-ratio: 1; border-radius: 8px; display: block; margin-bottom: 6px; image-rendering: pixelated; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 0.85rem; font-weight: 700; }
.keys kbd { background: #eef0f3; border-radius: 6px; padding: 1px 7px; font-family: inherit; font-weight: 900; font-size: 0.8rem; box-shadow: 0 1px 0 #cfd3d8; white-space: nowrap; }
.keys span { color: var(--ink-2); }

/* ---------- Title ---------- */
.titlescreen { position: absolute; inset: 0; pointer-events: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 45%, rgba(255,250,240,0.0) 0%, rgba(20,30,50,0.35) 100%); animation: fadein 0.6s ease; z-index: 15; }
.logo { font-size: clamp(42px, 7.5vw, 96px); font-weight: 1000; letter-spacing: -0.01em; color: #fff; text-shadow: 0 3px 0 #e38f22, 0 6px 0 #b86d10, 0 12px 30px rgba(0,0,0,0.35); line-height: 1; text-align: center; }
.logo .lamp { display: inline-block; color: #ffd96a; animation: glow 2.6s ease-in-out infinite; }
@keyframes glow { 0%, 100% { text-shadow: 0 3px 0 #e38f22, 0 6px 0 #b86d10, 0 0 22px rgba(255,210,90,0.9); } 50% { text-shadow: 0 3px 0 #e38f22, 0 6px 0 #b86d10, 0 0 6px rgba(255,210,90,0.3); } }
.tagline { margin-top: 14px; font-size: clamp(14px, 1.6vw, 20px); color: #fff; font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,0.45); text-align: center; padding: 0 20px; }
.title-acts { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.title-acts .btn { min-width: 14em; font-size: 1.1rem; padding: 0.7em 1.4em; }
.title-acts .btn.primary { font-size: 1.25rem; }
.title-meta { margin-top: 6px; color: #fff; font-weight: 700; font-size: 0.85rem; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.title-foot { position: absolute; bottom: 14px; color: rgba(255,255,255,0.85); font-size: 0.75rem; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.gp-cursor { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0,0,0,0.3); pointer-events: none; }
.gp-cursor::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; background: #fff; border-radius: 50%; }
.storage-warn { position: absolute; bottom: 8px; right: 10px; font-size: 0.72rem; font-weight: 800; color: #fff; background: rgba(196,60,44,0.85); padding: 3px 9px; border-radius: 99px; pointer-events: none; }

@media (max-height: 620px) {
  .goals, .insp { top: 60px; max-height: calc(100% - 160px); }
  .tbtn { min-width: 4em; padding: 4px 4px 2px; }
  .card { width: 6em; }
  .card img, .card .cico { width: 3.8em; height: 3.8em; }
  .advisor .face { width: 3.8em; height: 3.8em; }
}
@media (max-width: 1100px) {
  .goals { width: 15.5em; }
  .insp { width: 16.5em; }
  .city-name { max-width: 7.5em; }
}

.ctrlhint { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 12px; padding: 8px 12px; font-size: 0.8rem; font-weight: 800; color: var(--ink-2); }
.ctrlhint kbd { background: #eef0f3; border-radius: 6px; padding: 1px 6px; font-family: inherit; font-weight: 900; box-shadow: 0 1px 0 #cfd3d8; color: var(--ink); }
.ctrlhint .done { opacity: 0.35; text-decoration: line-through; }

.ctip.hover { background: rgba(255,252,246,0.96); color: var(--ink); box-shadow: 0 3px 10px rgba(0,0,0,0.15); }

.btn:focus-visible, .card:focus-visible, .mapcard:focus-visible, .tbtn:focus-visible { outline: 3px solid #ffcf4a; outline-offset: 2px; }

#ui.photo > *:not(.photo-pill):not(.modal-layer) { display: none !important; }
.photo-pill { display: none; }
#ui.photo .photo-pill { display: block; position: absolute; bottom: 10px; right: 10px; pointer-events: auto; border: 0; border-radius: 99px; padding: 5px 12px; font-weight: 800; font-size: 0.75rem; background: rgba(32,40,52,0.55); color: #fff; cursor: pointer; opacity: 0.6; }
#ui.photo .photo-pill:hover { opacity: 1; }

.undo-btn { pointer-events: auto; border: 0; border-radius: 99px; padding: 5px 12px; font-weight: 800; font-size: 0.8rem; background: rgba(255,252,246,0.95); box-shadow: var(--shadow); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.undo-btn:hover { background: #fff; }
.undo-btn kbd { font-family: inherit; font-size: 0.7rem; color: var(--ink-3); font-weight: 900; }
.undo-btn .ic { transform: scaleX(-1); }

.howto p { font-size: 0.84rem; margin: 4px 0 6px; }

.quote { font-size: 0.8rem; font-style: italic; color: var(--ink-2); font-weight: 600; margin: 8px 0 2px; padding: 6px 9px; background: rgba(44,52,64,0.05); border-radius: 9px; }
