:root {
  color-scheme: dark;
  --ink: #071713;
  --ink-soft: #0d211c;
  --panel: #10251f;
  --panel-raised: #163029;
  --ledger: #f1f0e8;
  --ledger-soft: #e7e5da;
  --text: #f4f2e9;
  --text-dark: #10211d;
  --muted: #99aaa3;
  --muted-dark: #66736e;
  --line: rgba(231, 235, 226, 0.13);
  --line-dark: rgba(16, 33, 29, 0.15);
  --gold: #f2c14f;
  --fold: #93a7b0;
  --raise: #e9765b;
  --call: #58b991;
  --three-bet: #e6ae4d;
  --check: #7486cb;
  --danger: #d35c55;
  --focus: #ffe486;
  --display: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  --data: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(43, 112, 86, 0.25), transparent 45%),
    var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button {
  color: inherit;
}

button:not(:disabled),
a {
  cursor: pointer;
}

button:active {
  filter: brightness(0.94);
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--text-dark);
  background: var(--focus);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 3vw, 46px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 23, 19, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  width: 40px;
  height: 40px;
  overflow: visible;
}

.brand__mark rect {
  fill: var(--gold);
  stroke: var(--ink);
  stroke-width: 1.5;
}

.brand__mark rect:first-child {
  fill: var(--raise);
}

.brand__mark path {
  fill: var(--ink);
}

.brand span {
  display: grid;
  line-height: 1.05;
}

.brand strong {
  font-family: var(--display);
  font-size: 22px;
  font-stretch: condensed;
  letter-spacing: 0.02em;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--data);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.topbar__meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bdc9c4;
  font-size: 13px;
}

.status-dot i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--call);
  box-shadow: 0 0 0 4px rgba(88, 185, 145, 0.11);
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  transition: background 160ms ease, border-color 160ms ease;
}

.icon-button:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.icon-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-shell {
  width: min(1780px, 100%);
  min-height: calc(100vh - 151px);
  display: grid;
  grid-template-columns: minmax(230px, 0.74fr) minmax(610px, 2.35fr) minmax(310px, 0.98fr);
  gap: 14px;
  margin: 0 auto;
  padding: 14px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.scenario-panel,
.hand-panel {
  padding: clamp(18px, 2vw, 26px);
}

.panel-heading,
.range-header,
.hand-panel__topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--gold);
  font-family: var(--data);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  margin-bottom: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}

h1 {
  font-size: clamp(27px, 2vw, 34px);
}

h2 {
  font-size: clamp(25px, 2vw, 32px);
}

.street-chip {
  padding: 5px 8px;
  color: var(--gold);
  border: 1px solid rgba(242, 193, 79, 0.32);
  border-radius: 999px;
  font-family: var(--data);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-label {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 22px 0 20px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.game-label svg {
  width: 26px;
  fill: none;
  stroke: var(--call);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.game-label span {
  display: grid;
}

.game-label strong {
  font-size: 14px;
}

.game-label small {
  color: var(--muted);
  font-size: 11px;
}

.control-group {
  min-width: 0;
  margin: 0;
  padding: 18px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.control-group legend {
  width: 100%;
  margin-bottom: 10px;
  padding: 0;
  color: #c7d0cc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.control-group legend span {
  color: var(--muted);
  font-weight: 400;
}

.segmented,
.read-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.13);
}

.segmented button,
.read-control button {
  min-height: 38px;
  padding: 7px 4px;
  color: var(--muted);
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-family: var(--data);
  font-size: 10px;
  font-weight: 700;
  transition: color 160ms ease, background 160ms ease;
}

.segmented button:hover,
.read-control button:hover {
  color: var(--text);
}

.segmented button.is-active,
.read-control button.is-active {
  color: var(--text-dark);
  background: var(--ledger);
}

.choice-stack {
  display: grid;
  gap: 6px;
}

.choice {
  min-height: 56px;
  display: grid;
  grid-template-columns: 30px 1fr 16px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.028);
  transition: border-color 160ms ease, background 160ms ease;
}

.choice:hover {
  background: rgba(255, 255, 255, 0.055);
}

.choice.is-active {
  border-color: rgba(242, 193, 79, 0.46);
  background: rgba(242, 193, 79, 0.08);
}

.choice__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--data);
  font-size: 9px;
  font-weight: 700;
}

