:root {
  color-scheme: dark;
  --bg: #06120e;
  --bg-2: #0a1d16;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-2: #0e241c;
  --surface-3: #122d23;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.17);
  --text: #f5f1e6;
  --muted: #9db4a8;
  --muted-2: #789085;
  --gold: #eac981;
  --gold-2: #d3a451;
  --gold-dim: rgba(234, 201, 129, 0.14);
  --green: #7ed6a6;
  --green-dim: rgba(126, 214, 166, 0.14);
  --red: #ee7d6b;
  --red-dim: rgba(238, 125, 107, 0.14);
  --blue: #82c4f4;
  --felt-1: #14503d;
  --felt-2: #0a3025;
  --felt-3: #051a14;
  --radius: 18px;
  --topbar-h: 60px;
  --tabbar-h: 66px;
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Avenir Next", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: #040d0a;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 500px at 50% -12%, rgba(234, 201, 129, 0.1), transparent 60%),
    radial-gradient(700px 620px at 100% 108%, rgba(33, 126, 92, 0.16), transparent 65%),
    linear-gradient(180deg, #071510 0%, #040d0a 100%);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  overflow-x: hidden;
  overflow-x: clip;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: default;
}

img,
svg {
  display: block;
}

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

#app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 300px);
}

#main {
  flex: 1;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px);
}

