:root {
  color-scheme: light;
  --ink: #17365b;
  --muted: #617d9d;
  --blue: #1764df;
  --red: #df3e4d;
  --line: #d6e3f6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #edf4ff;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button,
a,
input,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 3px solid #3e82e9;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
.brand {
  font-family: Manrope, sans-serif;
}
.icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.page-shell {
  width: min(1480px, calc(100% - 64px));
  margin: auto;
}
.site-header {
  height: 84px;
  display: flex;
  align-items: center;
  background: #f8fbff;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  color: #163f7b;
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -1.5px;
  text-decoration: none;
}
.brand-dot {
  color: var(--red);
}
.brand-mark {
  width: 35px;
  height: 37px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-right: 11px;
  border-radius: 10px;
  background: var(--blue);
  transform: rotate(-7deg);
  box-shadow: 3px 3px 0 #ed5159;
}
.brand-mark > span {
  width: 6px;
  height: 13px;
  border-radius: 4px;
  background: white;
  position: relative;
}
.brand-mark > span:after {
  content: "";
  position: absolute;
  background: #20447b;
  width: 3px;
  height: 4px;
  left: 2px;
  top: 5px;
  border-radius: 50%;
}
.primary-button,
.secondary-button,
.pass-button,
.response-buttons button {
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.15s,
    transform 0.15s;
}
.primary-button {
  color: white;
  background: var(--blue);
  border: 1px solid #1056c9;
  box-shadow: 0 2px 0 #0c47ac;
}
.primary-button:hover:not(:disabled) {
  background: #1057c9;
}
.secondary-button {
  color: var(--blue);
  background: #eff5ff;
  border: 1px solid #bfd4f4;
}
.secondary-button:hover:not(:disabled) {
  background: #e1edff;
}
.pass-button {
  color: var(--muted);
  background: transparent;
  border: 0;
}
.pass-button:hover:not(:disabled) {
  color: var(--blue);
  background: #edf4ff;
}
.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffffb0;
  color: var(--ink);
  flex-shrink: 0;
}
.icon-button:hover:not(:disabled) {
  background: #e1ecfd;
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 26px;
  padding-top: 25px;
  align-items: start;
}
.board-section {
  min-width: 0;
}
.board-heading {
  margin-bottom: 15px;
  min-height: 46px;
}
.board-heading h1 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.6px;
}
.board-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.board-tools {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 12px;
  color: var(--muted);
}
.board-tools strong {
  color: var(--ink);
}
.board-view-toolbar {
  margin-bottom: 10px;
}
.tabletop-badge {
  color: #46658b;
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 600;
  gap: 7px;
}
.tabletop-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.blue-dot {
  background: var(--blue);
}
.red-dot {
  background: var(--red);
  margin-left: 12px;
}
.view-options {
  padding: 3px;
  border-color: #d1dff2;
  background: #dfeafb;
}
.view-option {
  color: #627e9f;
  font-size: 11px;
  padding: 5px 12px;
}
.view-option.is-active {
  background: white;
  color: var(--blue);
}
.board3d-shell {
  background: #dae8fc;
  border: 1px solid #c9daf1;
  border-radius: 20px;
  box-shadow:
    0 5px 0 #cedef4,
    0 12px 40px -25px #19497c60;
}
.board3d-viewport {
  height: clamp(570px, calc(100dvh - 205px), 850px);
}
.board3d-controls {
  background: #f5f9ffee;
  border-color: #c5d8f1;
}
.board3d-controls button {
  color: #3c6090;
}
.board3d-controls button:hover {
  background: #e1ecfd;
}
.board3d-hover {
  top: 18px;
  bottom: auto;
  left: 18px;
  z-index: 3;
  width: clamp(140px, 17vw, 204px);
  padding: 8px;
  background: #fff;
  color: #0b2547;
  border: 2px solid #075eff;
  border-radius: 12px;
  box-shadow: 0 6px 20px #153b6a30;
  pointer-events: none;
}
.board3d-hover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  background: #eef4ff;
  border-radius: 6px;
}
.board3d-hover-name {
  display: block;
  padding: 9px 4px 3px;
  text-align: center;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
}
.game-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 2px;
}
.turn-panel,
.identity-panel,
.history-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 3px 0 #dbe6f7;
}
.turn-panel {
  border-top: 4px solid var(--blue);
}
.panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 16px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #6480a0;
}
.turn-badge {
  color: var(--blue);
  background: #edf4ff;
  border-radius: 5px;
  font-size: 10px;
  padding: 4px 6px;
}
.turn-badge:empty {
  display: none;
}
#turn-content h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.35;
  margin-bottom: 15px;
  overflow-wrap: anywhere;
}
.turn-description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #526f91;
  margin-bottom: 8px;
}
#question-input {
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  border-color: #cbdaee;
  background: #f7faff;
}
#question-input::placeholder {
  color: #8095af;
}
.question-meta {
  justify-content: flex-end;
  color: #8a9db6;
  font-size: 10px;
  margin: 5px 0 12px;
}
#turn-actions {
  border-top: 1px solid #e2eaf6;
  margin-top: 16px;
  padding-top: 16px;
}
#pass-button {
  margin-top: 5px;
}
.invite-link-row {
  display: flex;
  gap: 7px;
}
.invite-link-row input {
  min-width: 0;
  width: 100%;
  border: 1px solid #d2dff0;
  border-radius: 8px;
  padding: 9px;
  font-size: 11px;
  color: #517398;
  background: #f7faff;
}
.identity-panel {
  padding: 17px 20px;
}
.identity-panel > .flex > .icon {
  width: 13px;
  height: 13px;
  color: #8ca3c0;
}
.identity-content {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 13px;
}
.secret-portrait {
  flex-shrink: 0;
  border-radius: 9px;
  width: 75px;
  height: 87px;
  padding: 0;
  overflow: hidden;
  background: #d9e9fd;
  color: #6b99cd;
  font-size: 38px;
}
.secret-portrait img {
  width: 100%;
  height: 100%;
}
.secret-portrait.has-character {
  border: 3px solid #3176d9;
  box-shadow: 0 2px 0 #1651a0;
}
.secret-portrait:not(:disabled):hover {
  box-shadow:
    0 2px 0 #1651a0,
    0 0 0 3px #bdd6fb;
}
#secret-name {
  font-size: 20px;
  font-weight: 800;
}
#secret-description {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.history-panel {
  padding: 15px 18px;
}
.history-panel summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.history-panel summary:after {
  content: "+";
  margin-left: auto;
  color: #7c96b6;
  font-size: 18px;
}
.history-panel[open] summary:after {
  content: "-";
}
.history-count {
  font-size: 10px;
  background: #eef4fc;
  color: #6688b0;
  padding: 1px 5px;
  border-radius: 4px;
}
.history-list {
  max-height: 260px;
  overflow: auto;
}
.history-entry {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid #e7edf5;
  margin-top: 12px;
}
.history-entry small {
  font-size: 10px;
  color: #7b93b0;
}
.history-entry p {
  font-size: 12px;
  margin-top: 4px;
  color: #416283;
  line-height: 1.5;
}
.answer-pill {
  margin-left: auto;
  border-radius: 4px;
  background: #edf4ff;
  color: #1764df;
  font-size: 8px;
  font-weight: 700;
  padding: 4px;
}
.answer-pill.false {
  background: #fff0f1;
  color: #cd3949;
}
.answer-pill.pending {
  background: #edf2f8;
  color: #768aa4;
}
.history-empty {
  padding-top: 14px;
  color: #8093ac;
  font-size: 12px;
}
.connection-label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: #8398b2;
  font-size: 10px;
  padding: 3px 6px;
  line-height: 1.5;
}
.connection-dot {
  width: 5px;
  height: 5px;
  margin-top: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #98b0d0;
}
.live .connection-dot {
  background: #2878e7;
}
.offline .connection-dot {
  background: #df3e4d;
}
#incoming-question,
.waiting-question {
  background: #f0f6ff;
  border: 1px solid #d7e5f8;
  border-radius: 10px;
  padding: 13px;
  color: #33587f;
  line-height: 1.7;
  font-size: 14px;
  margin: 0 0 15px;
  overflow-wrap: anywhere;
}
.response-buttons {
  gap: 9px;
}
.response-buttons button {
  font-size: 13px;
  border: 0;
  color: #fff;
}
.response-true {
  background: var(--blue);
}
.response-true:hover {
  background: #1353bf;
}
.response-false {
  background: var(--red);
}
.response-false:hover {
  background: #c83040;
}
.answer-box {
  background: #edf4ff;
  color: #1b5cb8;
  border-radius: 10px;
  padding: 14px;
}
.answer-box.false {
  background: #fff0f2;
  color: #b73646;
}
.answer-box strong {
  font-size: 17px;
}
.answer-box p {
  font-size: 12px;
  line-height: 1.5;
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.winner-art {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.winner-art img {
  width: 60px;
  height: 70px;
  border-radius: 8px;
}
.winner-art div {
  font-size: 11px;
  color: var(--muted);
}
.winner-art strong {
  display: block;
  font-size: 19px;
  color: var(--ink);
  margin-top: 3px;
}
.site-footer {
  padding: 22px 0;
  color: #91a4bd;
  font-size: 10px;
  text-align: center;
}
.site-footer a {
  color: #7291b7;
  margin-left: 4px;
}
.modal {
  padding: 32px;
  width: 410px;
  max-width: calc(100% - 28px);
  border: 1px solid #c7dbf6;
  border-radius: 18px;
  box-shadow: 0 20px 90px #102f6160;
  background: #fff;
  color: var(--ink);
  overflow-y: auto;
  max-height: 90dvh;
}
.modal::backdrop {
  background: #142d5266;
  backdrop-filter: blur(5px);
}
.modal-close {
  position: absolute;
  top: 13px;
  right: 13px;
  border: 0;
  background: #f0f5fd;
}
.modal h2 {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 14px 0 14px;
}
.modal > p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 22px;
}
#setup-form input {
  width: 100%;
  border: 1px solid #c9daf1;
  border-radius: 9px;
  padding: 13px;
  background: #f7faff;
}
#setup-form {
  margin-top: 20px;
}
.form-error {
  font-size: 12px;
  color: #c53443;
  line-height: 1.5;
  margin: 10px 0;
}
.help-steps {
  padding-left: 20px;
  margin: 20px 0;
  font-size: 13px;
  color: #4f6f95;
}
.help-steps li {
  line-height: 1.7;
  margin-bottom: 14px;
  padding-left: 6px;
}
.guess-modal {
  text-align: center;
}
.guess-preview-image {
  margin: 6px auto 16px;
  border-color: #397bdd;
  box-shadow: 0 3px 0 #1f529c;
  border-radius: 10px;
}
.guess-preview-name {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 18px;
}
.portrait-modal {
  width: 520px;
  text-align: center;
}
.portrait-modal > img {
  background: #f1f6ff;
}
.toast {
  position: fixed;
  z-index: 100;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 28px);
  width: max-content;
  padding: 13px 20px;
  border-radius: 11px;
  color: #fff;
  background: #154b97;
  box-shadow: 0 4px 24px #17427840;
  font-size: 13px;
  text-align: center;
}
.noscript {
  padding: 20px;
  text-align: center;
  background: #ffecef;
}
.guess-mode-notice {
  color: var(--red) !important;
}
/* The same controls remain available if WebGL is unavailable. */
.character-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.character-card {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  width: 100%;
}
.card-base {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.portrait-wrap {
  display: block;
  height: calc(100% - 32px);
  background: #f6faff;
}
.character-name {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 4px 2px;
  background: #fff;
  color: #0b2547;
  font-size: clamp(11px, 1.1vw, 16px);
  font-weight: 800;
}
.character-card:hover .card-front,
.character-card:focus-visible .card-front {
  border-color: #1564eb;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 5px #075eff,
    0 8px 12px #092d4c66;
}
.character-card:focus-visible {
  outline-color: #075eff;
}
.card-front,
.card-reverse {
  border-color: #87b6ff;
  border-top-color: #b5d2ff;
  border-bottom-color: #397bdc;
  background: #f6faff;
  box-shadow:
    2px 3px 0 #2866be,
    0 7px 8px #092d4c55;
}
.card-reverse {
  background: #4c8be8;
  color: #bed8ff;
}
.card-reverse > span {
  text-shadow: 0 1px #2561b6;
}
.card-hinge {
  background: linear-gradient(#2d63ae, #bbd6ff 34%, #72a5ef 52%, #28589f);
  border-color: #2b5d9f;
}
.card-hinge i {
  background: #4178c8;
  box-shadow: 1px 0 #b2d0ff;
}
.board-front-rail {
  justify-content: center;
}
.board-wordmark {
  font-size: 25px;
}
.board-wordmark span {
  color: #d3e6ff;
}
.opponent-flat {
  display: block;
  max-width: 440px;
  margin: 0 auto 20px;
  padding: 14px 22px;
  background: #d94352;
  border: 3px solid #ed6d75;
  border-bottom: 8px solid #af293c;
  border-radius: 16px;
  color: #ffe4e8;
}
.opponent-flat > span {
  display: block;
  font-size: 10px;
  margin-bottom: 10px;
}
.opponent-slots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  transform: rotate(180deg);
}
.opponent-slots > span {
  height: 26px;
  border: 2px solid #fb959d;
  background: #f3c0c5;
  border-radius: 3px;
  box-shadow: 0 3px 0 #a82a39;
  transition:
    transform 0.4s,
    background 0.4s;
}
.opponent-slots > .is-down {
  transform: scaleY(0.25);
  background: #94283a;
  border-color: #9d2d40;
}
body[data-board-view="3d"] .opponent-flat {
  display: none;
}
@media (max-width: 1150px) {
  .page-shell {
    width: calc(100% - 40px);
  }
  .game-layout {
    grid-template-columns: minmax(0, 1fr) 255px;
    gap: 18px;
  }
  .turn-panel,
  .identity-panel {
    padding: 17px;
  }
  .board3d-viewport {
    height: 650px;
  }
}
@media (max-width: 850px) {
  .game-layout {
    grid-template-columns: 1fr;
  }
  .game-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .turn-panel {
    grid-row: span 3;
  }
  .board3d-viewport {
    height: 640px;
  }
  .history-panel,
  .connection-label {
    grid-column: 2;
  }
}
@media (max-width: 540px) {
  .page-shell {
    width: calc(100% - 28px);
  }
  .site-header {
    height: 72px;
  }
  .brand {
    font-size: 25px;
  }
  .brand-mark {
    width: 29px;
    height: 31px;
    border-radius: 8px;
    margin-right: 9px;
  }
  .header-actions {
    gap: 8px;
  }
  .header-actions .primary-button {
    padding: 9px 11px;
    font-size: 11px;
    min-height: 38px;
  }
  .header-actions .primary-button .icon {
    display: none;
  }
  .game-layout {
    padding-top: 19px;
  }
  .board-heading h1 {
    font-size: 19px;
  }
  .board-heading p {
    font-size: 10px;
  }
  .board-tools {
    gap: 7px;
    font-size: 10px;
  }
  .board3d-viewport {
    height: 530px;
  }
  .board3d-controls {
    top: 10px;
    right: 10px;
  }
  .board3d-controls button {
    width: 30px;
    height: 30px;
  }
  .tabletop-badge {
    font-size: 11px;
  }
  .board3d-hover {
    width: 128px;
    padding: 6px;
    left: 12px;
    top: 12px;
    bottom: auto;
  }
  .board3d-hover-name {
    font-size: 15px;
    padding-top: 7px;
  }
  .game-sidebar {
    gap: 12px;
    grid-template-columns: 1fr;
  }
  .turn-panel {
    grid-row: auto;
  }
  .history-panel,
  .connection-label {
    grid-column: auto;
  }
  .identity-content {
    margin-top: 10px;
  }
  .character-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .secret-portrait {
    width: 65px;
    height: 75px;
  }
  .modal {
    padding: 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

.tabletop-badge > span {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
}

/* Pack selection stays in the new-game flow; a small badge identifies the live set. */
.board-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pack-badge {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid #cbdcf6;
  border-radius: 6px;
  color: #4471a8;
  background: #f7faff;
  font-size: 10px;
  font-weight: 700;
}
.setup-modal {
  width: 600px;
}
.setup-modal.is-joining {
  width: 410px;
}
.pack-picker {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
  min-width: 0;
}
.pack-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.pack-option {
  position: relative;
  display: block;
  cursor: pointer;
  min-width: 0;
}
#setup-form .pack-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  opacity: 0;
}
.pack-option-content {
  display: block;
  padding: 12px;
  border: 2px solid #d7e3f5;
  border-radius: 12px;
  background: #f8fbff;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.pack-option:hover .pack-option-content {
  border-color: #90b4e9;
}
.pack-option input:checked + .pack-option-content {
  border-color: var(--blue);
  background: #edf4ff;
  box-shadow: 0 0 0 1px var(--blue);
}
.pack-option input:focus-visible + .pack-option-content {
  outline: 3px solid #77a7ee;
  outline-offset: 4px;
}
.pack-art {
  display: flex;
  gap: 5px;
  height: 78px;
  overflow: hidden;
  margin-bottom: 10px;
}
.pack-art img {
  min-width: 0;
  flex: 1;
  width: 33%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  border: 2px solid white;
  border-radius: 6px;
  background: white;
}
.pack-option input[value="cartoons"] + span .pack-art img {
  object-fit: contain;
}
.pack-option-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 14px;
}
.pack-selected {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1px solid #c4d6ee;
  background: white;
  color: transparent;
  flex-shrink: 0;
}
.pack-selected .icon {
  width: 13px;
  height: 13px;
}
.pack-option input:checked + span .pack-selected {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
.pack-description {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.pack-count {
  display: block;
  margin-top: 7px;
  font-size: 10px;
  color: #5375a1;
  font-weight: 700;
}
.join-pack {
  padding: 13px 15px;
  margin-bottom: 18px;
  background: #edf4ff;
  border: 1px solid #cbdcf6;
  border-radius: 10px;
}
.join-pack strong {
  display: block;
  margin-top: 5px;
}
img[data-fit="contain"] {
  object-fit: contain;
  object-position: center;
  background: #f7faff;
}
.character-name {
  line-height: 1.1;
  white-space: normal;
  overflow-wrap: normal;
}
.credits-page {
  max-width: 960px;
  padding: 30px 0;
}
.credits-page h1 {
  font-size: 28px;
  margin: 25px 0 12px;
}
.credits-page h2 {
  margin: 28px 0 14px;
  font-size: 20px;
}
.credits-page p {
  color: var(--muted);
  line-height: 1.7;
}
.credits-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.credit-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 11px;
  min-width: 0;
}
.credit-card img {
  width: 48px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
}
.credit-card strong {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}
.credit-card a {
  color: var(--blue);
}
.credit-card p {
  font-size: 10px;
  overflow-wrap: anywhere;
}
@media (max-width: 540px) {
  .pack-options {
    gap: 9px;
  }
  .pack-option-content {
    padding: 9px;
  }
  .pack-art {
    height: 58px;
    gap: 3px;
  }
  .pack-option-heading {
    font-size: 12px;
  }
  .pack-description {
    font-size: 10px;
    min-height: 28px;
  }
  .pack-badge {
    font-size: 9px;
    padding: 3px 6px;
  }
  .board-title-row {
    gap: 6px;
  }
  .credits-list {
    grid-template-columns: 1fr;
  }
}

.secret-options {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.secret-options button {border:2px solid #cbdcf6;border-radius:8px;padding:5px;color:#17365b}.secret-options button:hover,.secret-options button:focus-visible {border-color:#1764df}.secret-options img {width:100%;height:85px;object-fit:contain}.secret-options span {display:block;font-size:12px}

/* Two equal primary answers, with a full-width not-applicable option. */
.response-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.response-buttons button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 10px;
  font-size: 14px;
  line-height: 1.25;
  gap: 7px;
}
.response-buttons .response-none {
  grid-column: 1 / -1;
  background: #526783;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}
.response-none small {
  font-size: 12px;
  font-weight: 400;
}
.response-buttons .response-none:hover:not(:disabled) { background: #40536e; }
.answer-box.not-applicable,.answer-pill.not-applicable {background:#edf1f6;color:#526783}

/* Flat cards turn over in place; the WebGL board keeps its hinged motion. */
.board-tray .card-leaf {
  transform-origin: center;
  transform: rotateY(0deg);
  transition: transform 480ms cubic-bezier(.2,.7,.2,1);
}
.board-tray .character-card:hover:not(.is-down) .card-leaf { transform: rotateY(0deg); }
.board-tray .character-card.is-down .card-leaf,
.board-tray .character-card.is-down:hover .card-leaf { transform: rotateY(180deg); }
.board-tray .card-hinge, .board-tray .card-base { display: none; }
.board-tray .card-reverse { transform: rotateY(180deg) translateZ(1px); }
.board-tray .card-reverse > span { font-size: clamp(32px, 5vw, 65px); }
.board-tray .character-card:hover .card-reverse,
.board-tray .character-card:focus-visible .card-reverse {
  border-color: #1564eb;
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px #075eff;
}
@media(prefers-reduced-motion:reduce) { .board-tray .card-leaf { transition: none; } }
