:root {
  --bg-top: #f6f6f6;
  --bg: #ececec;
  --panel: #ffffff;
  --line: #d8d8d8;
  --ink: #22252a;
  --muted: #777d86;
  --green: #33a452;
  --red: #dc5b4f;
  --tab: #f2f2f2;
  --tab-active: #dfe2e5;
  --panel-soft: #f7f8fa;
  --input-bg: #ffffff;
  --picker-backdrop: rgba(12, 14, 18, 0.6);
}

body.theme-dark {
  --bg-top: #0b1017;
  --bg: #080c12;
  --panel: #121822;
  --line: #283345;
  --ink: #e5ebf5;
  --muted: #93a0b3;
  --green: #4cc26f;
  --red: #ff7d70;
  --tab: #1a2230;
  --tab-active: #253247;
  --panel-soft: #0f141d;
  --input-bg: #0f141d;
  --picker-backdrop: rgba(3, 5, 8, 0.78);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-top), var(--bg));
  color: var(--ink);
  font-family: "IBM Plex Sans", "Space Grotesk", sans-serif;
  min-height: 100vh;
}

.app {
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 14px 42px;
}

.titlebar {
  margin-bottom: 10px;
}

.titlebar-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.titlebar h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 3.8vw, 2rem);
}

.titlebar p {
  margin: 7px 0 0;
  color: var(--muted);
}

.intro-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  padding: 14px 18px;
  margin-bottom: 12px;
}

.intro-block p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.intro-block p:last-child {
  margin-bottom: 0;
}

.intro-block strong {
  color: var(--ink);
}

.mode-tabs {
  margin-bottom: 10px;
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--tab);
}

.mode-tab {
  border: 0;
  border-right: 1px solid var(--line);
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.mode-tab:last-child {
  border-right: 0;
}

.mode-tab.active {
  background: var(--tab-active);
  color: var(--ink);
}

.mode-pane {
  margin-top: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.controls {
  padding: 13px;
}

.row {
  display: grid;
  gap: 8px;
}

.core-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.flow-row {
  margin-top: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.eval-row {
  margin-top: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.flow-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.tree-panel {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  padding: 9px;
}

.tree-state {
  margin: 0;
  font-weight: 700;
  font-size: 0.87rem;
  color: #2b3441;
}

.dead-tree {
  margin-bottom: 8px;
}

.tree-stepper {
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.step-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid #cdd5df;
  background: #eef2f6;
  color: #4b5766;
  font-size: 0.74rem;
  font-weight: 700;
}

.step-pill.done {
  background: #dbeadf;
  border-color: #bed5c6;
  color: #2f5b3d;
}

.step-pill.current {
  background: #e3ecff;
  border-color: #bdd0ff;
  color: #1f3f85;
}

.tree-path {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: #616a75;
}

.path-editor {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.path-edit-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--input-bg);
}

.path-edit-item span {
  font-size: 0.74rem;
  color: #526173;
  font-weight: 700;
}

.path-edit-item select {
  min-width: 88px;
  padding: 5px 7px;
  font-size: 0.82rem;
}

.path-empty {
  margin: 0;
  color: #6f7782;
  font-size: 0.8rem;
}

.tree-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tree-actions button {
  border: 0;
  border-radius: 6px;
  padding: 8px 11px;
  background: var(--tab-active);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.tree-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tree-manual {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tree-manual span {
  font-size: 0.72rem;
  color: #616a75;
}

.tree-manual select {
  min-width: 120px;
}

.ghost-btn {
  background: var(--panel-soft) !important;
  color: var(--muted) !important;
  border: 1px solid var(--line) !important;
}

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

label span {
  font-size: 0.76rem;
  color: var(--muted);
}

input,
select,
button {
  font: inherit;
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 9px;
  font-size: 0.94rem;
  background: var(--input-bg);
  color: var(--ink);
}

input::placeholder {
  color: var(--muted);
}

.dead-wrap {
  grid-column: span 1;
}

.side-configs {
  margin-top: 11px;
  grid-template-columns: 1fr 1fr;
}

.side-config {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}

.side-config h3 {
  margin: 0 0 8px;
  font-size: 0.94rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e5ecf2;
  border: 1px solid #ccd5de;
  border-radius: 999px;
  font-size: 0.68rem;
  line-height: 1;
  padding: 4px 8px;
  color: #435161;
}

.runbar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eval-explainer {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.eval-explainer h3 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
}

.eval-explainer p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.eval-explainer ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.eval-explainer li {
  margin: 0 0 7px;
  font-size: 0.86rem;
  line-height: 1.55;
}

.eval-explainer li:last-child {
  margin-bottom: 0;
}

.eval-explainer strong {
  color: var(--ink);
}

.hand-entry {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hand-entry input {
  flex: 1 1 auto;
}

.picker-open-btn {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--panel-soft);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

#runBtn {
  border: 0;
  border-radius: 6px;
  padding: 9px 14px;
  font-weight: 700;
  background: #2f9d51;
  color: #fff;
  cursor: pointer;
}

#runBtn:disabled {
  opacity: 0.62;
  cursor: progress;
}

#status {
  color: var(--muted);
  font-size: 0.9rem;
}

#runEvalBtn {
  border: 0;
  border-radius: 6px;
  padding: 9px 14px;
  font-weight: 700;
  background: #2f9d51;
  color: #fff;
  cursor: pointer;
}

#runEvalBtn:disabled {
  opacity: 0.62;
  cursor: progress;
}

#evalStatus {
  color: var(--muted);
  font-size: 0.9rem;
}

