@font-face {
  font-family: Bricolage;
  src: url(fonts/bricolage-display.woff2) format('woff2');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: DM;
  src: url(fonts/dm-sans.woff2) format('woff2');
  font-weight: 100 1000;
  font-display: swap;
}
:root {
  --ink: #2a202c;
  --paper: #fff4d9;
  --gold: #ffc45b;
  --plum: #39293e;
  --mint: #accbbb;
  --orchid: #ccb0ce;
  --edge: 3px solid var(--ink);
  --display: Bricolage, 'Arial Black', system-ui, sans-serif;
  color-scheme: light;
  --shadow: 0 4px 0 var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  color: var(--paper);
  font:
    550 16px/1.45 DM,
    system-ui,
    sans-serif;
  background: #342639;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 74% 45%, #755264 0, transparent 57%),
    repeating-linear-gradient(
      116deg,
      transparent 0 15%,
      #ffffff03 15.1% 20%,
      transparent 20.1% 31%
    ),
    radial-gradient(#211b29 1px, transparent 1.2px) 0 0/6px 6px,
    #3d2d42;
}
button,
select,
input {
  font: inherit;
  color: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.53;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #e27646;
  outline-offset: 4px;
}
button,
select,
input {
  max-width: 100%;
}
svg {
  flex-shrink: 0;
}
button svg {
  pointer-events: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
strong,
button,
.brand,
legend {
  font-family: var(--display);
  font-weight: 800;
}
button:active:not(:disabled),
.brand:active {
  translate: 0 2px;
}
.bar {
  max-width: 1480px;
  margin: auto;
  padding: clamp(14px, 3vh, 32px) clamp(20px, 4.2vw, 74px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand,
.tool,
.btn,
.mode-link,
.langs button {
  border: var(--edge);
  border-radius: 10px;
  box-shadow: var(--shadow);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  font-size: 20px;
  letter-spacing: -0.65px;
  transform: rotate(-2deg);
  white-space: nowrap;
}
.brand img {
  object-fit: contain;
}
#tools {
  display: flex;
  align-items: center;
  gap: 9px;
}
.tool {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-width: 46px;
  height: 43px;
  padding: 5px 10px;
  font-size: 15px;
}
.tool svg {
  width: 20px;
  height: 20px;
}
#game {
  width: 100%;
}
.loading {
  text-align: center;
  padding: 20vh 1rem;
  font: 800 2rem var(--display);
}
.poster {
  width: min(100%, 1500px);
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.13fr);
  align-items: center;
  gap: 3.6%;
  min-height: clamp(475px, calc(100svh - 255px), 780px);
  padding: 30px clamp(26px, 5.8vw, 92px) 44px;
}
.pitch {
  position: relative;
  z-index: 1;
}
.wordmark {
  display: inline-block;
  transform: rotate(-4deg);
  transform-origin: 35% 50%;
  font-size: clamp(63px, 6.8vw, 105px);
  line-height: 0.95;
  letter-spacing: -0.065em;
  -webkit-text-stroke: 0.071em var(--ink);
  paint-order: stroke fill;
  text-shadow:
    0.019em 0.035em 0 var(--ink),
    0.035em 0.075em 0 var(--ink),
    0.045em 0.105em 0 #b56b4e;
}
.wordmark span {
  display: block;
}
.wordmark span:last-child {
  font-size: 1.22em;
  color: var(--gold);
}
.wordmark i {
  font-style: normal;
  color: #f49a80;
}
.hook {
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.42;
  font-weight: 600;
  max-width: 34ch;
  margin-top: clamp(23px, 3.8vh, 38px);
  color: #f9ebd9;
}
.facts {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 750;
  font-size: 14px;
  color: #ddc5d8;
  margin: 15px 0 24px;
}
.facts b {
  font-size: 10px;
  opacity: 0.6;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 47px;
  padding: 9px 15px;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
}
.btn.primary {
  background: var(--gold);
}
.hero-buttons .btn {
  min-height: 54px;
  font-size: clamp(16px, 1.36vw, 21px);
  padding: 10px clamp(12px, 1.25vw, 22px);
}
@media (hover: hover) {
  .btn:hover:not(:disabled),
  .tool:hover,
  .mode-link:hover,
  .brand:hover,
  .langs button:hover {
    filter: brightness(1.055);
    transform: translateY(-2px);
  }
}
.photo {
  position: relative;
  margin: 0;
  transform: rotate(3deg);
  padding: clamp(6px, 1vw, 13px) clamp(6px, 1vw, 13px) clamp(11px, 1.5vw, 22px);
  border: 3px solid var(--ink);
  background: #f2e5c4;
  box-shadow: 6px 9px 0 #281d2dcc;
}
.photo::before,
.photo::after {
  content: '';
  position: absolute;
  top: -13px;
  left: 8%;
  width: 20%;
  height: clamp(21px, 3vw, 42px);
  background: repeating-linear-gradient(
    88deg,
    #ffe5a8b8 0 3px,
    #e3ba779e 3px 4px
  );
  transform: rotate(-13deg);
  clip-path: polygon(
    0 0,
    100% 0,
    99% 13%,
    100% 29%,
    98% 38%,
    100% 52%,
    98% 70%,
    100% 92%,
    99% 100%,
    0 100%,
    1% 78%,
    0 62%,
    2% 47%,
    0 36%,
    1% 17%
  );
  z-index: 1;
}
.photo::after {
  left: auto;
  right: 0;
  top: auto;
  bottom: -5px;
  transform: rotate(-25deg);
  width: 15%;
  height: 25px;
}
.photo img {
  width: 100%;
  height: auto;
  display: block;
  border: 2px solid #3f383a;
}
.shelf {
  color: var(--ink);
  background: #f4e7cc;
  border-top: 5px solid var(--ink);
  box-shadow: 0 -4px 0 #b193a0;
  position: relative;
}
.shelf-inner {
  width: min(100%, 1500px);
  margin: auto;
  padding: 23px clamp(26px, 5.8vw, 92px) 28px;
  display: grid;
  gap: 22px;
  align-items: center;
  grid-template-columns: 0.62fr 3fr;
}
.shelf h2 {
  font-size: clamp(23px, 2.1vw, 34px);
  letter-spacing: -1.4px;
  line-height: 1;
}
.mode-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}
.mode-link {
  background: #fff5de;
  border-width: 2px;
  border-radius: 8px;
  display: flex;
  padding: 10px 12px;
  align-items: center;
  text-align: start;
  gap: 9px;
  min-height: 70px;
  color: var(--ink);
}
.mode-art {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.mode-link span {
  min-width: 0;
  flex: 1;
}
.mode-link strong {
  display: block;
  font-size: 18px;
  letter-spacing: -0.5px;
}
.mode-link small {
  display: block;
  font:
    600 12px/1.3 DM,
    sans-serif;
  color: #55454b;
}
.mode-link > .next {
  font-size: 21px;
}
dialog {
  border: var(--edge);
  border-radius: 17px;
  background: var(--paper);
  color: var(--ink);
  width: min(520px, calc(100% - 26px));
  max-height: min(91dvh, 830px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0;
  box-shadow: 7px 8px 0 #211a26;
  scrollbar-width: thin;
}
dialog::backdrop {
  background: #221927b8;
}
body:has(dialog[open]) {
  overflow: hidden;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.sheet-head h2,
.room h1 {
  font-size: clamp(28px, 3.2vw, 44px);
  letter-spacing: -1.8px;
  line-height: 1.03;
}
.sheet-head .tool {
  width: 37px;
  min-width: 37px;
  height: 37px;
  padding: 0;
  box-shadow: none;
}
.sheet-body {
  padding: clamp(19px, 3vw, 31px);
}
.sheet-body > .actions,
.form-actions {
  margin-top: 20px;
}
.sheet-body p {
  color: #584750;
}
.rules {
  list-style: none;
  counter-reset: steps;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
}
.rules li {
  counter-increment: steps;
  display: grid;
  grid-template-columns: 33px 1fr;
  column-gap: 12px;
}
.rules li:before {
  content: counter(steps);
  border: 2px solid var(--ink);
  background: var(--gold);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font: 800 17px var(--display);
}
.rules h3 {
  font-size: 19px;
}
.rules p {
  grid-column: 2;
  font-size: 15px;
}
form {
  display: grid;
  gap: 13px;
}
.field {
  display: grid;
  gap: 5px;
}
.field > span,
fieldset legend {
  font: 800 16px var(--display);
}
input,
select {
  width: 100%;
  background: #fffcf1;
  border: 2px solid #77686a;
  padding: 10px 12px;
  border-radius: 7px;
  min-height: 44px;
  color: var(--ink);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-actions {
  margin-top: 5px;
}
.form-actions .btn {
  width: 100%;
}
.muted {
  color: #685860;
  font-size: 14px;
}
.choice {
  border: none;
  padding: 0;
  margin: 0;
}
.choice > div {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}
.choice label {
  flex: 1;
  position: relative;
}
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  min-height: 0;
}
.choice span {
  display: flex;
  text-align: center;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 45px;
  border: 2px solid #97878a;
  border-radius: 7px;
  cursor: pointer;
  font: 800 15px var(--display);
}
.choice input:checked + span {
  background: #ffd58b;
  border-color: var(--ink);
}
.choice input:focus-visible + span {
  outline: 3px solid #ce5734;
  outline-offset: 2px;
}
.langs {
  display: grid;
  gap: 8px;
}
.langs button {
  padding: 10px 14px;
  text-align: start;
  font-size: 17px;
}
.langs button[aria-pressed='true'] {
  background: var(--gold);
}
#scan-video {
  display: block;
  width: 100%;
  max-height: 42vh;
  background: var(--ink);
  border-radius: 8px;
}
.notice {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  max-width: min(480px, 90%);
  background: var(--ink);
  color: white;
  border-radius: 8px;
  padding: 10px 17px;
  text-align: center;
  font-weight: 650;
  pointer-events: none;
}
.notice:empty,
.form-error:empty,
.room-alert:empty {
  display: none;
}
.form-error,
.room-alert {
  color: #85282e !important;
  background: #faddc6;
  border-radius: 6px;
  padding: 9px 12px;
  font-weight: 650;
}
.room {
  background: var(--paper);
  border: var(--edge);
  box-shadow: 6px 8px 0 #211a26;
  border-radius: 16px;
  color: var(--ink);
  width: min(750px, calc(100% - 32px));
  margin: clamp(14px, 4vh, 55px) auto 32px;
  overflow: hidden;
}
.room-head {
  background: #b7ccba;
  border-bottom: var(--edge);
  padding: 18px clamp(17px, 4vw, 32px);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.room-head small {
  font-weight: 750;
}
.room-body {
  padding: clamp(17px, 3.2vw, 32px);
  display: grid;
  gap: 21px;
}
.room h2 {
  font-size: 23px;
  letter-spacing: -0.8px;
}
.room .actions {
  align-items: center;
}
.invitation {
  display: flex;
  align-items: center;
  gap: clamp(14px, 4vw, 28px);
  border-bottom: 2px dashed #bfae99;
  padding-bottom: 19px;
}
.qr-box {
  flex: none;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 9px;
  padding: 4px;
  line-height: 0;
  color: #241d25;
}
.qr-box svg {
  width: 119px;
  height: 119px;
}
.invitation h2 {
  font:
    750 15px DM,
    sans-serif;
}
.code {
  font: 800 clamp(32px, 6vw, 55px) / 1.12 var(--display);
  letter-spacing: 0.07em;
  display: block;
}
.invitation p {
  font-size: 14px;
  margin: 2px 0 9px;
}
.mini {
  font-size: 14px;
  min-height: 37px;
  padding: 6px 10px;
  box-shadow: 0 2px var(--ink);
  border-width: 2px;
}
.roster,
.ranks {
  list-style: none;
  padding: 0;
  margin: 9px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.roster li,
.ranks li,
.vote-btn {
  background: #f2e4c9;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.player-name {
  overflow-wrap: anywhere;
  font-weight: 800;
  flex: 1;
  font-family: DM, sans-serif;
}
.sub {
  display: block;
  font-size: 12px;
  color: #634f52;
}
.avatar {
  display: inline-grid;
  place-content: center;
  border-radius: 44% 56% 50% 45%;
  border: 2px solid #4c383b;
  background: #e8b568;
  color: #4b3234;
  height: 33px;
  width: 29px;
  flex: none;
  font: 800 15px var(--display);
  transform: rotate(-5deg);
}
.avatar.c1 {
  background: #bcd39f;
}
.avatar.c2 {
  background: #d9b6cd;
}
.avatar.c3 {
  background: #edb695;
}
.avatar.c4 {
  background: #a8cbbc;
}
.room-foot {
  border-top: 2px dashed #bbac97;
  padding-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.quiet {
  border: none;
  background: none;
  color: #5b4851;
  text-decoration: underline;
  font:
    650 14px DM,
    sans-serif;
  padding: 8px 0;
}
.clock {
  font: 800 19px var(--display);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.secret {
  text-align: center;
  background: #ebd9bd;
  border: 2px solid var(--ink);
  border-radius: 13px;
  padding: clamp(20px, 4vw, 38px) 14px;
  display: grid;
  justify-items: center;
  gap: 11px;
}
.secret.covered {
  background: repeating-linear-gradient(
    130deg,
    #514153 0 12px,
    #544455 12px 24px
  );
  color: var(--paper);
}
.secret.covered > svg {
  color: var(--gold);
}
.clue-word {
  font: 800 clamp(30px, 5vw, 51px) / 1.04 var(--display);
  letter-spacing: -1.3px;
  overflow-wrap: anywhere;
}
.role {
  font: 800 14px var(--display);
  letter-spacing: 0.04em;
}
.clue-img {
  max-height: 42vh;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border: 2px solid var(--ink);
  border-radius: 6px;
}
.panorama {
  width: 100%;
  min-width: 0;
}
.panorama iframe {
  width: 100%;
  height: clamp(225px, 38vh, 400px);
  border: 0;
  border-radius: 7px;
}
.vote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.vote-btn {
  border: 2px solid #aa998a;
  text-align: start;
  font-size: 16px;
  min-height: 48px;
}
.vote-btn.selected {
  background: #bbd4bb;
  border-color: var(--ink);
}
.countdown {
  text-align: center;
}
.countdown strong {
  font-size: 80px;
}
.ranks {
  grid-template-columns: 1fr;
}
.ranks li[data-out='true'] {
  outline: 2px solid #a74744;
}
.results-clues {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.comparison {
  background: #eadbc1;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 6px;
  overflow-wrap: anywhere;
}
.comparison img {
  width: 100%;
  border-radius: 4px;
}
.comparison h3 {
  font-size: 16px;
}
.comparison .panorama iframe {
  height: 160px;
}
@media (max-width: 980px) {
  .shelf-inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .shelf h2 {
    font-size: 21px;
  }
  .poster {
    padding-inline: 4.3%;
  }
  .mode-link {
    padding: 8px;
  }
  .shelf-inner {
    padding-inline: 4.3%;
  }
  .hero-buttons .btn {
    padding: 9px 11px;
  }
  .poster {
    gap: 2.4%;
  }
}
@media (max-width: 700px) {
  .bar {
    padding: 14px 18px;
  }
  .brand {
    font-size: 16px;
    padding: 5px 8px 5px 5px;
    gap: 4px;
  }
  .brand img {
    width: 27px;
    height: 27px;
  }
  .tool {
    min-width: 37px;
    height: 37px;
    padding: 5px 7px;
  }
  .tool svg {
    width: 17px;
    height: 17px;
  }
  #tools {
    gap: 5px;
  }
  .poster {
    display: flex;
    flex-direction: column;
    padding: 19px 20px 25px;
    min-height: 0;
    gap: 0;
  }
  .pitch {
    display: contents;
  }
  .wordmark {
    font-size: clamp(43px, 8.7vw, 63px);
    text-align: center;
    transform: rotate(-3deg);
    order: 0;
  }
  .wordmark span {
    display: inline;
  }
  .wordmark span:last-child {
    display: block;
  }
  .hero-photo {
    order: 1;
    width: min(82vw, 400px);
    margin: 23px 0 14px;
    transform: rotate(2deg);
  }
  .hero-photo img {
    aspect-ratio: 1.78;
    object-fit: cover;
    object-position: 50% 48%;
  }
  .hook {
    order: 2;
    text-align: center;
    font-size: 16px;
    margin: 5px 0 0;
    line-height: 1.35;
    max-width: 36ch;
  }
  .facts {
    order: 3;
    justify-content: center;
    font-size: 12px;
    margin: 9px 0 14px;
  }
  .hero-buttons {
    order: 4;
    justify-content: center;
    gap: 8px;
  }
  .hero-buttons .btn {
    font-size: 16px;
    min-height: 45px;
  }
  .shelf-inner {
    padding: 18px 19px 24px;
    gap: 11px;
  }
  .mode-list {
    gap: 7px;
  }
  .mode-link {
    display: grid;
    text-align: center;
    justify-items: center;
    padding: 6px 3px;
    min-height: 66px;
    gap: 0;
  }
  .mode-art {
    width: 35px;
    height: 33px;
  }
  .mode-link strong {
    font-size: 15px;
  }
  .mode-link small,
  .mode-link > .next {
    display: none;
  }
  .shelf h2 {
    font-size: 20px;
  }
  .room {
    margin-top: 11px;
  }
  .room-body {
    gap: 16px;
  }
  .photo::before {
    top: -8px;
  }
  .invitation {
    gap: 12px;
  }
  .qr-box svg {
    width: 88px;
    height: 88px;
  }
  .room-head h1 {
    font-size: 30px;
  }
  .room-head {
    padding: 14px 16px;
  }
}
@media (max-width: 380px) {
  .bar {
    padding: 11px 12px;
  }
  .hero-buttons .btn {
    padding: 8px 10px;
    font-size: 15px;
  }
  .hero-buttons svg {
    width: 17px;
  }
  .poster {
    padding-inline: 12px;
  }
  .room {
    width: calc(100% - 18px);
  }
  .room-body,
  .sheet-body {
    padding: 16px;
  }
  .roster,
  .vote-grid {
    grid-template-columns: 1fr;
  }
  .choice span {
    font-size: 13px;
  }
  .facts {
    gap: 6px;
  }
  .tool {
    min-width: 34px;
  }
  .tool.lang svg {
    display: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  dialog[open] .sheet-body {
    animation: appear 0.16s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0.6;
      transform: translateY(6px);
    }
  }
}
body:has(.poster) {
  display: flex;
  flex-direction: column;
}
.bar {
  width: 100%;
}
#game:has(.poster) {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.shelf {
  flex: 1;
}
.avatar {
  width: 34px;
  height: 35px;
  border-radius: 8px;
  overflow: hidden;
  transform: rotate(-3deg);
}
.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.secret.covered {
  background-color: #504153;
}
.panorama-link {
  display: inline-block;
  padding: 8px 4px;
  font-weight: 750;
}

.role {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.role img {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #c7d7bc;
  object-fit: cover;
}

.clue-hint {max-width:42ch; margin:.65rem auto; text-wrap:pretty}
.photo-credit {font-size:.76rem; text-align:left; max-width:min(100%, 42rem); margin:.45rem auto; overflow-wrap:anywhere}
.photo-credit summary {cursor:pointer}
.photo-credit a {color:inherit; text-decoration:underline}
.comparison > strong + .clue-img {margin-top:.5rem}
