:root {
  color-scheme: dark;
  --bg: #090a0c;
  --surface: #111318;
  --surface-raised: #181b20;
  --surface-soft: #20242a;
  --line: #30343c;
  --line-strong: #4b505a;
  --text: #f3f0e9;
  --muted: #a6a8ad;
  --red: #d43b45;
  --red-deep: #6e1d26;
  --gold: #d5aa4a;
  --gold-light: #f0cd77;
  --green: #2f8a67;
  --blue: #658ac7;
  --danger: #ef747b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 96px),
    linear-gradient(115deg, rgba(112, 20, 29, 0.22), transparent 30%),
    linear-gradient(245deg, rgba(79, 67, 35, 0.13), transparent 34%),
    var(--bg);
  color: var(--text);
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--red) 0 35%, var(--gold) 35% 65%, #24272d 65%);
}

button,
input {
  font: inherit;
}

button {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 15px;
  background: #202329;
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--gold);
  background: #292d34;
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  filter: saturate(0.55);
}

input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #0c0e12;
  color: var(--text);
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

input:hover {
  border-color: var(--line-strong);
}

input:focus {
  border-color: var(--gold);
  background: #0f1115;
  box-shadow: 0 0 0 3px rgba(213, 170, 74, 0.1);
}

input::placeholder {
  color: #6f737b;
}

label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
}

.app-shell {
  width: min(1240px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 82px;
  margin-bottom: 18px;
  padding: 8px 2px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border: 1px solid #555962;
  border-radius: 6px;
  background: linear-gradient(145deg, #23262c, #0d0f12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 10px 24px rgba(0, 0, 0, 0.28);
}

.brand-mark span {
  position: absolute;
  font-family: Georgia, serif;
  font-size: 25px;
  line-height: 1;
}

.brand-mark span:first-child {
  top: 5px;
  left: 7px;
  color: var(--red);
}

.brand-mark span:last-child {
  right: 7px;
  bottom: 5px;
  color: #f1eee7;
}

.brand {
  min-width: 0;
}

.brand h1 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 36px;
  line-height: 1.08;
  white-space: nowrap;
}

.brand p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.streak-counter {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 112px;
  min-height: 50px;
  justify-content: center;
  border: 1px solid #55482b;
  border-radius: 7px;
  padding: 8px 11px;
  background: linear-gradient(145deg, rgba(213, 170, 74, 0.11), #111318 66%);
  color: var(--muted);
  white-space: nowrap;
}

.streak-counter span,
.streak-counter small {
  font-size: 10px;
  font-weight: 800;
}

.streak-counter strong {
  color: var(--gold-light);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 25px;
  line-height: 1;
}

.tabs,
.actions,
.mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tabs {
  flex-wrap: nowrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(13, 15, 18, 0.84);
}

.tab {
  min-width: 116px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.tab:hover:not(:disabled) {
  border-color: transparent;
  background: #1a1d22;
}

.tab.active,
.mode-switch .active,
.segmented-control .active,
.primary {
  border-color: #edca73;
  background: linear-gradient(180deg, #e5bd5e, #c99734);
  color: #171106;
  font-weight: 800;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.28), 0 6px 18px rgba(133, 92, 17, 0.18);
}

.tab.active:hover:not(:disabled),
.mode-switch .active:hover:not(:disabled),
.segmented-control .active:hover:not(:disabled),
.primary:hover:not(:disabled) {
  border-color: #f5d889;
  background: linear-gradient(180deg, #edc96f, #d4a443);
}

.danger {
  border-color: #7f343c;
  background: #482128;
  color: #ffdadd;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  gap: 18px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 19, 24, 0.95);
  box-shadow: var(--shadow);
}

.main-panel {
  min-width: 0;
  overflow: hidden;
}

.leaderboard-panel {
  position: sticky;
  top: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(213, 170, 74, 0.05), transparent 38%),
    rgba(17, 19, 24, 0.96);
}

.section {
  position: relative;
  padding: 22px;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section h2,
.section h3 {
  margin: 0 0 14px;
}

.section h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 21px;
}

.section h2::before {
  content: "";
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: linear-gradient(var(--red), var(--gold));
}

.section h3 {
  font-size: 16px;
}

.muted {
  color: var(--muted);
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 9px;
  border: 1px solid #353942;
  border-radius: 999px;
  background: rgba(9, 11, 14, 0.72);
  color: #b9bcc2;
  font-size: 12px;
  line-height: 1.2;
}

.pill.red {
  border-color: rgba(212, 59, 69, 0.68);
  color: #ffd7da;
  background: rgba(91, 26, 34, 0.42);
}

.pill.black {
  border-color: #626773;
  color: #eef0f4;
}

.mode-switch {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mode-switch button {
  flex: 1;
}

.arena {
  isolation: isolate;
  display: grid;
  gap: 14px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 7px),
    linear-gradient(135deg, rgba(19, 69, 51, 0.72), rgba(8, 28, 24, 0.86));
}

.arena::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  border: 1px solid rgba(213, 170, 74, 0.16);
  border-radius: 6px;
  pointer-events: none;
}

.player-row {
  border: 1px solid rgba(218, 221, 223, 0.2);
  border-radius: 7px;
  padding: 13px;
  background: rgba(7, 10, 11, 0.78);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.18);
}

.player-row.black {
  border-left: 3px solid #737984;
}

.player-row.red {
  border-left: 3px solid var(--red);
}

.player-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-bottom: 11px;
}

