/* Arcalink play.html - the 2章通し screens (spec docs/specs/arcalink-chapter2.md ch.2, 4-2, 5, 7; arcalink.md 9-2): the chapter select, the chapter change, the hand tray,
   the entrance arrows, the depth mark, the boss bars (two bars after the dragon splits, the 岩の鎧 chip), the resume button and the loading cover.
   Same tokens as the other sheets (css/arca-tokens.css). Motion: transform and opacity only. No border-radius except round mana things. */

/* ---------- boss bar: the two bars of the split dragon + the 岩の鎧 chip */
#boss .gz { display: flex; gap: 6px; }
#boss .gz .gauge { flex: 1; min-width: 0; }
#boss .gauge.g2.hide { display: none; }
#boss .gauge.dead { opacity: .4; }
#boss .arm { display: flex; align-items: center; gap: 3px; flex: none; }
#boss .arm.hide { display: none; }
#boss .arm svg { width: 26px; height: 26px; display: block; }
#boss .arm .num { font-size: 17px; min-width: 1.1em; text-align: center; color: #e3e7ee; paint-order: stroke fill; -webkit-text-stroke: 3px var(--ar-ink); }
/* the boss of chapter 2 has no picture yet: an emblem entrance (the name under a large mark) */
.fxbs.emb.noart { top: 30%; }
.fxbs.emb .glow { display: block; }
.fxbs.emb .bm { display: block; width: 92px; height: 92px; margin: 0 auto 12px; }

/* ---------- title: the resume button above 「はじめる」 */
.tt-btns > .btn { width: 260px; }
.rb { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.rb small { font-size: 11px; font-weight: 700; letter-spacing: .04em; }

/* ---------- chapter select */
div.sl { background: radial-gradient(ellipse at 50% 0%, rgba(40,60,110,.5), transparent 62%), var(--ar-night); }   /* (the chapter select screen only: the stat labels of the end screen are span.sl and must stay clear) */
.sl-sc { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; display: flex; flex-direction: column; gap: 12px; padding: calc(env(safe-area-inset-top) + 12px) 16px calc(env(safe-area-inset-bottom) + 136px); }
.sl-top { display: flex; }
.sl-h { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: .08em; text-align: center; text-wrap: balance; }
.sl-cards { display: flex; flex-direction: column; gap: 12px; }
.sc-card { display: block; width: 100%; padding: 0; border: 0; text-align: left; cursor: pointer; --fr: var(--ar-fr-l); }
.sc-card .pic { display: block; position: relative; aspect-ratio: 5 / 2; margin: var(--bw) var(--bw) 0; background: var(--ar-pit) center / cover no-repeat; transition: opacity .15s; }
.sc-card:not(.sel) .pic { opacity: .82; }
.sc-card .pic::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; background: linear-gradient(0deg, rgba(10,12,24,.75), transparent); }
.sc-card .chk { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; padding: 2px; box-sizing: border-box; border-radius: 50%; background: rgba(10,12,34,.96); box-shadow: 0 0 0 1px rgba(240,207,133,.5); z-index: 1; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.sc-card .chk svg { width: 100%; height: 100%; display: block; }
.sc-card.sel .chk { opacity: 1; transform: scale(1); }
.sc-card .cap { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px 2px; }
.sc-card .nm { font-size: 20px; font-weight: 900; letter-spacing: .06em; }
.sc-card .cap small, .sc-card .inf small { font-size: 12px; font-weight: 600; color: var(--ar-text-sub); }
.sc-card .inf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 2px 12px 11px; }
.sc-card .m { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; } .sc-card .m svg { width: 18px; height: 18px; flex: none; } .sc-card .m .num { font-size: 15px; min-width: 0; }
.sc-card .m .dia { --dc: var(--ar-danger); width: 10px; height: 10px; }
.sc-card.sel { --ring: linear-gradient(180deg, var(--ar-mana-hi), var(--ar-mana)); }
.sl-depth { padding: 10px 12px 12px; --fr: var(--ar-fr-m); }
.dps { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.dpb { min-width: 52px; padding: 4px 10px; gap: 3px; }
.dpb .fl { display: flex; width: 16px; height: 16px; } .dpb .fl svg { width: 100%; height: 100%; display: block; }
.dpb .num { min-width: 0; font-size: 17px; }
.dpb.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); }
.dnote { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--ar-text-sub); } .dnote .num { min-width: 0; font-size: 13px; color: var(--ar-text); }
.dnote.lock { display: flex; align-items: center; gap: 6px; margin-top: 4px; } .dnote.lock svg { width: 20px; height: 20px; flex: none; }
.sl-fix { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 16px calc(env(safe-area-inset-bottom) + 12px); background: linear-gradient(0deg, rgba(8,10,22,.97) 66%, transparent); pointer-events: none; }
.sl-fix .btn { width: 100%; pointer-events: auto; }
@media (max-height: 700px) { .sl-sc { gap: 8px; } .sl-h { font-size: 19px; } .sc-card .pic { aspect-ratio: 3 / 1; } .sc-card .cap { padding-top: 6px; } .sc-card .inf { padding-bottom: 8px; } }

