/* Title, profiles, stations and menus */
.title-screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding-left: 7vw; background: linear-gradient(90deg, rgba(5, 3, 11, 0.78) 0%, rgba(5, 3, 11, 0.35) 38%, transparent 60%); }
.title-logo { margin-bottom: 2.4rem; animation: logoIn 1.6s cubic-bezier(.2, 1, .3, 1); }
.tl-main { font-family: var(--f-title); font-weight: 800; font-size: clamp(3.5rem, 8vw, 7rem); letter-spacing: 0.14em; line-height: 0.95; color: #fff; text-shadow: 0 0 40px rgba(168, 107, 255, 0.55), 0 6px 20px #000; }
h1.tl-main { margin: 0; }
.tl-main span { color: var(--gold); text-shadow: 0 0 40px rgba(242, 196, 107, 0.6), 0 6px 20px #000; }
.tl-sub { font-family: var(--f-ui); font-weight: 600; letter-spacing: 0.72em; color: var(--ink2); margin-top: 0.6rem; font-size: 1rem; text-shadow: 0 2px 6px #000; }
@keyframes logoIn { from { opacity: 0; letter-spacing: 0.4em; filter: blur(8px); } }
.title-menu { display: flex; flex-direction: column; gap: 0.7rem; min-width: 22rem; animation: fadeIn 1s ease 0.6s backwards; }
.title-menu .btn { justify-content: flex-start; }
.title-foot { position: fixed; bottom: 1rem; left: 7vw; font-family: var(--f-ui); color: var(--ink3); letter-spacing: 0.1em; font-size: max(10px, 0.78rem); }
.profile-row { display: flex; align-items: center; gap: 0.9rem; padding: 0.6rem 0.8rem; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.03); cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.profile-row:hover { background: rgba(242, 196, 107, 0.08); border-color: var(--line); }
.pr-portrait { width: 3.2rem; height: 3.2rem; border-radius: 50%; background-size: 240%; background-position: 20% 22%; border: 2px solid var(--line); }
.pr-name { font-family: var(--f-ui); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.06em; }
.text-input { background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); border-radius: 8px; padding: 0.7rem 0.9rem; font-size: 1.05rem; color: var(--ink); outline: none; user-select: text; }
.text-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242, 196, 107, 0.15); }