.player-name {
  color: #fffdf7;
  font-size: 16px;
  font-weight: 800;
}

.player-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.player-identity > div {
  min-width: 0;
}

.player-identity .muted {
  margin-top: 2px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-avatar,
.player-color-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 2px solid var(--line-strong);
  border-radius: 6px;
}

.player-avatar {
  display: block;
  object-fit: cover;
  object-position: 50% 24%;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.35);
}

.player-avatar.safe {
  border-color: #ad3b43;
}

.player-avatar.wild {
  border-color: #4d9a70;
}

.player-avatar.sharp {
  border-color: #7288bd;
}

.player-avatar.secret {
  border-color: var(--gold);
}

.player-color-mark {
  position: relative;
  background: #202329;
}

.player-color-mark::after {
  content: "♠";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #d9dde4;
  font-family: Georgia, serif;
  font-size: 25px;
}

.player-color-mark.red {
  border-color: #cc4b55;
  background: #4b161d;
}

.player-color-mark.red::after {
  content: "♦";
  color: #f37c83;
}

.speech-bubble {
  position: relative;
  width: fit-content;
  max-width: min(76%, 560px);
  min-height: 38px;
  margin: 0 0 13px 64px;
  border: 1px solid #555b65;
  border-radius: 7px;
  padding: 9px 13px;
  background: #f0ede5;
  color: #14161a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.24);
}

.speech-bubble::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 18px;
  width: 10px;
  height: 10px;
  border-top: 1px solid #555b65;
  border-left: 1px solid #555b65;
  background: #f0ede5;
  transform: rotate(45deg);
}

.speech-bubble.red {
  border-color: #a9474f;
}

.speech-bubble.red::before {
  border-color: #a9474f;
}

.speech-bubble.black {
  margin-right: 64px;
  margin-left: auto;
  border-color: #777e89;
}

.speech-bubble.black::before {
  right: 18px;
  left: auto;
  border-color: #777e89;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, 1fr));
  gap: 10px;
}

.card {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 116px;
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  border: 2px solid #d7d0c2;
  border-radius: 8px;
  padding: 0;
  background: #f5f0e7;
  color: #121318;
  box-shadow: 0 10px 21px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  font-family: Georgia, "Yu Mincho", serif;
  font-size: 38px;
  font-weight: 900;
  transform-origin: center bottom;
}

.card:hover:not(:disabled) {
  transform: translateY(-3px);
}

.card.red-suit {
  color: #c92734;
}

.card.black-suit {
  color: #101217;
}

.card.selectable {
  cursor: pointer;
  border-color: var(--gold);
  outline: 2px solid rgba(213, 170, 74, 0.24);
  outline-offset: 2px;
  animation: next-card-glow 1.45s ease-in-out infinite;
}

.card.selectable:hover {
  outline-color: var(--gold-light);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.36), 0 0 0 3px rgba(213, 170, 74, 0.16);
}