.choice.is-active .choice__icon {
  color: var(--ink);
  border-color: var(--gold);
  background: var(--gold);
}

.choice span:nth-child(2) {
  display: grid;
}

.choice strong {
  font-size: 12px;
}

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

.choice > svg {
  width: 15px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.position-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.position-grid button {
  min-height: 40px;
  padding: 7px 4px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  font-family: var(--data);
  font-size: 11px;
  font-weight: 700;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.position-grid button:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}

.position-grid button.is-active {
  color: var(--ink);
  border-color: var(--call);
  background: var(--call);
}

.is-hidden {
  display: none !important;
}

.scenario-note {
  margin: 2px 0 0;
  padding-left: 11px;
  color: var(--muted);
  border-left: 2px solid var(--gold);
  font-size: 11px;
  line-height: 1.55;
}

.range-panel {
  align-self: start;
  overflow: hidden;
  color: var(--text-dark);
  background: var(--ledger);
}

.range-header {
  align-items: center;
  padding: 23px 24px 17px;
}

.range-header .eyebrow {
  color: #a45340;
}

.range-header h2 {
  font-size: clamp(28px, 3vw, 40px);
}

.range-header p:last-child {
  margin: 6px 0 0;
  color: var(--muted-dark);
  font-size: 12px;
}

.range-stat {
  min-width: 104px;
  display: grid;
  justify-items: end;
  padding-left: 20px;
  border-left: 1px solid var(--line-dark);
}

.range-stat strong {
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
}

.range-stat span {
  margin-top: 4px;
  color: var(--muted-dark);
  font-size: 10px;
}

.action-summary {
  display: grid;
  grid-template-columns: repeat(var(--action-count, 2), 1fr);
  gap: 1px;
  border-block: 1px solid var(--line-dark);
  background: var(--line-dark);
}

.summary-item {
  position: relative;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
  padding: 13px 16px 13px 20px;
  background: var(--ledger);
}

.summary-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--action-color);
}

.summary-item span {
  display: grid;
  color: var(--muted-dark);
  font-size: 10px;
}

.summary-item strong {
  color: var(--text-dark);
  font-size: 13px;
}

.summary-item b {
  font-family: var(--display);
  font-size: 24px;
}

.legend {
  min-height: 43px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 9px 24px;
  color: var(--muted-dark);
  border-bottom: 1px solid var(--line-dark);
  font-size: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-item i {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(16, 33, 29, 0.18);
  border-radius: 2px;
  background: var(--action-color);
}

.matrix-scroller {
  overflow: auto;
  padding: clamp(12px, 1.55vw, 22px);
  scrollbar-color: rgba(16, 33, 29, 0.35) transparent;
}

.hand-grid {
  min-width: 585px;
  display: grid;
  grid-template-columns: repeat(13, minmax(38px, 1fr));
  gap: 3px;
}

.hand-cell {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1 / 0.92;
  min-height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 2px;
  color: #14201d;
  border: 1px solid rgba(16, 33, 29, 0.17);
  border-radius: 5px;
  background: var(--cell-bg);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.15);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.hand-cell::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.14;
  background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255, 255, 255, 0.65) 6px 7px);
}

.hand-cell:hover {
  z-index: 2;
  border-color: var(--text-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(16, 33, 29, 0.18);
}

.hand-cell.is-selected {
  z-index: 3;
  border-color: var(--text-dark);
  box-shadow: 0 0 0 3px var(--gold), 0 7px 16px rgba(16, 33, 29, 0.24);
}

.hand-cell.is-selected::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  background: var(--gold);
}