/* ---------- ask before a new run throws a save away */
.cfm { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(6,8,18,.74); }
.cfm-b { width: 100%; max-width: 320px; padding: 18px 16px 16px; text-align: center; --fr: var(--ar-fr-l); }
.cfm-b p { text-wrap: balance; margin: 0 0 14px; font-size: 15px; font-weight: 700; line-height: 1.6; }
.cfm-b .acts { display: flex; gap: 8px; } .cfm-b .acts .btn { flex: 1; min-width: 0; padding: 6px 8px; }

/* ---------- loading cover (a continued save is restored behind it) */

/* ---------- chapter change: a pillar of light from the core, fog that closes over the screen, the chapter-2 field under it, the fog opens */
#chap { position: absolute; inset: 0; z-index: 7; overflow: hidden; pointer-events: auto; }
#chap .fog { position: absolute; will-change: opacity; opacity: 0; pointer-events: none; }
#chap .f1 { inset: 0; background: radial-gradient(ellipse at 50% 55%, #243649 0%, #131f2d 72%), #121c28; }
#chap .f3 { inset: -10% -30%; background: radial-gradient(ellipse 30% 14% at 62% 22%, rgba(172,194,206,.4), transparent 70%), radial-gradient(ellipse 34% 16% at 20% 62%, rgba(150,176,192,.4), transparent 70%), radial-gradient(ellipse 30% 14% at 80% 86%, rgba(140,166,182,.36), transparent 70%); animation: chFog 13s ease-in-out infinite alternate-reverse; }
#chap .f2 { inset: -10% -30%; background: radial-gradient(ellipse 46% 20% at 24% 28%, rgba(160,184,198,.5), transparent 70%), radial-gradient(ellipse 52% 22% at 76% 52%, rgba(146,172,188,.46), transparent 70%), radial-gradient(ellipse 44% 18% at 38% 80%, rgba(134,160,176,.44), transparent 70%); animation: chFog 9s ease-in-out infinite alternate; }
@keyframes chFog { 0% { transform: translate3d(-7%, 0, 0); } 100% { transform: translate3d(7%, 0, 0); } }
#chap .pil { position: absolute; left: var(--cx, 50%); top: 0; width: 70px; opacity: 0; transform-origin: 50% 100%; transform: translateX(-50%) scaleY(0); pointer-events: none; will-change: transform, opacity;
  background: linear-gradient(90deg, transparent, rgba(255,246,214,.95) 50%, transparent); -webkit-mask-image: linear-gradient(0deg, transparent, #000 12%, #000 38%, transparent); mask-image: linear-gradient(0deg, transparent, #000 12%, #000 38%, transparent); }
#chap .pil.w { width: 190px; background: linear-gradient(90deg, transparent, rgba(255,226,150,.5) 50%, transparent); -webkit-mask-image: linear-gradient(0deg, transparent, #000 16%, transparent 92%); mask-image: linear-gradient(0deg, transparent, #000 16%, transparent 92%); }
#chap .ttl { position: absolute; left: 0; right: 0; top: 33%; display: flex; flex-direction: column; align-items: center; gap: 6px; opacity: 0; pointer-events: none; text-align: center; padding: 0 16px; }
#chap .ttl small { font-size: 14px; font-weight: 800; letter-spacing: .5em; color: var(--ar-brass-hi); padding-left: .5em; }
#chap .ttl b { font-size: 34px; font-weight: 900; letter-spacing: .14em; padding-left: .14em; color: var(--ar-text); paint-order: stroke fill; -webkit-text-stroke: 5px var(--ar-ink); }
#chap .ttl > b::after { content: ""; display: block; height: 2px; margin: 8px 6%; background: linear-gradient(90deg, transparent, var(--ar-brass-hi), transparent); }
#chap .pgc { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ar-text-sub); }
#chap .pgc .pgi { display: flex; width: 18px; height: 18px; } #chap .pgc .pgi svg { width: 100%; height: 100%; display: block; }
#chap .pgc .num { min-width: 0; font-size: 14px; color: var(--ar-text); }
#chap .wt { position: absolute; left: 0; right: 0; bottom: 20%; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ar-text-sub); opacity: 0; pointer-events: none; }
#chap .wt i { width: 8px; height: 8px; background: var(--ar-mana); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); animation: arPulse 1s ease-in-out infinite; }
body.inchap #dock, body.inchap #build, body.inchap #bkInfo, body.inchap #relBtn, body.inchap #boss, body.inchap #sheet { visibility: hidden; }

/* ---------- the hand: weapons that went back to the hand at the chapter change; tap one, then press the field - or 「おすすめの置き方」 for all of them */
#hand { --fr: var(--ar-fr-m); padding: 5px 6px; display: flex; align-items: center; gap: 6px; }
#hand .ht { flex: none; display: flex; flex-direction: column; align-items: center; width: 34px; font-size: 12px; font-weight: 800; line-height: 1.2; }
#hand .hn { min-width: 0; font-size: 18px; color: var(--ar-mana-x); }
#hand #autoBtn { flex: none; min-height: 52px; padding: 4px 8px; font-size: 13px; line-height: 1.25; }
#hand .hl { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; scrollbar-width: none; }
#hand .hl::-webkit-scrollbar { display: none; }
.hc { flex: none; --fr: 8px; --bw: 1.5px; --fill: var(--ar-page-hi); --ring: linear-gradient(180deg, var(--ar-brass), var(--ar-brass-lo)); position: relative; isolation: isolate; border: 0; padding: 0; width: 52px; height: 56px; background: var(--ring); cursor: pointer; display: flex; align-items: center; justify-content: center;
  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)); }