.card.back {
  border-color: #c2a45d;
  color: #f4d486;
  background:
    linear-gradient(45deg, transparent 43%, rgba(230, 191, 94, 0.22) 43% 46%, transparent 46% 54%, rgba(230, 191, 94, 0.22) 54% 57%, transparent 57%),
    linear-gradient(-45deg, transparent 43%, rgba(230, 191, 94, 0.16) 43% 46%, transparent 46% 54%, rgba(230, 191, 94, 0.16) 54% 57%, transparent 57%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 7px),
    linear-gradient(145deg, #681c27, #26151a 58%, #111318);
}

.card.back::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(240, 205, 119, 0.48);
  border-radius: 5px;
}

.card.back::after {
  content: "◆";
  position: absolute;
  color: rgba(240, 205, 119, 0.34);
  font-size: 46px;
  transform: rotate(45deg);
}

.card.face {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(235, 229, 218, 0.98)),
    #f5f0e7;
}

.card .corner {
  position: absolute;
  z-index: 2;
  font-family: Georgia, serif;
  font-size: 14px;
  line-height: 1;
}

.card .corner.top {
  top: 7px;
  left: 8px;
}

.card .corner.bottom {
  right: 8px;
  bottom: 7px;
  transform: rotate(180deg);
}

.card .pip {
  position: absolute;
  top: 50%;
  left: 50%;
  opacity: 0.12;
  font-size: 76px;
  transform: translate(-50%, -52%);
}

.card .rank {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px rgba(255, 255, 255, 0.72);
}

.card .peek {
  position: absolute;
  inset: 10px;
  z-index: 4;
  display: none;
  place-items: center;
  border: 1px solid rgba(17, 19, 24, 0.16);
  border-radius: 5px;
  background: rgba(249, 245, 237, 0.97);
  color: #111318;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.card .peek,
.card .peek * {
  color: #111318 !important;
}

.card.back:hover .peek {
  display: grid;
}

.card .peek b {
  font-size: 36px;
}

.card .peek small {
  font-size: 20px;
}

.picker {
  display: grid;
  grid-template-columns: repeat(10, minmax(50px, 1fr));
  gap: 7px;
  margin: 12px 0 15px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: #0c0e11;
}

.pick-card {
  min-height: 88px;
  font-size: 31px;
}

.pick-card .pip {
  display: none;
}

.pick-card:hover:not(:disabled) {
  transform: translateY(-5px);
}

.pick-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(213, 170, 74, 0.2), 0 12px 22px rgba(0, 0, 0, 0.32);
}

.count-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid #f3d47f;
  border-radius: 999px;
  background: #c99632;
  color: #171106;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
}

.cpu-opponent-feature {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin: 14px 0 15px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background:
    linear-gradient(100deg, rgba(112, 24, 34, 0.16), transparent 42%),
    #0d0f13;
}

.opponent-portrait {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  border-radius: 7px;
  background: #0a0b0d;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
}

.opponent-portrait.safe {
  border-color: #b13d46;
}

.opponent-portrait.wild {
  border-color: #4d9a70;
}

.opponent-portrait.sharp {
  border-color: #7086bc;
}

.opponent-portrait.secret {
  border-color: var(--gold);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.48), 0 0 0 3px rgba(213, 170, 74, 0.1);
}

.opponent-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease, filter 300ms ease;
}

.opponent-portrait:hover img {
  filter: contrast(1.04);
  transform: scale(1.025);
}

.opponent-portrait span {
  position: absolute;
  left: 9px;
  bottom: 9px;
  padding: 5px 8px;
  border: 1px solid rgba(240, 205, 119, 0.36);
  border-radius: 5px;
  background: rgba(8, 10, 12, 0.88);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 800;
}

.opponent-details h3 {
  margin: 3px 0 7px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 44px;
  line-height: 1.05;
}

.opponent-details > p:last-of-type {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.opponent-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.cpu-lineup {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 20px;
}

.lineup-opponent {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #13161a;
  opacity: 0.52;
}

.lineup-opponent::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
}

.lineup-opponent.current {
  border-color: #b6903d;
  background: linear-gradient(100deg, rgba(213, 170, 74, 0.13), #16181c 60%);
  opacity: 1;
}

.lineup-opponent.current::before {
  background: var(--gold);
}

.lineup-opponent.cleared {
  opacity: 0.78;
}

.lineup-opponent img {
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 5px;
  object-fit: cover;
  filter: saturate(0.82);
}

.lineup-opponent.hidden-boss {
  border-style: dashed;
  background: #0e1013;
}

.lineup-secret-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #555b65;
  border-radius: 5px;
  color: #8f949d;
  background: #090b0e;
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 900;
}

