/* Umbra: full-window WebGL level, ink-and-violet glass HUD, ability dock, cards for menus. */
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url("/assets/fonts/unbounded-700.woff2") format("woff2"); }
@font-face { font-family: "Unbounded"; font-weight: 800; font-display: swap; src: url("/assets/fonts/unbounded-800.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 500; font-display: swap; src: url("/assets/fonts/sora-500.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url("/assets/fonts/sora-700.woff2") format("woff2"); }

:root {
  --font-display: "Unbounded", system-ui, sans-serif; --font-body: "Sora", system-ui, sans-serif;
  --fg: #f3effa; --fg-2: rgba(243, 239, 250, 0.72); --line: rgba(255, 255, 255, 0.15); --glass: rgba(11, 8, 22, 0.66); --glass-2: rgba(255, 255, 255, 0.08);
  --violet: #8a4dff; --violet-2: #b48cff; --gold: #ffd166; --red: #ff4d5a; --green: #4dffa6; --acc: #ffc93a;
}
body[data-district="mansion"] { --acc: #ff8fa3; }
body[data-district="lab"] { --acc: #4fd1ff; }
body[data-district="harbor"] { --acc: #ff9a4a; }
body[data-district="citadel"] { --acc: #ff6b4a; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: #0b0816; color: var(--fg); font-family: var(--font-body); font-weight: 500; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-font-smoothing: antialiased; touch-action: none; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
button { font: inherit; color: inherit; }
#game { position: fixed; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; outline: 0; cursor: crosshair; }
#floats { position: fixed; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.float { position: absolute; left: 0; top: 0; font-family: var(--font-display); font-weight: 800; font-size: 1rem; white-space: nowrap; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9); will-change: transform, opacity; }
.f-kill { color: #fff; font-size: 1.05rem; }
.f-alert { color: var(--red); font-size: 1.6rem; }
.f-combo { color: var(--gold); font-size: 0.9rem; margin-top: -26px; letter-spacing: 0.04em; }
#hurt { position: fixed; inset: 0; pointer-events: none; z-index: 2; opacity: 0; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 45%, rgba(220, 20, 40, 0.55) 100%); }
#hurt.on { animation: hurt 0.45s ease-out; }
@keyframes hurt { from { opacity: 1; } to { opacity: 0; } }
.nogl { position: fixed; inset: 40% 16px auto; text-align: center; font-weight: 700; }
.nogl[hidden] { display: none; }

/* ---------------------------------------------------------------- top bar */
.hud { position: fixed; left: 0; right: 0; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left)); pointer-events: none; }
.hud > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: 0.02em; }
.chip { display: inline-flex; align-items: center; gap: 7px; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.chip-level b { font-family: var(--font-display); color: var(--acc); }
.chip-level span { color: var(--fg-2); }
.chip-time { font-variant-numeric: tabular-nums; color: var(--fg-2); }
.chip-time.over { color: #ffb4a8; }
.chip-alert { background: rgba(190, 28, 48, 0.78); border-color: rgba(255, 130, 140, 0.6); color: #ffe3e5; animation: alertpulse 0.9s ease-in-out infinite alternate; }
.chip-alert svg { width: 14px; height: 14px; fill: #ffd166; }
.chip-alert[hidden] { display: none; }
@keyframes alertpulse { to { background: rgba(120, 14, 30, 0.78); } }
.chip-gems svg { width: 16px; height: 16px; }
.chip-gems b { font-variant-numeric: tabular-nums; color: var(--green); }
.hud-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--fg); display: grid; place-items: center; cursor: pointer; padding: 0; transition: border-color 0.15s, transform 0.15s; }
.icon-btn:hover { border-color: var(--violet-2); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
#btn-shop svg { fill: var(--violet-2); }
#btn-zoom svg { fill: none; }
#btn-zoom[aria-pressed="true"] { border-color: var(--violet); background: rgba(138, 77, 255, 0.35); }
.btn-sound .ic-off, .btn-sound .lbl-off { display: none; }
.btn-sound[aria-pressed="false"] .ic-on, .btn-sound[aria-pressed="false"] .lbl-on { display: none; }
.btn-sound[aria-pressed="false"] .ic-off { display: block; }
.btn-sound[aria-pressed="false"] .lbl-off { display: inline; }

/* targets: one head per guard, crossed out when down */
.targets { position: fixed; left: 50%; top: calc(max(10px, env(safe-area-inset-top)) + 46px); transform: translateX(-50%); z-index: 5; display: flex; gap: 4px; padding: 5px 9px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); pointer-events: none; max-width: calc(100vw - 24px); flex-wrap: wrap; justify-content: center; }
.targets:empty { display: none; }
.tg { position: relative; display: inline-block; width: 20px; height: 20px; background-size: contain; background-repeat: no-repeat; background-position: center; transition: opacity 0.3s, transform 0.3s; }
.tg-rifle { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4.6' fill='%23a6d36a'/%3E%3Cpath d='M7 6.5a5 5 0 0 1 10 0z' fill='%235d7a3a'/%3E%3Cpath d='M3 22c0-5 4-8.5 9-8.5s9 3.5 9 8.5z' fill='%23a6d36a'/%3E%3C/svg%3E"); }
.tg-scanner { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4.6' fill='%2390c2ff'/%3E%3Cpath d='M7 6.5a5 5 0 0 1 10 0z' fill='%23476a99'/%3E%3Cpath d='M3 22c0-5 4-8.5 9-8.5s9 3.5 9 8.5z' fill='%2390c2ff'/%3E%3C/svg%3E"); }
.tg-shotgun { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4.6' fill='%23ffb066'/%3E%3Cpath d='M7 6.5a5 5 0 0 1 10 0z' fill='%23995a22'/%3E%3Cpath d='M2 22c0-5 4.5-8.5 10-8.5s10 3.5 10 8.5z' fill='%23ffb066'/%3E%3C/svg%3E"); }
.tg-sniper { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4.6' fill='%23ff7a7a'/%3E%3Cpath d='M7 6.5a5 5 0 0 1 10 0z' fill='%23802a2a'/%3E%3Cpath d='M3 22c0-5 4-8.5 9-8.5s9 3.5 9 8.5z' fill='%23ff7a7a'/%3E%3Cpath d='M12 8h11' stroke='%23ff2a2a' stroke-width='1.4'/%3E%3C/svg%3E"); }
.tg-dog { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3l4 5h8l4-5 1 10c0 5-4 9-9 9s-9-4-9-9z' fill='%23e0b083'/%3E%3Ccircle cx='9' cy='12' r='1.4' fill='%231a1208'/%3E%3Ccircle cx='15' cy='12' r='1.4' fill='%231a1208'/%3E%3Cpath d='M10 16h4l-2 2.4z' fill='%231a1208'/%3E%3C/svg%3E"); }
.tg.down { opacity: 0.32; transform: scale(0.86); }
.tg.down::after { content: ""; position: absolute; inset: -1px; background: linear-gradient(45deg, transparent 44%, var(--red) 44%, var(--red) 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, var(--red) 44%, var(--red) 56%, transparent 56%); }

/* ---------------------------------------------------------------- bottom dock */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 8px max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); pointer-events: none; }
.dock > * { pointer-events: auto; }
.vitals { display: flex; flex-direction: column; gap: 6px; }
.hp { position: relative; width: 168px; height: 24px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; gap: 6px; padding: 0 10px; }
.hp-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: linear-gradient(90deg, #ff4d5a, #ff8a5c); transition: width 0.18s; }
.hp.low .hp-fill { animation: lowhp 0.85s infinite alternate; }
@keyframes lowhp { to { filter: brightness(1.6); } }
.hp-label, .hp b { position: relative; font-size: 0.72rem; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }
.hp-label { color: rgba(255, 255, 255, 0.75); }
.hp b { font-variant-numeric: tabular-nums; }
.lightgem { --vis: 1; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 8px; font-size: 0.74rem; font-weight: 700; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lightgem i { width: 14px; height: 14px; transform: rotate(45deg); border-radius: 3px; background: #fff3c4; opacity: calc(0.25 + var(--vis) * 0.75); box-shadow: 0 0 calc(var(--vis) * 14px) rgba(255, 230, 150, 0.9); transition: background 0.3s; }
.lightgem[data-state="dim"] i { background: #ffb347; box-shadow: 0 0 calc(var(--vis) * 10px) rgba(255, 170, 70, 0.8); }
.lightgem[data-state="hidden"] i { background: var(--violet); box-shadow: 0 0 6px rgba(138, 77, 255, 0.7); }
.lightgem[data-state="hidden"] span { color: var(--violet-2); }
.lightgem[data-state="exposed"] span { color: #fff3c4; }
.rush { display: none; margin-left: 2px; padding: 1px 7px; border-radius: 999px; background: rgba(138, 77, 255, 0.35); color: #e5d8ff; font-size: 0.66rem; letter-spacing: 0.04em; }
.rush.on { display: inline-block; animation: rush 0.6s ease-in-out infinite alternate; }
@keyframes rush { to { background: rgba(138, 77, 255, 0.6); } }
.abilities { display: flex; align-items: flex-end; gap: 10px; }
.ab { --cd: 0; position: relative; border-radius: 50%; border: 1.5px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--fg); cursor: pointer; display: grid; place-items: center; padding: 0; touch-action: none; overflow: visible; transition: transform 0.12s, border-color 0.15s; }
.ab:active { transform: scale(0.94); }
.ab svg { width: 46%; height: 46%; fill: currentColor; }
.ab small { position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); font-size: 0.62rem; font-weight: 700; color: var(--fg-2); white-space: nowrap; }
.ab small kbd { font-size: 0.85em; padding: 0 4px; }
.ab-pebble { width: 64px; height: 64px; margin-bottom: 18px; }
.ab-pebble b { position: absolute; right: -4px; top: -4px; min-width: 22px; height: 22px; border-radius: 999px; background: var(--gold); color: #1a1408; font-size: 0.75rem; display: grid; place-items: center; padding: 0 5px; }
.ab-pebble.aim { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.35), 0 0 22px rgba(255, 209, 102, 0.45); }
.ab-pebble.empty { opacity: 0.45; }
.ab-blink { width: 82px; height: 82px; margin-bottom: 18px; color: var(--violet-2); }
.ab-blink::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; background: conic-gradient(rgba(5, 3, 12, 0.72) calc(var(--cd) * 360deg), transparent 0); pointer-events: none; }
.ab-blink.ready { border-color: var(--violet); box-shadow: 0 0 20px rgba(138, 77, 255, 0.45); }
.pips { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; z-index: 1; }
.pips i { --f: 0; width: 18px; height: 6px; border-radius: 999px; background: linear-gradient(90deg, rgba(180, 140, 255, 0.85) calc(var(--f) * 100%), rgba(255, 255, 255, 0.16) 0); border: 1px solid rgba(0, 0, 0, 0.5); }
.pips i.on { background: var(--violet-2); box-shadow: 0 0 8px rgba(180, 140, 255, 0.8); }
.pips i:not(.on):not(.fill) { background: rgba(255, 255, 255, 0.16); }
.ab-attack { width: 88px; height: 88px; margin-bottom: 18px; color: #ffd6d9; border-color: rgba(255, 77, 90, 0.45); }
.ab-attack svg { width: 44%; height: 44%; }
.ab-attack.ready { border-color: #ff4d5a; background: rgba(150, 20, 34, 0.55); box-shadow: 0 0 0 3px rgba(255, 77, 90, 0.35), 0 0 26px rgba(255, 77, 90, 0.55); animation: strike 0.5s ease-in-out infinite alternate; }
.ab-attack.ready.stagger { border-color: #ffb020; background: rgba(140, 90, 10, 0.5); box-shadow: 0 0 0 3px rgba(255, 176, 32, 0.35), 0 0 24px rgba(255, 176, 32, 0.5); }
@keyframes strike { to { transform: scale(1.05); } }
body.touch kbd { display: none; }

.toast { position: fixed; left: 50%; bottom: 130px; transform: translateX(-50%) translateY(10px); z-index: 20; background: rgba(14, 10, 28, 0.92); border: 1px solid var(--line); color: var(--fg); padding: 10px 16px; border-radius: 999px; font-size: 0.86rem; font-weight: 700; opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast[hidden] { display: none; }

/* ---------------------------------------------------------------- cards */
.overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(5, 3, 12, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow: auto; }
.overlay[hidden] { display: none; }
.card { width: 100%; max-width: 480px; color: var(--fg); background: linear-gradient(180deg, rgba(30, 20, 56, 0.97), rgba(11, 8, 22, 0.99)); border: 1px solid var(--line); border-radius: 26px; padding: 26px 24px 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06); animation: pop 0.28s cubic-bezier(.2, .9, .2, 1.2); max-height: calc(100dvh - 32px); overflow: auto; }
@keyframes pop { from { transform: scale(0.92) translateY(10px); opacity: 0; } }
.kicker { margin: 0 0 6px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--violet-2); }
.card h2 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.02em; line-height: 1.15; }
.muted { color: var(--fg-2); margin: 0; line-height: 1.55; font-size: 0.93rem; }
.muted.small { font-size: 0.8rem; margin-top: 8px; }
.muted.small:empty { display: none; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.card-win { text-align: center; }
.card-win .card-actions { justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; font-size: 0.93rem; cursor: pointer; text-decoration: none; color: inherit; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.btn-primary { background: linear-gradient(135deg, #9a5cff, #6d2cf0); color: #fff; box-shadow: 0 8px 22px rgba(109, 44, 240, 0.4); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(109, 44, 240, 0.55); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--violet-2); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; box-shadow: none; }
.btn-small { padding: 8px 14px; font-size: 0.8rem; }
.how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.how li { display: flex; gap: 14px; align-items: flex-start; color: var(--fg-2); line-height: 1.5; font-size: 0.9rem; }
.how li b { color: var(--fg); }
.how-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); }
.how-ic svg { width: 24px; height: 24px; fill: currentColor; }
.ic-a { background: linear-gradient(135deg, #9a5cff, #5a22c9); }
.ic-b { background: linear-gradient(135deg, #ffd166, #ff9a2e); color: #2a1a04; }
.ic-c { background: linear-gradient(135deg, #4fd1ff, #2a6fd9); }
.keys { margin: 16px 0 0; font-size: 0.78rem; color: var(--fg-2); line-height: 1.8; }
kbd { font-family: inherit; font-weight: 700; font-size: 0.78em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: var(--glass-2); margin: 0 1px; }
.types { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.types li { display: grid; grid-template-columns: 26px auto 1fr; align-items: center; gap: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; font-size: 0.84rem; }
.types li .tg { width: 24px; height: 24px; }
.types li span { color: var(--fg-2); }
.card-district .kicker { color: var(--acc); }
.stars { display: flex; justify-content: center; gap: 14px; margin: 6px 0 12px; }
.star { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.68rem; font-weight: 700; color: rgba(255, 255, 255, 0.4); }
.star i { width: 34px; height: 34px; background: rgba(255, 255, 255, 0.14); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.star.on { color: var(--gold); }
.star.on i { background: var(--gold); filter: drop-shadow(0 0 10px rgba(255, 209, 102, 0.7)); animation: starpop 0.4s cubic-bezier(.2, .9, .2, 1.4) both; }
.star.on:nth-child(2) i { animation-delay: 0.12s; }
.star.on:nth-child(3) i { animation-delay: 0.24s; }
@keyframes starpop { from { transform: scale(0.2); } }
.card-fail .kicker { color: var(--red); }
.tip { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: rgba(138, 77, 255, 0.12); border: 1px solid rgba(180, 140, 255, 0.3); font-size: 0.86rem; line-height: 1.5; text-align: left; }
.tip::before { content: "Tip: "; font-weight: 700; color: var(--violet-2); }

/* levels */
.district-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tab { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 12px; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.tab.on { background: var(--violet); border-color: var(--violet); color: #fff; }
.tab.locked { opacity: 0.45; }
.level-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.lvl { aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; padding: 0; transition: transform 0.12s, border-color 0.15s; }
.lvl:hover:not(:disabled) { border-color: var(--violet-2); transform: translateY(-1px); }
.lvl b { font-family: var(--font-display); font-size: 1.05rem; }
.lvl.current { border-color: var(--violet); box-shadow: 0 0 0 2px rgba(138, 77, 255, 0.4); }
.lvl.locked { opacity: 0.3; cursor: default; }
.mini-stars { display: flex; gap: 2px; }
.mini-stars i { width: 10px; height: 10px; background: rgba(255, 255, 255, 0.2); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.mini-stars i.on { background: var(--gold); }

/* assassins */
.gem-count { color: var(--green); }
.shop-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.skin { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); }
.skin.on { border-color: var(--violet); background: rgba(138, 77, 255, 0.14); }
.hood { width: 46px; height: 46px; }
.skin-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.skin-info b { font-family: var(--font-display); font-size: 0.92rem; }
.skin-info span { font-size: 0.78rem; color: var(--fg-2); }

/* screenshot mode */
body.demo .toast, body.demo .overlay { display: none !important; }

@media (max-width: 860px) {
  .wide-only { display: none; }
  .brand-title { display: none; }
  .chip { padding: 6px 10px; }
  .chip-level span { display: none; }
  .hp { width: 136px; }
}
@media (max-width: 460px) {
  .dock { gap: 6px; padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
  .hp { width: 104px; }
  .abilities { gap: 6px; }
  .ab-pebble { width: 52px; height: 52px; }
  .ab-blink { width: 64px; height: 64px; }
  .ab-attack { width: 76px; height: 76px; }
  .ab small { font-size: 0.58rem; }
}
@media (max-width: 420px) {
  .chip-time { display: none; }
  .level-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .card { padding: 22px 18px 18px; }
  .skin { grid-template-columns: 40px 1fr; }
  .skin .btn { grid-column: 1 / -1; }
}
@media (max-height: 480px) {
  .ab-attack { width: 70px; height: 70px; }
  .ab-blink { width: 66px; height: 66px; }
  .ab-pebble { width: 54px; height: 54px; }
  .targets { top: auto; bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .card, .star.on i { animation: none; } }