.result {
  margin-top: 12px;
  padding: 12px;
}

.trialline {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.dead-display {
  width: fit-content;
  margin: 9px auto 0;
  text-align: center;
}

.dead-display span {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
}

.dead-cards {
  margin-top: 3px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 30px;
  min-width: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-weight: 700;
  color: #4d4d4d;
}

.duel {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 11px;
}

.hand-box {
  width: 200px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  text-align: center;
  padding: 7px;
}

.hand-box h4 {
  margin: 0;
  background: #151a21;
  color: #fff;
  border-radius: 4px;
  font-size: 0.77rem;
  padding: 4px 5px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.ip-box h4 {
  background: #a5b2c2;
  color: #111723;
}

.p3-box h4 {
  background: #6b5b95;
  color: #fff;
}

.p3-eq {
  color: #6b5b95;
}

.p4-box h4 {
  background: #b5651d;
  color: #fff;
}

.p4-eq {
  color: #b5651d;
}

.side-configs.three-col {
  grid-template-columns: 1fr 1fr 1fr;
}

.side-configs.four-col {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.multiway-panel {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  padding: 9px;
}

.multiway-options-row {
  grid-template-columns: 1fr 1fr;
}

.slots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
  min-height: 30px;
}

.slot {
  width: 24px;
  height: 30px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1b2736;
}

.slot.placeholder {
  background: var(--input-bg);
  color: var(--muted);
}

.range-line {
  margin: 6px 0 0;
  min-height: 16px;
  color: #8a919a;
  font-size: 0.82rem;
}

.equity {
  margin: 4px 0 0;
  font-size: 1.62rem;
  font-weight: 700;
}

.split-substats {
  margin: 2px 0 0;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.45;
}

.substats-scoop {
  color: var(--green);
  font-weight: 700;
}

.oop-eq {
  color: var(--green);
}

.ip-eq {
  color: var(--red);
}

.decision-box {
  margin: 10px auto 0;
  border: 1px solid #3a6a4a;
  background: #132a1d;
  border-radius: 6px;
  max-width: 560px;
  padding: 8px 10px;
}

.decision-box strong {
  font-size: 0.83rem;
  color: #67c287;
  text-transform: uppercase;
}

.decision-box p {
  margin: 4px 0 0;
  font-size: 0.88rem;
}

.street-divider {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.tabs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--tab);
}

.tab-btn {
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  padding: 7px 12px;
  font-size: 0.84rem;
  color: #4e5763;
  cursor: pointer;
}

.tab-btn:last-child {
  border-right: 0;
}

.tab-btn.active {
  background: var(--tab-active);
  font-weight: 700;
  color: #1f2835;
}

.draw-table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
}

.draw-table th,
.draw-table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  font-size: 0.9rem;
}

.draw-table th {
  color: #5b6068;
  font-size: 0.8rem;
}

.equity-cell {
  color: var(--green);
  font-weight: 700;
}