.lineup-opponent small,
.lineup-opponent strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-opponent small {
  color: var(--muted);
  font-size: 10px;
}

.lineup-opponent strong {
  margin-top: 2px;
  font-size: 13px;
}

.opponent-cutin {
  position: relative;
  min-height: 500px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #626771;
  border-radius: 7px;
  background: #090a0c;
  box-shadow: var(--shadow);
  animation: cutin-reveal 420ms ease-out both;
}

.opponent-cutin::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-top: 3px solid var(--red);
}

.opponent-cutin.secret::before {
  border-top-color: var(--gold);
}

.opponent-cutin.defeat::before {
  border-top-color: var(--red);
}

.opponent-cutin > img {
  position: absolute;
  inset: 0 auto 0 0;
  width: 58%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: cutin-image 900ms ease-out both;
}

.cutin-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, transparent 32%, rgba(7, 8, 10, 0.28) 48%, #07080a 59%),
    linear-gradient(0deg, rgba(7, 8, 10, 0.72), transparent 48%);
}

.cutin-copy {
  position: absolute;
  right: clamp(20px, 4vw, 48px);
  bottom: clamp(24px, 5vw, 54px);
  z-index: 3;
  width: min(34%, 380px);
}

.cutin-kicker {
  display: inline-block;
  border-bottom: 2px solid var(--red);
  padding-bottom: 5px;
  color: #f08a91;
  font-size: 11px;
  font-weight: 900;
}

.secret .cutin-kicker {
  border-bottom-color: var(--gold);
  color: var(--gold-light);
}

.defeat .cutin-kicker {
  border-bottom-color: var(--red);
  color: #f08a91;
}

.cutin-copy h2 {
  margin: 9px 0 4px;
  color: #fffdf7;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  overflow-wrap: anywhere;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.7);
}

.cutin-title {
  margin: 0;
  color: #bfc2c8;
  font-size: 13px;
}

.cutin-copy blockquote {
  margin: 22px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding: 14px 0;
  color: #fff7e2;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.55;
}

.cutin-copy .actions {
  justify-content: flex-end;
}

.cutin-copy button {
  min-width: 160px;
}

@keyframes cutin-reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cutin-image {
  from {
    filter: contrast(1.15) brightness(0.6);
    transform: scale(1.045);
  }
  to {
    filter: contrast(1) brightness(1);
    transform: scale(1);
  }
}

.match-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  background: linear-gradient(90deg, rgba(107, 28, 37, 0.12), transparent 42%);
}

.match-header h2 {
  margin-bottom: 0;
}

.match-header .status-line {
  margin: 0;
}

.decision-section {
  background:
    linear-gradient(105deg, rgba(213, 170, 74, 0.055), transparent 44%),
    #111318;
}

.turn-timer {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
  min-height: 42px;
  margin: -2px 0 10px;
  border-bottom: 1px solid rgba(213, 170, 74, 0.25);
  padding: 0 2px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.turn-timer strong {
  display: inline-block;
  min-width: 38px;
  color: var(--gold-light);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 29px;
  line-height: 1;
  text-align: right;
}

.turn-timer.urgent {
  border-bottom-color: rgba(239, 116, 123, 0.55);
  color: #ffb9bd;
}

.turn-timer.urgent strong {
  color: var(--danger);
}

.next-options button:not(:disabled) {
  position: relative;
  z-index: 1;
  border-color: var(--gold-light);
  animation: next-button-glow 1.45s ease-in-out infinite;
}

@keyframes next-button-glow {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(213, 170, 74, 0.12), 0 7px 20px rgba(0, 0, 0, 0.28);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(213, 170, 74, 0.28), 0 0 25px rgba(213, 170, 74, 0.42);
  }
}

@keyframes next-card-glow {
  0%, 100% {
    box-shadow: 0 10px 21px rgba(0, 0, 0, 0.32), 0 0 0 2px rgba(213, 170, 74, 0.13);
  }
  50% {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.36), 0 0 0 4px rgba(213, 170, 74, 0.3), 0 0 22px rgba(213, 170, 74, 0.3);
  }
}

@keyframes match-spinner {
  to {
    transform: rotate(360deg);
  }
}