.hand-cell__name {
  font-family: var(--data);
  font-size: clamp(9px, 0.78vw, 12px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.hand-cell__action {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-family: var(--data);
  font-size: 7px;
  font-weight: 800;
  opacity: 0.67;
}

.matrix-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 16px;
  min-height: 48px;
  padding: 10px 24px;
  color: var(--muted-dark);
  border-top: 1px solid var(--line-dark);
  font-size: 10px;
}

.matrix-footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.shape {
  width: 10px;
  height: 10px;
  display: inline-block;
  border: 1px solid var(--muted-dark);
}

.shape--pair {
  border-radius: 50%;
}

.shape--suited {
  transform: rotate(45deg) scale(0.78);
}

.shape--off {
  border-radius: 2px;
}

.matrix-footer .matrix-footer__hint {
  margin-left: auto;
  font-style: italic;
}

.hand-panel {
  align-self: start;
}

.hand-panel__topline {
  align-items: center;
}

.hand-panel__topline .eyebrow {
  margin: 0;
}

.hand-panel__topline > span {
  color: var(--muted);
  font-family: var(--data);
  font-size: 10px;
}

.hand-identity {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 124px;
  margin-top: 10px;
}

.hand-identity h2 {
  font-size: clamp(27px, 2.2vw, 36px);
  line-height: 0.97;
}

.hand-identity p {
  margin: 7px 0 0;
  color: var(--muted);
  font-family: var(--data);
  font-size: 10px;
}

.card-fan {
  position: relative;
  height: 112px;
}

.playing-card {
  position: absolute;
  top: 13px;
  left: 10px;
  width: 65px;
  height: 90px;
  display: grid;
  align-content: space-between;
  padding: 8px;
  color: #13201c;
  border: 2px solid #d8d6ca;
  border-radius: 9px;
  background: #faf9f3;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.25);
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-8deg);
}

.playing-card:last-child {
  top: 8px;
  left: 42px;
  transform: rotate(9deg);
}

.playing-card i {
  justify-self: end;
  font-size: 25px;
  font-style: normal;
}

.playing-card.is-red {
  color: #bd3f3a;
}

