.gp-page {
  --gp-paper: #f8edda;
  --gp-ink: #24233a;
  --gp-edge: #b2a3f035;
  width: min(1360px, calc(100% - 24px));
  margin: 24px auto;
}
.gp-heading, .gp-toolbar, .gp-turn-top, .gp-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.gp-heading { margin-bottom: 18px; }
.gp-heading .eyebrow { color: #9ce6dc; margin-bottom: 4px; }
.gp-heading h1, .gp-panel h2 { margin: 0; }
.gp-heading h1 { font-size: clamp(32px, 5vw, 58px); letter-spacing: -.045em; }
.gp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.gp-panel {
  background: #19182b;
  border: 1px solid var(--gp-edge);
  border-radius: 18px;
  padding: 16px;
  min-width: 0;
}
.gp-table {
  background: radial-gradient(ellipse at top left, #37405d, transparent 68%), linear-gradient(145deg,#262741,#1c2033);
  box-shadow: 0 14px 44px #07091455, inset 0 1px #ffffff12;
}
.gp-seats {
  display: grid;
  grid-template-columns: repeat(var(--seats), minmax(0,1fr));
  gap: 8px;
  padding: 0;
  margin: 0 0 14px;
  list-style: none;
}
.gp-seat {
  --seat: #8de1e6;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #ffffff19;
  border-radius: 13px;
  background: #191a2c;
}
.gp-seat[data-seat="1"] { --seat: #f3bd93; }
.gp-seat[data-seat="2"] { --seat: #c4aff9; }
.gp-seat[data-seat="3"] { --seat: #b6e69d; }
.gp-seat.is-active { border-color: var(--seat); box-shadow: inset 0 0 24px color-mix(in srgb, var(--seat) 15%, transparent); }
.gp-seat.is-answering { border-color: #f0ca88; box-shadow: inset 0 0 24px #e9a84b22; }
.gp-seat-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: none;
  border-radius: 9px;
  background: color-mix(in srgb, var(--seat) 15%, transparent);
  color: var(--seat);
  font-size: 12px;
  font-weight: 800;
}
.gp-seat-copy { display: grid; gap: 1px; min-width: 0; flex: 1; }
.gp-seat-copy strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-seat-copy small { color: #acc8e4; font-size: 10px; }
.gp-seat-target { color: #c5c4dd; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-seat-status { font-size: 10px; font-weight: 700; color: var(--seat); max-width: 9ch; line-height: 1.2; }
.gp-seat.is-answering .gp-seat-status { color: #f0ca88; }
.gp-toolbar h2, .gp-side h2 { font-size: clamp(14px, 2vw, 20px); }
.gp-count, .gp-help, .gp-history p { color: #c8c5dc; font-size: 13px; }
.gp-count { margin-top: 5px; }
.gp-candidates, .gp-timer-meter { overflow: hidden; border-radius: 12px; background: #0d102a; height: 4px; }
.gp-candidates { width: min(150px, 100%); margin-top: 5px; }
.gp-timer-meter { margin: 9px 0 0; }
.gp-candidates i, .gp-timer-meter i { display: block; height: 100%; transform-origin: left; border-radius: inherit; background: linear-gradient(90deg,#63d8dc,#b3adff); }
.gp-candidates i { transition: transform .26s ease; }
.gp-timer-meter i { transition: transform .26s linear; }
.gp-time-low .gp-timer-meter i { background: #ff917e; }
.gp-time-low [data-board-timer] { color: #ffb1a1; }
.gp-toggle { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; }
.gp-toggle input { width: 18px; height: 18px; accent-color: #d5bdff; flex: none; }
.gp-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.gp-grid-large { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.gp-card { position: relative; min-width: 0; perspective: 600px; }
.gp-face {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  display: grid;
  color: var(--gp-ink);
  background: transparent;
  border: 0;
  border-radius: 9px;
  box-shadow: none;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform .34s cubic-bezier(.24,.72,.27,1);
}
.gp-face:focus-visible, .gp-zoom:focus-visible, .gp-info:focus-visible { outline: 2px solid #b5f5ea; outline-offset: 2px; }
@media (hover:hover) {
  .gp-card:hover { z-index: 1; }
  .gp-face:hover { transform: translateY(-3px); }
  .gp-face.gp-flipped:hover { transform: translateY(-2px) rotateX(180deg); }
  .gp-card-front:hover { border-color: #fff6e9; }
}
.gp-card-front, .gp-card-back { grid-area: 1 / 1; border-radius: 9px; backface-visibility: hidden; }
.gp-card-front, .gp-card-back {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 3px solid var(--gp-paper);
  background: var(--gp-paper);
  gap: 3px;
  box-shadow: 0 3px 0 #afa38f;
}
.gp-face img {
  width: 100%;
  aspect-ratio: 1.06;
  object-fit: contain;
  background: #363347;
  border-radius: 6px;
}
.gp-face strong { font-size: clamp(10px, 1.2vw, 15px); line-height: 1.16; overflow-wrap: anywhere; }
.gp-face small { font-size: 10px; color: #514861; margin: auto 0 1px; line-height: 1.1; }
.gp-card-back {
  transform: rotateX(180deg);
  background: #777681;
  border-color: #777681;
  color: #fff;
  box-shadow: 0 3px 0 #565561;
}
.gp-card-back img { filter: grayscale(1) brightness(.68); }
.gp-card-back small { color: #fff; }
.gp-face.gp-flipped { transform: rotateX(180deg); }
.gp-card:has(.gp-flipped) .gp-zoom { display: none; }
.gp-guessing .gp-face:not(.gp-flipped) { outline: 2px solid #ffe090; }
.gp-zoom, .gp-info {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 25px;
  min-height: 25px;
  padding: 1px 4px;
  border-radius: 5px;
  background: #171426e8;
  color: #fff;
  font-size: 14px;
  border: 1px solid #fff5;
}
.gp-info {
  left: 4px;
  right: auto;
  border-radius: 50%;
  width: 25px;
  font: 700 14px/1 Georgia, serif;
  z-index: 2;
}
.gp-reveal article { position: relative; }
.gp-secret-card { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.gp-secret .gp-info { position: static; display: grid; place-items: center; padding: 0; }
.gp-side { display: grid; gap: 12px; }
.gp-turn-top strong { color: #ffe09a; font-variant-numeric: tabular-nums; }
.gp-turn-mine { border-color: #81dbd78a; box-shadow: inset 0 1px #81dbd729; }
.gp-turn .gp-question-pair { color: #a1dedc; margin: 10px 0 0; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.gp-event { margin-top: 10px; padding: 8px 10px; background: #30304d; border-radius: 9px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.gp-event-pair { color: #b8b9d5; font-size: 11px; margin-bottom: 3px; }
.gp-answer-chip { display: inline-block; padding: 1px 6px; border-radius: 5px; color: #ffe4b0; background: #5b473b; white-space: nowrap; }
.gp-answer-chip[data-answer="Tak"], [data-gp-answer="Tak"] { color: #aeefbf; }
.gp-answer-chip[data-answer="Nie"], [data-gp-answer="Nie"] { color: #ffb8b7; }
.gp-answer-chip[data-answer="Tak"] { background: #285241; }
.gp-answer-chip[data-answer="Nie"] { background: #623e4e; }
.gp-turn form { display: grid; gap: 9px; margin-top: 12px; }
.gp-turn textarea { width: 100%; min-height: 72px; resize: vertical; box-sizing: border-box; font-size: 16px; }
.gp-prompts, .gp-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
.gp-prompts button { padding: 6px 8px; min-height: 30px; font-size: 11px; line-height: 1.2; }
.gp-turn blockquote { margin: 12px 0; padding: 9px 12px; border-left: 3px solid #cbb1ff; overflow-wrap: anywhere; }
.gp-secret button { margin-top: 9px; display: flex; align-items: center; gap: 10px; text-align: left; }
.gp-secret img { width: 58px; height: 65px; object-fit: contain; background: #353148; border-radius: 6px; }
.gp-history { max-height: 280px; overflow: auto; }
.gp-history summary { cursor: pointer; font-weight: 700; }
.gp-history p { overflow-wrap: anywhere; }
.gp-history strong { color: #f3d799; }
.gp-dialog {
  color: #fcf6e9;
  background: #211c32;
  border: 1px solid #b4a3e4;
  border-radius: 18px;
  width: min(440px, calc(100% - 28px));
  max-height: calc(100dvh - 24px);
  text-align: center;
  overflow: auto;
}
.gp-dialog::backdrop { background: #080715c9; }
.gp-dialog[open], .gp-arrive { animation: gp-arrive .27s ease-out both; }
.gp-deal > article { animation: gp-deal .36s cubic-bezier(.22,.76,.27,1) both; animation-delay: calc(min(var(--i),16) * 18ms); }
@keyframes gp-arrive { from { opacity: .45; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes gp-deal { from { opacity: .12; transform: translateY(12px) rotate(-2deg) scale(.95); } to { opacity: 1; transform: none; } }
.gp-dialog form { text-align: right; }
.gp-dialog img { display: block; width: 100%; max-height: 55dvh; object-fit: contain; margin-top: 9px; }
.gp-dialog p { font-size: 12px; }
.gp-dialog a { color: #e0caff; }
.gp-dialog-info .gp-bio { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 13px; align-items: start; text-align: left; margin-top: 9px; }
.gp-dialog-info .gp-bio img { width: 70px; height: 90px; margin: 0; border-radius: 6px; background: #302a44; }
.gp-dialog-info .gp-bio h2 { margin: 0; font-size: 19px; }
.gp-dialog-info .gp-bio p { margin: 5px 0 0; font-size: 15px; line-height: 1.5; color: #ece4f4; }
.gp-dialog-info .gp-photo-credit { color: #c8bdd9; margin: 13px 0 0; }
.gp-result { text-align: center; }
.gp-trophy { font-size: 43px; color: #ffdf94; line-height: 1; text-shadow: 0 0 22px #f3c26570; }
.gp-reveal .gp-solved-card { outline: 2px solid #f2ce84; outline-offset: -2px; }
.gp-solved-card > b { color: #f6d38b; font-size: 12px; }
.gp-result .gp-actions { justify-content: center; margin-top: 18px; }
.gp-reveal { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.gp-reveal article { display: grid; gap: 5px; width: min(165px, 43%); padding: 8px; background: #2a263c; border-radius: 10px; }
.gp-reveal img { width: 100%; height: 150px; object-fit: contain; background: #181626; border-radius: 6px; }
.gp-reveal span { color: #c8c5dc; font-size: 12px; }
.gp-reveal details { font-size: 11px; color: #d2c8ec; overflow-wrap: anywhere; }
.game-visual-board-guess-people { background: radial-gradient(circle at 25% 20%, #b28be9, transparent 65%), linear-gradient(135deg,#423065,#235969); }
@media (max-width: 900px) {
  .gp-layout { grid-template-columns: minmax(0, 1fr); }
  .gp-side { grid-row: 1; grid-template-columns: 1.4fr 1fr; align-items: start; }
  .gp-history { grid-column: 1 / -1; max-height: 140px; }
}
@media (max-width: 580px) {
  .gp-page { margin-top: 12px; }
  .gp-panel { padding: 10px; }
  .gp-grid, .gp-grid-large { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .gp-face small { font-size: 8px; }
  .gp-card-front, .gp-card-back { border-width: 2px; }
  .gp-side { grid-template-columns: minmax(0, 1fr) 110px; gap: 6px; }
  .gp-secret button { display: grid; justify-items: center; padding: 5px; font-size: 11px; }
  .gp-toolbar { align-items: start; }
  .gp-toggle { font-size: 11px; }
  .gp-help { font-size: 11px; }
  .gp-seats { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 5px; }
  .gp-seat { gap: 5px; padding: 5px; }
  .gp-seat-icon { width: 20px; height: 23px; border-radius: 6px; font-size: 10px; }
  .gp-seat-copy strong { font-size: 11px; }
  .gp-seat-target, .gp-seat-status { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .gp-page *, .gp-page *::before, .gp-page *::after { animation: none !important; transition: none !important; }
}
