
.deck-tokens { padding: 6px 12px 8px; min-width: 0; width: 100%; box-sizing: border-box; border-top: 1px solid var(--line); }
.deck-token-head { display: flex; align-items: center; gap: 8px; }
.deck-token-head h3 { min-width: 0; font-size: 12px; font-weight: 500; }
.deck-token-head [data-token-retry] { margin-left: auto; flex: none; min-height: 44px; padding: 6px 8px; white-space: nowrap; }
.deck-tokens p, .deck-tokens small { font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.deck-token { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: start; gap: 6px 10px; margin: 12px 0; min-width: 0; }
.deck-token-image { position: relative; display: grid; place-items: center; width: 72px; height: 56px; flex: 0 0 72px; background: #242832; overflow: hidden; border-radius: 5px; }
.deck-token-image > span { padding: 3px; font-size: 10px; text-align: center; }
.deck-token-image img { position: absolute; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.deck-token-info { flex: 1; min-width: 0; }
.deck-token-info > b { overflow-wrap: anywhere; }
.deck-token-info > b, .deck-token-info > small, .deck-tokens p > small { display: block; }
.token-choices { grid-column: 1 / -1; min-width: 0; }
.token-choices summary { cursor: pointer; min-height: 32px; padding: 6px 0; }
.token-art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(78px, 100%), 104px)); gap: 6px; }
.token-art-choice { min-width: 0; min-height: 44px; padding: 4px; border: 1px solid transparent; background: #242832; color: inherit; border-radius: 5px; }
.token-art-choice.is-now { border-color: #e5c070; }
.token-art-choice .deck-token-image { width: 100%; }
.token-art-choice small { display: block; }
.card .token-image-retry { display: none; position: absolute; z-index: 5; top: 25%; left: 10%; max-width: 80%; font-size: 10px; }
.card .frame.art-failed .token-image-retry { display: block; }
.card .frame:has(img.art) > .noart-name { display: none; }
.card.token .frame:not(:has(img.art)) > .noart-name { inset: 16px 4px 16px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink); text-align: center; line-height: 1.25; overflow-wrap: anywhere; }
.card.token .frame.art-failed .token-image-retry { top: auto; bottom: 4px; left: 50%; transform: translateX(-50%); }
.card.token .frame:not(:has(img.art)), .card.blessing .frame:not(:has(img.art)) { background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--gold) 22%, var(--card-bg)), var(--card-bg) 70%); }
.card.blessing .frame:not(:has(img.art)) > .nm { bottom: 0; padding: 4px; justify-content: center; background: none; font-size: 12px; color: var(--ink); }
.card.blessing .frame:not(:has(img.art)) .nm-t { flex: none; white-space: normal; text-align: center; overflow-wrap: anywhere; }

@font-face {
  font-family: "Chakra Petch";
  src: url("fonts/chakra-petch-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2022, U+00D7;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("fonts/chakra-petch-700.woff2") format("woff2");
  font-weight: 700 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2022, U+00D7;
}

:root {
  color-scheme: dark;
  --bg0: #14110e;
  --bg1: #1d1913;
  --bg2: #262019;
  --line: #2a2520;
  --ink: #f4efe6;
  --dim: #9b9384;
  --gold: #d8b45a;
  --ene: #ffd447;
  --hot: #ff5a1f;
  --trig: #8fd0ff;
  --up: #1667cf;
  --ok: #7fc97a;
  --muted: #6b6458;
  --card-edge: #060504;
  --card-edge-land: #060504;
  --card-bg: #0a0908;
  --pt-face: linear-gradient(#eef4f7, #b7c6cf);
  --pt-ink: #111b21;
  --pt-edge: #64757f;
  --pw: #e8e0c4; --pu: #2f6fb5; --pb: #3a3540; --pr: #d0432b; --pg: #3f8a4f;
  --pc: #4a4640; --pn: #6b655c; --ps: #a8c8d8; --pe: var(--ene);
  --font: "Chakra Petch", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --font-prose: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-meta: 11px;
  --fs-label: 13px;
  --fs-body: 15px;
  --fs-title: 17px;
  --fs-h: 22px;
  --fs-num: 28px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --gutter: 24px;
  --tile-min: 132px;
  --grid-gap: 12px;
  --rail: 200px;
  --tabbar: 56px;
  --header: 48px;
  --ease-sheet: cubic-bezier(.2, .8, .2, 1);
  --nav-bg: var(--bg1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; overscroll-behavior: none; }
body {
  margin: 0;
  background: var(--bg0);
  color: var(--ink);
  font: 400 var(--fs-body) / 1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}
button, input, select { font: inherit; color: inherit; }
@media (pointer: coarse) { input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select { font-size: max(16px, 1em) !important; } }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.prose { font-family: var(--font-prose); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--trig); outline-offset: 2px; }
.ico { flex: none; }

.dg { display: inline-block; min-width: .62em; text-align: center; font-variant-numeric: tabular-nums; }
.dp { display: inline-block; }

.app {
  position: relative; height: var(--vvh, 100dvh); overflow: clip;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "nav offline offline" "nav main sheet";
}
.app-top { display: none; grid-area: header; }
.top-tabs { display: none; }
.offline {
  grid-area: offline;
  height: 20px;
  display: flex; align-items: center; gap: 6px;
  padding-inline: var(--gutter);
  background: var(--bg2);
  color: var(--dim);
  font-size: var(--fs-meta);
}
/*! 072 Inline alert dismiss (MIT, 2026, Seokwoooo, https://lucianlabs.dev/uxui-prompt/#072)。閉じると横へ抜けて高さが畳む */
.offline { transition: height 200ms var(--ease-sheet); }
.offline > * { transition: transform 200ms var(--ease-sheet), opacity 200ms var(--ease-sheet); }
.offline.is-gone { height: 0; overflow: hidden; }
.offline.is-gone > * { transform: translateX(48px); opacity: 0; }
.offline-close { position: relative; z-index: 2; margin-left: auto; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; background: none; color: inherit; }
.offline-close::before { content: ""; position: absolute; inset: -12px; }
.offline-close .ico { width: 14px; height: 14px; }
.main {
  grid-area: main;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 var(--gutter) var(--sp-6);
  -webkit-overflow-scrolling: touch;
}
.main > * { max-width: 1280px; margin-inline: auto; }
.main.fade-in { animation: fade 100ms ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.nav {
  grid-area: nav;
  display: flex; flex-direction: column;
  background: var(--bg1);
  border-right: 1px solid var(--line);
  padding: max(var(--sp-4), env(safe-area-inset-top)) 0 max(var(--sp-4), env(safe-area-inset-bottom)) env(safe-area-inset-left);
  min-height: 0;
}
.nav-mark { padding: 0 var(--sp-4) var(--sp-4); display: flex; align-items: center; }
.nav-brand { display: flex; align-items: center; gap: 6px; height: 18px; }
.brand-icon { display: block; width: 28px; height: 28px; flex: none; object-fit: contain; }
.mark-long {
  font-weight: 700; font-size: 15px; letter-spacing: .08em; color: var(--gold); line-height: 1.2;
}
.nav-tabs { display: flex; flex-direction: column; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: 44px;
  padding: 0 var(--sp-4);
  color: var(--dim);
  font-size: var(--fs-label); font-weight: 500;
  transition: background-color 100ms ease-out, color 100ms ease-out;
}
.nav-item .ico { width: 20px; height: 20px; }
.nav-item[aria-current="page"] { color: var(--gold); }
.nav-item[aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 24px; margin-top: -12px;
  background: var(--gold); border-radius: 0 2px 2px 0;
}
.nav-settings { margin-top: auto; }

.sheet {
  grid-area: sheet;
  width: 400px;
  background: var(--bg1);
  border-left: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: max(var(--sp-4), env(safe-area-inset-bottom));
}
.scrim { display: none; }

@media (hover: hover) {
  .nav-item:hover { background: var(--bg2); color: var(--ink); }
  .nav-item[aria-current="page"]:hover { color: var(--gold); }
}

:root:where(.vp-pc-narrow) { --rail: 64px; }
:where(.vp-pc-narrow) .nav-mark { align-items: center; padding-inline: 0; }
:where(.vp-pc-narrow) .mark-long { display: none; }
:where(.vp-pc-narrow) .nav-brand { height: 20px; }
:where(.vp-pc-narrow) .nav-item { justify-content: center; padding: 0; min-height: 48px; }
:where(.vp-pc-narrow) .nav-item .ico { width: 24px; height: 24px; }
:where(.vp-pc-narrow) .nav-label { display: none; }

:where(html:not(.vp-desk)) .app { grid-template-columns: var(--rail) minmax(0, 1fr); grid-template-areas: "nav offline" "nav main"; }
:where(html:not(.vp-desk)) .sheet {
  position: fixed; z-index: var(--z-sheet); top: 0; right: 0; bottom: 0;
  width: min(440px, 60vw);
  transform: translateX(100%);
  transition: transform 120ms ease-in;
  box-shadow: -8px 0 24px #000a;
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
}
:where(html:not(.vp-desk)) .sheet.is-in { transform: none; transition: transform 150ms var(--ease-sheet); }
:where(html:not(.vp-desk)) .scrim {
  display: block; position: fixed; inset: 0; z-index: var(--z-scrim);
  background: rgb(10 8 6 / .55);
  opacity: 0; transition: opacity 120ms ease-in;
}
:where(html:not(.vp-desk)) .scrim.is-in { opacity: 1; transition: opacity 150ms var(--ease-sheet); }

:root:where(.vp-band) { --gutter: 16px; --tile-min: 104px; --grid-gap: 8px; }
:root:where(.vp-band) { --header: 56px; }
:where(.vp-band) .app {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-areas: "header" "offline" "main";
}
:where(.vp-band) .app-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: calc(var(--header) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(6px, env(safe-area-inset-right)) 0 max(var(--sp-4), env(safe-area-inset-left));
  background: var(--bg0);
  border-bottom: 1px solid var(--line);
}
:where(.vp-band) .app-top .wordmark { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 15px; letter-spacing: .02em; color: var(--gold); white-space: nowrap; min-width: 0; overflow: hidden; }
:where(.vp-band) .top-tabs { display: flex; align-items: center; gap: 2px; flex: none; }
:where(.vp-band) .app-top .top-tab {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; min-width: 40px; height: 44px; padding: 0; border-radius: 10px;
  color: var(--dim); background: transparent;
  transition: background-color 100ms ease-out, color 100ms ease-out;
}
:where(.vp-band) .app-top .top-tab .ico { width: 22px; height: 22px; }
:where(.vp-band) .app-top .top-tab[aria-current="page"] { color: var(--gold); background: rgb(216 180 90 / .16); }
:where(.vp-band) .app-top .top-tab:active { background: var(--bg2); transform: translateY(1px); }
:where(.vp-band) .app-top .top-tab[aria-current="page"]:active { background: rgb(216 180 90 / .24); }
:where(.vp-band) .top-tabs .top-tab:last-child { margin-left: 4px; }
:where(.vp-band) .main { padding: 0 max(var(--gutter), env(safe-area-inset-right)) var(--sp-5) max(var(--gutter), env(safe-area-inset-left)); }
:where(.vp-band) .nav { display: none; }
:where(.vp-band) .app:not(:has(.top-tabs)) .nav {
  display: flex; flex-direction: row; align-items: stretch;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-nav);
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  border-right: 0; border-top: 1px solid var(--line);
}
:where(.vp-band) .app:not(:has(.top-tabs)) .nav-mark, :where(.vp-band) .app:not(:has(.top-tabs)) .nav-label { display: none; }
:where(.vp-band) .app:not(:has(.top-tabs)) .nav-tabs { flex-direction: row; flex: 1; }
:where(.vp-band) .app:not(:has(.top-tabs)) .nav-tabs > li { flex: 1; display: flex; }
:where(.vp-band) .app:not(:has(.top-tabs)) .nav-item { flex: 1; justify-content: center; padding: 0 12px; min-height: 52px; }
:where(.vp-band) .app:not(:has(.top-tabs)) .nav-item[aria-current="page"]::before { display: none; }
:where(.vp-band) .app:not(:has(.top-tabs)) .nav-settings { flex: none; margin-top: 0; }
:where(.vp-band) .app:not(:has(.top-tabs)) .main { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
:where(.vp-band) .main { padding-bottom: max(var(--sp-5), env(safe-area-inset-bottom)); }
:where(.vp-band) .sheet {
  top: auto; left: 0; right: 0; bottom: 0; width: auto;
  max-height: 92dvh;
  border-left: 0; border-radius: 14px 14px 0 0;
  transform: translateY(100%);
  box-shadow: 0 -8px 24px #000a;
  padding-top: 0; padding-right: 0;
}

:root:where(.vp-land) { --tile-min: 104px; --grid-gap: 10px; --gutter: 16px; --rail: calc(56px + env(safe-area-inset-left)); }
:where(.vp-land) .app {
  grid-template-columns: var(--rail) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "nav offline" "nav main";
}
:where(.vp-land) .app-top { display: none; }
:where(.vp-land) .main { padding: 0 max(var(--gutter), env(safe-area-inset-right)) var(--sp-5) var(--gutter); }
:where(.vp-land) .nav {
  flex-direction: column;
  border-top: 0; border-right: 1px solid var(--line);
  padding: max(var(--sp-3), env(safe-area-inset-top)) 0 max(var(--sp-3), env(safe-area-inset-bottom)) env(safe-area-inset-left);
}
:where(.vp-land) .nav-mark { display: flex; align-items: center; padding: 0 0 var(--sp-3); }
:where(.vp-land) .mark-long { display: none; }
:where(.vp-land) .nav-brand { height: 20px; }
:where(.vp-land) .nav-tabs { flex-direction: column; flex: none; }
:where(.vp-land) .nav-item { height: 48px; min-height: 48px; flex-direction: row; justify-content: center; padding: 0; }
:where(.vp-land) .nav-item[aria-current="page"]::before { display: block; }
:where(.vp-land) .nav-label { display: none; }
:where(.vp-land) .nav-settings { display: flex; margin-top: auto; }
:where(.vp-land) .sheet {
  top: 0; left: auto; bottom: 0; right: 0;
  width: min(440px, 60vw); max-height: none;
  border-radius: 0; border-left: 1px solid var(--line);
  transform: translateX(100%);
  box-shadow: -8px 0 24px #000a;
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
}

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 44px; height: 44px; padding: 0 var(--sp-2);
  border: 0; background: transparent; color: var(--ink); border-radius: 8px;
  transition: background-color 100ms ease-out;
}
.icon-btn:active { background: var(--bg2); transform: translateY(1px); }
.back span { font-size: var(--fs-label); }
.btn {
  height: 40px; padding: 0 14px;
  background: var(--bg2); border: 1px solid #3a3228; border-radius: 8px;
  color: var(--ink); font-size: var(--fs-label); font-weight: 500;
  transition: background-color 100ms ease-out;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; pointer-events: none; }
.text-btn { color: var(--trig); font-size: var(--fs-label); font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
@media (hover: hover) {
  .icon-btn:hover, .btn:hover { background: var(--bg2); }
  .text-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
}

.seg {
  display: flex; padding: 3px; gap: 0;
  background: var(--bg2); border-radius: 999px; height: 40px;
}
.seg button {
  flex: 1; border: 0; border-radius: 999px; background: transparent;
  color: var(--dim); font-size: var(--fs-label); font-weight: 500;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}
.seg button[aria-checked="true"] { background: var(--gold); color: #111; font-weight: 700; }
/*! 039 Sliding tabs pill (MIT, 2026, Seokwoooo, https://lucianlabs.dev/uxui-prompt/#039)。許諾の全文は 008 の所 */
.seg { position: relative; isolation: isolate; }
.seg.has-mark::before {
  content: ""; position: absolute; z-index: -1;
  left: var(--seg-x); top: var(--seg-y); width: var(--seg-w); height: var(--seg-h);
  border-radius: 999px; background: var(--gold); pointer-events: none;
  transition: left 220ms var(--ease-sheet), width 220ms var(--ease-sheet), top 220ms var(--ease-sheet), height 220ms var(--ease-sheet);
}
.seg.has-mark.mark-still::before { transition: none; }
.seg.has-mark button[aria-checked="true"] { background: transparent; transition: color 220ms var(--ease-sheet); }
.seg button:focus-visible { outline-offset: 0; }

.view-title {
  display: flex; align-items: baseline; gap: var(--sp-2);
  font-size: var(--fs-h); font-weight: 700; line-height: 1.2;
  padding: var(--sp-5) 0 var(--sp-4);
  text-wrap: balance;
}
.view-title .count { font-size: var(--fs-label); font-weight: 500; color: var(--dim); }
:where(.vp-land) .view-title { font-size: var(--fs-title); padding: var(--sp-4) 0 var(--sp-3); }
:where(.vp-band, .vp-land) .pool-title { padding: var(--sp-3) 0 var(--sp-2); }
:where(.vp-band, .vp-land) .pool-title:not(.is-filtered) .count { display: none; }

.filters {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: var(--sp-2);
  min-height: 48px;
  margin-inline: calc(-1 * var(--gutter));
  padding: var(--sp-2) var(--gutter);
  background: var(--bg0);
  border-bottom: 1px solid var(--line);
  max-width: none;
}
.chips { display: flex; gap: var(--sp-2); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg2); color: var(--ink);
  font-size: var(--fs-label); font-weight: 500; white-space: nowrap;
  position: relative;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}
.chip::before { content: ""; position: absolute; inset: -6px -2px; }
.chip-n { font-size: var(--fs-meta); color: var(--dim); }
.chip[aria-checked="true"] { background: var(--gold); border-color: var(--gold); color: #111; }
.chip[aria-checked="true"] .chip-n { color: #111; }
.chip:active, .nav-item:active { background: var(--bg2); transform: translateY(1px); }
.chip[aria-checked="true"]:active { background: var(--gold); }
.seg button:active:not([aria-checked="true"]) { background: var(--bg1); }
.sort { margin-left: auto; position: relative; }
.sort select {
  appearance: none; -webkit-appearance: none;
  height: 36px; padding: 0 28px 0 12px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  font-size: var(--fs-label); color: var(--ink);
}
.sort::after {
  content: ""; position: absolute; right: 12px; top: 50%; margin-top: -2px;
  border: 4px solid transparent; border-top-color: var(--dim); border-bottom: 0;
  pointer-events: none;
}
.search {
  display: flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 10px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  color: var(--dim);
  width: 240px;
}
.search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; background: transparent; outline: none;
  font-size: 16px;
  color: var(--ink);
  user-select: text; -webkit-user-select: text;
}
.search input::placeholder { color: var(--dim); }
.search:focus-within { outline: 2px solid var(--trig); outline-offset: 2px; }
@media (hover: hover) {
  .chip:hover { border-color: var(--dim); }
}
:where(.vp-band) .filters { flex-wrap: wrap; }
:where(.vp-band) .search { order: 3; width: 100%; }
:where(.vp-land) .search { width: 200px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--tile-min), 1fr));
  gap: var(--sp-4) var(--grid-gap);
}
.grid li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.tile {
  position: relative;
  display: block; width: 100%;
  aspect-ratio: 1 / 1.1;
  padding: 0;
  border: 1.5px solid var(--card-edge);
  border-radius: clamp(6px, 9%, 12px);
  background: var(--card-bg);
  transition: transform 80ms ease-out, border-color 100ms ease-out;
}
.tile.land { border-color: var(--card-edge-land); }
.tile:active { transform: scale(.97); }
.tile:focus-visible { outline-offset: 3px; }
.tile.is-open { border-color: var(--gold); }
.art {
  position: absolute; inset: 0;
  border-radius: inherit;
  overflow: hidden;
}
.art img { width: 100%; height: 100%; object-fit: cover; }
.band {
  position: absolute; left: 0; right: 0; top: 0;
  padding: 2px 5px 6px;
  background: linear-gradient(#000c, #0000);
  color: #f2f6f8; font-size: var(--fs-meta); font-weight: 700; line-height: 1.3;
  text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile:has(.dfc) .band { padding-right: 5px; }
.band { display: flex; align-items: center; gap: 4px; }
.band-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.band-cost { flex: none; display: flex; }
.band .dfc { position: static; flex: none; }
.pip.xs { width: 13px; height: 13px; font-size: 8.5px; vertical-align: 0; }
.pip.xs + .pip.xs { margin-left: 1px; }
:where(.vp-slim) .pip.xs { width: 12px; height: 12px; font-size: 8px; }
:where(.vp-slim) .band { font-size: 10px; }
.dfc { position: absolute; top: 3px; right: 5px; color: rgb(244 239 230 / .7); line-height: 0; }
.pt {
  position: absolute; right: -4px; bottom: -3px;
  min-width: 36px; padding: 1px 6px;
  background: var(--pt-face); color: var(--pt-ink);
  border: 1px solid var(--pt-edge); border-radius: 6px;
  font-size: 15px; font-weight: 900; line-height: 1.25; text-align: center;
}
.pt.pt-m { font-size: 17px; }
.pt.pt-l { font-size: 19px; }
.noart {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-bg);
}
.noart-pips { display: flex; gap: 2px; }
.tag { font-size: var(--fs-meta); color: var(--dim); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-right: 4px; }
@media (hover: hover) { .tile:hover { border-color: var(--dim); } .tile.is-open:hover { border-color: var(--gold); } }

.empty-line { padding: var(--sp-6) 0; color: var(--dim); font-size: var(--fs-label); }
.credit { padding: var(--sp-6) 0 var(--sp-2); font-size: var(--fs-meta); color: var(--dim); line-height: 1.5; }

.pip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: 0;
  vertical-align: -3px; color: #fff; flex: none;
}
.pip + .pip { margin-left: 2px; }
.pip.in { width: 1em; height: 1em; font-size: .6em; vertical-align: -.12em; }
.rules .pip.in { font-size: .62em; width: 1.7em; height: 1.7em; vertical-align: .1em; }
.pw { background: var(--pw); color: #3a3018; }
.pu { background: var(--pu); }
.pb { background: var(--pb); color: #e8e0e8; }
.pr { background: var(--pr); }
.pg { background: var(--pg); }
.pc { background: var(--pc); }
.pn { background: var(--pn); }
.ps { background: var(--ps); color: #1a2a34; }
.pe { background: var(--pe); color: #3a2a00; }
.ph { background: linear-gradient(135deg, var(--h1) 50%, var(--h2) 50%); }
.pt-tap { background: var(--pn); }
.pip .tap { width: 64%; height: 64%; }

.sheet-grab { display: none; }
:where(.vp-band) .sheet-grab {
  display: block; position: sticky; top: 0; z-index: 2;
  height: 20px; margin-bottom: -20px;
  touch-action: none;
}
:where(.vp-band) .sheet-grab::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 36px; height: 4px; margin-left: -18px;
  border-radius: 2px; background: var(--muted);
}
.sheet-top {
  position: sticky; top: 0; z-index: 1;
  display: flex; justify-content: flex-end;
  padding: var(--sp-1) var(--sp-1) 0;
  background: linear-gradient(var(--bg1) 60%, transparent);
}
.sheet-body { padding: 0 var(--sp-4) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); }
.sheet .seg { margin-bottom: var(--sp-1); }
.sheet-side, .sheet-text { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.sheet-full { margin: 0 auto; width: min(100% - 32px, 288px); display: flex; flex-direction: column; gap: 6px; }
.sheet-full img { width: 100%; height: auto; aspect-ratio: 488 / 680; border-radius: 4.5% / 3.2%; background: var(--card-bg); }
.sheet-full figcaption { font-size: var(--fs-meta); color: var(--dim); }
:where(.tile).full { margin: 0 auto; width: min(100% - 32px, 288px); display: flex; flex-direction: column; gap: 6px; }
:where(.tile).full img { width: 100%; height: auto; aspect-ratio: 488 / 680; border-radius: 4.5% / 3.2%; background: var(--card-bg); }
.full-missing {
  aspect-ratio: 488 / 680; border-radius: 12px; background: var(--card-bg);
  display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: var(--fs-label);
}
.sheet-name { font-size: var(--fs-title); font-weight: 700; line-height: 1.3; margin-top: var(--sp-1); }
.sub-name { font-size: var(--fs-label); color: var(--dim); font-weight: 500; margin-top: calc(-1 * var(--sp-2)); }
.cost-line { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); }
.cost { display: inline-flex; align-items: center; }
.split-sep { color: var(--dim); margin: 0 6px; font-size: var(--fs-label); }
.type { font-size: var(--fs-label); color: var(--dim); }
.rules-wrap { display: flex; flex-direction: column; gap: var(--sp-2); }
.face-head { font-size: var(--fs-label); color: var(--dim); font-weight: 700; }
.rules { font-family: var(--font-prose); font-size: var(--fs-body); line-height: 1.6; user-select: text; -webkit-user-select: text; }
.rules p + p { margin-top: var(--sp-2); }
.pt-line { font-size: var(--fs-label); color: var(--dim); }
.pt-line b { color: var(--ink); font-weight: 700; }

.settings { max-width: 640px !important; margin-inline: 0 !important; display: flex; flex-direction: column; }
.group-title { font-size: var(--fs-label); color: var(--dim); font-weight: 500; padding: var(--sp-5) 0 var(--sp-2); }
.group-title:first-of-type { padding-top: var(--sp-1); }
.group { background: var(--bg1); border-radius: 8px; }
.row { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }
.row + .row { border-top: 1px solid var(--line); }
.row-label { font-size: var(--fs-body); }
.row .seg { max-width: 320px; }
.hint { font-size: var(--fs-label); color: var(--dim); line-height: 1.5; }
.big-num { font-size: var(--fs-num); font-weight: 700; line-height: 1; }
.big-num .of { color: var(--dim); }
.meter { display: block; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(var(--p)); transition: transform 150ms linear; }
.meter.full i { background: var(--ok); }
.row-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.about-name { font-size: var(--fs-label); }
.ver { color: var(--dim); }

.blueprint { display: flex; flex-direction: column; gap: var(--sp-2); padding-bottom: var(--sp-6); }
.bp-stage { padding: 22vh 0 var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); }
.slots { display: grid; grid-template-columns: repeat(7, minmax(0, var(--tile-min))); gap: var(--grid-gap); }
.slot { aspect-ratio: 1 / 1.1; border: 1px dashed #4a4034; background: var(--bg1); border-radius: clamp(6px, 9%, 12px); }
.lane { height: 0; border-top: 2px dashed var(--line); max-width: calc(7 * var(--tile-min)); }
.bp-lead { font-size: var(--fs-body); color: var(--ink); }
.bp-sub { font-size: var(--fs-label); color: var(--dim); }
:where(.vp-band) .mulligan .slots { grid-template-columns: repeat(4, minmax(0, var(--tile-min))); justify-content: center; }
:where(.vp-band) .mulligan .slot:nth-child(n + 5) { transform: translateX(calc(var(--tile-min) / 2 + var(--grid-gap) / 2)); }
:where(.vp-land) .bp-stage { padding-top: var(--sp-5); }
:where(.vp-land) .mulligan .slots { grid-template-columns: repeat(7, minmax(0, var(--tile-min))); }
:where(.vp-land) .mulligan .slot:nth-child(n + 5) { transform: none; }

.boot-error { padding: var(--sp-6) 0; color: var(--hot); }

:where(.vp-land) .sheet { width: min(540px, 64vw); }
:where(.vp-land) .sheet-body { display: grid; grid-template-columns: 168px minmax(0, 1fr); column-gap: var(--sp-4); align-items: start; }
:where(.vp-land) .sheet-side .sheet-full { width: 100%; }
:where(.vp-desk) .sheet-full { width: min(100%, 260px); }
:where(.vp-desk) :where(.tile).full { width: min(100%, 260px); }

:root { --deckcol: 320px; }
button.text-btn { background: none; border: 0; padding: 0; }
.text-btn.hot { color: var(--hot); }
.btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #111; font-weight: 700; }
.btn[aria-disabled="true"], .icon-btn[aria-disabled="true"] { opacity: .4; }

.main.is-deck { overflow: hidden; padding: 0; }
.main.is-deck > .deck-view { max-width: none; margin: 0; }
.deck-view { display: grid; grid-template-columns: minmax(0, 1fr) var(--deckcol); height: 100%; }
.pool-pane {
  min-width: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 0 var(--gutter) var(--sp-6);
}
.pool-pane > * { max-width: none; }
.pool-pane > .filters { max-width: none; }
.deck-pane {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--bg1); border-left: 1px solid var(--line);
  padding-right: env(safe-area-inset-right);
}
.deck-grab, .panel-close { display: none; }
.deckbar { display: none; }

.tile-wrap { position: relative; }
.qtys { position: absolute; top: -6px; left: -6px; z-index: 2; display: flex; align-items: center; gap: 3px; pointer-events: none; }
.qtys .qty {
  min-width: 22px; height: 22px; padding: 0 5px;
  border-radius: 11px; border: 2px solid var(--bg0);
  background: var(--gold); color: #111;
  font-size: 15px; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums;
}
.qtys .qty.hot { background: var(--hot); color: #fff; }
.qtys .qty.other { height: 20px; min-width: 20px; line-height: 18px; background: var(--bg1); border: 1px solid var(--dim); color: var(--ink); font-size: 13px; font-weight: 500; }
.qtys .qty.pulse { animation: qty-pulse 120ms ease-out; }
@keyframes qty-pulse { 50% { transform: scale(1.15); } }
.tile-dec {
  position: absolute; left: -4px; bottom: -4px; z-index: 2;
  width: 28px; height: 28px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgb(20 17 14 / .78); border: 1px solid rgb(244 239 230 / .25); color: var(--ink);
}
.tile-dec::before { content: ""; position: absolute; inset: -8px; }
.tile-dec:active { background: var(--bg1); }
.tile-peek {
  display: none; position: absolute; top: 4px; right: 4px; z-index: 2;
  width: 28px; height: 28px; padding: 0; align-items: center; justify-content: center;
  border: 0; border-radius: 6px; background: rgb(10 9 8 / .7); color: var(--ink);
}
.tile-peek::before { content: ""; position: absolute; inset: -6px; }
.tile-wrap:focus-within .tile-peek { display: flex; }
@media (hover: hover) { .tile-wrap:hover .tile-peek { display: flex; } }
@media (hover: none) { .tile-peek { display: flex; top: 34px; } }
.tile.prov { border: 1px dashed #4a4034; }
.tile:has(.qty.cur:not([hidden])) .band, .tile:has(.qty.other:not([hidden])) .band { padding-left: 22px; }
.noart { flex-direction: column; gap: 6px; }
.noart > .noart-name { font-size: var(--fs-meta); color: var(--ink); padding: 0 6px; text-align: center; line-height: 1.3; }

.zone-seg { height: 36px; }
.zone-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.zone-seg .zn { font-variant-numeric: tabular-nums; }
.zone-seg .zn.hot { color: var(--hot); }
.zone-seg.in-bar { width: 156px; flex: none; }
.zone-seg.head { flex: 1; }

.curve.mini { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; flex: none; }
.curve.mini i, .curve.big i { position: relative; display: block; background: var(--line); overflow: hidden; }
.curve.mini i { width: 4px; height: 14px; }
.curve.mini i::after, .curve.big i::after {
  content: ""; position: absolute; inset: 0; background: var(--gold);
  transform-origin: bottom; transform: scaleY(var(--v)); transition: transform 150ms ease-out;
}
.colors { display: flex; overflow: hidden; background: var(--line); }
.colors.mini { width: 48px; height: 4px; border-radius: 2px; flex: none; }
.colors.wide { height: 6px; border-radius: 3px; margin: 2px 0 4px; }
.warn-n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--hot); color: #fff; font-size: 11px; font-weight: 700;
}

.deck-head { position: relative; display: flex; align-items: center; gap: var(--sp-2); height: 52px; padding: 0 var(--sp-2); flex: none; }
.deck-menu {
  position: absolute; top: 48px; right: 8px; z-index: 6;
  width: 200px; padding: 4px 0;
  background: var(--bg2); border-radius: 8px; box-shadow: 0 8px 24px #000a;
  animation: pop 100ms ease-out;
}
@keyframes pop { from { opacity: 0; transform: scale(.98); } }
.menu-item {
  display: block; width: 100%; height: 44px; padding: 0 var(--sp-4);
  background: none; border: 0; text-align: left; font-size: var(--fs-label); color: var(--ink);
}
.menu-item.hot { color: var(--hot); }
.menu-item:active { background: var(--bg1); }
.deck-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.deck-actions { display: none; }
@media (hover: hover) {
  :where(.vp-desk) .deck-actions { display: flex; gap: var(--sp-4); padding: 0 var(--sp-3); margin-top: -8px; flex: none; }
}

.deck-strip {
  display: flex; align-items: center; gap: var(--sp-3);
  width: 100%; height: 32px; padding: 0 var(--sp-3); flex: none;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  color: var(--dim); font-size: var(--fs-meta);
}
.deck-strip .lands b { color: var(--ink); font-weight: 500; }
.deck-strip .chev { margin-left: auto; display: flex; }
.deck-stats {
  display: grid; gap: var(--sp-3); padding: var(--sp-3); flex: none;
  border-bottom: 1px solid var(--line);
  animation: fade 100ms ease-out;
  max-height: 55%; overflow-y: auto; overscroll-behavior: contain;
}
.deck-stats h3, .deck-stats h4 { font-size: var(--fs-meta); font-weight: 500; color: var(--dim); margin-bottom: 6px; }
.curve.big { display: flex; align-items: flex-end; gap: 8px; }
.cv { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 14px; }
.cv i { width: 14px; height: 40px; }
.cv-n { font-size: var(--fs-meta); color: var(--ink); min-height: 1.3em; line-height: 1.3; }
.cv-k { font-size: var(--fs-meta); color: var(--dim); line-height: 1.3; }
.st-note { font-size: var(--fs-meta); color: var(--dim); }
.st-note b, .st-line b { color: var(--ink); font-weight: 700; }
.st-line { font-size: var(--fs-label); color: var(--dim); }
.warn-line { font-size: var(--fs-label); color: var(--hot); line-height: 1.5; }

.deck-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: var(--sp-4); -webkit-overflow-scrolling: touch; }
.deck-list.fade-in { animation: fade 100ms ease-out; }
.deck-group-h {
  position: sticky; top: 0; z-index: 1;
  display: flex; justify-content: space-between;
  padding: 12px 12px 4px; background: var(--bg1);
  font-size: var(--fs-meta); font-weight: 500; color: var(--dim);
}
.deck-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; column-gap: 8px;
  height: 40px; padding: 0 12px;
}
.deck-row:has(.row-name:active) { background: var(--bg2); }
.row-qty { font-size: 15px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.row-qty.hot { color: var(--hot); }
.row-name {
  height: 100%; padding: 0; background: none; border: 0; text-align: left;
  font-size: var(--fs-label); font-weight: 500; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tag.prov { color: var(--gold); }
.row-cost { display: flex; align-items: center; }
.pip.sm { width: 14px; height: 14px; font-size: 9px; vertical-align: -2px; }
.pip.sm + .pip.sm { margin-left: 1px; }
.pill {
  display: inline-flex; align-items: stretch; width: 64px; height: 32px;
  background: var(--bg2); border: 1px solid #3a3228; border-radius: 999px;
}
.pill > :first-child { border-radius: 999px 0 0 999px; }
.pill > :last-child { border-radius: 0 999px 999px 0; }
.pill button {
  position: relative; flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 0; background: transparent; border: 0; color: var(--ink);
  transition: background-color 80ms ease-out;
}
.pill button::before { content: ""; position: absolute; inset: -4px 0; }
.pill button + button, .pill .pill-n + button { border-left: 1px solid var(--line); }
.pill button:active { background: var(--bg1); }
.pill.wide { width: 96px; }
@media (pointer: coarse) { .pill { width: 76px; } .pill.wide { width: 108px; } }
.pill-n {
  width: 32px; flex: none; display: flex; align-items: center; justify-content: center;
  border-left: 1px solid var(--line); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.deck-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: var(--sp-4) var(--sp-3); }
.add-prov { padding: 0 12px; }

.sheet-qty { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.sq { display: flex; align-items: center; gap: var(--sp-2); }
.sq-k { font-size: var(--fs-label); color: var(--dim); }

.iopanel {
  position: fixed; z-index: var(--z-io-panel); top: var(--vvt, 0px); right: 0; bottom: auto; height: var(--vvh, 100dvh);
  width: min(440px, 60vw);
  display: flex; flex-direction: column;
  background: var(--bg1); border-left: 1px solid var(--line);
  overflow: hidden;
  transform: translateX(100%); transition: transform 120ms ease-in;
  box-shadow: -8px 0 24px #000a;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 0;
}
.iopanel.is-in { transform: none; transition: transform 150ms var(--ease-sheet); }
.io-head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-2) var(--sp-2) 0 var(--sp-4); }
.io-head h2 { font-size: var(--fs-title); font-weight: 700; }
.io-body { display: flex; flex-direction: column; gap: var(--sp-3); padding: 0 var(--sp-4); flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.io-text {
  width: 100%; height: 200px; resize: vertical;
  padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  font: 13px / 1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--ink);
  user-select: text; -webkit-user-select: text;
}
.io-text:focus-visible { outline: 2px solid var(--trig); outline-offset: 0; }
.io-note { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.io-note p { font-size: var(--fs-label); color: var(--dim); }
.io-result { display: flex; flex-direction: column; gap: var(--sp-3); }
.io-summary { font-size: var(--fs-label); color: var(--dim); }
.io-h { font-size: var(--fs-meta); font-weight: 500; color: var(--dim); }
.unread-row { display: flex; flex-direction: column; gap: var(--sp-2); padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.unread-line { font: 13px / 1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--ink); word-break: break-all; }
.unread-seg { height: 32px; }
.unread-seg.is-off { opacity: .4; }
.io-limit { font-size: var(--fs-meta); color: var(--hot); }
.io-failure { display: flex; align-items: center; gap: 8px; }
.io-failure .ico { flex: none; }
.io-foot {
  position: sticky; bottom: 0; margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) 0 max(var(--sp-3), env(safe-area-inset-bottom));
  background: var(--bg1);
}
.prov-form { display: grid; gap: var(--sp-2); }
.pf-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-2); }
.pf-row > span:first-child { font-size: var(--fs-label); color: var(--dim); }
.pf-row input {
  height: 40px; min-width: 0; padding: 0 10px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  font-size: 16px; color: var(--ink); user-select: text; -webkit-user-select: text;
}
.pf-row input.pf-cost { width: 140px; }
.pf-pips { display: flex; }