.game-guidance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
  gap: 1px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid #555b65;
  border-radius: 7px;
  background: #3a3f47;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.game-guidance.action-required {
  border-color: var(--gold);
  box-shadow:
    0 0 0 3px rgba(213, 170, 74, 0.12),
    0 16px 36px rgba(0, 0, 0, 0.32);
}

.guidance-recent,
.guidance-next {
  min-width: 0;
  padding: 15px 17px;
  background: #12151a;
}

.guidance-next {
  position: relative;
  padding-left: 21px;
  background: linear-gradient(120deg, rgba(47, 138, 103, 0.15), rgba(18, 21, 26, 0.98) 72%);
}

.action-required .guidance-next {
  background: linear-gradient(120deg, rgba(213, 170, 74, 0.17), rgba(18, 21, 26, 0.98) 72%);
}

.guidance-next::before {
  content: "";
  position: absolute;
  inset: 14px auto 14px 0;
  width: 3px;
  border-radius: 2px;
  background: var(--green);
}

.action-required .guidance-next::before {
  background: var(--gold);
}

.guidance-label {
  display: block;
  margin-bottom: 6px;
  color: #92969e;
  font-size: 10px;
  font-weight: 900;
}

.guidance-recent p {
  margin: 0;
  color: #d3d5d9;
  font-size: 13px;
  line-height: 1.5;
}

.guidance-next strong {
  display: block;
  color: #dceee6;
  font-size: 17px;
  line-height: 1.45;
}

.action-required .guidance-next strong {
  color: var(--gold-light);
}

.decision-controls > :last-child {
  margin-bottom: 0;
}

.log-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section .log-heading h3 {
  margin: 0;
}

.log-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.log {
  display: grid;
  gap: 7px;
  max-height: 250px;
  overflow: auto;
  scrollbar-color: #4e535d #15171b;
}

.log-item {
  border-left: 3px solid #8f7132;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.035);
  color: #b8bbc1;
  font-size: 13px;
}

.log-item:last-child {
  border-left-color: var(--gold);
  background: rgba(213, 170, 74, 0.065);
  color: #e4e0d6;
}

.leaderboard-panel .section {
  padding: 19px;
}

.leaderboard-panel h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: #e9e4d9;
  font-size: 14px;
}

.leaderboard-panel h3::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(213, 170, 74, 0.12);
}

.ranking-row {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 55px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 13px;
}

.ranking-row:last-child {
  border-bottom: 0;
}

.ranking-row > strong:first-child {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid #3c4048;
  border-radius: 50%;
  color: #d7d9dd;
  background: #191c21;
  font-size: 12px;
}

.ranking-row:first-of-type > strong:first-child {
  border-color: #b68d37;
  color: #1a1306;
  background: var(--gold);
}

.ranking-row > strong:last-child {
  color: var(--gold-light);
  white-space: nowrap;
}

.ranking-row small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
}

.leaderboard-block + .leaderboard-block {
  margin-top: 24px;
}

.leaderboard-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 9px;
  border-color: #3c4149;
  padding: 8px 11px;
  background: #171a1f;
  color: #d5d7dc;
  font-size: 12px;
  font-weight: 800;
}

.leaderboard-more span {
  color: var(--gold-light);
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 1;
}

.clearer-list {
  display: grid;
  gap: 5px;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-color: #4e535d #15171b;
}

.clearer-row {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 39px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 6px 0;
  font-size: 13px;
}

.clearer-row:last-child {
  border-bottom: 0;
}

.clearer-row span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid rgba(47, 138, 103, 0.58);
  border-radius: 50%;
  color: #87d0af;
  background: rgba(47, 138, 103, 0.12);
  font-size: 12px;
  font-weight: 900;
}

.side-heading {
  margin-top: 24px !important;
}

.leaderboard-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 4, 5, 0.84);
  backdrop-filter: blur(8px);
}

.leaderboard-dialog {
  display: flex;
  flex-direction: column;
  width: min(680px, 100%);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow: hidden;
  border: 1px solid #5b6069;
  border-radius: 8px;
  background:
    linear-gradient(125deg, rgba(213, 170, 74, 0.09), transparent 32%),
    #121419;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.68);
}

.leaderboard-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 22px 16px;
}

.leaderboard-dialog-header span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
}

.leaderboard-dialog-header h2 {
  margin: 4px 0 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 26px;
}

.leaderboard-close {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  font-size: 25px;
  line-height: 1;
}

