﻿:root {
  color-scheme: dark;
  --bg: #101511;
  --panel: #171d18;
  --line: #303a31;
  --lime: #c3f766;
  --mint: #95c6ae;
  --text: #f0f0df;
  --muted: #98a294;
  --purple: #b89ee2;
  font-family: Arial, Helvetica, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 5px;
}
img {
  max-width: 100%;
  display: block;
}
button {
  border: 0;
}
h1,
h2,
p {
  margin-top: 0;
}
p {
  color: var(--muted);
  line-height: 1.7;
}
h1,
h2 {
  letter-spacing: -0.045em;
}
h1 {
  font-family: Impact, "Arial Narrow", sans-serif;
  font-weight: 900;
}
main {
  max-width: 1600px;
  margin: auto;
  padding: 0 46px;
}
.game-header {
  height: 90px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 60px;
  padding: 0 46px;
}
.wordmark {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 35px;
  font-weight: 1000;
  letter-spacing: -3px;
  transform: skew(-5deg);
}
.wordmark span {
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 1px;
  transform: skew(5deg);
  border-left: 1px solid var(--line);
  padding-left: 15px;
}
.game-header nav {
  display: flex;
  gap: 30px;
  height: 100%;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.game-header nav > a {
  height: 100%;
  display: flex;
  gap: 9px;
  align-items: center;
}
.game-header nav .selected {
  color: var(--lime);
  border-bottom: 2px solid var(--lime);
}
.tiny-tag {
  font: 9px monospace;
  letter-spacing: 1px;
  border: 1px solid #657947;
  color: var(--lime);
  padding: 4px 6px;
  white-space: nowrap;
}
.signal {
  margin-left: auto;
  font: 9px monospace;
  letter-spacing: 1.2px;
  color: var(--muted);
  white-space: nowrap;
}
.signal i,
.eyebrow i,
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px #c3f74544;
  margin-right: 8px;
}
.hub-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  font: 10px monospace;
  letter-spacing: 1px;
}
.micro {
  font: 9px monospace;
  letter-spacing: 1.1px;
  color: var(--muted);
}
.bar-divider {
  margin: 0 16px;
  color: #657365;
}
.hub-links {
  display: flex;
  gap: 25px;
}
.tab {
  background: none;
  padding: 10px 0;
  color: var(--muted);
  font-size: 12px;
}
.tab.selected {
  color: var(--lime);
}
.screen {
  display: none;
}
.screen.active {
  display: block;
}
.hero-stage {
  min-height: 530px;
  position: relative;
  border: 1px solid #425043;
  background: #18271f;
  overflow: hidden;
}
.hero-art {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(13, 29, 21, 0.94),
      rgba(17, 32, 26, 0.64) 50%,
      rgba(25, 34, 33, 0.1)
    ),
    url("/rad/tcg/graveyard.webp") center/cover;
  opacity: 0.95;
}
.hero-art:after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    #0000 0px,
    #0000 3px,
    #00000018 4px
  );
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: 58px 48px 80px;
  max-width: 650px;
}
.eyebrow {
  font: 9px monospace;
  letter-spacing: 1.6px;
  color: var(--lime);
  margin-bottom: 25px;
  display: block;
}
.hero-copy h1 {
  font-size: clamp(48px, 5.3vw, 82px);
  line-height: 1.02;
  margin-bottom: 22px;
  letter-spacing: -1px;
}
.hero-copy h1 em {
  color: var(--lime);
  font-style: normal;
}
.hero-copy p {
  font-size: 15px;
  color: #bbccbd;
  line-height: 1.65;
  margin-bottom: 29px;
}
.hero-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}
.btn {
  padding: 16px 19px;
  font-size: 10px;
  letter-spacing: 0.7px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition:
    transform 0.2s,
    background 0.2s;
  min-height: 44px;
}
.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}
.primary {
  background: var(--lime);
  color: #192011;
}
.primary:hover:not(:disabled) {
  background: #d5ff91;
}
.secondary {
  background: #35412b;
  border: 1px solid #526542;
}
.subtle {
  background: transparent;
  border: 1px solid #657360;
  color: var(--text);
}
.practice-note {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 8px monospace;
  letter-spacing: 1px;
  color: #adbeab;
  margin-top: 22px;
}
.practice-note .dot {
  margin: 0;
  width: 5px;
  height: 5px;
}
.card-fan {
  position: absolute;
  width: 43%;
  height: 390px;
  right: 1%;
  top: 55px;
  perspective: 1100px;
}
.card-fan img {
  position: absolute;
  width: 45%;
  top: 15px;
  left: 27%;
  border-radius: 14px;
  box-shadow: 0 24px 50px #0008;
  transition: transform 0.5s;
  user-select: none;
}
.fan-center {
  transform: rotate(7deg);
  z-index: 3;
}
.fan-left {
  transform: translate(-63%, 27px) rotate(-17deg);
  filter: brightness(0.8);
}
.fan-right {
  transform: translate(65%, 35px) rotate(23deg);
  filter: brightness(0.85);
}
.card-fan:hover .fan-center {
  transform: translateY(-12px) rotate(3deg);
}
.card-fan:hover .fan-left {
  transform: translate(-70%, 15px) rotate(-21deg);
}
.card-fan:hover .fan-right {
  transform: translate(73%, 20px) rotate(27deg);
}
.fan-label {
  position: absolute;
  bottom: 0;
  left: 22%;
  transform: rotate(-4deg);
  padding: 8px 14px;
  background: var(--lime);
  color: #182212;
  font: 10px monospace;
  z-index: 4;
  letter-spacing: 2px;
  box-shadow: 4px 4px #0006;
}
.hero-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 25px;
  border-top: 1px solid #a3caa929;
  display: flex;
  justify-content: space-between;
  font: 8px monospace;
  letter-spacing: 1.5px;
  color: #99ac99;
}
.hub-bottom {
  display: grid;
  grid-template-columns: 1.45fr 1fr 0.85fr;
  border: 1px solid var(--line);
  border-top: 0;
  margin-bottom: 48px;
}
.hub-bottom > section {
  padding: 28px 28px 24px;
}
.hub-bottom > section + section {
  border-left: 1px solid var(--line);
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.hub-bottom h2 {
  font-size: 23px;
  line-height: 1.15;
  margin: 20px 0 13px;
}
.hub-bottom p {
  font-size: 12px;
  margin-bottom: 20px;
}
.mode-footer {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.objective-panel h2 {
  font-size: 29px;
}
.objective-panel h2 span {
  color: var(--lime);
}
.text-button {
  padding: 0;
  background: none;
  color: var(--lime);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.record-numbers {
  display: flex;
  align-items: center;
  gap: 25px;
  margin: 26px 0 18px;
}
.record-numbers strong {
  font-size: 48px;
  font-weight: 400;
  line-height: 1;
}
.record-numbers div {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.record-numbers div > span {
  font: 9px monospace;
  color: var(--muted);
  letter-spacing: 1px;
}
.slash {
  font-size: 32px;
  color: #46513d;
}
.record-numbers div:first-child strong {
  color: var(--lime);
}
.game-footer {
  max-width: 1508px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 25px 0 35px;
  color: var(--muted);
  font: 8px monospace;
  letter-spacing: 1px;
}
.footer-brand {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -2px;
  color: var(--text);
}
.game-footer a:last-child {
  color: var(--text);
}
.archive-heading {
  padding: 25px 0;
}
.archive-heading h1 {
  font-size: 56px;
  margin-bottom: 16px;
}
.archive-heading h1 span,
.battle-top h1 span {
  color: var(--lime);
}
.archive-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.search-box {
  background: #1d251d;
  border: 1px solid var(--line);
  padding: 12px;
  display: flex;
  gap: 10px;
}
.search-box input {
  background: none;
  border: 0;
  color: var(--text);
  width: 180px;
}
.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filters button {
  background: none;
  border: 1px solid var(--line);
  padding: 10px 13px;
  font-size: 11px;
  color: var(--muted);
}
.filters button.selected {
  background: var(--lime);
  color: #1a2517;
  border-color: var(--lime);
}
#archiveCount {
  margin-left: auto;
}
#archiveGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 25px;
  padding: 30px 0 60px;
}
.archive-card {
  background: none;
  text-align: left;
  padding: 0;
  color: var(--text);
}
.archive-card img {
  border-radius: 10px;
  transition: transform 0.25s;
  aspect-ratio: 2352/3504;
  object-fit: contain;
  background: #1d231b;
}
.archive-card:hover img {
  transform: translateY(-6px) rotate(-2deg);
}
.archive-card > span {
  display: block;
  color: var(--muted);
  font: 9px monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 13px 0 7px;
}
.archive-card strong {
  font-size: 13px;
}
.battle-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 26px;
  gap: 15px;
}
.battle-top .eyebrow {
  margin-bottom: 10px;
}
.battle-top h1 {
  font-size: 33px;
  margin: 0;
  letter-spacing: 0;
}
.battle-options {
  display: flex;
  align-items: center;
  gap: 12px;
}
.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: #252e22;
  border: 1px solid var(--line);
  font-size: 17px;
}
.volume-control input {
  width: 65px;
  accent-color: var(--lime);
}
.battle-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 190px;
  border: 1px solid var(--line);
  margin-bottom: 30px;
  align-items: stretch;
}
.battle-sidebar,
.battle-log {
  background: #161d17;
  min-width: 0;
}
.battle-sidebar {
  padding: 18px 15px;
}
.side-title {
  font: 9px monospace;
  letter-spacing: 1.2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.side-title .dot {
  margin: 0;
}
.turn-box {
  padding: 25px 0 22px;
}
.turn-box h2 {
  color: var(--lime);
  font-size: 23px;
  margin: 10px 0 16px;
}
.phase-track {
  display: flex;
  gap: 7px;
  font: 8px monospace;
  color: #85957e;
}
.phase-track span {
  padding: 5px 7px;
  background: #242e22;
}
.phase-track .current {
  color: var(--lime);
  border-bottom: 1px solid var(--lime);
}
.score-block {
  display: flex;
  justify-content: space-between;
  border-block: 1px solid var(--line);
  padding: 17px 0;
}
.score-block > div {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.score-block span {
  font: 8px monospace;
  color: var(--muted);
}
.score-block strong {
  font-size: 30px;
  font-weight: 400;
}
.score-block b {
  font-weight: 400;
}
.score-block small {
  color: var(--muted);
  font-size: 16px;
}
.score-block > div:first-child b {
  color: var(--lime);
}
.tip-box {
  min-height: 125px;
  padding-top: 22px;
}
.tip-box p {
  font-size: 12px;
  line-height: 1.6;
  margin: 12px 0 18px;
  color: #b6c4ae;
}
.battle-sidebar > .btn {
  width: 100%;
  margin-bottom: 9px;
  padding: 13px 12px;
}
.utility-actions {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  margin-top: 15px;
  padding-top: 12px;
  gap: 5px;
}
.utility-actions button {
  background: none;
  padding: 12px 0;
  text-align: left;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  color: #c3cabb;
}
kbd {
  font: 8px monospace;
  border: 1px solid #ffffff26;
  padding: 2px 4px;
  opacity: 0.7;
}
.keyboard-hint {
  font-size: 10px;
  margin-top: 25px;
}
.battlefield {
  position: relative;
  padding: 16px 22px 0;
  isolation: isolate;
  background: #19271f;
  overflow: hidden;
  min-width: 0;
}
.battlefield:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#0b191a77, #12251dd9),
    url("/rad/tcg/graveyard.webp") center/cover;
  z-index: -2;
}
.electric-mist {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 70% 40%, #88ffdb16, transparent 60%);
  animation: mist 8s ease-in-out infinite alternate;
}
.opponent-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 17px;
}
.avatar {
  height: 33px;
  width: 33px;
  display: grid;
  place-items: center;
  background: #2f3b3b;
  border: 1px solid #586d66;
  color: #c2d3c7;
  font-size: 18px;
}
.opponent-label strong {
  font-size: 10px;
  letter-spacing: 1px;
}
.opponent-label div > span {
  display: block;
  font: 7px monospace;
  letter-spacing: 1px;
  color: var(--muted);
  margin-top: 4px;
}
.opponent-count {
  margin-left: auto;
  font: 8px monospace;
  color: #c2cbbc;
}
.back-line {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 16px;
}
.zone {
  min-width: 0;
  border: 1px solid #a9bd9c32;
  background: #0d1c1840;
  padding: 9px;
}
.zone-label {
  font: 8px monospace;
  letter-spacing: 1.2px;
  color: #aab9a2;
  display: flex;
  justify-content: space-between;
  gap: 5px;
}
.zone-cards {
  display: flex;
  gap: 7px;
  min-height: 90px;
  padding-top: 9px;
}
.bench-zone .zone-cards:empty:after {
  content: "NO CHARACTERS ON BENCH";
  border: 1px dashed #a3bf9d2b;
  min-height: 84px;
  width: 100%;
  display: grid;
  place-items: center;
  font: 7px monospace;
  letter-spacing: 1px;
  color: #90a58b;
}
.arena-zone .zone-cards:empty:after {
  content: "◇";
  border: 1px dashed #a3bf9d35;
  min-height: 84px;
  width: 100%;
  display: grid;
  place-items: center;
  color: #98ac85;
  font-size: 28px;
}
.card {
  position: relative;
  width: 68px;
  flex: 0 0 68px;
  transition: transform 0.18s;
  filter: drop-shadow(0 5px 6px #0005);
  border-radius: 5px;
}
.card:hover,
.card:focus-within {
  z-index: 5;
  transform: translateY(-5px);
}
.card-play {
  display: block;
  width: 100%;
  padding: 0;
  background: #101b12;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #708463;
  color: var(--text);
}
.card-play > img {
  width: 100%;
  aspect-ratio: 2352/3504;
  object-fit: contain;
  border-radius: 4px;
}
.card-name {
  display: none;
}
.card-stats {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 5px;
  font: 9px monospace;
  white-space: nowrap;
  background: #1e2b1c;
}
.card-stats small {
  font: 6px monospace;
  color: #99b78c;
}
.card-stats b:first-child {
  color: var(--lime);
}
.card-stats b:last-child {
  color: #d3b3eb;
}
.card-type {
  font-size: 7px;
  text-transform: uppercase;
  justify-content: center;
  letter-spacing: 0.6px;
}
.inspect-card {
  position: absolute;
  right: 1px;
  top: 1px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  background: #101910eb;
  color: var(--lime);
  border: 1px solid #779367;
  font-size: 12px;
  border-radius: 0 4px 0 4px;
}
.duel-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 35px;
  padding: 20px 0;
}
.active-slot > .zone-label {
  justify-content: center;
  margin-bottom: 5px;
  color: var(--lime);
}
.active-slot .zone-cards {
  padding: 0;
  min-height: 176px;
  width: 106px;
}
.active-slot .zone-cards:empty {
  border: 1px dashed #92b48055;
  border-radius: 7px;
}
.active-slot .zone-cards:empty:after {
  content: "PLAY AN ACTIVE";
  font: 8px monospace;
  color: var(--muted);
  display: grid;
  place-items: center;
  width: 100%;
}
.active-slot .card {
  width: 106px;
  flex-basis: 106px;
  box-shadow: 0 0 30px #9bef5112;
}
.active-slot .card-stats {
  padding: 6px;
  font-size: 13px;
}
.active-slot .card-stats small {
  font-size: 8px;
}
.enemy-slot > .zone-label {
  color: #c4a7dc;
}
.duel-mark {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 12px;
}
.duel-mark > span:first-child {
  color: var(--lime);
  font-size: 20px;
}
.duel-mark strong {
  font:
    italic 32px Impact,
    sans-serif;
  color: #b8c6a6;
  letter-spacing: 1px;
}
.duel-mark > span:last-child {
  font: 6px monospace;
  letter-spacing: 2px;
  color: #90a388;
  writing-mode: horizontal-tb;
}
.hand-area {
  margin: 17px -22px 0;
  padding: 13px 17px 17px;
  background: #111d16e0;
  border-top: 1px solid #69846155;
}
.hand-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.hand-title > span:last-child {
  font: 7px monospace;
  color: var(--lime);
  letter-spacing: 1px;
}
.hand-title b {
  font-weight: 400;
  color: var(--lime);
}
:is(#playerHand, #onlineHand) {
  min-height: 150px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 14px 4px 5px;
  scrollbar-color: #637948 #111d16;
  scrollbar-width: thin;
}
:is(#playerHand, #onlineHand) .card {
  width: 87px;
  flex-basis: 87px;
}
:is(#playerHand, #onlineHand) .card-name {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 7px;
  padding: 4px 3px 0;
}
:is(#playerHand, #onlineHand) .card-play {
  border-color: #7a9765;
}
.battle-log {
  display: flex;
  flex-direction: column;
  padding: 18px 13px;
}
.live-label {
  color: var(--lime);
  font-size: 7px;
}
:is(#log, #onlineLog) {
  height: 460px;
  overflow: auto;
  flex: 1 1 460px;
  max-height: 560px;
  scrollbar-width: thin;
  scrollbar-color: #465a40 transparent;
}
:is(#log, #onlineLog) > :is(div, li) {
  font-size: 10px;
  line-height: 1.6;
  padding: 12px 0;
  border-bottom: 1px solid #93a38518;
  color: #bac6b1;
}
:is(#log, #onlineLog) .log-sys {
  color: #889980;
  font: 9px/1.65 monospace;
}
:is(#log, #onlineLog) .log-opp {
  color: #c8b9d5;
}
:is(#log, #onlineLog) .log-player:before {
  content: "> ";
  color: var(--lime);
}
.piles {
  display: flex;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 15px;
}
.piles > div {
  flex: 1;
  min-width: 0;
}
.piles .zone-label {
  font-size: 7px;
  margin-bottom: 10px;
}
.deck-pile {
  width: 62px;
  height: 92px;
  padding: 0;
  position: relative;
  background: #202a1e;
  border: 1px dashed #526746;
  color: var(--muted);
  font: 9px monospace;
  display: grid;
  place-items: center;
}
.deck-pile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.deck-count {
  position: absolute;
  bottom: 2px;
  left: 2px;
  right: 2px;
  background: #15220def;
  text-align: center;
  padding: 3px;
  color: var(--lime);
}
.pile-note {
  text-align: center;
  padding-top: 15px;
  font-size: 7px;
}
.target {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  animation: targetPulse 1s infinite alternate;
}
.poisoned-anim .card-play {
  border-color: #c1fa58;
  box-shadow: 0 0 15px #96f73155;
}
.poison-label {
  position: absolute;
  left: 3px;
  bottom: 20px;
  font: 6px monospace;
  background: var(--lime);
  color: #203510;
  padding: 3px;
}
.floating-damage {
  position: absolute;
  inset: 20% 0 auto;
  text-align: center;
  font-size: 30px;
  font-weight: 900;
  color: #fcb2ad;
  text-shadow: 0 3px 3px #000;
  z-index: 10;
  animation: floatDamage 0.8s both;
  pointer-events: none;
}
.damaged {
  animation: hit 0.35s;
}
.attacking {
  animation: attack 0.5s;
}
.playing {
  animation: deal 0.4s;
}
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #050e0bcf;
  backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}