/* cinematic */
.cine-bars::before, .cine-bars::after { content: ''; position: fixed; left: 0; right: 0; height: 10vh; background: #000; z-index: 30; }
.cine-bars::before { top: 0; } .cine-bars::after { bottom: 0; }
.cine-caption { position: fixed; left: 50%; bottom: 13vh; transform: translateX(-50%); max-width: min(900px, 86vw); text-align: center; font-family: var(--f-title); font-size: 1.45rem; letter-spacing: 0.06em; color: #f4ecff; text-shadow: 0 2px 10px #000; z-index: 31; transition: opacity 0.8s; line-height: 1.5; }
.cine-title { position: fixed; left: 50%; top: 44%; transform: translate(-50%, -50%); text-align: center; z-index: 31; font-family: var(--f-title); font-weight: 800; font-size: 3rem; letter-spacing: 0.3em; color: #fff; text-shadow: 0 0 30px rgba(168, 107, 255, 0.7); transition: opacity 1.2s; }
.cine-skip { position: fixed; right: 2rem; bottom: 11.5vh; z-index: 32; font-family: var(--f-ui); color: var(--ink3); letter-spacing: 0.15em; font-size: max(10px, 0.8rem); }

/* hub prompts and nameplates */
.hub-prompt { position: fixed; left: 50%; bottom: 14%; transform: translateX(-50%); display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 1.2rem; border-radius: 10px; background: rgba(8, 5, 18, 0.82); border: 1px solid var(--line); font-family: var(--f-ui); font-weight: 700; letter-spacing: 0.12em; color: #fff; box-shadow: var(--shadow); animation: fadeIn 0.2s ease; }
.hub-prompt .key { background: var(--gold); color: #1b1206; padding: 0.05em 0.5em; border-radius: 4px; }
.hub-prompt .sub { font-weight: 500; letter-spacing: 0.06em; color: var(--ink2); font-size: max(10px, 0.85rem); }
.nameplate { position: absolute; transform: translate(-50%, -100%); font-family: var(--f-ui); font-weight: 700; font-size: max(10px, 0.8rem); letter-spacing: 0.14em; color: #fff; text-shadow: 0 1px 3px #000, 0 0 8px rgba(0, 0, 0, 0.8); white-space: nowrap; pointer-events: none; text-align: center; }
.nameplate small { display: block; font-weight: 500; color: var(--gold2); letter-spacing: 0.1em; font-size: max(10px, 0.7rem); }
.hub-topbar { position: fixed; top: 0.9rem; left: 1.2rem; right: 1.2rem; display: flex; align-items: center; gap: 1rem; pointer-events: none; }
.hub-topbar > * { pointer-events: auto; }
.hub-acct { display: flex; align-items: center; gap: 0.7rem; padding: 0.4rem 0.9rem 0.4rem 0.4rem; border-radius: 999px; background: rgba(8, 5, 18, 0.7); border: 1px solid var(--line); }
.hub-acct .pr-portrait { width: 2.6rem; height: 2.6rem; }
.hub-mats { display: flex; gap: 0.8rem; font-family: var(--f-ui); font-weight: 700; font-size: max(10px, 0.9rem); padding: 0.45rem 0.9rem; border-radius: 999px; background: rgba(8, 5, 18, 0.7); border: 1px solid rgba(255, 255, 255, 0.08); }
.hub-mats span { display: inline-flex; align-items: center; gap: 0.35em; }
.hub-mats i { width: 0.6em; height: 0.6em; transform: rotate(45deg); display: inline-block; }
.hub-quick { display: flex; gap: 0.4rem; margin-left: auto; }
.hub-hint { position: fixed; right: 1.2rem; bottom: 1.2rem; font-family: var(--f-ui); color: var(--ink3); font-size: max(10px, 0.8rem); letter-spacing: 0.1em; text-align: right; line-height: 1.6; pointer-events: none; }
.hub-hint b { color: var(--ink2); }

/* station panel */
.station { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: 17rem 1fr; background: linear-gradient(90deg, rgba(5, 3, 11, 0.96) 0%, rgba(5, 3, 11, 0.9) 60%, rgba(5, 3, 11, 0.86) 100%); animation: fadeIn 0.25s ease; }
.station-nav { padding: 1.6rem 1.2rem; border-right: 1px solid rgba(255, 255, 255, 0.06); display: flex; flex-direction: column; gap: 0.4rem; background: rgba(0, 0, 0, 0.25); }
.station-title { font-family: var(--f-title); font-weight: 800; font-size: 1.5rem; letter-spacing: 0.14em; color: var(--gold2); margin-bottom: 0.2rem; }
.station-sub { font-family: var(--f-ui); color: var(--ink3); font-size: max(10px, 0.82rem); letter-spacing: 0.08em; margin-bottom: 1rem; line-height: 1.4; }
.nav-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.8rem; border-radius: 8px; font-family: var(--f-ui); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: max(10px, 0.9rem); color: var(--ink2); cursor: pointer; border: 1px solid transparent; background: none; text-align: left; }
.nav-item:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }
.nav-item.on { background: linear-gradient(90deg, rgba(242, 196, 107, 0.16), transparent); border-color: var(--line); color: var(--gold2); }
.nav-item .count { margin-left: auto; font-size: max(10px, 0.75rem); color: var(--ink3); }
.station-main { padding: 1.6rem 4.6rem 1.6rem 2rem; overflow: auto; position: relative; container-type: size; } /* the right padding keeps the close button's corner */
.station-close { position: absolute; top: 1.2rem; right: 1.4rem; z-index: 5; }
.station-h { font-family: var(--f-title); font-weight: 800; font-size: 1.6rem; letter-spacing: 0.1em; color: #fff; margin: 0 0 0.3rem; }
.station-p { color: var(--ink2); line-height: 1.5; max-width: 60rem; margin: 0 0 1.2rem; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: 1rem; }
.grid-cards .rgcard { width: 100%; }
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.filter { padding: 0.35em 0.8em; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.03); font-family: var(--f-ui); font-weight: 700; letter-spacing: 0.1em; font-size: max(10px, 0.78rem); text-transform: uppercase; color: var(--ink2); cursor: pointer; }
.filter.on { border-color: var(--gold); color: var(--gold2); background: rgba(242, 196, 107, 0.1); }
.card-count { position: absolute; top: 6px; right: 6px; z-index: 5; }

/* journey */
.journey-map { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 8; background: url(../assets/art/backdrops/war_map.webp) center / cover; box-shadow: var(--shadow); }
.journey-node { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 0.3rem; cursor: pointer; }
.journey-node .dot { width: 1.3rem; height: 1.3rem; border-radius: 50%; background: radial-gradient(circle, #fff, var(--gold) 60%, #7a5a1a); box-shadow: 0 0 16px var(--gold); border: 2px solid #fff; }
.journey-node.locked .dot { background: #333; box-shadow: none; border-color: #555; }
.journey-node.done .dot { background: radial-gradient(circle, #fff, var(--ok) 60%, #1a5a3a); box-shadow: 0 0 12px var(--ok); }
.journey-node .lbl { font-family: var(--f-ui); font-weight: 700; letter-spacing: 0.1em; font-size: max(10px, 0.8rem); color: #fff; text-shadow: 0 1px 3px #000, 0 0 6px #000; background: rgba(0, 0, 0, 0.55); padding: 0.1em 0.5em; border-radius: 4px; white-space: nowrap; }
/* War Map: two columns with a pinned launch bar (RG-020); painted medallions that are not zones are dimmed */
.journey-rush { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 1fr); gap: 0.6rem 1.6rem; align-items: start; }
.journey-rush .journey-launch { grid-column: 1 / -1; }
.journey-launch { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: flex-end; gap: 1.2rem; padding: 0.9rem 0 1.4rem; margin-top: 0.4rem; background: linear-gradient(180deg, rgba(5, 3, 11, 0), rgba(5, 3, 11, 0.94) 40%); }
.jl-sum { font-family: var(--f-ui); letter-spacing: 0.06em; color: var(--ink2); }
.jl-sum b { color: var(--gold2); }
.journey-decor { position: absolute; width: 3.4rem; height: 3.4rem; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(5, 3, 11, 0.62) 0%, rgba(5, 3, 11, 0.45) 55%, rgba(5, 3, 11, 0) 72%); pointer-events: none; }
.journey-node .dot { outline: 2px solid rgba(255, 230, 160, 0.0); }
@media (max-width: 1150px) { .journey-rush { grid-template-columns: 1fr; } }
.mission-card { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 1rem 1.2rem; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.03); align-items: center; }
.mission-card.locked { opacity: 0.45; }
.mission-card h3 { margin: 0; font-family: var(--f-ui); font-weight: 700; letter-spacing: 0.08em; font-size: 1.15rem; }
.opt-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.opt { padding: 0.7rem 1rem; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.03); cursor: pointer; min-width: 10rem; font-family: var(--f-ui); }
.opt b { display: block; font-size: 1rem; letter-spacing: 0.06em; color: #fff; }
.opt span { font-size: max(10px, 0.8rem); color: var(--ink2); font-family: var(--f-body); }
.opt.on { border-color: var(--gold); background: rgba(242, 196, 107, 0.1); box-shadow: 0 0 16px rgba(242, 196, 107, 0.15); }
.opt.locked { opacity: 0.4; pointer-events: none; }

/* heroes */
.hero-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.hero-card { position: relative; border-radius: 14px; overflow: hidden; border: 2px solid rgba(255, 255, 255, 0.1); aspect-ratio: 3 / 4; background-size: cover; background-position: 30% 30%; cursor: pointer; transition: transform 0.15s, border-color 0.15s; }
.hero-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.hero-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(5, 3, 11, 0.95)); }
.hero-card .hc-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.9rem; z-index: 2; }
.hero-card .hc-name { font-family: var(--f-ui); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.08em; }
.hero-card.locked { filter: saturate(0.25) brightness(0.7); }
.hero-card .hc-state { position: absolute; top: 0.7rem; right: 0.7rem; z-index: 3; }
.hero-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.6rem; }
.hero-art { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background-size: cover; background-position: center; }
.kit-row { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.55rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.kit-icon { width: 2.6rem; height: 2.6rem; border-radius: 8px; background-size: cover; flex: none; border: 1px solid rgba(255, 255, 255, 0.15); }
.kit-name { font-family: var(--f-ui); font-weight: 700; letter-spacing: 0.06em; }
.kit-desc { font-size: max(10px, 0.85rem); color: var(--ink2); line-height: 1.35; }
.route { display: flex; gap: 0.3rem; align-items: center; font-family: var(--f-ui); font-weight: 700; letter-spacing: 0.1em; font-size: max(10px, 0.72rem); text-transform: uppercase; }
.route span { padding: 0.25em 0.55em; border-radius: 4px; background: rgba(255, 255, 255, 0.06); color: var(--ink3); }
.route span.on { background: rgba(242, 196, 107, 0.2); color: var(--gold2); }

/* skills */
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.8rem; }
.skill { padding: 0.8rem 1rem; border-radius: 10px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.07); }
.skill .sk-top { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--f-ui); font-weight: 700; letter-spacing: 0.06em; }
.skill .sk-lv { font-size: 1.4rem; color: var(--gold2); }
.skill .sk-fam { font-family: var(--f-ui); font-size: max(10px, 0.7rem); letter-spacing: 0.16em; color: var(--ink3); text-transform: uppercase; }

/* exchange */
.trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.trade-box { border-radius: 12px; border: 1px dashed rgba(242, 196, 107, 0.35); min-height: 9rem; padding: 0.8rem; display: flex; flex-wrap: wrap; gap: 0.6rem; align-content: flex-start; background: rgba(242, 196, 107, 0.03); }
.mini-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.6rem, 1fr)); gap: 0.7rem; max-height: 46vh; overflow: auto; padding: 0.2rem; }
.mini-cards .rgcard, .trade-box .rgcard { width: 8.6rem; }
.rgcard.sel { outline: 3px solid var(--gold); outline-offset: 2px; }
.trader { display: flex; gap: 0.9rem; align-items: center; padding: 0.8rem; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.08); cursor: pointer; background: rgba(255, 255, 255, 0.03); }
.trader.on { border-color: var(--gold); background: rgba(242, 196, 107, 0.08); }
.trader .pr-portrait { width: 3.6rem; height: 3.6rem; background-size: cover; background-position: center 20%; }

