/* Styles for the visual scenes and the Codex overlay. Tokens come from styles.css. */
.pix { display: block; image-rendering: pixelated; flex: none; }
.scene { display: flex; flex-direction: column; gap: 22px; min-height: 0; }
.screen .title { font-size: 52px; }
:where(button.panel) { all: unset; box-sizing: border-box; cursor: pointer; background: var(--panel); border: 3px solid var(--line); border-radius: 6px; box-shadow: 0 6px 0 var(--shadow); display: flex; flex-direction: column; min-width: 0; overflow: hidden; transition: transform .15s, border-color .15s; }
[data-codex] { cursor: pointer; }
button.panel:hover, .panel[data-codex]:hover { transform: translateY(-4px); border-color: var(--c, var(--cyan)); }
button.panel:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.chips-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.chip-lg, .lock-chip, .chip-note { display: inline-flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 700; padding: 10px 18px; border-radius: 6px; border: 3px solid var(--line); background: var(--panel); }
.lock-chip { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, #0A1626); color: #FFE4A3; }
.chip-note { font-weight: 500; font-size: 17px; color: var(--muted); border-style: dashed; }
.srcline { font-size: 15px; }

.codex-btn { position: absolute; right: 16px; bottom: 6px; display: inline-flex; align-items: center; gap: 8px; font-size: 16px; padding: 9px 14px; background: var(--gold); color: var(--night); border-color: #9C7A22; box-shadow: 0 4px 0 #9C7A22; z-index: 2; }
.codex-btn kbd { color: var(--night); border-color: #9C7A22; }

/* bobbing / hopping idle motion */
.bob { animation: bob 1.8s ease-in-out infinite; }
.hop { animation: hop 1.1s cubic-bezier(.3, 0, .5, 1) infinite; transform-origin: 50% 100%; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes hop { 0%, 100% { transform: translateY(0) scale(1.08, .92); } 40% { transform: translateY(-16px) scale(.95, 1.05); } 70% { transform: translateY(0) scale(1, 1); } }

/* ---------- cover ---------- */
.cover2 { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 30px; align-items: center; padding: 0 30px; }
.cover2-left { display: flex; flex-direction: column; gap: 30px; }
.cover2 .cover-title { font-size: 92px; }
.deal { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.deal-side { display: inline-flex; align-items: center; gap: 14px; padding: 12px 20px; border: 3px solid var(--c); border-radius: 8px; background: var(--panel); font-family: var(--hud); font-weight: 700; font-size: 17px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--c); }
.deal-side span { display: flex; flex-direction: column; }
.deal-side b { font-family: var(--body); font-size: 24px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.deal-plus { font-family: var(--display); font-size: 40px; color: var(--gold); }
.cover2-hero { position: relative; height: 560px; display: grid; place-items: center; }
.hero-glow { position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 193, 78, .28), rgba(242, 193, 78, 0) 70%); animation: glow 3s ease-in-out infinite; }
.hero-big { position: relative; animation: bob 2s ease-in-out infinite; filter: drop-shadow(0 14px 0 rgba(0, 0, 0, .35)); }
.float { position: absolute; animation: floaty 3s ease-in-out infinite; }
.float.c1 { left: 40px; top: 90px; }
.float.c2 { right: 50px; top: 60px; animation-delay: .8s; }
.float.c3 { right: 90px; bottom: 140px; animation-delay: 1.5s; }
.hero-flag { position: absolute; right: 10px; bottom: 30px; }
.hero-tag { position: absolute; bottom: 0; font-family: var(--hud); font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); font-size: 17px; }
@keyframes floaty { 50% { transform: translateY(-18px) rotate(8deg); } }
@keyframes glow { 50% { transform: scale(1.08); opacity: .8; } }

/* ---------- summary ---------- */
.quests { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.quest-card { align-items: center; gap: 14px; padding: 22px 20px 26px; text-align: center; }
.q-num { font-family: var(--hud); font-weight: 700; font-size: 16px; letter-spacing: 3px; text-transform: uppercase; color: var(--c); }
.q-label { font-family: var(--display); font-size: 25px; line-height: 1.2; text-transform: uppercase; }
.track { flex-direction: row; align-items: center; gap: 22px; padding: 26px 30px; }
.trk-end { font-family: var(--hud); font-weight: 700; font-size: 17px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); white-space: nowrap; }
.trk-line { position: relative; flex: 1; height: 16px; background: #0B1B2E; border: 2px solid var(--line); border-radius: 4px; }
.trk-fill { position: absolute; inset: 0; width: 100%; transform-origin: left; background: repeating-linear-gradient(90deg, var(--gold) 0 14px, #FFD978 14px 18px); animation: trk 5s cubic-bezier(.4, 0, .2, 1) .3s both; }
.trk-gate { position: absolute; top: -52px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.trk-gate b { font-family: var(--hud); font-size: 14px; color: var(--ember); position: absolute; top: 76px; }
.trk-hero { position: absolute; top: -44px; left: 0; transform: translateX(-50%); animation: trkHero 5s cubic-bezier(.4, 0, .2, 1) .3s both; }
@keyframes trk { from { transform: scaleX(0); } }
@keyframes trkHero { from { left: 0; } to { left: 100%; } }

/* ---------- market ---------- */
.market-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 22px; }
.bars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; padding: 20px 34px 22px; align-items: end; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bar-val { font-family: var(--display); font-size: 46px; color: var(--c); line-height: 1; font-variant-numeric: tabular-nums; }
.bar-track { width: 120px; height: 250px; display: flex; align-items: flex-end; border-bottom: 4px solid var(--line); }
.bar-fill { width: 100%; background: repeating-linear-gradient(0deg, var(--c) 0 16px, color-mix(in srgb, var(--c) 70%, #fff) 16px 20px); border: 3px solid var(--shadow); border-bottom: 0; transform-origin: bottom; }
.bar-fill.fx { animation-name: growY; animation-duration: 1s; }
.bar-l { font-family: var(--display); font-size: 19px; text-transform: uppercase; text-align: center; }
.bar-y { font-size: 15px; color: var(--muted); text-align: center; }
@keyframes growY { from { transform: scaleY(0); } }
.donut-panel { align-items: center; }
.donut { position: relative; padding: 22px 0 6px; }
.donut-arc { animation: donut 1.6s cubic-bezier(.2, .8, .2, 1) .5s both; }
@keyframes donut { from { stroke-dasharray: 0 1000; } }
.donut-num { position: absolute; inset: 22px 0 6px; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 62px; color: var(--mint); }
.donut-l { font-size: 20px; text-align: center; padding: 0 24px 22px; max-width: 420px; color: var(--soft); }
.boss-row { display: flex; gap: 18px; align-items: stretch; }
.boss-panel { flex: 1; flex-direction: row; align-items: center; gap: 24px; padding: 12px 22px; }
.boss-h { font-family: var(--hud); font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); max-width: 220px; }
.boss { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 19px; text-transform: uppercase; }

/* ---------- party ---------- */
.party { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.member { align-items: center; gap: 14px; padding: 18px 14px 24px; text-align: center; position: relative; }
.badge { align-self: stretch; font-family: var(--hud); font-weight: 700; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; padding: 5px 8px; border-radius: 4px; background: var(--c); color: var(--night); }
.badge.pulse { animation: pulseBadge 1.4s ease-in-out infinite; }
@keyframes pulseBadge { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--mint) 30%, transparent); } }
.member-icon { padding: 18px 0 6px; }
.member-n { font-family: var(--display); font-size: 23px; line-height: 1.15; text-transform: uppercase; min-height: 54px; display: grid; place-items: center; }
.member-skill { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; color: var(--soft); }

/* ---------- versus ---------- */
.vs { display: grid; grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr); gap: 10px; align-items: center; }
.vs-card { padding: 26px 30px 30px; gap: 20px; position: relative; overflow: visible; }
.vs-card.sel { border-color: var(--mint); box-shadow: 0 6px 0 var(--shadow), 0 0 0 4px color-mix(in srgb, var(--mint) 30%, transparent), 0 0 40px color-mix(in srgb, var(--mint) 25%, transparent); }
.vs-card:not(.sel) { opacity: .85; }
.ribbon { position: absolute; top: -18px; right: 22px; background: var(--mint); color: var(--night); font-family: var(--display); font-size: 16px; text-transform: uppercase; padding: 6px 14px; border-radius: 4px; box-shadow: 0 4px 0 #2B7A50; animation: bob 1.6s ease-in-out infinite; }
.vs-head { display: flex; align-items: center; gap: 22px; }
.vs-letter { width: 90px; height: 90px; display: grid; place-items: center; font-family: var(--display); font-size: 62px; color: var(--night); background: var(--c); border-radius: 8px; box-shadow: 0 6px 0 var(--shadow); }
.vs-name { font-family: var(--display); font-size: 30px; text-transform: uppercase; line-height: 1.15; }
.vs-stat { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 21px; }
.segs { display: flex; gap: 6px; }
.segs i { width: 34px; height: 22px; background: #1B2E45; border: 2px solid var(--shadow); border-radius: 3px; }
.segs i.on { background: var(--c); animation: segOn .3s steps(2) both; }
@keyframes segOn { from { background: #1B2E45; } }
.vs-mid { font-family: var(--display); font-size: 64px; color: var(--gold); text-align: center; text-shadow: 0 6px 0 var(--shadow); animation-name: pop; }

/* ---------- co-op ---------- */
.coop { padding: 18px 26px 22px; gap: 10px; }
.coop-row { display: grid; grid-template-columns: minmax(0, 1fr) 210px minmax(0, 1fr); align-items: center; gap: 18px; }
.coop-head { padding-bottom: 8px; border-bottom: 2px solid var(--rule); }
.coop-player { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 26px; text-transform: uppercase; }
.coop-player.p1 { color: var(--ember); justify-self: end; }
.coop-player.p2 { color: var(--mint); }
.coop-tag { justify-self: center; font-family: var(--hud); font-weight: 700; letter-spacing: 4px; text-transform: uppercase; color: var(--gold); border: 2px solid var(--gold); padding: 4px 14px; border-radius: 4px; }
.coop-p { font-size: 22px; font-weight: 600; padding: 12px 18px; border-radius: 6px; }
.coop-p.p1 { text-align: right; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ember) 18%, transparent)); animation-name: fromLeft; }
.coop-p.p2 { background: linear-gradient(270deg, transparent, color-mix(in srgb, var(--mint) 18%, transparent)); animation-name: fromRight; }
.coop-mid { display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--hud); font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: 1px; background: var(--panel-2); border: 2px solid var(--line); border-radius: 6px; padding: 6px 10px; animation-name: pop; }
@keyframes fromLeft { from { opacity: 0; transform: translateX(-60px); } }
@keyframes fromRight { from { opacity: 0; transform: translateX(60px); } }

/* ---------- inventory ---------- */
.inv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.slot { flex-direction: row; align-items: center; gap: 20px; padding: 18px 20px; }
.slot-frame { position: relative; flex: none; width: 112px; height: 112px; display: grid; place-items: center; background: #0B1B2E; border: 3px solid var(--c); border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 3px var(--shadow); }
.shine { position: absolute; top: -20%; left: -60%; width: 40%; height: 140%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent); transform: rotate(20deg); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.slot-text { display: flex; flex-direction: column; gap: 8px; }
.slot-t { font-family: var(--display); font-size: 22px; line-height: 1.2; text-transform: uppercase; }
.slot-s { font-family: var(--hud); font-weight: 700; font-size: 18px; color: var(--c); }

/* ---------- level path ---------- */
.map-path { padding: 10px 0; align-items: center; }
.mp-box { position: relative; }
.seg { stroke-dasharray: 100; animation: draw .7s ease-out both; }
@keyframes draw { from { stroke-dashoffset: 100; } }
.wk { font-family: 'Chakra Petch', monospace; font-weight: 700; font-size: 15px; fill: #9FB6CC; text-anchor: middle; }
.ph-label { position: absolute; transform: translateX(-50%); font-family: var(--display); font-size: 17px; text-transform: uppercase; color: var(--night); background: var(--c); padding: 6px 12px; border-radius: 4px; white-space: nowrap; box-shadow: 0 4px 0 var(--shadow); }
.pg, .pg-start { position: absolute; transform: translate(-50%, -88%); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pg b, .pg-start b { font-family: var(--hud); font-weight: 700; font-size: 15px; background: var(--ember); color: var(--night); padding: 1px 8px; border-radius: 4px; white-space: nowrap; }
.pg-start b { background: var(--mint); }
.pg.fx { animation-name: popc; }
@keyframes popc { from { opacity: 0; transform: translate(-50%, -60%) scale(.4); } }
.path-hero { position: absolute; left: 0; top: 0; offset-anchor: 50% 100%; offset-rotate: 0deg; animation: walk 9s linear 1s infinite; }
@keyframes walk { 0% { offset-distance: 0%; } 80%, 100% { offset-distance: 100%; } }

/* ---------- gauges ---------- */
.gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.gauge { align-items: center; gap: 6px; padding: 16px 14px 18px; position: relative; }
.g-name { font-family: var(--display); font-size: 21px; text-transform: uppercase; text-align: center; }
.g-dial { position: relative; }
.g-num, .g-lock, .g-gate { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; justify-content: center; font-family: var(--display); font-size: 40px; color: var(--mint); }
.g-arc { animation: donut 1.6s cubic-bezier(.2, .8, .2, 1) .6s both; }
.g-dash { stroke-dasharray: 10 8; animation: dashmove 1.2s linear infinite; }
@keyframes dashmove { to { stroke-dashoffset: -36; } }
.g-status { font-size: 17px; font-weight: 700; text-align: center; }
.gauge.lock .g-status { color: #FFE4A3; }
.gauge.gate .g-status, .gauge.value .g-status { color: var(--mint); }
.gauge.lock { border-style: dashed; }
.gauge.lock .g-lock .pix { animation: wiggle 2.6s ease-in-out infinite; }
.gauge.value, .gauge.gate { border-color: var(--mint); }
.g-freq { position: absolute; top: 10px; right: 10px; font-family: var(--hud); font-weight: 700; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0 6px; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-12deg); } 90% { transform: rotate(10deg); } 95% { transform: rotate(-6deg); } }

/* ---------- doors ---------- */
.doors { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; align-items: start; }
.door-col { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.door-lv { font-family: var(--hud); font-weight: 700; font-size: 17px; letter-spacing: 2px; text-transform: uppercase; color: var(--ember); }
.door { all: unset; cursor: pointer; position: relative; width: 210px; height: 280px; border: 8px solid #5B6E86; border-bottom-width: 10px; border-radius: 105px 105px 6px 6px; background: radial-gradient(circle at 50% 55%, #FFE9A8 0%, #F2C14E 30%, #6B4A16 75%); overflow: hidden; box-shadow: 0 8px 0 var(--shadow), inset 0 0 30px rgba(0, 0, 0, .5); box-sizing: border-box; }
.door:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.door.final { border-color: var(--mint); background: radial-gradient(circle at 50% 55%, #E6FFF1 0%, #7FFFB2 35%, #1E5A3C 80%); }
.door-inside { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.door-inside b { font-family: var(--display); font-size: 15px; color: var(--night); text-transform: uppercase; padding: 0 12px; }
.leaf { position: absolute; top: 0; bottom: 0; width: 50%; background: repeating-linear-gradient(90deg, #5A3A1E 0 22px, #4A2F18 22px 26px); border: 3px solid #2A1A0C; animation: open 1s cubic-bezier(.6, 0, .2, 1) both; }
.leaf.l { left: 0; --x: -100%; }
.leaf.r { right: 0; --x: 100%; }
.leaf::after { content: ''; position: absolute; top: 52%; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); }
.leaf.l::after { right: 12px; }
.leaf.r::after { left: 12px; }
@keyframes open { to { transform: translateX(var(--x)); } }
.door-t { font-family: var(--display); font-size: 20px; line-height: 1.2; text-transform: uppercase; min-height: 48px; }
.door-col .meter { width: 100%; }
.door-who { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: var(--soft); }
.door-fail { font-family: var(--hud); font-weight: 700; font-size: 15px; color: var(--rose); border: 2px dashed var(--rose); border-radius: 4px; padding: 3px 10px; }

/* ---------- coin flow ---------- */
.flow { flex-direction: row; align-items: center; gap: 10px; padding: 26px 30px; }
.f-node { flex: none; width: 190px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.f-node b { font-family: var(--display); font-size: 26px; text-transform: uppercase; color: var(--c); }
.f-node span { font-size: 17px; color: var(--muted); }
.f-node .pix { animation: bob 2s ease-in-out infinite; }
.f-pipe { position: relative; flex: 1; height: 330px; }
.f-line { position: absolute; left: 0; right: 0; top: 50%; height: 22px; margin-top: -11px; background: #0B1B2E; border: 3px solid var(--line); border-radius: 11px; }
.fcoin { position: absolute; top: 50%; margin-top: -15px; left: 0; animation: coinrun 4.2s linear infinite; }
@keyframes coinrun { 0% { left: 0; opacity: 0; } 8% { opacity: 1; } 86% { opacity: 1; } 100% { left: 90%; opacity: 0; } }
.fg { position: absolute; top: 0; bottom: 0; width: 120px; margin-left: -60px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; }
.fg-top, .fg-bot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fg-top b { font-family: var(--hud); font-weight: 700; font-size: 16px; color: var(--ember); }
.fg-bot b { font-family: var(--hud); font-weight: 700; font-size: 16px; }
.fg-bot i { font-style: normal; font-family: var(--display); font-size: 18px; color: var(--gold); }
.f-vault { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 150px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; background: var(--panel-2); border: 3px solid var(--gold); border-radius: 8px; padding: 12px 8px; }
.f-vault b { font-family: var(--display); font-size: 18px; color: var(--gold); text-transform: uppercase; }
.f-vault i { font-style: normal; font-size: 14px; color: var(--soft); }

/* ---------- shields ---------- */
.shields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.shield-card { align-items: center; gap: 14px; padding: 26px 22px 30px; text-align: center; }
.shield-card.fx { animation-name: drop2; animation-duration: .7s; }
@keyframes drop2 { 0% { opacity: 0; transform: translateY(-80px); } 70% { opacity: 1; transform: translateY(8px); } 100% { transform: none; } }
.shield-t { font-family: var(--display); font-size: 32px; text-transform: uppercase; color: var(--c); }
.shield-l { font-size: 21px; color: var(--soft); }

/* ---------- bestiary ---------- */
.bestiary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.beast { align-items: center; gap: 10px; padding: 14px 16px 18px; text-align: center; position: relative; --c: var(--mc); }
.beast-no { position: absolute; top: 8px; left: 12px; font-family: var(--hud); font-weight: 700; font-size: 14px; color: var(--muted); }
.beast-art { padding-top: 10px; }
.beast-n { font-family: var(--display); font-size: 20px; text-transform: uppercase; color: var(--mc); line-height: 1.15; }
.beast-w { display: flex; align-items: center; gap: 10px; font-size: 17px; text-align: left; color: var(--soft); border-top: 2px dashed var(--rule); padding-top: 10px; width: 100%; justify-content: center; }
.beast.warn { flex-direction: column; justify-content: center; gap: 14px; font-size: 19px; font-weight: 700; color: #FFE4A3; border-color: var(--gold); border-style: dashed; padding: 18px; }

/* ---------- quest log ---------- */
.quest-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: stretch; }
.quest-panel { padding: 20px 24px; gap: 14px; }
.q-head { display: flex; align-items: center; gap: 18px; }
.q-title { font-family: var(--display); font-size: 22px; text-transform: uppercase; color: var(--gold); }
.q-bar { flex: 1; height: 18px; border: 2px solid var(--line); border-radius: 4px; background: #0B1B2E; overflow: hidden; }
.qbar { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--gold) 0 12px, #FFD978 12px 14px); transition: width .4s cubic-bezier(.2, .8, .2, 1); }
.q-count { font-family: var(--hud); font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
.quest-panel .chk { font-size: 25px; }
.reward { align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
.reward-art { position: relative; filter: grayscale(.85) brightness(.7); transition: filter .4s; }
.reward-star { position: absolute; left: 50%; top: -30px; transform: translateX(-50%) scale(0); transition: transform .5s cubic-bezier(.2, 1.6, .4, 1); }
.reward-t { font-family: var(--display); font-size: 24px; text-transform: uppercase; color: var(--muted); }
.reward-s { font-size: 16px; color: var(--muted); }
.quest-wrap.done .reward { border-color: var(--gold); box-shadow: 0 6px 0 var(--shadow), 0 0 40px rgba(242, 193, 78, .35); }
.quest-wrap.done .reward-art { filter: none; animation: bob 1.4s ease-in-out infinite; }
.quest-wrap.done .reward-star { transform: translateX(-50%) scale(1); }
.quest-wrap.done .reward-t { color: var(--gold); }

/* ---------- sources ---------- */
.srcs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.src-card { flex-direction: row; align-items: center; gap: 22px; padding: 22px 26px; }
.src-card > span { display: flex; flex-direction: column; gap: 4px; }
.src-card b { font-family: var(--display); font-size: 26px; text-transform: uppercase; color: var(--cyan); }
.src-card span span { font-size: 21px; }
.src-card i { font-style: normal; font-family: var(--hud); font-weight: 700; font-size: 16px; color: var(--muted); }

/* ---------- codex overlay ---------- */
.codex { position: absolute; inset: 0; z-index: 10; background: rgba(6, 13, 24, .97); border: 3px solid var(--gold); border-radius: 8px; padding: 22px 26px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; animation: codexIn .3s cubic-bezier(.2, .9, .3, 1.1) both; }
.codex-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.codex .codex-title { font-size: 34px; }
.codex-body { display: flex; flex-direction: column; gap: 18px; }
@keyframes codexIn { from { opacity: 0; transform: scale(.96); } }

@media (prefers-reduced-motion: reduce) {
  .bob, .hop, .hero-glow, .hero-big, .float, .trk-fill, .trk-hero, .badge.pulse, .shine, .ribbon, .seg, .path-hero, .g-arc, .g-dash, .gauge.lock .g-lock .pix,
  .leaf, .fcoin, .f-node .pix, .donut-arc, .segs i.on, .codex, .quest-wrap.done .reward-art { animation: none !important; }
  .leaf { display: none; }
  .fcoin { display: none; }
}

/* ---------- small screens ---------- */
body.compact .screen .title { font-size: 22px; }
body.compact .codex-btn { position: static; align-self: flex-end; }
body.compact .codex { position: fixed; inset: var(--hud-h) 8px var(--pad-h); z-index: 12; padding: 14px; }
body.compact .codex .codex-title { font-size: 20px; }
body.compact .cover2 { grid-template-columns: minmax(0, 1fr); padding: 0; }
body.compact .cover2 .cover-title { font-size: 34px; }
body.compact .cover2-hero { height: 220px; }
body.compact .cover2-hero .hero-big .pix { width: 110px; height: auto; }
body.compact .deal-side b { font-size: 16px; }
body.compact .quests, body.compact .market-grid, body.compact .vs, body.compact .inv, body.compact .shields, body.compact .quest-wrap, body.compact .srcs { grid-template-columns: minmax(0, 1fr); }
body.compact .party, body.compact .gauges, body.compact .bestiary, body.compact .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.compact .q-label, body.compact .slot-t, body.compact .member-n, body.compact .vs-name, body.compact .g-name, body.compact .door-t, body.compact .beast-n { font-size: 15px; }
body.compact .chip-lg, body.compact .lock-chip, body.compact .coop-p, body.compact .vs-stat, body.compact .shield-l, body.compact .src-card span span { font-size: 14px; }
body.compact .bars { padding: 12px; gap: 10px; }
body.compact .bar-track { width: 56px; height: 160px; }
body.compact .bar-val { font-size: 26px; }
body.compact .segs i { width: 18px; height: 14px; }
body.compact .coop-row { grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr); gap: 8px; }
body.compact .coop-mid b { display: none; }
body.compact .coop-player { font-size: 14px; }
body.compact .map-path, body.compact .flow { overflow-x: auto; justify-content: flex-start; }
body.compact .flow { min-width: 0; }
body.compact .f-pipe { min-width: 760px; }
body.compact .door { width: 130px; height: 180px; }
body.compact .boss-row { flex-direction: column; }
body.compact .boss-panel { flex-wrap: wrap; }
.ph-label.fx, .f-vault.fx { animation-name: fadein; }