.toast {
  position: fixed; z-index: var(--z-toast);
  left: calc(var(--rail) + (100vw - var(--rail) - var(--deckcol)) / 2); bottom: 16px;
  display: flex; align-items: center; gap: var(--sp-3);
  height: 44px; padding: 0 14px;
  background: var(--bg2); border: 1px solid #3a3228; border-radius: 8px; box-shadow: 0 8px 24px #000a;
  font-size: var(--fs-label); white-space: nowrap;
  opacity: 0; transform: translate(-50%, 8px);
  transition: opacity 120ms ease-in, transform 120ms ease-in;
}
.toast.is-in { opacity: 1; transform: translate(-50%, 0); transition: opacity 150ms ease-out, transform 150ms ease-out; }
body:not(.route-deck) .toast { left: calc(var(--rail) + (100vw - var(--rail)) / 2); }
/*! 070 Toast stack (MIT, 2026, Seokwoooo, https://lucianlabs.dev/uxui-prompt/#070)。前の 2 枚まで後ろに薄く重ね、前は横に払える */
#toast { touch-action: pan-y; }
.toast.is-back { pointer-events: none; }
.toast.is-back.depth-1 { opacity: .55; transform: translate(-50%, var(--lift, -8px)) scale(.94); transform-origin: 50% 0; }
.toast.is-back.depth-2 { opacity: .3; transform: translate(-50%, var(--lift, -16px)) scale(.88); transform-origin: 50% 0; }
.toast.is-out-l { transform: translate(calc(-50% - 120px), 0); }
.toast.is-out-r { transform: translate(calc(-50% + 120px), 0); }

:where(.vp-desk-mid) body.route-deck .app { grid-template-columns: var(--rail) minmax(0, 1fr); grid-template-areas: "nav offline" "nav main"; }
:where(.vp-desk-mid) body.route-deck .sheet {
  position: fixed; z-index: var(--z-sheet); top: 0; right: 0; bottom: 0;
  transform: translateX(100%); transition: transform 120ms ease-in;
  box-shadow: -8px 0 24px #000a;
}
:where(.vp-desk-mid) body.route-deck .sheet.is-in { transform: none; transition: transform 150ms var(--ease-sheet); }
:where(.vp-desk-mid) body.route-deck .scrim {
  display: block; position: fixed; inset: 0; z-index: var(--z-scrim);
  background: rgb(10 8 6 / .55); opacity: 0; transition: opacity 120ms ease-in;
}
:where(.vp-desk-mid) body.route-deck .scrim.is-in { opacity: 1; }
:where(.vp-desk) .scrim:not(.is-in) { pointer-events: none; }
:where(.vp-desk-wider) .scrim { display: block; position: fixed; inset: 0; z-index: var(--z-scrim); background: rgb(10 8 6 / .55); opacity: 0; pointer-events: none; transition: opacity 120ms ease-in; }
:where(.vp-desk-wider) .scrim.is-in { opacity: 1; pointer-events: auto; }
:where(.vp-desk-wider) body.sheet-open:not(:has(.iopanel.is-in)) .scrim { opacity: 0; pointer-events: none; }
:where(.vp-desk-mid) body:has(#iopanel:not([hidden])) .scrim { display: block; position: fixed; inset: 0; z-index: var(--z-scrim); background: rgb(10 8 6 / .55); opacity: 0; transition: opacity 120ms ease-in; }
:where(.vp-desk-mid) body:has(#iopanel:not([hidden])) .scrim.is-in { opacity: 1; pointer-events: auto; }

:root:where(.vp-land) { --deckcol: 280px; }
:where(.vp-land) .pool-pane { padding: 0 var(--sp-3) var(--sp-5) var(--gutter); }
:where(.vp-land) .pool-pane .filters { flex-wrap: wrap; margin-right: calc(-1 * var(--sp-3)); padding-right: var(--sp-3); }
:where(.vp-land) .pool-pane .chips { width: 100%; overflow-x: auto; scrollbar-width: none; }
:where(.vp-land) .pool-pane .search { flex: 1; width: auto; }
:where(.vp-land) .pool-pane .sort { margin-left: 0; }
:where(.vp-land) .deck-head { height: 44px; }
:where(.vp-land) .io-text { height: 120px; }
:where(.vp-land) .pool-pane .chips { mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent); padding-right: 20px; }
:where(.vp-land) .zone-seg.head { height: 32px; }
:where(.vp-land) .deck-row { height: 36px; grid-template-columns: 24px minmax(0, 1fr) auto auto; }
:where(.vp-land) .pill { height: 32px; }
:where(.vp-land) .pill button::before { inset: -2px 0; }
:where(.vp-land) .toast { bottom: 12px; }

:where(.vp-band) .app { grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-areas: "header" "offline" "main" "deckbar"; }
:where(.vp-band) .deck-view { grid-template-columns: minmax(0, 1fr); }
:where(.vp-band) .pool-pane { padding: 0 max(var(--gutter), env(safe-area-inset-right)) var(--sp-4) max(var(--gutter), env(safe-area-inset-left)); }
:where(.vp-band) .pool-pane .chips { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; max-width: 100%; }
:where(.vp-band) .pool-pane .chips { width: 100%; }
:where(.vp-band) .pool-pane .search { order: 2; flex: 1 1 0; min-width: 0; width: auto; }
:where(.vp-band) .pool-pane .sort { order: 3; margin-left: 0; }
:where(.vp-band) .deckbar {
  grid-area: deckbar; display: flex; align-items: center; gap: var(--sp-2);
  height: calc(48px + env(safe-area-inset-bottom)); padding: 0 max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-left));
  background: var(--bg1); border-top: 1px solid var(--line);
}
:where(.vp-band) .deckbar .curve.mini { margin-left: auto; }
:where(.vp-band) .deckbar-open { position: relative; }
:where(.vp-band) .deckbar-open .dot { position: absolute; top: 9px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--hot); }
:where(.vp-band) .deck-pane {
  position: fixed; z-index: var(--z-deck-pane); left: 0; right: 0; bottom: 0;
  height: 92dvh; border-left: 0; border-radius: 14px 14px 0 0;
  box-shadow: 0 -8px 24px #000a;
  transform: translateY(100%); visibility: hidden;
  transition: transform 120ms ease-in, visibility 0s linear 120ms;
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
:where(.vp-band) .deck-pane.is-open { transform: none; visibility: visible; transition: transform 150ms var(--ease-sheet); }
:where(.vp-band) .deck-grab { display: block; position: relative; height: 16px; flex: none; touch-action: none; }
:where(.vp-band) .deck-grab::after { content: ""; position: absolute; left: 50%; top: 6px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--muted); }
:where(.vp-band) .deck-head { height: 48px; }
:where(.vp-band) .deck-head .undo-btn { display: none; }
:where(.vp-band) .panel-close { display: inline-flex; }
:where(.vp-band) .iopanel {
  top: calc(var(--vvt, 0px) + var(--vvh, 100dvh) - min(92dvh, var(--vvh, 100dvh))); left: 0; width: auto; height: min(92dvh, var(--vvh, 100dvh));
  border-left: 0; border-radius: 14px 14px 0 0;
  transform: translateY(100%); box-shadow: 0 -8px 24px #000a;
  padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
:where(.vp-band) .iopanel.stops { top: auto; bottom: calc(100dvh - var(--vvt, 0px) - var(--vvh, 100dvh)); max-height: var(--vvh, 100dvh); height: auto; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
:where(.vp-band) .io-text { height: 36dvh; }
:where(.vp-band) .iopanel.export .io-text { height: auto; flex: 1; min-height: 40dvh; }
:where(.vp-band) .io-note { flex-wrap: wrap; justify-content: flex-end; }
:where(.vp-band) .io-note p { flex: 1 1 100%; }
:where(.vp-band) .pool-pane .chips { margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent); }
:where(.vp-band) .toast, :where(.vp-band) body:not(.route-deck) .toast {
  left: 50%; bottom: calc(56px + 8px + env(safe-area-inset-bottom));
  width: max-content; max-width: calc(100vw - 2 * var(--gutter)); height: auto; min-height: 44px; padding: 6px 14px;
}
:where(.vp-band) .toast span { min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
:where(.vp-band) .toast .text-btn { flex: none; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  body:not([data-motion="on"]) *, body:not([data-motion="on"]) *::before, body:not([data-motion="on"]) *::after { animation-duration: 0ms !important; transition-duration: 0ms !important; }
}
body[data-motion="off"] *, body[data-motion="off"] *::before, body[data-motion="off"] *::after { animation: none !important; transition: none !important; }
.sheet:focus, .iopanel:focus { outline: none; }
/*! 008 Copy to check (MIT, 2026, Seokwoooo, https://lucianlabs.dev/uxui-prompt/#008)
   写したら印がチェックに描き変わる。色はこの画面の --ok、影は付けない。
   Copyright (c) 2026 Seokwoooo. Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
   including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
   conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
   portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
   INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
   ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
   DEALINGS IN THE SOFTWARE. */
.copy-ico { position: relative; display: inline-grid; width: 18px; height: 18px; flex: none; }
.copy-ico .ico { grid-area: 1 / 1; transition: opacity 200ms var(--ease-sheet), transform 200ms var(--ease-sheet); }
.copy-ico .ico + .ico { opacity: 0; transform: scale(.4) rotate(-30deg); }
.copy-ico .ico + .ico path { stroke-width: 2.4; stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset 300ms var(--ease-sheet) 80ms; }
.btn.is-copied { background: var(--ok); border-color: var(--ok); transition: background-color 200ms var(--ease-sheet), border-color 200ms var(--ease-sheet); }
.btn.is-copied .copy-ico .ico:first-child { opacity: 0; transform: scale(.4) rotate(30deg); }
.btn.is-copied .copy-ico .ico + .ico { opacity: 1; transform: none; }
.btn.is-copied .copy-ico .ico + .ico path { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { body:not([data-motion="on"]) .copy-ico .ico + .ico path { transition-delay: 0ms; } }
.io-text { flex: none; }
:where(.vp-band) .iopanel.export .io-text { flex: 1 1 auto; }

.fbtn {
  position: relative; flex: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; min-width: 44px; padding: 0 10px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; color: var(--ink);
  font-size: var(--fs-label); font-weight: 500;
}
.fbtn.is-on { background: var(--gold); border-color: var(--gold); color: #111; }
.fbtn-label { display: none; }
.fbtn-n {
  position: absolute; top: -6px; right: -6px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: #111; color: var(--gold); font-size: 11px; font-weight: 700; line-height: 16px; text-align: center;
}
.fscrim, .fgrab { display: none; }

.fpanel {
  position: absolute; z-index: var(--z-filter-panel); top: calc(100% + 4px); left: var(--gutter);
  width: min(400px, calc(100% - 2 * var(--gutter)));
  max-height: calc(100dvh - 120px); overflow-y: auto; overscroll-behavior: contain;
  display: grid; gap: var(--sp-3); padding: var(--sp-4);
  background: var(--bg2); border-radius: 8px; box-shadow: 0 8px 24px #000a;
  animation: pop 100ms ease-out;
}
.fgroup { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; column-gap: var(--sp-3); }
.fgroup h3 { font-size: var(--fs-meta); font-weight: 500; color: var(--dim); padding-top: 8px; }
.fitems { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.fpanel .chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #111; }
.fpanel .chip[aria-pressed="true"] .chip-n { color: #111; }
.fpanel .chip:disabled, .fcolor:disabled { opacity: .4; pointer-events: none; }
.fcolor {
  position: relative; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  background: none; opacity: .5; transition: opacity 120ms ease-out;
}
.fcolor::before { content: ""; position: absolute; inset: -6px; }
.fcolor .pip { width: 32px; height: 32px; font-size: 15px; vertical-align: 0; }
.fcolor[aria-pressed="true"] { opacity: 1; outline: 2px solid var(--gold); outline-offset: 2px; }
.fcolor:focus-visible { outline: 2px solid var(--trig); outline-offset: 2px; }
.ffoot { display: flex; justify-content: flex-end; }
.fclear[aria-disabled="true"] { opacity: .4; }
.fclear-inline { margin-left: var(--sp-2); min-height: 0; align-self: center; }

:where(.vp-desk) .fbtn { margin-left: auto; }
:where(.vp-desk) .fbtn-label { display: inline; }
:where(.vp-desk) .filters .fbtn ~ .sort { margin-left: 0; }
:where(.vp-desk) .filters:has(.fpanel) { flex-wrap: wrap; }
:where(.vp-desk) .fpanel {
  position: static; order: 10; flex: 1 1 100%; width: auto; max-height: none; overflow: visible;
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-2) var(--sp-5);
  padding: var(--sp-2) 0 var(--sp-1); background: none; box-shadow: none; border-radius: 0;
  animation: fade 100ms ease-out;
}
:where(.vp-desk) .fpanel .fgroup { grid-template-columns: auto auto; }
:where(.vp-desk) .ffoot { margin-left: auto; }

:where(.vp-land) .pool-pane .fbtn { order: 1; margin-left: 0; }
:where(.vp-land) .pool-pane .search { order: 2; }
:where(.vp-land) .pool-pane .sort { order: 3; }
:where(.vp-land) .fbtn-label { display: none; }

:where(.vp-band) .pool-pane .fbtn { order: 1; width: 44px; margin-left: 0; }
:where(.vp-band) .fbtn-label { display: none; }
:where(.vp-band) .fscrim { display: block; position: fixed; inset: 0; z-index: var(--z-filter-scrim); background: rgb(10 8 6 / .55); }
:where(.vp-band) .fpanel {
  position: fixed; z-index: var(--z-filter-panel-up); top: auto; left: 0; right: 0; bottom: 0; width: auto;
  max-height: 80dvh; border-radius: 14px 14px 0 0; background: var(--bg1);
  padding: 0 max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-shadow: 0 -8px 24px #000a; animation: sheet-up 150ms var(--ease-sheet);
}
:where(.vp-band) .fgrab { display: block; height: 16px; position: relative; }
:where(.vp-band) .fgrab::after { content: ""; position: absolute; left: 50%; top: 6px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--muted); }
:where(.vp-band) .fgroup { grid-template-columns: 1fr; row-gap: 6px; }
:where(.vp-band) .fgroup h3 { padding-top: 0; }
@keyframes sheet-up { from { transform: translateY(100%); } }

.tile-shift { display: none; }
@media (hover: hover) {
  .tile-wrap:hover .tile-shift {
    display: block; position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); z-index: 2;
    padding: 1px 6px; border-radius: 4px; background: rgb(10 9 8 / .75);
    font-size: 10px; color: var(--ink); white-space: nowrap; pointer-events: none;
  }
}

:root { --tile-l: 176px; }
.grid.fade-in { animation: fade 100ms ease-out; }

.icon-seg { height: 36px; flex: none; }
.icon-seg button { width: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; }

.pool-pane .grid { grid-template-columns: repeat(auto-fill, minmax(var(--ptile, var(--tile-min)), 1fr)); }
body[data-size="s"] { --ptile: 104px; }
body[data-size="l"] { --ptile: 176px; }
body[data-size="full"] { --ptile: 160px; }

.tile.full { aspect-ratio: 488 / 680; border: 0; border-radius: 4.5% / 3.2%; background: var(--card-bg); }
.tile.full.prov { border: 1px dashed #4a4034; }
.tile.full.is-open { outline: 2px solid var(--gold); outline-offset: 2px; }
.tile-name { font-size: var(--fs-meta); color: var(--dim); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.full-row { display: flex; align-items: center; gap: 6px; min-height: 28px; }
.full-row .qtys { position: static; flex: none; }
.full-row .qtys:not(:has(.qty:not([hidden]))) { display: none; }
.full-row .tile-dec { position: relative; inset: auto; flex: none; margin-left: auto; }

.deck-head { container: deckhead / inline-size; }
.head-actions { display: none; }
.deck-menu-btn { margin-left: auto; }
@container deckhead (min-width: 480px) {
  .zone-seg.head { flex: 0 1 220px; }
}
@container deckhead (min-width: 600px) {
  .head-actions { display: flex; gap: var(--sp-4); margin-left: var(--sp-2); }
}
.menu-seg .seg { height: 36px; }
.menu-seg .icon-seg button { flex: 1; width: auto; }

.deck-cards {
  --dtile: 140px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--dtile), 1fr));
  gap: 12px 8px; padding: 8px 12px 4px;
}
.deck-cards li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.deck-list.view-piles { display: flex; flex-direction: column; overflow: auto; padding-bottom: 0; }
.deck-list.view-piles > .add-prov { flex: none; position: sticky; left: 12px; align-self: flex-start; max-width: calc(100% - 24px); white-space: normal; }
.deck-list.view-piles > .deck-tokens { flex: none; position: sticky; left: 0; align-self: flex-start; max-width: 100%; }
.deck-list.view-piles > .piles { flex: none; width: max-content; min-width: 100%; overflow: visible; overscroll-behavior: auto; scroll-snap-type: none; }
.piles {
  flex: 1; min-height: 0;
  display: flex; align-items: flex-start; gap: 8px;
  overflow: auto; overscroll-behavior: contain; scroll-snap-type: x proximity;
  padding: 0 12px 24px;
}
.pile-land { margin-left: 4px; padding-left: 12px; border-left: 1px solid var(--line); }
.pile-h {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 4px; padding: 10px 0 6px; background: var(--bg1);
  font-size: var(--fs-meta); font-weight: 500; color: var(--dim);
}
.pile-n { font-variant-numeric: tabular-nums; }
.pile-card.is-open { z-index: 2; margin-bottom: 4px; }
.pile-tile { width: 100%; }
.pile-card .pill.wide { display: flex; width: 100%; margin-top: 6px; }
@media (hover: hover) {
  .pile-card:hover { z-index: 3; }
}

.splitter { display: none; }
.deck-view.place-bottom {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 8px max(160px, min(var(--deckh, 45%), 70%));
}
:where(.vp-rail) .deck-view.place-bottom:has(.deck-list.view-piles) {
  grid-template-rows: minmax(0, 1fr) 8px max(160px, min(var(--deckh, 55%), 70%));
}
.place-bottom .splitter { display: block; position: relative; background: var(--bg1); cursor: row-resize; touch-action: none; }
.place-bottom .splitter::before { content: ""; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; }
.place-bottom .splitter::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); }
.place-bottom .splitter.is-drag::after { background: var(--dim); }
@media (hover: hover) { .place-bottom .splitter:hover::after { background: var(--dim); } }
.place-bottom .deck-pane { border-left: 0; min-width: 0; }
.place-bottom .deck-actions { display: none !important; }
.place-bottom .deck-cols { columns: 300px; column-gap: 24px; }
.place-bottom .deck-cols .deck-group-h { position: static; break-after: avoid; }
.place-bottom .deck-cols .deck-row { break-inside: avoid; }
.place-bottom .deck-cols:has(.deck-cards) { columns: auto; }
body.route-deck.place-bottom .toast { left: calc(var(--rail) + (100vw - var(--rail)) / 2); }

