.poker-platform {
  --poker-ink: #302820;
  --poker-green: #293c32;
  --poker-wine: #713241;
  --poker-rule: #a99a85;
  --poker-paper: #f1e7d3;
  --poker-white: #fbf4e8;
  --poker-width: 1120px;
  color: var(--poker-ink);
  background: #e3dccf var(--cloth) repeat top left / 1536px 1536px;
  font: 400 clamp(19px, 1.5vw, 23px)/1.38 "Forum", Georgia, serif;
  font-synthesis: none;
}

.poker-platform, .poker-platform * { box-sizing: border-box; }
.poker-platform [hidden] { display: none !important; }
.poker-platform :focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.poker-platform :where(h1, h2, h3, h4, p, fieldset, dd, dl, ul, ol) { margin: 0; }
.poker-platform :where(h1, h2, h3, h4) { font-weight: 400; line-height: 1.08; }
.poker-platform :where(button, input, select) { font: inherit; }
.poker-platform :where(a) { color: var(--poker-wine); text-underline-offset: .2em; }
.poker-platform :where(button:enabled, summary) { cursor: pointer; }
.poker-platform :where(button:disabled) { opacity: .55; }
.poker-platform :where(section[id]) { scroll-margin-block-start: 85px; }
.poker-platform :where(fieldset) { min-inline-size: 0; padding: 0; border: 0; }
.poker-platform :where(legend) { padding: 0; margin-block-end: 7px; }
.poker-platform :where(p + p) { margin-block-start: .58em; }
.poker-study-symbols { position: absolute; pointer-events: none; }

.poker-wrap { width: min(calc(100% - clamp(24px, 9vw, 140px)), var(--poker-width)); margin-inline: auto; }

.poker-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(24px, 6vw, 92px);
  align-items: center;
  min-block-size: 400px;
  padding-block: clamp(95px, 11vw, 170px) clamp(45px, 7.1vw, 88px);
}

.poker-hero h1 {
  margin-block-end: 11px;
  color: var(--poker-wine);
  font-family: "Marck Script", cursive;
  font-size: clamp(64px, 11.7vw, 143px);
}

.poker-hero p { max-width: 44ch; }
.poker-hero img { width: min(100%, 440px); height: auto; justify-self: end; margin: 0; }
.poker-hero .poker-study-button { margin-block-start: 20px; }

.poker-directory {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(14px, 3vw, 42px);
  align-items: center;
  border-block: 1px solid var(--poker-rule);
}

.poker-directory a,
.poker-study-link {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
}

.poker-directory { margin-block-end: clamp(26px, 4.5vw, 55px); }

.poker-reference,
.poker-mentor { padding-block: clamp(43px, 7vw, 91px); }

.poker-reference h2,
.poker-mentor h2 {
  margin-block-end: .22em;
  font: 400 clamp(43px, 5.4vw, 75px)/1.06 "Marck Script", cursive;
}

.poker-mentor {
  color: var(--poker-white);
  background: linear-gradient(rgb(24 40 31 / .71), rgb(22 36 29 / .91)),
    url("./assets/web/forest-menu-1440.webp") center top / max(100%, 750px) auto repeat-y #1c2f24;
}

.poker-mentor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr);
  align-items: start;
  gap: clamp(12px, 3.4vw, 48px);
  margin-block-start: clamp(18px, 3vw, 38px);
}

.poker-player-count label {
  display: flex;
  align-items: center;
  gap: 8px 18px;
  flex-wrap: wrap;
}

.poker-player-count select {
  min-inline-size: 70px;
  min-block-size: 44px;
  padding: 3px 10px;
  cursor: pointer;
  border: 1px solid #c8ae8f;
  border-radius: 2px;
  background: var(--poker-white);
  color: var(--poker-ink);
}

.poker-mentor-hand, .poker-position-figure { container-type: inline-size; }

.poker-mentor-hand {
  --card-width: clamp(45px, 10cqw, 60px);
  --card-height: calc(var(--card-width) * 1.39);
  --line-gap: clamp(4px, 1.2cqw, 9px);
}

.poker-club-table {
  --surface-width: 78%;
  --seat-size: clamp(44px, 9cqw, 52px);
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.62;
}

.poker-table-drawing {
  position: absolute;
  z-index: -1;
  display: block;
  width: var(--surface-width);
  height: auto;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
}

.poker-club-table--mentor { margin-block: 9px 0; }
.poker-table-seats { display: contents; }

