@import url("quiz2.css");

body { overflow-y: auto; }
.quiz2-close {
  display: grid;
  place-items: center;
  text-decoration: none;
}
.solver-main { padding: 8px 8px 36px; }
.solver-status {
  width: min(100%, clamp(320px, calc(166.667dvh - 146.667px), 1280px));
  min-height: 38px;
  margin: 0 auto 8px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #2b302c;
  border-radius: 9px;
  background: #111512;
  color: #aeb5af;
  font-size: 13px;
}
.solver-status strong { color: #f4f5f2; }
.quiz2-stage { background: url("assets/quiz2-table-bg.jpg") center / 100% 100% no-repeat; }
.quiz2-stage::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #0002, transparent 20%, transparent 78%, #0003);
}
.quiz2-pot { z-index: 4; top: 30%; }
.quiz2-blinds {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 38%;
  padding: .26cqw .8cqw;
  border-radius: 1.2cqw;
  background: #101713b8;
  color: #d9ddd9;
  font-size: .92cqw;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  text-shadow: 0 .08cqw .16cqw #000;
  transform: translateX(-50%);
}
.quiz2-seat { z-index: 6; }
.quiz2-seat.is-acting { z-index: 8; }
.seat-1 { left: 7%; top: 52.5%; }
.seat-2 { left: 17%; top: 29%; }
.seat-3 { left: 40%; top: 24%; }
.seat-4 { left: 60%; top: 24%; }
.seat-6 { left: 93%; }
.seat-7 { left: 79%; top: 79%; }
.seat-9 { left: 21%; top: 79%; }
.player-box {
  --box-shape: polygon(7% 0, 93% 0, 97% 3%, 100% 14%, 96% 94%, 93% 100%, 7% 100%, 4% 94%, 0 14%, 3% 3%);
  aspect-ratio: 2.5 / 1;
}
.player-box-upper {
  position: relative;
  grid-template-rows: 1fr;
  padding: 0 1.4cqw 0 2.15cqw;
  line-height: 1;
}
.player-box-upper small { color: #89908b; font-size: .7em; font-weight: 700; }
.player-box-upper > span {
  font-size: 1.12em;
  font-weight: 800;
  transform: translateY(.3cqw);
}
.position-badge {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 50%;
  min-width: 2.1cqw;
  padding: .22cqw .46cqw;
  border: .08cqw solid #66716a;
  border-radius: .22cqw;
  background: linear-gradient(#465049, #303733);
  color: #eef1ef;
  box-shadow: inset 0 .06cqw #ffffff24, 0 .08cqw .16cqw #0008;
  font-size: .82em;
  line-height: 1;
  text-align: center;
  transform: translate(-50%, -50%);
}
.player-avatar {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: calc(100% - .4cqw);
  width: 8.2cqw;
  aspect-ratio: 1;
  overflow: hidden;
  border: .18cqw solid #777d79;
  border-radius: 50%;
  background: #101311;
  box-shadow:
    inset 0 0 0 .12cqw #111713,
    0 .35cqw .62cqw #000b;
  pointer-events: none;
  transform: translateX(-50%);
}
.player-avatar-image {
  position: absolute;
  left: calc(-100% * var(--avatar-crop-x) / var(--avatar-crop-width));
  top: calc(-100% * var(--avatar-crop-y) / var(--avatar-crop-width));
  width: calc(100% * var(--avatar-sheet-width) / var(--avatar-crop-width));
  height: auto;
  max-width: none;
  display: block;
}
.quiz2-seat.is-acting .player-avatar {
  bottom: calc(100% + 5.2cqw);
  border-color: #e7bb27;
  box-shadow:
    inset 0 0 0 .12cqw #4d3b06,
    0 0 .7cqw #f0c72b70,
    0 .35cqw .62cqw #000b;
}
.quiz2-seat.is-folded .player-avatar {
  border-color: #626864;
  filter: saturate(.68) brightness(.82);
}
.kanzork-emote {
  position: absolute;
  z-index: 14;
  left: 50%;
  bottom: calc(100% + 1.25cqw);
  width: 7.2cqw;
  aspect-ratio: 1;
  pointer-events: none;
  filter: drop-shadow(0 .35cqw .42cqw #000b);
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  animation: kanzork-emote-pop .34s cubic-bezier(.18, .82, .28, 1.18) both;
}
.kanzork-emote-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@keyframes kanzork-emote-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, .9cqw) scale(.22) rotate(-9deg);
  }
  72% {
    opacity: 1;
    transform: translate(-50%, -.15cqw) scale(1.08) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .kanzork-emote { animation: none; }
}
.five-answer-sticker {
  position: absolute;
  z-index: 15;
  right: calc(100% - .45cqw);
  bottom: -.35cqw;
  width: 8.4cqw;
  aspect-ratio: 613 / 516;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 .45cqw .55cqw #000c);
  transform: translate(.8cqw, .45cqw) scale(.28) rotate(-7deg);
  transform-origin: 100% 75%;
  transition: opacity .16s ease-out, transform .18s cubic-bezier(.2, .88, .3, 1.22);
}
.five-answer-sticker.is-visible {
  opacity: 1;
  transform: translate(0, 0) scale(1) rotate(0);
}
.five-answer-sticker-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
}
@media (prefers-reduced-motion: reduce) {
  .five-answer-sticker,
  .five-answer-sticker.is-visible {
    transition: opacity .08s linear;
    transform: none;
  }
}
.quiz2-seat.is-acting .player-box {
  background: #e7bb27;
  filter: drop-shadow(0 0 .55cqw #f0c72b99) drop-shadow(0 .42cqw .5cqw #000b);
}
.quiz2-seat.is-acting .player-box-face { background: linear-gradient(to bottom, #1d211e 0 50%, #181d19 50% 100%); }
.quiz2-seat.is-acting .player-box-upper { color: #ffe16b; }
.quiz2-seat.is-acting .position-badge {
  border-color: #b98d00;
  background: linear-gradient(#ffdf4d, #dca800);
  color: #241b00;
}
.quiz2-seat.is-folded .player-box { background: #565c58; }
.quiz2-seat.is-folded .player-box-face {
  background: linear-gradient(to bottom, #202421 0 50%, #1c201d 50% 100%);
}
.quiz2-seat.is-folded .player-box-upper { color: #c1c6c2; }
.quiz2-seat.is-folded .position-badge {
  border-color: #68716b;
  background: linear-gradient(#555d58, #444b47);
}
.quiz2-seat.is-folded .player-box-action { display: none; }
.quiz2-seat.is-folded .player-box-stack-value { display: inline; }
.decision-timer {
  --timer-progress: 1;
  position: absolute;
  z-index: 5;
  left: 0;
  top: calc(100% + .2cqw);
  width: 100%;
  height: 1.15cqw;
  overflow: hidden;
  border: .08cqw solid #705500;
  border-radius: .2cqw;
  background: #171a18;
  color: #fff8c7;
  box-shadow: inset 0 .08cqw .18cqw #000b, 0 .16cqw .28cqw #0009;
  line-height: 1;
}
.decision-timer-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #39c85b, #f1d22c 68%, #e33c3c);
  transform: scaleX(var(--timer-progress));
  transform-origin: left center;
  transition: transform .25s linear;
}
.decision-timer-value {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: .72cqw;
  font-weight: 900;
  text-shadow: 0 .08cqw .16cqw #000;
}
.playing-card {
  height: auto;
  aspect-ratio: 69 / 100;
  font-family: "Bahnschrift Condensed", "Arial Narrow", Impact, sans-serif;
  font-stretch: condensed;
  font-weight: 700;
}
.seat-cards { bottom: calc(100% - 4.64cqw); }
.seat-cards.hero-cards { bottom: calc(100% - 2.55cqw); }
.hero-cards .hole-card + .hole-card { margin-left: -1.45cqw; }
.card-back {
  --card-edge: #eeeae3;
  border-width: .22cqw;
  background-color: #852e32;
  background:
    radial-gradient(circle at 25% 25%, transparent 0 .12cqw, #b85b5e55 .13cqw .18cqw, transparent .19cqw),
    radial-gradient(circle at 75% 75%, transparent 0 .12cqw, #5f171b66 .13cqw .18cqw, transparent .19cqw),
    linear-gradient(135deg, #9a3c40 0%, #852e32 48%, #722327 100%);
  background-size: .82cqw .82cqw, .82cqw .82cqw, auto;
  box-shadow:
    inset 0 0 0 .08cqw #6b1f23,
    inset 0 0 .3cqw #ffffff12,
    0 .3cqw .45cqw #0009;
}
.card-back::before {
  content: "";
  position: absolute;
  inset: .25cqw;
  border: .08cqw solid #b96b6e;
  border-radius: .3cqw;
  box-shadow: inset 0 0 0 .12cqw #611b1f;
}
.dealer-button {
  position: absolute;
  z-index: 5;
  width: 31px;
  height: 26px;
  display: block;
  cursor: help;
}
.seat-1 .dealer-button { left: calc(100% + .35cqw); top: -45%; }
.seat-2 .dealer-button { left: calc(50% - 15.5px); top: calc(100% + .35cqw); }
.seat-3 .dealer-button { left: calc(100% + .35cqw); top: 80%; }
.seat-4 .dealer-button { left: auto; right: calc(100% + .35cqw); top: 80%; }
.seat-5 .dealer-button { left: calc(50% - 15.5px); top: calc(100% + .35cqw); }
.seat-6 .dealer-button { left: auto; right: calc(100% + .35cqw); top: -45%; }
.seat-7 .dealer-button { left: auto; right: calc(100% + .35cqw); top: -15%; }
.seat-8 .dealer-button { left: calc(50% - 15.5px); top: calc(-31px - .35cqw); }
.seat-9 .dealer-button { left: calc(100% + .35cqw); top: -15%; }
.dealer-button-disc {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 2px solid #8d6900;
  border-radius: 50%;
  background: linear-gradient(#ffe45b, #e6ad08);
  color: #302500;
  box-shadow: 0 2px 5px #000a, inset 0 1px #fff8;
  font-size: 14px;
  font-weight: 1000;
  line-height: 1;
  transform: perspective(55px) rotateX(58deg) rotateZ(-8deg);
  transform-origin: 50% 50%;
}
.dealer-button::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  padding: 6px 9px;
  border: 1px solid #5f5842;
  border-radius: 5px;
  background: #171712;
  color: #ffe276;
  box-shadow: 0 5px 14px #000a;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .14s ease, transform .14s ease;
}
.dealer-button:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}
.playing-card.suit-h { --card-top: #a20f18; --card-bottom: #c01822; --card-edge: #d02b34; }
.playing-card.suit-s { --card-top: #141719; --card-bottom: #25292b; --card-edge: #454a4b; }
.playing-card.suit-d { --card-top: #075a9b; --card-bottom: #0878bd; --card-edge: #2d83c4; }
.playing-card.suit-c { --card-top: #07862a; --card-bottom: #0ca83a; --card-edge: #20b94d; }
.player-box-action {
  font-size: 1.12em;
  font-weight: 700;
}
.table-wager {
  width: 9cqw;
  gap: .3cqw;
}
.wager-chips {
  height: 3.15cqw;
  gap: .1cqw;
  padding-bottom: .38cqw;
}
.chip {
  --chip-reference-variant: 3;
  --chip-top: #171918;
  --chip-mid: #292d2b;
  --chip-side: #0e1110;
  --chip-dark: #030504;
  --rim-center: 55%;
  --segment-size: 30deg;
  --segment-gap: 60deg;
  --segment-alpha: .9;
  --gloss-alpha: .16;
  --side-mark: color-mix(in srgb, var(--chip-side), white 34%);
  --layer-line: #090b0a99;
  width: 1.875cqw;
  height: 1.5625cqw;
  margin-left: -.14cqw;
  border: .078125cqw solid transparent;
  border-radius: 50%;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 34% 18%, rgb(255 255 255 / var(--gloss-alpha)) 0 8%, transparent 33%),
    radial-gradient(
      ellipse at 50% 50%,
      var(--chip-top) 0 var(--rim-center),
      transparent calc(var(--rim-center) + 1%)
    ),
    repeating-conic-gradient(
      from -3deg at 50% 50%,
      rgb(246 246 240 / var(--segment-alpha)) 0 var(--segment-size),
      transparent var(--segment-size) var(--segment-gap)
    ),
    radial-gradient(ellipse at 50% 50%, var(--chip-mid) 0 100%);
  box-shadow:
    inset 0 .078125cqw .078125cqw #ffffff26,
    inset 0 -.078125cqw .15625cqw #0006,
    0 .078125cqw 0 #0009;
}
.chip::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -.078125cqw;
  right: -.078125cqw;
  top: 52%;
  height: calc(48% + .3125cqw);
  border: .078125cqw solid color-mix(in srgb, var(--chip-side), white 10%);
  border-top: 0;
  border-radius: 0 0 50% 50%;
  background:
    linear-gradient(to bottom, #ffffff1c 0 .078125cqw, transparent .078125cqw calc(100% - .078125cqw), var(--layer-line) calc(100% - .078125cqw)),
    linear-gradient(
      90deg,
      var(--chip-dark) 0 8%,
      var(--chip-side) 8% 15%,
      var(--side-mark) 15% 19%,
      var(--chip-side) 19% 43%,
      var(--side-mark) 43% 47%,
      var(--chip-mid) 47% 58%,
      var(--chip-side) 58% 78%,
      var(--side-mark) 78% 82%,
      var(--chip-side) 82% 92%,
      var(--chip-dark) 92% 100%
    );
  box-shadow: inset 0 -.078125cqw .078125cqw #0008, 0 .078125cqw .15625cqw #0008;
}
.chip::after {
  content: "";
  position: absolute;
  inset: calc((100% - var(--rim-center)) / 2);
  border: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 .15625cqw #0005;
}
.chip-yellow { --chip-top: #c18e10; --chip-mid: #daa516; --chip-side: #8f5f05; --chip-dark: #543400; }
.chip-red { --chip-top: #98202b; --chip-mid: #b72a37; --chip-side: #76151f; --chip-dark: #41090e; }
.chip-black { --chip-top: #171918; --chip-mid: #292d2b; --chip-side: #0e1110; --chip-dark: #030504; }
.chip-green { --chip-top: #168238; --chip-mid: #229f46; --chip-side: #0f6129; --chip-dark: #063516; }
.chip-purple { --chip-top: #672486; --chip-mid: #8231a1; --chip-side: #47165f; --chip-dark: #260b33; }
.chip-white { --chip-top: #8f9692; --chip-mid: #b0b6b2; --chip-side: #696f6c; --chip-dark: #383d3a; }
.wager-amount {
  min-width: 5.2cqw;
  padding: .28cqw .68cqw;
  border: .08cqw solid #ffffff18;
  background: #090c0ad9;
  color: #fff;
  font-size: 1.35cqw;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 .11cqw .18cqw #000;
}
.wager-1 { left: 17.5%; top: 52.5%; }
.wager-2 { left: 26%; top: 36%; }
.wager-3 { left: 42%; top: 32%; }
.wager-4 { left: 58%; top: 32%; }
.wager-5 { left: 76%; top: 36%; }
.wager-6 { left: 82.5%; top: 50%; }
.wager-7 { left: 69%; top: 64%; }
.wager-8 { left: 50%; top: 69%; }
.wager-9 { left: 31%; top: 64%; }
.decision-panel {
  width: min(100%, clamp(320px, calc(166.667dvh - 146.667px), 1280px));
  margin: 8px auto 0;
  padding: 10px 12px;
  border: 1px solid #303631;
  border-radius: 10px;
  background: #111512;
  box-shadow: 0 12px 38px #0006;
}
.caption { color: #929a94; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.tags span {
  padding: 4px 6px;
  border: 1px solid #303a33;
  border-radius: 5px;
  background: #1a211c;
  color: #c5cbc7;
  font-size: 11px;
}
.tags { display: flex; gap: 5px; margin-top: 6px; }
.tags span { color: #ffd441; }
.answers { display: grid; grid-template-columns: repeat(2, minmax(130px, 1fr)); gap: 8px; }
.action-rail {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid #080908;
  border-radius: 10px;
  background: linear-gradient(#171a18, #0a0c0b);
  box-shadow: inset 0 1px #ffffff10, 0 10px 24px #0008;
}
.answers button {
  min-height: 64px;
  border: 2px solid #421014;
  border-radius: 5px;
  background: linear-gradient(#d74b52 0%, #a8222b 55%, #71151c 100%);
  color: #fff;
  box-shadow: inset 0 2px #ff899055, inset 0 -4px #2d070b99, 0 3px 0 #050505;
  font-size: 17px;
  font-weight: 900;
  text-shadow: 0 1px 2px #000;
}
.continue {
  min-height: 44px;
  border: 1px solid #465049;
  border-radius: 8px;
  background: #202622;
  color: #f2f3f0;
  font-weight: 800;
  cursor: pointer;
}
.answers button:hover:not(:disabled) {
  filter: brightness(1.12);
  transform: translateY(-1px);
}
.answers button:active:not(:disabled) {
  box-shadow: inset 0 3px 8px #2d070bcc, 0 1px 0 #050505;
  transform: translateY(1px);
}
.answers button:disabled { opacity: .48; cursor: default; }
.feedback { min-height: 42px; margin-top: 8px; padding: 11px; border-radius: 7px; }
.feedback:empty { display: none; }
.feedback-status { margin-bottom: 8px; font-weight: 900; }
.feedback-summary { display: grid; gap: 6px; }
.feedback-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 6px;
  border-top: 1px solid currentColor;
}
.feedback-row span { opacity: .82; }
.feedback-row strong { text-align: right; }
.feedback.correct { background: #153a27; color: #9af0b5; }
.feedback.warning { background: #493d18; color: #ffe08a; }
.feedback.error { background: #492126; color: #ffb6be; }
.quiz-result-summary {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid #b8f24b66;
  border-radius: 12px;
  background: #17231c;
}
.quiz-result-summary[hidden] { display: none; }
.quiz-result-summary .eyebrow { margin: 0 0 10px; color: var(--accent); }
.quiz-result-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quiz-result-grid > div { padding: 10px; border-radius: 8px; background: #0e1511; }
.quiz-result-grid span { display: block; color: var(--muted); font-size: 12px; }
.quiz-result-grid strong { display: block; margin-top: 4px; font-size: 20px; }
@media (max-width: 720px) {
  .quiz-result-grid { grid-template-columns: 1fr 1fr; }
}
.continue { margin-top: 8px; padding-inline: 18px; background: #315f43; }

@media (max-width: 760px) {
  .solver-status { flex-wrap: wrap; }
  .decision-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
}