.leaderboard-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 0 22px 16px;
}

.leaderboard-tab {
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
}

.leaderboard-tab.active {
  border-color: #d9b354;
  background: rgba(213, 170, 74, 0.16);
  color: var(--gold-light);
}

.leaderboard-full-list {
  min-height: 0;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  padding: 7px 22px 22px;
  outline: none;
  scrollbar-color: #555b65 #15171b;
}

.leaderboard-full-list:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(240, 205, 119, 0.65);
}

.leaderboard-full-list .clearer-list {
  max-height: none;
  overflow: visible;
}

.room-list {
  display: grid;
  gap: 8px;
}

.room-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  padding: 9px 10px 9px 13px;
  background: #14171b;
}

.room-list-row:hover {
  border-color: #4b5059;
  background: #191c21;
}

.room-list-row .muted {
  margin-top: 3px;
  font-size: 11px;
}

.room-list-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.room-code-mini {
  border: 1px solid #4b5059;
  border-radius: 4px;
  padding: 2px 6px;
  color: #cdd0d5;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 10px;
  font-weight: 800;
}

.room-code {
  color: var(--gold-light);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 29px;
  font-weight: 900;
}

.room-title {
  margin-top: 3px;
  color: var(--gold-light);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 24px;
  font-weight: 900;
}

.rated-matchmaking {
  background:
    linear-gradient(115deg, rgba(47, 138, 103, 0.1), transparent 38%),
    linear-gradient(250deg, rgba(213, 170, 74, 0.07), transparent 32%),
    #111318;
}

.matchmaking-heading,
.hand-selection-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.matchmaking-heading {
  margin-bottom: 20px;
}

.matchmaking-heading h2,
.hand-selection-heading h3 {
  margin-bottom: 0;
}

.matchmaking-heading .muted {
  margin-bottom: 5px;
  color: #77b79b;
  font-size: 10px;
  font-weight: 900;
}

.rating-pill {
  border-color: rgba(213, 170, 74, 0.55);
  color: var(--gold-light);
}

.hand-selection-heading {
  align-items: center;
  margin-top: 24px;
}

.hand-selection-heading .muted {
  font-size: 11px;
}

.matchmaking-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.matchmaking-actions button {
  min-width: 188px;
}

.matchmaking-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 68px;
  margin-top: 16px;
  border: 1px solid #3e444d;
  border-radius: 7px;
  padding: 12px 14px;
  background: #0d1014;
}

.matchmaking-status.searching {
  border-color: rgba(47, 138, 103, 0.72);
  box-shadow: 0 0 0 3px rgba(47, 138, 103, 0.1);
}

.matchmaking-status.not-found,
.matchmaking-status.error {
  grid-template-columns: 1fr;
  border-color: rgba(239, 116, 123, 0.58);
  color: #ffdadd;
  background: rgba(72, 33, 40, 0.42);
}

.matchmaking-status small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.match-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(119, 183, 155, 0.22);
  border-top-color: #77b79b;
  border-radius: 50%;
  animation: match-spinner 850ms linear infinite;
}

.match-countdown {
  display: flex;
  align-items: baseline;
  gap: 3px;
  min-width: 58px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.match-countdown strong {
  color: #a9dcc5;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 27px;
  line-height: 1;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.connection-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #737983;
}

.connection-status.connected::before {
  background: #55b98e;
  box-shadow: 0 0 0 3px rgba(85, 185, 142, 0.12);
}

.room-create-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(360px, 1.28fr);
  gap: 18px;
  align-items: end;
}

.room-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.room-setting {
  min-width: 0;
}

.setting-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  min-height: 44px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0c0e12;
}