.hc::before { content: ""; position: absolute; inset: var(--bw); z-index: -1; background: var(--fill); --f2: calc(var(--fr) - var(--bw) * .586);
  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)); }
.hc .g { width: 36px; height: 36px; display: block; margin-top: -6px; } .hc .g .ai { width: 100%; height: 100%; }
.hc .lv { position: absolute; left: 0; right: 0; bottom: 3px; text-align: center; font-size: 11px; min-width: 0; color: var(--ar-text-sub); }
.hc .cnt { position: absolute; right: 5px; top: 3px; font-size: 12px; min-width: 0; color: var(--ar-mana-x); }
.hc .gms { position: absolute; left: 4px; top: 3px; display: flex; flex-direction: column; gap: 1px; } .hc .gms .gem { width: 15px; height: 15px; display: block; }
.hc.on { --ring: linear-gradient(180deg, var(--ar-mana-hi), var(--ar-mana)); --fill: #16304a; }
.hc.on .lv { color: var(--ar-text); }
body.incombat #hand { margin-right: 94px; }

/* ---------- the entrances of the coming wave (preparation): a block arrow on each road mouth, pointing the way the enemies walk */
#entries { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ent { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.ent .r { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.ent .a { position: absolute; left: -15px; top: -19px; width: 30px; height: 38px; animation: entBob 1.3s ease-in-out infinite; will-change: transform, opacity; }
.ent .a::before, .ent .a::after { content: ""; position: absolute; clip-path: polygon(50% 0, 100% 46%, 71% 46%, 71% 100%, 29% 100%, 29% 46%, 0 46%); }
.ent .a::before { inset: -3px -3px -2px; background: var(--ar-ink); }
.ent .a::after { inset: 0; background: linear-gradient(180deg, #ffb0a0, var(--ar-danger) 55%, #b02a1e); }
.ent.boss .a { transform-origin: 50% 50%; left: -22px; top: -27px; width: 44px; height: 54px; }
.ent .t { position: absolute; left: -40px; width: 80px; top: 26px; text-align: center; font-size: 12px; font-weight: 900; letter-spacing: .1em; color: var(--ar-text); paint-order: stroke fill; -webkit-text-stroke: 3px var(--ar-ink); }
.ent .t:empty { display: none; }
@keyframes entBob { 0%, 100% { transform: translateY(7px); opacity: .62; } 50% { transform: translateY(-7px); opacity: 1; } }

/* ---------- the depth mark (preparation, top left under the status chips) */
#depthChip { position: absolute; left: 8px; top: calc(env(safe-area-inset-top) + 84px); z-index: 4; min-height: 30px; padding: 2px 10px 2px 6px; gap: 4px; pointer-events: none; }
#depthChip .di { display: flex; width: 20px; height: 20px; } #depthChip .di svg { width: 100%; height: 100%; display: block; }
#depthChip .num { font-size: 18px; min-width: 0; color: var(--ar-mana-x); }
#stage:has(#hand:not(.hide)) #toast { bottom: calc(env(safe-area-inset-bottom) + 148px); }
#hand { transition: opacity .12s; } #hand.dim { opacity: 0; pointer-events: none; }
@media (max-height: 700px) { #hand { padding: 4px 6px; } .hc { width: 48px; height: 50px; } .hc .g { width: 31px; height: 31px; margin-top: -5px; } #hand #autoBtn { min-height: 46px; } .hc .lv { bottom: 2px; font-size: 10px; } }

/* ---------- loading cover (round 2): the select screen's navy, a breathing gold diamond, a thin gold rule, the line */
#cover { position: absolute; inset: 0; z-index: 12; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: radial-gradient(ellipse at 50% 0%, rgba(40,60,110,.5), transparent 62%), var(--ar-night); color: #E8E4D8; font-size: 16px; font-weight: 600; letter-spacing: .06em; transition: opacity .2s; }
#cover .cv-d { width: 64px; height: 64px; background: linear-gradient(135deg, var(--ar-brass-hi), var(--ar-brass) 55%, var(--ar-brass-lo)); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); animation: cvPulse 2.4s ease-in-out infinite; }
#cover .cv-r { width: 150px; height: 1px; background: linear-gradient(90deg, transparent, var(--ar-brass-hi), transparent); }
@keyframes cvPulse { 0%, 100% { transform: scale(.86); opacity: .7; } 50% { transform: scale(1); opacity: 1; } }

/* ---------- boss entrance of chapter 2: a name band like the chapter title + the gate glowing red */
.fxbs.emb.noart { top: 30%; left: 0; right: 0; padding: 12px 0 16px; background: linear-gradient(90deg, transparent, rgba(0,0,0,.55) 14%, rgba(0,0,0,.55) 86%, transparent); }
.fxbs.emb .glow { display: none; }
.fxbs.emb .bn { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 38px; letter-spacing: .14em; padding-left: .14em; -webkit-text-stroke: 5px var(--ar-ink); }
.fxbs.emb .bn .bkk { font-size: 14px; font-weight: 800; letter-spacing: .5em; padding-left: .5em; color: var(--ar-brass-hi); -webkit-text-stroke: 0; }
.fxbs.emb .bn::after { width: 70%; margin: 6px 0 0; background: linear-gradient(90deg, transparent, var(--ar-brass-hi), transparent); }
.fxgate { position: absolute; width: 170px; height: 120px; margin: -60px 0 0 -85px; opacity: 0; pointer-events: none; background: radial-gradient(closest-side, rgba(255,72,48,.8), rgba(255,72,48,.28) 55%, transparent); }

/* ---------- warning plates (round 2): opaque navy, a 2 px red-orange frame, white text; appears at once and stays */
.fxwarn .wb { --fill: #0c1430; --ring: #ff6a3a; --bw: 2px; }
.fxwarn .w1 { color: #fff; } .fxwarn .w2 { color: #fff; opacity: .92; }
.fxwarn .wn { color: #fff; -webkit-text-stroke: 3px var(--ar-ink); }
.fxwarn.held .wb { --fill: #1c1708; --ring: linear-gradient(180deg, #fff3c4, #e8b64a 50%, #7a5a12); --bw: 2px; }
.fxwarn.stun .wb { --fill: #0c1430; --ring: #aab4c6; } .fxwarn.stun .wn { display: none; } .fxwarn.stun .w2 { color: #fff; }
#boss .arm .num { display: none; }

/* ---------- chapter change (round 2): lighter fog (70 % at most), streaks flowing both ways, the page line on a band */
#chap .f4, #chap .f5 { inset: 0 -40%; background: linear-gradient(90deg, transparent, rgba(196,214,226,0.3) 50%, transparent) 0 18% / 30% 2px no-repeat, linear-gradient(90deg, transparent, rgba(196,214,226,0.26) 50%, transparent) 45% 33% / 36% 3px no-repeat, linear-gradient(90deg, transparent, rgba(196,214,226,0.3) 50%, transparent) 12% 52% / 28% 2px no-repeat, linear-gradient(90deg, transparent, rgba(196,214,226,0.24) 50%, transparent) 62% 68% / 34% 3px no-repeat, linear-gradient(90deg, transparent, rgba(196,214,226,0.28) 50%, transparent) 30% 86% / 30% 2px no-repeat; }
#chap .f4, #chap .f5 { filter: blur(2px); opacity: .6; }   /* soft mist streaks, not thin scan lines (Fable final review) */
#chap .f4 { animation: chFlowR 3.2s linear infinite; } #chap .f5 { animation: chFlowL 4.1s linear infinite; background-position: 55% 10%, 5% 40%, 40% 60%, 70% 76%, 15% 92%; }
@keyframes chFlowR { 0% { transform: translate3d(-14%, 0, 0); } 100% { transform: translate3d(14%, 0, 0); } }
@keyframes chFlowL { 0% { transform: translate3d(14%, 0, 0); } 100% { transform: translate3d(-14%, 0, 0); } }
#chap .pil { background: linear-gradient(90deg, transparent, rgba(255,250,228,.98) 50%, transparent); }
#chap .ttl > b { font-size: 34px; }
#chap .pgc { gap: 6px; padding: 4px 14px 4px 10px; font-size: 14px; font-weight: 600; color: #E8E4D8; background: rgba(0,0,0,.45); border-radius: 999px; }
#chap .pgc .num { font-size: 14px; color: #E8E4D8; }

/* ---------- split plate (round 2): chapter-title style, red small heading over white text, a black band, clear of the weapon column */
.splitpl { position: absolute; left: 8px; top: 25%; width: min(280px, calc(100% - 82px)); z-index: 9; pointer-events: none; opacity: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 10px 10px; text-align: center; background: linear-gradient(90deg, transparent, rgba(0,0,0,.55) 12%, rgba(0,0,0,.55) 88%, transparent); }
.splitpl small { font-size: 18px; font-weight: 900; letter-spacing: .5em; padding-left: .5em; color: var(--ar-danger); }
.splitpl b .spw { white-space: nowrap; } .splitpl b { text-wrap: balance; font-size: 15px; font-weight: 800; color: #fff; line-height: 1.4; paint-order: stroke fill; -webkit-text-stroke: 3px var(--ar-ink); }

/* ---------- hand tray (round 2): one step lower (40 px cards), 「手元 7」 on one line, Lv on a strip, ×N badge, 「›」 when more */
#hand { padding: 4px 6px; gap: 6px; }
#hand .ht { flex-direction: row; align-items: baseline; gap: 4px; width: auto; white-space: nowrap; font-size: 12px; }
#hand .hn { font-size: 16px; }
#hand #autoBtn { min-height: 42px; padding: 3px 8px; font-size: 12px; line-height: 1.25; }
#hand .hw { position: relative; flex: 1; min-width: 0; }
#hand .hl { padding-top: 5px; }
.hc { width: 46px; height: 42px; --fr: 6px; }
.hc .g { width: 26px; height: 26px; margin-top: -8px; }
.hc .lv { left: 0; right: 0; bottom: 0; padding: 1px 0; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 800; line-height: 13px; letter-spacing: 0; }
.hc .gms { left: 3px; top: 2px; flex-direction: row; gap: 0; } .hc .gms .gem { width: 18px; height: 18px; }
.hc .cnt { right: 2px; top: 1px; padding: 0 4px; font-size: 12px; font-weight: 800; line-height: 15px; color: #000; background: var(--ar-gold, #e9b84a); }
.hc.on .lv { color: #fff; }
#hand .hm { position: absolute; right: 0; top: 0; bottom: 0; width: 30px; display: none; align-items: center; justify-content: flex-end; padding-right: 4px; font-style: normal; font-weight: 900; font-size: 24px; color: var(--ar-brass-hi); pointer-events: none; background: linear-gradient(90deg, transparent, rgba(17,23,48,.96) 70%); }
#hand .hm.on { display: flex; }
@media (max-height: 700px) { .hc { width: 46px; height: 42px; } .hc .g { width: 26px; height: 26px; margin-top: -8px; } #hand #autoBtn { min-height: 42px; } .hc .lv { font-size: 11px; } }

/* ---------- entrance arrows: the boss tag */
.ent .t { padding: 1px 9px; font-size: 13px; font-weight: 800; letter-spacing: .08em; color: #fff; -webkit-text-stroke: 0; paint-order: normal; background: var(--ar-danger); clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px); left: -30px; width: 60px; }

/* ---------- select screen / two bars */
.sc-card .chk svg path:last-child { stroke: var(--ar-mana) !important; }
.dpb .fl.z { opacity: .3; }
#boss .gz .lr { display: none; position: absolute; left: 9px; top: 50%; transform: translateY(-50%); z-index: 2; font-size: 10px; font-weight: 800; line-height: 1; color: #fff; text-shadow: 0 0 2px var(--ar-ink), 0 1px 0 var(--ar-ink); pointer-events: none; }
#boss .bc.two .gz .lr { display: block; }

/* the chapter card that is not chosen keeps its picture bright (it looked disabled next to the chosen one) */
.sc-card:not(.sel) .pic { filter: brightness(1.25) saturate(1.1); }
/* mode select pictures (screens pass, 11-30): 2章 = the chapter-2 art cropped close on one gate; 2章通し = 1章 | 2章 with a slanted seam and an arrow */
.sc-card .pic.two { background: var(--ar-pit); overflow: hidden; }
.sc-card .pic.two .h { position: absolute; inset: 0; background-size: cover; background-position: center; }
.sc-card .pic.two .h.a { clip-path: polygon(0 0, 54% 0, 46% 100%, 0 100%); }
.sc-card .pic.two .h.b { clip-path: polygon(54% 0, 100% 0, 100% 100%, 46% 100%); }
.sc-card .pic.two .seam { position: absolute; top: -2px; bottom: -2px; left: calc(50% - 2px); width: 4px; transform: skewX(-8deg); background: linear-gradient(180deg, var(--ar-brass-hi), var(--ar-brass)); box-shadow: 0 0 8px rgba(0,0,0,.5); z-index: 1; }
.sc-card .pic.two .arr { position: absolute; z-index: 2; left: calc(50% - 17px); top: calc(50% - 17px); width: 34px; height: 34px; padding: 5px; border-radius: 50%; background: rgba(10,12,24,.78); color: var(--ar-brass-hi); box-sizing: border-box; box-shadow: 0 0 0 2px var(--ar-brass); }
.sc-card .pic.two::after { z-index: 1; }
/* opening of a standalone 2章: 「出発まで」 + a thin progress bar (no fraction: the 秘術 heading already carries one) */
.opn { display: inline-flex; align-items: center; gap: 8px; min-height: 22px; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--ar-text); white-space: nowrap; }
.opn .opl { color: #dfe6f5; }
.opn .opb { position: relative; display: block; width: 96px; height: 5px; background: rgba(150,170,210,.3); overflow: hidden; }
.opn .opb i { position: absolute; inset: 0; transform-origin: 0 50%; background: linear-gradient(90deg, var(--ar-brass), var(--ar-brass-hi)); }
.opn.rwd { padding: 2px 10px; letter-spacing: .12em; color: var(--ar-ink); background: linear-gradient(180deg, var(--ar-mana-x), #d9a030); clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px); }
.opn-row { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 4px; }
#cards .opnote { margin: 6px 4px 0; font-size: 12px; line-height: 1.5; text-align: center; color: var(--ar-text); text-wrap: balance; }
@media (max-height: 700px) { #cards .opn-row { flex: 0 0 100%; margin: 0; order: 5; } .opn { min-height: 20px; } #cards .opnote { font-size: 11px; margin-top: 2px; } .opn-row { margin-top: 2px; } }
@media (max-height: 700px) { #cards .cth { flex-wrap: wrap; } #cards.sgem .cth h2 { flex: 0 0 100%; } #cards .opnote { flex: 0 0 100%; order: 6; } }
#cards .opnote, #relic .rsub { word-break: auto-phrase; }
/* 魔石 pick heading: the core mark sits left of the text, so an empty box of the same size on the right keeps the text on the centre axis (the diamond of the rule) */
#cards.sgem .cth h2:not(:has(.num))::after { content: ""; flex: none; width: 20px; }
@media (max-width: 359px), (max-height: 620px) { #cards.sgem .cth h2:not(:has(.num))::after { width: 18px; } }
/* the 魔石 pick covers the field behind it (the weapon column showed through while preparing) */
#cards.sgem > .cbg { background: rgba(6,8,18,.985); }
/* the wave marks (7 + the boss) lose their right-most mark behind the chip edge on 375-wide phones when the money has 4 digits (standalone 2章 starts rich): the same smaller marks as the 320 layout up to 400 px */
@media (max-width: 400px) { #wave { padding: 0 6px 5px; gap: 1px; } #wave .dia { width: 7px; height: 7px; } #wave .dia.boss { width: 11px; height: 11px; } #wave .wprog { left: 6px; right: 6px; } }
/* first-time line on a short screen (320x568): tighter rows so the three cards keep their full text */
@media (max-height: 620px) { #cards:has(.opnote) { gap: 5px; padding-top: calc(env(safe-area-inset-top) + 6px); } #cards:has(.opnote) .cth { row-gap: 0; } #cards .opnote { margin-top: 0; line-height: 1.35; } #cards:has(.opnote) .cd .tx { padding-top: 5px; } #cards:has(.opnote) .opn-row { margin-top: 0; } }
/* (12-01 QA) when the heading row wraps (opening note on a short screen), its rows are centred like the note under them (the money / marks row sat on the left) */
@media (max-height: 700px) { #cards:has(.opnote) .cth { justify-content: center; column-gap: 8px; } }
/* (12-01 Fable) the plate read weakly over the snow (grey band, red title): a deep navy band with thin brass edges, the title lit with an ink stroke */
.splitpl { background: linear-gradient(90deg, transparent, rgba(12,16,34,.86) 10%, rgba(12,16,34,.86) 90%, transparent); }
.splitpl::before, .splitpl::after { content: ""; position: absolute; left: 6%; right: 6%; height: 1px; background: linear-gradient(90deg, transparent, var(--ar-brass-hi), transparent); }
.splitpl::before { top: 0; } .splitpl::after { bottom: 0; }
.splitpl small { color: #ff6f5c; paint-order: stroke fill; -webkit-text-stroke: 3px var(--ar-ink); }
@media (max-width: 359px) { .sc-card .inf { column-gap: 8px; } }      /* (12-01 QA) 3章通し: 約30分 / 21ウェーブ+ボス3体 / 最大 N (242 px) fit one row of 264 px with 8 px gaps (14 px pushed 最大 to a second row) */

/* ---------- 長旅 (12-01): the mode card on the select screen, the own best, the depth bests, the note about opening the single chapters */
.sc-card.jr .cap .nm { font-size: 24px; }
.sc-card.jr .pic { aspect-ratio: 2 / 1; }
.sc-card .inf.bs { padding-top: 0; }
.sc-card .bst { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--ar-brass-hi); } .sc-card .bst svg { width: 18px; height: 18px; flex: none; } .sc-card .bst .num { min-width: 0; font-size: 17px; color: var(--ar-coin-hi); } .sc-card .bst.none { color: var(--ar-text-sub); font-weight: 600; }
.sl-nt { margin: 0; font-size: 12px; line-height: 1.6; color: var(--ar-text-sub); text-wrap: balance; }
.ebs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(240,207,133,.2); } .ebs .lb { flex: 1 1 100%; }
.ebs .eb { display: inline-flex; align-items: baseline; gap: 4px; font-size: 12px; color: var(--ar-text-sub); } .ebs .eb .num { min-width: 0; font-size: 15px; color: var(--ar-text); } .ebs .eb.on .num { color: var(--ar-coin-hi); } .ebs .eb.on small { color: var(--ar-brass-hi); }
@media (max-height: 700px) { .sc-card.jr .pic { aspect-ratio: 5 / 2; } }
/* 踏破: the chapter-3 boss fell - the same light as the chapter change, the field stays under a thin mist */
#chap .cqd, #chap .cqb { display: none; }
#chap.cq .ttl { display: none; }
#chap.cq .cqd { display: block; position: absolute; inset: 0; background: rgba(6,8,24,.55); opacity: 0; pointer-events: none; will-change: opacity; }
#chap.cq .cqb { display: block; position: absolute; left: 0; right: 0; top: 38%; height: 220px; margin-top: -110px; background: rgba(10,12,34,.92); opacity: 0; pointer-events: none; will-change: opacity; }
#chap .cql { 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: scaleX(0); will-change: transform; }
#chap .cql.t { top: 0; } #chap .cql.u { bottom: 0; }
#chap .cqg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; opacity: 0; white-space: nowrap; will-change: opacity, transform; }
#chap .cq2 { font-size: 16px; font-weight: 800; letter-spacing: .3em; padding-left: .3em; color: #f0d48a; }
#chap .cq1 { will-change: transform, opacity; opacity: 0; transform-origin: 50% 50%; }
#chap .cq1 b { display: block; font-size: 64px; line-height: 1.15; font-weight: 900; letter-spacing: .2em; padding-left: .2em; color: var(--ar-brass-hi); background: linear-gradient(180deg, #fff6d0 0%, var(--ar-brass-hi) 38%, var(--ar-brass) 70%, var(--ar-brass-lo) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 3px 3px rgba(0,0,0,.85)) drop-shadow(0 0 10px rgba(240,207,133,.25)); }
#chap .cq3 { display: flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 800; letter-spacing: .12em; color: #f0d48a; white-space: nowrap; opacity: 0; }
#chap .cq3 .num { min-width: 0; font-size: 40px; line-height: 1; color: #ffd76a; letter-spacing: 0; }
#chap .g1 b { font-size: 28px; font-weight: 900; letter-spacing: .16em; padding-left: .16em; color: #5fd4ff; text-shadow: 0 2px 6px rgba(0,0,0,.8); }
@media (max-width: 359px) { #chap .cq1 b { font-size: 52px; } #chap.cq .cqb { height: 200px; margin-top: -100px; } #chap .g1 b { font-size: 24px; } #chap .cq3 .num { font-size: 36px; } }

/* the mode plate above the first heading of a 長旅 / standalone 2章 / 3章 (12-01 QA) */
#cards .rtag { align-self: center; flex: none; padding: 2px 12px; border: 1px solid rgba(240,207,133,.55); border-radius: 3px; background: rgba(10,12,34,.85); font-size: 11px; font-weight: 800; letter-spacing: .14em; padding-left: calc(12px + .14em); color: #f0d48a; white-space: nowrap; }

#chap .g1 small { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: #aebbd6; white-space: nowrap; }