.equity-cell.best {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.meta {
  margin: 9px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.83rem;
}

.picker-backdrop {
  position: fixed;
  inset: 0;
  background: var(--picker-backdrop);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 14px;
}

.picker-dialog {
  width: min(900px, 100%);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid #27517a;
  border-radius: 14px;
  background: linear-gradient(180deg, #0a1320 0%, #0d1a2d 58%, #0b1525 100%);
  color: #d7e7fd;
  padding: 14px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
}

.picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.picker-header strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: #f2f8ff;
}

.picker-header .ghost-btn {
  border-color: #2d547f;
  background: #101f33;
  color: #a9bfde;
}

.picker-hint {
  margin: 8px 0 0;
  color: #7fa4cc;
  font-size: 0.85rem;
}

.picker-error {
  margin: 8px 0 0;
  color: #ff8d88;
  border: 1px solid #8c2c3a;
  background: rgba(84, 21, 32, 0.72);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 0.85rem;
  font-weight: 700;
}

.picker-selected {
  margin-top: 10px;
  min-height: 38px;
  border: 1px dashed #2f709d;
  border-radius: 8px;
  background: rgba(9, 32, 57, 0.55);
  padding: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.picker-selected-prefix {
  font-size: 0.82rem;
  color: #7ec9ff;
  font-weight: 600;
}

.picker-empty {
  color: #89a8ca;
  font-size: 0.82rem;
}

.picker-chip {
  border: 1px solid #355f87;
  border-radius: 6px;
  padding: 4px 8px;
  font-weight: 700;
  font-size: 0.82rem;
  background: #0f2238;
  color: #eef6ff;
}

.picker-chip.suit-spades {
  border-color: #546b8a;
  background: #172133;
  color: #f4f9ff;
}

.picker-chip.suit-hearts {
  border-color: #c45a72;
  background: #662432;
  color: #ffeef2;
}

.picker-chip.suit-diamonds {
  border-color: #5f8afe;
  background: #234793;
  color: #edf4ff;
}

.picker-chip.suit-clubs {
  border-color: #38b777;
  background: #1c6a43;
  color: #e9fff1;
}

.picker-grid {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.picker-suit-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.picker-suit-label {
  border: 1px solid #305b87;
  border-radius: 9px;
  background: #102239;
  color: #d9e8fb;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.79rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.picker-suit-symbol {
  font-size: 1rem;
  line-height: 1;
}

.picker-suit-row.suit-spades .picker-suit-label {
  border-color: #556b89;
  background: #182131;
  color: #eef5ff;
}

.picker-suit-row.suit-hearts .picker-suit-label {
  border-color: #c14f68;
  background: #6c2535;
  color: #ffe7ec;
}

.picker-suit-row.suit-diamonds .picker-suit-label {
  border-color: #4f7ef4;
  background: #234790;
  color: #ecf3ff;
}

.picker-suit-row.suit-clubs .picker-suit-label {
  border-color: #2ea269;
  background: #1a6741;
  color: #e8ffef;
}

.picker-rank-row {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(13, minmax(0, 1fr));
}

.picker-card {
  border: 1px solid #3a5f85;
  border-radius: 8px;
  padding: 7px 4px;
  min-height: 34px;
  text-align: center;
  font-weight: 700;
  background: #10243a;
  color: #ebf4ff;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.picker-card:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(102, 185, 255, 0.55);
  filter: brightness(1.08);
}

.picker-card.suit-spades {
  border-color: #536887;
  background: #182233;
  color: #f4f9ff;
}

.picker-card.suit-hearts {
  border-color: #c14963;
  background: #e02e3a;
  color: #fff3f5;
}

.picker-card.suit-diamonds {
  border-color: #4f7fef;
  background: #2f66cf;
  color: #edf4ff;
}

.picker-card.suit-clubs {
  border-color: #2ca266;
  background: #169a4f;
  color: #eafff2;
}

.picker-card.selected {
  border-color: #42d3ff !important;
  box-shadow: 0 0 0 2px rgba(66, 211, 255, 0.3);
  filter: brightness(1.06);
}

.picker-card:disabled {
  opacity: 0.36;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.picker-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.picker-actions .ghost-btn {
  border-color: #315d8b;
  background: #101f33;
  color: #9fb8d7;
}

#pickerApplyBtn {
  border: 1px solid #3abcf1;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(180deg, #2fd5ff 0%, #19b8ea 100%);
  color: #032239;
}

.eval-sub-tabs {
  display: flex;
  align-items: flex-end;
}

.quiz-hand-display {
  margin: 16px 0 6px;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.quiz-card-row {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.quiz-card {
  width: 54px;
  height: 74px;
  border-radius: 10px;
  border: 1px solid rgba(16, 24, 34, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #eef3f8 100%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.quiz-card-rank {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

.quiz-card-suit {
  font-size: 1.45rem;
  line-height: 1;
}

.quiz-card.suit-spades {
  color: #182233;
  border-color: rgba(83, 104, 135, 0.45);
}

.quiz-card.suit-hearts {
  color: #cf3148;
  border-color: rgba(193, 73, 99, 0.42);
}

.quiz-card.suit-diamonds {
  color: #2f66cf;
  border-color: rgba(79, 127, 239, 0.42);
}

.quiz-card.suit-clubs {
  color: #169a4f;
  border-color: rgba(44, 162, 102, 0.42);
}

.quiz-street-label {
  margin: 0 0 10px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--green);
}

.quiz-input-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.quiz-input-row input {
  width: 110px;
  text-align: center;
}

.quiz-input-row button {
  border: 0;
  border-radius: 6px;
  padding: 9px 14px;
  font-weight: 700;
  background: #2f9d51;
  color: #fff;
  cursor: pointer;
}

.quiz-input-row button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.quiz-feedback {
  margin: 8px 0;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 6px;
}

.quiz-excellent {
  background: rgba(51, 164, 82, 0.15);
  color: var(--green);
  border: 1px solid var(--green);
}

.quiz-decent {
  background: rgba(220, 180, 50, 0.15);
  color: #d4a017;
  border: 1px solid #d4a017;
}

.quiz-off {
  background: rgba(220, 91, 79, 0.15);
  color: var(--red);
  border: 1px solid var(--red);
}

.quiz-next-btn {
  display: block;
  margin: 8px auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 18px;
  font-weight: 700;
  background: var(--tab-active);
  color: var(--ink);
  cursor: pointer;
}

.quiz-score {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

body.theme-dark .ip-box h4 {
  background: #34455e;
  color: #e8eef8;
}

body.theme-dark .p3-box h4 {
  background: #5a4a82;
  color: #e8e0f8;
}

body.theme-dark .p3-eq {
  color: #a690d0;
}

body.theme-dark .p4-box h4 {
  background: #9a5518;
  color: #fde8d0;
}

body.theme-dark .p4-eq {
  color: #d4943a;
}

body.theme-dark .decision-box {
  border-color: #355844;
  background: #102218;
}

@media (max-width: 980px) {
  .core-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-configs.three-col,
  .side-configs.four-col {
    grid-template-columns: 1fr 1fr;
  }

  .flow-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .eval-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tree-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .tree-actions button,
  .tree-manual select {
    width: 100%;
  }

  .path-editor {
    flex-direction: column;
  }

  .path-edit-item {
    width: 100%;
    justify-content: space-between;
  }

  .picker-suit-row {
    grid-template-columns: 1fr;
  }

  .picker-suit-label {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .core-row {
    grid-template-columns: 1fr;
  }

  .side-configs,
  .side-configs.three-col,
  .side-configs.four-col {
    grid-template-columns: 1fr;
  }

  .multiway-options-row {
    grid-template-columns: 1fr;
  }

  .eval-row {
    grid-template-columns: 1fr;
  }

  .duel {
    flex-direction: column;
    align-items: center;
  }

  .tabs {
    width: 100%;
    justify-content: stretch;
  }

  .tab-btn {
    flex: 1 1 0;
    padding: 7px 6px;
  }

  .titlebar-row {
    flex-direction: column;
  }

  .hand-entry {
    flex-direction: column;
    align-items: stretch;
  }

  .picker-rank-row {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .picker-rank-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.site-footer {
  max-width: 820px;
  margin: 2rem auto 1rem;
  padding: 1rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.site-footer a {
  color: var(--green);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}
