:root {
  --bg: #f5f6f2;
  --ink: #162a24;
  --sub: #62726a;
  --green: #155c48;
  --line: #dbe1d9;
  --muted: #829087;
  --card: #fff;
  --shadow: 0 2px 4px #1e352508;
  --seat0: #167459;
  --seat1: #dc974e;
  --seat2: #6094c6;
  --seat3: #a38bc3;
  font-family:
    Inter,
    "PingFang SC",
    "Microsoft YaHei",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
button {
  color: inherit;
}
a {
  color: var(--green);
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #dba05a;
  outline-offset: 3px;
}
button {
  border: 0;
  background: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
svg {
  display: block;
}
i[data-icon] {
  width: 1.12em;
  height: 1.12em;
  display: inline-flex;
  font-style: normal;
  flex: none;
}
i[data-icon] svg {
  width: 100%;
  height: 100%;
}
.top {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.top-inner,
.wrap {
  max-width: 1512px;
  margin: auto;
  padding-left: clamp(20px, 3.7vw, 62px);
  padding-right: clamp(20px, 3.7vw, 62px);
}
.top-inner {
  height: 69px;
  display: flex;
  align-items: center;
  gap: clamp(30px, 5.4vw, 88px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #193f34;
}
.brand-mark {
  background: #165844;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: #fbfbef;
  display: grid;
  place-items: center;
}
.brand-mark svg {
  width: 31px;
}
.brand strong {
  font-size: 23px;
  letter-spacing: 1px;
}
.wordmark {
  color: #455c50;
  letter-spacing: 1.35px;
  font:
    600 10px/1.05 "Courier New",
    monospace;
  border-left: 1px solid #cdd6ce;
  padding-left: 11px;
}
.top nav {
  display: flex;
  align-self: stretch;
  gap: 26px;
}
.nav-item,
.help-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #65746c;
  font-size: 14px;
  font-weight: 550;
}
.nav-item {
  border-bottom: 3px solid transparent;
  padding: 3px 1px 0;
}
.nav-item.active {
  color: var(--green);
  border-bottom-color: var(--green);
}
.help-link {
  margin-left: auto;
  padding: 10px 0;
}
.help-link:hover,
.nav-item:hover {
  color: var(--green);
}
.wrap {
  padding-bottom: 50px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 29px 0 24px;
}
.page-heading h1 {
  font-size: clamp(29px, 2.7vw, 40px);
  letter-spacing: -1.6px;
  line-height: 1.25;
  font-weight: 720;
}
.page-heading p {
  color: var(--sub);
  font-size: 14px;
  margin-top: 8px;
  line-height: 1.55;
}
.primary,
.secondary,
.quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  border-radius: 8px;
  padding: 10px 15px;
  font-weight: 600;
  font-size: 14px;
  min-height: 40px;
}
.primary {
  color: #fff;
  background: var(--green);
  border: 1px solid var(--green);
}
.primary:hover {
  background: #104a3a;
}
.primary:disabled {
  background: #688679;
  border-color: #688679;
  color: white;
}
.secondary {
  background: white;
  border: 1px solid #d4ded6;
}
.secondary:hover,
.quiet:hover {
  background: #edf3ed;
}
.quiet {
  color: var(--sub);
  font-weight: 500;
}
.secondary:disabled,
.quiet:disabled {
  opacity: 0.45;
}
.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.76fr) minmax(322px, 1fr);
  gap: 20px;
  align-items: stretch;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.table-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.felt {
  position: relative;
  isolation: isolate;
  background-color: #165a49;
  background-image:
    radial-gradient(ellipse at 49% 52%, #39836855, transparent 71%),
    repeating-linear-gradient(138deg, #ffffff03 0 1px, transparent 1px 4px),
    linear-gradient(115deg, #124e42, #216650 57%, #164f43);
  color: white;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px 17px;
  min-height: 344px;
}
.felt::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 6px;
  border: 1px solid #e2ebc914;
  border-radius: 12px 12px 3px 3px;
  pointer-events: none;
}
.felt::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 10px;
  pointer-events: none;
  background: radial-gradient(#efffbe22 0.65px, transparent 0.8px) 0 0 / 4px 4px;
  opacity: 0.3;
}
.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.hud-label,
.hud-wall {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #073d324d;
  border: 1px solid #b3d9b326;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  color: #e2ecd9;
  line-height: 1.3;
}
.hud-label {
  font-weight: 600;
}
.hud-label i {
  color: #dabf85;
}
.hud-wall b {
  color: #f3dba7;
  font-family: ui-monospace, monospace;
  font-size: 14px;
}
.arena {
  height: 214px;
  flex: 1;
  min-height: 189px;
  position: relative;
}
.seat {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #ebf0dd;
}
.seat.pos2 {
  left: 50%;
  top: -8px;
  transform: translateX(-50%);
}
.seat.pos3,
.seat.pos1 {
  top: 48%;
  transform: translateY(-50%);
}
.seat.pos3 {
  left: 0;
}
.seat.pos1 {
  right: 0;
}
.seat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.wind {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid #f4db9f73;
  border-radius: 4px;
  color: #f2d698;
  font:
    600 12px/1 Georgia,
    "Songti SC",
    serif;
  background: #ffffff07;
}
.backs {
  display: flex;
  gap: 1px;
  filter: drop-shadow(0 2px 1px #073d3366);
}
.backs b {
  width: clamp(5px, 0.6vw, 10px);
  height: 15px;
  border: 1px solid #c0d9b365;
  background: linear-gradient(
    180deg,
    #a3c2a6,
    #7fa98c 78%,
    #abd0a8 80%,
    #52846b 100%
  );
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px #426f543b;
}
.seat.pos3 .backs,
.seat.pos1 .backs {
  width: 49px;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 2px;
}
.seat.pos3 .backs b,
.seat.pos1 .backs b {
  width: 5.5px;
  height: 10px;
}
.river {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-content: center;
  gap: 2px;
  width: clamp(96px, 11vw, 159px);
  min-height: 24px;
}
.river .small-tile {
  display: block;
  aspect-ratio: 0.77;
  background: linear-gradient(130deg, #faf8e9, #e4e2ce);
  border-radius: 2px;
  border-bottom: 2px solid #b5b5a0;
  box-shadow: 0 1px 2px #073e33b0;
  overflow: hidden;
}
.small-tile svg {
  height: 100%;
  width: 100%;
}
.river.r2,
.river.r0 {
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.river.r2 .small-tile,
.river.r0 .small-tile {
  width: calc((100% - 10px) / 6);
}
.river.r2 {
  top: 19%;
}
.river.r0 {
  bottom: 3%;
}
.river.r3,
.river.r1 {
  width: clamp(50px, 5.8vw, 85px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  top: 53%;
  transform: translate(-50%, -50%);
}
.river.r3 {
  left: 27%;
}
.river.r1 {
  left: 73%;
}
.small-tile.latest {
  box-shadow:
    0 0 0 1px #facc71,
    0 1px 2px #073e33;
}
.compass-wrap {
  width: 70px;
  height: 70px;
  position: absolute;
  top: 54%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #dcce9e;
}
.compass-wrap svg {
  width: 100%;
  height: 100%;
}
.river-count {
  font-size: 10px;
  color: #eee7bd;
}
.own {
  margin-top: 6px;
}
.own-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #dfebd9;
  margin-bottom: 10px;
}
.own-head > span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}
.own-head .wind {
  background: #d8be84;
  color: #214f3e;
  border-color: #d8be84;
}
.turn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ebdfb5;
  font-size: 12px;
}
.turn:before {
  content: "";
  width: 6px;
  height: 6px;
  background: #e9c779;
  border-radius: 50%;
}
.rack {
  display: flex;
  gap: 3px;
  align-items: end;
  min-height: 45px;
  max-width: 780px;
}
.hand-tile.mj-tile {
  width: calc((100% - 59px) / 14);
  height: auto;
  aspect-ratio: 0.72;
  transition:
    transform 0.14s,
    box-shadow 0.15s;
  padding: 0;
  position: relative;
  min-width: 0;
  flex-shrink: 0;
  max-width: 47px;
}
.hand-tile:last-child.drawn {
  margin-left: 8px;
}
.hand-tile:not(:disabled):hover {
  transform: translateY(-4px);
}
.hand-tile.selected,
.hand-tile.selected:hover {
  transform: translateY(-7px);
  outline: 2px solid #e6bf6d;
  outline-offset: 1px;
}
.hand-tile:disabled {
  cursor: default;
}
.actions {
  padding: 12px 17px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
}
.actions .action-note {
  margin-right: auto;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.5;
}
.action-note b {
  color: var(--ink);
}
.actions .quiet {
  padding: 5px 8px;
}
.actions .primary {
  padding: 8px 14px;
  min-height: 36px;
}
.analytics {
  padding: 21px 22px 15px;
  display: flex;
  flex-direction: column;
}
.card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.ctitle {
  display: flex;
  align-items: center;
  gap: 9px;
}
.ctitle > i {
  color: #22725b;
  width: 19px;
  height: 19px;
}
.card-heading h2,
.ctitle h2 {
  font-size: 19px;
  letter-spacing: -0.65px;
  line-height: 1.4;
}
.minor-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #4c7561;
  background: #edf4eb;
  border-radius: 20px;
  font-size: 11px;
  padding: 4px 8px;
  white-space: nowrap;
}
.minor-tag:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5b946b;
}
.subline {
  color: var(--sub);
  font-size: 13px;
  line-height: 1.6;
  margin-top: 5px;
}
.score-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 22px 0 3px;
}
.score-label {
  font-size: 12px;
  color: #637269;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--seat0);
  flex-shrink: 0;
}
.score-value {
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: clamp(23px, 2vw, 32px);
  font-weight: 600;
  letter-spacing: -1.4px;
  margin-top: 4px;
}
.score-value small {
  font:
    500 12px/1 Arial,
    sans-serif;
  letter-spacing: 0;
  margin-left: 1px;
  color: #78857d;
}
.chart-host {
  display: grid;
  align-items: center;
  flex: 1;
  min-height: 170px;
  position: relative;
}
.chart-host > svg {
  width: 100%;
  max-width: 100%;
}
.analytics-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  border-top: 1px solid #e6eae2;
  padding-top: 12px;
  font-size: 12px;
  color: #78857e;
}
.analytics-foot button {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  padding: 3px;
  font-size: 12px;
}
.matrix-card {
  margin-top: 20px;
  padding: 21px 24px 17px;
}
.matrix-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.segments {
  padding: 3px;
  display: flex;
  gap: 1px;
  border: 1px solid #dce3d9;
  border-radius: 8px;
  background: #f3f5f0;
}
.segments button {
  font-size: 13px;
  color: #63736a;
  border-radius: 5px;
  min-height: 30px;
  padding: 5px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}