.poker-round-seat, .poker-dealer-mark {
  position: absolute;
  left: var(--seat-x);
  top: var(--seat-y);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
}

.poker-round-seat {
  width: var(--seat-size);
  padding: 0;
  color: var(--poker-ink);
  background: var(--poker-white);
  border: 1px solid #9e7c65;
  font-size: clamp(14px, 3.1cqw, 17px);
  line-height: 1;
  white-space: nowrap;
}

.poker-round-seat[disabled] { opacity: 1; }
.poker-round-seat[aria-pressed="true"] { border-color: var(--poker-wine); background: var(--poker-wine); color: var(--poker-white); }
.poker-round-seat[aria-pressed="false"]:enabled:hover { background: #e9dac6; border-color: var(--poker-wine); }
.poker-round-seat:focus-visible { outline-color: var(--poker-wine); }
.poker-round-seat[data-mentor-seat] {
  width: calc(var(--seat-size) * .78);
  border-color: #a89278;
  background: #24372e;
  color: #f7e5cb;
  font-size: 15px;
}

.poker-round-seat[data-mentor-seat]:not([data-seat-active]) { opacity: .48; }
.poker-round-seat[data-mentor-seat][data-seat-active] { background: #efdfc7; border-color: #f7e8ce; color: var(--poker-ink); }
.poker-round-seat[data-mentor-seat][data-seat-active]:not([data-seat-user])::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #725d51;
}
.poker-round-seat[data-mentor-seat][data-seat-user] { background: #753544; border-color: #ddba9d; color: #fff1d9; }

.poker-dealer-mark {
  width: 20px;
  transform: translate(125%, -117%);
  background: #f1e2cb;
  color: var(--poker-wine);
  border: 1px solid #a28465;
  font-size: 13px;
  line-height: 1;
  pointer-events: none;
}

.poker-clockwise {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  color: #f4ddba;
  font-size: clamp(15px, 3.5cqw, 20px);
  white-space: nowrap;
}

.study-board {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, calc(var(--card-height) / 2 - 100%));
  display: grid;
  grid-template-columns: repeat(5, var(--card-width));
  grid-template-areas: "flop flop flop turn river" ". . . . .";
  gap: 4px clamp(3px, 1.2cqw, 9px);
  font-size: clamp(14px, 3.5cqw, 18px);
  line-height: 1.2;
}

.study-board > .poker-card-choice { grid-row: 2; }
.study-street { color: #efe1cc; text-align: center; white-space: nowrap; }
.study-street--flop { grid-area: flop; }
.study-street--turn { grid-area: turn; }
.study-street--river { grid-area: river; }

.study-hole { position: relative; left: var(--seat-x); transform: translateX(-50%); display: grid; justify-items: center; gap: 4px; width: fit-content; margin-block-start: 6px; }
.study-hole > span { color: #efe1cc; font-size: .79em; }
.poker-card-line, .poker-example-cards { display: flex; gap: var(--line-gap, clamp(5px, 1vw, 11px)); }
.study-hole .poker-card-choice { border-style: solid; }

.poker-card-choice,
.poker-example-card {
  display: grid;
  place-items: center;
  width: var(--card-width);
  height: var(--card-height);
  padding: 0;
  border: 1px solid #947858;
  border-radius: 5px;
  color: var(--poker-ink);
  background: var(--poker-white);
}

.poker-card-choice {
  border-color: #c9b69a;
  border-style: dashed;
  color: #fff2da;
  background: #293f35;
  font-size: 26px;
}

.poker-card-choice:enabled:hover { border-color: #fff3dc; }
.poker-card-choice.poker-card-filled { border-style: solid; background: var(--poker-white); color: var(--poker-ink); }
.poker-card-choice.poker-card-filled:enabled:hover { background: #e9d9c5; }
.poker-card-choice.poker-card-filled:focus-visible { outline-color: #fff3dc; }
.poker-card-choice:disabled { opacity: .54; }
.poker-red { color: #8a3447; }
.poker-card-choice svg, .poker-example-card svg { width: 100%; height: 100%; }

.poker-result-region {
  padding: clamp(17px, 2.5vw, 31px);
  border: 1px solid #beaa8f;
  border-radius: 3px;
  background: #f2e9d9 var(--cloth) repeat top left / 1536px 1536px;
  color: var(--poker-ink);
}

.poker-result-status { min-block-size: 1.5em; }
.poker-feedback h3 { color: var(--poker-wine); font-size: clamp(27px, 3vw, 46px); }
.poker-result-detail { font-size: .92em; }
.poker-feedback > .poker-result-detail:first-child { line-height: 1.5; }
.poker-win { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; margin: 7px 0 4px; }
.poker-win > strong { color: var(--poker-wine); font-size: clamp(40px, 4.6vw, 66px); font-weight: 400; line-height: .99; white-space: nowrap; }
.poker-direction { margin-block-start: 16px; padding-block: 15px 11px; border-block-start: 1px solid #a98578; }
.poker-direction h4 { color: var(--poker-wine); font-size: 1.23em; margin-block-end: 4px; }
.poker-direction p + p, .poker-result-math { font-size: .88em; line-height: 1.35; }
.poker-result-math { border-block-start: 1px solid #a98578; }
.poker-result-math summary { padding-block: 12px; min-height: 44px; color: var(--poker-wine); }
.poker-result-math dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-block-end: 8px; }

.poker-study-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 44px;
  padding: 5px 15px;
  border: 1px solid var(--poker-wine);
  border-radius: 2px;
  background: transparent;
  color: var(--poker-wine);
  text-decoration: none;
}

.poker-study-button:enabled:hover, a.poker-study-button:hover { background: #ead9c9; color: var(--poker-wine); }
.poker-primary { background: var(--poker-wine); color: var(--poker-white) !important; }
.poker-primary:enabled:hover, a.poker-primary:hover { background: #572638; color: var(--poker-white); }
.poker-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.poker-reference { --theory-rule: #987064; }
.poker-reference :is(h2, h3, h4, dt) { color: var(--poker-wine); }
.poker-reference h3 { font-size: clamp(28px, 3.15vw, 45px); }
.poker-reference h4 { margin-block-end: 3px; font-size: clamp(24px, 2.6vw, 35px); }
.poker-theory-intro { max-width: 65ch; }
.poker-streets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px clamp(18px, 4vw, 48px);
  list-style: none;
  padding: 0;
  margin-block: 27px clamp(45px, 7vw, 80px);
}

.poker-streets li { border-block-start: 1px solid var(--theory-rule); padding-block-start: 10px; }
.poker-streets h3 { margin-block-end: 6px; font-size: clamp(22px, 2.1vw, 30px); }
.poker-streets p { font-size: .91em; }

.poker-combinations { --card-width: clamp(44px, 6.7vw, 61px); --card-height: calc(var(--card-width) * 1.39); }
.poker-combinations header { margin-block-end: 18px; }
.poker-combinations header p { margin-block-start: 4px; }
.poker-combination-list { padding: 0; list-style: none; border-block-start: 1px solid var(--theory-rule); }

.poker-combination {
  display: grid;
  grid-template-columns: minmax(max-content, .78fr) minmax(0, 1.22fr);
  align-items: center;
  gap: 10px clamp(20px, 4vw, 62px);
  padding-block: calc(clamp(15px, 2vw, 24px) + var(--card-height) * .05) clamp(15px, 2vw, 24px);
  border-block-end: 1px solid var(--theory-rule);
}

.poker-example-card { box-shadow: 0 2px 2px rgb(48 29 20 / .09); }
.poker-card-formed {
  transform: translateY(-10%);
  border-color: var(--poker-wine);
  outline: 1px solid var(--poker-wine);
  outline-offset: -3px;
  box-shadow: 0 5px 9px rgb(48 29 20 / .20), 0 2px 2px rgb(48 29 20 / .10);
}

.poker-combination .poker-example-card:not(.poker-card-formed) { background: #f2e7d7; }
.poker-position-theory, .poker-actions-theory, .poker-bluff-theory { margin-block-start: clamp(47px, 7vw, 85px); }
.poker-position-theory { display: grid; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: 22px clamp(15px, 4vw, 64px); }
.poker-position-theory h3, .poker-actions-theory h3, .poker-bluff-theory h3 { margin-block-end: 12px; }
.poker-position-figure {
  margin: 0;
  min-width: 0;
}
.poker-position-figure figcaption { color: var(--poker-wine); text-align: center; font-size: 1.12em; }
.poker-position-note {
  min-block-size: 8.15em;
  border-block-start: 1px solid var(--theory-rule);
  padding-block-start: 11px;
}
.poker-position-note h4 { font-size: clamp(23px, 2.2vw, 31px); }
.poker-glossary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 15px 24px; }
.poker-glossary > div { border-block-start: 1px solid var(--theory-rule); padding-block-start: 9px; }
.poker-glossary dt { font-size: 1.13em; margin-block-end: 4px; }
.poker-glossary dd { font-size: .91em; }
.poker-bluff-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px clamp(20px, 5vw, 60px); }
.poker-bluff-pair article { border-block: 1px solid var(--theory-rule); padding: 14px 0 16px; }
.poker-bluff-pair article:first-child .poker-example-card { background: #f6ece5; }
.poker-bluff-pair article:last-child .poker-example-card { background: #eef0e7; }
.poker-bluff-hand {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  --card-width: clamp(40px, 5vw, 52px);
  --card-height: calc(var(--card-width) * 1.39);
  margin-block-end: 12px;
}
.poker-bluff-hand p { font-size: .86em; }
.poker-picker {
  width: min(570px, calc(100% - 30px));
  max-height: calc(100dvh - 28px);
  max-width: none;
  margin: auto;
  padding: clamp(16px, 3.1vw, 36px);
  overflow: auto;
  border: 1px solid var(--poker-wine);
  background: #e3dccf var(--cloth) repeat top left / 1536px 1536px;
  color: var(--poker-ink);
}

.poker-picker:not([open]) { display: none; }
.poker-picker::backdrop { background: rgb(17 27 21 / .76); }
.poker-picker header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-end: 13px; }
.poker-picker h2 { color: var(--poker-wine); font: 400 clamp(34px, 6.5vw, 52px)/1 "Marck Script", cursive; }
.poker-picker-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #a99378;
  color: var(--poker-wine);
  background: transparent;
  font-size: 30px !important;
}
.poker-picker-fields { display: grid; gap: 12px; }
.poker-rank-grid, .poker-suit-grid { display: grid; gap: 5px; }
.poker-rank-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.poker-suit-grid { grid-template-columns: repeat(4, minmax(0, 55px)); }
.poker-picker-option { position: relative; display: grid; min-block-size: 44px; cursor: pointer; }
.poker-picker-option input { position: absolute; opacity: 0; cursor: inherit; margin: 0; inset: 0; width: 100%; height: 100%; }
.poker-picker-option svg {
  width: 100%;
  height: 44px;
  padding: 8px;
  border: 1px solid #a99378;
  border-radius: 2px;
  background: var(--poker-white);
}
.poker-picker-option input:checked + svg { border: 2px solid var(--poker-wine); background: #ead7c7; }
.poker-picker-option input:focus-visible + svg { outline: 2px solid var(--poker-wine); outline-offset: 2px; }
.poker-picker-option input:disabled + svg { opacity: .4; }
.poker-picker [data-poker-picker-status] { min-block-size: 26px; margin-block: 8px; font-size: .88em; }


@media (max-width: 840px) {
  .poker-mentor-layout { grid-template-columns: minmax(0, 1fr); }
  .poker-mentor-hand { width: min(100%, 650px); margin-inline: auto; }
}

@media (max-width: 650px) {
  .poker-hero { grid-template-columns: minmax(0, 1fr); min-block-size: auto; gap: 14px; padding-block: 100px 20px; }
  .poker-hero img { width: min(180px, 53%); margin-block-start: 2px; }
  .poker-directory { margin-block-end: 25px; }
  .poker-directory a { min-block-size: 44px; }
  .poker-mentor { background-image: linear-gradient(rgb(24 40 31 / .74), rgb(22 36 29 / .94)), url("./assets/web/forest-menu-720.webp"); }
  .poker-streets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .poker-combination, .poker-position-theory, .poker-bluff-pair { grid-template-columns: minmax(0, 1fr); }
  .poker-glossary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .poker-rank-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .poker-position-theory { grid-template-columns: minmax(0, 1fr); }
  .poker-position-copy { max-width: 60ch; }
  .poker-position-figure { width: min(100%, 570px); margin-inline: auto; }
}

@container (max-width: 479px) {
  .poker-club-table { --surface-width: 98%; aspect-ratio: 1.12; }
  .poker-round-seat, .poker-dealer-mark { left: var(--seat-compact-x); top: var(--seat-compact-y); }
  .study-hole { left: var(--seat-compact-x); }
}

@container (max-width: 315px) {
  .study-board { gap: 1px 2.5px; font-size: 12px; }
}

@media (max-width: 550px) {
  .poker-position-note { min-block-size: 8.5em; }
}