body[data-screen="game"] #main {
  height: calc(100dvh - var(--topbar-h));
  padding-bottom: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ------------------------------------------------------------- top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-h);
  padding: env(safe-area-inset-top) 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(6, 18, 14, 0.78);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.topbar--game {
  padding-inline: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #1b1609;
  background: linear-gradient(145deg, #f4dca6, #c99a45);
  box-shadow: 0 4px 16px rgba(201, 154, 69, 0.28), inset 0 1px rgba(255, 255, 255, 0.6);
}

.brand-mark svg {
  width: 19px;
  height: 19px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-text b {
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.brand-text small {
  font-size: 0.54rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.icon-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn.is-active {
  color: var(--gold);
  border-color: rgba(234, 201, 129, 0.42);
  background: var(--gold-dim);
  box-shadow: 0 0 18px rgba(234, 201, 129, 0.12);
}

.game-title {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.game-title strong {
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.game-title small {
  font-size: 0.66rem;
  color: var(--muted-2);
}

/* --------------------------------------------------------------- tab bar */

.tabbar {
  position: fixed;
  z-index: 40;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 6px 8px env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(6, 17, 13, 0.9);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.tabbar.is-hidden {
  display: none;
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 12px;
  color: var(--muted-2);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.tab svg {
  width: 22px;
  height: 22px;
}

.tab.is-active {
  color: var(--gold);
}

.tab.is-active .tab__icon {
  background: var(--gold-dim);
  box-shadow: 0 0 16px rgba(234, 201, 129, 0.08);
}

.tab__icon {
  width: 38px;
  height: 26px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

/* ---------------------------------------------------------------- common */

.page {
  padding: 20px 18px 10px;
}

.page-head {
  padding: 8px 2px 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(234, 201, 129, 0.8);
}

.page-head h1,
.hero h1 {
  font-size: clamp(2.15rem, 9vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 750;
  margin-top: 9px;
}

.hero h1 span {
  background: linear-gradient(120deg, #f6e3b4, #d6a64f 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-sub {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 10px;
  max-width: 46ch;
}

.section {
  margin-top: 26px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: 1.02rem;
  letter-spacing: -0.015em;
}

.muted {
  color: var(--muted-2);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

.link {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 600;
}

.link--danger {
  color: var(--red);
  text-align: left;
  padding: 8px 0 2px;
  font-size: 0.76rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.pill--gold {
  color: var(--gold);
  background: var(--gold-dim);
  border-color: rgba(234, 201, 129, 0.22);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 11px 17px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 0.14s, filter 0.2s, background 0.2s;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn:active {
  transform: scale(0.975);
}

.btn--gold {
  color: #1a1406;
  background: linear-gradient(180deg, #f4daa3 0%, #d8a94f 100%);
  box-shadow: 0 8px 24px rgba(216, 169, 79, 0.22), inset 0 1px rgba(255, 255, 255, 0.65);
}

.btn--ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line);
}

.btn--lg {
  min-height: 52px;
  font-size: 0.98rem;
  border-radius: 16px;
}

.btn--wide {
  width: 100%;
}

.btn:disabled {
  opacity: 0.38;
  filter: grayscale(0.4);
}

/* ----------------------------------------------------------------- cards */

.card {
  position: relative;
  flex: 0 0 auto;
  border-radius: 7px;
  background: linear-gradient(155deg, #fffdf6 0%, #eee8d9 100%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: #16130c;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.22), 0 7px 16px rgba(0, 0, 0, 0.28);
  font-weight: 800;
}

.card--red {
  color: #bb3f33;
}

.card-corner {
  position: absolute;
  top: 4%;
  left: 7%;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.88;
  font-weight: 800;
}

.card-corner i {
  font-style: normal;
}

.card-suit-big {
  position: absolute;
  right: 8%;
  bottom: 4%;
  line-height: 1;
  opacity: 0.9;
}

.card--xs {
  width: 20px;
  height: 28px;
  border-radius: 4px;
}

.card--xs .card-corner b {
  font-size: 8px;
}

.card--xs .card-corner i {
  font-size: 7px;
}

.card--xs .card-suit-big {
  display: none;
}

.card--sm {
  width: 30px;
  height: 42px;
  border-radius: 5px;
}

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

.card--sm .card-corner i {
  font-size: 9px;
}

.card--sm .card-suit-big {
  font-size: 16px;
}

.card--md {
  width: clamp(34px, 9.4vw, 40px);
  height: clamp(48px, 13.2vw, 56px);
  border-radius: 6px;
}

.card--md .card-corner b {
  font-size: clamp(11px, 3vw, 13px);
}

.card--md .card-corner i {
  font-size: clamp(9px, 2.5vw, 11px);
}

.card--md .card-suit-big {
  font-size: clamp(15px, 4.2vw, 19px);
}

.card--lg {
  width: 52px;
  height: 74px;
  border-radius: 8px;
}

.card--lg .card-corner b {
  font-size: 16px;
}

.card--lg .card-corner i {
  font-size: 13px;
}

.card--lg .card-suit-big {
  font-size: 25px;
}

.card--xl {
  width: 76px;
  height: 108px;
  border-radius: 10px;
}

.card--xl .card-corner b {
  font-size: 20px;
}

.card--xl .card-corner i {
  font-size: 16px;
}

.card--xl .card-suit-big {
  font-size: 34px;
}

.card--back {
  background:
    linear-gradient(135deg, rgba(234, 201, 129, 0.2) 25%, transparent 25%) 0 0 / 7px 7px,
    linear-gradient(315deg, rgba(234, 201, 129, 0.16) 25%, transparent 25%) 0 0 / 7px 7px,
    linear-gradient(160deg, #123d30, #082018);
  border: 1px solid rgba(234, 201, 129, 0.35);
  box-shadow: inset 0 0 0 2px rgba(6, 20, 15, 0.8), 0 6px 14px rgba(0, 0, 0, 0.3);
  display: grid;
  place-items: center;
}

.card-back-mark {
  color: rgba(234, 201, 129, 0.72);
  font-size: 0.8em;
  line-height: 1;
}

.card--xs .card-back-mark {
  font-size: 9px;
}

.card--sm .card-back-mark {
  font-size: 13px;
}

.card--md .card-back-mark {
  font-size: 17px;
}

.card--lg .card-back-mark {
  font-size: 24px;
}

.card--empty {
  background: rgba(255, 255, 255, 0.025);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.card--deal {
  animation: deal-in 0.32s cubic-bezier(0.2, 0.85, 0.3, 1) both;
}

@keyframes deal-in {
  from {
    opacity: 0;
    transform: translateY(-9px) scale(0.92) rotate(-2deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.card.is-dim {
  opacity: 0.4;
  filter: grayscale(0.8);
}

.card-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.card-row--tight {
  gap: 4px;
}

/* ------------------------------------------------------------------ home */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  align-items: center;
  gap: 4px;
  padding: 16px 2px 4px;
}

.hero__copy {
  min-width: 0;
}

.hero h1 {
  margin-bottom: 2px;
}

.hero p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 12px;
  max-width: 30ch;
}

.hero__actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 9px;
  margin-top: 20px;
}

.hero__hand {
  position: relative;
  height: 150px;
  width: 100px;
  justify-self: end;
}

.hero__ring {
  position: absolute;
  inset: 16px 2px 16px 2px;
  border-radius: 50%;
  border: 1px solid rgba(234, 201, 129, 0.22);
  box-shadow: 0 0 45px rgba(234, 201, 129, 0.12), inset 0 0 30px rgba(234, 201, 129, 0.06);
}

.hero__card {
  position: absolute;
  top: 18px;
  left: 12px;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.35));
}

.hero__card--a {
  transform: rotate(-11deg) translate(-4px, 4px);
  z-index: 2;
}

.hero__card--b {
  transform: rotate(9deg) translate(14px, 12px);
  z-index: 1;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 16px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
}

.stat {
  background: rgba(255, 255, 255, 0.035);
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat span {
  font-size: 0.6rem;
  color: var(--muted-2);
  letter-spacing: 0.03em;
}

.stat strong {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat small {
  font-size: 0.6rem;
  color: var(--muted-2);
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mode-card {
  position: relative;
  overflow: hidden;
  text-align: left;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.022));
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: transform 0.16s, border-color 0.2s;
}

.mode-card:active {
  transform: scale(0.985);
}

.mode-card h3 {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.mode-card p {
  font-size: 0.74rem;
  line-height: 1.42;
  color: var(--muted);
}

.mode-card--feature,
.mode-card--tournament {
  grid-column: 1 / -1;
  padding: 16px;
  min-height: 138px;
}

.mode-card--feature {
  background:
    radial-gradient(340px 150px at 100% 0%, rgba(234, 201, 129, 0.16), transparent 62%),
    linear-gradient(150deg, #163e30, #0a211a 75%);
  border-color: rgba(234, 201, 129, 0.24);
}

.mode-card--tournament {
  background:
    radial-gradient(300px 160px at 12% 0%, rgba(130, 196, 244, 0.11), transparent 65%),
    linear-gradient(150deg, #16252b, #0a1a20 80%);
  border-color: rgba(130, 196, 244, 0.16);
}

.mode-card__glow {
  position: absolute;
  width: 160px;
  height: 160px;
  right: -60px;
  top: -70px;
  border-radius: 50%;
  border: 1px solid rgba(234, 201, 129, 0.26);
  box-shadow: 0 0 60px rgba(234, 201, 129, 0.12) inset;
}

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

.mode-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(234, 201, 129, 0.18);
}

.mode-icon svg {
  width: 19px;
  height: 19px;
}

.mode-card--tournament .mode-icon {
  color: var(--blue);
  background: rgba(130, 196, 244, 0.09);
  border-color: rgba(130, 196, 244, 0.18);
}

.mode-card__body {
  margin-top: auto;
}

.mode-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.62rem;
  color: var(--muted-2);
}

.mode-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--gold);
  font-weight: 650;
  font-size: 0.68rem;
}

.mode-card__cta svg {
  width: 12px;
  height: 12px;
}

.mode-card > .mode-card__cta {
  margin-top: auto;
  padding-top: 4px;
}

.best-hand-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px;
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(234, 201, 129, 0.09), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(234, 201, 129, 0.18);
}

.best-hand-card__cards {
  display: flex;
  gap: 2px;
  flex: 0 0 auto;
}

.best-hand-card strong {
  font-size: 0.85rem;
}

.best-hand-card p {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 2px;
}

.tip-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}

.tip-card__icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: var(--gold-dim);
}

.tip-card__icon svg {
  width: 17px;
  height: 17px;
}

.tip-card strong {
  font-size: 0.78rem;
}

.tip-card p {
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 3px;
}

.footer {
  margin-top: 30px;
  padding: 8px 2px 20px;
  color: var(--muted-2);
  font-size: 0.62rem;
  line-height: 1.6;
}

/* ----------------------------------------------------------------- learn */

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rank-row {
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  overflow: hidden;
}

.rank-row summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  cursor: pointer;
}

.rank-row summary::-webkit-details-marker {
  display: none;
}

.rank-row__num {
  width: 22px;
  text-align: center;
  font-size: 0.64rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.rank-row__name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.rank-row__name strong {
  font-size: 0.78rem;
}

.rank-row__name small {
  font-size: 0.58rem;
  color: var(--muted-2);
}

.rank-row__mini {
  display: flex;
  gap: 1px;
}

.rank-row__chev {
  color: var(--muted-2);
  transition: transform 0.2s;
}

.rank-row__chev svg {
  width: 14px;
  height: 14px;
}

.rank-row[open] .rank-row__chev {
  transform: rotate(90deg);
}

.rank-row__body {
  padding: 0 12px 12px 42px;
}

.rank-row__cards {
  display: flex;
  gap: 4px;
  margin: 2px 0 8px;
}

.rank-row__body p {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.45;
}

.position-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.pos-map {
  position: relative;
  aspect-ratio: 16 / 8.2;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 38%, #15533f, #0a2b21 65%, #061812);
  border: 1px solid rgba(234, 201, 129, 0.2);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.55);
  margin-bottom: 12px;
}

.pos-map__center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.66rem;
  font-weight: 800;
  color: #1b1609;
  background: linear-gradient(145deg, #f3d99e, #c99a45);
}

.pos-label {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(5, 18, 13, 0.82);
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.pos-label--btn {
  left: 50%;
  top: 88%;
  color: var(--gold);
  border-color: rgba(234, 201, 129, 0.45);
}

.pos-label--sb {
  left: 77%;
  top: 76%;
}

.pos-label--bb {
  left: 77%;
  top: 26%;
}

.pos-label--utg {
  left: 50%;
  top: 10%;
}

.pos-label--mp {
  left: 20%;
  top: 24%;
}

.pos-label--co {
  left: 20%;
  top: 76%;
}

.position-card > p {
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--muted);
}

.position-card b {
  color: var(--gold);
}

.lesson-list {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.lesson-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 12px;
  background: rgba(255, 255, 255, 0.028);
  border-bottom: 1px solid var(--line);
  text-align: left;
}

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

.lesson-row__num {
  font-size: 0.62rem;
  color: var(--gold);
  width: 20px;
  font-variant-numeric: tabular-nums;
}

.lesson-row__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lesson-row__text strong {
  font-size: 0.8rem;
}

.lesson-row__text small {
  font-size: 0.62rem;
  color: var(--muted-2);
  line-height: 1.35;
}

.lesson-row__tag {
  font-size: 0.52rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  flex: 0 0 auto;
}

.lesson-row__chev {
  color: var(--muted-2);
}

.lesson-row__chev svg {
  width: 14px;
  height: 14px;
}

.faq-list {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.faq-row {
  background: rgba(255, 255, 255, 0.028);
  border-bottom: 1px solid var(--line);
}

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

.faq-row summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  font-size: 0.77rem;
  cursor: pointer;
}

.faq-row summary::-webkit-details-marker {
  display: none;
}

.faq-row summary span {
  color: var(--muted-2);
  transition: transform 0.2s;
}

.faq-row summary span svg {
  width: 14px;
  height: 14px;
}

.faq-row[open] summary span {
  transform: rotate(90deg);
}

.faq-row p {
  padding: 0 12px 12px;
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.5;
}

.learn-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-top: 24px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(234, 201, 129, 0.1), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(234, 201, 129, 0.18);
}

.learn-cta strong {
  font-size: 0.8rem;
}

.learn-cta p {
  font-size: 0.66rem;
  color: var(--muted);
  margin-top: 2px;
}

/* --------------------------------------------------------------- trainer */

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
  padding: 3px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
}

.segmented--trainer {
  margin-bottom: 12px;
}

.segmented--sheet {
  margin-bottom: 16px;
}

.segmented__item {
  min-height: 38px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.segmented__item.is-active {
  color: var(--text);
  background: rgba(234, 201, 129, 0.14);
  box-shadow: inset 0 0 0 1px rgba(234, 201, 129, 0.26);
}

.trainer-meter {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.trainer-meter__item {
  background: rgba(255, 255, 255, 0.03);
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.trainer-meter__item span {
  font-size: 0.56rem;
  color: var(--muted-2);
}

.trainer-meter__item strong {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.trainer-meter__item small {
  font-size: 0.62rem;
  color: var(--muted-2);
  font-weight: 500;
}

.question-card {
  padding: 15px;
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022));
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.question-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.question-index {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 700;
}

.question-tag {
  font-size: 0.58rem;
  color: var(--muted-2);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.hand-read {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.045);
  margin-bottom: 14px;
}

.hand-read__group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-label {
  font-size: 0.54rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  width: 48px;
  flex: 0 0 auto;
}

.answer-grid {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

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

.answer-grid--three {
  grid-template-columns: repeat(3, 1fr);
}

.answer-btn {
  min-height: 46px;
  padding: 8px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  transition: background 0.18s, border-color 0.18s, transform 0.14s;
}

.answer-btn:active {
  transform: scale(0.98);
}

.answer-btn.is-correct {
  background: var(--green-dim);
  border-color: rgba(126, 214, 166, 0.5);
  color: var(--green);
}

.answer-btn.is-wrong {
  background: var(--red-dim);
  border-color: rgba(238, 125, 107, 0.5);
  color: var(--red);
}

.answer-btn.is-muted {
  opacity: 0.45;
}

.feedback {
  display: flex;
  gap: 10px;
  padding: 11px;
  border-radius: 13px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.feedback--good {
  border-color: rgba(126, 214, 166, 0.3);
  background: rgba(126, 214, 166, 0.07);
}

.feedback--bad {
  border-color: rgba(238, 125, 107, 0.3);
  background: rgba(238, 125, 107, 0.07);
}

.feedback__icon {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.feedback--good .feedback__icon {
  color: var(--green);
  background: rgba(126, 214, 166, 0.14);
}

.feedback--bad .feedback__icon {
  color: var(--red);
  background: rgba(238, 125, 107, 0.14);
}

.feedback__icon svg {
  width: 15px;
  height: 15px;
}

.feedback strong {
  font-size: 0.76rem;
}

.feedback p {
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--muted);
  margin-top: 2px;
}

.feedback__cards {
  display: flex;
  gap: 3px;
  margin-top: 7px;
}

.scenario {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.045);
  margin-bottom: 14px;
}

.scenario__text {
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--muted);
}

.odds-board {
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.045);
  margin-bottom: 14px;
}

.odds-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.odds-row > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.odds-row span {
  font-size: 0.54rem;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.odds-row strong {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.equity-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 11px;
}

.equity-line > span {
  font-size: 0.58rem;
  color: var(--muted-2);
  flex: 0 0 auto;
}

.equity-line strong {
  font-size: 0.72rem;
  color: var(--gold);
  width: 38px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.equity-bar {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.equity-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b88c42, #f0d18d);
  box-shadow: 0 0 10px rgba(234, 201, 129, 0.35);
}

.question-foot {
  font-size: 0.58rem;
  color: var(--muted-2);
  text-align: center;
  margin-top: 10px;
  line-height: 1.4;
}

.trainer-footer {
  margin-top: 12px;
}

/* ------------------------------------------------------------------ game */

.game {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.table {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 6px 10px 0;
  border-radius: 30px;
  background:
    radial-gradient(ellipse at 50% 36%, #175743 0%, #0c3529 44%, #061c15 100%);
  border: 1px solid rgba(234, 201, 129, 0.17);
  box-shadow:
    inset 0 0 90px rgba(0, 0, 0, 0.55),
    inset 0 1px rgba(255, 255, 255, 0.06),
    0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.table__texture {
  position: absolute;
  inset: 0;
  background:
    repeating-radial-gradient(ellipse at 50% 40%, transparent 0 34px, rgba(255, 255, 255, 0.018) 35px 36px),
    radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.28) 100%);
  pointer-events: none;
}

.table__rail {
  position: absolute;
  inset: 8px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 0 0 6px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.table__center {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  z-index: 1;
}

.pot-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(2, 12, 8, 0.55);
  border: 1px solid rgba(234, 201, 129, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.pot-pill span {
  font-size: 0.48rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

.pot-pill strong {
  font-size: 0.8rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.board {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
}

.street-pill {
  font-size: 0.46rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.4);
}

.seat {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 106px;
  transition: opacity 0.25s;
}

.seat--top {
  top: 1.5%;
  left: 50%;
  transform: translateX(-50%);
}

.seat--top-left {
  top: 6%;
  left: 4%;
}

.seat--top-right {
  top: 6%;
  right: 4%;
}

.seat--human {
  bottom: 2.5%;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  min-width: 150px;
}

.seat__row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: rgba(3, 15, 10, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.2s;
  max-width: 100%;
}

.seat.is-active .seat__row {
  border-color: rgba(234, 201, 129, 0.7);
  box-shadow: 0 0 0 2px rgba(234, 201, 129, 0.28), 0 0 26px rgba(234, 201, 129, 0.22);
  animation: seat-pulse 1.6s ease-in-out infinite;
}

.seat.is-winner .seat__row {
  border-color: rgba(126, 214, 166, 0.7);
  box-shadow: 0 0 0 2px rgba(126, 214, 166, 0.25), 0 0 30px rgba(126, 214, 166, 0.2);
}

@keyframes seat-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(234, 201, 129, 0.26), 0 0 22px rgba(234, 201, 129, 0.18);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(234, 201, 129, 0.5), 0 0 32px rgba(234, 201, 129, 0.3);
  }
}

.seat.is-folded,
.seat.is-out {
  opacity: 0.42;
  filter: grayscale(0.6);
}

.seat.is-allin .seat__stack {
  color: var(--red);
}

.avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 750;
  color: var(--gold);
  background: linear-gradient(150deg, #1b4436, #0d2a21);
  border: 1px solid rgba(234, 201, 129, 0.28);
}

.avatar--you {
  color: #1b1609;
  background: linear-gradient(145deg, #f4dca6, #c99a45);
  border-color: rgba(255, 255, 255, 0.5);
}

.seat__meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.seat__name {
  font-size: 0.62rem;
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3px;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat__stack {
  font-size: 0.62rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.dealer {
  display: inline-grid;
  place-items: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  font-style: normal;
  font-size: 0.42rem;
  font-weight: 800;
  color: #1b1609;
  background: linear-gradient(145deg, #f3d99e, #c99a45);
  flex: 0 0 auto;
}

.mini-cards {
  display: flex;
  gap: 2px;
  margin-top: 2px;
}

.hole-row {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
}

.bet-pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(3, 14, 10, 0.9);
  border: 1px solid rgba(234, 201, 129, 0.24);
  color: var(--gold);
  font-size: 0.56rem;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.bet-pill svg {
  width: 10px;
  height: 10px;
  opacity: 0.8;
}

.seat--top .bet-pill,
.seat--top-left .bet-pill,
.seat--top-right .bet-pill {
  bottom: -19px;
  left: 50%;
  transform: translateX(-50%);
}

.seat--human .bet-pill {
  bottom: 8px;
  left: calc(100% + 6px);
}

.seat__action,
.seat__status {
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
  background: rgba(3, 14, 10, 0.65);
  padding: 2px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.seat__action {
  color: var(--gold);
}

.seat--human .seat__action,
.seat--human .seat__status {
  top: auto;
  bottom: calc(100% + 4px);
}

.coach-panel {
  margin: 8px 12px 0;
  padding: 9px 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
}

.coach-main {
  flex: 1;
  min-width: 0;
}

.coach-kicker {
  display: block;
  font-size: 0.48rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1px;
}

.coach-main strong {
  display: block;
  font-size: 0.76rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coach-main p {
  font-size: 0.62rem;
  line-height: 1.35;
  color: var(--muted);
  margin-top: 1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.coach-equity {
  width: 82px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.coach-equity .equity-bar {
  width: 100%;
}

.coach-equity span {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.coach-equity b {
  font-size: 0.74rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.coach-equity small {
  font-size: 0.48rem;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.coach-equity--bad .equity-bar i {
  background: linear-gradient(90deg, #b45345, #ee7d6b);
}

.coach-equity--good .equity-bar i {
  background: linear-gradient(90deg, #4ba77c, #7ed6a6);
}

.coach-badge {
  flex: 0 0 auto;
  font-size: 0.52rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.coach-badge--button {
  color: var(--gold);
  border-color: rgba(234, 201, 129, 0.35);
}

.thinking {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  flex: 0 0 auto;
}

.thinking i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  animation: thinking 1.1s infinite ease-in-out;
}

.thinking i:nth-child(2) {
  animation-delay: 0.15s;
}

.thinking i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes thinking {
  0%,
  70%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  35% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.action-dock {
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(4, 13, 9, 0.92) 26%);
}

.action-row {
  display: grid;
  grid-template-columns: 0.9fr 1.25fr 0.9fr;
  gap: 7px;
}

.action-btn {
  min-height: 58px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 650;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  transition: transform 0.14s, background 0.2s, opacity 0.2s;
}

.action-btn:active {
  transform: scale(0.97);
}

.action-btn--fold {
  color: var(--muted);
}

.action-btn--call {
  background: linear-gradient(180deg, rgba(234, 201, 129, 0.18), rgba(234, 201, 129, 0.08));
  border-color: rgba(234, 201, 129, 0.38);
  color: var(--gold);
}

.action-btn--raise {
  color: #1a1406;
  background: linear-gradient(180deg, #f4daa3, #d8a94f);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 22px rgba(216, 169, 79, 0.2);
}

.action-btn:disabled {
  opacity: 0.35;
  filter: grayscale(0.4);
}

.waiting {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}

.raise-panel {
  padding: 12px;
  border-radius: 17px;
  background: rgba(12, 32, 25, 0.94);
  border: 1px solid rgba(234, 201, 129, 0.2);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.3);
}

.raise-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.raise-head span {
  font-size: 0.68rem;
  color: var(--muted-2);
}

.raise-head strong {
  font-size: 1.45rem;
  letter-spacing: -0.04em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.raise-head small {
  margin-left: auto;
  font-size: 0.58rem;
  color: var(--muted-2);
}

.raise-slider {
  width: 100%;
  height: 30px;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
}

.raise-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(234, 201, 129, 0.55), rgba(255, 255, 255, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.raise-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -10px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f4dca6, #c99a45);
  border: 2px solid #10251e;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.raise-slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.raise-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f4dca6, #c99a45);
  border: 2px solid #10251e;
}

.raise-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin: 4px 0 10px;
}

.raise-presets button {
  min-height: 32px;
  border-radius: 9px;
  font-size: 0.62rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
}

.raise-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 7px;
}

.raise-actions .btn {
  min-height: 46px;
  font-size: 0.8rem;
}

/* ----------------------------------------------------------------- sheet */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(2, 8, 6, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  transform: translate(-50%, 110%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1), visibility 0s linear 0.32s;
  background: linear-gradient(180deg, #0d241c, #081811 90%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.5);
}

.sheet.is-open {
  transform: translate(-50%, 0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1), visibility 0s;
}

.sheet__handle {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  margin: 2px auto 14px;
}

.sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.sheet__head h2 {
  font-size: 1.5rem;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-top: 4px;
}

.sheet__sub {
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 6px 0 16px;
}

.sheet__note {
  font-size: 0.58rem;
  color: var(--muted-2);
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
}

.field {
  margin-bottom: 14px;
}

.field__label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  margin-bottom: 6px;
}

.setup-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border-radius: 13px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 4px 0 12px;
}

.setup-summary > div {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setup-summary span {
  font-size: 0.56rem;
  color: var(--muted-2);
}

.setup-summary strong {
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.hint {
  font-size: 0.64rem;
  line-height: 1.45;
  color: var(--muted-2);
  margin: -2px 0 12px;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.switch-row:first-of-type {
  border-top: 0;
}

.switch-row__icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(234, 201, 129, 0.16);
}

.switch-row__icon svg {
  width: 17px;
  height: 17px;
}

.switch-row__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.switch-row__text strong {
  font-size: 0.78rem;
  font-weight: 600;
}

.switch-row__text small {
  font-size: 0.62rem;
  color: var(--muted-2);
  line-height: 1.35;
}

.switch {
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  padding: 2px;
  transition: background 0.2s;
}

.switch i {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #9db4a8;
  transition: transform 0.2s, background 0.2s;
}

.switch.is-on {
  background: rgba(234, 201, 129, 0.3);
  border-color: rgba(234, 201, 129, 0.4);
}

.switch.is-on i {
  background: var(--gold);
  transform: translateX(17px);
}

.switch-row--action > svg {
  width: 15px;
  height: 15px;
  color: var(--muted-2);
}

.settings-stats {
  margin: 16px 0 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.settings-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--line);
  border: 1px solid var(--line);
}

.settings-stats__grid > div {
  background: rgba(255, 255, 255, 0.03);
  padding: 9px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.settings-stats__grid strong {
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.settings-stats__grid span {
  font-size: 0.5rem;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.about-box {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding: 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.about-box__mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #1b1609;
  background: linear-gradient(145deg, #f4dca6, #c99a45);
}

.about-box__mark svg {
  width: 16px;
  height: 16px;
}

.about-box strong {
  font-size: 0.76rem;
}

.about-box p {
  font-size: 0.64rem;
  line-height: 1.45;
  color: var(--muted-2);
  margin-top: 2px;
}

/* ---------------------------------------------------------------- results */

.sheet__head--result {
  margin-bottom: 10px;
}

.result-board {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin: 4px 0 14px;
}

.result-board .card--empty {
  opacity: 0.4;
}

.result-list {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.result-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--line);
}

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

.result-row.is-winner {
  background: rgba(234, 201, 129, 0.07);
}

.result-row__cards {
  display: flex;
  gap: 2px;
  min-width: 42px;
}

.result-row__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.result-row__meta strong {
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-row__meta strong em {
  font-style: normal;
  color: var(--gold);
  font-size: 0.58rem;
}

.result-row__meta span {
  font-size: 0.6rem;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-row__amount {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.result-row.is-winner .result-row__amount {
  color: var(--green);
}

.empty-chips {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 0 20px;
  color: var(--muted-2);
}

.empty-chips svg {
  width: 40px;
  height: 40px;
  color: var(--muted-2);
  opacity: 0.6;
}

.empty-chips strong {
  font-size: 2.6rem;
  letter-spacing: -0.05em;
  color: var(--text);
}

.empty-chips span {
  font-size: 0.66rem;
}

.tournament-badge {
  width: 92px;
  height: 92px;
  margin: 4px auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.3);
}

.tournament-badge svg {
  width: 42px;
  height: 42px;
}

.tournament-badge.is-win {
  color: var(--gold);
  border-color: rgba(234, 201, 129, 0.42);
  background: radial-gradient(circle at 35% 25%, rgba(234, 201, 129, 0.24), rgba(234, 201, 129, 0.04));
  box-shadow: 0 0 50px rgba(234, 201, 129, 0.16);
}

.lesson-read {
  margin-bottom: 16px;
}

.lesson-read section {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.lesson-read section:first-child {
  border-top: 0;
}

.lesson-read h3 {
  font-size: 0.82rem;
  margin-bottom: 5px;
}

.lesson-read p {
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--muted);
}

.sheet .btn--wide + .btn--wide {
  margin-top: 7px;
}

/* ----------------------------------------------------------------- toast */

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  transform: translate(-50%, 12px);
  max-width: calc(100% - 32px);
  padding: 9px 15px;
  border-radius: 999px;
  background: #123026;
  border: 1px solid rgba(234, 201, 129, 0.22);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast[data-tone="success"] {
  border-color: rgba(126, 214, 166, 0.4);
}

.toast[data-tone="error"] {
  border-color: rgba(238, 125, 107, 0.5);
  color: #ffd9d3;
}

body[data-screen="game"] .toast {
  bottom: calc(env(safe-area-inset-bottom) + 96px);
}

body.sheet-open .toast {
  bottom: calc(env(safe-area-inset-bottom) + 20px);
}

/* --------------------------------------------------------------- desktop */

@media (min-width: 600px) {
  body {
    background:
      radial-gradient(700px 500px at 50% -20%, rgba(234, 201, 129, 0.1), transparent 60%),
      radial-gradient(700px 700px at 100% 110%, rgba(33, 126, 92, 0.14), transparent 65%),
      #040d0a;
  }

  #app {
    border-left: 1px solid rgba(255, 255, 255, 0.04);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.4);
  }

  .page {
    padding: 26px 26px 14px;
  }

  .hero h1,
  .page-head h1 {
    font-size: 3.2rem;
  }

  .game-title strong {
    font-size: 0.95rem;
  }

  .table {
    margin: 10px 16px 0;
  }

  .coach-panel,
  .action-dock {
    margin-left: 18px;
    margin-right: 18px;
    padding-left: 0;
    padding-right: 0;
  }

  .action-dock {
    margin: 0;
    padding: 10px 18px calc(12px + env(safe-area-inset-bottom));
  }

  .coach-panel {
    margin-top: 10px;
  }
}

@media (max-width: 360px) {
  .hero {
    grid-template-columns: 1fr 82px;
  }

  .hero h1 {
    font-size: 2.05rem;
  }

  .hero__hand {
    width: 82px;
    height: 138px;
  }

  .hero__card .card--xl {
    width: 64px;
    height: 92px;
  }

  .seat {
    width: 98px;
  }

  .seat__name {
    max-width: 62px;
  }

  .action-btn {
    font-size: 0.74rem;
  }

  .coach-main p {
    -webkit-line-clamp: 1;
  }
}

@media (max-height: 700px) {
  .table__center {
    top: 43%;
  }

  .coach-panel {
    min-height: 52px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .action-btn {
    min-height: 52px;
  }

  .hole-row .card--lg {
    width: 46px;
    height: 66px;
  }
}

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