.modal.active {
  display: flex;
}
.modal-content {
  position: relative;
  background: #182219;
  border: 1px solid #637a4f;
  padding: 35px;
  width: min(620px, 100%);
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 25px 100px #0008;
}
.modal h2 {
  font-size: 30px;
  color: var(--lime);
  margin-bottom: 20px;
}
.modal p {
  font-size: 13px;
}
.modal .btn {
  margin-right: 10px;
  margin-top: 12px;
}
.modal b {
  color: var(--text);
}
.modal .zone-cards {
  flex-wrap: wrap;
}
.modal .zone-cards .card {
  width: 120px;
  flex-basis: 120px;
}
.inspect-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  width: min(720px, 100%);
  align-items: center;
}
.inspect-layout > img {
  border-radius: 12px;
  box-shadow: 0 15px 35px #0007;
}
.inspect-copy h2 {
  color: var(--text);
  font-size: 33px;
}
.inspect-copy .eyebrow {
  margin-bottom: 15px;
}
.inspect-copy p {
  font-size: 12px;
}
.inspect-copy .micro {
  font-size: 8px;
}
.close-dialog {
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 25px;
  background: none;
  color: var(--muted);
}
#inspectStats {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}
#inspectStats strong {
  font-size: 27px;
  font-weight: 400;
  color: var(--lime);
}
#inspectStats span {
  display: block;
  font: 8px monospace;
  color: var(--muted);
  margin-top: 4px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  background: #c3f766;
  color: #142111;
  padding: 15px 25px;
  font: 12px monospace;
  display: none;
  max-width: 90vw;
}
.skip {
  position: absolute;
  left: 15px;
  top: -100px;
  z-index: 200;
  background: var(--lime);
  color: #000;
  padding: 12px;
}
.skip:focus {
  top: 10px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] {
  display: none !important;
}
@keyframes mist {
  to {
    opacity: 0.3;
    transform: translateX(5%);
  }
}
@keyframes floatDamage {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-60px);
  }
}
@keyframes hit {
  25%,
  75% {
    transform: translateX(4px);
    filter: brightness(1.6);
  }
  50% {
    transform: translateX(-4px);
  }
}
@keyframes attack {
  50% {
    transform: translate(16px, -15px) rotate(8deg);
  }
}
@keyframes deal {
  from {
    opacity: 0;
    transform: translateY(25px) rotate(-8deg);
  }
}
@keyframes targetPulse {
  to {
    box-shadow: 0 0 20px #bcff5470;
  }
}
@media (min-width: 1500px) {
  .card-fan {
    height: 410px;
    width: 40%;
    right: 3%;
  }
  .card-fan img {
    width: 42%;
  }
  .hero-copy {
    padding-top: 65px;
  }
  .hero-stage {
    min-height: 550px;
  }
  .battlefield {
    padding-inline: 35px;
  }
  .hand-area {
    margin-inline: -35px;
  }
  .back-line {
    grid-template-columns: 1fr 100px;
  }
  .bench-zone .card {
    width: 78px;
    flex-basis: 78px;
  }
}
@media (max-width: 1150px) {
  main {
    padding: 0 24px;
  }
  .game-header {
    padding: 0 24px;
    gap: 35px;
  }
  .signal {
    display: none;
  }
  .hero-copy {
    padding: 45px 30px 80px;
    max-width: 58%;
  }
  .hero-copy h1 {
    font-size: 58px;
  }
  .hero-copy p {
    font-size: 13px;
  }
  .hero-buttons {
    flex-wrap: wrap;
  }
  .hero-stage {
    min-height: 510px;
  }
  .card-fan {
    top: 95px;
    height: 310px;
    right: 1%;
  }
  .fan-label {
    font-size: 7px;
    left: 12%;
  }
  .hub-bottom > section {
    padding: 23px 20px;
  }
  .panel-heading .tiny-tag {
    display: none;
  }
  .battle-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .battle-log {
    grid-column: 1/-1;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    max-height: 180px;
  }
  .battle-log .side-title {
    width: 110px;
    flex-shrink: 0;
  }
  :is(#log, #onlineLog) {
    height: 130px;
    flex-basis: auto;
  }
  .piles {
    margin: 0;
    padding: 0;
    border: 0;
    width: 145px;
    flex-shrink: 0;
  }
  .pile-note {
    display: none;
  }
  .game-footer {
    margin-inline: 24px;
  }
  .battle-top h1 {
    font-size: 27px;
  }
  .battle-options {
    gap: 7px;
  }
  .battle-options .micro {
    display: none;
  }
}
@media (max-width: 760px) {
  main {
    padding: 0 16px;
  }
  .game-header {
    padding: 0 16px;
    height: 72px;
    gap: 20px;
  }
  .wordmark {
    font-size: 28px;
  }
  .wordmark span {
    display: none;
  }
  .game-header nav {
    gap: 20px;
    font-size: 10px;
  }
  .game-header nav > a:first-child {
    display: none;
  }
  .game-header nav .tiny-tag {
    font-size: 7px;
    padding: 3px;
  }
  .hub-bar {
    height: 65px;
    font-size: 8px;
  }
  .hub-bar > div:first-child > .micro,
  .bar-divider {
    display: none;
  }
  .hub-links {
    gap: 15px;
  }
  .tab {
    font-size: 10px;
  }
  .hero-stage {
    min-height: 780px;
  }
  .hero-copy {
    max-width: 100%;
    padding: 32px 23px 0;
  }
  .hero-copy h1 {
    font-size: 56px;
  }
  .hero-copy .eyebrow {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .hero-copy p {
    font-size: 13px;
  }
  .hero-buttons {
    gap: 8px;
  }
  .hero-buttons .btn {
    font-size: 9px;
    padding: 14px 12px;
    gap: 10px;
  }
  .practice-note {
    font-size: 6px;
    gap: 7px;
  }
  .hero-art {
    background:
      linear-gradient(#142a20e0, #152f2477),
      url("/rad/tcg/graveyard.webp") center/cover;
  }
  .card-fan {
    top: 390px;
    left: 50%;
    transform: translateX(-50%);
    width: 310px;
    height: 295px;
  }
  .card-fan img {
    width: 47%;
    left: 27%;
  }
  .fan-label {
    bottom: 1px;
    left: 12%;
    font-size: 8px;
  }
  .hero-bottom {
    font-size: 6px;
    padding-inline: 15px;
    gap: 15px;
  }
  .hero-bottom > span:first-child {
    display: none;
  }
  .hub-bottom {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 30px;
  }
  .hub-bottom > .mode-panel {
    grid-column: 1/-1;
    border-bottom: 1px solid var(--line);
  }
  .hub-bottom > .objective-panel {
    border-left: 0;
  }
  .hub-bottom h2 {
    font-size: 23px;
  }
  .record-numbers {
    gap: 14px;
  }
  .record-numbers strong {
    font-size: 38px;
  }
  .game-footer {
    margin-inline: 0;
    padding-inline: 16px;
    flex-wrap: wrap;
    font-size: 7px;
    padding-bottom: 25px;
  }
  .game-footer > span:nth-child(2) {
    display: none;
  }
  .archive-heading h1 {
    font-size: 39px;
  }
  .archive-heading p {
    font-size: 12px;
  }
  .archive-controls {
    gap: 15px;
  }
  .search-box {
    width: 100%;
  }
  .search-box input {
    width: 100%;
  }
  .filters {
    gap: 5px;
  }
  .filters button {
    font-size: 9px;
    padding: 9px;
  }
  #archiveGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 15px;
  }
  .battle-top {
    align-items: flex-start;
    margin-bottom: 16px;
  }
  .battle-top h1 {
    font-size: 22px;
  }
  .battle-top .eyebrow {
    font-size: 6px;
    letter-spacing: 0.7px;
  }
  .volume-control {
    display: none;
  }
  .battle-options {
    gap: 4px;
  }
  .icon-button {
    width: 28px;
    height: 28px;
  }
  .battle-layout {
    display: flex;
    flex-direction: column;
  }
  .battle-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
    padding: 13px;
  }
  .battle-sidebar > .side-title,
  .keyboard-hint,
  .phase-track {
    display: none;
  }
  .turn-box {
    padding: 0;
  }
  .turn-box h2 {
    font-size: 19px;
    margin: 6px 0;
  }
  .score-block {
    border: 0;
    padding: 0;
    justify-content: flex-end;
    gap: 25px;
  }
  .score-block strong {
    font-size: 23px;
  }
  .score-block > div {
    gap: 5px;
  }
  .score-block span {
    font-size: 7px;
  }
  .tip-box {
    grid-column: 1/-1;
    min-height: 0;
    padding: 0;
  }
  .tip-box > .micro {
    display: none;
  }
  .tip-box p {
    margin: 0 0 6px;
    font-size: 11px;
    min-height: 18px;
  }
  .battle-sidebar > .btn {
    margin: 0;
    padding: 12px;
  }
  .utility-actions {
    grid-column: 1/-1;
    flex-direction: row;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    border: 0;
    gap: 10px;
  }
  .utility-actions button {
    font-size: 10px;
    padding: 8px 0;
  }
  .utility-actions kbd {
    display: none;
  }
  .battlefield {
    padding: 14px 10px 0;
  }
  .opponent-label {
    margin-bottom: 12px;
  }
  .opponent-count {
    font-size: 7px;
  }
  .back-line {
    grid-template-columns: minmax(0, 1fr) 65px;
    gap: 7px;
  }
  .zone {
    padding: 6px;
  }
  .zone-cards {
    gap: 4px;
    min-height: 65px;
  }
  .zone-label {
    font-size: 6px;
    letter-spacing: 0.5px;
  }
  .bench-zone .card {
    width: calc((100% - 16px) / 5);
    flex-basis: calc((100% - 16px) / 5);
    min-width: 0;
  }
  .arena-zone .card {
    width: 100%;
    flex-basis: 100%;
  }
  .bench-zone .zone-cards:empty:after,
  .arena-zone .zone-cards:empty:after {
    min-height: 62px;
    font-size: 6px;
  }
  .arena-zone .zone-cards:empty:after {
    font-size: 24px;
  }
  .bench-zone .card-stats {
    font-size: 7px;
    padding: 3px 1px;
    gap: 0;
  }
  .bench-zone .card-stats small {
    display: none;
  }
  .inspect-card {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }
  .duel-line {
    gap: 25px;
    padding: 16px 0;
  }
  .active-slot .zone-cards {
    width: 90px;
    min-height: 155px;
  }
  .active-slot .card {
    width: 90px;
    flex-basis: 90px;
  }
  .active-slot .card-stats {
    font-size: 11px;
  }
  .duel-mark > span:last-child {
    font-size: 5px;
    letter-spacing: 0.5px;
  }
  .duel-mark strong {
    font-size: 25px;
  }
  .hand-area {
    margin-inline: -10px;
    padding: 12px 10px;
  }
  .hand-title > span:last-child {
    font-size: 6px;
    letter-spacing: 0.5px;
  }
  :is(#playerHand, #onlineHand) {
    min-height: 135px;
  }
  :is(#playerHand, #onlineHand) .card {
    width: 78px;
    flex-basis: 78px;
  }
  .battle-log {
    padding: 14px 10px;
    gap: 10px;
    max-height: 200px;
  }
  .battle-log .side-title {
    display: none;
  }
  :is(#log, #onlineLog) {
    height: 150px;
    flex: 1;
  }
  .piles {
    width: 122px;
    gap: 9px;
  }
  .deck-pile {
    width: 53px;
    height: 80px;
  }
  .modal {
    padding: 15px;
  }
  .modal-content {
    padding: 25px 20px;
  }
  .inspect-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .inspect-layout > img {
    width: 180px;
    margin: 0 auto;
  }
  .inspect-copy h2 {
    font-size: 26px;
  }
  .inspect-copy .eyebrow {
    margin-bottom: 10px;
  }
  .inspect-copy p {
    margin-bottom: 10px;
  }
  #inspectStats {
    margin-bottom: 15px;
  }
  .modal h2 {
    font-size: 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.active-slot .zone-cards:empty {
  background:
    linear-gradient(#152a20d9, #152a20d9),
    url("/rad/tcg/card-frame.webp") center/cover;
}
@media (max-width: 760px) {
  .inspect-card {
    width: 24px;
    height: 24px;
  }
  .hero-stage {
    min-height: 755px;
  }
}
.card.drawing {
  animation: deal 0.55s ease-out;
}
.arena-live {
  border-color: #b5db7855;
  background: radial-gradient(ellipse at center, #b3ef7520, transparent 75%);
}
.poison-particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  pointer-events: none;
  z-index: 10;
  animation: poisonBurst 0.7s ease-out forwards;
}
@keyframes poisonBurst {
  from {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.2);
  }
}
@media (prefers-reduced-motion: reduce) {
  .poison-particle {
    display: none;
  }
}
/* One primary action; mobile controls stay within thumb reach. */
.battle-controls > .btn {
  width: 100%;
  padding: 15px 12px;
  margin-bottom: 8px;
}
.control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.battle-controls .utility-actions {
  flex: 1 1 100%;
  margin-top: 5px;
}
.battle-more {
  position: relative;
  width: 100%;
  font-size: 11px;
  color: var(--muted);
}
.battle-more summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  border: 1px solid var(--line);
  background: #202a1e;
  padding: 8px 10px;
}
.battle-more summary::-webkit-details-marker {
  display: none;
}
.battle-more summary:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
.battle-more-menu {
  background: #192519;
  border: 1px solid #5a734b;
  padding: 12px;
  box-shadow: 0 10px 30px #0006;
}
.battle-more-menu > #skipAttackBtn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 44px;
  background: none;
  color: var(--text);
  padding: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.dock-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.dock-settings .icon-button {
  width: 44px;
  height: 44px;
}
.dock-settings .volume-control {
  width: 100%;
  order: 2;
}
.dock-settings .volume-control input {
  width: 100%;
  min-height: 32px;
}
@media (max-width: 760px) {
  #gameScreen {
    padding-bottom: calc(144px + env(safe-area-inset-bottom, 0px));
  }
  .battle-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 12px max(16px, env(safe-area-inset-right, 0px))
      calc(8px + env(safe-area-inset-bottom, 0px))
      max(16px, env(safe-area-inset-left, 0px));
    background: #142016f7;
    border-top: 1px solid #729053;
    box-shadow: 0 -12px 35px #07120b80;
    backdrop-filter: blur(16px);
  }
  .battle-controls > .btn {
    min-height: 52px;
    justify-content: center;
    gap: 12px;
    font-size: 12px;
    margin: 0 0 7px;
  }
  .battle-controls kbd {
    display: none;
  }
  .control-row {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .battle-controls .utility-actions {
    flex: 1 1 auto;
    display: flex;
    gap: 5px;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .battle-controls .utility-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 44px;
    padding: 8px 4px;
    font-size: 11px;
    background: #22301f;
    border: 1px solid #ffffff12;
  }
  .battle-more {
    width: auto;
    flex: 0 0 auto;
    font-size: 10px;
  }
  .battle-more summary {
    min-height: 44px;
    padding: 8px 12px;
  }
  .battle-more-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    width: min(285px, calc(100vw - 32px));
    border-color: #829b64;
    padding: 16px;
  }
  .hand-area {
    scroll-margin-bottom: calc(154px + env(safe-area-inset-bottom, 0px));
    padding-bottom: 20px;
  }
  .battle-top {
    align-items: center;
  }
  .modal {
    align-items: flex-end;
    padding-bottom: max(15px, env(safe-area-inset-bottom, 0px));
  }
  .modal .btn {
    min-height: 48px;
  }
}
@media (max-width: 760px) {
  html.battle-mobile {
    scroll-padding-bottom: calc(320px + env(safe-area-inset-bottom, 0px));
  }
  #gameScreen {
    padding-bottom: calc(320px + env(safe-area-inset-bottom, 0px));
  }
  .battle-controls .hand-area {
    margin: 0 0 10px;
    padding: 0 0 10px;
    border-top: 0;
    border-bottom: 1px solid #70835355;
    background: transparent;
    scroll-margin: 0;
  }
  .battle-controls :is(#playerHand, #onlineHand) {
    min-height: 0;
    padding: 10px 2px 3px;
  }
  .battle-controls :is(#playerHand, #onlineHand) .card {
    width: 72px;
    flex-basis: 72px;
  }
  .battle-controls .hand-title {
    gap: 6px;
  }
  .battle-controls .hand-title > span:last-child {
    font-size: 6px;
  }
  .battlefield .card {
    scroll-margin-bottom: 320px;
  }
}
@media (max-width: 760px) and (max-height: 550px) {
  .battle-controls :is(#playerHand, #onlineHand) .card {
    width: 46px;
    flex-basis: 46px;
  }
  .battle-controls :is(#playerHand, #onlineHand) .card-name {
    display: none;
  }
  .battle-controls :is(#playerHand, #onlineHand) {
    padding-top: 5px;
  }
  .battle-controls .hand-area {
    margin-bottom: 5px;
    padding-bottom: 5px;
  }
  .battle-controls {
    padding-top: 7px;
  }
  .battle-controls > .btn {
    min-height: 44px;
    padding: 10px;
  }
  #gameScreen {
    padding-bottom: 240px;
  }
  html.battle-mobile {
    scroll-padding-bottom: 240px;
  }
}
/* Draw navigation arrows ourselves so mobile never substitutes emoji. */
.nav-arrow { width: 1em; height: 1em; display: inline-block; vertical-align: -.1em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) {
  #titleScreen .hero-stage,
  #titleScreen .hub-bottom { margin-inline: -16px; border-inline: 0; border-radius: 0; }
}
.guide-section { border-bottom: 1px solid #64775b66; padding: 14px 0; text-align: left; }
.guide-section summary { cursor: pointer; font-size: 16px; font-weight: 700; min-height: 32px; line-height: 1.5; color: #c5f28e; }
.guide-section p, .guide-copy { font: 16px/1.7 Arial, sans-serif; color: #d3ddca; }
.guide-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 0; }
.guide-actions .btn { min-height: 48px; }
.guide-title { font-size: 30px; line-height: 1.2; margin: 20px 0; }
.guide-progress { color: #b4f96b; }
#onlineGuide .guide-actions { position: sticky; bottom: -28px; background: #132019; }
@media (max-width: 760px) {
  .online-page #onlineWalkthrough { margin: auto auto max(8px, env(safe-area-inset-bottom)); }
  .guide-actions .btn { flex: 1; padding: 12px; font-size: 11px; }
  #tutorialModal .modal-content { max-height: 90dvh; overflow: auto; }
}
.guide-title:focus { outline: none; }
@media(max-width:760px){.game-header nav{gap:12px}.game-header{gap:12px}.game-header nav .player-account-link{display:inline-block!important}.online-page .game-header nav>a:first-child{display:inline-block}}

/* Keep mobile artwork below copy with fallback fonts or larger text. */
@media (max-width: 760px) {
  #titleScreen .hero-stage { min-height: 0; }
  #titleScreen .hero-copy { padding-bottom: 20px; }
  #titleScreen .card-fan {
    position: relative;
    inset: auto;
    transform: none;
    width: min(82%, 440px);
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 35px auto 30px;
  }
  #titleScreen .hero-bottom { position: relative; }
  #titleScreen .hero-buttons { flex-wrap: wrap; }
}

/* Text and card art occupy separate layout cells, including fallback-font layouts. */
#titleScreen .hero-stage{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);min-height:0}
#titleScreen .hero-copy{grid-column:1;grid-row:1;max-width:none;min-width:0;z-index:3;padding-bottom:42px}
#titleScreen .card-fan{position:relative;inset:auto;grid-column:2;grid-row:1;align-self:center;width:100%;height:clamp(310px,34vw,440px);margin:45px 0;transform:none;pointer-events:none}
#titleScreen .hero-bottom{position:relative;grid-column:1 / -1;inset:auto}
#titleScreen .hero-buttons{flex-wrap:wrap}
#titleScreen .hero-buttons .btn{white-space:normal;min-height:48px}
@media(max-width:900px){
  #titleScreen .hero-stage{grid-template-columns:minmax(0,1fr)}
  #titleScreen .hero-copy{grid-column:1;grid-row:auto;padding-bottom:24px}
  #titleScreen .card-fan{grid-column:1;grid-row:auto;width:min(82%,440px);height:auto;min-height:295px;aspect-ratio:1 / 1;margin:35px auto 30px}
  #titleScreen .hero-bottom{grid-column:1}
}
#gameOverModal.modal{align-items:center;justify-content:center;padding:max(16px,env(safe-area-inset-top,0px)) 16px max(16px,env(safe-area-inset-bottom,0px));height:100%;height:100dvh}
#gameOverModal .modal-content{width:min(520px,100%);max-height:calc(100dvh - 48px);text-align:center;border-color:#9ab570;background:radial-gradient(ellipse at top,#354628,#142019 75%)}
#gameOverModal h2{font-size:clamp(34px,8vw,56px);line-height:1.05}
#gameOverModal .btn{min-height:52px;margin-top:20px}

/* Quiet, usable scrollbars for the page, card rows, and menus. */
html,*{scrollbar-width:thin;scrollbar-color:#526448 transparent}
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#526448;border-radius:10px}
::-webkit-scrollbar-thumb:hover{background:#80946b}
@media(forced-colors:active){html,*{scrollbar-color:auto}}