.segmented-control button {
  min-width: 0;
  min-height: 36px;
  border-color: transparent;
  padding: 7px 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.segmented-control button:hover:not(:disabled) {
  border-color: #4b5059;
  background: #1a1d22;
}

.create-room-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.create-room-actions button {
  min-width: 168px;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.form-grid > button {
  min-width: 122px;
}

.prize {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 4, 5, 0.84);
  backdrop-filter: blur(8px);
}

.prize-box {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #dfb752;
  border-radius: 8px;
  padding: 34px 28px;
  text-align: center;
  background:
    linear-gradient(125deg, rgba(213, 170, 74, 0.18), transparent 35%),
    #141310;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.64), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.prize-box::before,
.prize-box::after {
  content: none;
}

.prize-box h2 {
  margin: 0 0 10px;
  color: var(--gold-light);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 46px;
}

.prize-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.prize-amount {
  margin: 14px 0;
  color: #ded8ca;
  font-size: 17px;
  font-weight: 800;
}

.prize-amount strong {
  display: inline-block;
  margin-left: 7px;
  color: var(--gold-light);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 38px;
}

.prize-disclaimer {
  margin: 0 auto 17px;
  border: 1px solid rgba(239, 116, 123, 0.32);
  border-radius: 6px;
  padding: 9px 11px;
  color: #e6c3c5 !important;
  background: rgba(72, 33, 40, 0.34);
  font-size: 11px;
  line-height: 1.55;
}

.clear-share {
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
}

.clear-share > strong {
  display: block;
  color: #f2ede2;
  font-size: 14px;
}

.clear-share > p {
  margin: 6px 0 13px;
  color: var(--muted);
  font-size: 11px;
}

.clear-share-actions {
  justify-content: center;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 15px;
  background: #202329;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.button-link:hover {
  border-color: var(--gold);
  background: #292d34;
  transform: translateY(-1px);
}

.share-status {
  margin: 11px 0 0 !important;
  color: #9fd8bd !important;
}

.prize-close {
  justify-content: center;
  margin-top: 16px;
}

.prize-close button {
  min-width: 128px;
}

.prize-box p {
  color: #d7d1c5;
}

@media (max-width: 1040px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 270px;
  }

  .picker {
    grid-template-columns: repeat(5, minmax(50px, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    width: min(760px, calc(100vw - 24px));
  }

  .topbar,
  .layout,
  .form-grid,
  .room-create-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    gap: 15px;
  }

  .topbar-controls {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    width: 100%;
  }

  .tabs {
    width: 100%;
  }

  .tab {
    min-width: 0;
    flex: 1;
  }

  .leaderboard-panel {
    position: static;
  }

  .form-grid > button {
    width: 100%;
  }

  .opponent-cutin {
    width: 100%;
    aspect-ratio: auto;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: auto;
    margin-right: max(9px, env(safe-area-inset-right));
    margin-left: max(9px, env(safe-area-inset-left));
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: max(42px, env(safe-area-inset-bottom));
  }

  .topbar {
    margin-bottom: 10px;
    padding-bottom: 12px;
  }

  .brand-lockup {
    gap: 10px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .brand-mark span {
    font-size: 21px;
  }

  .brand h1 {
    font-size: 27px;
    white-space: normal;
  }

  .brand p {
    font-size: 11px;
    line-height: 1.5;
  }

  .section {
    padding: 16px;
  }

  .section h2 {
    font-size: 19px;
  }

  .prize {
    padding: 9px;
  }

  .prize-box {
    max-height: calc(100vh - 18px);
    padding: 24px 17px;
  }

  .prize-box h2 {
    font-size: 36px;
  }

  .prize-amount strong {
    font-size: 31px;
  }

  .clear-share-actions > * {
    width: 100%;
  }

  .leaderboard-modal {
    padding: max(9px, env(safe-area-inset-top)) max(9px, env(safe-area-inset-right)) max(9px, env(safe-area-inset-bottom)) max(9px, env(safe-area-inset-left));
  }

  .leaderboard-dialog {
    max-height: calc(100vh - 18px);
    max-height: calc(100dvh - 18px);
  }

  .leaderboard-dialog-header {
    padding: 16px 15px 13px;
  }

  .leaderboard-dialog-header h2 {
    font-size: 21px;
  }

  .leaderboard-tabs {
    padding: 0 15px 13px;
  }

  .leaderboard-tab {
    padding-right: 6px;
    padding-left: 6px;
    font-size: 12px;
  }

  .leaderboard-full-list {
    padding: 6px 15px 18px;
  }

  .room-settings {
    grid-template-columns: 1fr;
  }

  .matchmaking-heading,
  .hand-selection-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .matchmaking-actions button {
    width: 100%;
  }

  .matchmaking-status {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .match-countdown {
    grid-column: 2;
    justify-content: flex-start;
    text-align: left;
  }

  .create-room-actions button {
    width: 100%;
  }

  .cpu-opponent-feature {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 13px;
    padding: 11px;
  }

  .opponent-details h3 {
    font-size: 30px;
  }

  .opponent-details > p:last-of-type {
    font-size: 12px;
    line-height: 1.45;
  }

  .cpu-lineup {
    gap: 5px;
  }

  .lineup-opponent {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 5px;
    padding: 6px;
  }

  .lineup-opponent img {
    width: 34px;
    height: 34px;
  }

  .lineup-secret-mark {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .lineup-opponent small {
    display: none;
  }

  .lineup-opponent strong {
    margin-top: 0;
    font-size: 11px;
  }

  .opponent-cutin {
    min-height: 620px;
    aspect-ratio: auto;
  }

  .opponent-cutin > img {
    width: 100%;
    height: 62%;
    object-position: 35% center;
  }

  .cutin-shade {
    background: linear-gradient(0deg, #080a0d 0 39%, rgba(8, 10, 13, 0.92) 48%, transparent 75%);
  }

  .cutin-copy {
    right: 18px;
    bottom: 20px;
    left: 18px;
    width: auto;
  }

  .cutin-copy h2 {
    font-size: 42px;
  }

  .cutin-copy blockquote {
    margin: 15px 0;
    font-size: 17px;
  }

  .cutin-copy button {
    width: 100%;
  }

  .picker {
    grid-template-columns: repeat(5, minmax(42px, 1fr));
    gap: 6px;
    padding: 9px;
  }

  .card,
  .pick-card {
    min-height: 0;
  }

  .pick-card {
    font-size: 28px;
  }

  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .card {
    font-size: 30px;
  }

  .card .corner {
    font-size: 11px;
  }

  .card .pip {
    font-size: 52px;
  }

  .card .peek {
    inset: 6px;
  }

  .card .peek b {
    font-size: 26px;
    line-height: 1;
  }

  .card .peek small {
    font-size: 14px;
    line-height: 1;
  }

  .decision-controls .actions > button {
    flex: 1 1 120px;
  }

  .player-head {
    align-items: flex-start;
  }

  .player-avatar,
  .player-color-mark {
    width: 43px;
    height: 43px;
    flex-basis: 43px;
  }

  .speech-bubble {
    max-width: 86%;
    margin-left: 52px;
    font-size: 12px;
  }

  .speech-bubble.black {
    margin-right: 52px;
    margin-left: auto;
  }

  .player-head > .status-line {
    justify-content: flex-end;
    margin-top: 0;
  }

  .match-header {
    display: block;
  }

  .match-header h2 {
    margin-bottom: 10px;
  }

  .game-guidance {
    grid-template-columns: 1fr;
  }

  .guidance-recent,
  .guidance-next {
    padding: 13px 14px;
  }

  .guidance-next {
    padding-left: 18px;
  }

  .guidance-next strong {
    font-size: 15px;
  }

  .room-code {
    font-size: 24px;
  }
}

@media (max-width: 390px) {
  .brand-mark {
    display: none;
  }

  .topbar-controls {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 7px;
  }

  .streak-counter {
    min-width: 0;
    min-height: 46px;
    gap: 3px;
    padding: 6px 5px;
  }

  .streak-counter strong {
    font-size: 22px;
  }

  .tab {
    padding-right: 7px;
    padding-left: 7px;
    font-size: 13px;
    white-space: nowrap;
  }

  .cpu-opponent-feature {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .opponent-details h3 {
    font-size: 27px;
  }

  .opponent-details .status-line .pill:last-child {
    display: none;
  }

  .cpu-lineup {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .lineup-opponent {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 6px;
  }

  .lineup-opponent img {
    width: 34px;
    height: 34px;
  }

  .lineup-secret-mark {
    width: 34px;
    height: 34px;
  }

  .lineup-opponent strong {
    overflow: visible;
    text-overflow: clip;
  }

  .player-identity .muted {
    max-width: 135px;
  }

  .pill {
    font-size: 11px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .opponent-cutin {
    min-height: 360px;
  }

  .cutin-copy {
    right: 22px;
    bottom: 15px;
  }

  .cutin-copy h2 {
    font-size: 38px;
  }

  .cutin-copy blockquote {
    margin: 12px 0;
    padding: 10px 0;
    font-size: 16px;
  }
}

@media (hover: none), (pointer: coarse) {
  .card.back .peek {
    display: grid;
  }

  .card:hover:not(:disabled),
  button:hover:not(:disabled),
  .button-link:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