.verdict {
  min-height: 66px;
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 11px;
  margin: 2px 0 20px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.verdict__pip {
  width: 10px;
  height: 34px;
  border-radius: 3px;
  background: var(--verdict-color, var(--raise));
}

.verdict span:nth-child(2) {
  display: grid;
}

.verdict small {
  color: var(--muted);
  font-family: var(--data);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.verdict strong {
  font-family: var(--display);
  font-size: 23px;
  line-height: 1;
}

.verdict > b {
  padding: 4px 7px;
  color: var(--gold);
  border: 1px solid rgba(242, 193, 79, 0.25);
  border-radius: 999px;
  font-family: var(--data);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.frequency-list {
  display: grid;
  gap: 9px;
  margin-bottom: 24px;
}

.frequency-row {
  display: grid;
  grid-template-columns: 58px 1fr 34px;
  align-items: center;
  gap: 9px;
  font-size: 11px;
}

.frequency-row > span:first-child {
  font-weight: 700;
}

.frequency-row > span:last-child {
  color: #c4ceca;
  font-family: var(--data);
  font-size: 9px;
  text-align: right;
}

.frequency-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.frequency-track i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--action-color);
  transform-origin: left;
  animation: grow-bar 320ms ease both;
}

@keyframes grow-bar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.hand-section {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.hand-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.hand-section h3 svg {
  width: 17px;
  fill: none;
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.hand-section p,
.rule-card p {
  margin-bottom: 0;
  color: #b2c0ba;
  font-size: 12px;
  line-height: 1.62;
}

.rule-card {
  padding: 15px;
  color: var(--text-dark);
  border-radius: 12px;
  background: var(--ledger);
}

.rule-card__label {
  margin-bottom: 3px;
  color: #a45340;
  font-family: var(--data);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.rule-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.rule-card p {
  color: #50605a;
}

.adjustment-section {
  padding-bottom: 12px;
}

.random-button {
  min-height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 5px;
  padding: 11px 15px;
  color: var(--text-dark);
  border: 0;
  border-radius: 10px;
  background: var(--gold);
  font-size: 12px;
  font-weight: 800;
  transition: filter 160ms ease, transform 160ms ease;
}

.random-button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.random-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.site-footer {
  min-height: 73px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 16px 24px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 10px;
  text-align: center;
}

.site-footer p {
  max-width: 790px;
  margin: 0;
}

.site-footer button {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0;
  color: var(--gold);
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  font-size: 10px;
}

.method-dialog {
  width: min(680px, calc(100% - 28px));
  padding: 0;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
}

.method-dialog::backdrop {
  background: rgba(2, 10, 8, 0.76);
  backdrop-filter: blur(5px);
}

.method-dialog form {
  position: relative;
  padding: clamp(24px, 5vw, 42px);
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.method-dialog h2 {
  max-width: 460px;
  margin-bottom: 16px;
  font-size: clamp(30px, 5vw, 45px);
}

.method-dialog > form > p:not(.eyebrow, .method-warning) {
  max-width: 570px;
  color: #b8c4bf;
  font-size: 13px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 26px;
}

.method-grid div {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.method-grid span {
  color: var(--gold);
  font-family: var(--data);
  font-size: 9px;
}

.method-grid strong {
  display: block;
  margin: 8px 0 5px;
  font-size: 12px;
}

.method-grid p,
.method-warning {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.method-warning {
  margin-top: 18px;
  padding: 10px 12px;
  border-left: 2px solid var(--raise);
  background: rgba(233, 118, 91, 0.07);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: minmax(218px, 0.72fr) minmax(570px, 1.8fr);
  }

  .hand-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) minmax(280px, 1fr) minmax(260px, 1fr);
    gap: 0 24px;
  }

  .hand-panel__topline,
  .hand-identity,
  .verdict,
  .frequency-list,
  .random-button {
    grid-column: 1;
  }

  .hand-section,
  .rule-card {
    grid-column: 2;
  }

  .adjustment-section {
    grid-column: 3;
    grid-row: 2 / span 3;
    border-top: 0;
  }

  .random-button {
    align-self: end;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .scenario-panel,
  .range-panel,
  .hand-panel {
    grid-column: 1;
  }

  .scenario-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
  }

  .panel-heading,
  .game-label,
  .scenario-note {
    grid-column: 1 / -1;
  }

  .game-label {
    margin-bottom: 4px;
  }

  .hand-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .adjustment-section {
    grid-column: 2;
    grid-row: auto;
  }
}

@media (max-width: 600px) {
  .topbar {
    min-height: 68px;
    padding: 10px 14px;
  }

  .brand__mark {
    width: 34px;
    height: 34px;
  }

  .brand strong {
    font-size: 19px;
  }

  .brand small,
  .status-dot {
    display: none;
  }

  .app-shell {
    padding: 8px;
    gap: 8px;
  }

  .scenario-panel,
  .hand-panel {
    display: block;
    padding: 19px;
  }

  .game-label {
    margin-bottom: 4px;
  }

  .control-group {
    padding: 15px 0;
  }

  .segmented button,
  .read-control button,
  .position-grid button {
    min-height: 44px;
  }

  .range-header {
    align-items: flex-end;
    padding: 20px 18px 14px;
  }

  .range-header h2 {
    font-size: 29px;
  }

  .range-stat {
    min-width: 82px;
    padding-left: 13px;
  }

  .range-stat strong {
    font-size: 28px;
  }

  .action-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-item {
    min-height: 55px;
    padding: 10px 12px 10px 16px;
  }

  .summary-item b {
    font-size: 20px;
  }

  .legend {
    padding-inline: 18px;
  }

  .hand-grid {
    min-width: 620px;
    grid-template-columns: repeat(13, minmax(44px, 1fr));
  }

  .hand-cell {
    min-height: 44px;
    aspect-ratio: 1;
  }

  .matrix-footer {
    padding-inline: 18px;
  }

  .matrix-footer .matrix-footer__hint {
    width: 100%;
    margin-left: 0;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: center;
    flex-direction: column;
    gap: 8px;
  }
}

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