:root:where(.vp-desk-huge) { --deckcol: 400px; }

:root:where(.vp-band) { --tile-l: 160px; }
:where(.vp-band) body[data-size="s"] { --ptile: 80px; }
:where(.vp-band) body[data-size="l"] { --ptile: 160px; }
:where(.vp-band) body[data-size="full"] { --ptile: 160px; }
:where(.vp-band) .menu-place, :where(.vp-band) .menu-seg-hr { display: none !important; }
:where(.vp-band) .deck-view.place-bottom { grid-template-rows: none; }
:where(.vp-band) .place-bottom .splitter { display: none; }
:where(.vp-band) .place-bottom .deck-cols { columns: auto; }
:where(.vp-band) .place-bottom .deck-cols .deck-group-h { position: sticky; }
:where(.vp-band) body.route-deck.place-bottom .toast { left: 50%; }

:root:where(.vp-land) { --tile-l: 140px; }
:where(.vp-land) body[data-size="s"] { --ptile: 88px; }
:where(.vp-land) body[data-size="l"] { --ptile: 140px; }
:where(.vp-land) body[data-size="full"] { --ptile: 132px; }
:where(.vp-land) .pool-pane .size-seg { order: 4; }
:where(.vp-land) .deck-view.place-bottom { grid-template-rows: minmax(0, 1fr) 1px 60%; }
:where(.vp-land) .place-bottom .splitter { cursor: default; background: var(--line); }
:where(.vp-land) .place-bottom .splitter::before, :where(.vp-land) .place-bottom .splitter::after { display: none; }

:where(.vp-pc-width) .pool-pane .filters { flex-wrap: wrap; row-gap: var(--sp-2); }
:where(.vp-pc-width) .pool-pane .search { flex: 0 1 240px; min-width: 160px; }
.deck-list .add-prov { margin: 4px 12px 0; }
:where(.vp-land) .place-bottom .pool-pane .filters { position: static; }
:where(.vp-land) .place-bottom .pool-title { display: none; }



body[data-size="s"] .pool-pane .band, body[data-dsize="s"] .deck-cards .band { font-size: 10px; }
body[data-size="s"] .pool-pane .band-cost, body[data-dsize="s"] .deck-pane .band-cost { display: none; }
body[data-size="s"] .pool-pane .pt, body[data-dsize="s"] .deck-cards .pt { font-size: 13px; min-width: 30px; padding: 0 4px; }
body[data-size="l"] .pool-pane .band, body[data-dsize="l"] .deck-cards .band { font-size: 13px; }
body[data-size="l"] .pool-pane .pip.xs, body[data-dsize="l"] .deck-cards .pip.xs { width: 15px; height: 15px; font-size: 10px; }
body[data-size="l"] .pool-pane .pt, body[data-dsize="l"] .deck-cards .pt { font-size: 17px; }
body[data-size="l"] .pool-pane .pt.pt-m, body[data-dsize="l"] .deck-cards .pt.pt-m { font-size: 19px; }
body[data-size="l"] .pool-pane .pt.pt-l, body[data-dsize="l"] .deck-cards .pt.pt-l { font-size: 21px; }

.deck-pane { --pcol: 112px; --pstep: 24px; }
body[data-dsize="s"] .deck-pane { --pcol: 88px; --pstep: 22px; }
body[data-dsize="l"] .deck-pane { --pcol: 144px; --pstep: 26px; }
.deck-view:not(.place-bottom) .deck-pane { --dtile: 140px; }
body[data-dsize="s"] .deck-view:not(.place-bottom) .deck-pane { --dtile: 92px; }
body[data-dsize="l"] .deck-view:not(.place-bottom) .deck-pane { --dtile: 296px; }
.deck-view.place-bottom .deck-pane { --dtile: 132px; }
body[data-dsize="s"] .deck-view.place-bottom .deck-pane { --dtile: 104px; }
body[data-dsize="l"] .deck-view.place-bottom .deck-pane { --dtile: 176px; }
.deck-cards { --dtile: inherit; }
:where(.vp-desk-huge) .deck-view:not(.place-bottom) .deck-pane { --dtile: 180px; }
:where(.vp-desk-huge) body[data-dsize="s"] .deck-view:not(.place-bottom) .deck-pane { --dtile: 116px; }
:where(.vp-desk-huge) body[data-dsize="l"] .deck-view:not(.place-bottom) .deck-pane { --dtile: 368px; }

.deck-menu { width: 224px; max-height: calc(100dvh - 56px); overflow-y: auto; overscroll-behavior: contain; }
.menu-seg { padding: 6px 12px; }
.dsize-seg button[aria-disabled="true"] { opacity: .4; cursor: default; }
.menu-row {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; padding: 6px 12px;
  font-size: var(--fs-meta); color: var(--dim);
}
.menu-row .sort { margin-left: 0; }
.menu-row select { width: 100%; }
.pile-reset { margin-left: auto; min-height: 44px; }
.pile-reset + .deck-menu-btn { margin-left: 0; }

.piles { gap: 0; touch-action: pan-x pan-y; }
.piles .pile { flex: 0 0 var(--pcol); width: var(--pcol); min-width: 0; max-width: none; position: relative; }
.pile-gap { flex: 0 0 8px; align-self: stretch; min-height: 140px; position: relative; }
.piles.is-dragging { scroll-snap-type: none; overflow-anchor: none; }
.pile-gap.is-over::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--gold); }
.pile-land { margin-left: 0; }
.piles .pile-card { position: relative; height: var(--pstep); flex: none; }
.piles .pile-card:last-of-type, .piles .pile-card.is-open { height: auto; }
.piles .pile-card.is-open { z-index: 2; margin-bottom: 4px; }
.piles .pile-tile { width: 100%; }
.piles .pile-tile .band { padding: 4px 6px 5px; line-height: 15px; font-size: 11px; }
body[data-dsize="s"] .piles .pile-tile .band { font-size: 10px; }
body[data-dsize="l"] .piles .pile-tile .band { font-size: 12px; }
.piles .band.hot .band-name { color: var(--hot); }
.piles .pile-tile .pip.xs { width: 13px; height: 13px; font-size: 8.5px; }
.piles .pile-tile .pt { font-size: 13px; min-width: 30px; padding: 0 4px; right: -2px; bottom: -2px; }
.piles .pile-card.is-lifted { z-index: 4; }
.piles .pile-card.is-lifted .pile-tile { transform: scale(1.04); box-shadow: 0 8px 24px #000a; transition: transform 120ms ease-out, box-shadow 120ms ease-out; }
.piles .pile-card.is-ghosted { opacity: .3; }
.piles.is-dragging .pile-card:hover { z-index: auto; }
.piles.is-dragging .pile-tile { transform: none; }
.piles.is-selecting .pile-card:hover { z-index: auto; }
.pile-selected-face { position: absolute; inset: 0 0 auto; border: 2px solid var(--gold); background: #d8b45a14; pointer-events: none; z-index: 1; color: var(--gold); font-size: 11px; line-height: 14px; padding-left: 2px; overflow: hidden; }
.pile-marquee { position: fixed; z-index: var(--z-pile-marquee); border: 1px solid var(--gold); background: #d8b45a14; pointer-events: none; }
.pile-selection-count { position: fixed; z-index: var(--z-pile-count); padding: 2px 6px; background: var(--bg2); border: 1px solid var(--gold); border-radius: 4px; color: var(--gold); font-size: 11px; pointer-events: none; }
.pile-drag-count { position: absolute; right: 2px; top: 2px; padding: 2px 5px; background: var(--bg2); color: var(--gold); border: 1px solid var(--gold); border-radius: 4px; font-size: 11px; }
.drop-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--gold); z-index: 6; pointer-events: none; }
.pile-ghost { position: fixed; left: 0; top: 0; z-index: var(--z-pile-ghost); pointer-events: none; opacity: .9; }
.pile-ghost .piles { display: block; overflow: visible; padding: 0; }
.pile-ghost .pile-card { height: auto; }
.pile-ghost .pile-tile { box-shadow: 0 8px 24px #000a; }

:where(.vp-band) .deck-pane { --pcol: 88px; }
:where(.vp-band) body[data-dsize="s"] .deck-pane { --pcol: 72px; }
:where(.vp-band) body[data-dsize="l"] .deck-pane { --pcol: 108px; }
:where(.vp-band) .deck-view:not(.place-bottom) .deck-pane, :where(.vp-band) .deck-view.place-bottom .deck-pane { --dtile: 104px; }
:where(.vp-band) body[data-dsize="s"] .deck-view:not(.place-bottom) .deck-pane, :where(.vp-band) body[data-dsize="s"] .deck-view.place-bottom .deck-pane { --dtile: 80px; }
:where(.vp-band) body[data-dsize="l"] .deck-view:not(.place-bottom) .deck-pane, :where(.vp-band) body[data-dsize="l"] .deck-view.place-bottom .deck-pane { --dtile: 160px; }

:where(.vp-land) .deck-pane { --pcol: 88px; }
:where(.vp-land) body[data-dsize="s"] .deck-pane { --pcol: 72px; }
:where(.vp-land) body[data-dsize="l"] .deck-pane { --pcol: 108px; }
:where(.vp-land) .deck-view:not(.place-bottom) .deck-pane { --dtile: 124px; }
:where(.vp-land) body[data-dsize="s"] .deck-view:not(.place-bottom) .deck-pane { --dtile: 80px; }
:where(.vp-land) body[data-dsize="l"] .deck-view:not(.place-bottom) .deck-pane { --dtile: 256px; }
:where(.vp-land) .deck-view.place-bottom .deck-pane { --dtile: 104px; }
:where(.vp-land) body[data-dsize="s"] .deck-view.place-bottom .deck-pane { --dtile: 88px; }
:where(.vp-land) body[data-dsize="l"] .deck-view.place-bottom .deck-pane { --dtile: 140px; }
:where(.vp-land) .menu-seg .seg, :where(.vp-land) .menu-row select { height: 32px; }
@media (prefers-reduced-motion: reduce) {
  .piles .pile-card.is-lifted .pile-tile { transform: none; }
}

:where(.vp-band) .pool-pane .search { order: 0; flex: 1 1 100%; }
:where(.vp-band) .pool-pane .fbtn { order: 1; }
:where(.vp-band) .pool-pane .sort { order: 2; }
:where(.vp-band) .pool-pane .size-seg { order: 3; margin-left: auto; }
:where(.vp-land) .pool-pane .filters { flex-wrap: nowrap; }
:where(.vp-land) .pool-pane .size-seg { height: 36px; }
:where(.vp-land) .pool-pane .search { min-width: 0; flex: 1 1 0; }
:where(.vp-land) .pool-pane .size-seg button { width: 34px; }

.tile img { pointer-events: none; -webkit-user-drag: none; user-drag: none; -webkit-touch-callout: none; }
.tile, .piles { -webkit-touch-callout: none; -webkit-user-drag: none; }

.deck-grab { height: 24px; }
.deck-grab::after { top: 10px; }
.deck-grab::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; bottom: 0; }
:where(.vp-band) .sheet-grab { height: 40px; margin-bottom: -40px; margin-right: 56px; }
:where(.vp-band) .sheet-grab::after { top: 8px; left: calc(50% + 28px); }

.tile { border: 0; }
.tile.prov { border: 1px dashed #4a4034; }
.tile.is-open { outline: 2px solid var(--gold); outline-offset: 2px; }
.piles .pile-tile .pt { right: 3px; bottom: 3px; }

.band { background: linear-gradient(rgb(0 0 0 / .45), rgb(0 0 0 / 0)); }

.pile-h { z-index: var(--z-pile-head-sticky); white-space: nowrap; min-width: 0; height: 32px; align-items: center; padding: 0; margin-bottom: 4px; box-shadow: 0 4px 0 var(--bg1); }
.pile-k { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 3px; }
.pile-n { flex: none; }

.ico-wrap { position: relative; display: inline-flex; }
.sync-dot {
  position: absolute; top: -1px; right: -1px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--dim); border: 2px solid var(--bg1); box-sizing: content-box; transform: translate(3px, -3px);
  opacity: 0; transition: opacity 100ms ease-out; pointer-events: none;
}
#header .sync-dot { border-color: var(--bg0); }
.sync-dot.is-on { opacity: 1; }
.sync-dot.is-hot { background: var(--hot); }
.sync-state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }
.sync-state .sd { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); flex: none; }
.sync-state .sd.ok { background: var(--ok); }
.sync-state .sd.hot { background: var(--hot); }
.sync-time { color: var(--dim); font-variant-numeric: tabular-nums; }
.sync-prev { margin-top: 8px; font-size: 13px; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .sync-dot { transition: none; } }