/* competition */
.lb-table { width: 100%; border-collapse: collapse; font-family: var(--f-ui); }
.lb-table th { text-align: left; font-size: max(10px, 0.75rem); letter-spacing: 0.16em; color: var(--ink3); text-transform: uppercase; padding: 0.4rem 0.6rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.lb-table td { padding: 0.45rem 0.6rem; border-bottom: 1px solid rgba(255, 255, 255, 0.04); font-weight: 600; }
.lb-table tr.me td { background: rgba(242, 196, 107, 0.1); color: var(--gold2); }
.bracket { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; align-items: center; }
.bracket-col { display: flex; flex-direction: column; justify-content: space-around; gap: 0.8rem; min-height: 22rem; }
.bmatch { border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.03); overflow: hidden; font-family: var(--f-ui); }
.bmatch div { display: flex; justify-content: space-between; padding: 0.35rem 0.6rem; font-weight: 600; font-size: max(10px, 0.88rem); }
.bmatch div + div { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.bmatch .win { color: var(--gold2); background: rgba(242, 196, 107, 0.08); }
.bmatch .me { color: var(--cyan); }
.station-label { font-family: var(--f-title); font-weight: 800; font-size: max(10px, 0.95rem); letter-spacing: 0.22em; text-shadow: 0 0 12px currentColor, 0 2px 4px #000; }
.mission-card .rgcard { width: 100% !important; }

/* dialogue */
.dlg { position: fixed; left: 50%; bottom: 3.5vh; transform: translateX(-50%); width: min(1040px, 92vw); display: grid; grid-template-columns: 9rem 1fr; gap: 1.2rem; align-items: end; z-index: 45; animation: dlgIn 0.35s cubic-bezier(.2, 1.2, .4, 1); pointer-events: auto; }
@keyframes dlgIn { from { opacity: 0; transform: translateX(-50%) translateY(20px); } }
.dlg-portrait { width: 9rem; height: 9rem; border-radius: 14px; background-size: 250%; background-position: 20% 24%; border: 2px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 24px var(--pc, rgba(242, 196, 107, 0.35)); background-color: #0c0818; transition: border-color 0.2s; }
.dlg-portrait.narrator { background: radial-gradient(circle, #2a1a4a, #07050c); display: grid; place-items: center; font-family: var(--f-title); font-size: 3rem; color: var(--violet); }
.dlg-box { padding: 1rem 1.4rem 1.1rem; min-height: 8rem; }
.dlg-name { font-family: var(--f-ui); font-weight: 700; letter-spacing: 0.18em; font-size: 1rem; margin-bottom: 0.35rem; }
.dlg-text { font-size: 1.22rem; line-height: 1.5; color: #f4efff; min-height: 3.6rem; }
.dlg-text.narr { font-family: var(--f-title); font-style: italic; color: #d8ccf0; }
.dlg-note { margin-top: 0.4rem; font-style: italic; color: var(--ink3); font-size: max(10px, 0.9rem); }
.dlg-foot { display: flex; justify-content: space-between; margin-top: 0.5rem; font-family: var(--f-ui); font-size: max(10px, 0.75rem); letter-spacing: 0.14em; color: var(--ink3); }
.mission-banner { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); text-align: center; z-index: 40; pointer-events: none; animation: bannerIn 0.8s ease; }
.mission-banner .mb-ch { font-family: var(--f-ui); letter-spacing: 0.4em; color: var(--ink2); font-weight: 600; }
.mission-banner .mb-t { font-family: var(--f-title); font-weight: 800; font-size: 3.2rem; letter-spacing: 0.16em; color: var(--gold2); text-shadow: 0 0 30px rgba(242, 196, 107, 0.5), 0 4px 12px #000; }
.mission-banner .mb-l { font-family: var(--f-ui); letter-spacing: 0.24em; color: var(--ink2); text-transform: uppercase; margin-top: 0.3rem; }
.obj-bar { position: absolute; left: 50%; top: 5.6rem; transform: translateX(-50%); width: 20rem; }

/* ---------- objective markers (off-screen arrows) ---------- */
.obj-marker { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; font: 600 max(10px, 0.7rem)/1 var(--f-ui); letter-spacing: 0.12em; text-transform: uppercase; text-shadow: 0 1px 3px #000; }
.obj-marker i { width: 0; height: 0; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 16px solid currentColor; filter: drop-shadow(0 0 6px currentColor); }

/* ---------- expedition ---------- */
.minimap { position: absolute; right: 1rem; top: 4.2rem; width: 180px; height: 180px; border-radius: 50%; box-shadow: 0 6px 24px rgba(0,0,0,0.5); }
.exp-tally { margin-top: 196px; display: flex; flex-direction: column; gap: 3px; min-width: 180px; }
.exp-tally .loot i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.exp-labels { position: absolute; inset: 0; pointer-events: none; }
.exp-label { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; text-shadow: 0 1px 3px #000, 0 0 8px rgba(0,0,0,0.7); white-space: nowrap; }
.exp-label b { font: 700 max(10px, 0.82rem)/1.1 var(--f-ui); letter-spacing: 0.08em; }
.exp-label span { font: 500 max(10px, 0.68rem)/1.2 var(--f-ui); color: var(--ink2); letter-spacing: 0.1em; text-transform: uppercase; }
.timing-ring { position: absolute; left: calc(50% + 210px); top: 46%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 0.4rem; pointer-events: none; z-index: 30; }
.timing-ring .tr-svg { width: 190px; height: 190px; filter: drop-shadow(0 4px 18px rgba(0,0,0,0.6)); }
.timing-ring .tr-track { fill: rgba(10,6,20,0.55); stroke: rgba(255,255,255,0.18); stroke-width: 7; }
.timing-ring .tr-good { fill: none; stroke: var(--tc); stroke-opacity: 0.45; stroke-width: 9; }
.timing-ring .tr-perfect { fill: none; stroke: #fff; stroke-width: 10; filter: drop-shadow(0 0 4px var(--tc)); }
.timing-ring .tr-needle { stroke: #fff; stroke-width: 3; stroke-linecap: round; }
.timing-ring .tr-hub { fill: var(--tc); }
.timing-ring .tr-title { font: 700 1.1rem/1 var(--f-title); letter-spacing: 0.2em; color: var(--tc); text-shadow: 0 2px 8px #000; }
.timing-ring .tr-hint { font: 500 max(10px, 0.72rem)/1 var(--f-ui); letter-spacing: 0.14em; color: var(--ink2); text-shadow: 0 1px 3px #000; }
.timing-ring.perfect .tr-title { color: #fff; transform: scale(1.25); transition: transform 0.2s; }
.timing-ring.miss .tr-title { color: var(--ink3, #888); }

/* ---------- the premium table (card duels) ---------- */
.tbl { position: absolute; inset: 0; pointer-events: none; }
.tbl > * { pointer-events: auto; }
.tbl-plates { position: absolute; inset: 0; pointer-events: none; }
.tbl-plates > * { pointer-events: auto; position: absolute; left: 0; top: 0; }
.uplate { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; padding: 2px 4px; border-radius: 10px; transition: box-shadow 0.15s, background 0.15s; }
.uplate .up-row { display: flex; gap: 2.2rem; }
.uplate b { min-width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; font: 800 1.05rem/1 var(--f-ui); color: #fff; text-shadow: 0 1px 2px #000; border: 2px solid rgba(255,255,255,0.75); box-shadow: 0 3px 10px rgba(0,0,0,0.6); }
.uplate b.atk { background: radial-gradient(circle at 35% 30%, #ffd86a, #b8741a); }
.uplate b.hp { background: radial-gradient(circle at 35% 30%, #ff7a7a, #a8202a); }
.uplate b.hurt { color: #ffb0b0; }
.uplate b.up { color: #9affb0; }
.uplate .up-kw { display: flex; gap: 3px; min-height: 1rem; }
.uplate .up-kw i { font-style: normal; font-size: max(10px, 0.8rem); width: 1.2rem; height: 1.2rem; display: grid; place-items: center; border-radius: 50%; background: rgba(10,6,20,0.8); border: 1px solid rgba(255,255,255,0.35); color: #ffe2a0; }
.uplate.ready { box-shadow: 0 0 0 2px #6aff9a, 0 0 18px rgba(106,255,154,0.5); background: rgba(40,120,70,0.18); }
.uplate.tgt { box-shadow: 0 0 0 2px #ff5a6a, 0 0 22px rgba(255,90,106,0.7); background: rgba(160,30,50,0.25); animation: tgtPulse 0.9s ease-in-out infinite; }
.uplate.src { box-shadow: 0 0 0 2px #ffd26a, 0 0 22px rgba(255,210,106,0.7); }
.uplate.hit, .tc.hit { animation: hitShake 0.28s; }
@keyframes tgtPulse { 50% { box-shadow: 0 0 0 3px #ff8a9a, 0 0 30px rgba(255,90,106,0.9); } }
@keyframes hitShake { 25% { translate: -5px 0; } 50% { translate: 5px 0; } 75% { translate: -3px 0; } }
.tc { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; padding: 4px 10px; border-radius: 12px; }
.tc.tgt { box-shadow: 0 0 0 2px #ff5a6a, 0 0 26px rgba(255,90,106,0.7); background: rgba(160,30,50,0.2); animation: tgtPulse 0.9s ease-in-out infinite; }
.tc-name { font: 700 max(10px, 0.8rem)/1 var(--f-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--hc, #fff); text-shadow: 0 1px 3px #000; white-space: nowrap; }
.tc-stats { gap: 0.4rem; align-items: center; }
.tc-hp { min-width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; font: 800 1.45rem/1 var(--f-ui); color: #fff; background: radial-gradient(circle at 35% 30%, #ff6a6a, #7a1020); border: 3px solid var(--hc, #fff); box-shadow: 0 4px 16px rgba(0,0,0,0.7); text-shadow: 0 2px 3px #000; }
.tc-hp.low { animation: tgtPulse 1.2s infinite; }
.tc-armor { font: 800 max(10px, 0.95rem)/1 var(--f-ui); color: #bfe6ff; background: rgba(20,40,70,0.85); border: 2px solid #9ad8ff; border-radius: 8px; padding: 4px 7px; }
.tc-resp { display: flex; gap: 4px; }
.tc-rcard { width: 1.5rem; height: 2.1rem; border-radius: 4px; background: linear-gradient(135deg, #3a1a6a, #1a0a34); border: 1px solid #c8a0ff; background-size: cover; background-position: center; display: grid; place-items: center; color: #c8a0ff; font-weight: 800; font-size: max(10px, 0.8rem); box-shadow: 0 0 8px rgba(200,160,255,0.5); }
.tc-power { width: 4.6rem; height: 4.6rem; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; background: radial-gradient(circle at 35% 30%, #4a3a7a, #150d26); border: 2px solid #6a5a9a; box-shadow: 0 4px 16px rgba(0,0,0,0.6); color: var(--ink2); transition: transform 0.15s, box-shadow 0.15s; }
.tc-power b { font: 800 1rem/1 var(--f-ui); color: #fff; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #8ad8ff, #1a5aa8); margin-bottom: 2px; }
.tc-power span { font: 700 max(10px, 0.55rem)/1.1 var(--f-ui); letter-spacing: 0.06em; text-transform: uppercase; padding: 0 4px; }
.tc-power.ready { border-color: #6aff9a; box-shadow: 0 0 18px rgba(106,255,154,0.55); color: #fff; }
.tc-power.ready:hover { transform: scale(1.08); }
.tc-power.used { filter: grayscale(1) brightness(0.55); }
.tc-power.enemy { width: 3.4rem; height: 3.4rem; cursor: default; }
.tc-power.enemy span { display: none; }
.tbl-hand { position: absolute; left: 50%; bottom: -3.2rem; transform: translateX(-50%); display: flex; align-items: flex-end; justify-content: center; }
.tbl-hand .hcard { margin: 0 -1.1rem; transform: rotate(var(--rot)) translateY(var(--lift)); transform-origin: 50% 120%; transition: transform 0.16s ease, box-shadow 0.16s, filter 0.16s; filter: brightness(0.72) saturate(0.8); }
.tbl-hand .hcard.playable { filter: none; box-shadow: 0 0 0 2px #6aff9a, 0 0 18px rgba(106,255,154,0.45), 0 8px 26px rgba(0,0,0,0.6); }
.tbl-hand .hcard:hover, .tbl-hand .hcard.selected { transform: translateY(-5.5rem) scale(1.28); z-index: 10; filter: none; }
.tbl-hand .hcard.selected { box-shadow: 0 0 0 3px #ffd26a, 0 0 30px rgba(255,210,106,0.7); }
.tbl-hand .hcard.discounted .cost { background: radial-gradient(circle at 35% 30%, #9affb0, #1a8a4a); }
.tbl-ehand { position: absolute; top: 0.6rem; right: 1.2rem; display: flex; }
.tbl-back { width: 2.4rem; height: 3.4rem; margin-left: -0.9rem; border-radius: 6px; background: linear-gradient(135deg, #3a1a6a, #12082a); border: 2px solid #6a4aa8; box-shadow: 0 4px 10px rgba(0,0,0,0.6); }
.tbl-energy { position: absolute; right: 1.4rem; bottom: 9.5rem; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; pointer-events: none; }
.tbl-energy .en-num { font: 800 2.1rem/1 var(--f-ui); color: #9ae4ff; text-shadow: 0 0 12px rgba(90,200,255,0.8), 0 2px 3px #000; }
.tbl-energy .en-num span { font-size: 1.1rem; color: var(--ink2); }
.tbl-energy .en-pips { display: flex; gap: 3px; }
.tbl-energy .en-pips i { width: 0.8rem; height: 1.1rem; clip-path: polygon(50% 0, 100% 30%, 100% 70%, 50% 100%, 0 70%, 0 30%); background: rgba(90,120,160,0.25); }
.tbl-energy .en-pips i.on { background: linear-gradient(#bff0ff, #2a8ad8); box-shadow: 0 0 8px #5ad8ff; }
.tbl-energy .en-pips i.spent { background: rgba(90,200,255,0.25); }
.btn.tbl-end { position: absolute; right: 1.4rem; top: 50%; transform: translateY(-50%); min-width: 9rem; }
.btn.tbl-end.pulse { animation: endPulse 1.4s ease-in-out infinite; }
@keyframes endPulse { 50% { box-shadow: 0 0 0 3px #6aff9a, 0 0 26px rgba(106,255,154,0.7); } }
.tbl-deck { position: absolute; left: 0; top: 0; white-space: nowrap; font: 700 max(10px, 0.72rem)/1 var(--f-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink2); background: rgba(10,6,20,0.75); padding: 4px 8px; border-radius: 6px; pointer-events: none !important; }
.tbl-log { position: absolute; left: 1rem; top: 38%; width: 17rem; display: flex; flex-direction: column; gap: 3px; pointer-events: none !important; }
.tbl-log div { font: 500 max(10px, 0.78rem)/1.3 var(--f-body); color: var(--ink2); background: rgba(10,6,20,0.55); padding: 3px 8px; border-radius: 6px; border-left: 2px solid rgba(200,160,255,0.5); }
.tbl-log div:first-child { color: #fff; border-left-color: #ffd26a; }
.tbl-arrow { position: absolute; inset: 0; pointer-events: none !important; }
.tbl-arrow svg { width: 100%; height: 100%; }
.tbl-arrow .ap { fill: none; stroke: #ffd26a; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 2 12; filter: drop-shadow(0 0 6px #ffb040); }
.tbl-hint { position: absolute; left: 50%; top: 45%; transform: translateX(-50%); padding: 0.4rem 1rem; border-radius: 8px; background: rgba(10,6,20,0.8); font: 600 max(10px, 0.85rem)/1 var(--f-ui); letter-spacing: 0.08em; color: #ffd26a; opacity: 0; transition: opacity 0.2s; pointer-events: none !important; }
.tbl-hint.on { opacity: 1; }
.tbl-deckname { position: absolute; left: 1rem; bottom: 1rem; font: 700 max(10px, 0.72rem)/1 var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink3); pointer-events: none !important; }
.tbl-cast { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(1.25); z-index: 40; animation: castIn 0.25s ease-out; pointer-events: none; }
.tbl-cast.enemy { left: 22%; }
.tbl-cast.out { opacity: 0; transition: opacity 0.28s; }
@keyframes castIn { from { opacity: 0; transform: translate(-50%, -40%) scale(0.9); } }
.mull { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; background: rgba(5,3,11,0.72); z-index: 30; }
.mull-h { font: 700 2rem/1 var(--f-title); letter-spacing: 0.14em; color: var(--gold2); text-shadow: 0 2px 10px #000; }
.mull-sub { font: 500 max(10px, 0.95rem)/1.3 var(--f-body); color: var(--ink2); }
.mull-cards { display: flex; gap: 1.2rem; margin: 0.8rem 0; }
.mull-card.replace { filter: grayscale(0.8) brightness(0.55); transform: translateY(0.8rem) rotate(-3deg); box-shadow: 0 0 0 3px #ff5a6a; }
.mull-card.replace::after { content: 'REPLACE'; position: absolute; inset: 40% 0 auto 0; text-align: center; font: 800 1rem/1 var(--f-ui); letter-spacing: 0.2em; color: #ff8a9a; text-shadow: 0 2px 4px #000; z-index: 6; }
.res-rating { font: 600 1rem/1.3 var(--f-ui); color: var(--ink2); }

/* ---------- breach (moba) ---------- */
.moba { position: absolute; inset: 0; pointer-events: none; }
.moba > * { pointer-events: auto; }
.moba-bars { position: absolute; inset: 0; pointer-events: none !important; }
.moba-score { position: absolute; left: 50%; top: 0.5rem; transform: translateX(-50%); display: flex; gap: 1.2rem; align-items: baseline; flex-wrap: wrap; justify-content: center; padding: 0.35rem 1.2rem; border-radius: 10px; background: rgba(8,5,16,0.72); font: 800 1.1rem/1 var(--f-ui); letter-spacing: 0.12em; pointer-events: none !important; }
.moba-score b { color: #fff; font-size: 1.2rem; }
.moba-score .ms-towers { width: 100%; text-align: center; font: 600 max(10px, 0.7rem)/1.4 var(--f-ui); color: var(--ink3); letter-spacing: 0.14em; }
.moba-mm { position: absolute; right: 0.8rem; bottom: 0.8rem; width: 220px; height: 220px; border: 2px solid rgba(242,196,107,0.55); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.6); cursor: crosshair; }
.moba-feed { position: absolute; right: 0.8rem; top: 0.6rem; width: 19rem; display: flex; flex-direction: column; gap: 3px; pointer-events: none !important; }
.moba-feed div { font: 600 max(10px, 0.78rem)/1.3 var(--f-ui); color: #fff; background: rgba(8,5,16,0.7); padding: 3px 8px; border-radius: 6px; border-left: 3px solid; }
.mb-panel { position: absolute; left: 50%; bottom: 0.6rem; transform: translateX(-50%); display: flex; gap: 0.8rem; align-items: flex-end; padding: 0.6rem 0.8rem; border-radius: 14px; background: linear-gradient(180deg, rgba(20,14,34,0.88), rgba(8,5,16,0.94)); border: 1px solid rgba(242,196,107,0.35); box-shadow: 0 10px 30px rgba(0,0,0,0.6); }
.mb-portrait { position: relative; width: 5.2rem; height: 5.2rem; border-radius: 12px; background-size: cover; background-position: center; border: 3px solid; }
.mb-lvl { position: absolute; right: -8px; bottom: -8px; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: #1a1030; border: 2px solid var(--gold); font: 800 max(10px, 0.95rem)/1 var(--f-ui); color: #fff; }
.mb-mid { display: flex; flex-direction: column; gap: 5px; width: 22rem; }
.mb-abs { display: flex; gap: 0.45rem; justify-content: center; }
.mb-ab { width: 3.6rem !important; height: 3.6rem !important; }
.mb-ab .mb-cost { position: absolute; left: 3px; top: 2px; font: 700 max(10px, 0.62rem)/1 var(--f-ui); color: #9ac8ff; text-shadow: 0 1px 2px #000; }
.mb-ab.nomana .ab-icon { filter: grayscale(0.7) brightness(0.6); }
.mb-bar { position: relative; height: max(14px, 0.95rem) !important; }
.mb-bar span { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font: 700 max(10px, 0.68rem)/1 var(--f-ui); color: #fff; text-shadow: 0 1px 2px #000; }
.mb-bar.mp i { background: linear-gradient(90deg, #2a5ad8, #6aa8ff) !important; }
.mb-xp { height: 4px !important; }
.mb-right { display: flex; flex-direction: column; gap: 5px; align-items: stretch; }
.mb-items { display: grid; grid-template-columns: repeat(3, 2.3rem); gap: 4px; }
.mb-item { width: 2.3rem; height: 2.3rem; border-radius: 6px; background: rgba(255,255,255,0.05) center/cover; border: 1px solid rgba(255,255,255,0.18); }
.mb-gold { font: 600 max(10px, 0.8rem)/1 var(--f-ui); color: var(--ink2); text-align: center; }
.mb-gold b { color: #ffd24a; font-size: 1rem; }
.btn.mb-shopbtn { padding: 0.3em 0.6em; font-size: max(10px, 0.72rem); }
.moba-death { position: absolute; left: 50%; top: 32%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 0.8rem 1.6rem; border-radius: 12px; background: rgba(8,5,16,0.8); pointer-events: none !important; }
.moba-death b { font: 800 1.6rem/1 var(--f-title); letter-spacing: 0.12em; color: #ff8a9a; }
.moba-death span { color: var(--ink2); font-size: max(10px, 0.85rem); }
.moba-death.hidden { display: none; }
.moba-buffs { position: absolute; left: 1rem; top: 1rem; display: flex; gap: 0.4rem; pointer-events: none !important; }
.moba-sb { position: absolute; left: 50%; top: 12%; transform: translateX(-50%); width: min(760px, 94vw); padding: 1rem; pointer-events: none !important; }
.moba-sb tr.me td { color: #ffd26a; }
.moba-shop { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); width: min(760px, 94vw); }
.shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin-top: 0.7rem; }
.shop-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0.6rem; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); text-align: center; cursor: pointer; opacity: 0.55; }
.shop-item.can { opacity: 1; border-color: rgba(106,255,154,0.6); }
.shop-item.owned { opacity: 0.8; border-color: rgba(242,196,107,0.6); }
.shop-item .si-icon { width: 2.8rem; height: 2.8rem; border-radius: 8px; background: center/cover; }
.shop-item b { font: 700 max(10px, 0.85rem)/1.1 var(--f-ui); color: #fff; }
.shop-item span { font-size: max(10px, 0.72rem); color: var(--ink2); }
.shop-item i { font-style: normal; font: 700 max(10px, 0.8rem)/1 var(--f-ui); color: #ffd24a; }

/* ---------- dominion (rts) ---------- */
.rts { position: absolute; inset: 0; pointer-events: none; }
.rts > * { pointer-events: auto; }
.rts-top { position: absolute; left: 50%; top: 0.5rem; transform: translateX(-50%); display: flex; gap: 1.1rem; align-items: center; padding: 0.4rem 1.1rem; border-radius: 10px; background: rgba(8,5,16,0.78); font: 700 1rem/1 var(--f-ui); letter-spacing: 0.06em; white-space: nowrap; }
.rts-top b { color: #fff; }
.rt-res { display: inline-flex; align-items: center; gap: 6px; color: #fff; }
.rt-res i { width: 12px; height: 12px; border-radius: 3px; }
.rt-res.scrap i { background: #c8a070; } .rt-res.aether i { background: #7fe8ff; box-shadow: 0 0 8px #7fe8ff; } .rt-res.supply i { background: #6aff9a; border-radius: 50%; }
.rt-res.supply.blocked { color: #ff8a9a; }
.rts-mm { position: absolute; left: 0.8rem; bottom: 0.8rem; width: 200px; height: 200px; border: 2px solid rgba(242,196,107,0.55); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.6); cursor: crosshair; image-rendering: pixelated; }
.rts-sel { position: absolute; left: calc(200px + 1.8rem); bottom: 0.8rem; width: min(30rem, 38vw); min-height: 7.5rem; padding: 0.7rem; display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: flex-start; }
.rs-portrait { width: 5rem; height: 5rem; border-radius: 10px; border: 2px solid; background: center/cover; flex: none; }
.rs-info { display: flex; flex-direction: column; gap: 4px; font-size: max(10px, 0.85rem); max-width: 20rem; }
.rs-info b { font: 700 1rem/1.1 var(--f-ui); letter-spacing: 0.06em; color: #fff; }
.rs-queue { display: flex; gap: 4px; width: 100%; }
.rs-q { position: relative; width: 2.6rem; height: 2.6rem; border-radius: 6px; background: center/cover; border: 1px solid rgba(255,255,255,0.3); cursor: pointer; overflow: hidden; }
.rs-q i { position: absolute; left: 0; bottom: 0; height: 4px; background: #c8a0ff; }
.rs-grid { display: grid; grid-template-columns: repeat(8, 2.9rem); gap: 4px; }
.rs-cell { position: relative; width: 2.9rem; height: 2.9rem; border-radius: 6px; background: center/cover; border: 1px solid rgba(255,255,255,0.25); cursor: pointer; overflow: hidden; }
.rs-cell i { position: absolute; left: 0; bottom: 0; height: 4px; background: #6aff9a; }
.rts-card { position: absolute; right: 0.8rem; bottom: 0.8rem; width: min(24rem, 32vw); max-height: 60vh; overflow-y: auto; padding: 0.6rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; align-content: start; }
.rc-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 4px; border-radius: 8px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14); cursor: pointer; text-align: center; min-height: 4.2rem; }
.rc-btn:hover { border-color: rgba(106,255,154,0.7); background: rgba(106,255,154,0.08); }
.rc-btn.off { opacity: 0.45; cursor: not-allowed; }
.rc-btn .rc-icon { width: 2.1rem; height: 2.1rem; border-radius: 6px; background: center/cover; }
.rc-btn span { font: 600 max(10px, 0.66rem)/1.1 var(--f-ui); color: var(--ink2); letter-spacing: 0.04em; }
.rc-btn b { position: absolute; top: 3px; right: 5px; font: 800 max(10px, 0.7rem)/1 var(--f-ui); color: #ffd26a; }
.rc-btn i { font-style: normal; font: 700 max(10px, 0.6rem)/1 var(--f-ui); color: #c8a070; }
.rc-sep { grid-column: 1 / -1; font: 700 max(10px, 0.66rem)/1.4 var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink3); margin-top: 3px; }
.rc-note { grid-column: 1 / -1; font-size: max(10px, 0.72rem); }
.rts-box { position: absolute; display: none; border: 1px solid #6aff9a; background: rgba(106,255,154,0.08); pointer-events: none !important; }
.rts-hint { position: absolute; left: 50%; top: 3.4rem; transform: translateX(-50%); font: 600 max(10px, 0.85rem)/1 var(--f-ui); letter-spacing: 0.06em; color: #ffd26a; text-shadow: 0 1px 3px #000; pointer-events: none !important; }

/* RG-025: at large interface scales the War Map's two columns stop fitting (the map shrank to a third of its
   labels); in rem terms that is a narrow panel, so it becomes one column with the Launch bar still sticky */
@container (max-width: 62rem) {
  .journey-rush { grid-template-columns: minmax(0, 1fr); }
}
/* when the panel is narrow or short in rem terms (large scales), the summary and Launch come first instead of a
   sticky bar laid over the options (Launch stays visible without scrolling, RG-020) */
@container (max-width: 62rem) or (max-height: 46rem) {
  .journey-rush .journey-launch { order: -1; position: static; padding: 0 0 0.6rem; margin: 0; background: none; }
}
/* map labels never outgrow the map: capped by the panel width at large scales, long names wrap */
.journey-node .lbl { font-size: max(10px, min(0.8rem, 1.45cqw)); max-width: 11em; text-align: center; white-space: normal; }
/* node labels near the map's edge may run a few pixels past its rounded frame rather than being cut */
.journey-map { overflow: visible; }
/* title notices: a touch-only device, or a browser drawing without the graphics card */
.title-note { position: fixed; left: 7vw; bottom: 3rem; max-width: min(40rem, 86vw); background: rgba(42, 16, 18, 0.88); border: 1px solid rgba(255, 130, 100, 0.5); border-radius: 10px; padding: 0.6rem 1rem; color: #ffdccf; font-family: var(--f-ui); font-size: max(10px, 0.88rem); line-height: 1.45; }
.title-note p { margin: 0.2rem 0; }
