/* MAYNILA SA ILALIM — UI styles (komiks panels, jeepney chrome, fiesta color). */
:root {
  --ink: #120c16;
  --ink2: #1f1626;
  --paper: #f7ecd6;
  --paper2: #e9d8b4;
  --gold: #ffd166;
  --gold2: #e0a526;
  --red: #e63946;
  --magenta: #ff4d8d;
  --teal: #3fd0c0;
  --sky: #7fe8ff;
  --muted: #b7a8a0;
  --panel: rgba(18, 12, 22, 0.94);
  --shadow: 4px 4px 0 #000;
  --radius: 10px;
  --fs-body: clamp(13px, 1.45vw, 16px);
  --fs-small: clamp(11px, 1.2vw, 13px);
  --fs-h1: clamp(26px, 4.4vw, 54px);
  --fs-h2: clamp(20px, 2.8vw, 34px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden;
  background: #07050a; color: var(--paper);
  font-family: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif; font-size: var(--fs-body);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
#game { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; cursor: crosshair; background: #07050a; }
body.in-menu #game { cursor: default; }
.hidden { display: none !important; }
.ui-layer { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.bangers { font-family: 'Bangers', Impact, 'Arial Black', sans-serif; letter-spacing: 0.04em; }

button, .btn {
  font-family: 'Bangers', Impact, 'Arial Black', sans-serif; letter-spacing: 0.06em; font-size: clamp(16px, 1.9vw, 22px);
  color: var(--ink); background: linear-gradient(180deg, #ffe39a, var(--gold) 55%, var(--gold2));
  border: 3px solid var(--ink); border-radius: 8px; padding: 0.45em 1.1em; cursor: pointer; box-shadow: var(--shadow);
  pointer-events: auto; transition: transform 0.08s, filter 0.08s; min-height: 44px;
}
button:hover, button:focus-visible, .btn.sel { transform: translate(-1px, -2px) rotate(-0.6deg); filter: brightness(1.08); outline: 3px solid #fff; outline-offset: 2px; }
button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
button.ghost { background: rgba(255, 255, 255, 0.06); color: var(--paper); border-color: rgba(255, 255, 255, 0.35); box-shadow: none; }
button.ghost:hover, button.ghost:focus-visible { background: rgba(255, 209, 102, 0.18); }
button.danger { background: linear-gradient(180deg, #ff8a8a, var(--red)); color: #fff; }
button:disabled { filter: grayscale(0.9) brightness(0.6); cursor: not-allowed; transform: none; }

/* ---------- panels ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; pointer-events: auto;
  background: radial-gradient(ellipse at center, rgba(20, 8, 30, 0.72), rgba(0, 0, 0, 0.88));
  padding: 16px; animation: fadein 0.18s ease-out;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(0.92) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.panel {
  position: relative; background: var(--panel); border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: 0 0 0 2px var(--gold2), 8px 8px 0 #000, 0 20px 60px rgba(0, 0, 0, 0.6);
  padding: clamp(14px, 2.2vw, 28px); max-width: min(1100px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  animation: pop 0.22s cubic-bezier(.2, 1.4, .4, 1);
  background-image:
    radial-gradient(rgba(255, 209, 102, 0.07) 1px, transparent 1.4px),
    linear-gradient(180deg, rgba(40, 24, 50, 0.95), rgba(14, 10, 18, 0.97));
  background-size: 6px 6px, 100% 100%;
  scrollbar-width: thin; scrollbar-color: var(--gold2) transparent;
}
.panel h1, .panel h2 { font-family: 'Bangers', Impact, sans-serif; letter-spacing: 0.05em; margin: 0 0 0.3em; color: var(--gold); text-shadow: 3px 3px 0 #000; }
.panel h1 { font-size: var(--fs-h1); }
.panel h2 { font-size: var(--fs-h2); }
.caption {
  display: inline-block; background: var(--paper); color: var(--ink); font-family: 'Bangers', Impact, sans-serif; letter-spacing: 0.05em;
  padding: 0.15em 0.7em; border: 3px solid var(--ink); box-shadow: 3px 3px 0 #000; transform: rotate(-1.5deg); font-size: clamp(14px, 1.6vw, 19px);
}
.sub { color: var(--muted); font-size: var(--fs-small); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.col { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1; }
.close-x { position: absolute; top: 10px; right: 10px; min-height: 36px; padding: 0.2em 0.7em; }

/* ---------- title ---------- */
#title { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: auto; padding: 16px; }
#title .logo { text-align: center; margin-top: -8vh; filter: drop-shadow(6px 6px 0 #000); }
#title .logo .l1 {
  font-family: 'Bangers', Impact, sans-serif; font-size: clamp(46px, 10vw, 132px); line-height: 0.9; letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff6d0 0%, #ffd166 45%, #ff7a2f 75%, #e63946 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 3px #1a0a10; transform: rotate(-2deg);
}
#title .logo .l2 { font-family: 'Bangers', Impact, sans-serif; font-size: clamp(18px, 3vw, 34px); color: var(--sky); letter-spacing: 0.3em; text-shadow: 3px 3px 0 #000; margin-top: 6px; }
#title .logo .l3 { font-size: clamp(12px, 1.4vw, 16px); color: var(--paper2); margin-top: 10px; font-style: italic; text-shadow: 2px 2px 0 #000; }
#title .menu { display: flex; flex-direction: column; gap: 12px; margin-top: 5vh; min-width: min(320px, 90vw); }
#title .foot { position: absolute; bottom: calc(10px + var(--safe-b)); left: 0; right: 0; text-align: center; font-size: var(--fs-small); color: rgba(255, 255, 255, 0.55); padding: 0 12px; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 12; pointer-events: none; }
#hud .tl { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; }
.hpwrap { display: flex; align-items: center; gap: 8px; }
.hpbar {
  position: relative; width: clamp(160px, 22vw, 300px); height: clamp(18px, 2.2vw, 24px); background: #2a0a10; border: 3px solid var(--ink);
  border-radius: 6px; box-shadow: 3px 3px 0 #000, 0 0 0 2px rgba(255, 209, 102, 0.55); overflow: hidden; transform: skewX(-8deg);
}
.hpbar .fill { position: absolute; inset: 0; width: 100%; background: linear-gradient(180deg, #ff8a8a, #e63946 55%, #a01020); transition: width 0.12s; }
.hpbar .ghost { position: absolute; inset: 0; width: 100%; background: #ffe0a0; transition: width 0.6s 0.25s; }
.hpbar .txt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: 'Bangers', Impact, sans-serif; letter-spacing: 0.06em; font-size: clamp(13px, 1.5vw, 17px); color: #fff; text-shadow: 2px 2px 0 #000; transform: skewX(8deg); }
.pips { display: flex; gap: 5px; align-items: center; font-family: 'Bangers', Impact, sans-serif; font-size: 14px; color: var(--paper2); text-shadow: 2px 2px 0 #000; }
.pip { width: 14px; height: 14px; border: 2px solid var(--ink); background: rgba(255, 255, 255, 0.15); transform: rotate(45deg); box-shadow: 2px 2px 0 #000; }
.pip.on { background: var(--gold); }
.pip.dash.on { background: var(--sky); }
#hud .tr { position: absolute; top: 12px; right: 12px; display: flex; gap: 10px; align-items: center; }
.cur { display: flex; align-items: center; gap: 4px; background: rgba(10, 6, 14, 0.75); border: 2px solid rgba(255, 209, 102, 0.5); border-radius: 20px; padding: 2px 10px 2px 4px; font-family: 'Bangers', Impact, sans-serif; font-size: clamp(14px, 1.6vw, 19px); letter-spacing: 0.05em; }
.cur canvas { width: 24px; height: 24px; }
#pausebtn { pointer-events: auto; min-height: 36px; padding: 0.1em 0.6em; font-size: 18px; }
#hud .loc { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); font-family: 'Bangers', Impact, sans-serif; letter-spacing: 0.08em; font-size: clamp(13px, 1.5vw, 17px); color: var(--paper2); text-shadow: 2px 2px 0 #000; white-space: nowrap; opacity: 0.85; }
#hud .bl { position: absolute; left: 12px; bottom: calc(12px + var(--safe-b)); display: flex; gap: 6px; flex-wrap: wrap; max-width: 46vw; }
.boonchip { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--ink); box-shadow: 2px 2px 0 #000; position: relative; background: #222; }
.boonchip canvas { width: 100%; height: 100%; border-radius: 50%; }
.boonchip .lv { position: absolute; bottom: -6px; right: -6px; background: var(--ink); color: var(--gold); font-family: 'Bangers', Impact, sans-serif; font-size: 11px; padding: 0 4px; border-radius: 6px; }
#hud .br { position: absolute; right: 12px; bottom: calc(12px + var(--safe-b)); text-align: right; font-size: var(--fs-small); color: rgba(255, 255, 255, 0.6); text-shadow: 1px 1px 0 #000; line-height: 1.5; }
#hud .br kbd, .keys kbd { font-family: 'Nunito', sans-serif; font-weight: 800; background: var(--paper); color: var(--ink); border-radius: 4px; padding: 0 5px; border: 2px solid var(--ink); font-size: 0.9em; }
#bossbar { position: absolute; top: 48px; left: 50%; transform: translateX(-50%); width: min(620px, 80vw); text-align: center; }
#bossbar .name { font-family: 'Bangers', Impact, sans-serif; font-size: clamp(18px, 2.6vw, 30px); color: #fff; text-shadow: 3px 3px 0 #000; letter-spacing: 0.06em; }
#bossbar .title { font-size: var(--fs-small); color: var(--gold); text-shadow: 2px 2px 0 #000; margin-top: -4px; }
#bossbar .bar { height: 16px; margin-top: 4px; background: #1a0508; border: 3px solid var(--ink); box-shadow: 3px 3px 0 #000, 0 0 0 2px var(--red); position: relative; overflow: hidden; border-radius: 4px; }
#bossbar .bar .fill { position: absolute; inset: 0; background: linear-gradient(180deg, #ff6b6b, #c0122b); transition: width 0.1s; }
#bossbar .bar .ph { position: absolute; top: 0; bottom: 0; width: 3px; background: #fff; opacity: 0.8; }

/* ---------- banner & toast ---------- */
#banner { position: fixed; left: 0; right: 0; top: 26%; z-index: 25; text-align: center; pointer-events: none; opacity: 0; transition: opacity 0.6s; }
#banner.show { opacity: 1; }
#banner .b1 { font-family: 'Bangers', Impact, sans-serif; font-size: clamp(44px, 9vw, 110px); color: var(--gold); -webkit-text-stroke: 3px #000; text-shadow: 6px 6px 0 #000; letter-spacing: 0.05em; transform: rotate(-2deg); }
#banner .b2 { font-family: 'Bangers', Impact, sans-serif; font-size: clamp(18px, 3vw, 34px); color: #fff; text-shadow: 3px 3px 0 #000; letter-spacing: 0.12em; }
#banner .b3 { font-size: var(--fs-body); color: var(--paper2); text-shadow: 2px 2px 0 #000; font-style: italic; margin-top: 8px; padding: 0 16px; }
#toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); z-index: 26; pointer-events: none; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(640px, 92vw); }
.toast { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 #000; padding: 8px 14px; border-radius: 8px; font-weight: 800; text-align: center; animation: pop 0.25s; }
#fade { position: fixed; inset: 0; z-index: 40; background: #000; pointer-events: none; opacity: 0; transition: opacity 0.35s; }
#fade.on { opacity: 1; }

/* ---------- dialogue ---------- */
#dialogue { position: fixed; left: 50%; bottom: calc(16px + var(--safe-b)); transform: translateX(-50%); width: min(980px, 96vw); z-index: 32; pointer-events: auto; display: flex; align-items: flex-end; gap: 0; animation: pop 0.2s; }
#dialogue .portrait { flex: 0 0 auto; width: clamp(110px, 18vw, 220px); height: clamp(130px, 21vw, 260px); border: 3px solid var(--ink); box-shadow: 5px 5px 0 #000; background: #111; transform: rotate(-1.5deg); margin-right: -10px; z-index: 2; border-radius: 6px; overflow: hidden; }
#dialogue .portrait canvas { width: 100%; height: 100%; display: block; }
#dialogue .box { flex: 1; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; box-shadow: 6px 6px 0 #000; padding: 14px 18px 14px 26px; min-height: clamp(110px, 16vw, 150px); position: relative; background-image: radial-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1.4px); background-size: 5px 5px; }
#dialogue .who { position: absolute; top: -20px; left: 22px; font-family: 'Bangers', Impact, sans-serif; letter-spacing: 0.06em; font-size: clamp(18px, 2.2vw, 26px); padding: 0 12px; border: 3px solid var(--ink); box-shadow: 3px 3px 0 #000; color: var(--ink); transform: rotate(-2deg); background: var(--gold); }
#dialogue .who small { font-family: 'Nunito', sans-serif; font-size: 0.5em; letter-spacing: 0; margin-left: 8px; font-weight: 800; opacity: 0.75; }
#dialogue .text { font-size: clamp(14px, 1.7vw, 19px); line-height: 1.45; font-weight: 700; margin-top: 8px; min-height: 3em; }
#dialogue .next { position: absolute; right: 14px; bottom: 8px; font-family: 'Bangers', Impact, sans-serif; font-size: 16px; animation: bob 0.8s infinite alternate; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-4px); } }

/* ---------- boon choice ---------- */
.boon-wrap { display: grid; grid-template-columns: minmax(150px, 260px) 1fr; gap: 18px; align-items: stretch; width: min(1060px, 96vw); }
.boon-god { display: flex; flex-direction: column; gap: 8px; }
.boon-god .gp { width: 100%; aspect-ratio: 5 / 6; border: 3px solid var(--ink); box-shadow: 5px 5px 0 #000; border-radius: 8px; overflow: hidden; background: #111; }
.boon-god .gp canvas { width: 100%; height: 100%; display: block; }
.boon-god .gname { font-family: 'Bangers', Impact, sans-serif; font-size: clamp(24px, 3vw, 38px); text-shadow: 3px 3px 0 #000; letter-spacing: 0.05em; line-height: 1; }
.boon-god .gline { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 3px 3px 0 #000; padding: 8px 12px; border-radius: 8px; font-weight: 700; font-style: italic; font-size: var(--fs-small); }
.cards { display: flex; flex-direction: column; gap: 12px; }
.card { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-align: left; pointer-events: auto; background: linear-gradient(90deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)); border: 3px solid var(--ink); border-left: 8px solid var(--rc, #fff); border-radius: 10px; padding: 12px 14px; color: var(--paper); cursor: pointer; box-shadow: 4px 4px 0 #000; font-family: 'Nunito', sans-serif; font-size: var(--fs-body); letter-spacing: 0; transition: transform 0.1s, background 0.1s; min-height: 0; }
.card:hover, .card.sel, .card:focus-visible { transform: translateX(6px); background: linear-gradient(90deg, rgba(255, 209, 102, 0.22), rgba(255, 255, 255, 0.04)); outline: 3px solid var(--gold); outline-offset: 0; filter: none; }
.card canvas { width: 64px; height: 64px; }
.card .nm { font-family: 'Bangers', Impact, sans-serif; font-size: clamp(18px, 2vw, 24px); letter-spacing: 0.05em; color: #fff; text-shadow: 2px 2px 0 #000; }
.card .rar { font-family: 'Bangers', Impact, sans-serif; font-size: 14px; letter-spacing: 0.08em; color: var(--rc, #fff); margin-left: 8px; }
.card .slot { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.card .ds { margin-top: 3px; line-height: 1.35; }
.card .rep { margin-top: 4px; font-size: 12px; color: #ffb0b0; font-weight: 800; }
.card .num { color: var(--gold); font-weight: 900; }

/* ---------- lists / grids ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tile { background: rgba(255, 255, 255, 0.05); border: 3px solid var(--ink); box-shadow: 3px 3px 0 #000; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; pointer-events: auto; }
.tile.locked { opacity: 0.7; }
.tile.sel { outline: 3px solid var(--gold); }
.tile .th { display: flex; gap: 10px; align-items: center; }
.tile .th canvas { width: 48px; height: 48px; flex: 0 0 48px; }
.tile .tn { font-family: 'Bangers', Impact, sans-serif; font-size: 20px; letter-spacing: 0.04em; color: var(--gold); }
.tile .fl { font-size: 12px; font-style: italic; color: var(--muted); }
.ranks { display: flex; gap: 4px; }
.ranks i { width: 12px; height: 12px; border: 2px solid var(--ink); transform: rotate(45deg); background: rgba(255, 255, 255, 0.15); }
.ranks i.on { background: var(--gold); }
.tile button { font-size: 16px; padding: 0.25em 0.8em; min-height: 38px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { font-size: 15px; padding: 0.25em 0.8em; min-height: 36px; }
.tabs button.on { background: var(--paper); }
.codex { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 14px; width: min(1000px, 94vw); min-height: 60vh; }
.codex .list { display: flex; flex-direction: column; gap: 4px; max-height: 62vh; overflow: auto; padding-right: 4px; }
.codex .list button { text-align: left; font-size: 16px; padding: 0.3em 0.7em; min-height: 36px; background: rgba(255, 255, 255, 0.06); color: var(--paper); box-shadow: none; border-color: rgba(0, 0, 0, 0.6); }
.codex .list button.on { background: var(--gold); color: var(--ink); }
.codex .list button.lock { color: #6a5e66; }
.codex .detail { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 5px 5px 0 #000; border-radius: 10px; padding: 16px 20px; overflow: auto; max-height: 62vh; background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1.4px); background-size: 5px 5px; }
.codex .detail h2 { color: var(--ink); text-shadow: none; }
.codex .detail p { line-height: 1.55; font-weight: 600; }
.codex .detail .tier-lock { color: #8a7a70; font-style: italic; }

/* settings */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; width: min(980px, 94vw); }
.set-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.set-row label { flex: 0 0 42%; font-weight: 800; }
.set-row input[type=range] { flex: 1; accent-color: var(--gold); pointer-events: auto; }
.set-row select { flex: 1; pointer-events: auto; background: var(--ink2); color: var(--paper); border: 2px solid var(--gold2); border-radius: 6px; padding: 6px; font-family: inherit; font-weight: 700; }
.set-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--gold); pointer-events: auto; }
.bind-table { width: 100%; border-collapse: collapse; }
.bind-table td { padding: 4px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.bind-table button { font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 13px; padding: 0.2em 0.6em; min-width: 76px; min-height: 32px; letter-spacing: 0; }
.bind-table button.cap { background: var(--magenta); color: #fff; animation: bob 0.4s infinite alternate; }

/* summary */
.sum { width: min(900px, 94vw); }
.sum .big { font-family: 'Bangers', Impact, sans-serif; font-size: clamp(38px, 7vw, 80px); line-height: 0.95; text-shadow: 5px 5px 0 #000; -webkit-text-stroke: 2px #000; transform: rotate(-2deg); margin: 0 0 10px; }
.sum .stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 12px 0; }
.sum .stat { background: rgba(255, 255, 255, 0.06); border: 2px solid rgba(0, 0, 0, 0.6); border-radius: 8px; padding: 8px 10px; }
.sum .stat b { display: block; font-family: 'Bangers', Impact, sans-serif; font-size: 24px; color: var(--gold); letter-spacing: 0.04em; }
.sum .quote { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 #000; padding: 10px 14px; border-radius: 8px; font-style: italic; font-weight: 800; margin: 10px 0; }
.buildlist { display: flex; flex-direction: column; gap: 6px; }
.buildlist .bi { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; background: rgba(255, 255, 255, 0.04); border-left: 5px solid var(--rc, #fff); border-radius: 6px; padding: 6px 10px; }
.buildlist .bi canvas { width: 40px; height: 40px; }
.buildlist .bi b { font-family: 'Bangers', Impact, sans-serif; font-size: 18px; letter-spacing: 0.04em; }

/* choice menu */
.choice { width: min(560px, 94vw); display: flex; flex-direction: column; gap: 10px; }
.choice button { text-align: left; }

/* touch controls */
#touch { position: fixed; inset: 0; z-index: 14; pointer-events: none; }
#touch .stick { position: absolute; left: calc(18px + env(safe-area-inset-left, 0px)); bottom: calc(18px + var(--safe-b)); width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); border: 3px solid rgba(255, 255, 255, 0.25); pointer-events: auto; touch-action: none; }
#touch .knob { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(255, 209, 102, 0.5); border: 3px solid rgba(0, 0, 0, 0.5); }
#touch .btns { position: absolute; right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(14px + var(--safe-b)); width: 230px; height: 210px; pointer-events: none; }
#touch .tb { position: absolute; border-radius: 50%; pointer-events: auto; touch-action: none; display: flex; align-items: center; justify-content: center; font-family: 'Bangers', Impact, sans-serif; font-size: 15px; color: #fff; text-shadow: 2px 2px 0 #000; border: 3px solid rgba(0, 0, 0, 0.6); box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5); }
#touch .tb.on { filter: brightness(1.4); transform: scale(0.94); }
#touch .tb.atk { right: 0; bottom: 0; width: 92px; height: 92px; background: rgba(230, 57, 70, 0.7); font-size: 19px; }
#touch .tb.spc { right: 104px; bottom: 6px; width: 66px; height: 66px; background: rgba(199, 125, 255, 0.7); }
#touch .tb.cst { right: 16px; bottom: 104px; width: 62px; height: 62px; background: rgba(255, 209, 102, 0.75); color: #1a1020; text-shadow: none; }
#touch .tb.dsh { right: 104px; bottom: 84px; width: 62px; height: 62px; background: rgba(127, 232, 255, 0.7); }
#touch .tb.int { right: 170px; bottom: 150px; width: 52px; height: 52px; background: rgba(125, 220, 106, 0.75); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .boon-wrap { grid-template-columns: 1fr; }
  .boon-god { flex-direction: row; align-items: center; }
  .boon-god .gp { width: 90px; flex: 0 0 90px; }
  .codex { grid-template-columns: 1fr; }
  .codex .list { max-height: 26vh; }
  .set-grid { grid-template-columns: 1fr; }
  #hud .br { display: none; }
  #hud .loc { top: 46px; }
  #bossbar { top: 64px; }
  .card { grid-template-columns: 48px 1fr; padding: 10px; }
  .card canvas { width: 48px; height: 48px; }
}
@media (max-height: 520px) {
  #dialogue .portrait { width: 96px; height: 110px; }
  #dialogue .box { min-height: 90px; }
  #title .logo { margin-top: 0; }
  #title .menu { margin-top: 2vh; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