.segments .current {
  color: #18533f;
  background: white;
  box-shadow: 0 1px 4px #182f2323;
  font-weight: 650;
}
.matrix-body {
  margin-top: 15px;
}
.matrix-grid {
  display: grid;
  grid-template-columns: 52px repeat(9, minmax(0, 1fr));
  gap: 5px 6px;
  align-items: stretch;
}
.rank {
  font:
    500 12px/1.3 ui-monospace,
    monospace;
  text-align: center;
  color: #778378;
}
.suit {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #4d5c53;
  font-weight: 600;
}
.suit em {
  font-style: normal;
  font-family: "Songti SC", serif;
  color: #aa493c;
  font-size: 18px;
}
.suit.s1 em {
  color: #467494;
}
.suit.s2 em {
  color: #387659;
}
.heat {
  font-family: Inter, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  min-height: 35px;
  border-radius: 5px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 550;
  padding: 5px;
  transition: filter 0.15s;
  position: relative;
}
.heat:hover {
  filter: brightness(0.93);
}
.heat[aria-pressed="true"] {
  outline: 2px solid #1c5944;
  outline-offset: 1px;
}
.matrix-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 24px;
}
.matrix-note {
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.5;
  color: var(--sub);
  font-size: 12px;
}
.matrix-note b {
  color: #335e47;
}
.scale {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--sub);
  font-size: 11px;
  white-space: nowrap;
}
.scale i {
  width: 13px;
  height: 8px;
  border-radius: 1px;
}
.matrix-detail {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 23px;
  padding-top: 12px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--sub);
}
.matrix-detail strong {
  color: var(--ink);
}
.matrix-detail button {
  margin-left: auto;
  padding: 5px;
}
.matrix-detail em {
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
}
.loading {
  color: var(--sub);
  font-size: 13px;
  padding: 25px 0;
  text-align: center;
}
.board-hint {
  font-size: 12px;
  line-height: 1.6;
  color: #637369;
}
.round-link {
  border: 1px solid var(--line);
  padding: 6px 9px;
  border-radius: 5px;
  background: #fff;
  color: var(--green);
}
.replay-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #e8f1e9;
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 14px;
  color: #325846;
  margin-bottom: 14px;
}
.replay-strip button:last-child {
  margin-left: auto;
}
.record-list {
  padding: 6px 20px;
}
.record {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.record:last-child {
  border-bottom: 0;
}
.record-text {
  flex: 1;
}
.record h3 {
  font-size: 16px;
}
.record p {
  font-size: 13px;
  color: var(--sub);
  margin-top: 4px;
}
.record-icon {
  background: #edf3ea;
  border-radius: 10px;
  padding: 10px;
  color: var(--green);
}
dialog {
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  width: min(470px, calc(100% - 28px));
  max-height: 85vh;
  box-shadow: 0 20px 80px #193c2b40;
}
dialog::backdrop {
  background: #11291e69;
  backdrop-filter: blur(3px);
}
.dialog-content {
  padding: 24px;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dialog-head h2 {
  font-size: 22px;
}
.icon-btn {
  padding: 6px;
  display: flex;
  border-radius: 6px;
  color: #64776b;
}
.icon-btn:hover {
  background: #edf3ed;
}
.dialog-content p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--sub);
  margin: 10px 0;
}
.dialog-content h3 {
  font-size: 15px;
  margin-top: 17px;
}
.dialog-stats {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}
.dialog-stats span {
  background: #edf4eb;
  border-radius: 7px;
  padding: 8px;
  flex: 1;
  text-align: center;
  color: var(--green);
  font-size: 13px;
}
.mode {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.mode.checked {
  background: #f2f7f0;
  border-color: #63927d;
}
.mode strong,
.mode span {
  display: block;
}
.mode span {
  margin-top: 3px;
  color: var(--sub);
  font-size: 13px;
}
.dialog-buttons {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.notice {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #17382d;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: var(--shadow);
  z-index: 10;
  pointer-events: none;
}
.notice:empty {
  display: none;
}
.site-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding-top: 22px;
  font-size: 12px;
  color: #77897c;
}
.copydots {
  display: inline-flex;
  gap: 2px;
  margin-left: 6px;
  vertical-align: middle;
}
.copydots b {
  display: inline-block;
  border: 1px solid currentColor;
  opacity: 0.4;
  border-radius: 1px;
  width: 3px;
  height: 6px;
}
.copydots b.seen {
  background: currentColor;
  opacity: 0.85;
}
.focus-note {
  color: #184f3d;
}
.replay-control {
  display: flex;
  align-items: center;
  gap: 5px;
}
.actions .compact-btn {
  font-size: 12px;
  padding: 6px 9px;
  min-height: 32px;
}
.hand-tile .mj-face {
  height: 96%;
  width: 96%;
}
.mobile-round {
  display: none;
}
@media (min-width: 1450px) {
  .arena {
    min-height: 219px;
  }
  .felt {
    padding: 19px 25px 20px;
  }
  .main-grid {
    grid-template-columns: minmax(0, 1.82fr) minmax(375px, 1fr);
  }
  .analytics {
    padding: 24px;
  }
  .matrix-grid {
    gap: 6px 9px;
  }
  .heat {
    min-height: 38px;
  }
}
@media (max-width: 1050px) {
  .top-inner,
  .wrap {
    padding-left: 24px;
    padding-right: 24px;
  }
  .main-grid {
    grid-template-columns: minmax(0, 1.62fr) minmax(294px, 1fr);
    gap: 14px;
  }
  .felt {
    padding-left: 15px;
    padding-right: 15px;
  }
  .analytics {
    padding: 18px 15px 14px;
  }
  .matrix-card {
    padding: 18px;
  }
  .rack {
    gap: 2px;
  }
  .hand-tile.mj-tile {
    width: calc((100% - 42px) / 14);
  }
  .segments button {
    padding: 5px 9px;
  }
  .score-row {
    gap: 5px;
  }
  .compass-wrap {
    width: 61px;
    height: 61px;
  }
  .actions {
    padding: 10px 12px;
  }
  .score-value {
    font-size: 25px;
  }
  .river.r2,
  .river.r0 {
    width: 108px;
  }
}
@media (max-width: 805px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
  .analytics {
    display: grid;
    grid-template-columns: 1fr minmax(230px, 1.1fr);
    column-gap: 20px;
    align-items: start;
  }
  .analytics > .subline {
    grid-column: 1;
  }
  .score-row {
    grid-column: 1;
    grid-template-columns: repeat(2, 1fr);
    margin: 12px 0;
    row-gap: 10px;
  }
  .chart-host {
    grid-column: 2;
    grid-row: 1 / span 3;
    width: 100%;
  }
  .analytics-foot {
    grid-column: 1/-1;
  }
  .arena {
    min-height: 195px;
  }
  .seat.pos2 {
    top: -14px;
  }
  .hud-wall,
  .hud-label {
    font-size: 12px;
  }
  .river.r3 {
    left: 29%;
  }
  .river.r1 {
    left: 71%;
  }
  .river.r2,
  .river.r0 {
    width: 130px;
  }
  .matrix-card {
    margin-top: 14px;
  }
  .top-inner {
    gap: 30px;
  }
  .wordmark {
    display: none;
  }
  .top nav {
    gap: 16px;
  }
  .matrix-top {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .matrix-top .segments {
    margin-left: auto;
  }
}
@media (max-width: 550px) {
  .top-inner,
  .wrap {
    padding-left: 14px;
    padding-right: 14px;
  }
  .top-inner {
    height: 55px;
    gap: 18px;
  }
  .brand {
    gap: 5px;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 7px;
  }
  .brand-mark svg {
    width: 26px;
  }
  .brand strong {
    font-size: 19px;
  }
  .top nav {
    gap: 11px;
  }
  .nav-item,
  .help-link {
    font-size: 12px;
    gap: 4px;
  }
  .nav-item i {
    display: none;
  }
  .help-link span {
    display: none;
  }
  .help-link {
    padding: 8px;
  }
  .help-link i {
    width: 18px;
    height: 18px;
  }
  .page-heading {
    padding: 19px 0 15px;
    gap: 6px;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .page-heading p {
    font-size: 12px;
    max-width: 255px;
    margin-top: 5px;
  }
  .page-heading .primary {
    min-height: 35px;
    font-size: 12px;
    padding: 7px 10px;
  }
  .card {
    border-radius: 12px;
  }
  .felt {
    min-height: 290px;
    padding: 12px 9px 15px;
  }
  .felt::before {
    inset: 4px;
  }
  .arena {
    min-height: 170px;
    height: 170px;
  }
  .seat.pos2 {
    top: -8px;
  }
  .seat.pos3,
  .seat.pos1 {
    top: 48%;
  }
  .seat-label {
    font-size: 11px;
    gap: 3px;
  }
  .seat.pos3 .backs,
  .seat.pos1 .backs {
    width: 29px;
  }
  .seat.pos3 .backs b,
  .seat.pos1 .backs b {
    width: 3px;
    height: 7px;
  }
  .backs b {
    width: 5px;
    height: 12px;
  }
  .river.r3,
  .river.r1 {
    width: 48px;
  }
  .river.r3 {
    left: 25%;
  }
  .river.r1 {
    left: 75%;
  }
  .river.r2,
  .river.r0 {
    width: 105px;
  }
  .compass-wrap {
    width: 53px;
    height: 53px;
  }
  .hud-label,
  .hud-wall {
    font-size: 10px;
    padding: 4px 6px;
    gap: 4px;
  }
  .wind {
    width: 16px;
    height: 16px;
    font-size: 11px;
  }
  .hud-wall b {
    font-size: 12px;
  }
  .own-head {
    margin-bottom: 7px;
  }
  .own-head,
  .turn {
    font-size: 11px;
  }
  .hand-tile.mj-tile {
    width: calc((100% - 32px) / 14);
    border-radius: 3px;
  }
  .hand-tile:last-child.drawn {
    margin-left: 5px;
  }
  .rack {
    gap: 2px;
    min-height: 33px;
  }
  .own {
    margin-top: 6px;
  }
  .actions {
    padding: 8px 10px;
    min-height: 50px;
    gap: 3px;
  }
  .actions .action-note {
    font-size: 11px;
  }
  .actions .quiet,
  .actions .primary {
    font-size: 12px;
    min-height: 32px;
    padding: 6px 8px;
  }
  .analytics {
    display: flex;
    padding: 17px 15px 12px;
  }
  .score-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 14px 0 0;
    width: 100%;
  }
  .analytics > .card-heading,
  .analytics-foot {
    width: 100%;
  }
  .score-value {
    font-size: 25px;
  }
  .card-heading h2,
  .ctitle h2 {
    font-size: 17px;
  }
  .subline {
    font-size: 12px;
  }
  .matrix-card {
    padding: 15px 10px;
  }
  .matrix-top {
    display: block;
  }
  .segments {
    width: fit-content;
    margin: 10px 0 0 !important;
  }
  .segments button {
    padding: 5px 11px;
    font-size: 12px;
  }
  .matrix-grid {
    grid-template-columns: 25px repeat(9, minmax(0, 1fr));
    gap: 4px 2px;
  }
  .suit {
    gap: 0;
  }
  .suit span {
    display: none;
  }
  .suit em {
    font-size: 16px;
  }
  .rank {
    font-size: 11px;
  }
  .heat {
    min-height: 32px;
    font-size: 11px;
    padding: 3px 0;
  }
  .copydots {
    display: none;
  }
  .matrix-footer {
    align-items: flex-start;
    gap: 5px;
    flex-wrap: wrap;
  }
  .matrix-note {
    font-size: 11px;
  }
  .matrix-detail {
    gap: 7px 14px;
  }
  .matrix-detail button {
    margin-left: 0;
  }
  .matrix-body {
    margin-top: 11px;
  }
  .record-list {
    padding: 3px 12px;
  }
  .record {
    gap: 8px;
  }
  .record .secondary {
    padding: 5px 8px;
  }
  .score-label {
    font-size: 11px;
  }
  .analytics-foot {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.hud-click:hover {
  background: #073e34a0;
}
.hud-click i:last-child {
  color: #c4d7b9;
  width: 12px;
}
.river-summary {
  margin-top: 15px;
}
.river-summary strong {
  font-size: 13px;
}
.river-summary > div {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 5px;
  font-size: 13px;
  color: var(--sub);
}
.river-summary .mj-tile {
  --mj-tile-width: 26px;
  --mj-tile-height: 34px;
  --mj-edge: 1px;
}
.chart-segments {
  margin: 0 !important;
  align-self: center;
  flex-shrink: 0;
}
.chart-segments button {
  min-height: 24px;
  padding: 3px 7px;
  font-size: 11px;
}
.wall-options {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--sub);
  margin: 0 0 11px;
}
.wall-options > span {
  margin-right: 5px;
}
.wall-options button {
  color: #586a60;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 8px;
}
.wall-options button.on {
  background: #e5f0e5;
  color: #154f38;
  border-color: #aac9b3;
}
@media (max-width: 550px) {
  .rack {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px 4px;
    justify-items: center;
  }
  .hand-tile.mj-tile {
    width: 100%;
    max-width: 40px;
    aspect-ratio: 0.82;
  }
  .hand-tile:last-child.drawn {
    margin-left: 0;
    outline: 1px solid #e4c585;
    outline-offset: 1px;
  }
  .hand-tile.selected {
    outline: 2px solid #edbf61;
  }
  .hand-tile.selected,
  .hand-tile.selected:hover {
    transform: translateY(-3px);
  }
  .copydots {
    display: flex;
    justify-content: center;
    margin: 2px 0 0;
    gap: 1px;
  }
  .copydots b {
    width: 3px;
    height: 3px;
  }
  .page-heading p {
    max-width: 240px;
  }
  .wall-options button:disabled {
    opacity: 0.5;
  }
}
