:root {
  color-scheme: dark;
  --release-bg: #080e16;
  --release-fg: #edf5ff;
  --release-muted: #a6bbcf;
  --release-blue: #36aaff;
  --release-line: #29435c;
}
.release-body { margin: 0; color: var(--release-fg); background: var(--release-bg); font: 1rem/1.6 system-ui, sans-serif; }
.release-body * { box-sizing: border-box; }
.release-body a, .release-setup a, .public-match .brand { color: inherit; text-decoration: none; }
.release-entry {
  position: relative;
  min-height: calc(100svh - 52px);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr);
  align-items: center;
  gap: clamp(24px, 7vw, 110px);
  padding: clamp(24px, 7vw, 112px);
  padding-block-start: clamp(88px, 7vw, 112px);
  border-top: 5px solid var(--release-blue);
  background: linear-gradient(136deg, transparent 61%, #173048 61.2%, transparent 61.6%),
    radial-gradient(ellipse at 80% 50%, #132f48, var(--release-bg) 65%);
}
.entry-account {
  position: absolute;
  inset-block-start: clamp(12px, 2.5vw, 32px);
  inset-inline-end: clamp(16px, 4vw, 56px);
}
.entry-copy { max-width: 42rem; justify-self: end; }
.entry-copy h1 {
  margin: 0;
  font: italic 950 clamp(3rem, 8vw, 8.5rem)/.95 system-ui, sans-serif;
  letter-spacing: -.085em;
  text-wrap: balance;
}
.entry-copy h1 span, .release-top span { color: var(--release-blue); }
.entry-copy p { margin: 1.25rem 0 1.75rem; color: var(--release-muted); font-size: clamp(1rem, 2vw, 1.35rem); }
.entry-actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.release-primary, .release-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .7rem 1.15rem;
  border: 1px solid var(--release-blue);
  border-radius: 7px;
  font: inherit;
  font-weight: 800;
}
.release-body .release-primary, .release-setup .release-primary { background: var(--release-blue); color: #06131f; }
.release-body .release-secondary { background: #122334; }
.release-primary:hover, .release-secondary:hover { filter: brightness(1.2); }
.appearance-dialog {
  width: min(720px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: clamp(.8rem, 3vw, 1.5rem);
  border: 1px solid var(--release-line);
  border-radius: 12px;
  background: #0d1925;
  color: inherit;
}
.appearance-dialog::backdrop { background: #050b13d9; }
.appearance-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.appearance-dialog h2 { margin: 0; }
.appearance-dialog button, #appearance-open { color: inherit; cursor: pointer; }
.appearance-dialog fieldset { min-inline-size: 0; margin: .9rem 0 0; padding: 0; border: 0; }
.appearance-dialog legend { padding: 0; font-weight: 800; }
.appearance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(5px, 2vw, 12px); }
.appearance-grid.appearance-backs { grid-template-columns: repeat(2, minmax(0, 120px)); }
.appearance-grid label { position: relative; display: block; cursor: pointer; }
.appearance-grid input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.appearance-tile {
  display: grid;
  grid-template-rows: auto auto 1fr;
  height: 100%;
  gap: 4px;
  padding: clamp(3px, 1vw, 8px);
  overflow: hidden;
  border: 1px solid var(--release-line);
  border-radius: 7px;
  background: #122334;
}
.appearance-grid input:checked + .appearance-tile { border-color: var(--release-blue); background: #18456a; }
.appearance-grid input:focus-visible + .appearance-tile { outline: 2px solid var(--release-blue); outline-offset: 2px; }
.appearance-tile picture, .appearance-tile img { display: block; width: 100%; }
.appearance-tile img { height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.appearance-backs img { aspect-ratio: 5 / 7; }
.appearance-tile-name { font-size: clamp(.73rem, 2.8vw, .95rem); font-weight: 750; }
.appearance-tile small { color: #d6edff; font-size: .72rem; }
.appearance-dialog [role="status"] { margin: .65rem 0 0; color: var(--release-muted); font-size: .85rem; }
.site-footer {
  padding: .95rem 1rem;
  border-top: 1px solid var(--release-line);
  color: var(--release-muted);
  text-align: center;
  font: .875rem/1.4 system-ui, sans-serif;
}
.entry-art {
  width: min(100%, 340px);
  height: auto;
  justify-self: start;
  border-radius: 5%;
  box-shadow: 0 24px 80px #000b, 0 0 70px #1375d33b;
}
.release-page, .release-setup { width: min(1200px, 100%); margin-inline: auto; padding: clamp(18px, 4vw, 56px); }
.release-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; padding-bottom: 1rem; border-bottom: 1px solid var(--release-line); font-weight: 800; }
.release-top a:hover { color: var(--release-blue); }
.release-page h1, .release-setup h1 { margin: 1.6rem 0 .2rem; font-size: clamp(1.7rem, 4.5vw, 3rem); line-height: 1.15; }
.release-page > p, .release-setup > p { color: var(--release-muted); }
.mode-menu { width: min(780px, 100%); }
.battle-modes { display: grid; gap: 14px; margin-block: 1.4rem 2rem; }
.battle-mode {
  --mode-color: #66d9ff;
  --mode-bg: #10364e;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: clamp(88px, 18vw, 118px);
  overflow: hidden;
  padding: .9rem clamp(1rem, 4vw, 2rem);
  border: 1px solid var(--mode-color);
  border-inline-start-width: 4px;
  border-radius: 10px;
  background: linear-gradient(108deg, #0a1522 33%, transparent 77%), var(--mode-bg);
  box-shadow: inset 0 0 24px #0005, 0 6px 18px #0004;
}
.battle-mode-match { --mode-color: #ffb577; --mode-bg: #542a2b; }
.battle-mode-friend { --mode-color: #b8afff; --mode-bg: #352958; }
.battle-mode-local { --mode-color: #8be5b5; --mode-bg: #244639; }
.battle-mode img {
  position: absolute;
  z-index: -1;
  inset-inline-end: clamp(2.4rem, 13vw, 6rem);
  width: clamp(82px, 20vw, 126px);
  height: auto;
  border: 1px solid var(--mode-color);
  border-radius: 6px;
  opacity: .52;
  transform: rotate(14deg);
  pointer-events: none;
}
.battle-mode-copy { display: grid; text-shadow: 0 2px 5px #000; }
.battle-mode-copy strong { font-size: clamp(1.2rem, 5vw, 2rem); line-height: 1.25; }
.battle-mode-copy small { color: #d3e4f4; margin-top: .25rem; }
.battle-mode-arrow { color: var(--mode-color); font-size: 2rem; line-height: 1; }
.battle-mode[href]:hover, .battle-mode[href]:focus-visible { box-shadow: inset 0 0 24px #ffffff22, 0 0 14px var(--mode-color); }
.battle-mode[aria-disabled="true"] { border-color: var(--release-line); }
.battle-mode-soon {
  flex-shrink: 0;
  align-self: end;
  padding: .15rem .5rem;
  border: 1px solid var(--mode-color);
  border-radius: 4px;
  background: #111c2d;
  color: var(--mode-color);
  font-size: clamp(.7rem, 2.5vw, .85rem);
  font-weight: 800;
}
@media (max-width: 410px) {
  .battle-mode[aria-disabled="true"] { align-items: start; flex-direction: column; }
  .battle-mode-soon { align-self: start; }
}
.account-page { width: min(620px, 100%); }
.account-page section { margin-block: 1.4rem; }
.account-form { display: grid; gap: .55rem; justify-items: start; margin-block: 1rem; }
.account-form[hidden] { display: none; }
.account-form input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: .55rem .7rem;
  border: 1px solid var(--release-line);
  border-radius: 6px;
  background: #0c1825;
  color: inherit;
  font: inherit;
}
#account-identity { overflow-wrap: anywhere; }
.rulebook-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.35rem 0 2rem; }
.rulebook-nav a { padding: .55rem .8rem; border: 1px solid var(--release-line); border-radius: 6px; }
.rulebook-nav a:hover { border-color: var(--release-blue); }
.rulebook-section { margin-block: 1.8rem; padding: clamp(14px, 3vw, 28px); border: 1px solid var(--release-line); border-radius: 12px; background: #0e1a29; }
.rulebook-section h2 { margin-top: 0; font-size: clamp(1.2rem, 4vw, 1.75rem); line-height: 1.35; }
.rulebook-section li + li { margin-top: .4rem; }
.rulebook-note { border-left: 3px solid var(--release-line); padding-left: .75rem; color: var(--release-muted); }
.rulebook-phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); gap: .65rem; padding: 0; list-style: none; }
.rulebook-phases li, .rulebook-phases li + li { display: grid; align-content: start; gap: .3rem; margin: 0; padding: .65rem .8rem; border-left: 3px solid var(--release-blue); background: #142438; }
.rulebook-phases strong, .rulebook-actions dt, .rulebook-examples strong { color: #81cfff; }
.rulebook-examples { display: grid; gap: .75rem; }
.rulebook figure { margin: 0; }
.rulebook-examples figure { display: grid; grid-template-columns: minmax(75px, 18%) minmax(0, 1fr); align-items: start; gap: clamp(10px, 3vw, 24px); padding: .8rem; background: #142438; border-radius: 8px; }
.rulebook img { display: block; width: 100%; max-width: 140px; height: auto; aspect-ratio: 5 / 7; object-fit: contain; border-radius: 5px; }
.rulebook-examples p { margin: .45rem 0 0; }
.rulebook-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .6rem .9rem; padding: .8rem; background: #142438; border-radius: 8px; }
.rulebook-actions dt { font-weight: 800; }
.rulebook-actions dd { margin: 0; }
.rulebook-duel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr) auto) minmax(0, 1fr); gap: clamp(2px, 2vw, 12px); align-items: center; justify-items: center; max-width: 540px; margin: 1rem auto; text-align: center; }
.rulebook-duel > span { color: #ffd580; font-weight: 800; }
.rulebook-duel b { display: block; font-size: .85rem; }
.rule-card-guide {
  display: grid;
  grid-template-columns: minmax(180px, 255px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1rem, 3vw, 2rem);
  margin-block: 1rem;
}
.rule-card-sample { text-align: center; }
.rule-card-sample figcaption { margin-top: .55rem; color: var(--release-muted); font-size: .88rem; }
.rule-card-image { position: relative; }
.rule-card-image img { max-width: none; }
.rule-marker {
  display: inline-grid;
  place-items: center;
  inline-size: 1.45rem;
  block-size: 1.45rem;
  border: 1px solid #1a2939;
  border-radius: 50%;
  background: #8ee9ff;
  color: #102334;
  font-size: .86rem;
  font-weight: 850;
  line-height: 1;
}
.rule-card-markers .rule-marker {
  position: absolute;
  left: var(--pin-x);
  top: var(--pin-y);
  translate: -50% -50%;
  box-shadow: 0 0 0 1px #8ee9ff, 0 2px 5px #000a;
}
.unit-bet-marker { --pin-x: 30%; --pin-y: 9%; }
.unit-atk-marker { --pin-x: 26%; --pin-y: 87%; }
.unit-def-marker { --pin-x: 58%; --pin-y: 87%; }
.unit-limit-marker { --pin-x: 73%; --pin-y: 8%; }
.unit-power-marker { --pin-x: 40%; --pin-y: 20%; }
.unit-risk-marker { --pin-x: 8%; --pin-y: 25%; }
.unit-skill-marker { --pin-x: 95%; --pin-y: 77%; }
.unit-trigger-marker { --pin-x: 95%; --pin-y: 85%; }
.tactics-risk-marker { --pin-x: 32%; --pin-y: 11%; }
.tactics-power-marker { --pin-x: 32%; --pin-y: 28%; }
.tactics-skill-marker { --pin-x: 10%; --pin-y: 79%; }
.rule-card-legend { margin: 0; }
.rule-card-legend > div { padding: .5rem .65rem; border-bottom: 1px solid var(--release-line); }
.rule-card-legend dt { display: flex; align-items: center; gap: .5rem; font-weight: 800; color: #aee5ff; }
.rule-card-legend dd { margin: .2rem 0 0 1.95rem; }
.tactics-examples { margin-top: 1.2rem; }
.tactics-examples h3 { margin: 0; font-size: 1rem; color: #aee5ff; }
.rulebook-examples a { color: #aee5ff; }
@media (max-width: 620px) {
  .rule-card-guide { grid-template-columns: minmax(0, 1fr); }
  .rule-card-sample { width: min(100%, 250px); justify-self: center; }
}
.catalog-filters { display: flex; flex-wrap: wrap; gap: 1rem; margin-block: 1.5rem 1rem; }
.catalog-filters label { display: grid; gap: .25rem; }
.catalog-filters input, .catalog-filters select { padding: .55rem; border: 1px solid var(--release-line); border-radius: 6px; background: #112134; color: inherit; font: inherit; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(128px, 44%), 1fr)); gap: .9rem; }
.catalog-grid button { display: grid; align-content: start; gap: .4rem; padding: .45rem; border: 1px solid var(--release-line); border-radius: 8px; background: #111d2c; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.catalog-grid button:hover { border-color: var(--release-blue); }
.catalog-grid img, .catalog-detail img { width: 100%; height: auto; border-radius: 5px; }
.catalog-grid small { color: var(--release-muted); }
.catalog-detail { width: min(620px, calc(100% - 24px)); max-height: 90svh; padding: 1rem; border: 1px solid var(--release-line); border-radius: 10px; background: #111d2c; color: var(--release-fg); }
.catalog-detail::backdrop { background: #000b; }
.catalog-detail header { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.catalog-detail h2 { margin: 0; font-size: 1.3rem; }
.catalog-detail button { min-height: 44px; border-radius: 6px; border: 1px solid var(--release-line); background: #182d43; color: inherit; font: inherit; cursor: pointer; }
#catalog-details { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: 1rem; }
#catalog-details h3 { margin-bottom: .25rem; font-size: 1rem; color: var(--release-blue); }
#catalog-details p { margin: 0 0 .6rem; }
#app:has(> .release-setup), #app:has(> .public-match) { grid-template-columns: minmax(0, 1fr); }
.release-setup .cpu-setting { margin-block: .85rem; }
.deck-seats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 3vw, 32px); }
.deck-picker { margin: 0; padding: 0; border: 0; min-width: 0; }
.deck-picker legend { margin-bottom: .65rem; font-size: 1.1rem; font-weight: 800; }
.cpu-player-decks { min-width: 0; }
.cpu-my-decks { margin-bottom: 1rem; padding: .65rem; border: 1px solid var(--release-line); border-radius: 8px; }
.cpu-my-decks label { font-weight: 800; }
.cpu-my-decks select { max-width: 100%; }
.cpu-my-decks p { margin: 0; color: var(--release-muted); }
.cpu-my-decks p:empty { display: none; }
.release-setup .cpu-my-decks a { color: var(--release-blue); text-decoration: underline; }
.deck-options { display: grid; gap: .6rem; }
.deck-option {
  display: grid;
  grid-template-columns: auto 44px minmax(0,1fr);
  align-items: center;
  gap: .65rem;
  min-width: 0;
  padding: .65rem;
  border: 1px solid var(--release-line);
  border-radius: 8px;
  background: #101e2d;
  cursor: pointer;
}
.deck-option:has(input:checked) { border-color: var(--release-blue); background: #132d46; }
.deck-option input { accent-color: var(--release-blue); margin: 0; }
.deck-option img { width: 44px; height: auto; aspect-ratio: 5 / 7; object-fit: contain; }
.deck-option strong, .deck-option small { display: block; }
.deck-option small { color: var(--release-muted); font-size: .875rem; }
.release-setup button.release-primary { margin-top: 1.3rem; }
.opening-hand { max-width: 55rem; margin-inline: auto; }
.opening-hand .hand { overscroll-behavior-x: contain; }
.opening-hand .hand .hand-card {
  width: clamp(88px, 25vw, 155px);
  min-width: 0;
  min-height: 0;
}
.opening-hand .actions { align-items: center; }
.opening-hand .actions .release-primary { margin-top: 0; }
.friend-lobby form { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; margin-block: 1rem; }
.friend-lobby form label { display: grid; gap: .3rem; }
.match-rematch { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .65rem; }
.match-rematch p { flex-basis: 100%; margin: 0; text-align: center; }
.match-rematch .release-primary { margin-top: 0; }
.friend-lobby form button.release-primary { margin-top: 0; }
#matchmaking-form button[hidden] { display: none; }
.friend-lobby input, .friend-lobby select {
  max-width: 100%;
  min-height: 44px;
  padding: .4rem .65rem;
  color: inherit;
  background: #101f30;
  border: 1px solid var(--release-line);
  border-radius: 6px;
  font: inherit;
}
.friend-code { display: block; font-size: clamp(2rem, 7vw, 3rem); letter-spacing: .15em; font-variant-numeric: tabular-nums; }
#friend-notice { margin: 0; color: #ffd58e; }
#friend-notice:empty { display: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--release-blue); outline-offset: 3px; }
.public-match .slot .field-unit {
  --field-art-height: 132px;
  display: grid;
  grid-template-rows: var(--field-art-height) auto 1fr;
  align-content: start;
  align-items: start;
  justify-items: center;
  gap: 6px;
}
.field-art-stage { display: grid; place-items: center; width: 100%; height: 100%; }
.slot .field-art-button { width: min(100%, calc(var(--field-art-height) * 5 / 7)); background: none; border: 0; padding: 0; }
.slot .field-art-button .card-art { width: 100%; }
.public-match .slot .field-defense .field-art-button {
  position: relative;
  width: min(100%, 156px);
  min-height: 0;
  aspect-ratio: 7 / 5;
}
.public-match .field-summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 3px 10px; }
.public-match .field-stat { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; }
.public-match .field-stat small { flex-basis: 100%; }
.field-unit-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; width: 100%; }
.public-match .slot .field-defense .field-art-button .card-art {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(100% * 5 / 7);
  aspect-ratio: 5 / 7;
  transform: translate(-50%, -50%) rotate(90deg);
}
.public-match .pile-button[data-pile="grave"] { min-inline-size: 132px; min-height: 48px; }
.public-match .field-attack-button { display: block; min-height: 44px; padding-inline: .35rem; font-size: .78rem; }
.public-match .direct-attack-zone {
  grid-column: 1 / -1;
  min-height: 160px;
  width: 100%;
  border: 1px solid var(--amber);
  color: #ffdc86;
  background: linear-gradient(110deg, #172735, #45351e, #172735);
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 850;
}
.public-match .direct-attack-zone:hover { background: #493923; border-color: #ffe5a8; }
.slot .field-art-button:focus { outline: 2px solid var(--cyan); outline-offset: 2px; }
.public-match .hand-card, .public-match .field-art-button { touch-action: manipulation; }
.public-match .player-head .chips { align-items: center; }
.public-match .player-head .chip strong {
  font-size: clamp(1.65rem, 3.5vw, 2.1rem);
  line-height: 1.1;
}
.public-match .hand-status {
  display: grid;
  justify-content: center;
  justify-items: center;
  gap: .25rem;
  text-align: center;
}
.public-match .hand-status .chips {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(.65rem, 3vw, 1.75rem);
  font-variant-numeric: tabular-nums;
}
.hand-status .chips > span { display: grid; justify-items: center; gap: .1rem; }
.hand-status .chips > span > span { color: #b8cad8; font-size: .78rem; white-space: nowrap; }
.hand-status .chips strong { font-size: 1rem; line-height: 1.1; }
.opening-clock-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.match-clock { --clock-color: var(--cyan); }
.public-match .chips .match-clock, .match-clock {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-inline-start: auto;
  color: var(--clock-color);
  font-variant-numeric: tabular-nums;
}
.match-clock.is-urgent { --clock-color: #ff6b81; }
.match-clock-track {
  display: block;
  width: clamp(3rem, 10vw, 8rem);
  height: .45rem;
  overflow: hidden;
  border-radius: 999px;
  background: #1d354a;
}
.match-clock-track > span {
  display: block;
  height: 100%;
  background: var(--clock-color);
  transform: scaleX(var(--clock-left, 0));
  transform-origin: left;
}
.hand-status .chips > .match-clock > span { color: inherit; }
.match-clock-extra, .match-clock-count { font-size: .75rem; font-weight: 800; white-space: nowrap; }
.match-clock-count { width: 1ch; text-align: end; }
.hand-draw-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #36566e;
  border-radius: 10px;
  background: #0a1824;
  margin-block: .35rem;
  padding-inline: .35rem;
}
.hand-draw-zone .hand {
  border: 1px dashed #36566e;
  border-radius: 7px;
  padding-inline: .3rem;
}
.draw-card {
  position: relative;
  display: grid;
  place-items: end center;
  isolation: isolate;
  width: clamp(76px, 21vw, 114px);
  height: clamp(105px, 29vw, 151px);
  margin-inline-start: .45rem;
  padding: .45rem .2rem;
  border: 0;
  background: transparent;
  touch-action: manipulation;
}
.draw-card .card-art {
  position: absolute;
  z-index: -1;
  inset-inline-end: calc(15% + 7px);
  top: 2%;
  width: 82%;
  height: auto;
  aspect-ratio: 5 / 7;
  border-radius: 7px;
  rotate: -15deg;
  animation: draw-card-pulse 2s ease-in-out infinite alternate;
}
.draw-card .draw-label {
  padding: .25rem .65rem;
  border: 1px solid #9ceaff;
  border-radius: 6px;
  color: #07202d;
  background: #7de2ff;
  font-weight: 900;
  letter-spacing: .08em;
  box-shadow: 0 2px 7px #03111c;
}
.draw-card:hover .draw-label { background: #c0f3ff; }
.draw-card:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.hand-draw-zone:has(.draw-deck-staged) { display: block; position: relative; }
.draw-card.draw-deck-staged {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 0;
  width: clamp(100px, 29vw, 148px);
  height: clamp(135px, 36vw, 194px);
  translate: 0 -50%;
  margin: 0;
}
.draw-deck-face { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.draw-deck-staged .card-art {
  inset: 13% auto auto 23%;
  width: 87%;
  rotate: -16deg;
  animation: none;
  box-shadow: 0 3px #647b90, 0 6px #213345, 0 10px #0b1826, 0 12px 17px #000c;
}
.draw-deck-staged .draw-label { margin-bottom: .6rem; }
.public-match:has(.draw-deck-entering) { overflow-x: clip; }
.draw-card.draw-deck-entering:disabled { opacity: 1; cursor: default; }
.draw-deck-entering .draw-label { visibility: hidden; }
@keyframes draw-card-pulse {
  from { opacity: .62; filter: drop-shadow(0 0 3px #44dfff55); }
  to { opacity: 1; filter: drop-shadow(0 0 12px #44dfffc0); }
}
@media (prefers-reduced-motion: reduce) {
  .draw-card .card-art { animation: none; filter: drop-shadow(0 0 6px #44dfff88); }
}
.public-match .board .tap-placement, .public-match .pile-button.tap-placement {
  border: 1px solid var(--cyan);
  background: #103043;
  box-shadow: inset 0 0 0 2px var(--cyan);
  cursor: pointer;
}
.public-match .slot.tap-placement [data-empty-unit] {
  align-self: center;
  margin-inline: auto;
  color: #eaf6ff;
  border-color: transparent;
  font-weight: 750;
  padding-inline: .2rem;
  text-align: center;
}
@media (max-width: 720px) {
  .release-entry { min-height: auto; grid-template-columns: 1fr; text-align: center; }
  .entry-copy, .entry-art { justify-self: center; }
  .entry-art { width: min(60vw, 235px); }
  .entry-actions { justify-content: center; }
  .deck-seats { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  #catalog-details { grid-template-columns: 1fr; }
  .catalog-detail img { max-width: 240px; justify-self: center; }
  .public-match .player-head, .public-match .topbar { flex-wrap: wrap; }
  .public-match .chips { flex-wrap: wrap; }
  .public-match .board { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .public-match .slot .field-unit { --field-art-height: 92px; gap: 4px; padding: 4px; }
  .public-match .slot .field-defense .field-art-button { width: min(100%, 104px); }
  .public-match .field-summary { column-gap: 5px; }
  .public-match .field-unit-actions button { flex: 1 1 auto; padding-inline: 3px; font-size: .75rem; }
  .public-match .tactics-slot.is-set { flex-wrap: wrap; padding: .25rem; }
}
@media (max-width: 580px) {
  .public-match { padding: 8px; gap: 8px; }
  .public-match .phasebar { flex-wrap: wrap; gap: 4px; font-size: .85rem; }
  .public-match .phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 2px; }
  .public-match .phase { padding: .35rem .125rem; text-align: center; }
  .public-match .player { padding: 8px; }
  .public-match .pile-button[data-pile="grave"] { flex: 1 1 132px; }
  .public-match .hand { scroll-snap-type: x proximity; }
  .public-match .hand .hand-card { width: clamp(88px, 27vw, 120px); min-width: 0; max-width: none; min-height: 0; scroll-snap-align: start; }
  .public-match button, .public-match select, .action-dialog button, .action-dialog select { min-height: 44px; }
  .public-match .duel-head { gap: 6px; }
  .public-match .duel-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .public-match #peek-hit, .public-match .duel-controls #private-peek-open { grid-column: 1 / -1; }
  .public-match .duel-controls button { min-height: 52px; }
  .public-match .battle-skill-controls label { display: grid; gap: 4px; width: 100%; }
  .public-match .battle-skill-controls select { width: 100%; max-width: 100%; font-size: 1rem; }
  .public-match .player-actions > button { flex: 1 1 auto; }
  .public-match .player-actions .hand-notice { flex-basis: 100%; }
  .action-dialog { max-height: calc(100dvh - 24px); overflow-y: auto; }
  #skill-choice-options label { display: flex; align-items: center; min-height: 44px; }
}
@media (max-width: 580px), (pointer: coarse) {
  html:has(.public-match), body:has(.public-match) { overflow-x: clip; overscroll-behavior-x: none; }
  .public-match { overflow-x: clip; }
  .public-match .hand { overscroll-behavior-x: contain; }
  .public-match .duel-cards { flex-wrap: wrap; }
  .public-match .reveal-stack { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; overflow: visible; }
  .public-match .reveal-thumb { flex-basis: 48px; }
  .public-match .reveal-thumb + .reveal-thumb { margin-inline-start: 0; }
  .public-match .reveal-thumb .card-art { width: 46px; height: auto; aspect-ratio: 5 / 7; }
}

.phase-shortcut {
  --rail-line-inset: env(safe-area-inset-right);
  --rail-width: calc(16px + env(safe-area-inset-right));
  position: fixed;
  z-index: 8;
  inset: max(48px, 12dvh) 0 max(48px, 12dvh) auto;
  inline-size: var(--rail-width);
  pointer-events: none;
}
.phase-shortcut-grip {
  position: relative;
  inline-size: 100%;
  block-size: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0;
  pointer-events: auto;
  touch-action: pan-y;
  user-select: none;
}
.phase-shortcut-grip::after {
  content: '';
  position: absolute;
  inset: 0 var(--rail-line-inset) 0 auto;
  inline-size: 2px;
  border-radius: 2px 0 0 2px;
  background: #8ad9ff;
  opacity: .34;
  pointer-events: none;
}
.phase-shortcut-grip:is(:hover, :focus-visible, [aria-expanded="true"])::after { opacity: .7; }
.phase-shortcut-grip:focus-visible { outline-offset: -2px; }
.phase-shortcut-panel {
  position: fixed;
  display: flex;
  flex-direction: column-reverse;
  gap: .3rem;
  inline-size: max-content;
  max-inline-size: min(17rem, calc(100% - 24px));
  max-block-size: calc(100dvh - 24px);
  overflow: auto;
  padding: .5rem;
  border: 1px solid #4c819e;
  border-radius: 10px;
  background: #102438;
  box-shadow: 0 5px 16px #0009;
  animation: phase-shortcut-in 220ms ease-out;
  pointer-events: auto;
}
.phase-shortcut-panel[hidden] { display: none; }
.phase-shortcut-panel button { min-height: 44px; border-color: var(--cyan); font-weight: 800; }
.phase-shortcut-panel p { margin: 0; padding: .25rem; color: var(--muted); }
.phase-shortcut-skills { display: flex; flex-direction: column-reverse; gap: .3rem; max-block-size: 35dvh; overflow: auto; }
.phase-shortcut-skills[hidden] { display: none; }
.phase-shortcut-skills button { text-align: start; }
@keyframes phase-shortcut-in { from { translate: 8px 0; opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .phase-shortcut-panel { animation: none; } }

.public-match .duel-center {
  align-self: center;
  justify-self: center;
  inline-size: 5.5rem;
}
.public-match .duel-center-pass { inline-size: 9rem; }
.public-match .duel-center .duel-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}
.is-flipped .duel-center { grid-area: versus; }
.public-match .duel-center .duel-controls button { min-width: 0; min-height: 44px; }
.public-match .duel-center .duel-pass { grid-column: 1 / -1; border-color: var(--cyan); font-weight: 800; }

.battlefield { display: contents; }
.battlefield[data-board-theme] { --board-shade: transparent; }
.battlefield[data-board-theme="board-ivory"] { --board-shade: #101c2b52; }
.public-match:not(.is-depth) .battlefield[data-board-theme] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 6px;
  border-radius: 8px;
  background: linear-gradient(var(--board-shade), var(--board-shade)) center / 100% 100%,
    #111a22 var(--battle-art, none) center / 100% 100% no-repeat;
}
.public-match:not(.is-depth) .battlefield[data-board-theme] .player { background: #08152250; }
.public-match:not(.is-depth) .battlefield[data-board-theme] :is(.slot, .tactics-slot):not(.target, .tap-placement, .drop-ready, .drop-hover, .attack-source, .attack-selected, .attack-target, .can-interrupt) {
  border-color: #b9dcf16b;
  background: #0a17252e;
}
.public-match:not(.is-depth) .battlefield[data-board-theme] .slot .field-unit {
  border-color: #b9dcf15c;
  background: #101e2a75;
}
.public-match:not(.is-depth) .battlefield[data-board-theme] .slot [data-empty-unit] {
  align-self: center;
  margin-inline: auto;
  padding-inline: 0;
  border: 0;
  font-size: .7rem;
  white-space: nowrap;
}
.public-match:not(.is-depth) .battlefield[data-board-theme] .tactics-slot { padding-inline: .15rem; }
.public-match:not(.is-depth) .battlefield[data-board-theme] .tactics-slot:not(.is-set) { font-size: .7rem; }
.public-match #flip-mode {
  border: 0;
  border-radius: 0;
  padding: 0 .25rem;
  background: transparent;
  color: var(--muted);
  font-size: .78rem;
}
.public-match #flip-mode[aria-pressed="true"], .public-match #flip-mode:hover { color: var(--cyan); }
.is-depth .battlefield {
  --depth-gutter: clamp(10px, 3vw, 44px);
  display: grid;
  position: relative;
  isolation: isolate;
  align-content: start;
  align-items: start;
  gap: 12px;
  width: min(100%, 1080px);
  aspect-ratio: 4 / 5;
  margin-inline: auto;
  padding: clamp(32px, 6vw, 72px) var(--depth-gutter) clamp(28px, 5vw, 64px);
  grid-template-columns: minmax(0, 1fr);
  border-radius: 10px;
  background: linear-gradient(var(--board-shade, transparent), var(--board-shade, transparent)) center / 100% 100%,
    #111a22 var(--battle-art, url('./battle-table.png?v=lightning')) center / cover no-repeat;
}
.unit-row { display: contents; }
.is-depth .player {
  --seat-color: #83dfff;
  --tactics-row-height: 108px;
  min-width: 0;
  padding: 6px 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.is-depth .player-north {
  --seat-color: #eeb596;
  --tactics-row-height: 76px;
  width: 73%;
  justify-self: center;
}
.is-depth .player-south { width: 94%; justify-self: center; }
.is-depth .player-head {
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--seat-color) 30%, #263344);
  border-radius: 8px;
  background: #0a1824eb;
}
.is-depth .player.active .player-head { border-color: var(--seat-color); }
.is-depth .deployment-zones {
  padding: 8px clamp(4px, 1.5vw, 18px);
  grid-template-columns: minmax(0, 1fr);
}
.is-depth .deployment-zone {
  width: var(--depth-row-width, 100%);
  justify-self: center;
}
.is-depth .zone-label { color: var(--seat-color); text-shadow: 0 1px 4px #000; }
.battlefield[data-board-theme="board-ivory"] :is(.zone-label, .unit-bet, [data-empty-unit], .tactics-slot) {
  color: #f4fbff;
  text-shadow: 0 1px 3px #111a22, 0 0 4px #111a22;
}
.is-depth .board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.is-depth .player-north .unit-zone .slot, .is-depth .player-north .direct-attack-zone { min-height: 120px; }
.is-depth .tactics-zone { grid-auto-rows: var(--tactics-row-height); }
.is-depth .tactics-zone .tactics-slot { min-block-size: 0; }
.is-depth .tactics-zone .tactics-slot.is-set { flex-wrap: nowrap; }
.is-depth .tactics-zone .tactics-slot > span:not(.tactic-art) {
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.is-depth :is(.board :is(.slot, .tactics-slot), .zone-piles .pile-button) {
  --zone-extend-left: 0px;
  --zone-extend-right: 0px;
  --zone-tl: 0px;
  --zone-tr: 100%;
  --zone-bl: 0px;
  --zone-br: 100%;
  --zone-line: color-mix(in srgb, var(--seat-color) 45%, transparent);
  --zone-glow: transparent;
  --zone-stroke: 1px;
  position: relative;
  isolation: isolate;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.is-depth :is(.board :is(.slot, .tactics-slot), .zone-piles .pile-button)::before,
.is-depth :is(.board :is(.slot, .tactics-slot), .zone-piles .pile-button)::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 calc(-1 * var(--zone-extend-right)) 0 calc(-1 * var(--zone-extend-left));
  pointer-events: none;
}
.is-depth :is(.board :is(.slot, .tactics-slot), .zone-piles .pile-button)::before {
  clip-path: polygon(evenodd,
    var(--zone-tl) 0, var(--zone-tr) 0, var(--zone-br) 100%, var(--zone-bl) 100%, var(--zone-tl) 0,
    calc(var(--zone-tl) + var(--zone-stroke)) var(--zone-stroke),
    calc(var(--zone-bl) + var(--zone-stroke)) calc(100% - var(--zone-stroke)),
    calc(var(--zone-br) - var(--zone-stroke)) calc(100% - var(--zone-stroke)),
    calc(var(--zone-tr) - var(--zone-stroke)) var(--zone-stroke),
    calc(var(--zone-tl) + var(--zone-stroke)) var(--zone-stroke));
  background: var(--zone-line);
}
.is-depth :is(.board :is(.slot, .tactics-slot), .zone-piles .pile-button)::after {
  clip-path: polygon(var(--zone-tl) 0, var(--zone-tr) 0, var(--zone-br) 100%, var(--zone-bl) 100%);
  background: linear-gradient(0deg, var(--zone-glow), transparent 70%, var(--zone-glow));
}
.is-depth .slot [data-empty-unit] { align-self: center; margin-inline: auto; border: 0; }
.field-projection { display: contents; }
.tactic-art { display: block; flex: none; }
.is-depth .slot .field-unit {
  --field-art-height: clamp(144px, 16vw, 200px);
  overflow: visible;
  border-color: transparent;
  background: transparent;
}
.is-depth .player-north .slot .field-unit { --field-art-height: clamp(94px, 12vw, 144px); }
.is-depth .field-attack .field-art-button { aspect-ratio: 5 / 7; }
.is-depth .slot .field-defense .field-art-button { width: min(100%, calc(var(--field-art-height) * 7 / 6)); }
.is-depth .player-south .slot .field-defense .field-art-button { width: min(92%, calc(var(--field-art-height) * 1.06)); }
.is-depth .tactics-slot.is-set .card-art { width: clamp(42px, 5vw, 64px); }
.is-depth .player-north .tactics-slot.is-set .card-art { width: clamp(27px, 3.5vw, 42px); }
.is-depth .player-north .tactics-slot { font-size: .75rem; }
.is-depth .field-projection {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: top left;
  transform: var(--card-projection, none);
}
.is-depth .player-north.facing-north .field-projection {
  transform: translate(100%, 100%) rotate(180deg) var(--card-projection, translate(0)) translate(100%, 100%) rotate(180deg);
}
.is-depth .board .tactics-slot:disabled { opacity: .72; }
.is-depth :is(.board :is(.slot, .tactics-slot), .zone-piles .pile-button):is(.tap-placement, .drop-ready, .drop-hover, .attack-source, .attack-selected),
.is-depth .zone-piles .pile-button:hover {
  --zone-line: var(--cyan);
  --zone-glow: #39d7ff45;
  --zone-stroke: 2px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.is-depth .board :is(.slot, .tactics-slot):is(.target, .attack-target, .can-interrupt) {
  --zone-line: var(--amber);
  --zone-glow: #ffc85740;
  --zone-stroke: 2px;
  border-color: transparent;
  box-shadow: none;
}
.is-depth :is(.activation-zone[aria-disabled], .direct-attack-zone) {
  border: 1px solid #72cde95c;
  background: transparent;
  box-shadow: none;
}
.is-depth :is(.activation-zone[aria-disabled="false"], .direct-attack-zone, .activation-zone.drop-ready, .activation-zone.drop-hover) {
  border-color: var(--cyan);
  background: #39d7ff20;
  box-shadow: inset 0 0 13px #39d7ff60;
}
@media (min-width: 1200px) {
  .is-depth .battlefield { width: min(100%, 1200px); }
}
.is-depth .player { --pile-width: clamp(46px, 8vw, 100px); --pile-gap: clamp(6px, 1vw, 10px); }
.is-depth .player-north { --pile-width: clamp(68px, 8vw, 98px); }
.is-depth .unit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--pile-width);
  column-gap: var(--pile-gap);
}
.is-depth .unit-row > .board { grid-column: 1; grid-row: 1; }
.is-depth .zone-piles {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.is-depth .player-north:not(.facing-north) .unit-row { grid-template-columns: var(--pile-width) minmax(0, 1fr); }
.is-depth .player-north:not(.facing-north) .unit-row > .board { grid-column: 2; }
.is-depth .player-north:not(.facing-north) .zone-piles { grid-column: 1; }
.is-depth .player-north:not(.facing-north) .pile-button[data-pile="exile"] { order: -1; }
.is-depth .zone-piles .pile-button[data-pile] {
  display: grid;
  align-content: center;
  gap: 2px;
  min-inline-size: 0;
  padding: 4px;
  overflow-wrap: anywhere;
  font-size: clamp(.69rem, 1.3vw, .8rem);
  line-height: 1.2;
  text-align: center;
}
.is-depth .zone-piles .pile-button > * {
  justify-self: center;
  max-inline-size: var(--pile-label-width, 100%);
  text-wrap: balance;
  translate: var(--pile-label-shift, 0px) 0;
}
.is-depth .player-north .pile-button[data-pile="exile"] > span {
  font-size: min(.8rem, calc(var(--pile-label-width, 4rem) / 5));
  white-space: nowrap;
}
.is-depth .zone-piles .pile-button strong { margin-inline-start: 0; font-size: clamp(.78rem, 1.5vw, 1rem); }
@media (min-width: 651px) {
  .is-depth .tactics-group { padding-inline-end: calc(var(--pile-width) + var(--pile-gap)); }
  .is-depth .player-north:not(.facing-north) .tactics-group {
    padding-inline: calc(var(--pile-width) + var(--pile-gap)) 0;
  }
}
.is-depth .center-stage { justify-self: center; }
.is-depth .action-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr);
  align-content: center;
}
.is-depth .action-banner > [role="status"] { grid-column: 2; min-block-size: 5em; align-content: center; }
.is-depth .action-banner > :not([role="status"]) { grid-column: 3; }
@media (max-width: 620px) {
  .is-depth .action-banner { grid-template-columns: minmax(0, 1fr); min-block-size: calc(5em + 74px); }
  .is-depth .action-banner > [role="status"],
  .is-depth .action-banner > :not([role="status"]) { grid-column: 1; justify-self: center; }
}
@media (max-width: 650px) {
  .is-depth .battlefield { --depth-gutter: 5px; gap: 8px; aspect-ratio: auto; }
  .is-depth .player-north { width: 88%; }
  .is-depth .player-south { width: 100%; }
  .is-depth .player-head { padding-inline: 6px; }
  .is-depth .player-south { --tactics-row-height: 92px; }
  .is-depth .player-north { --tactics-row-height: 64px; }
  .is-depth .slot .field-unit { --field-art-height: clamp(100px, 28vw, 148px); }
  .is-depth .player-north .slot .field-unit { --field-art-height: clamp(78px, 22vw, 108px); }
  .is-depth .player-north .tactics-slot.is-set > span:not(.tactic-art) { display: none; }
}
.draw-motion {
  position: fixed;
  inset: 0;
  z-index: 85;
  pointer-events: none;
  perspective: 900px;
}
.draw-motion-tray, .draw-flight {
  position: absolute;
  top: var(--draw-y);
  left: var(--draw-x);
  width: var(--draw-width);
  height: var(--draw-height);
}
.draw-motion-tray { animation: draw-tray-in .22s ease-out both; }
.draw-motion-parked { animation: none; clip-path: inset(-32px var(--draw-crop, 0px) -45px -32px); }
.draw-motion-left { --draw-enter: -125%; }
.draw-motion-right { --draw-enter: 125%; }
.draw-motion-deck {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  border: 1px solid #8be9fd94;
  box-shadow: 0 3px #778ca0, 0 6px #263952, 0 9px #778ca0, 0 12px #182738, 0 14px 22px #000c;
}
.draw-motion-count {
  position: absolute;
  left: 50%;
  top: calc(100% + 13px);
  translate: -50% 0;
  border: 1px solid #82ddfc;
  border-radius: 5px;
  background: #081624;
  color: #c2f1ff;
  padding: .2rem .35rem;
  font-size: clamp(.66rem, 2.7vw, .8rem);
  font-weight: 850;
  white-space: nowrap;
}
.draw-flight { transform-style: preserve-3d; }
.draw-flight img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  box-shadow: 0 4px 13px #000c;
  backface-visibility: hidden;
}
.draw-flight-face { transform: rotateY(180deg); }
.hand .draw-incoming .card-art { visibility: hidden; }
.board-moving-card {
  position: fixed;
  z-index: 84;
  translate: -50% -50%;
  aspect-ratio: 5 / 7;
  border-radius: 6px;
  box-shadow: 0 0 14px #62d8ff6a;
  pointer-events: none;
}
.board-card-rotating { visibility: hidden; }
@keyframes draw-tray-in { from { transform: translateX(var(--draw-enter)); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .draw-motion-tray { animation: none; } }
#hitBtn { border-color: var(--cyan); font-weight: 850; }
#stayBtn { border-color: var(--amber); font-weight: 850; }
@media (max-width: 580px) {
  .public-match .duel-center,
  .public-match.is-flipped .duel-center { inline-size: min(100%, 24rem); }
  .public-match .duel-center .duel-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-match .duel-center .duel-controls button { min-height: 52px; }
}
.analytics-settings { max-width: 40rem; margin: .5rem auto 0; padding-inline: .75rem; }
.analytics-settings summary { cursor: pointer; }
.analytics-settings button { min-height: 44px; }
.privacy-link { display: inline-block; margin-inline-start: .75rem; color: #81cfff; }
.privacy-policy a { color: #81cfff; overflow-wrap: anywhere; }
#skill-choice, #tactics-private-choice, #tactics-confirm:has(.skill-card-grid:not(:empty)) {
  width: min(620px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}

.action-dialog fieldset:has(.skill-card-grid) { min-inline-size: 0; }

.skill-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(68px, 100%), 1fr));
  gap: .5rem;
  margin-block: .35rem;
}

@media (min-width: 480px) {
  .skill-card-grid { grid-template-columns: repeat(auto-fill, minmax(106px, 1fr)); }
}

.skill-card-option { display: grid; grid-template-rows: 1fr auto; gap: .25rem; }
.skill-text-option { grid-column: 1 / -1; }

.skill-card-select {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  gap: .3rem;
  width: 100%;
  min-height: 44px;
  padding: .3rem;
  font-size: .82rem;
  overflow-wrap: anywhere;
  touch-action: manipulation;
}

.skill-card-select[aria-pressed="true"] {
  border-color: var(--cyan);
  box-shadow: inset 0 0 0 1px var(--cyan);
  background: #143748;
}

.skill-card-select .card-art {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 7;
  object-fit: contain;
}

.skill-card-order {
  position: absolute;
  inset: .5rem auto auto .5rem;
  min-inline-size: 1.7rem;
  padding: .08rem .3rem;
  border-radius: 100px;
  background: var(--amber);
  color: #14100a;
  font-size: 1rem;
  font-weight: 800;
}

.skill-card-preview { min-height: 44px; padding: .2rem; }
.skill-slot-picker { display: flex; flex-wrap: wrap; gap: .4rem; margin-block: .4rem; }
.skill-slot-picker:empty { display: none; }
.skill-slot-picker p { flex-basis: 100%; margin: 0; }
.skill-slot-picker button, .skill-text-option > button { min-height: 44px; }

.public-match.tutorial-match { overflow: clip; }
.tutorial-coach {
  position: fixed;
  inset-inline-start: 50%;
  inset-block-start: 50%;
  translate: -50%;
  z-index: 12;
  inline-size: min(36rem, calc(100% - 3rem));
  padding: .8rem 1rem;
  border: 1px solid var(--amber);
  border-radius: 10px;
  background: #0b1826f5;
  box-shadow: 0 8px 26px #0009;
  text-align: center;
  pointer-events: none;
}
.tutorial-coach h1, .tutorial-coach p { margin: 0 0 .2rem; }
.tutorial-coach h1 { font-size: clamp(1.1rem, 3vw, 1.6rem); color: var(--amber); }
.tutorial-coach p { font-size: clamp(1.02rem, 2.7vw, 1.32rem); font-weight: 700; }
.tutorial-coach nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-top: .55rem; font-size: .9rem; }
.tutorial-coach :is(.tutorial-next, button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .4rem .7rem;
  border: 1px solid #58758e;
  border-radius: 6px;
  background: #172d41;
  color: #ddf2ff;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
}
.tutorial-coach :is(.tutorial-next, button):hover { border-color: #b8eaff; background: #25445d; }
.tutorial-coach .tutorial-text-link {
  align-self: center;
  padding: .15rem .3rem;
  color: #aee5ff;
  text-decoration: underline;
  pointer-events: auto;
}
.tutorial-coach :is(a, button)[hidden] { display: none; }
.tutorial-coach .tutorial-primary { border-color: #ffe09b; background: #ffe09b; color: #282012; }
.tutorial-coach .tutorial-primary:hover { background: #fff1cf; }
.tutorial-dialog-instruction { color: #ffe09b; font-size: clamp(1rem, 2.6vw, 1.2rem); font-weight: 750; }
.tutorial-target, .tutorial-target:focus-visible {
  outline: 3px solid #ffd16d;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #ffd16d40;
}
.phase-shortcut-grip.tutorial-target { outline: none; box-shadow: none; }
.phase-shortcut-grip.tutorial-target::before {
  content: '';
  position: absolute;
  inset: 0 var(--rail-line-inset) 0 auto;
  inline-size: 14px;
  box-sizing: border-box;
  border: 2px solid #ffd16d;
  border-radius: 3px;
  pointer-events: none;
}
.phase-shortcut-grip.tutorial-target:focus-visible::before { box-shadow: inset 0 0 0 2px #ffd16d40; }
.tutorial-match:has(.phase-shortcut-panel:not([hidden])) .phase-shortcut { z-index: 14; }
.tutorial-match .phase-shortcut-grip::after { background: #fff; }
.tutorial-match .phase-shortcut-grip.tutorial-target::after { opacity: .9; }
@media (max-width: 760px), (max-width: 1024px) and (any-pointer: coarse) {
  .tutorial-swipe-step .phase-shortcut {
    --rail-line-inset: 0px;
    --rail-width: 44px;
    right: max(12px, env(safe-area-inset-right));
    z-index: 14;
  }
  .tutorial-swipe-step .phase-shortcut-grip { touch-action: none; }
  .tutorial-swipe-step .phase-shortcut-panel button { touch-action: manipulation; }
  .tutorial-swipe-step .tutorial-coach {
    inset-inline-start: 0;
    inset-block-start: 12px;
    inline-size: min(36rem, calc(100% - 68px));
    margin-inline-start: 12px;
    translate: none;
  }
}
@media (max-height: 440px) and (max-width: 760px),
       (max-height: 440px) and (max-width: 1024px) and (any-pointer: coarse) {
  .tutorial-swipe-step .tutorial-coach { padding: .4rem .65rem; }
  .tutorial-swipe-step .tutorial-coach h1 { font-size: 1rem; line-height: 1.2; }
  .tutorial-swipe-step .tutorial-coach p { font-size: .94rem; line-height: 1.3; }
  .tutorial-swipe-step .tutorial-coach nav { margin-top: .2rem; }
}
.public-match.tutorial-result-view { padding-top: clamp(2rem, 12vh, 7rem); }
.tutorial-result-view :is(.phasebar, .player-actions, .phase-shortcut, .player > :not(.player-head)) { display: none; }
.tutorial-result-view .player-north [data-free-chip] {
  padding-inline: .4rem;
  outline: 2px solid #ffd16d;
  border-radius: 4px;
}
.tutorial-arrow {
  position: fixed;
  z-index: 13;
  translate: -50% -50%;
  rotate: var(--arrow-angle, 0deg);
  color: #ffe09b;
  font: 900 2.2rem / 1 system-ui, sans-serif;
  text-shadow: 0 1px 3px #071019, 0 0 6px #000;
  pointer-events: none;
}
.tutorial-arrow[data-direction="down"] { --arrow-angle: 90deg; }
.tutorial-arrow[data-direction="up"] { --arrow-angle: -90deg; }
.tutorial-arrow[data-direction="left"] { --arrow-angle: 180deg; }
.tutorial-arrow > span { display: block; animation: tutorial-arrow-nudge 950ms ease-in-out infinite alternate; }
@keyframes tutorial-arrow-nudge { from { transform: translateX(-4px); } to { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) {
  .tutorial-arrow > span { animation: none; }
}
