@font-face { font-family: "Nunito"; font-weight: 700; font-display: block; src: url("../vendor/fonts/nunito-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: block; src: url("../vendor/fonts/nunito-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: block; src: url("../vendor/fonts/nunito-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: block; src: url("../vendor/fonts/nunito-cyrillic-800-normal.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Nunito"; font-weight: 900; font-display: block; src: url("../vendor/fonts/nunito-latin-900-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Nunito"; font-weight: 900; font-display: block; src: url("../vendor/fonts/nunito-cyrillic-900-normal.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: block; src: url("../vendor/fonts/nunito-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: block; src: url("../vendor/fonts/nunito-latin-ext-800-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-weight: 900; font-display: block; src: url("../vendor/fonts/nunito-latin-ext-900-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: block; src: url("../vendor/fonts/nunito-vietnamese-700-normal.woff2") format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: block; src: url("../vendor/fonts/nunito-vietnamese-800-normal.woff2") format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Nunito"; font-weight: 900; font-display: block; src: url("../vendor/fonts/nunito-vietnamese-900-normal.woff2") format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
:root {
  --ink: #1b1430;
  --ink2: #2c2250;
  --cream: #fff6e6;
  --gold: #ffc93c;
  --gold-d: #e59b12;
  --red: #ff3b4f;
  --green: #3ee08f;
  --sky: #6cd4ff;
  --panel: rgba(27, 20, 48, 0.78);
  --font: "Nunito", "Baloo 2", "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
/* Scripts Nunito has no glyphs for (l10n-asia 2026-10-10): the phone's own font for that script, picked by <html lang> (src/i18n.js
   sets it; the index.html boot shell too). Nunito stays first for Latin letters and digits. */
:root:lang(ja) { --font: "Nunito", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif; }
:lang(ja) { line-break: strict; word-break: auto-phrase; } /* Japanese wraps between phrases (Chrome 119+), strict kinsoku */
:root:lang(ko) { --font: "Nunito", "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", system-ui, sans-serif; }
:lang(ko) { word-break: keep-all; overflow-wrap: break-word; } /* Korean wraps between words (spaces), not inside them */
:root:lang(th) { --font: "Nunito", "Noto Sans Thai", "Noto Sans Thai UI", "Thonburi", "Leelawadee UI", "Tahoma", system-ui, sans-serif; }
:root:lang(ar) { --font: "Nunito", "Noto Sans Arabic", "Noto Sans Arabic UI", "Geeza Pro", "Segoe UI", "Tahoma", system-ui, sans-serif; }
/* RTL (ar, <html dir> from src/i18n.js): inline runs take their direction from their own first strong letter, so chips like
   "+25 XP", "1/34" or "US$1.99" keep their order while Arabic text flows right to left. The WebGL canvas is never mirrored. */
[dir="rtl"] :is(span, b, i, small, em, strong, label) { unicode-bidi: plaintext; }
[dir="rtl"] .shop-buy { direction: ltr; } /* Intl / store prices start with an RLM ("1.99 US$"): keep the price itself left to right */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: var(--ink);
  touch-action: none; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  font-family: var(--font); color: var(--cream);
}
#app { position: fixed; inset: 0; overflow: hidden; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }
button { font-family: inherit; border: 0; cursor: pointer; touch-action: manipulation; }

/* ---------- icons (SVG masks so they take currentColor) ---------- */
.ico { display: inline-block; width: 1.2em; height: 1.2em; background: currentColor; flex: none;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ico.coin { color: var(--gold); --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3C/svg%3E"); background: radial-gradient(circle at 40% 35%, #fff3b0 0 18%, var(--gold) 19% 62%, var(--gold-d) 63%); }
.ico.paw { color: #ffb4d8; --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16' rx='5.5' ry='4.5'/%3E%3Ccircle cx='5' cy='10' r='2.4'/%3E%3Ccircle cx='9' cy='5.5' r='2.4'/%3E%3Ccircle cx='15' cy='5.5' r='2.4'/%3E%3Ccircle cx='19' cy='10' r='2.4'/%3E%3C/svg%3E"); }
.ico.siren { color: #fff; --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 18v-6a6 6 0 0 1 12 0v6z'/%3E%3Crect x='3' y='19' width='18' height='3' rx='1'/%3E%3Cpath d='M11 1h2v3h-2zM2.5 6.2l1.4-1.4 2.1 2.1-1.4 1.4zM20.1 4.8l1.4 1.4-2.1 2.1-1.4-1.4z'/%3E%3C/svg%3E"); }
.ico.pause { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='4' width='5' height='16' rx='1.5'/%3E%3Crect x='14' y='4' width='5' height='16' rx='1.5'/%3E%3C/svg%3E"); }
.ico.ear { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h3l5-5v16l-5-5H3z'/%3E%3Cpath d='M15 8a5 5 0 0 1 0 8l-1.4-1.4a3 3 0 0 0 0-5.2zM18 5a9 9 0 0 1 0 14l-1.4-1.4a7 7 0 0 0 0-11.2z'/%3E%3C/svg%3E"); }
.ico.eye { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 5C6 5 2 12 2 12s4 7 10 7 10-7 10-7-4-7-10-7zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8z'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E"); }
.ico.sneak { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='8' cy='8' rx='3' ry='4.5'/%3E%3Cellipse cx='16' cy='13' rx='3' ry='4.5'/%3E%3Ccircle cx='7' cy='15' r='1.6'/%3E%3Ccircle cx='15' cy='20.2' r='1.6'/%3E%3C/svg%3E"); }
.ico.smoke { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='14' r='5'/%3E%3Ccircle cx='14' cy='10' r='6'/%3E%3Ccircle cx='17' cy='16' r='4.5'/%3E%3Crect x='6' y='15' width='12' height='5.5' rx='2.5'/%3E%3C/svg%3E"); }
.ico.lock { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M7 10V7a5 5 0 0 1 10 0v3h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2zm2 0h6V7a3 3 0 0 0-6 0zm3 4a1.5 1.5 0 0 0-1 2.6V19h2v-2.4a1.5 1.5 0 0 0-1-2.6z'/%3E%3C/svg%3E"); }
.ico.laser { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='1' y='7' width='4' height='10' rx='1'/%3E%3Crect x='19' y='7' width='4' height='10' rx='1'/%3E%3Crect x='5' y='11' width='14' height='2'/%3E%3C/svg%3E"); }
.ico.plate { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 15l10-5 10 5-10 5z'/%3E%3Cpath d='M11 2h2v6h-2z'/%3E%3Cpath d='M8 5l4 4 4-4z'/%3E%3C/svg%3E"); }
.ico.move { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16z'/%3E%3Ccircle cx='15' cy='9' r='4'/%3E%3C/svg%3E"); }
.ico.star { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5l3.2 6.6 7.3 1-5.3 5.1 1.3 7.2L12 18l-6.5 3.4 1.3-7.2L1.5 9.1l7.3-1z'/%3E%3C/svg%3E"); }
.ico.van { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1 6h14v10H1zM15 9h4l4 4v3h-8z'/%3E%3Ccircle cx='6' cy='18' r='2.5'/%3E%3Ccircle cx='18' cy='18' r='2.5'/%3E%3C/svg%3E"); }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; }
.hud-top { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px; display: flex; gap: 8px; align-items: center; }
.pill { display: flex; align-items: center; gap: 6px; padding: 7px 12px 7px 9px; border-radius: 999px; background: var(--panel);
  box-shadow: 0 2px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12); font-weight: 900; font-size: 16px; color: var(--cream); white-space: nowrap; }
.pill b { font-weight: 900; }
#hud-pet b { font-size: 14px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
#hud-pet.has { background: linear-gradient(#8b3fd1, #5b2397); }
#hud-pet.has.rare { background: linear-gradient(#ffb23c, #d9690e); }
.pause-btn { margin-left: auto; pointer-events: auto; padding: 9px; font-size: 16px; }
.alarm-pill { background: linear-gradient(#ff4b5c, #c3142d); animation: pulse .5s ease-in-out infinite alternate; font-size: 18px; }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.08); } }
.meters { position: absolute; top: calc(56px + env(safe-area-inset-top)); left: 10px; display: flex; flex-direction: column; gap: 6px; }
.meter { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 10px; background: var(--panel); font-size: 14px; }
.meter .bar { width: 86px; height: 8px; border-radius: 5px; background: rgba(255,255,255,.14); overflow: hidden; }
.meter .bar i { display: block; height: 100%; width: 0%; border-radius: 5px; background: var(--sky); transition: width .08s linear; }
#m-detect .bar i { background: linear-gradient(90deg, #ffd34d, #ff3b4f); }
#m-noise.loud .ico { color: #ffd34d; }
#objective { position: absolute; top: calc(58px + env(safe-area-inset-top)); right: 10px; max-width: 52%; text-align: right;
  font-weight: 800; font-size: 13px; padding: 6px 10px; border-radius: 10px; background: var(--panel); line-height: 1.2; }
#objective:empty { display: none; }
#objective .ico { vertical-align: -3px; margin-right: 4px; }
#hint { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 16px; background: rgba(255, 246, 230, .95); color: var(--ink); font-weight: 900; font-size: 16px;
  box-shadow: 0 4px 0 rgba(0,0,0,.3); width: max-content; max-width: calc(100vw - 28px); line-height: 1.25; text-wrap: balance; animation: hintIn .35s cubic-bezier(.2,1.6,.4,1); }
#hint .ico { width: 26px; height: 26px; flex: none; color: #6b3fd6; }
@keyframes hintIn { from { transform: translateX(-50%) scale(.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
#toast { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); font-weight: 900; font-size: 30px; color: #fff;
  text-shadow: 0 3px 0 rgba(0,0,0,.4), 0 0 18px rgba(0,0,0,.4); letter-spacing: 1px; width: max-content; max-width: min(92vw, 680px); text-align: center; line-height: 1.15; animation: toastIn .5s cubic-bezier(.2,1.6,.4,1); }
#toast.red { color: #ff5a6a; font-size: 42px; -webkit-text-stroke: 2px #fff; }
@keyframes toastIn { from { transform: translateX(-50%) scale(.3); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
#head-eye { position: absolute; width: 38px; height: 26px; margin: -50px 0 0 -19px; border-radius: 50%; background: #fff; border: 3px solid var(--ink);
  overflow: hidden; box-shadow: 0 2px 0 rgba(0,0,0,.3); }
#head-eye .fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0%; background: linear-gradient(#ff3b4f, #ffb02e); }
#head-eye::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: var(--ink); }
#alarm-vignette { position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at center, rgba(255,0,40,0) 45%, rgba(255,0,40,.55) 100%); }
#alarm-vignette.on { animation: vig .6s ease-in-out infinite alternate; }
@keyframes vig { from { opacity: .25; } to { opacity: .9; } }

/* ---------- touch controls ---------- */
#controls { position: absolute; inset: 0; pointer-events: none; }
#stick-zone { position: absolute; left: 0; bottom: 0; width: 58%; height: 62%; pointer-events: auto; touch-action: none; }
#stick { position: absolute; width: 132px; height: 132px; margin: -66px 0 0 -66px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.08) 0 55%, rgba(255,255,255,.18) 56% 100%); border: 3px solid rgba(255,255,255,.35); pointer-events: none; }
#stick.idle { opacity: .55; }
#stick-knob { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff, #d9d0ff 60%, #a99be6); box-shadow: 0 4px 0 rgba(0,0,0,.35); }
.ctl-btn { position: absolute; pointer-events: auto; touch-action: none; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: #fff; font-weight: 900; box-shadow: 0 5px 0 rgba(0,0,0,.35), inset 0 2px 0 rgba(255,255,255,.3); }
.ctl-btn small { font-size: 11px; letter-spacing: .5px; }
.ctl-btn .ico { width: 34px; height: 34px; }
#btn-sneak { right: calc(18px + env(safe-area-inset-right)); bottom: calc(34px + env(safe-area-inset-bottom)); width: 104px; height: 104px; background: radial-gradient(circle at 50% 30%, #8f6bff, #5a37c9); }
#btn-sneak.on { transform: scale(.93); background: radial-gradient(circle at 50% 30%, #b49cff, #7b55f0); box-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 0 5px rgba(180,156,255,.45); }
#btn-gadget { right: calc(132px + env(safe-area-inset-right)); bottom: calc(118px + env(safe-area-inset-bottom)); width: 80px; height: 80px; background: radial-gradient(circle at 50% 30%, #6fd1ff, #2a8fd0); }
#btn-gadget .ico { width: 28px; height: 28px; }
#btn-gadget em { position: absolute; top: -4px; right: -4px; font-style: normal; width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 50%; background: var(--gold); color: var(--ink); font-size: 15px; box-shadow: 0 2px 0 rgba(0,0,0,.3); }
#btn-gadget.empty { filter: grayscale(1) brightness(.7); }
#btn-gadget.pop { animation: pop .3s; }
@keyframes pop { 50% { transform: scale(.85); } }

/* ---------- lockpick ---------- */
#lockpick { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(15, 10, 30, .45); }
.lp-card { width: min(330px, 88vw); padding: 14px 14px 16px; border-radius: 24px; background: linear-gradient(#3a2d66, #241a45); text-align: center;
  box-shadow: 0 8px 0 rgba(0,0,0,.35), inset 0 2px 0 rgba(255,255,255,.12); animation: cardIn .3s cubic-bezier(.2,1.5,.4,1); position: relative; }
@keyframes cardIn { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lp-card.shake { animation: lpshake .3s; }
@keyframes lpshake { 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
.lp-title { font-weight: 900; letter-spacing: 2px; font-size: 18px; color: var(--gold); }
#lp-canvas { width: 100%; aspect-ratio: 1; display: block; }
.lp-pins { display: flex; justify-content: center; gap: 10px; margin-top: -4px; }
.lp-pins span { width: 22px; height: 22px; border-radius: 50%; background: #5d4f8c; box-shadow: inset 0 -3px 0 rgba(0,0,0,.3); transition: background .15s, transform .15s; }
.lp-pins span.ok { background: var(--green); transform: scale(1.15); }
.lp-help { margin-top: 8px; font-size: 14px; font-weight: 700; opacity: .9; }
.lp-help .g { color: var(--green); }
.lp-cancel { margin-top: 10px; padding: 8px 18px; border-radius: 999px; background: rgba(255,255,255,.12); color: var(--cream); font-weight: 800; font-size: 14px; }

/* ---------- screens ---------- */
.screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
#title { background: radial-gradient(ellipse at 50% 30%, rgba(27,20,48,0) 0, rgba(27,20,48,.35) 55%, rgba(27,20,48,.85) 100%); }
.title-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px; height: 100%; justify-content: space-between; padding-top: calc(70px + env(safe-area-inset-top)); padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.logo { text-align: center; line-height: .85; transform: rotate(-4deg); animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: rotate(-4deg) translateY(-8px); } }
.logo-top, .logo-bot { font-weight: 900; letter-spacing: 2px; color: var(--gold);
  text-shadow: 0 3px 0 #b86a0a, 0 6px 0 #6b3a05, 0 10px 18px rgba(0,0,0,.5); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.logo-top { font-size: 64px; color: #ffe18a; }
.logo-bot { font-size: 92px; }
.logo-sub { margin-top: 14px; font-weight: 800; font-size: 15px; letter-spacing: .5px; color: var(--cream); text-shadow: 0 2px 0 rgba(0,0,0,.5); }
.npc-tag { margin-top: auto; font-weight: 800; font-size: 13px; padding: 5px 12px; border-radius: 999px; background: rgba(0,0,0,.4); color: #d9d0ff; }
.big-btn { min-width: 220px; padding: 18px 36px; border-radius: 22px; font-size: 30px; font-weight: 900; letter-spacing: 2px; color: var(--ink);
  background: linear-gradient(#ffe36b, #ffb21f); box-shadow: 0 7px 0 #b86a0a, 0 12px 22px rgba(0,0,0,.4), inset 0 2px 0 rgba(255,255,255,.7);
  transition: transform .08s; }
.big-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 #b86a0a, 0 5px 10px rgba(0,0,0,.4); }
.big-btn.ghost { background: linear-gradient(#6c5aa8, #4a3a85); color: var(--cream); box-shadow: 0 7px 0 #2a1f52, 0 12px 22px rgba(0,0,0,.4); font-size: 22px; padding: 14px 28px; }
#btn-play { animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.06); } }
.title-foot { font-size: 12px; font-weight: 700; opacity: .75; text-align: center; max-width: 320px; }

#results { background: rgba(15,10,30,.55); }
.res-card { width: min(350px, 90vw); padding: 22px 18px 24px; border-radius: 28px; text-align: center; position: relative;
  background: linear-gradient(#45357a, #2a1f52); box-shadow: 0 10px 0 rgba(0,0,0,.35), inset 0 2px 0 rgba(255,255,255,.15);
  animation: cardIn .45s cubic-bezier(.2,1.5,.4,1); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.res-card.fail { background: linear-gradient(#7a3550, #42193a); }
.res-head { font-size: 32px; font-weight: 900; color: var(--gold); letter-spacing: 1px; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.res-card.fail .res-head { color: #ffd0dc; }
.res-sub { font-size: 15px; font-weight: 700; opacity: .9; margin-top: -6px; }
.stars { display: flex; align-items: flex-end; gap: 6px; margin: 4px 0; }
.star { width: 70px; height: 70px; position: relative; }
.star.big { width: 92px; height: 92px; margin-bottom: 14px; }
.star::before, .star::after { content: ""; position: absolute; inset: 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5l3.2 6.6 7.3 1-5.3 5.1 1.3 7.2L12 18l-6.5 3.4 1.3-7.2L1.5 9.1l7.3-1z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5l3.2 6.6 7.3 1-5.3 5.1 1.3 7.2L12 18l-6.5 3.4 1.3-7.2L1.5 9.1l7.3-1z'/%3E%3C/svg%3E") center/contain no-repeat; }
.star::before { background: rgba(0,0,0,.35); }
.star::after { background: linear-gradient(#fff2a8, #ffc93c 45%, #f08c00); transform: scale(0); }
.star.on::after { animation: starIn .45s cubic-bezier(.2,1.8,.4,1) forwards; }
@keyframes starIn { from { transform: scale(0) rotate(-40deg); } to { transform: scale(.86) rotate(0); } }
.res-list { list-style: none; padding: 0; margin: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.res-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(0,0,0,.22); font-weight: 800; font-size: 15px; text-align: left; }
.res-list li .ico { width: 20px; height: 20px; }
.res-list li .ok, .res-list li .no { margin-left: auto; width: 22px; height: 22px; background: currentColor; flex: none; }
.res-list li .ok { color: var(--green); -webkit-mask: var(--chk) center/contain no-repeat; mask: var(--chk) center/contain no-repeat;
  --chk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2l-4.2-4.2-1.8 1.8 6 6 12-12-1.8-1.8z'/%3E%3C/svg%3E"); }
.res-list li .no { color: #ff8a98; -webkit-mask: var(--crs) center/contain no-repeat; mask: var(--crs) center/contain no-repeat;
  --crs: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.4L17.6 5 12 10.6 6.4 5 5 6.4 10.6 12 5 17.6 6.4 19 12 13.4 17.6 19 19 17.6 13.4 12z'/%3E%3C/svg%3E"); }
.res-list li .ico.star { color: var(--gold); }
.res-list li.miss .ico.star { color: rgba(255,255,255,.25); }

#paused { background: rgba(15,10,30,.6); }
.res-card.small { gap: 18px; }

/* #loading + the ad quick start loader (.ld-*): inline in index.html (first paint without this file, boot-speed) */
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 5px solid rgba(255,255,255,.15); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#debug { position: absolute; left: 6px; bottom: 6px; font: 11px/1.3 monospace; background: rgba(0,0,0,.6); padding: 4px 6px; border-radius: 6px; pointer-events: none; white-space: pre; }

@media (min-width: 700px) and (min-height: 500px) {
  .ctl-btn { opacity: .85; }
}

/* =====================================================================
   v0.2 meta screens: home, sheets, builder, replay, results rewards
   ===================================================================== */
:root { --r-common: #b8c2dc; --r-rare: #5fb6ff; --r-epic: #c77dff; --r-legendary: #ffb02e; --panel2: rgba(36, 27, 66, .92); }
.ico.trophy { color: var(--gold); --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h12v2h4v3a5 5 0 0 1-5 5h-.3A6 6 0 0 1 13 15.9V19h4v3H7v-3h4v-3.1A6 6 0 0 1 7.3 12H7a5 5 0 0 1-5-5V4h4zm0 4H4v1a3 3 0 0 0 2 2.8zm12 0v3.8A3 3 0 0 0 20 7V6z'/%3E%3C/svg%3E"); }
.ico.vault { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M3 3h18v16h-2v2h-3v-2H8v2H5v-2H3zm9 3a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm0 2.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5z'/%3E%3C/svg%3E"); }
.ico.shield { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1l9 4v6c0 5.5-3.8 10.3-9 12-5.2-1.7-9-6.5-9-12V5z'/%3E%3C/svg%3E"); }
.ico.back { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 3.5 7 12l8.5 8.5 2.1-2.1L11.2 12l6.4-6.4z'/%3E%3C/svg%3E"); }
.ico.help { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a6 6 0 0 1 6 6c0 2.6-1.6 3.7-2.8 4.6-1 .7-1.7 1.2-1.7 2.4v1h-3v-1c0-2.6 1.6-3.7 2.8-4.6 1-.7 1.7-1.2 1.7-2.4a3 3 0 0 0-6 0H6a6 6 0 0 1 6-6zm-1.5 16h3v3h-3z'/%3E%3C/svg%3E"); }
.ico.hammer { color: #ffb86b; --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6l5-4 4 3 2-1 3 3-1 2 4 4-3 3-4-4-2 1-3-3 1-2zM9 11l3 3-7.5 7.5-3-3z'/%3E%3C/svg%3E"); }
.ico.play { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3.5v17a1 1 0 0 0 1.5.9l13.5-8.5a1 1 0 0 0 0-1.8L7.5 2.6A1 1 0 0 0 6 3.5z'/%3E%3C/svg%3E"); }
.ico.close { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.4 17.6 5 12 10.6 6.4 5 5 6.4 10.6 12 5 17.6 6.4 19 12 13.4 17.6 19 19 17.6 13.4 12z'/%3E%3C/svg%3E"); }
.ico.trash { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 2h6l1 2h5v3H3V4h5zM5 8h14l-1.2 13.1A2 2 0 0 1 15.8 23H8.2a2 2 0 0 1-2-1.9z'/%3E%3C/svg%3E"); }

.big-btn.sm { min-width: 0; font-size: 20px; padding: 13px 18px; border-radius: 18px; letter-spacing: 1px; box-shadow: 0 5px 0 #b86a0a, 0 8px 16px rgba(0,0,0,.35), inset 0 2px 0 rgba(255,255,255,.7); }
.big-btn.ghost.sm { box-shadow: 0 5px 0 #2a1f52, 0 8px 16px rgba(0,0,0,.35); font-size: 18px; }
.big-btn:disabled { filter: grayscale(.7) brightness(.8); cursor: default; }
.big-btn .ico { width: 22px; height: 22px; vertical-align: -4px; margin-right: 6px; }
.round-btn { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--cream); background: var(--panel);
  box-shadow: 0 3px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12); pointer-events: auto; }
.round-btn .ico { width: 22px; height: 22px; }
.round-btn.txt { font-weight: 900; font-size: 15px; }
.mini { padding: 8px 14px; border-radius: 12px; font-weight: 900; font-size: 14px; color: var(--ink); background: linear-gradient(#ffe36b, #ffb21f); box-shadow: 0 3px 0 #b86a0a; pointer-events: auto; }
.mini.ghost { background: rgba(255,255,255,.14); color: var(--cream); box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.mini.red { background: linear-gradient(#ff6b7a, #e0283f); color: #fff; box-shadow: 0 3px 0 #8a1024; }
.mini:active, .round-btn:active { transform: translateY(2px); }
.chip { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: .5px; white-space: nowrap; }
.chip.bad { background: #e0283f; color: #fff; animation: chipPulse 1.6s ease-in-out infinite; }
.chip.ok { background: #1fae6a; color: #fff; }
.chip.warn { background: #ffb21f; color: var(--ink); }
@keyframes chipPulse { 50% { box-shadow: 0 0 0 4px rgba(224,40,63,.35); } }
.muted { opacity: .78; font-weight: 700; font-size: 14px; line-height: 1.35; margin: 0 0 12px; }
.center { text-align: center; }
.spin-sm { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: var(--gold); animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 8px; }
.loading-row { padding: 22px; text-align: center; font-weight: 800; opacity: .85; }
.offline-badge { align-self: center; padding: 5px 12px; border-radius: 999px; background: rgba(90, 96, 120, .92); color: #e8ebf5; font-size: 12px; font-weight: 800;
  box-shadow: 0 2px 0 rgba(0,0,0,.3); white-space: nowrap; }
.offline-badge::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ffb21f; margin-right: 6px; vertical-align: 0; }
.hud-off { position: absolute; left: 10px; top: calc(122px + env(safe-area-inset-top)); font-size: 11px; padding: 3px 9px; }
#raid-label { position: absolute; right: 10px; top: calc(96px + env(safe-area-inset-top)); max-width: 60%; padding: 4px 10px; border-radius: 10px; background: rgba(0,0,0,.4);
  font-size: 12px; font-weight: 800; color: #d9d0ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- home ---------- */
#home { flex-direction: column; justify-content: flex-end; align-items: center; gap: 10px;
  padding: calc(64px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(27,20,48,.75) 0, rgba(27,20,48,0) 18%, rgba(27,20,48,0) 34%, rgba(27,20,48,.8) 58%, rgba(27,20,48,.96) 100%); }
#home > * { width: 100%; max-width: 440px; }
#home > .offline-badge { width: auto; }
.home-spacer { flex: 1; }
.home-top { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: calc(100% - 20px); max-width: 440px;
  display: flex; gap: 6px; align-items: center; }
.who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--panel); color: var(--cream); text-align: left;
  box-shadow: 0 2px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12); }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 18px; color: var(--ink);
  background: linear-gradient(#ffd0a0, #ff8a3c); box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); }
.who-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.who-t b { font-size: 15px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-t small { font-size: 11px; font-weight: 800; color: var(--gold); }
.home-top .pill { padding: 8px 11px 8px 8px; font-size: 15px; }
.card { background: var(--panel2); border-radius: 20px; padding: 12px 12px 10px; box-shadow: 0 6px 0 rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.1); }
.pets-card header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.pets-card h3 { margin: 0; font-size: 17px; font-weight: 900; }
.pets-card header small { font-size: 14px; font-weight: 900; color: var(--gold); display: flex; align-items: center; gap: 4px; }
.pets-card footer { font-size: 11.5px; font-weight: 700; opacity: .7; margin-top: 8px; line-height: 1.3; }
.pet-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; touch-action: pan-x; padding-bottom: 2px; }
.pet-row::-webkit-scrollbar { display: none; }
.pet-card { flex: none; width: 112px; border-radius: 16px; padding: 6px 6px 7px; background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.08); text-align: center; position: relative; }
.pet-card.on { background: rgba(255, 201, 60, .1); border-color: rgba(255, 201, 60, .45); }
.pet-img { position: relative; height: 78px; border-radius: 12px; background: radial-gradient(circle at 50% 60%, rgba(255,255,255,.16), rgba(255,255,255,0) 70%); }
.pet-img img { width: 78px; height: 78px; object-fit: contain; display: block; margin: 0 auto; }
.pet-img .rar { position: absolute; left: 0; top: 0; font-size: 9.5px; font-weight: 900; padding: 2px 6px; border-radius: 8px; color: var(--ink); background: var(--r-common); text-transform: uppercase; letter-spacing: .4px; }
.r-rare .pet-img .rar { background: var(--r-rare); } .r-epic .pet-img .rar { background: var(--r-epic); color: #fff; } .r-legendary .pet-img .rar { background: var(--r-legendary); }
.pet-name { font-weight: 900; font-size: 14px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pet-inc { font-size: 12px; font-weight: 800; opacity: .85; display: flex; justify-content: center; align-items: center; gap: 3px; height: 17px; }
.pet-inc .ico { width: 13px; height: 13px; }
.pet-unsettled { font-size: 10px; font-weight: 900; color: #ffb21f; }
.seg { display: flex; margin-top: 5px; border-radius: 10px; background: rgba(0,0,0,.35); padding: 2px; }
.seg button { flex: 1; min-width: 0; padding: 6px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.2px; border-radius: 8px; font-size: 12px; font-weight: 900; background: transparent; color: rgba(255,246,230,.6); }
html[lang="ru"] .seg button { font-size: 11px; padding-left: 0; padding-right: 0; letter-spacing: -.3px; }
.seg button.sel { background: linear-gradient(#8f6bff, #5a37c9); color: #fff; box-shadow: 0 2px 0 rgba(0,0,0,.3); }
.pet-card:not(.on) .seg button.sel { background: linear-gradient(#4fc58a, #23905a); }
.home-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 9px; border-radius: 16px; color: var(--cream);
  background: linear-gradient(#4a3a85, #33275f); box-shadow: 0 5px 0 #1f1740, inset 0 1px 0 rgba(255,255,255,.15); }
.tile-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #1f1740; }
.tile-btn .ico { width: 26px; height: 26px; }
.tile-btn b { font-size: 14px; font-weight: 900; }
.tile-btn em { font-style: normal; font-size: 10px; font-weight: 900; padding: 1px 7px; border-radius: 999px; }
.tile-btn em.bad { background: #e0283f; color: #fff; } .tile-btn em.ok { background: #1fae6a; color: #fff; }
.tile-btn .ico.vault { color: #c9b8ff; } .tile-btn .ico.shield { color: #6cd4ff; }
.badge { position: absolute; top: -6px; right: -4px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: #ff3b4f; color: #fff;
  font-style: normal; font-size: 13px; font-weight: 900; line-height: 24px; box-shadow: 0 2px 0 rgba(0,0,0,.3), 0 0 0 2px #2a1f52; animation: pop .4s; }
.big-btn.raid { display: flex; flex-direction: column; align-items: center; padding: 12px 20px 10px; font-size: 38px; letter-spacing: 5px; line-height: 1;
  background: linear-gradient(#ff8f6b, #ff4b5c 55%, #d61f45); color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.25); box-shadow: 0 7px 0 #8a1024, 0 12px 22px rgba(0,0,0,.45), inset 0 2px 0 rgba(255,255,255,.45); }
.big-btn.raid small { font-size: 12px; letter-spacing: 1px; font-weight: 800; opacity: .9; margin-top: 3px; text-shadow: none; }
.big-btn.raid:active { box-shadow: 0 2px 0 #8a1024; }
.big-btn.raid.loading { filter: saturate(.6); pointer-events: none; }

/* ---------- sheet ---------- */
.sheet { background: rgba(12, 8, 26, .6); align-items: flex-end; z-index: 30; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet-card { width: 100%; max-width: 480px; max-height: 82%; display: flex; flex-direction: column; border-radius: 26px 26px 0 0;
  background: linear-gradient(#3d2f6e, #2a1f52); padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 30px rgba(0,0,0,.45); animation: sheetIn .3s cubic-bezier(.2,1.2,.4,1); }
@keyframes sheetIn { from { transform: translateY(40%); opacity: 0; } }
.sheet.narrow .sheet-card { max-width: 420px; }
.sheet-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheet-card h2 { margin: 0; font-size: 22px; font-weight: 900; color: var(--gold); }
#sheet-body { overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; }
/* room for the 3D buttons' drop shadow: the scroll box clipped it into square corners (2026-10-11, Ilya's screenshot) */
/* --sh-px = the card's side padding: the body reaches the card edge, so full-bleed rows (margin 0 calc(-1 * var(--sh-px))) still fit */
.sheet-card { --sh-px: 16px; }
#sheet-body { padding: 6px var(--sh-px) 18px; margin: -6px calc(-1 * var(--sh-px)) -14px; }
/* sticky boxes inside it stick to the padding edge: pull them back onto the scroll box edge (shop head, wardrobe bar, leaderboard pin) */
#sheet-body .lb-pin { bottom: -18px; }
@media (min-width: 700px) and (min-height: 560px) { .sheet { align-items: center; } .sheet-card { border-radius: 26px; } }
.row { display: flex; gap: 10px; margin-top: 14px; }
.row .big-btn { flex: 1; }
/* two buttons side by side: long labels (ru "Распределить", de "Jetzt verteilen") touched the edges at 360-390 px; tighter
   tracking + side padding, font follows the viewport on narrow phones, multi-word labels wrap to 2 lines (2026-10-11) */
.row .big-btn.sm { min-width: 0; padding-left: 10px; padding-right: 10px; letter-spacing: .3px; font-size: min(20px, 5vw); line-height: 1.15; }
.row .big-btn.ghost.sm { font-size: min(18px, 4.6vw); }
.name-form input { width: 100%; padding: 14px 16px; border-radius: 14px; border: 3px solid #6c5aa8; background: #1b1430; color: var(--cream); font: 900 20px var(--font);
  user-select: text; -webkit-user-select: text; touch-action: manipulation; outline: none; }
.name-form input:focus { border-color: var(--gold); }
.err { margin-top: 8px; color: #ff8a98; font-weight: 800; font-size: 14px; }
.lb { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.lb li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(0,0,0,.22); font-weight: 800; }
.lb li.me { background: rgba(255, 201, 60, .18); box-shadow: inset 0 0 0 2px rgba(255, 201, 60, .5); }
.lb .rank { width: 26px; text-align: center; font-weight: 900; color: var(--gold); }
.lb li:not(.top) .rank { color: var(--cream); opacity: .7; }
.lb .nm { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.lb .nm-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lb .lb-pf { flex: none; display: inline-flex; width: 13px; height: 13px; color: var(--cream); opacity: .5; }
.lb .lb-pf svg { display: block; }
.lb .nm .lb-you { flex: none; }
.lb .lg { font-size: 11px; opacity: .7; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; text-align: right; }
.lb .lg small { font-size: 10px; opacity: .85; }
.lb .lb-you { font-style: normal; font-size: 10px; font-weight: 900; padding: 1px 6px; border-radius: 999px; background: var(--gold); color: #3a2a00; vertical-align: 2px; }
.lb-count { font-size: 12px; font-weight: 800; opacity: .7; margin: 0 2px 6px; }
.lb-more { width: 100%; margin-top: 8px; }
.lb-pin { position: sticky; bottom: 0; margin-top: 8px; padding-top: 6px; background: linear-gradient(rgba(42,31,82,0), #2a1f52 30%); }
.lb-pin-note { font-size: 12.5px; font-weight: 800; text-align: center; padding: 10px 12px; border-radius: 12px; background: rgba(255,201,60,.12); color: #f3e8c8; }
.lb .tr { display: flex; align-items: center; gap: 4px; font-weight: 900; }
/* name flair pills (src/shop.js badgesHtml / nameHtml) live here, not in a lazy sheet: a cold leaderboard / defense log / friends row always gets the pill */
.ph-gold { color: #ffd64a; text-shadow: 0 0 8px rgba(255,200,60,.55), 0 1px 0 #8a5a00; }
.ph-badge { display: inline-flex; align-items: center; vertical-align: 2px; margin-left: 5px; padding: 1px 6px; border-radius: 7px; font-size: 9.5px; font-weight: 900;
  letter-spacing: .3px; line-height: 1.45; white-space: nowrap; color: #fff; background: linear-gradient(#a99bd6, #6c5aa8); box-shadow: 0 1px 0 #3a2d6b; }
.ph-badge.pass, .ph-badge.inviter10 { color: #2a1a00; background: linear-gradient(#fff1a0, #ffc21f); box-shadow: 0 1px 0 #a86a00; }
.ph-badge.starter { background: linear-gradient(#ff9f5a, #ff6a2a); box-shadow: 0 1px 0 #a8401a; padding: 2px 4px; }
.ph-badge.starter .ico.star { width: 11px; height: 11px; color: #fff; background: #fff; }
.ph-badge.hero { background: linear-gradient(#ff8a8a, #e04a4a); box-shadow: 0 1px 0 #8b1d1d; }
.ph-badge.inviter1, .ph-badge.inviter3 { color: #08223d; background: linear-gradient(#a6e3ff, #4fb0f5); box-shadow: 0 1px 0 #1d5d9b; }
/* tight rows (nameHtml with max): pills that do not fit next to the name wrap under it, never clipped; only a name too long for the row ellipsizes */
.ph-nmw { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 5px; max-width: 100%; min-width: 0; vertical-align: bottom; }
.ph-nmw > .ph-nm { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the pill group wraps as one unit; in a very narrow column a pill that does not fit drops to a hidden 2nd line (never half-clipped) */
.ph-bdg { flex: 0 1 auto; min-width: min-content; display: inline-flex; flex-wrap: wrap; gap: 4px; max-height: 18px; overflow: hidden; font-size: 9.5px; }
.ph-bdg > .ph-badge { margin-left: 0; }
.defs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
/* defense log card (owner 2026-10-12): avatar + full-width text, flag top-right (safety.css), one action grid at the bottom */
.defs li { position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(0,0,0,.22); border-left: 4px solid #ff3b4f; }
.defs li.held { border-left-color: var(--green); }
.d-av { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 18px; color: #fff; background: linear-gradient(#8f6bff, #5a37c9); }
.d-av.big { width: 52px; height: 52px; font-size: 24px; }
.d-main { flex: 1; min-width: 0; }
.d-line { font-weight: 800; font-size: 14px; line-height: 1.25; }
.d-sub { font-size: 12px; font-weight: 700; opacity: .8; margin-top: 2px; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.d-sub .ico { width: 13px; height: 13px; }
.d-sub.hot { color: #ffb21f; opacity: 1; font-weight: 900; }
.d-sub .loss { color: #ff8a98; font-weight: 900; margin-left: 6px; display: inline-flex; align-items: center; gap: 2px; }
.d-sub .win { color: var(--green); font-weight: 900; margin-left: 6px; }
.d-sub .d-nw { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.defs li.has-flag .d-line, .defs li.has-flag .d-line + .d-sub { padding-right: 34px; }
.d-act { flex: 1 0 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 3px; }
.d-act .mini { min-width: 0; min-height: 38px; padding: 8px 6px; line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
.d-act .mini:last-child:nth-child(odd) { grid-column: 1 / -1; }
.target .npc-tag { margin: 0 auto 10px; display: table; background: rgba(108, 212, 255, .16); color: #9fe3ff; }
.target .npc-tag.red { background: rgba(255,59,79,.2); color: #ff9aa6; }
.t-owner { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: rgba(0,0,0,.22); }
.t-owner b { font-size: 18px; font-weight: 900; display: block; }
.t-owner small { font-size: 13px; font-weight: 800; opacity: .85; display: flex; align-items: center; gap: 4px; }
.t-pets { display: flex; gap: 8px; margin: 10px 0; overflow-x: auto; }
.t-pet { flex: none; width: 92px; text-align: center; padding: 6px; border-radius: 14px; background: rgba(255,255,255,.06); border: 2px solid var(--r-common); }
.t-pet.r-rare { border-color: var(--r-rare); } .t-pet.r-epic { border-color: var(--r-epic); } .t-pet.r-legendary { border-color: var(--r-legendary); }
.t-pet img { width: 64px; height: 64px; object-fit: contain; display: block; margin: 0 auto; }
.t-pet span { display: block; font-weight: 900; font-size: 13px; }
.t-pet em { font-style: normal; font-size: 10px; font-weight: 800; opacity: .75; text-transform: uppercase; }
.t-stakes { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.t-stakes div { display: flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.25); font-weight: 800; font-size: 14px; }
.t-stakes .hot { color: #ffb21f; }
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pick { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 14px; background: rgba(255,255,255,.07); color: var(--cream); border: 2px solid transparent; }
.pick.sel { border-color: var(--gold); background: rgba(255, 201, 60, .12); }
.pick img { width: 60px; height: 60px; object-fit: contain; }
.pick b { font-size: 13px; font-weight: 900; }
.pick small { font-size: 10.5px; font-weight: 700; opacity: .75; }
.pick.empty .ico { width: 40px; height: 60px; opacity: .5; }
.help { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-weight: 700; font-size: 14.5px; line-height: 1.35; }
.help.bad li::marker { color: #ff3b4f; }
#meta-toast { position: absolute; left: 50%; top: calc(76px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 50; width: max-content; max-width: min(90vw, 440px); box-sizing: border-box;
  padding: 10px 16px; border-radius: 14px; background: rgba(255, 246, 230, .96); color: var(--ink); font-weight: 900; font-size: 14px; text-align: center;
  box-shadow: 0 4px 0 rgba(0,0,0,.3); animation: hintIn .3s cubic-bezier(.2,1.6,.4,1); pointer-events: none; }
#meta-toast.warn { background: #ffd9de; color: #7a0f22; }
#meta-toast.ok { background: #d6ffe8; color: #0d5a33; }
/* connection: offline fallback that keeps reconnecting (src/netstatus.js), title screen; Home says it in its offline line */
#net-chip { position: absolute; left: 50%; top: calc(8px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 49; pointer-events: none;
  padding: 4px 11px; border-radius: 999px; background: rgba(40, 34, 70, .9); color: #e8ebf5; font-size: 12px; font-weight: 800; white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0,0,0,.3); }
#net-chip::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ffb21f; margin-right: 6px; animation: netPulse 1.2s ease-in-out infinite; }
@keyframes netPulse { 50% { opacity: .25; } }

/* ---------- results additions ---------- */
.res-label { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: rgba(0,0,0,.3); color: #d9d0ff; margin-top: -4px; }
.res-rewards { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; }
.rw-pill { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,.3); font-weight: 900; font-size: 20px; animation: pop .4s; }
.rw-pill .ico { width: 22px; height: 22px; }
.rw-pill.up { color: #ffe18a; } .rw-pill.down { color: #ff9aa6; }
.rw-pill.pet { font-size: 15px; background: linear-gradient(#8b3fd1, #5b2397); color: #fff; }
.rw-pill.wait { font-size: 14px; opacity: .8; }
.rw-note { font-size: 13.5px; font-weight: 800; padding: 8px 12px; border-radius: 12px; background: rgba(0,0,0,.25); color: #d9d0ff; }
.rw-note.err { color: #ffb0ba; }
.res-btns { display: flex; gap: 10px; width: 100%; }
.res-btns .big-btn { flex: 1; min-width: 0; font-size: 22px; padding: 15px 10px; letter-spacing: 1px; }
.res-btns .big-btn.ghost { flex: .75; font-size: 18px; }
#paused .big-btn { width: 240px; }

/* ---------- builder ---------- */
#builder { position: absolute; inset: 0; pointer-events: none; }
#b-touch { position: absolute; inset: 0; pointer-events: auto; touch-action: none; }
.b-top { position: absolute; top: 0; left: 0; right: 0; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; display: flex; flex-direction: column; gap: 5px;
  background: linear-gradient(rgba(27,20,48,.95), rgba(27,20,48,.82) 75%, rgba(27,20,48,0)); pointer-events: none; }
.b-top > * { pointer-events: auto; }
.b-row { display: flex; align-items: center; gap: 8px; }
.b-title { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.b-title b { font-size: 19px; font-weight: 900; }
.b-sub { text-align: center; font-size: 12px; font-weight: 800; opacity: .8; margin-top: -2px; }
.budget { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 12px; background: rgba(0,0,0,.3); }
.budget .ico { width: 18px; height: 18px; }
.bbar { flex: 1; height: 10px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; }
.bbar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #3ee08f, #ffc93c); transition: width .2s; }
.bbar.over i { background: #ff3b4f; }
.budget b { font-size: 13px; font-weight: 900; min-width: 64px; text-align: right; }
.b-top .offline-badge { margin-top: 2px; }
.b-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 0 calc(10px + env(safe-area-inset-bottom)); pointer-events: auto;
  background: linear-gradient(rgba(27,20,48,0), rgba(27,20,48,.9) 22%, rgba(27,20,48,.97)); }
.b-tip { text-align: center; font-size: 12.5px; font-weight: 800; opacity: .85; padding: 0 12px 6px; min-height: 22px; }
#b-palette { display: flex; gap: 6px; overflow-x: auto; padding: 2px 10px 6px; scrollbar-width: none; touch-action: pan-x; }
#b-palette::-webkit-scrollbar { display: none; }
.tool { flex: none; width: 64px; display: flex; flex-direction: column; align-items: center; padding: 4px 2px 5px; border-radius: 14px; color: var(--cream);
  background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.06); }
.tool.sel { background: rgba(255, 201, 60, .16); border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255, 201, 60, .2); }
.tool-img { width: 44px; height: 44px; display: grid; place-items: center; }
.tool-img img { width: 44px; height: 44px; object-fit: contain; }
.tool-img .ico { width: 30px; height: 30px; }
.tool b { font-size: 11px; font-weight: 900; white-space: nowrap; }
.tool[data-tool="reinforced"] b { font-size: 10px; letter-spacing: -.3px; }
.tool small { font-size: 10px; font-weight: 900; color: #ffb86b; min-height: 13px; white-space: nowrap; }
.tool small.none { color: #ff7d8c; }
.tool.locked .tool-img { filter: grayscale(1) brightness(.6); }
.tool.locked b { opacity: .6; }
.tool small.lv { color: #c9c0ea; display: inline-flex; align-items: center; gap: 2px; }
.tool small.lv .ico { width: 10px; height: 10px; }
.tool.erase { color: #ff9aa6; }
.b-actions { display: flex; gap: 10px; padding: 4px 12px 0; max-width: 480px; margin: 0 auto; }
.b-actions .big-btn { flex: 1; }
.b-actions #b-save { flex: .7; }
/* vault-publish: Save | Test (both optional) | Publish; the guided first build pulses the next thing to tap */
.b-actions { gap: 8px; }
.b-actions #b-test { flex: 0 0 auto; padding-left: 16px; padding-right: 16px; }
@media (max-width: 420px) { .b-actions #b-test .lbl { display: none; } } /* narrow phones: the play icon alone */
.b-actions #b-publish { flex: 1.15; }
.b-actions #b-save { flex: 1; }
.b-actions #b-publish.bad { filter: saturate(.55) brightness(.9); }
.b-actions .big-btn.sm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; padding-left: 10px; padding-right: 10px; letter-spacing: .2px; font-size: min(19px, 4.3vw); }
.b-actions #b-publish .ico { margin-right: 4px; }
.b-sub.guide { opacity: 1; color: #ffe066; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
#b-palette .tool.coach, #b-publish.coach { outline: 3px solid rgba(255, 224, 102, .9); outline-offset: 2px; animation: vp-coach 1.1s ease-in-out infinite; }
@keyframes vp-coach { 0%, 100% { outline-color: rgba(255, 224, 102, .15); } 50% { outline-color: rgba(255, 224, 102, .95); } } /* outline: the buttons keep their 3D lip shadow */
@media (prefers-reduced-motion: reduce) { #b-palette .tool.coach, #b-publish.coach { animation: none; } }
#b-dog-bar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(222px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 14px; border-radius: 16px; background: rgba(255, 138, 60, .95); color: var(--ink); font-weight: 900; font-size: 13px; pointer-events: auto;
  box-shadow: 0 4px 0 rgba(0,0,0,.3); white-space: nowrap; }
#b-dog-bar .mini.ghost { background: rgba(0,0,0,.18); color: var(--ink); }

/* ---------- replay ---------- */
#replay-ui { position: absolute; inset: 0; pointer-events: none; }
.rp-top { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px; display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 8px; border-radius: 16px; background: var(--panel); pointer-events: auto; }
.rp-top > div:nth-child(2) { flex: 1; min-width: 0; line-height: 1.15; }
.rp-top b { display: block; font-size: 15px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-top small { font-size: 12px; font-weight: 800; opacity: .8; }
.rp-tag { padding: 4px 8px; border-radius: 8px; background: #8fe9ff; color: var(--ink); font-size: 11px; font-weight: 900; letter-spacing: 1px; }
.rp-pick { position: absolute; left: 50%; top: calc(76px + env(safe-area-inset-top)); transform: translateX(-50%); padding: 6px 12px; border-radius: 12px;
  background: rgba(0,0,0,.5); font-weight: 900; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.rp-bar { position: absolute; left: 10px; right: 10px; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px;
  padding: 8px; border-radius: 18px; background: var(--panel2); pointer-events: auto; box-shadow: 0 4px 0 rgba(0,0,0,.3); max-width: 560px; margin: 0 auto; }
.play-btn { width: 48px; height: 48px; background: linear-gradient(#ffe36b, #ffb21f); color: var(--ink); }
.play-btn .ico.pause { display: none; }
.play-btn.playing .ico.play { display: none; } .play-btn.playing .ico.pause { display: block; }
.rp-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rp-mid span { font-size: 12px; font-weight: 800; opacity: .8; text-align: right; }
#rp-scrub { width: 100%; accent-color: #ffc93c; height: 26px; touch-action: none; }
.rp-track { position: relative; }
.rp-marks { position: absolute; left: 8px; right: 8px; top: -3px; height: 6px; pointer-events: none; }
.rp-mk { position: absolute; top: 0; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #8fe9ff; box-shadow: 0 0 0 1.5px rgba(27,20,48,.85); }
.rp-mk.coin { background: #ffc93c; } .rp-mk.pet { background: #ff8ad8; width: 8px; height: 8px; margin-left: -4px; top: -1px; }
.rp-mk.alarm { background: #ff3b4f; } .rp-mk.door { background: #3ee08f; } .rp-mk.end { background: #fff; }
.rp-cap { position: absolute; left: 50%; top: calc(118px + env(safe-area-inset-top)); transform: translate(-50%, -6px) scale(.92); max-width: calc(100% - 32px);
  padding: 7px 14px; border-radius: 14px; background: rgba(27,20,48,.82); color: #fff; font-size: 15px; font-weight: 900; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .18s, transform .18s; pointer-events: none; box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.rp-cap.in { opacity: 1; transform: translate(-50%, 0) scale(1); }
.rp-cap.coin { color: #ffd84a; } .rp-cap.pet { color: #ffb0e6; } .rp-cap.alarm, .rp-cap.end { background: rgba(160,20,40,.88); }
.rp-cap.gadget, .rp-cap.skill { color: #9fe8ff; } .rp-cap.door, .rp-cap.key, .rp-cap.safe { color: #7ff0b8; }
.rp-end { display: none !important; }
.pet-card.more { border: 2px dashed rgba(255,255,255,.18); background: transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.pet-card.more .pet-img { display: grid; place-items: center; background: none; }
.pet-card.more .pet-img .ico { width: 40px; height: 40px; opacity: .45; }
.pet-more-t { font-size: 11px; font-weight: 700; opacity: .65; line-height: 1.25; margin-top: 4px; }

/* ---------- mobile hardening + analog stick (v0.2 owner feedback) ---------- */
html, body { height: 100%; height: 100dvh; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; position: fixed; inset: 0; width: 100%; }
#app { height: 100%; height: 100dvh; }
#app * { -webkit-touch-callout: none; }
/* iOS app only (src/native.js iosPolish sets html.ios-kb while a field has focus / the keyboard is up): the game behind a sheet keeps
   its full height instead of reflowing into the shrunken WebView (Keyboard resize 'native'); its bottom is hidden by the keyboard */
html.ios-kb #gl, html.ios-kb #home, html.ios-kb #title { bottom: auto; height: var(--ph-full-h, 100%); }
input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.touch .only-desk, .desk .only-touch { display: none !important; }
.touch #btn-sneak { display: none; }
.touch #btn-gadget { right: calc(22px + env(safe-area-inset-right)); bottom: calc(40px + env(safe-area-inset-bottom)); width: 96px; height: 96px; }
.touch #btn-gadget .ico { width: 34px; height: 34px; }
.hud-top { left: calc(10px + env(safe-area-inset-left)); right: calc(10px + env(safe-area-inset-right)); }
#objective { right: calc(10px + env(safe-area-inset-right)); top: calc(58px + env(safe-area-inset-top)); }
#raid-label { right: calc(10px + env(safe-area-inset-right)); top: calc(94px + env(safe-area-inset-top)); }
#raid-label.fade { animation: labelFade 5s forwards; }
@keyframes labelFade { 0%, 75% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.hud-off { top: calc(58px + env(safe-area-inset-top)); left: calc(10px + env(safe-area-inset-left)); }
#stick-zone { left: env(safe-area-inset-left); }
/* stick: inner disc = sneak zone, outer ring = run */
#stick { background: radial-gradient(circle, rgba(255,255,255,.05) 0 46%, rgba(255,255,255,.14) 47% 100%); }
.stick-zone-ring { position: absolute; left: 50%; top: 50%; width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 50%;
  border: 2px dashed rgba(196, 176, 255, .7); background: rgba(143, 107, 255, .14); transition: background .15s, border-color .15s; }
#stick-knob { width: 46px; height: 46px; margin: -23px 0 0 -23px; display: grid; place-items: center; transition: background .12s; }
#stick-knob .ico { width: 24px; height: 24px; color: #6b3fd6; opacity: 0; transition: opacity .12s; }
#stick.sneak .stick-zone-ring { background: rgba(143, 107, 255, .35); border-color: #c4b0ff; border-style: solid; }
#stick.sneak #stick-knob { background: radial-gradient(circle at 40% 35%, #f1ebff, #b49cff 60%, #7b55f0); box-shadow: 0 0 0 5px rgba(180,156,255,.35), 0 4px 0 rgba(0,0,0,.35); }
#stick.sneak #stick-knob .ico { opacity: 1; color: #fff; }
#stick.run { border-color: rgba(255, 190, 120, .6); }
#stick.run #stick-knob { background: radial-gradient(circle at 40% 35%, #fff, #ffe0b8 60%, #ffb36b); }
#stick-mode { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 900;
  letter-spacing: .5px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.45); color: #fff; }
#stick-mode:empty { display: none; }
#stick.sneak #stick-mode { color: #d9ccff; }
#stick.run #stick-mode { color: #ffd2a6; }
@media (max-height: 760px) {
  .pill { font-size: 15px; padding: 6px 11px 6px 8px; }
  #hint { font-size: 15px; padding: 9px 14px; }
}
/* landscape phones: compact meta UI */
@media (orientation: landscape) and (max-height: 500px) {
  #home { padding-top: calc(54px + env(safe-area-inset-top)); gap: 6px; }
  #home > * { max-width: 560px; }
  .pets-card { padding: 8px 10px; }
  .pet-card { width: 98px; }
  .pet-img, .pet-img img { height: 56px; width: 56px; }
  .home-actions .tile-btn { flex-direction: row; justify-content: center; padding: 7px 4px; }
  .big-btn.raid { font-size: 28px; padding: 8px 16px 6px; }
  .big-btn.raid small { display: none; }
  .logo-top { font-size: 44px; } .logo-bot { font-size: 64px; }
  .title-wrap { padding-top: calc(24px + env(safe-area-inset-top)); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  #results .res-card { transform: none; }
  .b-bottom .b-tip { display: none; }
}
/* palette scroll affordance: fade the right edge until the end is reached */
#b-palette { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
#b-palette.end { -webkit-mask-image: none; mask-image: none; }

/* =====================================================================
   v0.3 raid HUD (RAID stream): objective chips, keycards, gems, gadgets, EMP, story
   ===================================================================== */
.ico.raid-gem { color: #6cf0ff; --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3h12l4 6-10 12L2 9z'/%3E%3C/svg%3E"); }
.ico.raid-safe { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M3 3h18v16h-2v2h-3v-2H8v2H5v-2H3zm9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm0 2.2a1.8 1.8 0 1 1 0 3.6 1.8 1.8 0 0 1 0-3.6z'/%3E%3C/svg%3E"); }
.ico.raid-nosmoke { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='14' r='4'/%3E%3Ccircle cx='13' cy='10' r='5'/%3E%3Ccircle cx='16' cy='15' r='3.5'/%3E%3Cpath d='M3.5 2 22 20.5 20.5 22 2 3.5z'/%3E%3C/svg%3E"); }
.ico.raid-clock { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20zm0 2.5a7.5 7.5 0 1 0 0 15 7.5 7.5 0 0 0 0-15zM11 6h2v5.6l3.6 2.1-1 1.7L11 12.8z'/%3E%3C/svg%3E"); }
.ico.raid-bone { color: #ffd34d; --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.5 3a2.8 2.8 0 0 1 2.7 3.6l9.2 9.2A2.8 2.8 0 1 1 21 18.5a2.8 2.8 0 1 1-3.6 2.7 2.8 2.8 0 0 1 .3-2.3L5.1 8.3A2.8 2.8 0 1 1 3 5.5 2.8 2.8 0 0 1 5.5 3z'/%3E%3C/svg%3E"); }
.ico.raid-card { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M2 6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2zm0 2h20v3H2zm3 6v3h5v-3z'/%3E%3C/svg%3E"); }
.ico.raid-duck { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='7' r='4.5'/%3E%3Cpath d='M12.5 6h6l-2.2 2.6h-4z'/%3E%3Cpath d='M2 13c3 1 6 1 9-1 3 0 6 .5 10-1-1 6-5 9-10 9-5 0-8-3-9-7z'/%3E%3C/svg%3E"); }
.ico.raid-bolt, .ico.raid-emp-i { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 1 4 14h6l-2 9 11-13h-6z'/%3E%3C/svg%3E"); }
.ico.raid-drill { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 6.5h11.5l2 2v4l-2 2H2z'/%3E%3Cpath d='M5 15h4.5l-1 7H4.5z'/%3E%3Cpath d='M16 9h2.2v3H16z'/%3E%3Cpath d='M18.6 9.2 23 10.5l-4.4 1.3z'/%3E%3Cpath d='M3 3.5h4v2H3z'/%3E%3C/svg%3E"); }
.ico.raid-treat { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 2.6a3 3 0 0 0-2.9 3.8 3 3 0 1 0 3.6 3.6l6.7 6.7a3 3 0 1 0 3.6 3.6 3 3 0 1 0 3.8-2.9 3 3 0 0 0-3.8-2.9 3 3 0 0 0-.7.1L10.2 7.9a3 3 0 0 0 .1-.7 3 3 0 0 0-2.9-3.8 3 3 0 0 0-.8-.8z'/%3E%3C/svg%3E"); }
.ico.raid-grapple { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 .8a2.7 2.7 0 0 1 1 5.2v8.3l4.4-2.6c.4-1.5-.3-3-1.5-3.9l1.2-1.6c2.3 1.6 3.3 4.5 2.1 7.1L13 17.1v1.2h-2v-1.2L4.8 13.3C3.6 10.7 4.6 7.8 6.9 6.2l1.2 1.6c-1.2.9-1.9 2.4-1.5 3.9L11 14.3V6a2.7 2.7 0 0 1 1-5.2zm0 1.7a1 1 0 1 0 0 2 1 1 0 0 0 0-2z'/%3E%3Cpath d='M11.1 19.3h1.8l-.5 4.2h-.8z'/%3E%3C/svg%3E"); }
.ico.raid-cloak { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 4.5C6.6 4.5 2.6 8.6 1 12c1.6 3.4 5.6 7.5 11 7.5s9.4-4.1 11-7.5c-1.6-3.4-5.6-7.5-11-7.5zm0 2.2c-4 0-7 2.7-8.5 5.3 1.5 2.6 4.5 5.3 8.5 5.3s7-2.7 8.5-5.3C19 9.4 16 6.7 12 6.7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M3.3 1.6 22.4 20.7 20.7 22.4 1.6 3.3z'/%3E%3C/svg%3E"); }
.ico.raid-slippers { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 17.4c0-2.7 1.7-5 4.5-5.6l7.4-1.5c4.2-.8 7.1 2.4 7.1 5.6v1.5H3z'/%3E%3Cpath d='M2 18.6h20v.9a1.6 1.6 0 0 1-1.6 1.6H3.6A1.6 1.6 0 0 1 2 19.5z'/%3E%3Ccircle cx='14.6' cy='8.3' r='2.7'/%3E%3Ccircle cx='5' cy='6' r='1.1'/%3E%3Ccircle cx='8.2' cy='4.3' r='.9'/%3E%3C/svg%3E"); } /* hq-p1 Silent slippers (raid HUD + loadout) */
.ico.raid-pick { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8 2a6 6 0 0 1 5.6 8.1L22 18.5V22h-3.5v-2h-2v-2h-2l-3-3A6 6 0 1 1 8 2zm-1.5 3a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z'/%3E%3C/svg%3E"); }

/* gems pill + held keycards (in the top row) */
.raid-gems { padding: 7px 11px 7px 8px; }
.raid-gems .ico { width: 18px; height: 18px; }
.raid-gems.pop { animation: pop .35s; }
.raid-keys { display: flex; gap: 4px; align-items: center; }
.raid-keycard { width: 24px; height: 17px; border-radius: 4px; background: var(--kc); position: relative; box-shadow: 0 2px 0 rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.35); }
.raid-keycard::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 3px; background: rgba(27,20,48,.75); }
.raid-keycard::after { content: ""; position: absolute; left: 4px; bottom: 3px; width: 6px; height: 4px; border-radius: 1px; background: #ffe7a0; }
.raid-keycard.new { animation: raidKeyIn .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes raidKeyIn { from { transform: scale(2.4) rotate(-20deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }

/* objective chips: compact icons + tiny labels, tap to expand */
.raid-obj { position: absolute; top: calc(54px + env(safe-area-inset-top)); left: calc(10px + env(safe-area-inset-left)); display: flex; gap: 6px;
  pointer-events: auto; touch-action: manipulation; }
.hud-off:not(.hidden) ~ .raid-obj { top: calc(86px + env(safe-area-inset-top)); }
.raid-chip { display: flex; flex-direction: column; align-items: center; gap: 1px; width: auto; min-width: 44px; max-width: 60px; }
.raid-chip-i { position: relative; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--panel); box-shadow: 0 2px 0 rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.14); }
.raid-chip-i .ico { width: 17px; height: 17px; }
.raid-chip-s { font-size: 9.5px; font-weight: 900; letter-spacing: .2px; line-height: 1.05; text-align: center; color: rgba(255,246,230,.85); text-shadow: 0 1px 2px rgba(0,0,0,.7); white-space: normal; overflow-wrap: anywhere; }
.raid-chip-l { display: none; }
.raid-chip.done .raid-chip-i { background: linear-gradient(#45e59a, #1ea865); box-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 10px rgba(62,224,143,.6); }
.raid-chip.done .raid-chip-i .ico { color: #fff; }
.raid-chip.done .raid-chip-i::after, .raid-chip.failed .raid-chip-i::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.raid-chip.done .raid-chip-i::after { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231ea865' d='M9 16.2l-4.2-4.2-1.8 1.8 6 6 12-12-1.8-1.8z'/%3E%3C/svg%3E") center/10px no-repeat; }
.raid-chip.failed { opacity: .55; }
.raid-chip.failed .raid-chip-i::after { background: #ff5a6a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M19 6.4L17.6 5 12 10.6 6.4 5 5 6.4 10.6 12 5 17.6 6.4 19 12 13.4 17.6 19 19 17.6 13.4 12z'/%3E%3C/svg%3E") center/9px no-repeat; }
.raid-chip.failed .raid-chip-s { text-decoration: line-through; }
.raid-chip.flash .raid-chip-i { animation: raidChipFlash .9s cubic-bezier(.2,1.4,.4,1); }
.raid-chip.failed.flash .raid-chip-i { animation: raidChipShake .45s; }
@keyframes raidChipFlash { 0% { transform: scale(1); } 20% { transform: scale(1.6); box-shadow: 0 0 0 8px rgba(62,224,143,.5), 0 0 26px #3ee08f; } 100% { transform: scale(1); } }
@keyframes raidChipShake { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.raid-obj.open { flex-direction: column; gap: 5px; padding: 8px 10px; border-radius: 14px; background: rgba(27, 20, 48, .9); box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.raid-obj.open .raid-chip { flex-direction: row; width: auto; gap: 8px; }
.raid-obj.open .raid-chip-s { display: none; }
.raid-obj.open .raid-chip-l { display: block; font-size: 13px; font-weight: 800; white-space: nowrap; }
.raid-obj.open .raid-chip.failed .raid-chip-l { text-decoration: line-through; }

/* objective / pickup banner */
.raid-pop { position: absolute; top: calc(178px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px; background: linear-gradient(#45e59a, #1ea865); color: #fff; font-weight: 900; font-size: 14px; white-space: nowrap;
  box-shadow: 0 3px 0 rgba(0,0,0,.3); animation: raidPopIn .45s cubic-bezier(.2,1.6,.4,1); }
.raid-pop .ico { width: 18px; height: 18px; color: #fff; }
.raid-pop.info { background: var(--panel2, rgba(36,27,66,.92)); }
.raid-pop .raid-ok { width: 16px; height: 16px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231ea865' d='M9 16.2l-4.2-4.2-1.8 1.8 6 6 12-12-1.8-1.8z'/%3E%3C/svg%3E") center/12px no-repeat; border-radius: 50%; }
@keyframes raidPopIn { from { transform: translateX(-50%) translateY(-10px) scale(.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }

/* raid-start story banner */
.raid-story { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); width: min(330px, 86vw); text-align: center; padding: 10px 16px 12px;
  border-radius: 18px; background: rgba(27, 20, 48, .86); box-shadow: 0 4px 0 rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.12);
  animation: raidPopIn .5s cubic-bezier(.2,1.5,.4,1); transition: opacity .4s; }
.raid-story b { display: block; font-size: 18px; font-weight: 900; color: var(--gold); }
.raid-story span { display: block; margin-top: 3px; font-size: 13.5px; font-weight: 700; color: rgba(255,246,230,.9); line-height: 1.3; }
.raid-story.out { opacity: 0; }

/* EMP outage bar + blue screen tint */
.raid-emp { position: absolute; top: calc(140px + env(safe-area-inset-top)); left: calc(10px + env(safe-area-inset-left)); display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; background: linear-gradient(#3fa8ff, #1d5fd0); font-weight: 900; font-size: 13px; color: #fff;
  box-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 14px rgba(80,170,255,.7); }
.raid-emp .ico { width: 15px; height: 15px; color: #fff; }
.raid-emp i { width: 56px; height: 6px; border-radius: 3px; background: rgba(0,0,0,.3); overflow: hidden; }
.raid-emp s { display: block; height: 100%; width: 100%; background: #bfe6ff; }
#app.raid-emp-on #alarm-vignette { opacity: 1; background: radial-gradient(ellipse at center, rgba(60,160,255,0) 50%, rgba(60,160,255,.38) 100%); animation: raidEmpFlicker .18s steps(2) infinite; }
@keyframes raidEmpFlicker { 50% { opacity: .75; } }

/* gadget buttons: one per loadout slot, right side, thumb reachable */
#raid-gadgets { position: absolute; inset: 0; pointer-events: none; }
.raid-gbtn { width: 80px; height: 80px; background: radial-gradient(circle at 50% 30%, #6fd1ff, #2a8fd0); }
.raid-gbtn .ico { width: 28px; height: 28px; }
.raid-gbtn small { font-size: 10.5px; }
.raid-gbtn em { position: absolute; top: -4px; right: -4px; font-style: normal; width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 50%;
  background: var(--gold); color: var(--ink); font-size: 15px; box-shadow: 0 2px 0 rgba(0,0,0,.3); }
.raid-gbtn.g-decoy { background: radial-gradient(circle at 50% 30%, #ffd75a, #e59a12); }
.raid-gbtn.g-emp { background: radial-gradient(circle at 50% 30%, #7fb4ff, #2f55d8); }
.raid-gbtn.g-drill { background: radial-gradient(circle at 50% 30%, #ffb46a, #d9631c); }
.raid-gbtn.g-auto_pick { background: radial-gradient(circle at 50% 30%, #6ff0b0, #1d9e66); }
.raid-gbtn.g-treat { background: radial-gradient(circle at 50% 30%, #ffb4d8, #d9497f); }
.raid-gbtn.g-grapple { background: radial-gradient(circle at 50% 30%, #c9d2e8, #5a6688); }
.raid-gbtn.g-cloak { background: radial-gradient(circle at 50% 30%, #7ff5dc, #138f7a); }
.raid-gbtn.g-cloak .raid-cd circle { stroke: #c8fff4; }
#app.raid-cloak-on #alarm-vignette { opacity: 1; background: radial-gradient(ellipse at center, rgba(60,230,190,0) 45%, rgba(60,230,190,.42) 100%); }
.raid-gbtn.empty { filter: grayscale(1) brightness(.7); }
.raid-gbtn.pop { animation: pop .3s; }
.raid-gbtn.ready:not(.empty) { box-shadow: 0 5px 0 rgba(0,0,0,.35), 0 0 0 4px rgba(255,255,255,.75), 0 0 18px rgba(111,240,176,.9); animation: raidReady 1s ease-in-out infinite alternate; }
@keyframes raidReady { to { transform: scale(1.06); } }
.raid-cd { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); pointer-events: none; opacity: 0; }
.raid-cd circle { fill: none; stroke: #bfe6ff; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 100.5; stroke-dashoffset: 0; }
.raid-gbtn.active .raid-cd { opacity: 1; }
.raid-gbtn.g-drill.active { filter: none; animation: raidDrill .09s linear infinite alternate; }
.raid-gbtn.g-drill .raid-cd circle { stroke: #ffd27a; }
@keyframes raidDrill { from { transform: translate(-1px, 0); } to { transform: translate(1px, 1px); } }
/* desktop: a row left of the SNEAK button */
.raid-gbtn[data-slot="0"] { right: calc(132px + env(safe-area-inset-right)); bottom: calc(118px + env(safe-area-inset-bottom)); }
.raid-gbtn[data-slot="1"] { right: calc(222px + env(safe-area-inset-right)); bottom: calc(118px + env(safe-area-inset-bottom)); }
.raid-gbtn[data-slot="2"] { right: calc(312px + env(safe-area-inset-right)); bottom: calc(118px + env(safe-area-inset-bottom)); }
/* touch: big main slot in the corner, the others in an arc above / up-left of it */
.touch .raid-gbtn[data-slot="0"] { right: calc(20px + env(safe-area-inset-right)); bottom: calc(36px + env(safe-area-inset-bottom)); width: 92px; height: 92px; }
.touch .raid-gbtn[data-slot="0"] .ico { width: 32px; height: 32px; }
.touch .raid-gbtn[data-slot="1"] { right: calc(30px + env(safe-area-inset-right)); bottom: calc(148px + env(safe-area-inset-bottom)); width: 74px; height: 74px; }
.touch .raid-gbtn[data-slot="2"] { right: calc(122px + env(safe-area-inset-right)); bottom: calc(112px + env(safe-area-inset-bottom)); width: 74px; height: 74px; }
.touch #raid-gadgets[data-n="1"] .raid-gbtn[data-slot="0"] { width: 96px; height: 96px; right: calc(22px + env(safe-area-inset-right)); bottom: calc(40px + env(safe-area-inset-bottom)); }

/* lockpick card tint for safes */
.lp-card.raid-safe { background: linear-gradient(#2d4a6e, #1b2a45); }
.lp-card.raid-safe .lp-title { color: #9fe3ff; }

/* results: objectives + loot */
.raid-res-obj { width: 100%; margin-top: 8px; }
.raid-res-h { font-size: 11px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,246,230,.6); text-align: left; margin: 0 0 4px 4px; }
.raid-res-obj ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.raid-res-obj li { display: flex; align-items: center; gap: 9px; padding: 6px 11px; border-radius: 11px; background: rgba(0,0,0,.22); font-weight: 800; font-size: 13.5px; text-align: left;
  opacity: 0; animation: raidResIn .35s cubic-bezier(.2,1.5,.4,1) forwards; }
.raid-res-obj li .ico { width: 17px; height: 17px; }
.raid-res-obj li i { margin-left: auto; width: 20px; height: 20px; flex: none; border-radius: 50%; }
.raid-res-obj li i.ok { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231ea865' d='M9 16.2l-4.2-4.2-1.8 1.8 6 6 12-12-1.8-1.8z'/%3E%3C/svg%3E") center/14px no-repeat; box-shadow: 0 0 10px rgba(62,224,143,.7); }
.raid-res-obj li i.no { background: rgba(255,90,106,.85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M19 6.4L17.6 5 12 10.6 6.4 5 5 6.4 10.6 12 5 17.6 6.4 19 12 13.4 17.6 19 19 17.6 13.4 12z'/%3E%3C/svg%3E") center/12px no-repeat; }
.raid-res-obj li.ok { background: rgba(62,224,143,.16); }
.raid-res-obj li.miss { color: rgba(255,246,230,.6); }
@keyframes raidResIn { from { opacity: 0; transform: translateX(-12px) scale(.9); } to { opacity: 1; transform: none; } }
.raid-res-lootrow { display: flex; gap: 6px; justify-content: center; margin-top: 6px; flex-wrap: wrap; }
.raid-res-loot { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.25); font-weight: 900; font-size: 13px; }
.raid-res-loot .ico { width: 16px; height: 16px; }
.raid-res-loot.bone { background: linear-gradient(#ffcf3c, #e09a12); color: var(--ink); }
.raid-res-loot.bone .ico { color: var(--ink); }
.raid-res-extra:empty { display: none; }
/* 2026-10-12 (owner screenshot, ru 360 px fail card): #raid-res-extra is a flex item of the centred card column; with no width its
   min-content (the nowrap session-goal line) made it 340 px in a 296 px content box, so the level panel and the goal strip stuck out
   past the card padding. It always takes the content width now, and nothing inside may be wider. */
#results .raid-res-extra { width: 100%; min-width: 0; box-sizing: border-box; }
#results .raid-res-extra > * { max-width: 100%; box-sizing: border-box; }

/* ---------- language picker (pill over a native <select>, any number of languages) + long-language text fitting */
.lang-sw { position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; border-radius: 999px; background: var(--panel); cursor: pointer; }
.lang-sw .lang-cur { display: inline-flex; align-items: center; gap: 5px; font: 900 11px/1 "Nunito", system-ui, sans-serif; letter-spacing: .5px; color: var(--cream, #fff6e6); padding: 7px 9px; border-radius: 999px; pointer-events: none; white-space: nowrap; }
.lang-sw select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; border: 0; margin: 0; padding: 0; -webkit-appearance: none; appearance: none; }
.lang-sw:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.lang-sw .lang-globe { width: 13px; height: 13px; border: 2px solid currentColor; border-radius: 50%; box-sizing: border-box; position: relative; opacity: .85; flex: 0 0 auto; }
.lang-sw .lang-globe::before { content: ""; position: absolute; left: 50%; top: -1px; bottom: -1px; width: 5px; transform: translateX(-50%); border: 1.5px solid currentColor; border-top: 0; border-bottom: 0; border-radius: 50%; box-sizing: border-box; }
.lang-sw .lang-globe::after { content: ""; position: absolute; left: -1px; right: -1px; top: 50%; border-top: 1.5px solid currentColor; transform: translateY(-50%); }
.lang-sw .lang-caret { width: 0; height: 0; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; opacity: .8; }
.title-lang { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 2; }
.home-lang { align-self: center; }
.home-lang .lang-cur { padding: 6px 7px; font-size: 10px; }
.lang-ru .big-btn.raid { letter-spacing: 3px; }
.lang-ru .logo-sub { letter-spacing: .5px; }

/* ---------- results: compact one-screen card (scrolls with pinned buttons only as a last resort) ---------- */
#results { overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; align-items: safe center;
  padding: calc(8px + env(safe-area-inset-top)) 0 0; }
#results .res-card { flex: none; gap: 7px; padding: 14px 14px 0; margin: auto 0; }
#results .res-head { font-size: 26px; line-height: 1.1; }
#results .res-sub { font-size: 13px; line-height: 1.25; margin-top: -3px; }
#results .stars { margin: -2px 0 0; gap: 4px; }
#results .star { width: 40px; height: 40px; }
#results .star.big { width: 54px; height: 54px; margin-bottom: 8px; }
#results .res-label { margin-top: -2px; font-size: 11.5px; }
/* the three star conditions as a row of tiles */
#results .res-list { flex-direction: row; gap: 6px; }
#results .res-list li { flex: 1 1 0; min-width: 0; position: relative; flex-direction: column; justify-content: center; gap: 3px;
  padding: 7px 4px 6px; font-size: 11.5px; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
#results .res-list li .ico { width: 18px; height: 18px; }
#results .res-list li .ok, #results .res-list li .no { position: absolute; top: 4px; right: 4px; margin: 0; width: 13px; height: 13px; }
#results .res-list li.miss { color: rgba(255,246,230,.6); }
#results .raid-res-obj { margin-top: 0; }
#results .raid-res-h { margin-bottom: 3px; font-size: 10px; }
#results .raid-res-obj ul { gap: 3px; }
#results .raid-res-obj li { padding: 4px 10px; font-size: 12.5px; }
#results .raid-res-obj li .ico { width: 15px; height: 15px; }
#results .raid-res-obj li i { width: 17px; height: 17px; }
#results .raid-res-lootrow { margin-top: 4px; }
#results .meta-res { margin-top: 0; padding: 6px 10px; }
#results .meta-res-chips:not(:empty) { margin-top: 5px; }
#results .res-rewards { gap: 6px; }
#results .rw-pill { font-size: 16px; padding: 5px 12px; }
#results .rw-pill .ico { width: 18px; height: 18px; }
#results .rw-pill.pet { font-size: 13px; }
#results .res-btns { position: sticky; bottom: 0; z-index: 2; padding: 8px 0 calc(14px + env(safe-area-inset-bottom)); margin-top: -2px;
  background: linear-gradient(rgba(42,31,82,0), #2a1f52 28%); border-radius: 0 0 28px 28px; }
#results .res-card.fail .res-btns { background: linear-gradient(rgba(66,25,58,0), #42193a 28%); }
#results .res-btns .big-btn { padding: 12px 10px; font-size: 19px; }
#results .res-btns .big-btn.ghost { font-size: 16px; }
/* long secondary labels ("ПРОПУСТИТЬ" 124 px in a 117 px button at 360): tighter tracking + side padding, never past the edge */
#results .res-btns .big-btn.ghost { letter-spacing: .3px; padding-left: 6px; padding-right: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 380px) { #results .res-btns .big-btn.ghost { font-size: 14px; } }
/* postwin (2026-10-12): a lost raid = one tip line above the buttons (src/losstip.js) and Retry as the clear primary
   (wide, retry arrow, two gentle pulses); Home stays, smaller. Same card, no popup. */
#results .res-tip { display: flex; align-items: center; gap: 8px; margin: 10px auto 2px; max-width: 340px; width: 100%; padding: 7px 12px 7px 10px; border-radius: 14px;
  font-size: 13.5px; font-weight: 800; line-height: 1.25; text-align: left; color: #fff3d6; background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1.5px rgba(255, 201, 60, .5); }
#results .res-tip svg { flex: none; width: 20px; height: 20px; color: var(--gold); }
#results .res-tip.hidden { display: none; }
#results .res-card.fail .res-btns #btn-home { flex: 0 1 auto; min-width: 82px; font-size: 14px; opacity: .85; } /* own width: ПРОПУСТИТЬ / ÜBERSPRINGEN were "ПРОПУ…" at 360 */
#results .res-card.fail .res-btns #btn-again { flex: 1.45; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 21px;
  animation: resRetry 1.6s ease-in-out 1.2s 2; }
#results .res-card.fail .res-btns #btn-again::before { content: ''; flex: none; width: 22px; height: 22px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4a8 8 0 1 0 7.7 10h-2.6A5.5 5.5 0 1 1 12 6.5c1.5 0 2.9.6 3.9 1.6L13 11h7V4l-2.3 2.3A8 8 0 0 0 12 4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4a8 8 0 1 0 7.7 10h-2.6A5.5 5.5 0 1 1 12 6.5c1.5 0 2.9.6 3.9 1.6L13 11h7V4l-2.3 2.3A8 8 0 0 0 12 4z'/%3E%3C/svg%3E") center / contain no-repeat; }
@keyframes resRetry { 50% { transform: scale(1.05); } }
#results #btn-again.loading { pointer-events: none; filter: saturate(.6) brightness(.92); }
@media (prefers-reduced-motion: reduce) { #results .res-card.fail .res-btns #btn-again { animation: none; } }
#results .meta-res-top { gap: 8px; }
/* dog route bar: never wider than the screen (RU text pushed the buttons off-screen on phones) */
/* builder bars (builder.js watchBars sets --b-hdr / --b-bot): toasts under the header, the patrol bar above the tray, the
   Undo pill inside the header (src/vaultlayouts.js), so nothing covers the budget row, the tool tray, the tool hint or the buttons */
#builder:not(.hidden) ~ #meta-toast { top: calc(var(--b-hdr, 150px) + 6px); }
#b-dog-bar { bottom: calc(var(--b-bot, 212px) + 10px); }
#b-save.just-saved { background: linear-gradient(#3ee08f, #22a565); box-shadow: 0 5px 0 #136b3f, 0 8px 16px rgba(0,0,0,.35); color: #fff; filter: none; animation: bSaved .45s cubic-bezier(.2,1.6,.4,1); }
#b-save.just-saved::before { content: '✓'; margin-right: 6px; font-weight: 900; }
@keyframes bSaved { 0% { transform: scale(.92); } 60% { transform: scale(1.06); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { #b-save.just-saved { animation: none; } }
#b-dog-bar { width: max-content; max-width: calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right)); white-space: normal; box-sizing: border-box; }
#b-dog-bar #b-dog-text { flex: 1 1 auto; min-width: 0; line-height: 1.2; }
#b-dog-bar .mini { flex: none; white-space: nowrap; }
/* builder header status chip: never past the screen edge (long RU text) */
.b-title { min-width: 0; }
.b-title #b-status { max-width: 52vw; white-space: normal; text-align: center; line-height: 1.15; }
/* vault-publish: title on one line (ellipsis), the status chip under it, never over the title or the round buttons */
#builder .b-title { flex-direction: column; gap: 3px; min-width: 0; }
#builder .b-title b { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: min(19px, 5.2vw); line-height: 1.1; }
#builder .b-title #b-status { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; padding: 2px 9px; line-height: 1.3; }
#builder .b-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Mobile-game feel: scroll areas keep scrolling (touch, wheel, keys) but never show a scrollbar, and vertical sheets never
   scroll sideways (a badge poking out of a card used to add a horizontal bar). The canvas is not a scroll area; untouched. */
#sheet-body, #results, .ec-pgrid { overflow-x: hidden; }
#app *, #sheet *, #results, #sheet-body { scrollbar-width: none; }
#app *::-webkit-scrollbar, #sheet *::-webkit-scrollbar, #results::-webkit-scrollbar, #sheet-body::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* ---------- German / Polish: long words in the big RAID button (RAUBZUG) */
.lang-de .big-btn.raid .raid-t { font-size: .78em; letter-spacing: 2px; }
.lang-de .big-btn.raid small, .lang-pl .big-btn.raid small { letter-spacing: .5px; }

/* title: Google Play badge under PLAY (Android web, src/about.js mountTitlePlay) */
.title-play-row { display: flex; justify-content: center; margin: 10px 0 2px; pointer-events: auto; }
.title-play { display: inline-block; line-height: 0; }
.title-play img { width: 168px; height: auto; display: block; }

/* ---------- results cleanup (2026-10-11, src/ui.js compactResults): a won raid's card = stars, loot, the XP line, Share clip
   (src/clip.js) and one primary button; the star conditions, objectives, quest / league chips, session goal progress, vault
   rating (reactions + like), Report and the invite sit in the collapsed Details row. Fits 360 x 640 without scrolling. ---------- */
#results .res-card.compact { gap: 6px; }
#results .res-card.compact .meta-res { padding: 5px 10px; }
#results .res-card.compact .meta-res-ring { display: inline-block; transform: scale(.76); margin: -6px -5px; }
#results .res-card.compact .meta-res-chips:empty { display: none; }
#results .res-card.compact .res-btns .big-btn.ghost { flex: .62; font-size: 14px; letter-spacing: .5px; }
#results .res-card.compact .hc-res { padding-top: 6px; padding-bottom: 6px; }
#results #raid-res-lootm { margin-top: -2px; }
.res-more { width: 100%; }
.res-more-t { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; padding: 4px 6px 2px; border: 0; background: none;
  color: rgba(255,246,230,.72); font: 800 13px Nunito, system-ui, sans-serif; cursor: pointer; }
.res-more-t i { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.res-more.open .res-more-t i { transform: translateY(1px) rotate(-135deg); }
.res-more-b { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 6px; }
.res-more-b > * { margin-top: 0; margin-bottom: 0; }
.res-more-b .res-more-chips { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.vx-clip { width: 100%; }
/* raid clip button (results card, robbery card) */
.res-clip { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px 12px; border-radius: 16px; border: 0;
  background: linear-gradient(#ff7ab0, #e0447f); box-shadow: 0 4px 0 #8f1f4c; color: #fff; font: 900 17px Nunito, system-ui, sans-serif; cursor: pointer; line-height: 1.15; }
.res-clip svg { width: 22px; height: 22px; flex: none; }
.res-clip:active { transform: translateY(2px); box-shadow: 0 2px 0 #8f1f4c; }
.res-clip:disabled { filter: grayscale(.6) brightness(.8); }
.rv-clip { margin-top: 10px; font-size: 15px; padding: 9px 12px; }
#results .res-card.compact .raid-res-extra, #results .res-card.compact .meta-res { width: 100%; box-sizing: border-box; }
/* campaign tasks as one row of short ticks (compact card) */
#results .raid-res-obj.res-ticks ul { flex-direction: row; justify-content: center; flex-wrap: wrap; gap: 5px; }
#results .raid-res-obj.res-ticks li { padding: 4px 8px 4px 7px; border-radius: 999px; font-size: 12px; gap: 5px; animation: resPop .35s cubic-bezier(.2,1.5,.4,1) both; }
#results .raid-res-obj.res-ticks li i { width: 15px; height: 15px; margin-left: 2px; background-size: 11px; }
#results .meta-res-chips.res-hl:not(:empty) { margin-top: 5px; }
#results .rw-pill.gem { background: linear-gradient(#5fd0f5, #2a8fd0); color: #fff; }
/* light motion: the reward pills rise in one after another, the pet pill pops with a glow (src/ui.js setRewards) */
#results .res-card.compact .res-rewards .rw-pill { animation: resRise .4s cubic-bezier(.2,1.2,.4,1) both; }
#results .res-card.compact .res-rewards .rw-pill:nth-child(2) { animation-delay: .08s; }
#results .res-card.compact .res-rewards .rw-pill:nth-child(3) { animation-delay: .16s; }
#results .res-card.compact .res-rewards .rw-pill:nth-child(4) { animation-delay: .24s; }
#results .res-card.compact .res-rewards .rw-pill.pet { animation: resPet .6s cubic-bezier(.2,1.6,.4,1) .3s both, resGlow 1.6s ease-in-out .9s 2; }
#results .res-card.compact .vx-clip { animation: resRise .4s cubic-bezier(.2,1.2,.4,1) .45s both; }
@keyframes resRise { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes resPop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes resPet { 0% { opacity: 0; transform: scale(.4) rotate(-6deg); } 70% { opacity: 1; transform: scale(1.08) rotate(1deg); } 100% { transform: none; } }
@keyframes resGlow { 0%, 100% { box-shadow: 0 0 0 rgba(255,122,200,0); } 50% { box-shadow: 0 0 16px rgba(255,122,200,.75); } }
@media (prefers-reduced-motion: reduce) {
  #results .res-card.compact .res-rewards .rw-pill, #results .res-card.compact .vx-clip, #results .raid-res-obj.res-ticks li { animation: none; }
}
/* the pet-slipped-away note (shield / new / last pet): one clean line above the level panel, same radius as the panels */
#results .res-note { display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; padding: 6px 10px; border-radius: 14px;
  background: rgba(108,212,255,.12); box-shadow: inset 0 0 0 1.5px rgba(108,212,255,.35); color: #dff4ff; font-size: 12px; font-weight: 800; line-height: 1.25; text-align: left; }
#results .res-note .ico.shield { width: 18px; height: 18px; flex: none; color: #6cd4ff; }
#results .res-card.compact .rv-res { margin-top: 0; width: 100%; }
#results .res-more-b .sf-res { font-size: 12px; }
#results .res-more-b .vx-res { margin-top: 0; }
#results .res-more-b .rv-inv { align-self: center; }
/* the card's extra blocks (note, level panel, reactions, Share clip) never touch each other */
#results .res-card.compact .raid-res-extra { display: flex; flex-direction: column; align-items: stretch; gap: 7px; }
#results .res-card.compact .raid-res-extra > * { margin-top: 0; margin-bottom: 0; }

/* report flag before src/safety.css arrives (it is added at runtime): an unstyled flag filled the whole results card on an iPhone (2026-10-11) */
.sf-flag svg, .sf-link svg { width: 16px; height: 16px; flex: none; }