.mull-wrap { container-type: inline-size; container-name: mull; }
.mull { display: block; }
.mull-head { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); }
.mull-status { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); min-height: 24px; font-size: 13px; color: var(--dim); }
.mull-status .dg { color: var(--ink); }
.mull-status b { color: var(--ink); font-weight: 700; }
.mull-status b.left { color: var(--gold); }
.mull-status .hot { color: var(--hot); }
.mull-status b[class=""] { color: var(--dim); font-weight: 400; }
.mull-status .tag { display: inline-block; padding: 0 6px; border-radius: 4px; background: var(--bg2); color: var(--ink); font-size: 11px; line-height: 18px; margin-right: 4px; }
.mull-seed { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hand {
  display: grid; gap: 8px; margin: var(--sp-3) 0;
  grid-template-columns: repeat(7, minmax(0, 132px));
}
.hand .slot { aspect-ratio: 1 / 1.1; border: 1px dashed #4a4034; background: var(--bg1); border-radius: clamp(6px, 9%, 12px); }
.hand-card { position: relative; min-width: 0; }
.hand-card .tile { transition: transform 80ms ease-out, opacity 80ms ease-out, border-color 100ms ease-out; }
.hand-card.is-dealt { animation: mull-deal 120ms ease-out; }
@keyframes mull-deal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hand-card.is-bottom { translate: 0 10px; transition: translate 80ms ease-out; }
.hand-card.is-bottom .tile { opacity: .55; }
.bottom-tag {
  position: absolute; top: -6px; left: -6px; z-index: 2;
  height: 22px; padding: 0 7px; border-radius: 11px; border: 2px solid var(--bg0);
  background: var(--bg2); color: var(--ink); font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; pointer-events: none;
}
.hand-card .pt {
  position: absolute; right: 4px; bottom: 4px;
}
@container (max-width: 110px) { .hand-card .pt { font-size: 11px; min-width: 0; } }
.hand-card { container-type: inline-size; }
.hand-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.ha-right { display: flex; gap: 8px; margin-left: auto; }
.hand-actions .btn { padding: 0 26px; }
.hand-actions .btn[aria-disabled="true"] { transition: opacity 100ms; }
.mull-strip {
  display: flex; align-items: baseline; gap: 8px; width: 100%; height: 32px; margin-top: var(--sp-3);
  background: none; border: 0; border-bottom: 1px solid var(--line); padding: 0; color: var(--ink); text-align: left;
}
.mull-strip .k, .stat-row .k, .stat-row .n, .mull-recent .k, .mull-recent .time { font-size: 11px; color: var(--dim); }
.mull-strip b { font-size: 13px; font-weight: 700; }
.mull-strip .chev { margin-left: auto; align-self: center; display: flex; }
.mull-stats { padding: var(--sp-2) 0 var(--sp-4); }
.mull-stats.is-in { animation: mull-fade 100ms ease-out; }
@keyframes mull-fade { from { opacity: 0; } }
.stat-row { display: grid; grid-template-columns: minmax(0, 1fr) 4em 4em; align-items: baseline; min-height: 28px; }
.stat-row .k { font-size: 13px; }
.stat-row b { font-size: 15px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.stat-row .n { text-align: right; margin-left: 6px; }
.mull-strip .k { margin-left: 6px; }
.mull-strip .k:first-child { margin-left: 0; }
.stat-bar { display: block; height: 2px; background: var(--line); margin-bottom: var(--sp-2); }
.stat-bar i { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(var(--rate)); transition: transform 150ms ease-out; }
.mull-stats .hint, .mull-side .hint { font-size: 13px; color: var(--dim); }
.stat-h { font-size: 11px; font-weight: 500; color: var(--dim); margin: var(--sp-3) 0 2px; }
.mull-recent { list-style: none; margin: 0; padding: 0; }
.mull-recent button {
  display: grid; grid-template-columns: 3.4em minmax(0, 1fr) 24px; align-items: center; gap: 8px;
  width: 100%; min-height: 44px; background: none; border: 0; padding: 0; color: var(--ink); text-align: left;
}
.mull-recent .what { font-size: 13px; }
.mull-recent .re { color: var(--trig); display: flex; }
.mull-side { display: none; }
@container mull (min-width: 1000px) {
  .mull { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-5); align-items: start; }
  .mull-side { display: block; background: var(--bg1); border-left: 1px solid var(--line); padding: var(--sp-4); align-self: stretch; min-height: calc(100dvh - 2 * var(--sp-4)); }
  .mull-side .mull-recent button { min-height: 36px; }
  .mull-side-h { font-size: 13px; color: var(--dim); font-weight: 500; margin: 0 0 var(--sp-2); }
  .mull-strip-wrap { display: none; }
}
:where(.vp-band) .hand { grid-template-columns: repeat(4, minmax(0, 1fr)); }
:where(.vp-band) .hand > :nth-child(n + 5) { transform: translateX(calc(50% + 4px)); }
:where(.vp-band) .hand[data-n="6"] > :nth-child(n + 5) { transform: translateX(calc(100% + 8px)); }
:where(.vp-band) .hand[data-n="5"] > :nth-child(n + 5) { transform: translateX(calc(150% + 12px)); }
:where(.vp-band) .hand[data-n="4"] > *, :where(.vp-band) .hand[data-n="3"] > *, :where(.vp-band) .hand[data-n="2"] > *, :where(.vp-band) .hand[data-n="1"] > * { transform: none; }
:where(.vp-band) .hand-actions .ha-right { flex: 1; justify-content: flex-end; }
:where(.vp-band) .hand-actions .ha-right .btn { flex: 1; max-width: 160px; padding: 0 12px; justify-content: center; }
:where(.vp-land) .hand { margin: var(--sp-2) 0; grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (prefers-reduced-motion: reduce) {
  .hand-card.is-dealt, .mull-stats.is-in { animation: none; }
  .hand-card .tile, .stat-bar i { transition: none; }
}

body.route-goldfish .main { padding: 0; overflow: hidden; }
body.route-goldfish .main > .play { max-width: none; margin-inline: 0; }
.gf-start { padding: 0 var(--gutter); }
.gf-start-box { display: flex; flex-direction: column; gap: var(--sp-4); padding-top: var(--sp-4); }
.gf-start-row { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.gf-order { min-width: 160px; height: 36px; }
.gf-order button { white-space: nowrap; padding-inline: 10px; }
.gf-deckn { font-size: 13px; color: var(--dim); }
.gf-deckn .hot { color: var(--hot); }
.gf-deck-seg { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.gf-deck-seg button { flex: 0 1 auto; min-width: 0; padding: 0 12px; }
.gf-last { font-size: 11px; color: var(--dim); }
.gf-start .slots { margin-top: var(--sp-5); grid-template-columns: repeat(7, minmax(0, 72px)); }

.play { container-type: size; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100%; min-height: 0; }
.rail { grid-column: 1; grid-row: 1 / -1; display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; z-index: var(--z-rail); background: var(--bg1); border-right: 1px solid var(--line); }
.rail > .hud { flex: 1 1 auto; }
.rail-opp, .rail-oppz, .rail-piles, .rail-h { display: none; }
.hud {
  background: var(--bg1); padding: 12px 8px;
  display: flex; flex-direction: column; gap: 10px; position: relative; min-height: 0;
}
.hud-turn { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.hud-turn .t { font-size: 13px; color: var(--dim); font-weight: 700; }
.hud-turn b { font-size: 28px; font-weight: 700; line-height: 1; }
.hud-turn .st { width: 100%; font-size: 13px; color: var(--dim); }
.hud-num { display: grid; grid-template-columns: 18px 1fr; align-items: center; column-gap: 4px; }
.hud-num .lbl { color: var(--dim); display: flex; }
.hud-num b { font-size: 28px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hud-num.hot b { color: var(--hot); }
.hud-num.energy b { color: var(--ene); }
.hud-num.life-me.cand { width: fit-content; padding: 0 8px 0 4px; outline: 2px solid var(--trig); outline-offset: 2px; border-radius: 8px; cursor: pointer; box-shadow: 0 0 14px 2px color-mix(in srgb, var(--trig) 55%, transparent); }
.hud-num.energy.charged .lbl .pip { outline: 2px solid color-mix(in srgb, var(--ene) 50%, transparent); outline-offset: 1px; border-radius: 50%; }
.hud-mana { display: flex; flex-wrap: wrap; gap: 4px; min-height: 18px; }
.mana-pip { width: 14px; height: 14px; border-radius: 50%; border: 2px solid transparent; background: transparent; box-sizing: border-box; position: relative; }
.mana-pip:not(.on) { border-color: var(--dim); }
.mana-pip.on { background: var(--pc); border-color: #0006; }
.hud-mana .more { font-size: 11px; color: var(--dim); }
.hud-ctl { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px; }
.hud-ctl .gf-next { width: 100%; height: 44px; justify-content: center; }
.hud-ctl .icon-btn[aria-disabled="true"] { opacity: .4; }
.gf-menu {
  position: absolute; z-index: var(--z-game-menu); bottom: 60px; left: 8px; width: 220px;
  background: var(--bg2); border: 1px solid #3a3228; border-radius: 10px; padding: 4px; display: flex; flex-direction: column;
}
.gf-menu button { min-height: 44px; text-align: left; padding: 0 12px; background: none; border: 0; color: var(--ink); font-size: 13px; border-radius: 6px; }
.gf-menu button.hot { color: var(--hot); }
.gf-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
@media (hover: hover) { .gf-menu button:hover { background: var(--bg1); } }

#table {
  --railw: 120px; --bc: 2;
  position: relative; overflow: hidden; overflow: clip; min-height: 0; height: 100%;
  display: grid; grid-template-columns: var(--railw) minmax(0, 1fr); column-gap: 8px;
  padding: 0 max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) 0;
  background: radial-gradient(120% 80% at 50% 50%, var(--bg1), var(--bg0) 70%);
  -webkit-touch-callout: none; touch-action: manipulation; will-change: transform;
  width: 100%;
}
#table > :not(.rail) { grid-column: var(--bc); }
.opp-panel { display: flex; align-items: flex-end; justify-content: center; gap: 8px; position: relative; }
.opp-panel .oppsub { display: contents; }
.opp-panel .opp-energy[hidden] { display: none; }
.opp-panel .life { min-width: 70px; height: 44px; padding: 2px 12px; border: 1px solid #3a3228; border-radius: 10px; background: #0f0d0a; text-align: center; transform-origin: 50% 100%; will-change: transform; display: flex; flex-direction: column; justify-content: center; }
.opp-panel .life b { display: block; font-size: 26px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.opp-panel .life > span:last-child { font-size: 10px; color: var(--dim); }
.opp-panel .life.cand { border-color: var(--trig); outline: 2px solid var(--trig); cursor: pointer; }
.opp-turn { display: none; position: absolute; right: 0; bottom: 10px; font-size: 13px; }
.opp-turn b { font-weight: 700; }
.opp-turn span { color: var(--dim); }
.field { display: grid; grid-template-columns: minmax(0, 1fr) 56px; grid-template-rows: minmax(0, 1fr) auto auto; align-content: stretch; gap: var(--board-gap) 8px; align-items: center; min-height: 0; padding-bottom: 6px; }
.gf-row { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: calc(var(--ch) + var(--part-row-pad)); padding-left: 4px; }
.gf-row .card + .card { margin-left: var(--ov, 0px); }
.gf-row.scroll { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; padding-right: 4px; }
.gf-row.scroll::-webkit-scrollbar { display: none; }
.gf-row.scroll > .card { flex: none; }
.gf-row.perms { grid-row: 1; grid-column: 1; }
.gf-row.others { grid-row: 2; grid-column: 1; align-self: end; }
.gf-row.others[hidden] { display: none; }
.gf-row.lands { grid-row: 3; grid-column: 1; align-self: end; }
.gf-row.lands > .card.first-other { margin-left: calc(var(--ov, 0px) + 14px); }
.gf-row.perms.two { display: grid; grid-template-columns: repeat(var(--cols), var(--colw)); grid-auto-rows: auto; column-gap: 0; row-gap: 14px; align-content: center; justify-content: start; }
.gf-row.perms.two > .card { margin-left: 0 !important; }
.gf-row.handrow { grid-row: 4; grid-column: 1; align-self: start; padding: 4px 0 10px 4px; }
.gf-piles { grid-row: 1 / 4; grid-column: 2; position: relative; z-index: var(--z-piles); display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.gf-pile { display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; padding: 0; color: var(--ink); }
.gf-pile .pl { font-size: 10px; color: var(--dim); }
.gf-pc { position: relative; width: var(--pcw, 56px); height: calc(var(--pcw, 56px) * 1.1); border-radius: 7px; border: 1.5px solid var(--card-edge); background: var(--bg2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gf-pc b { font-size: 15px; font-weight: 700; }
.gf-pa { position: absolute; inset: 0; }
.gf-pa img { width: 100%; height: 100%; object-fit: cover; }
.gf-pc i { position: absolute; right: 2px; bottom: 2px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--bg0); border: 1px solid var(--line); font-size: 11px; font-weight: 700; font-style: normal; display: flex; align-items: center; justify-content: center; }
.gf-pile.empty .gf-pc { opacity: .5; }

.card { position: relative; flex: none; width: var(--cw); height: var(--ch); transform-origin: 50% 50%; will-change: transform; cursor: pointer; z-index: var(--z-card); background: none; border: 0; padding: 0; color: inherit; }
.card .frame { position: absolute; inset: 0; border-radius: clamp(6px, 9%, 12px); border: 1.5px solid var(--card-edge); background: var(--card-bg); overflow: hidden; }
.card.token .frame { border: 1.5px dashed #6b6255; }
.card .art { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.card .noart-name { position: absolute; inset: 18px 4px 4px; font-size: 10px; color: var(--dim); overflow: hidden; padding: 0 6px; text-align: center; line-height: 1.3; }
.card .nm { position: absolute; left: 0; right: 0; top: 0; padding: 2px 5px 6px; display: flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; color: #f2f6f8; line-height: 1.2; background: linear-gradient(#000000cc, #00000000); }
.card .nm-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .nm .cost { flex: none; display: flex; }
.card .sick { flex: none; display: flex; color: color-mix(in srgb, var(--ink) 70%, transparent); }
.card .prot { position: absolute; left: 0; top: 19px; width: 100%; height: calc(100% - 22px); opacity: .55; pointer-events: none; overflow: visible; transform-origin: 50% 50%; }
.card .prot .prot-ring { transform-box: view-box; transform-origin: 50% 50%; transform: rotate(-90deg); animation: prot-spin 24s linear infinite; }
.card .prot.is-new { animation: prot-in .6s cubic-bezier(.2, .8, .3, 1) both; }
.card .prot.is-out { animation: prot-out .45s ease-in both; }
.card .prot .prot-spark { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; animation: prot-spark .5s ease-out .25s both; }
@keyframes prot-spin { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
@keyframes prot-in { from { opacity: 0; transform: scale(.35); } 55% { opacity: .95; transform: scale(1.06); } to { opacity: .55; transform: scale(1); } }
@keyframes prot-out { from { opacity: .55; } to { opacity: 0; } }
@keyframes prot-spark { from { opacity: 0; transform: scale(.4); } 40% { opacity: 1; transform: scale(1.6); } to { opacity: 0; transform: scale(.6); } }
.card .kw { position: absolute; left: 3px; top: 20px; bottom: 3px; display: flex; flex-flow: column-reverse wrap; align-content: flex-start; gap: 2px; z-index: 1; pointer-events: none; }
.card .kw:has(> :nth-child(4)) { gap: 1px; top: 17px; bottom: 21px; }
.card .kw:has(> :nth-child(4)) .kw-i { width: 14px; height: 14px; }
.card .kw:has(> :nth-child(4)) .kw-i svg { width: 9px; height: 9px; }
.card .kw-i { width: 17px; height: 17px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #0f0d0af0; border: 1px solid color-mix(in srgb, var(--ink) 55%, transparent); color: var(--ink); box-shadow: 0 1px 2px #000a; }
.card .kw-i.got { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 1px 2px #000a; }
.card .pt { position: absolute; right: -3px; bottom: -4px; min-width: 36px; text-align: center; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--pt-edge); background: var(--pt-face); color: var(--pt-ink); font-weight: 900; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.25; z-index: 2; }
.card .pt.pt-m { font-size: 17px; } .card .pt.pt-l { font-size: 19px; }
.card .pt.pt-w { font-size: 13px; padding: 1px 4px; letter-spacing: -0.3px; min-width: 0; }
.card.pt-wide .kw { bottom: 22px; }
.card .pt.up { color: var(--up); } .card .pt.down { color: var(--hot); }
.card .pt .dmg { font-size: 10px; font-weight: 800; color: var(--hot); margin-left: 3px; vertical-align: 1px; }
.card .loy { position: absolute; left: -4px; top: -6px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: #0f0d0a; border: 1.5px solid var(--gold); color: var(--gold); font-weight: 900; font-size: 12px; font-variant-numeric: tabular-nums; z-index: 2; box-shadow: 0 1px 2px #000a; }
.card .ctr { position: absolute; right: -7px; top: -7px; width: 21px; height: 21px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 30%, #8cc6ff, #1a5fc0); border: 2px solid #e8f3ff; color: #fff; font-weight: 800; font-size: 11px; }
.card .ctrs { position: absolute; left: -5px; top: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; z-index: 2; pointer-events: none; }
.card .ctr-o { display: flex; align-items: baseline; gap: 3px; height: 20px; padding: 0 6px; border-radius: 10px; background: #0f0d0a; border: 1px solid var(--gold); color: var(--gold); font-size: 10px; font-weight: 700; line-height: 18px; white-space: nowrap; }
.card .ctr-o b { font-size: 13px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.card .ctr.minus { background: radial-gradient(circle at 35% 30%, #ff9a7a, #b0301a); }
.gf-row.ov .card .pt { right: auto; left: -3px; }
.gf-row.ov .card .kw { left: auto; right: 3px; align-items: flex-end; }
.gf-row.ov .card .ctr { right: auto; left: -7px; }
.gf-row.ov .card.stacked .ctr, .gf-row.ov .card:has(.loy) .ctr { left: 22px; }
.gf-row.ov .card .atk-to { right: auto; left: 2px; bottom: 24px; }
.gf-row.ov .card.pt-wide .kw, .gf-row.ov .card .kw:has(> :nth-child(4)) { bottom: 3px; }
.card.sel { z-index: var(--z-card-lift); outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 10px; }
.card.atk .frame { border-color: var(--gold); border-width: 2px; }
.card.cand .frame { border-color: var(--trig); border-width: 2px; }
.card.loy-ready .frame { border-color: var(--trig); border-width: 2px; box-shadow: 0 0 8px 1px color-mix(in srgb, var(--trig) 60%, transparent); }
.card.dim { opacity: .6; }
.card.phased { opacity: .45; }
.card.phased .frame { filter: grayscale(1); }
.card.stacked::before, .card.stacked::after { content: ""; position: absolute; inset: 0; border-radius: clamp(6px, 9%, 12px); border: 1.5px dashed #6b6255; background: var(--card-bg); }
.card.stacked::before { translate: 0 -6px; z-index: -2; }
.card.stacked::after { translate: 0 -3px; z-index: -1; }
.card .stack-n { position: absolute; left: -6px; top: -6px; min-width: 26px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 12px !important; background: var(--bg0); border: 1px solid var(--gold); color: var(--gold); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; z-index: 2; }
.card.in-hand.lift { z-index: var(--z-card-lift); translate: 0 -8px; transition: translate 80ms ease-out; }
@media (hover: hover) { .card.in-hand:hover { translate: 0 -6px; transition: translate 100ms ease-out; z-index: var(--z-card-lift); } .card:not(.in-hand):hover .frame { border-color: var(--dim); } }
.card.picked { translate: 0 -10px; z-index: var(--z-card-lift); }
.card.picked .frame { border-color: var(--trig); border-width: 2px; }
.card.picked::after { content: "✓"; position: absolute; right: 4px; bottom: 4px; z-index: 3; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--trig); color: #111; font-size: 13px; font-weight: 700; line-height: 22px; text-align: center; }
.card.aimed { z-index: var(--z-card-pulse); animation: aimed-pulse 1.1s ease-in-out infinite; }
.card.aimed .frame { border-color: var(--hot); border-width: 2px; }
.card.aiming .frame { border-color: var(--hot); border-width: 2px; box-shadow: 0 0 10px 1px color-mix(in srgb, var(--hot) 55%, transparent); }
.hud-num.aimed b { color: var(--hot); animation: aimed-num 1.1s ease-in-out infinite; }
@keyframes aimed-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--hot) 0%, transparent); }
  50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--hot) 90%, transparent), 0 0 16px 5px color-mix(in srgb, var(--hot) 55%, transparent); }
}
@keyframes aimed-num { 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .card.aimed, .hud-num.aimed b { animation: none; } .card.aimed { box-shadow: 0 0 0 3px color-mix(in srgb, var(--hot) 90%, transparent); } }
.card.in-hand.casting { z-index: var(--z-card-casting); translate: 0 -14px; }
.card.in-hand.casting .frame { border-color: var(--gold); border-width: 2px; box-shadow: 0 0 0 2px var(--gold), 0 0 16px 3px color-mix(in srgb, var(--gold) 60%, transparent); }
.card.in-hand.to-bottom { translate: 0 -10px; opacity: .55; }
.card.in-hand.to-bottom .frame { outline: 2px solid var(--gold); outline-offset: 1px; }

.actrow { display: flex; align-items: center; gap: 8px; min-width: 0; height: 40px; position: relative; padding-left: 4px; overflow: hidden; }
.actrow .dots { display: flex; }
.actrow .dot { width: 26px; height: 40px; background: none; border: 0; padding: 0; position: relative; }
.actrow .dot::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--line); }
.actrow .dot.done::before { background: var(--gold); }
.actrow .dot.cur::before { width: 10px; height: 10px; margin: -5px; }
.actrow .step-name { font-size: 13px; }
.stepbar { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 0; background: none; border: 0; border-radius: 8px; color: inherit; font: inherit; min-width: 0; }
.stepbar:active { background: var(--bg2); }
.dot.stop::after { content: ""; position: absolute; left: 50%; margin-left: -4px; border-left: 4px solid transparent; border-right: 4px solid transparent; }
.stepbar.me .dot.stop::after { bottom: 3px; border-bottom: 5px solid var(--gold); }
.stepbar.opp .dot.stop::after { top: 3px; border-top: 5px solid var(--trig); }
.stepbar.opp .dot.done::before { background: var(--trig); }
.fastbtn { flex: none; min-width: 40px; height: 40px; padding: 0; color: var(--dim); }
.fastbtn .ico { width: 20px; height: 20px; }
.fastbtn[aria-pressed="true"] { color: var(--gold); background: var(--bg2); }
.fastbtn[aria-pressed="true"] .ico { fill: currentColor; }

.stp-top { display: flex; justify-content: flex-end; padding: 0 var(--sp-3); }
.stp-reset { min-height: 40px; }
.stp-close { display: none; }
:where(.vp-wide-land) .stp-top { align-items: center; gap: 4px; padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3); } :where(.vp-wide-land) .stp-close { display: inline-flex; }
.stp-bar { display: grid; grid-template-columns: repeat(10, auto); align-items: center; margin: 0 8px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stp-lbl { font-size: 10px; line-height: 1.15; letter-spacing: -.04em; text-align: center; color: var(--ink); padding: 5px 0; background: var(--bg2); white-space: pre-line; word-break: keep-all; align-self: stretch; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.stp-cell { height: 44px; min-width: 0; background: none; border: 0; padding: 0; position: relative; }
.stp-cell::after { content: ""; position: absolute; left: 50%; margin-left: -7px; border-left: 7px solid transparent; border-right: 7px solid transparent; }
.stp-cell.opp::after { bottom: 6px; border-top: 9px solid var(--muted); }
.stp-cell.me::after { top: 6px; border-bottom: 9px solid var(--muted); }
.stp-cell.opp[aria-pressed="true"]::after { border-top-color: var(--trig); }
.stp-cell.me[aria-pressed="true"]::after { border-bottom-color: var(--gold); }
.stp-cell.none::after { display: none; }
.stp-extra { display: inline-flex; align-items: center; margin: 8px 8px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stp-extra .stp-cell { width: 44px; }
.stp-extra .stp-cell.me::after { top: 50%; margin-top: -5px; }
.stp-extra .stp-lbl { align-self: stretch; padding: 0 12px 0 0; background: none; font-size: 11px; }
:is(.actrow, .ask-win) .ask-bar { width: 3px; height: 24px; border-radius: 2px; background: var(--trig); flex: none; }
:is(.actrow, .ask-win) .ask-t { font-size: 13px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(.actrow, .ask-win) .ask-t.win { color: var(--gold); font-weight: 700; }
:is(.actrow, .ask-win) .chips { display: flex; gap: 6px; margin-left: auto; flex: none; }
:is(.actrow, .ask-win) .chips.scroll { overflow-x: auto; max-width: 60%; scrollbar-width: none; }
.chip { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid #3a3228; background: var(--bg2); color: var(--ink); font-size: 13px; white-space: nowrap; }
:is(.actrow, .ask-win) .chip:first-child { border-color: var(--trig); }
.chip[aria-disabled="true"] { opacity: .4; }
:is(.actrow, .ask-win) .op-name { font-size: 13px; font-weight: 700; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(.actrow, .ask-win) .ops { display: flex; gap: 4px; margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); padding-right: 14px; }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.sm.ab { border-color: var(--trig); color: var(--trig); }
.card-menu { bottom: 44px; right: 0; left: auto; }

#arrows { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#fx { position: absolute; inset: 0; z-index: var(--z-fx); overflow: hidden; overflow: clip; pointer-events: none; }
#flash { position: absolute; inset: 0; z-index: var(--z-flash); opacity: 0; pointer-events: none; }
#finish { position: absolute; inset: 0; z-index: var(--z-finish); display: none; }

.zlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; padding: 8px 0 72px; }
.ztile { position: relative; aspect-ratio: 1 / 1.1; border-radius: 8px; overflow: hidden; border: 1.5px solid var(--card-edge); background: var(--card-bg); padding: 0; color: var(--ink); }
.ztile img { width: 100%; height: 100%; object-fit: cover; }
.ztile span { position: absolute; left: 0; right: 0; top: 0; padding: 2px 4px 6px; font-size: 10px; font-weight: 700; background: linear-gradient(#000c, #0000); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ztile.is-pick { outline: 2px solid var(--ink); outline-offset: 2px; }
.zmoves { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; background: var(--bg1); }
.iopanel.zone { overflow-y: auto; overscroll-behavior: contain; }
.iopanel.pick {
  --pk-w: calc(max(var(--pk-cols, 3) * 94px + (var(--pk-cols, 3) - 1) * 8px, 200px) + 2 * var(--sp-4) + 2px);
  right: auto; bottom: auto; height: auto; padding: 0;
  width: min(var(--pk-w), 100vw - 16px - env(safe-area-inset-left) - env(safe-area-inset-right));
  left: clamp(env(safe-area-inset-left) + 8px, var(--pk-l, 50vw), 100vw - env(safe-area-inset-right) - 8px - var(--pk-w));
  top: max(env(safe-area-inset-top) + 8px, var(--pk-t, 8px));
  max-height: calc(var(--hand-top, 100dvh) - 16px - env(safe-area-inset-top));
  border: 1px solid var(--line); border-radius: 12px; overflow: visible; box-shadow: 0 8px 24px #000a;
  transform: translateY(6px); opacity: 0; transition: transform 120ms ease-in, opacity 120ms ease-in;
}
.iopanel.pick.is-in { transform: none; opacity: 1; transition: transform 150ms var(--ease-sheet), opacity 150ms var(--ease-sheet); }
.iopanel.pick.has-arrow::after { content: ""; position: absolute; left: var(--pk-arrow); bottom: -7px; width: 12px; height: 12px; margin-left: -6px; background: var(--bg1); border: solid var(--line); border-width: 0 1px 1px 0; transform: rotate(45deg); }
.iopanel.pick .zmoves.pk-moves { border-radius: 0 0 11px 11px; }
.iopanel.pick .pk-grid { grid-template-columns: repeat(var(--pk-cols, 3), minmax(0, 1fr)); }
body:has(#iopanel.pick.is-in) #table.ask-float > .ask-win { visibility: hidden; }
.iopanel.pick .io-head h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; flex: 1; font-size: var(--fs-label); line-height: 1.25; }
.iopanel.pick .io-head h2 .pk-title { flex: 1 1 auto; min-width: 0; }
.iopanel.pick .io-head h2 .pk-count { flex: none; color: var(--dim); font-weight: 500; font-size: var(--fs-label); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pk-grab { display: none; }
.pk-find { flex: none; padding: 6px var(--sp-4) 0; }
.pk-find .search { width: 100%; }
.pk-find .search svg { flex: none; }
.pk-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--sp-4) calc(8px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.pk-sec { margin: 12px 0 0; font-size: var(--fs-label); font-weight: 700; color: var(--dim); }
.pk-sec .count { font-weight: 500; }
.pk-sec[hidden] { display: none; }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 8px; padding: 8px 0; }
.pk-tile { position: relative; display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; border: 1.5px solid var(--card-edge); background: var(--card-bg); padding: 0; color: var(--ink); text-align: left; cursor: pointer; transition: transform 120ms cubic-bezier(.2,.8,.3,1); }
.pk-tile[hidden] { display: none; }
.pk-tile .pk-art { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--card-bg); }
.pk-tile .pk-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pk-tile .pk-pips { position: absolute; right: 3px; top: 3px; display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: #000a; line-height: 0; }
.pk-tile .pk-pips .pip.xs + .pip.xs { margin-left: 0; }
.pk-tile .pk-mk { position: absolute; left: 3px; top: 3px; padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 700; line-height: 1.4; background: #000a; color: var(--ink); }
.pk-tile .pk-mk.mk-hand { background: var(--trig); color: #111; }
.pk-tile.is-hand { border-color: var(--trig); }
.pk-tile .pk-band { flex: 1; display: flex; align-items: center; min-height: 34px; padding: 4px 6px; background: var(--bg2); font-size: 11px; font-weight: 700; line-height: 1.2; }
.pk-tile .pk-band span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pk-tile.is-pick { outline: 2px solid var(--trig); outline-offset: 2px; border-color: var(--trig); transform: scale(1.04); z-index: 2; }
.pk-tile.is-pick .pk-band { background: #2b3540; }
@media (hover: hover) { .pk-tile:hover { border-color: var(--dim); } .pk-tile.is-hand:hover { border-color: var(--trig); } }
.iopanel.pick .io-head h2 .pk-count.is-sel { color: var(--trig); font-weight: 700; }
.pk-hint { flex: none; padding: 4px var(--sp-4) 0; }
.pk-fold { display: none; }
.pk-tile.is-off { opacity: .3; cursor: default; }
.pk-tile .pk-band { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; }
.pk-tile .pk-band small { font-size: 10px; font-weight: 500; color: var(--trig); }
.pk-tile .pk-left { position: absolute; left: 3px; bottom: 3px; padding: 1px 6px; border-radius: 6px; background: #000a; font-size: 11px; font-weight: 700; line-height: 1.4; }
.pk-tile .pk-rank, .pk-tile[aria-pressed="true"]:not(:has(.pk-rank)) .pk-art::after { position: absolute; right: 4px; bottom: 4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--trig); color: #111; font-size: 13px; font-weight: 700; line-height: 22px; text-align: center; }
.pk-tile[aria-pressed="true"]:not(:has(.pk-rank)) .pk-art::after { content: "✓"; }
.pk-tile[aria-pressed] { transform: none; }
:where(.vp-band) .iopanel.pick { left: 0; top: auto; bottom: calc(100dvh - var(--hand-top, 100dvh)); right: 0; width: auto; max-width: none;
  max-height: min(50dvh, calc(var(--hand-top, 100dvh) - 8px)); padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
  border: 0; border-radius: 14px 14px 0 0; overflow: hidden; box-shadow: 0 -8px 24px #000a; opacity: 1; transform: translateY(100%); }
:where(.vp-band) .iopanel.pick .zmoves.pk-moves { border-radius: 0; }
:where(.vp-band) .iopanel.pick .pk-grid { grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); }
:where(.vp-band) .iopanel.pick.is-tall { height: calc(var(--hand-top, 100dvh) - 8px - env(safe-area-inset-top)); max-height: none; }
:where(.vp-band) .iopanel.pick.is-fold { height: auto; }
:where(.vp-band) .iopanel.pick.is-fold > :not(.pk-grab, .io-head) { display: none; }
:where(.vp-band) .pk-fold { display: inline-flex; }
:where(.vp-band) .pk-grab { display: block; position: relative; flex: none; height: 16px; touch-action: none; }
:where(.vp-band) .pk-grab::after { content: ""; position: absolute; left: 50%; top: 6px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--muted); }
.zmoves.pk-moves { flex: none; padding: 8px var(--sp-4) calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.zmoves.pk-moves .btn.sm { height: 40px; }
.zmoves.pk-moves .btn[aria-disabled="true"] { opacity: .4; }

:where(.vp-band) body.route-goldfish .app { grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-areas: "header" "offline" "main" "hudbar"; }
:where(.vp-band) .play { --pcw: 48px; }
:where(.vp-band) .rail { display: none; }
:where(.vp-band) #table { --railw: 0px; --bc: 1; grid-template-columns: minmax(0, 1fr); column-gap: 0; padding-left: 8px; padding-bottom: 0; }
:where(.vp-band) .opp-panel { justify-content: flex-start; }
:where(.vp-band) .opp-panel .life { height: 38px; } :where(.vp-band) .opp-panel .life b { font-size: 22px; }
:where(.vp-band) .opp-turn { display: block; }
:where(.vp-band) .field { grid-template-columns: minmax(0, 1fr) 48px; }
:where(.vp-band) .hudbar:not([hidden]) {
  grid-area: hudbar; display: flex; align-items: center; gap: 10px; position: relative;
  height: calc(56px + env(safe-area-inset-bottom)); padding: 0 max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(12px, env(safe-area-inset-left));
  background: linear-gradient(to top, var(--bg0) env(safe-area-inset-bottom), var(--bg1) env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
:where(.vp-band) .hudbar .hud-turn { display: none; }
:where(.vp-band) .hudbar .hud-mana { display: flex; flex-wrap: nowrap; max-width: 92px; overflow: hidden; margin-left: 6px; }
:where(.vp-band) .hudbar .hud-num { display: flex; gap: 4px; }
:where(.vp-band) .hudbar .hud-num b { font-size: 22px; }
:where(.vp-band) .hudbar .hud-ctl { margin: 0 0 0 auto; flex-wrap: nowrap; align-items: center; }
:where(.vp-band) .hudbar .hud-ctl .gf-next { width: auto; padding: 0 12px; height: 40px; }
:where(.vp-band) .hudbar .hud-num b { white-space: nowrap; }
:where(.vp-band) .hudbar .gf-menu { bottom: calc(60px + env(safe-area-inset-bottom)); left: auto; right: 8px; }
:where(.vp-band) :is(.actrow, .ask-win) .op-name { max-width: 88px; }
.hudbar[hidden] { display: none; }

:where(.vp-rail) #table { --railw: 140px; padding-top: var(--part-top); }
:where(.vp-rail) .field { grid-template-columns: minmax(0, 1fr); }
:where(.vp-rail) .actrow[data-mode="step"] { display: none; }

:where(.vp-rail) .rail { padding: 10px 8px; gap: 0; margin-top: -8px; }
:where(.vp-rail) .rail-opp, :where(.vp-rail) .rail-oppz, :where(.vp-rail) .rail-piles, :where(.vp-rail) .rail-h { display: block; flex: none; }
:where(.vp-rail) .rail-h { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--dim); padding: 0 2px 4px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
:where(.vp-rail) .rail-piles { margin-top: auto; }
:where(.vp-rail) .rail-h-me { margin-top: 10px; }
:where(.vp-rail) #table:not(.has-opp) .rail-oppz { display: none; }
:where(.vp-rail) .rail > .hud { flex: none; padding: 0; gap: 6px; }
:where(.vp-rail) .rail > .hud .hud-ctl { margin-top: 6px; }
:where(.vp-rail) .rail > .hud .hud-ctl .icon-btn { height: 40px; }

:where(.vp-rail) .rail-oppz { margin-top: 8px; }
:where(.vp-rail) .rail-oppz .opp-side { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; justify-items: start; align-items: end; }
:where(.vp-rail) .rail-oppz .opp-side > span, :where(.vp-rail) .rail-oppz .opp-side > button, :where(.vp-rail) .rail-oppz .opp-side.deck > * { width: 56px; }
:where(.vp-rail) .rail-oppz .opp-side.deck .opp-lands { width: 56px; }
:where(.vp-rail) .rail-oppz .opp-side > .gf-pile { width: auto; align-items: flex-start; }
:where(.vp-rail) .rail-oppz .opp-side > .gf-pile .pl { padding-left: 2px; }
:where(.vp-rail) .rail-oppz .opp-side > button.opp-hand, :where(.vp-rail) .rail-oppz .opp-side.deck > button.opp-hand { margin-top: 15px; }
:where(.vp-rail) .rail-oppz .opp-side > button.opp-hand small { left: 2px; top: -18px; text-align: left; }

:where(.vp-rail) .rail-piles .gf-piles { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; justify-items: start; }
:where(.vp-rail) .rail-piles .gf-pile { align-items: flex-start; }
:where(.vp-rail) .rail-piles .gf-pile .pl { padding-left: 2px; }
:where(.vp-rail) .rail > .hud .hud-num b { font-size: 26px; }
.hud-step { display: none; }
:where(.vp-rail, .vp-land) .rail-opp { display: block; flex: none; }
:where(.vp-rail, .vp-land) .actrow[data-mode="step"] { display: none; }
:where(.vp-rail, .vp-land) .rail-opp .opp-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 4px 6px; }
:where(.vp-rail, .vp-land) .rail-opp .opp-panel .life { flex: 1 0 100%; }
:where(.vp-rail, .vp-land) .rail-opp .opp-panel .life { display: flex; flex-direction: column-reverse; align-items: stretch; min-width: 0; height: auto; padding: 0 2px 4px; border: 0; border-radius: 6px; background: none; text-align: left; }
:where(.vp-rail, .vp-land) .rail-opp .opp-panel .life > span:last-child { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--dim); padding-bottom: 4px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
:where(.vp-rail, .vp-land) .rail-opp .opp-panel .life b { font-size: 26px; line-height: 1.1; padding-left: 2px; }
:where(.vp-rail, .vp-land) .rail-opp .opp-panel .life.cand { outline-offset: 2px; }
:where(.vp-rail, .vp-land) .rail-opp .opp-panel .opp-name { flex: 0 1 auto; min-width: 0; font-size: 11px; gap: 2px 4px; padding: 0; }
:where(.vp-rail, .vp-land) .rail-opp .opp-panel .opp-name .tag { margin: 0; padding-inline: 2px; }
:where(.vp-rail, .vp-land) .rail-opp .opp-panel .opp-name > .tag:first-child { max-width: 100%; }
:where(.vp-rail, .vp-land) .rail-opp .opp-panel .chain, :where(.vp-rail, .vp-land) #table.has-opp .rail-opp .opp-panel .chain { position: absolute; top: 31px; left: auto; right: 0; bottom: auto; margin: 0; padding: 0 2px; }
:where(.vp-rail, .vp-land) .rail-opp .opp-panel .opp-turn { display: none; }
:where(.vp-rail, .vp-land) .rail-opp .opp-panel .opp-energy { flex: 1 0 100%; margin: -2px 0 2px; padding-left: 2px; }
:where(.vp-rail, .vp-land) .rail-opp .opp-panel .opp-energy b { font-size: 26px; }
:where(.vp-rail, .vp-land) #table.land-rail .rail-opp .opp-panel .opp-energy b { font-size: 22px; }
:where(.vp-rail, .vp-land) #table.land-rail .rail-opp .opp-panel .opp-energy .egauge { display: none; }
:where(.vp-rail, .vp-land) .rail > .hud .hud-turn { display: none; }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step .stepbar { flex-direction: column; align-items: flex-start; gap: 2px; height: auto; padding: 2px 4px 2px 0; margin-left: -2px; width: 100%; text-align: left; }
:where(.vp-rail) .rail > .hud .hud-step .dots { display: flex; align-self: stretch; }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step { position: relative; }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step .fastbtn .ico { width: 18px; height: 18px; }
:where(.vp-rail) .rail > .hud .hud-step .dot { flex: 1 1 0; min-width: 0; height: 22px; background: none; border: 0; padding: 0; position: relative; }
:where(.vp-land) .rail > .hud .hud-step .dots { display: flex; }
:where(.vp-land) .rail > .hud .hud-step .dot { width: 15px; height: 22px; background: none; border: 0; padding: 0; position: relative; }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step .dot.stop::after { margin-left: -3px; border-left-width: 3px; border-right-width: 3px; }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step .stepbar.me .dot.stop::after { bottom: 1px; border-bottom-width: 4px; }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step .stepbar.opp .dot.stop::after { top: 1px; border-top-width: 4px; }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step .dot::before { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--line); }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step .dot.done::before { background: var(--gold); }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step .stepbar.opp .dot.done::before { background: var(--trig); }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step .dot.cur::before { width: 10px; height: 10px; margin: -5px; }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step .hs-name { display: flex; align-items: baseline; gap: 6px; font-size: 13px; padding-left: 2px; }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step .hs-name .t { font-weight: 700; color: var(--dim); font-variant-numeric: tabular-nums; }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step .hs-name .st { font-weight: 700; }
:where(.vp-rail) .actrow[data-mode="step"] { display: flex; visibility: hidden; }
:where(html.vp-rail-low1) .rail { --pcw: 48px; }
:where(html.vp-rail-low1) .rail-oppz .opp-side > span:not(.gf-pile), :where(html.vp-rail-low1) .rail-oppz .opp-side > button:not(.gf-pile):not(.opp-hand) { height: 44px; }
:where(html.vp-rail-low1) .rail-oppz .opp-side.deck > :not(.gf-pile):not(.opp-hand) { height: 46px; }
#table.pc-rail .opprow-wrap { padding: var(--part-opp-top) 4px var(--part-opp-bottom); }
#table.pc-rail .gf-row.opprow { min-height: calc(var(--ocw) * var(--part-opp-row-k) + var(--part-opp-row-pad)); }
:where(html.vp-rail-low2) #table.pc-rail { --railw: 152px; }
:where(html.vp-rail-low2) #table.pc-rail .rail { --pcw: 40px; padding: 8px; }
:where(html.vp-rail-low2) #table.pc-rail .rail-oppz .opp-side.deck, :where(html.vp-rail-low2) #table.pc-rail .rail-piles .gf-piles { grid-template-columns: repeat(3, 40px); gap: 8px; align-items: end; }
:where(html.vp-rail-low2) #table.pc-rail .rail-oppz .opp-side.deck > *, :where(html.vp-rail-low2) #table.pc-rail .rail-oppz .opp-side.deck .opp-lands { width: 40px; }
:where(html.vp-rail-low2) #table.pc-rail .rail-oppz .opp-side.deck > :not(.gf-pile):not(.opp-hand) { height: 44px; }
:where(html.vp-rail-low2) #table.pc-rail .rail-oppz .opp-side > button.opp-hand { margin-top: 15px; }
:where(html.vp-rail-low2) #table.pc-rail .rail-oppz { margin-top: 6px; }
:where(html.vp-rail-low2) #table.pc-rail .rail-h-me { margin-top: 8px; margin-bottom: 6px; }
:where(html.vp-rail-low2) #table.pc-rail .rail > .hud .hud-ctl { margin-top: 4px; }
:where(html.vp-rail-low3) #table.pc-rail .rail { padding: 6px 8px 4px; }
:where(html.vp-rail-low3) #table.pc-rail .rail-opp .opp-panel .life > span:last-child { margin-bottom: 4px; }
:where(html.vp-rail-low3) #table.pc-rail .rail-opp .opp-panel .life b { font-size: 22px; }
:where(html.vp-rail-low3) #table.pc-rail .rail-opp .opp-panel .opp-energy b { font-size: 22px; }
:where(html.vp-rail-low3) #table.pc-rail .rail-h-me { margin-top: 4px; margin-bottom: 4px; }
:where(html.vp-rail-low3) #table.pc-rail .rail > .hud { gap: 2px; }
:where(html.vp-rail-low3) #table.pc-rail .rail > .hud .hud-num b { font-size: 22px; }
:where(html.vp-rail-low3) #table.pc-rail .rail > .hud .hud-mana { min-height: 14px; }
:where(html.vp-rail-low3) #table.pc-rail .rail > .hud .hud-step { padding-top: 4px; }
:where(html.vp-rail-low3) #table.pc-rail .rail > .hud .hud-step .dot { height: 18px; }
:where(html.vp-rail-low3) #table.pc-rail .rail > .hud .hud-step .hs-name { font-size: 12px; }
:where(html.vp-rail-low3) #table.pc-rail .rail > .hud .hud-ctl { gap: 2px; }
:where(html.vp-rail-low3) #table.pc-rail .rail > .hud .hud-ctl .gf-next { height: 36px; }
:where(html.vp-rail-low3) #table.pc-rail .rail > .hud .hud-ctl .icon-btn { height: 34px; }
@media (prefers-reduced-motion: reduce) { .card.in-hand.lift, .card.in-hand:hover { transition: none; } }

:where(.vp-land) .gf-pile { position: relative; }
:where(.vp-land) .gf-pile .pl { position: absolute; left: 4px; top: 2px; z-index: 1; }
:where(.vp-land) .gf-piles { gap: 6px; }
:where(.vp-wide-land) .actrow .ops, :where(.vp-wide-land) .actrow .chips { margin-left: 12px; }
.ztile.has-ab { border-color: var(--trig); }
.zmoves .btn.sm.ab { border-color: var(--trig); color: var(--trig); }

#flash { background: radial-gradient(60% 50% at 50% 50%, #fff, #ffb84a 45%, #ff5a00 75%, #0000 100%); }
#finish { align-items: center; justify-content: center; background: radial-gradient(45% 32% at 50% 48%, #0d0a07d0, #0d0a0700 75%); pointer-events: none; }
#finish.on { display: flex; }
#finish > div:not(.fin) { font-size: 46px; font-weight: 900; letter-spacing: .12em; color: var(--gold); text-shadow: 0 0 28px #d8b45a, 0 3px 10px #000; }
#finish.result { background: radial-gradient(60% 40% at 50% 45%, #0d0a07e6, #0d0a0700 80%); }
#finish .fin { display: grid; justify-items: center; gap: 6px; text-align: center; }
#finish .fin-big { font-size: clamp(30px, 9vw, 56px); font-weight: 900; color: var(--gold); letter-spacing: .04em; text-shadow: 0 0 22px #d8b45a, 0 3px 10px #000; }
#finish .fin-l { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); opacity: 0; text-shadow: 0 2px 6px #000; }
#finish .fin-l b { font-size: 26px; font-weight: 900; color: #fff; display: inline-block; }
#finish .fin-l i { font-style: normal; font-size: 13px; color: var(--gold); }
#finish .fin-rec { margin: 6px 0 0; font-size: clamp(24px, 7vw, 44px); font-weight: 900; color: #ffd447; letter-spacing: .08em; opacity: 0; text-shadow: 0 0 20px #ff9a3a, 0 3px 0 #7a3a00; }
.opp-panel .life.neg b { color: #ff4a2a; }
.fx-confetti { position: absolute; width: 9px; height: 14px; border-radius: 2px; will-change: transform, opacity; pointer-events: none; }
.fx-peek { outline: 1px solid #0008; }
.fx-spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #ffd27a; will-change: transform, opacity; }
.fx-ring { position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 3px solid #ffd9a0; will-change: transform, opacity; }
.fx-dmg { position: absolute; font-size: 54px; font-weight: 900; line-height: 1; color: #fff; text-shadow: 0 0 10px #ff6a2a, 0 0 26px #ff2a00, 0 3px 0 #7a1200; will-change: transform, opacity; white-space: nowrap; }
.fx-dmg.s { font-size: 30px; }
.fx-dmg.up { text-shadow: 0 0 10px #4ad07a, 0 3px 0 #0c4a22; }
.fx-stamp { position: absolute; text-align: center; will-change: transform, opacity; white-space: nowrap; pointer-events: none; }
.fx-stamp b { display: block; font-size: 16px; font-weight: 800; color: var(--gold); letter-spacing: .06em; }
.fx-stamp.big b { font-size: clamp(24px, 7vw, 48px); font-weight: 900; }
.fx-stamp small { display: block; font-size: 13px; color: var(--hot); }
#heat { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1s ease-out; background: radial-gradient(70% 60% at 50% 60%, #ff5a3c55, #ff2a0022 45%, #0000 75%), linear-gradient(#ff8a3a22, #0000 30%, #0000 70%, #ff3a1a33); }
.fx-who { position: absolute; left: 50%; top: 42%; right: auto; bottom: auto; width: max-content; max-width: 92vw; height: auto; align-content: center; z-index: var(--z-fx-who); display: grid; justify-items: center; gap: 6px; padding: 18px 28px; border-radius: 16px; background: #120f0ce6; border: 2px solid var(--gold); box-shadow: 0 10px 40px #000a; pointer-events: none; opacity: 0; white-space: nowrap; }
.fx-who b { font-size: clamp(26px, 8vw, 44px); font-weight: 900; letter-spacing: .04em; color: var(--gold); }
.fx-who.second { border-color: #7fb3e6; }
.fx-who.second b { color: #9cc7f0; }
.fx-who small { font-size: 13px; color: #d9d2c5; }
.fx-turn { position: absolute; width: 120px; height: 120px; transform: translate(-50%,-50%); display: grid; place-items: center; pointer-events: none; }
.fx-turn svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; fill: none; stroke: var(--gold); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; will-change: transform, opacity; }
.fx-turn b { position: relative; font-size: 22px; font-weight: 900; letter-spacing: .06em; color: var(--gold); opacity: 0; white-space: nowrap; will-change: transform, opacity; }
.fx-inv { position: absolute; inset: 0; z-index: var(--z-fx-inv); pointer-events: none; opacity: 0; background: #fff; mix-blend-mode: difference; }
#flash, #finish, #heat, .fx-inv { left: var(--railw); }
.fx-who { left: calc(var(--railw) + (100% - var(--railw)) / 2); }
.opp-panel .chain { position: absolute; left: calc(50% + 96px); bottom: 6px; display: flex; align-items: baseline; gap: 4px; color: var(--gold); transform-origin: 30% 70%; will-change: transform; }
.opp-panel .chain[hidden] { display: none; }
.opp-panel .chain b { font-size: 20px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.opp-panel .chain small { font-size: 9px; font-weight: 800; letter-spacing: .08em; opacity: .8; }
:where(.vp-band) .opp-panel .chain { position: static; align-self: center; margin-left: 2px; }
.fx-haze { position: absolute; transform: translate(-50%,-50%); border-radius: 50%; background: radial-gradient(closest-side, var(--hz), #0000); opacity: 0; will-change: opacity; }
.fx-bolt { position: absolute; left: 0; top: 0; border-radius: 50%; background: var(--bc); will-change: transform; }
.fx-glow { position: absolute; inset: 0; background: radial-gradient(circle, var(--glow) 0%, transparent 70%); opacity: 0; pointer-events: none; }
.hud-num .egauge { grid-column: 1 / 3; display: grid; grid-template-columns: repeat(8, 8px); gap: 2px; margin: 2px 0 0; }
.hud-num .egauge i { width: 8px; height: 8px; border-radius: 2px; background: var(--line); }
.hud-num .egauge i.on { background: var(--ene); }
.hudbar .hud-num .egauge { display: none; }
@media (prefers-reduced-motion: reduce) { body[data-motion="auto"] :is(.fx-spark, .fx-ring, .fx-bolt, .fx-sprout) { display: none; } }


.pool-results { display: contents; }

.ztile[hidden] { display: none; }

#table.atk-pick .gf-row.handrow { opacity: .4; transition: opacity .15s; }
.gf-next { position: relative; overflow: visible; --nr: 8px; --nb: 1px; --rg: 2px; --rw: 2px; --rp: 4px; border-width: var(--nb); border-radius: var(--nr); }
.gf-next .run-ring { display: none; position: absolute; inset: calc(-1 * (var(--nb) + var(--rg) + var(--rw) + var(--rp))); width: calc(100% + 2 * (var(--nb) + var(--rg) + var(--rw) + var(--rp))); height: calc(100% + 2 * (var(--nb) + var(--rg) + var(--rw) + var(--rp))); pointer-events: none; overflow: visible; }
.gf-next.auto-run .run-ring { display: block; }
.gf-next .run-ring rect { x: calc(var(--rp) + var(--rw) / 2); y: calc(var(--rp) + var(--rw) / 2); width: calc(100% - 2 * var(--rp) - var(--rw)); height: calc(100% - 2 * var(--rp) - var(--rw)); rx: calc(var(--nr) + var(--rg) + var(--rw) / 2); ry: calc(var(--nr) + var(--rg) + var(--rw) / 2);
  fill: none; stroke: #fff0bf; stroke-width: var(--rw); stroke-linecap: round; stroke-dasharray: 22 78; filter: drop-shadow(0 0 3px var(--gold)); animation: run-ring 1.3s linear infinite; }
@keyframes run-ring { to { stroke-dashoffset: -100; } }
body[data-motion="off"] .gf-next .run-ring { display: none; }
body[data-motion="off"] .gf-next.auto-run { box-shadow: 0 0 0 2px var(--bg0), 0 0 0 4px var(--gold); }
@media (prefers-reduced-motion: reduce) {
  body[data-motion="auto"] .gf-next .run-ring { display: none; }
  body[data-motion="auto"] .gf-next.auto-run { box-shadow: 0 0 0 2px var(--bg0), 0 0 0 4px var(--gold); }
}

:is(.actrow, .ask-win) .ask-thumb { width: 40px; height: 44px; object-fit: cover; border-radius: 4px; border: 1px solid var(--card-edge); flex: none; }
.card.blessing .frame { border-color: var(--gold); }

.actrow .step-name { white-space: nowrap; flex: none; }

.settings .seg button { white-space: nowrap; }



.opprow-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 4px 2px; }
.opprow-wrap.solo:not(:has(> .opp-panel)) { display: none; }
.gf-row.opprow { flex: 1 1 auto; min-width: 0; --cw: var(--ocw, 56px); min-height: calc(var(--ocw, 56px) * 1.1 + 2px); }
.gf-row.opprow .card.opp { --cw: var(--ocw, 56px); --ch: calc(var(--ocw, 56px) * 1.1); }
.gf-row.opprow .card.opp .pt { font-size: 13px; min-width: 30px; }
.gf-row.opprow .card.opp .pt.pt-w { font-size: 11px; min-width: 0; }
.gf-row.oppc { grid-row: 1; grid-column: 1; align-self: center; }
.gf-row.oppc[hidden] { display: none; }
.field.has-oppc { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) auto auto; }
.field.has-oppc .gf-row.perms { grid-row: 2; align-self: center; }
.field.has-oppc .gf-row.others { grid-row: 3; }
.field.has-oppc .gf-row.lands { grid-row: 4; }
.field.has-oppc .gf-piles { grid-row: 1 / 5; }
.opp-side { display: flex; gap: 6px; flex: none; }
.opp-side > span, .opp-side > button { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 44px; height: 48px;
  border-radius: 6px; background: var(--bg2); border: 1px solid var(--card-edge); }
.opp-side b { font-size: 15px; font-weight: 700; color: var(--ink); }
.opp-side b small { font-size: 10px; font-weight: 700; color: var(--dim); }
.opp-side > button { font: inherit; color: inherit; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; }
.opp-side > button:active { background: var(--bg3, #1a1610); }
.opp-side.deck > * { width: 40px; height: 50px; gap: 1px; }
.opp-side.deck .opp-lands { width: 48px; }
.opp-side .opp-pips { display: none; align-items: center; gap: 3px; height: 12px; line-height: 1; }
.opp-side.deck .opp-pips { display: flex; }
.opp-side .opp-pips .mana-pip { width: 9px; height: 9px; border-width: 1px; }
.opp-side .opp-pips em { font-style: normal; font-size: 9px; font-weight: 700; color: var(--ink); margin-right: 1px; }
.opp-side .opp-pips:empty { display: none; }
.opp-side.deck b { font-size: 14px; line-height: 1; }
.gf-opp-seg button { white-space: nowrap; }
.opp-side .opp-hand.seen { border-color: var(--trig); }
.opp-side .opp-gy[hidden], .opp-side .opp-ex[hidden], .opp-side .opp-lands[hidden] { display: none; }
.opp-side > .gf-pile, .opp-side.deck > .gf-pile { width: auto; height: auto; background: none; border: 0; border-radius: 0; gap: 2px; }
.opp-side > button.opp-hand, .opp-side.deck > button.opp-hand { position: relative; overflow: visible; width: var(--pcw, 56px); height: calc(var(--pcw, 56px) * 1.1); margin-top: 18px; gap: 0; border-radius: 7px; border: 1.5px solid var(--card-edge); background: var(--bg2); }
.opp-side > button.opp-hand.seen { border-color: var(--trig); }
.opp-side > button.opp-hand b { position: absolute; right: 2px; bottom: 2px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; background: var(--bg0); border: 1px solid var(--line); font-size: 11px; line-height: 1; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.opp-side > button.opp-hand small { position: absolute; left: 0; right: 0; top: -18px; line-height: 16px; font-size: 10px; font-weight: 400; color: var(--dim); text-align: center; white-space: nowrap; }
.gf-row.opprow > .card.first-other { margin-left: calc(var(--ov, 0px) + 12px); }
.card .atk-to { position: absolute; right: 2px; bottom: 2px; font-size: 9px; font-weight: 700; color: #111; background: var(--gold); border-radius: 4px; padding: 1px 3px; max-width: 90%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
:is(.actrow, .ask-win) .chips.atk-at .chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #111; }
:is(.actrow, .ask-win) .chips.atk-at .chip[aria-pressed="true"] .chip-n { color: #111; }
.card .named { position: absolute; left: 3px; right: 3px; bottom: 3px; font-size: 9px; font-weight: 700; color: #111; background: var(--trig); border-radius: 4px; padding: 1px 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.card.ring-bearer .frame { box-shadow: 0 0 0 2px #d9b44a inset; }
.card .doors { position: absolute; top: 3px; left: 3px; display: flex; gap: 2px; pointer-events: none; }
.card .door { width: 7px; height: 10px; border-radius: 2px; border: 1px solid var(--trig); background: rgba(0, 0, 0, .55); }
.card .door.open { background: var(--trig); }
.card .ring-b { position: absolute; top: 3px; right: 3px; font-size: 11px; line-height: 1; color: #d9b44a; text-shadow: 0 0 2px #000; pointer-events: none; }
.opp-name .tag.ring { color: #d9b44a; }
.card.in-hand.cand .frame { box-shadow: 0 0 0 2px var(--trig), 0 0 14px 2px color-mix(in srgb, var(--trig) 60%, transparent); }
.card.in-hand.dim { opacity: .45; }
.ztile.is-dim { opacity: .4; }
.ztile.unknown { display: flex; align-items: center; justify-content: center; border-style: dashed; background: var(--bg2); }
.ztile.unknown i { font-style: normal; font-size: 28px; font-weight: 700; color: var(--dim); }
.opp-side small { font-size: 10px; color: var(--dim); }
.opp-panel .opp-name { font-size: 12px; color: var(--dim); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.opp-panel .opp-name[hidden] { display: none; }
.opp-panel .opp-name .tag { padding: 1px 6px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink); font-weight: 700; }
.opp-panel .opp-name > * { flex: none; }
.opp-panel .opp-name > .tag:first-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.opp-panel .opp-name .dl { font-weight: 700; }
.opp-panel .opp-name .dl.hot { color: var(--hot); }
.card.opp.atk .frame { border-color: var(--hot); }

:where(.vp-wide-land) .actrow .ask-t { flex: 0 1 auto; }
:where(.vp-land) .play { --pcw: 44px; }
:where(.vp-land) #table { --railw: 104px; column-gap: 6px; padding-top: var(--part-top); }
:where(.vp-land) .gf-row { min-height: calc(var(--ch) + var(--part-row-pad)); gap: 6px; }
:where(.vp-land) .gf-row.handrow { padding: 2px 0 2px 4px; }
:where(.vp-land) .field { grid-template-columns: minmax(0, 1fr) var(--pcw); gap: var(--board-gap) 6px; padding-bottom: 2px; }
:where(.vp-land) .gf-piles { gap: 4px; }
:where(.vp-land) .gf-pile .pl { font-size: 9px; }
:where(.vp-land) .opprow-wrap { padding: var(--part-opp-top) 4px 0; gap: 6px; }
:where(.vp-land) .gf-row.opprow { min-height: calc(var(--ocw) * var(--part-opp-row-k) + var(--part-opp-row-pad)); }
:where(.vp-land) .opp-side { gap: 4px; }
:where(.vp-land) .opp-side > span, :where(.vp-land) .opp-side > button { width: 40px; height: 44px; }
:where(.vp-land) .opp-side.deck > * { width: 36px; height: 46px; }
:where(.vp-land) .opp-side.deck .opp-lands { width: 44px; }
:where(.vp-land) .opp-side > button.opp-hand, :where(.vp-land) .opp-side.deck > button.opp-hand { margin-top: 0; }
:where(.vp-land) .opp-side > button.opp-hand small { left: 4px; right: auto; top: 2px; text-align: left; }
:where(.vp-land) .actrow { height: 36px; }
:where(.vp-land) .actrow .dot { height: 36px; }
:where(.vp-land) .rail { padding: 6px 6px 4px; margin-top: -4px; gap: 0; }
:where(.vp-land) .rail-opp .opp-panel .life > span:last-child { margin-bottom: 4px; }
:where(.vp-land) .rail-opp .opp-panel .life b { font-size: 22px; }
:where(.vp-land) .rail-opp .opp-panel .opp-name { font-size: 10px; flex-wrap: wrap; }
:where(.vp-land) .rail-opp .opp-panel .chain, :where(.vp-land) #table.has-opp .rail-opp .opp-panel .chain { position: static; align-self: center; margin: 0; }
:where(.vp-land) .rail > .hud { flex: 1 1 auto; padding: 6px 0 0; gap: 4px; }
:where(.vp-land) .rail > .hud .hud-num b { font-size: 22px; }
:where(.vp-land) .rail > .hud .hud-mana { min-height: 14px; }
:where(.vp-land) .rail > .hud .hud-step { padding-top: 4px; }
:where(.vp-land) .rail > .hud .hud-step .dot { height: 18px; }
:where(.vp-land) .rail > .hud .hud-step .hs-name { font-size: 12px; }
:where(.vp-land) .rail > .hud .hud-ctl { margin-top: auto; gap: 2px; }
:where(.vp-land) .rail > .hud .hud-ctl .gf-next { height: 36px; }
:where(.vp-land) .rail > .hud .hud-ctl .icon-btn { height: 34px; min-width: 40px; }
:where(.vp-land) .gf-menu { bottom: 48px; left: 6px; }
#table.has-opp .opp-panel .chain { position: static; align-self: center; }
.card.opp.token .frame { border-style: solid; }

#table > #heat, #table > #arrows, #table > #fx, #table > #flash, #table > #finish, #table > .fx-inv { grid-column: auto; grid-row: auto; }

#arrows g.hov .line { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 8 6; }
#arrows g.hov .under { fill: none; stroke: var(--gold); stroke-width: 9; stroke-linecap: round; opacity: .22; }
#arrows g.hov .head { fill: var(--gold); }
#arrows g.hov.opp .line { stroke: var(--hot); }
#arrows g.hov.opp .under { stroke: var(--hot); }
#arrows g.hov.opp .head { fill: var(--hot); }

.fx-oppcard { position: absolute; border-radius: 4.5% / 3.2%; overflow: hidden; background: var(--card-bg); border: 1.5px solid var(--card-edge); will-change: transform, opacity; pointer-events: none; z-index: var(--z-fx-shown); }
.fx-oppcard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fx-oppcard img[hidden] { display: none; }
.fx-oppcard .fx-oppname { display: none; }
.fx-oppcard.art-missing .fx-oppname { display: block; position: absolute; inset: 12% 8%; font-size: 14px; font-weight: 700; color: var(--ink); text-align: center; }
.fx-oppcard .fx-glow { border-radius: inherit; }
.fx-oppcard.mini { z-index: var(--z-fx-mini); box-shadow: 0 4px 12px #0008; }
.fx-oppcard.mini.art-missing .fx-oppname { font-size: 8px; inset: 10% 4%; }
.fx-show-none { position: absolute; display: flex; align-items: center; justify-content: center; border-radius: 4.5% / 3.2%; border: 1.5px dashed color-mix(in srgb, var(--ink) 40%, transparent); background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--dim); font-size: 11px; font-weight: 700; text-align: center; padding: 6px; box-sizing: border-box; pointer-events: none; z-index: var(--z-fx-mini); will-change: transform, opacity; }
.fx-edge { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--hot); opacity: 0; pointer-events: none; }
.fx-edge.top { bottom: auto; top: 0; background: var(--trig); }
.fx-lightning { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fx-lightning path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fx-lightning .line { stroke: #fff6d0; stroke-width: var(--bolt-w, 3px); }
.fx-lightning .under { stroke: #ffb04a; stroke-width: calc(var(--bolt-w, 3px) * 2.5 + 2.5px); opacity: .35; }
.fx-slash { position: absolute; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #fff0, #fff 30%, #fff 70%, #fff0); transform-origin: 50% 50%; will-change: transform, opacity; pointer-events: none; }
.fx-ring.dark { border-color: #7a4ac8; border-width: 5px; }
.fx-plow { position: absolute; width: 34px; height: 34px; pointer-events: none; will-change: transform, opacity; }
.fx-plow svg { width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fx-sprout { position: absolute; width: 26px; height: 34px; pointer-events: none; will-change: transform, opacity; }
.fx-sprout svg { width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fx-sprout .soil { stroke: #8a6234; stroke-width: 2.2; }
.fx-sprout .stem { stroke: #3dba6a; stroke-width: 2; }
.fx-dmg.bud { color: #3dba6a; }
.fx-dmg.wither { z-index: var(--z-fx-pop); font-size: 20px; color: #e4efc4; text-shadow: 0 0 8px #3f5a1c, 0 2px 0 #1c2a0c; }
.card.fx-tinted .frame { border-color: var(--tint); }
.card .fx-tint { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, var(--tint), color-mix(in srgb, var(--tint) 70%, #000)); mix-blend-mode: color; opacity: .75; }
.fx-pillar { position: absolute; top: 0; transform-origin: 50% 0; pointer-events: none; border-radius: 0 0 45% 45%; background: linear-gradient(90deg, #ffd86a00, #ffe7a0d0 22%, #fffdf4 50%, #ffe7a0d0 78%, #ffd86a00); -webkit-mask-image: linear-gradient(180deg, #0000, #000 35%); mask-image: linear-gradient(180deg, #0000, #000 35%); will-change: transform, opacity; }
.fx-slash.fx-cleave { height: 5px; background: linear-gradient(90deg, #f2c94c00, #f2c94c 20%, #fff 50%, #f2c94c 80%, #f2c94c00); }
.fx-shadow { position: absolute; width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(#000, #0a0612 60%, #0a061200); pointer-events: none; will-change: transform, opacity; }
.fx-shade { position: absolute; border-radius: 10px; background: radial-gradient(#0a0612, #0a0612cc 55%, #0a061200); pointer-events: none; will-change: transform, opacity; }
.fx-shade-dim { position: absolute; inset: 0; background: #07020f; opacity: 0; pointer-events: none; }
.fx-shard.ice { background: linear-gradient(135deg, #e8f6ff, #7cc7f2); }
.fx-gear { position: absolute; width: 70px; height: 70px; border-radius: 50%; border: 4px dashed var(--gold); pointer-events: none; will-change: transform, opacity; }
.fx-shard.ash { width: 6px; height: 6px; border-radius: 50%; background: #8a8590; }
.fx-tide { position: absolute; inset: 0; background: linear-gradient(0deg, #0b4f7a, #1f8fbf 55%, #6fd3ff00); pointer-events: none; will-change: transform, opacity; }
.fx-shard.metal { background: linear-gradient(135deg, #e8e4dc, #8a8f99); }
.fx-rift-dim { position: absolute; inset: 0; background: #07020f; opacity: 0; pointer-events: none; }
.fx-rift { position: absolute; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #c9a8ff00, #c9a8ff 15%, #fff 50%, #c9a8ff 85%, #c9a8ff00); clip-path: polygon(0 40%, 8% 0, 17% 70%, 29% 10%, 41% 90%, 53% 20%, 64% 80%, 76% 0, 88% 75%, 100% 30%, 100% 70%, 88% 100%, 76% 40%, 64% 100%, 53% 60%, 41% 100%, 29% 50%, 17% 100%, 8% 45%, 0 80%); will-change: transform, opacity; pointer-events: none; }
.fx-bar { position: absolute; width: 3px; border-radius: 2px; background: linear-gradient(#fff, #f4ead0 60%, #f4ead080); opacity: 0; will-change: transform, opacity; pointer-events: none; }
.fx-shard { position: absolute; width: 10px; height: 8px; border-radius: 2px; background: #7a6a55; will-change: transform, opacity; pointer-events: none; }
.card.fx-back .frame { background: repeating-linear-gradient(135deg, #2a2118 0 6px, #1c1712 6px 12px); border-color: var(--card-edge); }
.fx-stamp.hot b { color: var(--hot); }
#arrows g.blk .line { fill: none; stroke: var(--hot); stroke-width: 3; stroke-linecap: round; }
#arrows g.atk .line { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
#arrows g.atk .under { fill: none; stroke: var(--gold); stroke-width: 9; stroke-linecap: round; opacity: .18; }
#arrows g.atk .head { fill: var(--gold); }
#arrows g.atk.drag .line { stroke-dasharray: 6 5; }
#arrows g.link .n circle { fill: var(--gold); stroke: #000; stroke-opacity: .55; stroke-width: 1.5; }
#arrows g.link .n text { fill: #1a1206; font-size: 12px; font-weight: 800; text-anchor: middle; dominant-baseline: central; font-variant-numeric: tabular-nums; }
#table.atk-pick .gf-row.perms .card { touch-action: none; }
.card.dragging { z-index: var(--z-card-drag); }
#table.blk-pick .gf-row.perms .card { touch-action: none; }
.card.blk .frame { border-color: var(--hot); border-width: 2px; }
#table.blk-drag .gf-row.oppc .card.opp:not(.blk-ok) { opacity: .4; }
#table.blk-drag .gf-row.oppc .card.opp.blk-ok .frame { box-shadow: 0 0 0 2px var(--hot), 0 0 14px 2px color-mix(in srgb, var(--hot) 60%, transparent); }
#arrows g.blk.drag .line { stroke-dasharray: 6 6; }
.card.in-hand { touch-action: pan-y; }
.gf-row.handrow.reordering .card:not(.hand-drag) { transition: translate 120ms ease-out; }
.card.in-hand.hand-drag { z-index: var(--z-card-drag); transition: none; }
.card.in-hand.hand-drag .frame { box-shadow: 0 8px 18px #000c; }
@media (prefers-reduced-motion: reduce) { .gf-row.handrow.reordering .card:not(.hand-drag) { transition: none; } }
.card.drop-hot .frame, .opp-panel .life.drop-hot { outline: 3px solid var(--gold); outline-offset: 1px; }
.card.reserved .frame, .opp-panel .life.reserved { outline: 2px dashed var(--gold); outline-offset: 1px; }
.card.in-hand.castable { touch-action: none; }
.card.in-hand.cast-drag { z-index: var(--z-card-drag); translate: 0 -14px; transition: none; }
.card.in-hand.cast-drag .frame { border-color: var(--trig); border-width: 2px; box-shadow: 0 8px 18px #000c; }
#table.cast-drag .gf-row.perms .card:not(.cast-ok), #table.cast-drag .gf-row.others .card:not(.cast-ok), #table.cast-drag .gf-row.oppc .card:not(.cast-ok), #table.cast-drag .gf-row.opprow .card:not(.cast-ok) { opacity: .4; }
#table.cast-drag .card.cast-ok .frame, .opp-panel .life.cast-ok, .hud-num.life-me.cast-ok { box-shadow: 0 0 0 2px var(--trig), 0 0 14px 2px color-mix(in srgb, var(--trig) 60%, transparent); }
.hud-num.life-me.drop-hot { outline: 3px solid var(--gold); outline-offset: 1px; border-radius: 8px; }
.card.actable { touch-action: none; }
#table.cast-drag .card.dragging { opacity: 1; }
.card:not(.in-hand).cast-drag .frame { border-color: var(--trig); border-width: 2px; box-shadow: 0 8px 18px #000c; }
#arrows g.cast .line { fill: none; stroke: var(--trig); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 6 5; }
#arrows g.cast .under { fill: none; stroke: var(--trig); stroke-width: 9; stroke-linecap: round; opacity: .2; }
#arrows g.cast .head { fill: var(--trig); }
#arrows g.aim .line { fill: none; stroke: var(--hot); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 8 6; animation: aim-flow 1.1s linear infinite; }
#arrows g.aim .under { fill: none; stroke: var(--hot); stroke-width: 9; stroke-linecap: round; opacity: .25; }
#arrows g.aim .head { fill: var(--hot); }
@keyframes aim-flow { to { stroke-dashoffset: -28; } }
@media (prefers-reduced-motion: reduce) { #arrows g.aim .line { animation: none; stroke-dasharray: none; } }
:is(.actrow, .ask-win) .ask-t.two { white-space: normal; line-height: 1.15; display: flex; flex-direction: column; justify-content: center; }
:is(.actrow, .ask-win) .ask-t.two b { font-size: 13px; }
:is(.actrow, .ask-win) .ask-t.two small { font-size: 11px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(.actrow, .ask-win) .ask-t.two small.ask-n { color: var(--trig); font-weight: 700; }
:is(.actrow, .ask-win) .ask-t.two b:has(.ord) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actrow .ask-t.two.named { flex: 0 1 auto; min-width: min-content; }
.actrow .ask-t.two.named b { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actrow:has(> .ask-t.named) { flex-wrap: wrap; }
.actrow .ask-t.named ~ .chips { flex: 1 1 0; min-width: min(100% - 12px, 240px); max-width: none; overflow-x: auto; scrollbar-width: none; }
.actrow .ask-t.named ~ .chips > .chip { flex: none; }
.actrow .ask-t.named ~ .chips > .chip.fit { flex: 0 1 auto; height: auto; min-height: 32px; padding: 1px 12px; white-space: normal; line-height: 1.05; }
.actrow .ask-t.named ~ .chips.more { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - var(--fade, 32px)), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - var(--fade, 32px)), transparent); }
:where(.vp-phone, .vp-land) .actrow:has(> .ask-t.named) { flex-wrap: nowrap; }
:where(.vp-phone, .vp-land) .actrow .ask-t.named ~ .chips { flex: 0 1 auto; min-width: 0; --chips-narrow: 1; }
:where(.vp-phone, .vp-land) .actrow .ask-t.named ~ .chips > .chip.fit { flex: none; height: 32px; max-width: 100%; padding: 0 10px; white-space: normal; line-height: 1.05; }
.ask-win .ask-t.named ~ .chips > .chip { flex: none; }
.ask-win .ask-t.named ~ .chips > .chip.fit { flex: 0 1 auto; height: auto; min-height: 32px; max-width: 100%; padding: 1px 10px; white-space: normal; line-height: 1.05; }
.ask-win .ask-t.named ~ .chips.more { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - var(--fade, 32px)), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - var(--fade, 32px)), transparent); }
:is(.actrow, .ask-win) .ord { display: inline-block; vertical-align: 1px; margin-right: 6px; padding: 0 6px; border-radius: 4px; font-size: 11px; line-height: 17px; font-weight: 700; color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); }
#arrows g.blk .under { fill: none; stroke: var(--hot); stroke-width: 9; stroke-linecap: round; opacity: .25; }
#arrows g.blk .head { fill: var(--hot); }
#finish.lose { background: radial-gradient(70% 55% at 50% 45%, #000000d9, #00000090 70%, #00000060); pointer-events: none; }
#finish .fin.lose { position: relative; gap: 4px; padding: 24px 20px; }
#finish .fin-art { position: absolute; left: 50%; top: 50%; width: min(70vw, 360px); height: min(70vw, 360px); transform: translate(-50%,-50%); object-fit: cover; border-radius: 50%; opacity: 0; z-index: -1;
  -webkit-mask-image: radial-gradient(circle, #000 30%, #0000 70%); mask-image: radial-gradient(circle, #000 30%, #0000 70%); }
#finish .fin-word { font-size: 22px; font-weight: 700; color: var(--ink); text-shadow: 0 2px 8px #000; opacity: 0; }
#finish .fin-num { margin-top: 10px; font-family: "Chakra Petch", system-ui, sans-serif; font-size: 40px; font-weight: 900; color: var(--hot); line-height: 1; text-shadow: 0 2px 10px #000; opacity: 0; font-variant-numeric: tabular-nums; }
#finish .fin-sub { margin: 0; font-size: 11px; color: var(--dim); opacity: 0; text-shadow: 0 1px 4px #000; }
#finish .fin-num + .fin-sub { margin-top: 2px; }
#finish .fin.lose > .fin-sub:first-of-type:not(.fin-num + .fin-sub) { font-size: 13px; }

.card.hint-fetch { animation: hint-fetch 0.6s ease-in-out 3; z-index: var(--z-card-pulse); }
@keyframes hint-fetch {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242, 200, 110, 0); }
  50% { box-shadow: 0 0 0 3px rgba(242, 200, 110, 0.95), 0 0 18px 6px rgba(242, 200, 110, 0.6); }
}
@media (prefers-reduced-motion: reduce) { .card.hint-fetch { animation: none; box-shadow: 0 0 0 3px rgba(242, 200, 110, 0.95); } }

.rv { --rvw: 60px; display: flex; flex-direction: column; gap: var(--sp-3); padding-bottom: var(--sp-6); }
.rv-head { display: flex; align-items: center; gap: var(--sp-3); min-height: 56px; }
.rv-head .view-title { margin: 0; }
.rv-count { font-size: var(--fs-label); color: var(--dim); font-variant-numeric: tabular-nums; }
.rv-back { gap: 2px; padding-right: var(--sp-2); flex: none; }
.rv-back .ico { width: 20px; height: 20px; }
.rv-h-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rv-h-main b { font-size: var(--fs-title); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-note { color: var(--dim); font-size: var(--fs-body); }
.rv-swap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--sp-3); margin: 0 0 var(--sp-2); font-size: var(--fs-meta); color: var(--dim); }
.rv-swap small { font-size: var(--fs-meta); color: var(--dim); flex: none; }
.rv-swap span { min-width: 0; }
.rv-swap i { font-style: normal; font-weight: 700; color: var(--ink); margin-right: 4px; }
.rv-i-sub { font-size: var(--fs-meta); color: var(--dim); display: inline-flex; align-items: center; gap: 4px; }
.rv-i-res { font-size: var(--fs-label); font-weight: 700; white-space: nowrap; color: var(--dim); flex: none; text-align: right; }
.rv-i-res.win { color: var(--ok); }
.rv-i-res.lose { color: var(--hot); }
.rv-i-res.quit { color: var(--dim); }
.rv-undo-b { display: inline-flex; align-items: center; gap: 1px; color: var(--hot); font-style: normal; font-variant-numeric: tabular-nums; }
.rv-undo-b .ico { width: 12px; height: 12px; }

.rv-list { display: flex; flex-direction: column; background: var(--bg1); border-radius: 8px; }
.rv-list li + li { border-top: 1px solid var(--line); }
.rv-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); min-height: 56px; padding: var(--sp-2) var(--sp-4); color: inherit; text-decoration: none; }
.rv-item:active { background: var(--bg2); }
@media (hover: hover) { .rv-item:hover { background: var(--bg2); } }
.rv-i-when { font-size: var(--fs-meta); color: var(--dim); font-variant-numeric: tabular-nums; line-height: 1.3; }
.rv-i-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rv-i-main b { font-size: var(--fs-body); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rv-turns { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; margin: 0 calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
.rv-turns::-webkit-scrollbar { display: none; }
.rv-tchip { flex: none; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--bg1); border: 1px solid var(--line); color: var(--ink); font-size: var(--fs-label); font-weight: 500; position: relative; font-variant-numeric: tabular-nums; }
.rv-tchip::before { content: ""; position: absolute; inset: -6px 0; }
.rv-tchip.cur { background: var(--gold); border-color: var(--gold); color: #111; font-weight: 700; }
.rv-tchip.rv-fin { border-style: dashed; }
.rv-tchip.has-undo::after { content: ""; position: absolute; right: 4px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--hot); }
.rv-ctl { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; gap: var(--sp-2); }
.rv-nav { height: 52px; border-radius: 8px; background: var(--bg1); border: 1px solid var(--line); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.rv-nav .ico { width: 26px; height: 26px; }
.rv-nav.fwd .ico { transform: rotate(180deg); }
.rv-nav:active { background: var(--bg2); transform: translateY(1px); }
.rv-nav:disabled { opacity: .3; }
.rv-pos { text-align: center; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rv-pos b { font-size: var(--fs-body); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-pos small { font-size: var(--fs-meta); color: var(--dim); font-variant-numeric: tabular-nums; }
.rv-range { width: 100%; height: 28px; margin: 0; accent-color: var(--gold); }
.rv-picked { display: flex; align-items: baseline; gap: var(--sp-2); padding: 6px 10px; border-left: 3px solid var(--gold); background: var(--bg1); border-radius: 6px; min-height: 40px; }
.rv-picked small { font-size: var(--fs-meta); color: var(--dim); flex: none; }
.rv-picked b { font-size: var(--fs-body); font-weight: 700; flex: 1; min-width: 0; }
.rv-picked.failed { border-left-color: var(--hot); }
.rv-judge .rv-pick { display: none; }
.rv-err { margin: 0; padding: var(--sp-2) var(--sp-3); border-left: 3px solid var(--hot); background: color-mix(in srgb, var(--hot) 12%, var(--bg1)); border-radius: 6px; font-size: var(--fs-label); color: var(--ink); }

.rv-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); align-items: start; touch-action: pan-y; }
.rv-board { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.rv-side { background: var(--bg1); border-radius: 8px; padding: var(--sp-3); border-left: 3px solid var(--gold); }
.rv-side.rv-opp { border-left-color: #5aa8ff; }
.rv-stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--sp-4); }
.rv-who { font-size: var(--fs-label); font-weight: 700; margin-right: auto; }
.rv-num { display: inline-flex; align-items: baseline; gap: 4px; }
.rv-num small { font-size: var(--fs-meta); color: var(--dim); }
.rv-num b { font-size: var(--fs-title); font-weight: 700; font-variant-numeric: tabular-nums; }
.rv-num.rv-hot b { color: var(--hot); }
.rv-num.ene b { color: var(--ene); }
.rv-zone { margin-top: var(--sp-2); }
.rv-zh { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin: 0 0 4px; font-size: var(--fs-meta); font-weight: 500; color: var(--dim); }
.rv-lands-n { font-variant-numeric: tabular-nums; font-weight: 500; }
.rv-mark { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 9px; background: var(--bg2); color: var(--dim); }
.rv-mark.open { color: var(--gold); border: 1px solid var(--gold); background: transparent; }
.rv-mark.keep { color: var(--ok); border: 1px solid var(--ok); background: transparent; }
.rv-cards { display: grid; grid-template-columns: repeat(auto-fill, var(--rvw)); gap: 6px; min-height: 8px; }
.rv-card { position: relative; width: var(--rvw); aspect-ratio: 1 / 1.15; border-radius: 6px; overflow: hidden; background: var(--card-bg); border: 1.5px solid var(--card-edge); padding: 0; color: inherit; text-align: left; }
.rv-card img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.rv-card.token { border-style: dashed; border-color: #6b6255; }
.rv-card.tapped { opacity: .45; }
.rv-card.is-bottom { opacity: .5; }
.rv-card.is-pick { outline: 2px solid var(--gold); outline-offset: 2px; z-index: 1; }
.rv-card:active { transform: scale(.97); }
.rv-nm { position: absolute; left: 0; right: 0; top: 0; padding: 2px 4px 8px; font-size: 10px; font-weight: 700; line-height: 1.2; color: #f2f6f8; background: linear-gradient(#000000d0, #00000000); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-pt { position: absolute; right: 2px; bottom: 2px; min-width: 24px; text-align: center; padding: 0 4px; border-radius: 4px; border: 1px solid var(--pt-edge); background: var(--pt-face); color: var(--pt-ink); font-weight: 900; font-size: 11px; font-variant-numeric: tabular-nums; }
.rv-tag { position: absolute; left: 2px; bottom: 2px; font-size: 9px; font-weight: 700; padding: 0 5px; border-radius: 6px; background: var(--bg0); color: var(--gold); border: 1px solid var(--gold); line-height: 14px; }
.rv-landrow { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rv-landrow:empty { display: none; }
.rv-land { font-size: var(--fs-meta); padding: 3px 7px; border-radius: 4px; background: var(--bg2); color: var(--ink); white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.rv-land.tapped { opacity: .4; }
.rv-none { color: var(--dim); font-size: var(--fs-label); }

.rv-judge { background: var(--bg1); border-radius: 8px; padding: var(--sp-3); min-width: 0; }
.rv-ask { margin: 0 0 6px; font-size: var(--fs-meta); color: var(--dim); }
.rv-pick { border-left: 3px solid var(--gold); background: var(--bg2); border-radius: 6px; padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; }
.rv-pick small { font-size: var(--fs-meta); color: var(--dim); }
.rv-pick b { font-size: var(--fs-body); font-weight: 700; }
.rv-pick.failed { border-left-color: var(--hot); }
.rv-jh { display: flex; align-items: center; justify-content: space-between; margin: var(--sp-3) 0 2px; font-size: var(--fs-meta); font-weight: 500; color: var(--dim); }
.rv-opts { display: flex; flex-direction: column; }
.rv-opts li { padding: 7px 0 7px 16px; border-top: 1px solid var(--line); font-size: var(--fs-label); position: relative; }
.rv-opts li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--dim); }
.rv-undone { margin-top: var(--sp-3); border: 1px dashed color-mix(in srgb, var(--hot) 60%, transparent); border-radius: 6px; }
.rv-undone-h { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 40px; padding: 0 10px; background: none; border: 0; color: var(--ink); font-size: var(--fs-label); text-align: left; }
.rv-undone-h .ico:first-child { color: var(--hot); width: 18px; height: 18px; flex: none; }
.rv-undone-h span { flex: 1; }
.rv-undone-h .ico:last-child { color: var(--dim); transition: transform 100ms ease-out; }
.rv-undone.open .rv-undone-h .ico:last-child { transform: rotate(180deg); }
.rv-undone-l { margin: 0; padding: 0 12px 10px 34px; font-size: var(--fs-label); color: var(--dim); display: flex; flex-direction: column; gap: 4px; }
.rv-undone-l li { text-decoration: line-through; text-decoration-color: var(--hot); }
.rv-om { display: flex; flex-direction: column; gap: 4px; }
.rv-om li { font-size: var(--fs-label); padding: 3px 0 3px 10px; border-left: 2px solid #5aa8ff; }
.rv-final { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--sp-4) 0; text-align: center; }
.rv-final small, .rv-final-life small { font-size: var(--fs-meta); color: var(--dim); }
.rv-final > b { font-size: 24px; font-weight: 700; }
.rv-final > b.win { color: var(--ok); }
.rv-final > b.lose { color: var(--hot); }
.rv-final-life { display: flex; align-items: baseline; gap: 6px; font-size: var(--fs-title); font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 4px; }
.rv-vs { color: var(--dim); font-weight: 500; }

.rv-mull { display: flex; flex-direction: column; gap: var(--sp-2); }
.rv-mull .rv-zone { background: var(--bg1); border-radius: 8px; padding: var(--sp-3); margin: 0; }

:where(.vp-desk) .rv { --rvw: 76px; }
:where(.vp-desk) .rv-body { grid-template-columns: minmax(0, 1fr) 360px; }
:where(.vp-desk) .rv-judge { position: sticky; top: var(--sp-3); }
:where(.vp-desk) .rv-turns { margin: 0; padding-inline: 0; }
:where(.vp-pc-narrow) .rv { --rvw: 68px; }
:where(.vp-land) .rv-body { grid-template-columns: minmax(0, 1fr) 280px; }
:where(.vp-land) .rv-nav { height: 44px; }

.sp { display: flex; flex-direction: column; gap: var(--sp-3); padding-bottom: var(--sp-6); }
.sp-head { display: flex; align-items: center; gap: var(--sp-3); min-height: 56px; }
.sp-head .view-title { margin: 0; }
.sp-note { color: var(--dim); font-size: var(--fs-body); }
.sp-vs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 6px 0; margin: 0 calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
.sp-vs::-webkit-scrollbar { display: none; }
.sp-chip { flex: none; }
.sp-vs .chip:first-child, .vs-row .chip:first-child { border-color: var(--line); }
.sp-vs .chip[aria-checked="true"] { background: var(--gold); border-color: var(--gold); color: #111; font-weight: 700; }
.sp-chip.has::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.sp-chip[aria-checked="true"].has::after { background: #111; }
.sp-add { border-style: dashed; color: var(--dim); gap: 2px; }
.sp-add .ico { width: 14px; height: 14px; }
.sp-plan { display: flex; flex-direction: column; gap: var(--sp-2); }
.sp-top { display: flex; flex-direction: column; gap: var(--sp-2); }
.sp-name { font-size: var(--fs-title); font-weight: 700; display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.sp-opp { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 9px; border: 1px solid var(--trig); color: var(--trig); }
.sp-name-l { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-meta); color: var(--dim); }
.sp-name-in { height: 40px; padding: 0 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: var(--fs-body); font-weight: 700; width: min(100%, 360px); }
.sp-name-in:focus-visible { outline: 2px solid var(--trig); outline-offset: 0; }
.sp-ctl { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.sp-split[aria-checked="true"] { background: var(--gold); border-color: var(--gold); color: #111; }
.sp-side { width: 160px; height: 32px; }
.sp-remove { margin-left: auto; }
.sp-err { margin: 0; padding: 6px 10px; border-left: 3px solid var(--hot); background: color-mix(in srgb, var(--hot) 12%, var(--bg1)); border-radius: 6px; font-size: var(--fs-label); }
.sp-ok { margin: 0; font-size: var(--fs-label); color: var(--ok); }
.sp-sum { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 12px; background: var(--bg1); border-radius: 8px; font-size: var(--fs-label); }
.sp-sum-i b { font-variant-numeric: tabular-nums; }
.sp-sum-i.out b { color: var(--hot); }
.sp-sum-i.in b { color: var(--ok); }
.sp-arrow { color: var(--dim); }
.sp-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
.sp-col { background: var(--bg1); border-radius: 8px; padding: var(--sp-2) var(--sp-3); }
.sp-colh { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 6px 0; font-size: var(--fs-meta); font-weight: 500; color: var(--dim); }
.sp-total { font-variant-numeric: tabular-nums; color: var(--ink); }
.sp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 96px; align-items: center; gap: var(--sp-2); min-height: 44px; border-top: 1px solid var(--line); }
.sp-row.on { background: color-mix(in srgb, var(--gold) 8%, transparent); margin: 0 calc(-1 * var(--sp-3)); padding: 0 var(--sp-3); }
.sp-row.on + .sp-row.on { border-top-color: transparent; }
.sp-cardbtn { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 44px; padding: 0; background: none; border: 0; color: var(--ink); text-align: left; font-size: var(--fs-label); }
.sp-cname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-cost { flex: none; display: flex; }
.sp-have { font-size: var(--fs-meta); color: var(--dim); font-variant-numeric: tabular-nums; }
.sp-row .pill { width: 96px; }
@media (pointer: coarse) { .sp-row .pill { width: 108px; } }
.sp-row .pill button[aria-disabled="true"] { opacity: .3; pointer-events: none; }
.sp-row .pill-n.on { color: var(--gold); }
:where(.vp-pc-width) .sp-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
:where(.vp-pc-width) .sp-vs { flex-wrap: wrap; overflow: visible; margin: 0; padding-inline: 0; }
:where(.vp-land) .sp-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

.vs-row { display: flex; gap: 6px; flex-wrap: wrap; }
.vs-row .chip[aria-checked="true"] { background: var(--gold); border-color: var(--gold); color: #111; font-weight: 700; }
.vs-bad { margin: 4px 0 0; font-size: var(--fs-meta); color: var(--hot); flex: 1 1 100%; }
.mull .vs-row { margin: 0 0 var(--sp-2); }
.mull-status .tag.vs, .mull-status .tag.ord { color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); background: transparent; }
.gf-deckn .vs-after { color: var(--gold); }
.gf-opp-seg button[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.spell-text { height: 96px; font-size: 12px; word-break: break-all; }
.spell-in { height: 72px; }
.spell-result { display: flex; flex-direction: column; gap: var(--sp-2); }
.spell-result:empty { display: none; }
.spell-err { margin: 0; padding: 6px 10px; border-left: 3px solid var(--hot); background: color-mix(in srgb, var(--hot) 12%, var(--bg2)); border-radius: 6px; font-size: var(--fs-label); }
.spell-warn { margin: 0; padding: 6px 10px; border-left: 3px solid var(--gold); background: var(--bg2); border-radius: 6px; font-size: var(--fs-label); }
.spell-diff { display: flex; flex-direction: column; }
.spell-diff li { padding: 6px 0 6px 16px; border-top: 1px solid var(--line); font-size: var(--fs-label); position: relative; }
.spell-diff li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

.ztag { position: absolute; left: 3px; right: 3px; bottom: 3px; padding: 1px 5px; border-radius: 6px; background: #0f0d0af0; border: 1px solid var(--gold); color: var(--gold); font-size: 9px; font-weight: 700; font-style: normal; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; font-variant-numeric: tabular-nums; }
.ztile.is-down img { opacity: .18; }
.ztile.is-down::before { content: ""; position: absolute; inset: 8px; border: 1.5px dashed var(--dim); border-radius: 6px; }

.art-row { display: flex; align-items: center; gap: var(--sp-3); margin: -6px auto 0; width: min(100% - 32px, 288px); }
.art-row[hidden] { display: none; }
.ap { padding: 0 var(--sp-4) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }
.ap-head { display: flex; align-items: center; justify-content: space-between; margin-left: -6px; }
.ap-back .ico { width: 18px; height: 18px; margin-right: 2px; }
.ap-reset { color: var(--hot); margin-right: 6px; }
.ap-title { font-size: var(--fs-title); font-weight: 700; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.ap-title small { font-size: var(--fs-label); color: var(--dim); font-weight: 500; }
.ap-wait, .ap-err { margin: var(--sp-4) 0; font-size: var(--fs-label); color: var(--dim); display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.ap-err { color: var(--hot); }
.ap-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--gold); animation: bw-spin .8s linear infinite; flex: none; }
.ap-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.ap-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; border-radius: 8px; min-width: 0; }
.ap-tile:active { transform: translateY(1px); }
.ap-img { display: block; position: relative; overflow: hidden; border-radius: 8px; background: var(--bg2); aspect-ratio: 5 / 4; border: 1px solid var(--line); }
.ap-img img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 200ms ease-out; }
.ap-img.is-in img { opacity: 1; }
.ap-img:not(.is-in):not(.is-err)::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, #ffffff0c 50%, transparent 70%); background-size: 200% 100%; animation: ap-shimmer 1.4s linear infinite; }
.ap-img.is-err::after { content: attr(data-fail); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: var(--fs-meta); color: var(--dim); }
.ap-tile.is-now .ap-img { outline: 2px solid var(--gold); outline-offset: 2px; }
.ap-now { position: absolute; top: 6px; left: 6px; padding: 1px 7px; border-radius: 6px; background: var(--gold); color: #111; font-size: var(--fs-meta); font-weight: 700; font-style: normal; }
.ap-meta { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-meta); line-height: 1.35; min-width: 0; }
.ap-meta b { font-weight: 600; font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-meta small { color: var(--dim); font-size: var(--fs-meta); font-variant-numeric: tabular-nums; }
@keyframes ap-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ap-img::before, .ap-spin { animation: none; } }
@media (hover: hover) { .ap-tile:hover .ap-img { border-color: var(--dim); } }

.mull-sub { display: flex; justify-content: flex-end; margin-top: -4px; }
.inf-switch { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 4px; background: none; border: 0; color: var(--text-2, inherit); font: inherit; font-size: 13px; cursor: pointer; }
.inf-track { position: relative; width: 38px; height: 22px; border-radius: 11px; background: var(--line, #3a3530); transition: background .15s; flex: none; }
.inf-knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text, #eee); transition: transform .15s; }
.inf-switch[aria-checked="true"] .inf-track { background: var(--gold, #d4b15a); }
.inf-switch[aria-checked="true"] .inf-knob { transform: translateX(16px); background: #1a1714; }
.inf-switch[aria-checked="true"] .inf-label { color: var(--gold, #d4b15a); }
.mull-status .tag.inf { color: var(--gold, #d4b15a); }
:where(.vp-slim) .inf-label { font-size: 12px; }

.welcome {
  position: fixed; inset: 0; z-index: var(--z-welcome);
  display: flex; align-items: center; justify-content: center;
  padding: max(var(--sp-4), env(safe-area-inset-top)) max(var(--sp-4), env(safe-area-inset-right)) max(var(--sp-4), env(safe-area-inset-bottom)) max(var(--sp-4), env(safe-area-inset-left));
  background: rgb(10 8 6 / .7);
  opacity: 0; transition: opacity 150ms ease-out;
}
.welcome.is-in { opacity: 1; }
.welcome:focus { outline: none; }
.wl-card {
  display: flex; flex-direction: column;
  width: min(480px, 100%); max-height: min(92dvh, 100%);
  background: var(--bg1); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 48px #000c;
  transform: translateY(8px); transition: transform 150ms var(--ease-sheet);
}
.welcome.is-in .wl-card { transform: none; }
.wl-body {
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-5) var(--sp-3);
  overflow-y: auto; overscroll-behavior: contain; min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.wl-kicker { font-size: var(--fs-meta); font-weight: 700; letter-spacing: .08em; color: var(--gold); }
.wl-title { font-size: var(--fs-h); font-weight: 700; line-height: 1.25; margin-top: -6px; }
.wl-list { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-label); line-height: 1.45; color: var(--dim); }
.wl-list li { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); column-gap: var(--sp-2); }
.wl-list b { color: var(--ink); font-weight: 700; }
.wl-row { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3) 0 0; border-top: 1px solid var(--line); }
.wl-seg { max-width: 320px; }
.wl-transfer .row-foot { flex-wrap: nowrap; }
.wl-transfer .btn { flex: none; }
.wl-spell { padding: var(--sp-2) 0 0; }
.wl-spell .spell-in-row { padding: var(--sp-2) 0 0; }
.wl-spell .spell-in { height: 64px; }
.wl-note { font-size: var(--fs-label); line-height: 1.5; color: var(--dim); }
.wl-fan { font-size: var(--fs-label); line-height: 1.5; color: var(--dim); }
.wl-steps { font-size: var(--fs-label); line-height: 1.5; color: var(--ink); font-weight: 700; }
.wl-home .btn { align-self: flex-start; }
.wl-foot {
  flex: none; padding: var(--sp-3) var(--sp-5) var(--sp-5);
  border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end;
}
.wl-start { min-width: 160px; justify-content: center; height: 44px; }
:where(.vp-band) .welcome { align-items: flex-end; padding: 0; }
:where(.vp-band) .wl-card { width: 100%; max-height: 92dvh; border-radius: 14px 14px 0 0; border-bottom: 0; transform: translateY(100%); }
:where(.vp-band) .wl-body { padding: var(--sp-4) var(--sp-4) var(--sp-3); }
:where(.vp-band) .wl-foot { padding: var(--sp-3) var(--sp-4) max(var(--sp-4), env(safe-area-inset-bottom)); }
:where(.vp-band) .wl-start { width: 100%; }
:where(.vp-band) .wl-transfer .row-foot { flex-wrap: wrap; }
:where(.vp-land) .welcome { align-items: center; padding: var(--sp-2); }
:where(.vp-land) .wl-card { width: min(560px, 100%); max-height: 96dvh; border-radius: 12px; border-bottom: 1px solid var(--line); transform: translateY(8px); }
:where(.vp-land) .wl-body { padding: var(--sp-3) var(--sp-4) var(--sp-2); gap: var(--sp-2); }
:where(.vp-land) .wl-foot { padding: var(--sp-2) var(--sp-4) max(var(--sp-3), env(safe-area-inset-bottom)); }
@media (prefers-reduced-motion: reduce) { .welcome, .wl-card { transition: none; } }

.wl-pol { margin-top: calc(-1 * var(--sp-2)); }
.welcome.pol { z-index: var(--z-welcome-top); }
.pol-card { width: min(420px, 100%); }
.pol-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.pol-link {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 56px; padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--line);
}
.pol-link b { font-size: var(--fs-body); font-weight: 700; color: var(--trig); }
@media (hover: hover) {
  .pol-link:hover b { text-decoration: underline; text-underline-offset: 3px; }
}

.seg button.has-flag { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.flag { flex: none; width: 18px; height: 12px; border-radius: 2px; overflow: hidden; }

.welcome.res { z-index: var(--z-welcome-result); }
.res-card { width: min(420px, 100%); }
.res-body { gap: var(--sp-2); }
.res-line { font-size: var(--fs-h); font-weight: 700; line-height: 1.3; color: var(--ink); }
.res-line.win { color: var(--gold); }
.res-sub { display: flex; flex-wrap: wrap; gap: 4px var(--sp-3); font-size: var(--fs-label); color: var(--dim); }
.res-rec { font-size: var(--fs-label); color: var(--gold); padding-left: 14px; position: relative; }
.res-rec::before { content: ""; position: absolute; left: 2px; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.res-btns { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding-top: var(--sp-2); }
.res-btns .btn { flex: 1 1 auto; justify-content: center; }
.res-foot { padding-top: var(--sp-3); }
.res-feedback { display: flex; justify-content: center; }
.res-feedback :is(button, a) { display: inline-flex; align-items: center; min-height: 44px; border: 0; background: none; color: var(--dim); font: 13px var(--font-prose); text-decoration: none; cursor: pointer; }
.res-feedback :is(button, a):is(:hover, :focus-visible) { text-decoration: underline; text-underline-offset: 3px; }
.res-feedback button:disabled { opacity: .55; cursor: default; }
.welcome.feedback-window { z-index: var(--z-welcome-top); }
.feedback-card { width: min(420px, 100%); max-height: min(92dvh, 100%); overflow: hidden; }
.feedback-body { min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.feedback-body label { color: var(--ink); font-size: var(--fs-label); }
.feedback-body select, .feedback-body textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; background: var(--bg2); color: var(--ink); font: 16px/1.45 var(--font-prose); padding: 9px; }
.feedback-body textarea { min-height: 96px; resize: vertical; }
.feedback-body p { margin: 0; font-size: var(--fs-label); overflow-wrap: anywhere; }
.feedback-count { text-align: right; color: var(--dim); }
.feedback-note { color: var(--ink); }
.feedback-summary { color: var(--dim); }
.feedback-state { color: var(--hot); min-height: 1.4em; }
.feedback-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.feedback-actions { display: flex; justify-content: flex-end; gap: 8px; width: 100%; }
.feedback-foot a { color: var(--dim); font-size: var(--fs-label); min-height: 32px; display: inline-flex; align-items: center; }
:where(.vp-band) .feedback-card { width: 100%; }
:where(.vp-land) .feedback-card { width: min(560px, calc(100% - 16px)); max-height: calc(100dvh - 16px); overflow: hidden; }
:where(.vp-land) .feedback-body { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 3px 10px; padding: 8px 10px 4px; overflow: hidden; }
:where(.vp-land) .feedback-body .wl-title { grid-column: 1 / -1; margin: 0; font-size: 18px; }
:where(.vp-land) .feedback-body label[for="feedback-kind"] { grid-column: 1; grid-row: 2; }
:where(.vp-land) .feedback-body label[for="feedback-message"] { grid-column: 2; grid-row: 2; }
:where(.vp-land) .feedback-body select { grid-column: 1; grid-row: 3; height: 44px; padding: 6px; }
:where(.vp-land) .feedback-body textarea { grid-column: 2; grid-row: 3; height: 68px; min-height: 68px; resize: none; padding: 6px; }
:where(.vp-land) .feedback-count { grid-column: 2; grid-row: 4; }
:where(.vp-land) .feedback-note { grid-column: 1; grid-row: 4; }
:where(.vp-land) .feedback-summary, :where(.vp-land) .feedback-state, :where(.vp-land) .feedback-body [data-feedback="recheck"] { grid-column: 1 / -1; }
:where(.vp-land) .feedback-body :is(.feedback-note, .feedback-summary, .feedback-state) { font-size: 11px; line-height: 1.3; }
:where(.vp-land) .feedback-state { min-height: 1.3em; }
:where(.vp-land) .feedback-body [data-feedback="recheck"] { min-height: 32px; }
:where(.vp-land) .feedback-foot { gap: 2px; padding: 4px 10px 6px; }
:where(.vp-land) .feedback-actions .btn { height: 44px; }
:where(.vp-land-low) .feedback-body { gap: 2px 8px; padding: 5px 8px 2px; }
:where(.vp-land-low) .feedback-body .wl-title { font-size: 16px; }
:where(.vp-land-low) .feedback-body :is(.feedback-note, .feedback-summary, .feedback-state) { font-size: 10px; }
:where(.vp-land-low) .feedback-body textarea { height: 52px; min-height: 52px; }
:where(.vp-land-low) .feedback-foot { padding: 2px 8px 4px; }
:where(.vp-land-low) .feedback-actions .btn { height: 32px; }
:where(.vp-portrait-low) .feedback-card { overflow: auto; }
:where(.vp-portrait-low) .feedback-body { overflow: visible; flex: none; }

.ad-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ad-slot[hidden] { display: none; }
.ad-label { align-self: flex-start; font-size: 10px; line-height: 14px; letter-spacing: .1em; color: var(--dim); font-weight: 500; }
.ad-box { position: relative; display: block; width: var(--ad-w); height: var(--ad-h); max-width: 100%; }
.ad-box ins.adsbygoogle { display: block; width: var(--ad-w); height: var(--ad-h); }
.ad-slot[data-state="mock"] .ad-box { display: grid; place-items: center; outline: 1px dashed var(--muted); outline-offset: -1px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

.res-card { --res-ad-gap: 52px; --res-ad-h: calc(141px + var(--res-ad-gap)); }
.res-ad {
  --ad-w: 320px; --ad-h: 100px;
  flex: none;
  margin-bottom: var(--res-ad-gap);
  padding: 8px var(--sp-5) 12px;
  background: var(--bg0);
  border-bottom: 1px solid var(--line);
  border-radius: 13px 13px 0 0;
}
.res-card.has-ad { margin-top: calc(-1 * var(--res-ad-h)); }
.res-ad-probe { flex: none; height: var(--res-ad-h); }
:where(.vp-band) .res-ad { padding-inline: var(--sp-4); }
:where(.vp-band) .res-card.has-ad { margin-top: 0; }
:where(.vp-land) .res-ad { display: none; }
:where(.vp-land) .res-card.has-ad { margin-top: 0; }

.sheet-content { display: contents; }
.sheet-ad {
  --ad-w: 300px; --ad-h: 250px;
  margin: var(--sp-2) var(--sp-4) 0;
  padding: var(--sp-3) 0 var(--sp-2);
  border-top: 1px solid var(--line);
}
.sheet-ad.is-off { display: none; }

.mull-ad {
  --ad-w: 320px; --ad-h: 100px;
  width: min(100%, 320px);
  margin-top: 150px;
  margin-inline: auto;
  padding-bottom: var(--sp-6);
}
.mull-view:has(+ .mull-ad:not([hidden])) .mull-side { min-height: 0; }
:where(.vp-land) .mull-ad { display: none; }

.fb-kind { max-width: 320px; }
.fb-text { height: 120px; font: 15px / 1.5 var(--font-prose); }
.fb-attach { display: flex; align-items: center; gap: 8px; font-size: var(--fs-label); color: var(--ink); min-height: 32px; }
.fb-attach input { width: 18px; height: 18px; accent-color: var(--gold); margin: 0; }
.fb-meta { flex: 1 1 200px; }
.fb-pending[hidden] { display: none; }
.fb-pending .hint { color: var(--hot); }

.gf-level-row { align-items: center; }
.gf-level-note { flex: 1 1 200px; margin: 0; }
.tag.cheat { color: var(--hot); border-color: color-mix(in srgb, var(--hot) 55%, var(--line)); font-weight: 700; }
.res-sub .tag.cheat { margin: 0; }

#table .card.fx-aimed { z-index: var(--z-card-aimed); }
#table .card.fx-aimed .frame { box-shadow: 0 0 0 2px #ff5a4a, 0 0 16px 4px color-mix(in srgb, #ff5a4a 70%, transparent); }
.hint:empty, :is(.actrow, .ask-win) .ask-t small:empty { display: none; }
.deck-pick { display: flex; align-items: center; gap: var(--sp-2); padding: 6px var(--sp-2) 0; flex: none; }
.deck-pick-seg { flex: 1; min-width: 0; height: 36px; }
.deck-pick-seg button { min-width: 0; padding: 0 8px; }
.deck-pick-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-pick-add, .deck-pick-del { flex: none; }
.deck-pick-del { color: var(--dim); }
.btn.hot { border-color: var(--hot); color: var(--hot); }
.over-list { display: grid; gap: 0; margin: var(--sp-2) 0 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.over-item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  min-height: 56px; padding: 0 var(--sp-4); border: 0; background: var(--bg2); color: var(--ink); text-align: left;
}
.over-item + .over-item { border-top: 1px solid var(--line); }
.over-item:active { background: var(--bg1); transform: translateY(1px); }
.over-name { display: flex; align-items: baseline; gap: var(--sp-2); min-width: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.over-cur { font-size: 11px; color: var(--gold); flex: none; }
.over-n { color: var(--dim); flex: none; font-size: 13px; font-variant-numeric: tabular-nums; }
.deck-name-in { flex: 1; min-width: 0; }
.io-fmt { width: 100%; height: 36px; flex: none; }
.io-code {
  flex: none; min-height: 44px; padding: 10px 12px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  font: 13px / 1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--ink);
  word-break: break-all; user-select: text; -webkit-user-select: text;
}
.iopanel.export .io-foot { margin-top: 0; }
:where(.vp-land) .iopanel.export .io-img.is-ready { align-self: center; max-width: 100%; }
:where(.vp-land) .iopanel.export .io-img canvas { width: auto; max-width: 100%; max-height: calc(100dvh - 180px); }
.io-foot-note { font-size: var(--fs-label); color: var(--dim); min-width: 0; }
.io-btns { display: flex; gap: var(--sp-2); }
.io-img { flex: none; display: grid; place-items: center; min-height: 160px; aspect-ratio: 4 / 3; background: var(--bg2); border-radius: 8px; overflow: hidden; }
.io-img span { font-size: 11px; color: var(--dim); }
.io-img.is-ready { aspect-ratio: auto; min-height: 0; background: none; border: 1px solid var(--line); }
.io-img canvas { display: block; width: 100%; height: auto; }
.iopanel.adddeck .io-body { padding-top: var(--sp-4); gap: var(--sp-2); }
.add-title { font-size: 17px; font-weight: 700; color: var(--ink); }
.add-name { font-size: 15px; color: var(--ink); }
.add-name.is-none { color: var(--dim); }
.add-count { font-size: 13px; color: var(--dim); }
.add-count b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.add-dup { font-size: 13px; color: var(--dim); }
.add-body .io-h { margin-top: var(--sp-2); }
.add-list { display: grid; gap: 2px; }
.add-list li { display: flex; gap: var(--sp-3); font-size: 13px; line-height: 1.6; }
.add-q { flex: none; width: 2ch; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 700; }
.add-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-two { display: flex; gap: var(--sp-2); }
:where(.vp-band) .iopanel.adddeck { height: auto; max-height: 92dvh; }
:where(.vp-band) .iopanel.adddeck .sheet-grab { display: block; }
.name-field { position: relative; display: block; }
.name-field input {
  width: 100%; height: 40px; padding: 0 10px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; color: var(--ink); user-select: text; -webkit-user-select: text;
}
@supports (-webkit-touch-callout: none) { .name-field input { font-size: 16px; } }
.name-field input::placeholder { color: var(--dim); }
.name-bar {
  position: absolute; left: 1px; right: 1px; bottom: 1px; height: 2px; border-radius: 0 0 8px 8px;
  background: var(--dim); transform-origin: left; transform: scaleX(var(--used, 0)); transition: transform 120ms, background-color 120ms;
}
.name-bar.is-full { background: var(--gold); }

.iopanel.story { padding-top: 0; }
.iopanel.story .lg-close { position: absolute; right: max(6px, env(safe-area-inset-right)); top: calc(6px + env(safe-area-inset-top)); z-index: 3; display: none; }
:where(.vp-wide-land) .iopanel.story { padding-top: calc(48px + env(safe-area-inset-top)); } :where(.vp-wide-land) .iopanel.story .lg-close { display: inline-flex; }
:where(.vp-band) .iopanel.story { height: min(78dvh, 680px); }
.lg-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; -webkit-overflow-scrolling: touch; }
.lg-turn { position: sticky; top: 0; z-index: 2; flex: none; display: flex; align-items: center; gap: 8px; height: 30px; margin: 6px -12px 2px; padding: 0 12px; background: var(--bg1); font-size: 13px; }
.lg-turn::before { content: ""; width: 3px; height: 16px; border-radius: 2px; background: var(--gold); }
.lg-turn.opp::before { background: var(--trig); }
.lg-turn b { font-weight: 700; }
.lg-turn .lg-lf { margin-left: auto; display: flex; gap: 10px; font-size: 12px; color: var(--dim); }
.lg-turn .lg-lf > span { display: inline-flex; align-items: center; gap: 3px; }
.lg-turn .lg-lf b { color: var(--ink); font-variant-numeric: tabular-nums; }
.lg-h { width: 11px; height: 11px; fill: var(--gold); flex: none; }
.lg-h.opp { fill: var(--trig); }
.lg-step { flex: none; font-size: 11px; color: var(--dim); padding: 6px 0 0 14px; }
.lg-row {
  position: relative; flex: none; display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 6px 10px 6px 10px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 8px;
  background: var(--bg2); overflow: hidden; text-align: left; width: 100%; color: var(--ink); font: inherit;
}
.lg-row.opp { border-left-color: var(--trig); }
button.lg-row:active { background: var(--bg0); }
.lg-row.kid { margin-left: 22px; width: calc(100% - 22px); min-height: 40px; background: var(--bg1); overflow: visible; }
.lg-row.kid::before { content: ""; position: absolute; left: -14px; top: -8px; width: 10px; height: calc(50% + 8px); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0 0 0 6px; }
.lg-row .txt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; font-family: var(--font-prose); position: relative; z-index: 1; }
.lg-row .txt small { display: block; font-size: 12px; color: var(--dim); margin-top: 1px; }
.lg-row .txt em { font-style: normal; font-weight: 700; }
.lg-row .txt .pip { vertical-align: -2px; }
.lg-row.kid .txt { font-size: 13px; }
.lg-row .lf { flex: none; position: relative; z-index: 1; display: flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lg-row .lf .lg-h { width: 12px; height: 12px; }
.lg-row .lf.dn { color: var(--hot); }
.lg-row .lf.up { color: var(--ok); }
.lg-row .lg-art { position: absolute; right: 0; top: 0; bottom: 0; width: 72px; overflow: hidden; border-radius: 0 7px 7px 0; }
.lg-row .lg-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lg-row .lg-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg2) 0, #0000 45%); }
.lg-row.kid .lg-art { width: 56px; }
.lg-row.kid .lg-art::after { background: linear-gradient(90deg, var(--bg1) 0, #0000 45%); }
.lg-row.has-art { padding-right: 76px; }
.lg-row.kid.has-art { padding-right: 60px; }
.lg-row.has-art .lf { margin-right: -2px; }
.lg-row .lg-arts { position: absolute; right: 0; top: 0; bottom: 0; display: flex; }
.lg-row .lg-arts img { flex: none; width: 40px; height: 100%; object-fit: cover; display: block; }
.lg-row .lg-arts img + img { margin-left: -16px; box-shadow: -2px 0 0 var(--bg2), -6px 0 8px #000a; }
.lg-row .lg-arts::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, var(--bg2) 0, #0000 30%); }
.lg-row .lg-arts i { position: absolute; z-index: 1; right: 4px; bottom: 4px; padding: 1px 5px; border-radius: 8px; background: #000c; font-style: normal; font-size: 11px; font-weight: 700; line-height: 1.3; }
.lg-row.a1 { padding-right: 52px; }
.lg-row.a2 { padding-right: 68px; }
.lg-row.a3 { padding-right: 92px; }

.iopanel.import .io-foot { justify-content: flex-end; }

#table.stack-layout {
  --stackw: clamp(208px, 18vw, 248px);
  grid-template-columns: var(--railw) minmax(0, 1fr) var(--stackw);
  grid-template-rows: minmax(96px, 1fr) var(--part-act) calc(var(--ch) + var(--part-hand-pad));
  grid-template-areas: "rail board stack" "rail act stack" "rail hand stack";
  overflow-y: auto;
}
#table.stack-layout.stack-inline:is(.land-rail, .pc-rail) { grid-template-columns: var(--railw) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) var(--part-stack) var(--part-act) calc(var(--ch) + var(--part-hand-pad)); grid-template-areas: "rail board" "rail stack" "rail act" "rail hand"; }
#table.stack-layout > .rail { grid-area: rail; min-height: 0; }
#table.stack-layout.pc-rail { overflow: hidden; }
#table.stack-layout.pc-rail > .rail { overflow: hidden; }
#table.stack-layout.pc-rail.stack-side > .stk-panel { max-height: calc(100% - 8px); display: flex; flex-direction: column; }
#table.stack-layout.pc-rail.stack-side > .stk-panel .stk-list { flex: 1 1 auto; min-height: 0; }
.battle-scroll > .field { padding-bottom: var(--part-field-bottom); }
#table.stack-layout > .battle-scroll { grid-area: board; }
#table.stack-layout > .actrow { grid-area: act; min-height: var(--part-act); height: auto; align-self: end; }
#table.stack-layout > .actrow:has(> .ask-t.named) { z-index: var(--z-ask-win); background: var(--bg1); }
#table.stack-layout > .gf-row.handrow { grid-area: hand; }
#table.stack-layout > .stk-panel { grid-area: stack; align-self: end; }
#table.stack-side > .stk-panel { margin-bottom: var(--stk-bottom-gap, 8px); }
#table.stack-inline > .stk-panel { margin-bottom: 0; }
.battle-scroll { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: var(--part-board-gap); overflow: clip; }
.battle-scroll > .opprow-wrap { flex: none; }
.battle-scroll > .field { flex: 1 0 auto; min-height: min-content; }
#table.stack-layout:is(.pc-rail, .land-rail) > .battle-scroll {
  position: relative;
  margin-left: calc(0px - var(--railw) - 8px);
  padding-left: calc(var(--railw) + 8px);
}
#table.stack-layout:is(.pc-rail, .land-rail) > .battle-scroll .gf-row:is(.perms, .oppc) {
  position: relative;
  z-index: var(--z-board-row);
}
#table.stack-layout > .rail:has(.gf-menu) { z-index: var(--z-rail-menu); }
.stk-panel { min-width: 0; position: relative; z-index: var(--z-stack); background: var(--bg1); border: 1px solid #3a3228; border-radius: 8px; overflow: hidden; }
.stk-head { height: 28px; display: flex; align-items: center; padding: 0 8px; }
.stk-head h2 { margin: 0; color: var(--dim); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.stk-panel:is(.empty, .folded) { height: 28px; }
.stk-panel.empty { opacity: .7; }
.stk-panel:is(.empty, .folded) .stk-head { height: 26px; }
.stk-head .peek { display: none; width: 44px; height: 100%; margin-left: auto; border-radius: 8px; }
#table.stack-inline .stk-panel:not(.empty) .stk-head .peek { display: flex; }
.stk-list { margin: 0; list-style: none; padding: 6px; display: flex; flex-direction: column; gap: 4px; max-height: var(--stk-list-limit, 188px); overflow-y: auto; overflow-anchor: none; overscroll-behavior: contain; scroll-padding-top: var(--stk-clearance, 66px); -webkit-overflow-scrolling: touch; }
.stk-list > li { flex: none; min-height: 56px; scroll-margin-top: var(--stk-clearance, 66px); }
.stk-list > .stk-top { position: sticky; top: 0; z-index: 2; }
.stk-panel[data-visible-rows="1"] .stk-list > .stk-top { position: static; }
.stk-row { position: relative; width: 100%; height: auto; min-height: 56px; display: flex; align-items: center; gap: 6px; padding: 3px 6px 3px 4px; border: 1px solid transparent; border-radius: 6px; background: var(--bg2); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.stk-row.top { border-color: var(--gold); }
.stk-bar { width: 3px; align-self: stretch; border-radius: 2px; flex: none; background: var(--gold); }
.stk-row.opp .stk-bar { background: var(--hot); }
.stk-thumb { width: 36px; height: 40px; border-radius: 4px; overflow: hidden; flex: none; border: 1px solid var(--card-edge); background: var(--card-bg); }
.stk-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.stk-t { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.stk-name { display: flex; align-items: center; gap: 4px; min-width: 0; }
.stk-name b { flex: 1; min-width: 0; }
.stk-next { flex: none; font-size: .625rem; font-weight: 700; color: var(--gold); }
.stk-next:empty { display: none; }
.stk-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .8125rem; }
.stk-t small { display: flex; gap: 4px; color: var(--dim); white-space: nowrap; overflow: hidden; font-size: .6875rem; }
.stk-kind { font-style: normal; color: var(--gold); font-weight: 700; flex: none; }
.stk-row.opp .stk-kind { color: var(--hot); }
.stk-controller { flex: none; }
.stk-copy:empty, .stk-label:empty, .stk-to:empty { display: none; }
.stk-label, .stk-to { overflow: hidden; text-overflow: ellipsis; }
.stk-row:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.stk-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stack-detail { padding: 8px var(--sp-4) 12px; border-bottom: 1px solid var(--line); }
.stack-detail h2 { margin: 0 0 6px; font-size: 16px; }
.stack-detail p { margin: 0; font-size: 12px; color: var(--dim); line-height: 1.5; }
.stack-outside { display: block; margin-top: 6px; color: var(--dim); }
@media (hover: hover) { .stk-row:hover { background: #2f2820; } }
:where(.vp-band) #table.stack-layout { grid-template-columns: minmax(0, 1fr); }
:where(.vp-band) .opp-panel .opp-turn { position: static; margin-left: auto; align-self: center; white-space: nowrap; }
:where(.vp-band) #table.stack-layout > .actrow { flex-wrap: wrap; }
:where(.vp-band) .stk-head { height: 24px; }
:where(.vp-band) .stk-list { padding: 4px; gap: 0; max-height: var(--stk-list-limit, 140px); scroll-padding-top: var(--stk-clearance, 48px); }
:where(.vp-band) .stk-list > li { min-height: 44px; scroll-margin-top: var(--stk-clearance, 48px); }
:where(.vp-band) .stk-row { min-height: 44px; }
:where(.vp-band) .stk-thumb { width: 28px; height: 32px; }
.zs { display: none; }
.actrow .turn { display: none; }
:where(.vp-band) body.route-goldfish.gf-hudbar #header { display: none; }
:where(.vp-band) body.route-goldfish.gf-hudbar #table { padding-top: var(--part-top); }
:where(.vp-band) #table.stack-layout.zone-band { grid-template-rows: minmax(96px, 1fr) var(--part-zones) var(--part-stack) var(--part-act) calc(var(--ch) + var(--part-hand-pad)); grid-template-areas: "board" "zones" "stack" "act" "hand"; overflow: hidden; }
:where(.vp-band) #table.zone-band .opprow-wrap { padding: var(--part-opp-top) 4px 0; gap: 8px; align-items: center; }
:where(.vp-band) #table.zone-band .opp-panel { flex: none; flex-direction: column; gap: 0; align-items: center; align-self: flex-start; min-height: var(--part-opp-panel); }
:where(.vp-band) #table.zone-band .card.opp { align-self: flex-start; }
:where(.vp-band) #table.zone-band .opp-panel .life { height: 32px; min-width: 60px; flex-direction: row; gap: 4px; align-items: baseline; justify-content: center; padding: 0 8px; transform-origin: 50% 50%; }
:where(.vp-band) #table.zone-band .opp-panel .life b { font-size: 20px; line-height: 30px; }
:where(.vp-band) #table.zone-band .opp-panel .oppsub { display: flex; align-items: center; gap: 8px; height: 14px; margin-top: 2px; align-self: center; }
:where(.vp-band) #table.zone-band .opp-panel.ene .oppsub { align-self: flex-start; margin-left: 6px; }
:where(.vp-band) #table.zone-band .opp-panel .opp-energy { display: inline-flex; align-items: center; gap: 3px; height: 14px; }
:where(.vp-band) #table.zone-band .opp-panel .opp-energy b { font-size: 14px; line-height: 1; }
:where(.vp-band) #table.zone-band .opp-panel .opp-energy .egauge { display: none; }
:where(.vp-band) #table.zone-band .opp-panel .chain { position: static; align-self: center; gap: 3px; height: 14px; }
:where(.vp-band) #table.zone-band .opp-panel .chain b { font-size: 14px; }
:where(.vp-band) #table.zone-band .opp-panel .chain small { font-size: 8px; }
:where(.vp-band) #table.zone-band .opp-panel .opp-turn, :where(.vp-band) #table.zone-band .opp-panel .opp-name .tag { display: none; }
:where(.vp-band) #table.zone-band .gf-row.opprow { min-height: calc(var(--ocw) * var(--part-opp-row-k) + var(--part-opp-row-pad)); }
:where(.vp-band) #table.zone-band .opprow-wrap.solo .gf-row.opprow { min-height: 0; }
:where(.vp-band) #table.zone-band .field, :where(.vp-band) #table.zone-band .field.has-oppc { grid-template-columns: minmax(0, 1fr); gap: var(--board-gap) 0; padding: var(--part-field-top) 0 var(--part-field-bottom); }
:where(.vp-band) #table.zone-band .gf-row:not(.opprow) { min-height: calc(var(--ch) + 2px); }
:where(.vp-band) #table.zone-band .battle-scroll .gf-row:not(.opprow) { min-height: calc(var(--cw) * var(--part-row-k) + var(--part-row-pad)); }
:where(.vp-band) #table.zone-band > .zs { grid-area: zones; display: flex; align-items: center; gap: 6px; height: var(--part-zones); padding: 0 2px; min-width: 0; }
:where(.vp-band) #table.zone-band .zs .gf-piles { position: static; display: flex; flex-direction: row; gap: 6px; }
:where(.vp-band) #table.zone-band .zs .opp-side { display: flex; align-items: center; gap: 6px; margin-left: auto; min-width: 0; }
:where(.vp-band) #table.zone-band:not(.has-opp) .zs .opp-side { display: none; }
:where(.vp-band) #table.zone-band .zs .opp-side::before { content: attr(data-h); font-size: 10px; color: var(--dim); }
:where(.vp-band) #table.zone-band .zs .opp-side > button, :where(.vp-band) #table.zone-band .zs .gf-pile {
  position: static; display: flex; flex-direction: row; align-items: center; gap: 5px; width: auto; height: 26px; margin: 0; padding: 0 9px;
  border: 1px solid #3a3228; border-radius: 13px; background: var(--bg2); color: var(--ink); font: inherit;
}
:where(.vp-band) #table.zone-band .zs .opp-side > button[hidden] { display: none; }
:where(.vp-band) #table.zone-band .zs .opp-side > button.opp-hand.seen { border-color: var(--trig); }
:where(.vp-band) #table.zone-band .zs .gf-pile.empty, :where(.vp-band) #table.zone-band .zs .opp-side > button.empty { opacity: .55; }
:where(.vp-band) #table.zone-band .zs .gf-pile .pl, :where(.vp-band) #table.zone-band .zs .opp-side > button small { position: static; order: -1; font-size: 10px; line-height: 1; color: var(--dim); }
:where(.vp-band) #table.zone-band .zs .gf-pc { width: auto; height: auto; border: 0; border-radius: 0; background: none; overflow: visible; opacity: 1; }
:where(.vp-band) #table.zone-band .zs .gf-pa, :where(.vp-band) #table.zone-band .zs .opp-pips { display: none; }
:where(.vp-band) #table.zone-band .zs .gf-pc b, :where(.vp-band) #table.zone-band .zs .gf-pc i, :where(.vp-band) #table.zone-band .zs .opp-side > button b {
  position: static; min-width: 0; height: auto; padding: 0; border: 0; background: none; font-size: 13px; font-weight: 700; font-style: normal; line-height: 1;
}
:where(.vp-band) #table.zone-band .stk-panel:is(.empty, .folded) { height: var(--part-stack); }
:where(.vp-band) #table.zone-band .stk-panel:is(.empty, .folded) .stk-head { height: 20px; }
:where(.vp-band) #table.stack-layout.zone-band > .actrow { min-height: 0; height: var(--part-act); }
:where(.vp-band) #table.stack-layout.zone-band > .stk-panel { align-self: end; }
:where(.vp-band) #table.zone-band .actrow .dot { height: 36px; }
:where(.vp-band) .actrow .turn { display: inline; flex: none; font-size: 13px; font-weight: 700; color: var(--dim); }
:where(.vp-band) #table.zone-band .gf-row.handrow { padding: 2px 0 6px 4px; }
:where(.vp-band) .hudbar:not([hidden]) { height: calc(52px + env(safe-area-inset-bottom)); }
:where(.vp-band) .hudbar .gf-menu .gf-nav { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 6px; color: var(--ink); font-size: 13px; text-decoration: none; }
:where(.vp-band) .hudbar .gf-menu .gf-nav .ico { width: 20px; height: 20px; color: var(--dim); }
:where(.vp-band) .hudbar .gf-menu .sync-dot { border-color: var(--bg2); }
@media (hover: hover) { .hudbar .gf-menu .gf-nav:hover { background: var(--bg1); } }
:where(.vp-land) #table.stack-layout { --stackw: 188px; grid-template-rows: minmax(96px, 1fr) var(--part-act) calc(var(--ch) + var(--part-hand-pad)); }
:where(.vp-land) #table.stack-layout > .actrow { min-height: 36px; align-self: start; z-index: var(--z-ask-win); background: var(--bg1); }
:where(.vp-land) .stk-head { height: 24px; }
:where(.vp-land) .stk-list { padding: 4px; gap: 0; max-height: var(--stk-list-limit, 140px); scroll-padding-top: var(--stk-clearance, 48px); }
:where(.vp-land) .stk-list > li { min-height: 44px; scroll-margin-top: var(--stk-clearance, 48px); }
:where(.vp-land) .stk-row { min-height: 44px; }
:where(.vp-land) .stk-thumb { width: 28px; height: 32px; }
:where(.vp-desk-tall) body.route-goldfish.game-sheet-overlay .app { grid-template-columns: var(--rail) minmax(0, 1fr); grid-template-areas: "nav offline" "nav main"; }
:where(.vp-desk-tall) body.route-goldfish.game-sheet-overlay .sheet { position: fixed; z-index: var(--z-sheet); top: 0; right: 0; bottom: 0; width: 400px; transform: translateX(100%); box-shadow: -8px 0 24px #000a; }
:where(.vp-desk-tall) body.route-goldfish.game-sheet-overlay .sheet.is-in { transform: none; }
:where(.vp-desk-tall) body.route-goldfish.game-sheet-overlay .scrim { display: block; position: fixed; inset: 0; z-index: var(--z-scrim); background: rgb(10 8 6 / .55); opacity: 0; pointer-events: auto; }
:where(.vp-desk-tall) body.route-goldfish.game-sheet-overlay .scrim.is-in { opacity: 1; }

.gf-menu-btn.holding-priority { color: var(--gold); box-shadow: inset 0 -2px var(--gold); }

.collect-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.collect-info { max-width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; background: var(--bg1); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 16px; font-size: 15px; line-height: 1.6; }
.collect-info::backdrop { background: rgb(10 8 6 / .6); }
.collect-info h2 { font-size: 17px; margin: 0 0 8px; }
.collect-info h3 { font-size: 15px; margin: 14px 0 4px; color: var(--gold); }
.collect-info ul { margin: 0; padding-left: 1.2em; }
.collect-state { color: var(--dim); }
.collect-challenge { position: fixed; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: var(--z-collect-challenge); }

.ask-win[hidden], #table.ask-float > .ask-win[hidden] { display: none; }
#table.ask-float > .ask-win { position: absolute; grid-column: auto; grid-row: auto; left: 8px; right: 8px; z-index: var(--z-ask-win); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 48px; padding: 7px 8px 7px 10px;
  border-radius: 12px; background: #1b1713f4; border: 1px solid #6a5636; box-shadow: 0 8px 22px #000c, 0 0 0 1px #0008; color: var(--ink); }
#table.ask-float > .ask-win[data-pos="zones"], #table.ask-float > .ask-win.peeked, #table.ask-float > .ask-win.over-stack { z-index: var(--z-ask-win-up); }
.peek { width: 32px; height: 32px; flex: none; padding: 0; border-radius: 16px; border: 1px solid #3a3228; background: var(--bg2); color: var(--dim); font-size: 12px; display: flex; align-items: center; justify-content: center; }
.ask-win .peek { order: 1; margin-left: 2px; }
.ask-win.stacked .ask-t { flex: 1 1 0; white-space: normal; }
.ask-win.stacked .peek { order: 0; margin-left: auto; }
.ask-win.stacked .ops { order: 1; flex: 1 1 100%; margin-left: 0; }
.ask-win.stacked .chips { order: 1; flex: 1 1 100%; max-width: none; margin-left: 0; overflow-x: auto; scrollbar-width: none; padding-bottom: 1px; }
.ask-win.stacked .chips::-webkit-scrollbar { display: none; }
.ask-win.stacked[data-pos="side"] .chips { flex-wrap: wrap; overflow-x: visible; max-height: 152px; overflow-y: auto; }
#table.ask-float > .ask-win.stacked:not([data-pos="side"]) :is(.chips, .ops) { flex-wrap: wrap; overflow-x: visible; max-height: 40vh; overflow-y: auto; -webkit-mask-image: none; mask-image: none; padding-right: 0; }
#table.ask-float > .ask-win :is(.chip, .btn.sm) { min-height: 44px; }
#table.ask-float > .ask-win.peeked { left: auto; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.ask-win.peeked > :not(.peek, .side-btns) { display: none; }
.ask-win.peeked .peek { width: 52px; height: 36px; margin: 0; border-radius: 10px; border: 1.5px solid var(--trig); color: var(--trig); font-size: 15px; background: #1b1713f4; box-shadow: 0 4px 12px #000a; }
.ask-win .peek, .ask-win.peeked .peek { min-width: 44px; min-height: 44px; }
#table.land-rail > .ask-win .side-btns { display: none; }
.opp-notice[hidden] { display: none; }
#table > .opp-notice { grid-column: 1 / -1; }
.opp-notice { position: absolute; z-index: var(--z-opp-notice); display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 2px 2px 2px 8px; border: 1px solid #6a5636; border-radius: 10px; background: #1b1713f4; box-shadow: 0 8px 22px #000b; color: var(--ink); }
.opp-notice-bar { align-self: stretch; width: 3px; flex: none; border-radius: 2px; background: var(--hot); }
.opp-notice-body { position: relative; min-width: 0; min-height: 44px; flex: 1; display: flex; align-items: center; padding: 2px 4px; }
.opp-notice-open { position: absolute; inset: 0; width: 100%; min-height: 44px; padding: 0; border: 0; background: none; }
.opp-notice-status { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.opp-notice-text { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
.opp-notice-more { color: var(--dim); font-size: 11px; white-space: nowrap; }
.opp-notice-more:empty { display: none; }
.opp-notice-fold { flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: var(--bg2); color: var(--dim); }
.logbtn { position: static; flex: none; width: 44px; height: 44px; min-width: 44px; padding: 0; border: 1px solid #3a3228; border-radius: 8px; background: #0f0d0a; color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 3px; }
.logbtn .ico { width: 20px; height: 20px; }
.logbtn small { display: none; font-size: 11px; }
.logbtn .log-new { display: none; position: absolute; width: 6px; height: 6px; margin: -26px -28px 0 0; border-radius: 50%; background: var(--hot); }
.logbtn.unread .log-new { display: block; }
.stepbar, .fastbtn { min-height: 44px; }
.actrow { gap: 4px; }
.actrow .stepbar { flex: 1 1 auto; }
.actrow .logbtn { margin-left: 0; }
:where(.vp-rail, .vp-land) .actrow .logbtn { display: none; }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step { display: flex; flex-wrap: wrap; flex-direction: row; gap: 2px; min-width: 0; }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step .stepbar { flex: 1 1 100%; min-height: 44px; }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step .fastbtn { position: static; flex: 0 0 44px; min-width: 44px; height: 44px; }
:where(.vp-rail, .vp-land) .rail > .hud .hud-step .logbtn { position: static; min-width: 44px; flex: 0 0 44px; width: 44px; height: 44px; }
:where(.vp-rail) #table.stack-layout.pc-rail > .rail { overflow-y: auto; }
:where(.vp-land) #table.stack-layout > .rail { min-width: 92px; overflow-y: auto; }
:where(.vp-land) .rail > .hud .hud-ctl { position: sticky; bottom: 0; background: var(--bg1); }
:where(.vp-mini) #table.zone-band > .actrow { padding-left: 8px; gap: 2px; }
:where(.vp-mini) .actrow .turn { min-width: 20px; white-space: nowrap; }
:where(.vp-mini) .actrow .stepbar { flex: 1 1 0; flex-direction: column; align-items: flex-start; gap: 0; height: auto; min-width: 0; padding-right: 0; }
:where(.vp-mini) .actrow .step-name { max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.1; text-align: left; }
:where(.vp-mini) .actrow .dots .dot { height: 18px; width: 14px; }
:where(.vp-mini) .actrow .fastbtn, :where(.vp-mini) .actrow .logbtn { flex: none; }
:where(.vp-phone-portrait) #table.zone-band > .actrow .logbtn { position: relative; z-index: var(--z-log-btn); }
#table > #arrows { z-index: var(--z-arrows); }
.stk-yield:not(:empty) { margin-inline-start: .4em; font-weight: 700; }
.stack-yield-choice { display: flex; align-items: center; gap: .55rem; min-height: 44px; cursor: pointer; }
.stack-yield-choice[hidden] { display: none; }
.stack-yield-choice input { width: 20px; height: 20px; }
.stk-list { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.stk-pop { position: fixed; z-index: var(--z-stack-pop); left: 0; top: 0; box-sizing: border-box; width: max-content; max-width: calc(100vw - 16px); padding: 2px 12px; background: var(--bg1); border: 1px solid var(--gold); border-radius: 8px; box-shadow: 0 6px 18px rgb(0 0 0 / .5); color: var(--ink); font-size: 14px; }
.gf-yield-list { padding: .45rem .75rem; max-height: 12rem; overflow-y: auto; }
.gf-yield-item { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.gf-yield-item span { min-width: 0; overflow-wrap: anywhere; }
.gf-yield-item button { min-height: 44px; flex: none; }
#table.stack-layout > .rail:has(.gf-menu) { overflow: visible; }
.gf-menu:has(.gf-yield-item) { box-sizing: border-box; width: min(320px, calc(100vw - 16px)); max-height: calc(100dvh - 80px); overflow-y: auto; }
.gf-menu:has(.gf-yield-item) .gf-yield-list { flex: none; max-height: none; overflow: visible; }
:where(.vp-land) .gf-menu:has(.gf-yield-item) { max-height: calc(100dvh - 120px); }
:where(.vp-band) #table.stack-layout.zone-band:has(> .actrow[data-mode="end"]) { grid-template-rows: minmax(96px, 1fr) var(--part-zones) var(--part-stack) auto calc(var(--ch) + var(--part-hand-pad)); }
:where(.vp-band) #table.stack-layout.zone-band > .actrow[data-mode="end"] { min-height: var(--part-act); height: auto; padding-block: 2px; }
:where(.vp-band) #table.stack-layout.zone-band > .actrow[data-mode="end"] > .chips { flex: 0 1 auto; min-width: 0; max-width: 100%; flex-wrap: wrap; justify-content: flex-end; }

.effects-btn { position: relative; flex: none; display: flex; align-items: center; justify-content: center; width: 44px; min-width: 44px; height: 44px; padding: 0; border: 1px solid var(--gold); border-radius: 8px; background: #0f0d0a; color: var(--gold); font-family: inherit; }
.effects-btn .ico { width: 20px; height: 20px; }
.effects-btn b { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: var(--gold); color: #0f0d0a; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.iopanel.effects { width: min(400px, 60vw); padding-bottom: env(safe-area-inset-bottom); }
.effects-head { flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 2px 12px; color: var(--gold); }
.effects-head h2 { font-size: 16px; }
.effects-head button { min-width: 44px; min-height: 44px; border: 0; background: none; color: inherit; font: inherit; }
.effects-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 12px; }
.effects-section { margin-bottom: 12px; }
.effects-section h3 { margin: 0 0 4px; color: var(--gold); font-size: 13px; }
.effect-row { display: flex; gap: 8px; min-height: 72px; padding: 4px 0; }
.effect-source { flex: 0 0 40px; width: 40px; height: 56px; border: 0; border-radius: 4px; background: var(--bg2); padding: 0; overflow: hidden; }
.effect-source img { width: 100%; height: 100%; object-fit: cover; }
.effect-copy { flex: 1; min-width: 0; }
.effect-summary { display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: 64px; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; font-family: inherit; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.effect-summary small { color: var(--dim); font-size: 12px; }
.effect-detail { display: none; font-size: 16px; line-height: 1.4; }
.effect-detail.is-open, .effect-row:focus-within .effect-detail { display: block; }
@media (hover: hover) and (pointer: fine) { .effect-row:hover .effect-detail { display: block; } }
.effect-more { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--gold); font: inherit; }
.side-btns { display: flex; flex: none; align-items: center; gap: 4px; }
.ask-win .side-btns { order: 1; }
.ask-win.stacked .side-btns { order: 0; }
#table.zone-band > .actrow { padding-right: 9px; }
#table.zone-band > .actrow .stepbar { flex-basis: 0; }
#table.zone-band > .actrow .stepbar .dots { flex: 0 1 auto; min-width: 0; }
#table.zone-band > .actrow .stepbar .dot { flex: 0 1 auto; min-width: 14px; }
#table.zone-band > .ask-win.peeked { padding-right: 9px; }
#table:has(> .ask-win:not([hidden])) > .actrow .effects-btn { display: none; }
#table.land-rail > .actrow .effects-btn, #table.pc-rail > .actrow .effects-btn, #table.pc-rail > .ask-win .effects-btn { display: none; }
#table.land-rail .rail > .hud .hud-step .side-btns { position: fixed; top: max(4px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); z-index: var(--z-side-btns); }
#table.pc-rail .rail > .hud .hud-step .side-btns { display: contents; }
#table.pc-rail .rail > .hud .hud-step .logbtn { position: fixed; top: 50%; right: max(8px, env(safe-area-inset-right)); transform: translateY(-50%); z-index: var(--z-side-btns); flex-direction: column; gap: 4px; width: 44px; min-width: 44px; height: 72px; padding: 4px; border-color: #b29750; background: #2d2516; box-shadow: 0 2px 8px #0006; }
#table.pc-rail .rail > .hud .hud-step .logbtn .ico { width: 22px; height: 22px; color: var(--gold); }
#table.pc-rail .rail > .hud .hud-step .logbtn small { display: block; font-size: 10px; line-height: 1.15; }
#table.pc-rail .rail > .hud .hud-step .logbtn .log-new { top: 5px; right: 4px; margin: 0; }
#table.pc-rail .rail > .hud .hud-step .logbtn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#table.pc-rail .rail > .hud .hud-step .logbtn:active { background: #3a301c; }
body:has(#iopanel.is-in:not(.pick)) #table.pc-rail .rail > .hud .hud-step .logbtn { right: calc(min(440px, 60vw) + 8px); }
body:has(#iopanel.effects.is-in) #table.pc-rail .rail > .hud .hud-step .logbtn { right: calc(min(400px, 60vw) + 8px); }
#table.stack-layout.pc-rail.stack-inline { padding-right: calc(60px + env(safe-area-inset-right)); }
.effects-pop { position: fixed; z-index: var(--z-effects-pop); display: flex; flex-direction: column; max-height: 50vh; border: 1px solid #6a5636; border-radius: 10px; background: #1b1713f4; box-shadow: 0 8px 22px #000c; color: var(--ink); }
.effects-pop[hidden] { display: none; }
.effects-pop-close { position: absolute; top: 0; right: 0; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--dim); display: flex; align-items: center; justify-content: center; }
.effects-pop-close .ico { width: 18px; height: 18px; }
.effects-pop-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 8px 10px; }
.effects-pop h3 { margin: 10px 40px 2px 0; color: var(--gold); font-size: 11px; font-weight: 700; }
.effects-pop h3 ~ h3 { margin-right: 0; }
.effect-pop-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.effect-pop-art { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 4px; overflow: hidden; background: var(--bg2); }
.effect-pop-art img { width: 100%; height: 100%; object-fit: cover; }
.effect-pop-copy { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.effect-pop-copy b { font-weight: 600; }
.effect-pop-copy small { color: var(--dim); font-size: 11px; }
.effects-pop-body > p { margin: 10px 40px 4px 0; font-size: 13px; }
