/* Arcalink play.html - HUD: top rows (core / wave / money / settings, core upgrade chips, rank chips), boss bar, dock (hint, prep row, mode row), build strip, release button, settings panel, placement label. Owner: B6.
   Art plan 3-3 / 6-3 / 6-4: two rows of 32 px (about 74 px with the margin), bevelled frames, pictures instead of labels, number face for numbers.
   Motion: transform and opacity only (no filter, blur, box-shadow motion, width transition). */
/* ---------- top HUD: row 1 = core / wave / money / settings, row 2 = core upgrades / ranks */
#top { top: 0; padding: calc(env(safe-area-inset-top) + 4px) 8px 0; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
#top > * { pointer-events: none; }
.row { display: flex; gap: 6px; align-items: center; }
.row > .chip { height: 32px; }
.hi { width: 18px; height: 18px; flex: none; display: block; overflow: visible; }
.hi > svg, #relBtn .core > svg { width: 100%; height: 100%; display: block; }
#money .hi { width: 16px; height: 16px; }
/* core: picture + number over a slanted gauge (8 px), the lost part stays as a white plate for 300 ms */
#core { padding: 2px 8px 2px 6px; flex: none; }
#core .cg { display: flex; flex-direction: column; gap: 2px; min-width: 56px; }
#coreN { font-size: 14px; line-height: 15px; text-align: left; min-width: 0; }
.gauge { height: 8px; position: relative; background: rgba(10,12,24,.75); clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); overflow: hidden; }
.gauge > i, .gauge > u { position: absolute; inset: 0; display: block; transform-origin: 0 50%; transform: scaleX(0); }
.gauge > i { background: var(--ar-hp); } .gauge > u { background: rgba(255,255,255,.9); text-decoration: none; transition: transform .3s .3s; }
#core.low .gauge > i, #boss .gauge > i { background: var(--ar-danger); }
#core.low .hi .cr { fill: var(--ar-danger); }
/* wave: 7 diamond dots + the boss mark; the dot of the current wave pulses (this is also the "preparing" sign), a 2 px line under the dots = progress inside the wave */
#wave { flex: 1; min-width: 0; padding: 0 10px 5px; justify-content: space-between; gap: 2px; align-items: center; }
#wave .dia { width: 9px; height: 9px; }
#wave .dia.cur { --dc: var(--ar-mana); animation: arPulseLow 1.2s ease-in-out infinite; }
#wave .dia.cur::after { display: none; }
#wave .dia.boss { width: 13px; height: 13px; --dc: color-mix(in srgb, var(--ar-danger) 55%, var(--ar-page)); }
#wave .dia.boss.on, #wave .dia.boss.cur { --dc: var(--ar-danger); }
.wprog { position: absolute; left: 10px; right: 10px; bottom: 4px; height: 2px; background: rgba(240,207,133,.2); overflow: hidden; }
.wprog > i { display: block; height: 100%; background: var(--ar-mana); transform-origin: 0 50%; transform: scaleX(0); }
/* money: coin + number (20 px, coin colour); the added amount floats up as +n */
#moneyW { position: relative; flex: none; }
#money { height: 32px; line-height: 1; gap: 4px; padding: 0 8px 0 6px; font-size: 20px; color: var(--ar-coin); }
#money .num { font-size: 20px; min-width: 2.6em; }
#money.bump { animation: bump .2s; }
@keyframes bump { 0% { transform: scale(1.15); } 100% { transform: scale(1); } }
#moneyW .gain { position: absolute; right: 4px; top: 32px; font-style: normal; font-size: 11px; line-height: 1; color: var(--ar-coin-hi); pointer-events: none; opacity: 0; font-family: var(--ar-num); font-weight: 700; }
#moneyW .gain.on { animation: gain .6s ease-out; }
@keyframes gain { 0% { opacity: 1; transform: translateY(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }
/* settings: a gear in the right corner opens the panel with the sound switch (44 px hit area around a 32 px chip) */
#gearBtn, #pauseHud, .cchip { appearance: none; border: 0; padding: 0; background: none; cursor: pointer; pointer-events: auto !important; display: flex; align-items: center; justify-content: center; margin-block: -6px; height: 44px; position: relative; }
#gearBtn, #pauseHud { width: 44px; margin-inline: -6px; flex: none; }
#pauseHud { clip-path: inset(0 6px 0 0); } #gearBtn { clip-path: inset(0 0 0 6px); }   /* the two 44px hit areas overlapped (~12px): split the overlap in the middle so a tap on the right half of ‖ no longer opens the gear (clip-path clips hit-testing; the 30-32px chips are not cut) */
#pauseHud { visibility: hidden; pointer-events: none !important; } body.incombat #pauseHud { visibility: visible; pointer-events: auto !important; }   /* (visibility, not display: the HUD row never jumps between prep and battle) */
#pauseHud .chip { width: 32px; height: 32px; padding: 0; justify-content: center; } #pauseHud .hi { width: 16px; height: 16px; }
#pauseOv { display: none; z-index: 12; } #pauseOv.on { display: flex; } #pauseOv .cfm-b { max-width: 280px; }
.po-t { font-size: 18px; font-weight: 800; letter-spacing: .14em; color: var(--ar-brass-hi, #e8c060); margin-bottom: 16px; }
.po-go { width: 100%; min-height: 56px; font-size: 18px; margin-bottom: 12px; } #pauseOv .acts .btn { min-height: 44px; font-size: 14px; }
#gearBtn .chip { width: 32px; height: 32px; padding: 0; justify-content: center; }
#gearBtn .hi { width: 18px; height: 18px; }
#setPanel { position: absolute; right: 8px; top: calc(env(safe-area-inset-top) + 42px); z-index: 8; --fr: var(--ar-fr-m); padding: 8px; display: none; }
#setPanel.on { display: flex; flex-direction: column; gap: 6px; animation: arRise .24s ease-out; }
#setPanel .sp-row { display: flex; align-items: center; gap: 6px; } #setPanel .sp-l { font-size: 13px; font-weight: 800; padding-right: 2px; }
#setPanel .sp-s { flex: 1; min-width: 52px; padding-inline: 6px; } #setPanel .sp-s.on { --fill: linear-gradient(180deg, var(--ar-mana-x), #d9a030); --ring: linear-gradient(180deg, #fff6d0, var(--ar-brass-hi) 40%, var(--ar-brass)); color: var(--ar-ink); font-weight: 900; }
#setPanel .danger.dis { display: none; }
.sp-h { text-align: center; font-size: 12px; font-weight: 800; color: var(--ar-brass-hi, #e8c060); letter-spacing: .1em; }
.sp-hr { border: 0; height: 1px; margin: 2px 0; background: linear-gradient(90deg, transparent, var(--ar-brass, #b08a30), transparent); width: 100%; }
.cfm-b .k { display: inline-block; }
#retCfm, #pauseCfm { display: none; z-index: 12; } #retCfm.on, #pauseCfm.on { display: flex; }
#setPanel { width: min(232px, calc(100% - 16px)); max-height: calc(100% - 60px); overflow-y: auto; } #setPanel .hide { display: none; }
.vol { display: flex; flex-direction: column; gap: 2px; } .vol .vm { margin-bottom: 4px; }
.vr { display: flex; align-items: center; gap: 8px; min-height: 44px; } .vl { flex: none; width: 52px; text-align: left; font-size: 12px; font-weight: 800; } .vn { flex: none; width: 28px; text-align: right; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.vsl { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 44px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.vsl::-webkit-slider-runnable-track { height: 6px; background: linear-gradient(90deg, var(--ar-brass-hi, #e8c060) var(--p, 50%), #2a3050 var(--p, 50%)); border: 1px solid var(--ar-brass, #b08a30); box-shadow: inset 0 1px 3px rgba(0,0,0,.7); }
.vsl::-moz-range-track { height: 6px; background: #2a3050; border: 1px solid var(--ar-brass, #b08a30); box-shadow: inset 0 1px 3px rgba(0,0,0,.7); } .vsl::-moz-range-progress { height: 6px; background: var(--ar-brass-hi, #e8c060); }
.vsl::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 0; transform: rotate(45deg); border: 2px solid #fff6d0; background: linear-gradient(135deg, #fff0b0, var(--ar-brass-hi, #e8c060) 55%, var(--ar-brass, #b08a30)); box-shadow: 0 1px 4px rgba(0,0,0,.6); }
.vsl::-moz-range-thumb { width: 18px; height: 18px; border-radius: 0; transform: rotate(45deg); border: 2px solid #fff6d0; background: var(--ar-brass-hi, #e8c060); }
.stl { align-self: center; margin-top: 4px; font-size: 13px; text-decoration: none; } .cfm-b p.sub { font-size: 13px; font-weight: 600; margin-bottom: 14px; color: var(--ar-text-dim, inherit); }
#retCfm .acts .btn { min-height: 48px; font-size: 14px; }
@keyframes arRise { 0% { opacity: 0; transform: translateY(16px); } 100% { opacity: 1; transform: translateY(0); } }
/* core upgrade chips: picture + 7 diamond points (間隔 = mana colour, 魔力量 = dense mana). "can upgrade" = the chip frame pulses (plate under the fill) */
.cchip { flex: none; text-align: left; }
.cchip .chip { height: 32px; width: 100%; gap: 5px; padding: 0 8px 0 6px; }
.cchip .pips { display: flex; gap: 2px; align-items: center; }
.cchip .pips .dia { width: 8px; height: 8px; }
.cchip.iv .pips .dia.on { --dc: var(--ar-mana); } .cchip.mana .pips .dia.on { --dc: var(--ar-mana-x); }
.cchip .pips .dia.pop { animation: pip .5s ease-out; } @keyframes pip { 0% { transform: scale(0); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
.cchip.can .chip::after { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--ar-mana); clip-path: inherit; animation: arPulse 1.2s ease-in-out infinite; }
#stage .cchip.can::after, #stage .cchip::after { display: none; }
.cchip.can .chip { --ring: linear-gradient(180deg, var(--ar-brass-hi), var(--ar-brass)); }
.cchip .hi { width: 18px; height: 18px; }
/* rank chips (位): element mark + points + a line to the next rank; 覚醒 / 極み = diamonds */
#rankRow { display: flex; gap: 4px; flex: 1; min-width: 0; pointer-events: none; }
.chip.rk { flex: 0 1 62px; min-width: 0; gap: 3px; padding: 0 5px 3px; justify-content: center; --ring: linear-gradient(180deg, var(--rc), var(--ar-brass-lo)); --fill: var(--ar-page); font-size: 13px; }
.chip.rk .hi { width: 14px; height: 14px; } .chip.rk .num { min-width: 1.1em; font-size: 13px; text-align: right; }
.chip.rk .seal { display: flex; gap: 1px; } .chip.rk .seal .dia { width: 6px; height: 6px; --dc: var(--ar-brass-hi); }
.chip.rk .wprog { left: 6px; right: 6px; bottom: 3px; }
.chip.rk .wprog > i { background: var(--rc); }
.chip.rk.fire { --rc: var(--ar-fire); } .chip.rk.thunder { --rc: var(--ar-thunder); } .chip.rk.ice { --rc: var(--ar-ice); }
.chip.rk .hi .m { fill: var(--rc); }
.chip.rk.r1, .chip.rk.r2 { --ring: linear-gradient(180deg, var(--ar-brass-hi), var(--rc)); }
/* boss bar: full width - 32 px, 12 px high, bevelled ends, danger colour, crest on the left */
#boss { top: calc(env(safe-area-inset-top) + 80px); padding: 0 66px 0 16px;   /* right 66 px = the weapon strip's column stays free, so the strip never moves when the bar appears */ display: none; pointer-events: none; }
#boss.on { display: block; }
#boss .bb { display: flex; align-items: center; gap: 6px; }
#boss .hi { width: 20px; height: 20px; }
#boss .bc { flex: 1; min-width: 0; }
#boss .nm { text-align: left; font-weight: 800; font-size: 13px; line-height: 15px; color: var(--ar-text); text-shadow: 0 1px 0 var(--ar-ink), 0 0 3px var(--ar-ink); letter-spacing: .08em; }
#boss .gauge { height: 16px; clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); background: linear-gradient(180deg, var(--ar-brass-hi), var(--ar-brass-lo)); overflow: hidden; }
#boss .gauge::before { content: ""; position: absolute; inset: 2px; background: rgba(10,12,24,.92); clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px); }
#boss .gauge > i, #boss .gauge > u { inset: 3px; clip-path: polygon(3px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 0 calc(100% - 3px), 0 3px); }
#boss .gauge > i { background: linear-gradient(180deg, #ff8670, var(--ar-danger) 45%, #a8281c); }
/* ---------- bottom dock */
#dock { bottom: 0; padding: 0 10px calc(env(safe-area-inset-bottom) + 10px); display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
#dock > * { pointer-events: auto; }
#hint { --fill: var(--ar-page); --bw: 1px; align-self: center; max-width: 94%; padding: 6px 12px; font-size: 12px; text-align: center; pointer-events: none !important; }
#hint:empty { display: none; }
#hint .hph { display: inline-block; font-weight: inherit; }   /* hint phrases never split inside a word (QA 12-01) */
body.incombat #hint { align-self: flex-start; max-width: calc(100% - 104px); text-align: left; }
#prepRow { display: flex; gap: 8px; align-items: stretch; }
#prepRow { gap: 6px; } #prepRow .btn { flex: 1 1 0; min-width: 0; } #prepRow #goBtn { flex: 2 0 auto; white-space: nowrap; padding-left: 8px; padding-right: 8px; }
@media (max-width: 400px), (min-aspect-ratio: 4/5) and (max-height: 830px) { #prepRow #bagBtn > span:nth-child(2) { display: none; } #prepRow #bagBtn .bagic .gem { width: 22px; height: 22px; } #prepRow #goBtn { font-size: 15px; } #prepRow #bagBtn .num { min-width: 0; font-size: 14px; } #prepRow #bagBtn { flex: 0 0 auto; min-width: 58px; gap: 3px; padding-left: 6px; padding-right: 6px; } #prepRow #bagBtn .bagic .gem:nth-child(n+2) { display: none; } #prepRow #bagBtn .bagic .gem { width: 24px; height: 24px; } #prepRow #goBtn { min-width: 110px; } }
#bagBtn { gap: 6px; padding: 4px 8px; white-space: nowrap; }
#bagBtn .bagic { display: flex; gap: 2px; }
#bagBtn .bagic .gem { width: 26px; height: 26px; }
#bagBtn .num { font-size: 15px; min-width: 2.8em; text-align: left; }
#modeRow { display: flex; gap: 8px; align-items: center; justify-content: center; }
#modeRow .chip { flex: 1; font-size: 12px; min-height: 44px; } #modeRow .btn { flex: none; white-space: nowrap; }
#pv { --fill: var(--ar-page); position: absolute; pointer-events: none; transform: translate(-50%, -100%); padding: 3px 10px; font-weight: 700; font-size: 13px; white-space: nowrap; display: none; z-index: 3; max-width: 96%; }
#pv .num, #pv .price .num { min-width: 0; }
#pv.ok { --ring: linear-gradient(180deg, var(--ar-brass-hi), var(--ar-brass-lo)); } #pv.ok.full { --ring: var(--ar-mana); }
#pv.ok .pm { color: var(--ar-text); } #pv.ok.full .pm { color: var(--ar-mana); }
#pv.bad { --ring: var(--ar-danger); color: var(--ar-danger); }
#pv .xi { width: 12px; height: 12px; display: inline-block; vertical-align: -1px; margin-right: 3px; }
body.intitle #top, body.intitle #dock, body.intitle #setPanel { visibility: hidden; }
/* ---------- build strip: six dark octagon pedestals down the right edge (kinds are told apart by shape, not by colour) */
/* the strip stops above the release button / the dock (reserve 108 px): the slot height shrinks (never under 44 px) to fit n slots, and a longer strip scrolls (the weapons are picked by tapping, so a scroll gesture is free) */
#build { --vh: 100vh; --n: 7; --gap: 4px; --room: calc(var(--vh) - env(safe-area-inset-top) - 86px - 108px - env(safe-area-inset-bottom)); --bh: clamp(44px, calc((var(--room) - (var(--n) - 1) * var(--gap)) / var(--n)), 56px);
  position: absolute; right: 6px; top: calc(env(safe-area-inset-top) + 86px); display: flex; flex-direction: column; gap: var(--gap); z-index: 4; max-height: var(--room); overflow-y: auto; overflow-x: hidden; scrollbar-width: none; overscroll-behavior: contain; }
@supports (height: 100dvh) { #build { --vh: 100dvh; } }
#build::-webkit-scrollbar { display: none; }
.bk { --fr: 12px; --fill: var(--ar-page-hi); --ring: linear-gradient(180deg, var(--ar-brass), var(--ar-brass-lo)); width: clamp(48px, calc(var(--bh) * .93), 52px); height: var(--bh); flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; border: 0; cursor: pointer; line-height: 1.1; gap: 2px; }
.bk { --gs: clamp(28px, calc(var(--bh) - 16px), 40px); }
.bk .g { width: var(--gs); height: var(--gs); display: flex; align-items: center; justify-content: center; }
.bk .g .ai { width: var(--gs); height: var(--gs); }
.bk .c { font-size: 11px; font-weight: 800; color: var(--ar-coin); font-family: var(--ar-num); min-width: 0; letter-spacing: 0; }
.bk .c.free { font-family: inherit; color: var(--ar-text-sub); }
.bk.on { --ring: linear-gradient(180deg, var(--ar-brass-hi), var(--ar-brass)); }
.bk.on::after { content: ""; position: absolute; inset: 3px; border: 1px solid var(--ar-mana); clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px); pointer-events: none; }
.bk.poor .g { opacity: .45; } .bk.poor .c { color: var(--ar-danger); }
#bkInfo { position: absolute; right: 64px; top: calc(env(safe-area-inset-top) + 90px); max-width: 190px; z-index: 4; padding: 6px 10px; font-size: 12px; line-height: 1.4; pointer-events: none; --fill: var(--ar-page); }
body.boss #bkInfo { top: calc(env(safe-area-inset-top) + 126px); }
#pv { z-index: 5; } #stage:has(#pv[style*="display: block"]) #bkInfo { opacity: 0; }   /* (round 7) the placement tag and the weapon description met near the top edge (320 px): the tag wins while a weapon is dragged */
#bkInfo b { font-size: 13px; white-space: nowrap; flex: none; }   /* (Fable 7: 「中継塔」 was squeezed to one character per line next to the long relay text) */

/* ---------- release button (魔力解放): the same frame language as the other controls (11-27 review: the flat gold circle looked cheap) - a chamfered brass ring, a dark pit,
   a gauge that fills from the bottom (two stages, a tick at half), the crystal on top and two stage diamonds under it. No text; seconds show while it runs.
   Tap = 1 stage, long press = both (the hold sweep lightens the pit). Motion: transform / opacity only. */
#relBtn { --fr: 22px; --bw: 2.5px; --f2: calc(var(--fr) - var(--bw) * .586); --ring: linear-gradient(180deg, var(--ar-brass-hi), var(--ar-brass) 40%, var(--ar-brass-lo));
  position: absolute; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 14px); width: 84px; height: 84px; border: 0; padding: 0; isolation: isolate; background: var(--ring); color: var(--ar-text-sub); touch-action: none; display: flex; align-items: center; justify-content: center; z-index: 5;
  clip-path: polygon(var(--fr) 0, calc(100% - var(--fr)) 0, 100% var(--fr), 100% calc(100% - var(--fr)), calc(100% - var(--fr)) 100%, var(--fr) 100%, 0 calc(100% - var(--fr)), 0 var(--fr)); }
#relBtn::before { content: ""; position: absolute; inset: var(--bw); z-index: -1; background: var(--ar-pit); clip-path: polygon(var(--f2) 0, calc(100% - var(--f2)) 0, 100% var(--f2), 100% calc(100% - var(--f2)), calc(100% - var(--f2)) 100%, var(--f2) 100%, 0 calc(100% - var(--f2)), 0 var(--f2)); }
#relBtn .rg { position: absolute; inset: 6px; --g: calc(var(--fr) - 5px); overflow: hidden; background: linear-gradient(180deg, rgba(10,12,24,.95), var(--ar-page) 80%);
  clip-path: polygon(var(--g) 0, calc(100% - var(--g)) 0, 100% var(--g), 100% calc(100% - var(--g)), calc(100% - var(--g)) 100%, var(--g) 100%, 0 calc(100% - var(--g)), 0 var(--g)); pointer-events: none; }
#relBtn .rf { position: absolute; inset: 0; display: block; transform-origin: 50% 100%; transform: scaleY(0); background: linear-gradient(0deg, var(--ar-mana-lo), var(--ar-mana) 70%, var(--ar-mana-hi)); opacity: .85; }
#relBtn .rt { position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: color-mix(in srgb, var(--ar-brass-hi) 60%, transparent); }
#relBtn .rh { position: absolute; inset: 0; opacity: 0; background: conic-gradient(rgba(255,255,255,.55) var(--h, 0deg), transparent 0); }
#relBtn.holding .rh { opacity: 1; }
#relBtn .core { position: relative; width: 38px; height: 38px; margin-top: -6px; opacity: .55; display: block; pointer-events: none; }
#relBtn .core .m { fill: var(--ar-text-off); }
#relBtn .rp { position: absolute; left: 0; right: 0; bottom: 11px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
#relBtn .rp .dia { width: 9px; height: 9px; --dc: color-mix(in srgb, var(--ar-brass) 70%, var(--ar-page)); } #relBtn .rp .dia.on { --dc: var(--ar-mana-x); }
#relBtn .rp .dia::after { background: var(--ar-pit); }
#relBtn .secs { position: absolute; font-family: var(--ar-num); font-weight: 700; font-size: 26px; color: var(--ar-ink); display: none; paint-order: stroke fill; -webkit-text-stroke: 3px rgba(255,255,255,.35); }
#relBtn.ready { --ring: linear-gradient(180deg, #fff6d0, var(--ar-mana-x) 45%, var(--ar-brass)); } #relBtn.ready .core { opacity: 1; animation: arPulseLow 1.2s ease-in-out infinite; } #relBtn.ready .core .m { fill: var(--ar-mana-x); }
#relBtn.ready .rf { background: linear-gradient(0deg, var(--ar-coin-lo), var(--ar-mana-x) 75%, var(--ar-mana-x-hi)); opacity: .8; }
@keyframes arPulseLow { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
#relBtn.ready::after, #stage #relBtn.ready::after { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--ar-mana-x); clip-path: inherit; animation: arPulse 1.2s ease-in-out infinite; display: block; }
#relBtn.active { --ring: linear-gradient(180deg, #fff, var(--ar-mana-x-hi) 30%, var(--ar-mana-x)); } #relBtn.active .rf { background: linear-gradient(0deg, var(--ar-coin-lo), var(--ar-coin) 55%, var(--ar-mana-x)); opacity: 1; } #relBtn.active .core { display: none; } #relBtn.active .secs { display: block; } #relBtn.active .rp .dia { --dc: var(--ar-ink); }
#relBtn.dead { opacity: .8; }
#relBtn:active { transform: scale(.96); }
/* core-hit flash on the core chip: an opacity plate (replaces the old background animation) */
#stage #core.hit { animation: none; }
#core::after { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--ar-danger); clip-path: inherit; opacity: 0; pointer-events: none; }
#core.hit::after { animation: arHit .5s ease-out; }
@keyframes arHit { 0% { opacity: 1; } 100% { opacity: 0; } }
/* ---------- toast (3-3): 36 px, small bevel, one line, rises 8 px; the picture on the left is a brass diamond. Overrides the older look in arca-fx.css (C2 owns the timing). */
#stage #toast span { --fill: var(--ar-page); --bw: 1px; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 10px; border-radius: 0; font-size: 13px; line-height: 1.3; opacity: 0; transform: translateY(8px); transition: opacity .16s, transform .16s; }
#stage #toast span::after { content: ""; order: -1; width: 12px; height: 12px; flex: none; background: var(--ar-brass-hi); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
#stage #toast.on span { opacity: 1; transform: translateY(0); }

/* HUD pieces sit above the toast (z 3) and the tutorial finger (z 3): a toast is drawn under them and stays clear of the build strip (right 64 px) (11-27) */
#top, #dock, #boss, #relBtn { z-index: 4; }
/* round 5: the boss's entry point is right under its bar: the bar is faint for the first ~3.6 s (opacity only) */
#boss { transition: opacity .35s; }
#boss.enter { opacity: .28; }

/* round 6: at 320 px the rank chips (mark + points + seal) are tight: smaller padding / gaps so the seal diamonds are never cut at the chip edge */
@media (max-width: 359px), (max-height: 639px) { #wave { padding: 0 6px 5px; gap: 1px; } #wave .dia { width: 7px; height: 7px; } #wave .dia.boss { width: 11px; height: 11px; } #money .num { font-size: 17px; min-width: 2.4em; } #money { padding: 0 6px 0 5px; } }   /* 320 px: the 8 wave marks fit (the boss mark was cut off) */
@media (max-width: 359px), (max-height: 639px) { .chip.rk { gap: 2px; padding: 0 3px 3px; } .chip.rk .num { min-width: 0; flex: none; } .chip.rk .hi { flex: none; } .chip.rk .seal { min-width: 0; flex: 0 1 auto; } .chip.rk .hi { width: 12px; height: 12px; } }

/* short screens: seven weapon buttons must all stay above the release button (320x568, 360x560): smaller slots, tighter gaps */
@media (max-height: 700px) { #build { --gap: 3px; top: calc(env(safe-area-inset-top) + 80px); --room: calc(var(--vh) - env(safe-area-inset-top) - 80px - 108px - env(safe-area-inset-bottom)); } .bk .c { font-size: 10px; } }
/* 320 px: the pause button next to the gear takes room from the top row, so the chips tighten (the 8 wave marks must all stay inside their chip) */
@media (max-width: 359px) { #top .row { gap: 4px; } #core { padding: 2px 5px 2px 5px; gap: 4px; } #core .cg { min-width: 40px; } #gearBtn, #pauseHud { margin-inline: -8px; } #gearBtn .chip, #pauseHud .chip { width: 30px; height: 30px; } #money { padding: 0 5px 0 4px; gap: 3px; } #money .num { min-width: 3ch; font-variant-numeric: tabular-nums; text-align: right; } }
#stage.dimmed::after { content: ''; position: absolute; inset: 0; z-index: 7; background: rgba(6,8,18,.74); pointer-events: none; }   /* (the panel opened from the pause screen keeps the same dim) */
#build.more { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent); }      /* (12-01) more weapons below: the lower edge fades */
/* (12-01 QA) the rank diamonds sit in the chip's top-right corner instead of after the number: at 375 wide the third chip (氷 9◆◆) was cut at the screen edge */
.chip.rk { position: relative; } .chip.rk .seal { position: absolute; top: 3px; right: 4px; flex-direction: column; gap: 1px; } .chip.rk .seal .dia { width: 5px; height: 5px; }

/* 無限ウェーブ (12-01 長旅): the 7 + 1 marks give way to 「無限 n」 (a boss round: 「第 n 巡」); a gold diamond once the own best is passed */
#wave .ewl { display: none; }
#wave.endless .dia { display: none; }
#wave.endless .ewl { display: flex; align-items: baseline; justify-content: center; gap: 4px; flex: 1; min-width: 0; white-space: nowrap; line-height: 1; padding-bottom: 1px; }
#wave .ewl small { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--ar-brass-hi); }
#wave .ewl .num { min-width: 0; font-size: 18px; color: var(--ar-text); }
#wave .ewl .eh { display: flex; align-self: center; width: 16px; height: 16px; } #wave .ewl .eh svg { width: 100%; height: 100%; display: block; }
#wave.eboss .ewl small { color: var(--ar-danger); }
#wave.pb { --ring: linear-gradient(180deg, #fff2b0, #ffc83d 50%, #a86a12); --bw: 2px; }
#wave.pb .ewl .num { color: #ffd76a; }
@media (max-width: 359px), (max-height: 639px) { #wave .ewl small { font-size: 10px; letter-spacing: .04em; } #wave .ewl .num { font-size: 15px; } #wave .ewl .eh { width: 12px; height: 12px; } #wave.endless .ewl { gap: 2px; } }

#hint.boost { pointer-events: auto !important; cursor: pointer; --ring: linear-gradient(180deg, var(--ar-brass-hi), var(--ar-brass) 60%, var(--ar-brass-lo)); --bw: 2px; }
#bagBtn .bdot { position: absolute; top: 4px; right: 7px; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff2b0, #ffc83d 55%, #a86a12); box-shadow: 0 0 0 1.5px #0a0c18, 0 0 6px rgba(255,200,61,.7); pointer-events: none; }

/* 無限ウェーブの節目 (12-01 長旅 QA): 「自己ベスト更新」 plate under the HUD (1.2 s) and the 「第 n 巡」 band at a boss round (1 s); CSS animation only */
#pbTag, #rdBand, #pbTag *, #rdBand * { pointer-events: none !important; }   /* (the children too: .ov > * turns them back on, and the invisible band then swallowed taps on the weapon strip and the field, 12-01) */
#pbTag, #rdBand { z-index: 6; opacity: 0; }
#pbTag { top: 36%; bottom: auto; left: 0; right: 68px; display: flex; justify-content: center; align-items: flex-start; }
#pbTag > span { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 16px; border-radius: 4px; font-size: 14px; font-weight: 900; letter-spacing: .08em; white-space: nowrap; color: #2a1c04; background: linear-gradient(180deg, #fff2b0, #ffc83d 55%, #d89a22); box-shadow: 0 0 0 1px #fff6d0 inset, 0 2px 10px rgba(0,0,0,.55); }
#pbTag small { font-size: 12px; font-weight: 800; } #pbTag .num { min-width: 0; font-size: 20px; color: #2a1c04; }
#pbTag.on { animation: pbRise 1.6s ease-out both; }
@keyframes pbRise { 0% { opacity: 0; transform: translateY(18px); } 10% { opacity: 1; transform: translateY(0); } 84% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-6px); } }
body.pbon #banner, body.pbon.boss #banner { margin-top: 0; top: calc(36% + 42px); right: 68px; }
#rdBand { top: 34%; bottom: auto; height: 0; }
#rdBand .rdb { position: relative; height: 112px; margin-top: -56px; background: rgba(10,12,34,.92); display: flex; align-items: center; justify-content: center; }
#rdBand .rl { position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--ar-brass-hi) 18%, var(--ar-brass-hi) 82%, transparent); transform-origin: 50% 50%; } #rdBand .rl.t { top: 0; } #rdBand .rl.u { bottom: 0; }
#rdBand .rdg { display: flex; flex-direction: column; align-items: center; gap: 4px; white-space: nowrap; }
#rdBand .rdk { display: flex; align-items: baseline; gap: 4px; font-size: 16px; font-weight: 800; letter-spacing: .14em; color: #ff6b5a; text-shadow: 0 1px 4px rgba(0,0,0,.85); } #rdBand .rdk .num { min-width: 0; font-size: 20px; color: #ff6b5a; }
#rdBand .rdt { font-size: 34px; font-weight: 900; letter-spacing: .1em; padding-left: .1em; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.85); }
#rdBand.on { animation: rdBand 1s ease-out both; } #rdBand.on .rl { animation: rdLine 1s ease-out both; } #rdBand.on .rdg { animation: rdPush 1s ease-out both; }
@keyframes rdBand { 0% { opacity: 0; } 10% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rdLine { 0% { transform: scaleX(0); } 22% { transform: scaleX(1); } 100% { transform: scaleX(1); } }
@keyframes rdPush { 0% { transform: scale(1.25); opacity: 0; } 20% { transform: scale(1); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@media (max-width: 359px) { #rdBand .rdt { font-size: 28px; } #pbTag > span { padding: 5px 12px; font-size: 13px; } }
