html,
body {
  height: 100%;
  overflow: hidden;
}
body {
  background:
    radial-gradient(ellipse at 75% 42%, #e6eadb80, transparent 50%),
    var(--paper);
}
#stage {
  position: absolute;
  top: 16%;
  right: 1%;
  width: 57%;
  height: 64%;
  transition: opacity 0.6s;
}
#board {
  display: block;
  width: 100%;
  height: 100%;
  outline: 0;
}
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#hud button,
#hud a,
#hud details {
  pointer-events: auto;
}
.site-header {
  height: 94px;
  position: absolute;
  top: 0;
  left: 4%;
  right: 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  border-bottom: 1px solid var(--line);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
#controls {
  position: relative;
  font-size: 12px;
}
#controls summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  gap: 20px;
  padding: 10px 0;
}
#controls summary::-webkit-details-marker {
  display: none;
}
#devbar {
  position: absolute;
  right: 0;
  top: 38px;
  width: 250px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 15px 45px #23362920;
  animation: enter 0.2s var(--ease);
}
#devbar > .eyebrow {
  display: block;
  margin-bottom: 14px;
}
#devbar button {
  border: 0;
  width: 100%;
  background: transparent;
  text-align: left;
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
#devbar button span {
  color: var(--muted);
}
#devbar button.on span {
  color: var(--green);
}
#devbar button:hover {
  color: #688a3e;
}
#devbar hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 6px 0;
}
.overlay {
  position: absolute;
  inset: 0;
}
#lobby {
  padding: 0 4%;
}
.lobby-copy {
  position: absolute;
  top: 19%;
  width: 44%;
  max-width: 570px;
}
.edition {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  margin-bottom: 24px;
}
.edition > span {
  width: 20px;
  height: 1px;
  background: #96aa83;
}
h1 {
  font-size: clamp(44px, 5.3vw, 90px);
  line-height: 1.03;
}
h1 em {
  color: #64815a;
  font-weight: 400;
}
.intro {
  margin-top: 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: -0.01em;
}
.joinCard {
  margin-top: 30px;
  display: flex;
  gap: 20px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 17px 23px 17px 17px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.joinCard img {
  border-radius: 6px;
  flex-shrink: 0;
  width: 86px;
  height: 86px;
}
.join-info > .eyebrow {
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.join-info h2 {
  font-size: 20px;
  letter-spacing: -0.045em;
  font-weight: 500;
  margin: 6px 0;
}
.join-info a {
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  overflow-wrap: anywhere;
  display: block;
}
#copyLink {
  padding: 0;
  background: none;
  border: 0;
  font-size: 10px;
  margin-top: 9px;
  color: var(--green);
  display: flex;
  gap: 25px;
}
.gathering {
  margin-top: 24px;
}
.gathering > .eyebrow {
  font-size: 9px;
}
.gathering > .eyebrow > span {
  margin-left: 14px;
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
#lobbyPlayers {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
  max-width: 460px;
}
.lobbyP {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  background: #fffef980;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 5px 12px 5px 5px;
  animation: enter 0.4s var(--ease);
}
.lobbyP .dot2 {
  width: 25px;
  height: 25px;
  font-size: 10px;
}
.lobbyP .host {
  font-size: 8px;
}
.empty-seat {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8f9989;
  font-size: 11px;
}
.empty-seat > i {
  height: 28px;
  width: 28px;
  display: grid;
  place-items: center;
  border: 1px dashed #bfc7b6;
  border-radius: 50%;
  font-style: normal;
}
#lobbyStatus {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.board-caption {
  position: absolute;
  top: 79%;
  right: 5%;
  width: 49%;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
  font-style: italic;
  color: #84927b;
  font-size: 17px;
}
.caption-line {
  width: 45px;
  height: 1px;
  background: #c9d0bf;
}
.howto {
  position: absolute;
  bottom: 4%;
  left: 4%;
  right: 4%;
  display: flex;
  justify-content: space-between;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  gap: 20px;
}
.howto > div {
  display: flex;
  gap: 18px;
  align-items: center;
}
.step-no {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #ced6c4;
  border-radius: 50%;
  font-size: 10px;
  color: var(--green);
}
.howto p strong {
  font-size: 12px;
  font-weight: 550;
  display: block;
  margin-bottom: 5px;
}
.howto p span {
  font-size: 11px;
  color: var(--muted);
}
#gameUI {
  display: none;
}
body:not([data-phase="lobby"]) #gameUI {
  display: block;
}
body:not([data-phase="lobby"]) #stage {
  left: 1%;
  right: auto;
  top: 23%;
  width: 68%;
  height: 69%;
}
#topbar {
  position: absolute;
  left: 4%;
  top: 119px;
  right: 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
#boardProgress {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}
#plaques {
  display: flex;
  gap: 7px;
  max-width: 72%;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.plaque {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  padding: 7px 12px 7px 7px;
  border-radius: 10px;
  background: #fffef9ab;
  min-width: 105px;
}
.plaque .who {
  display: flex;
  gap: 16px;
  align-items: center;
  flex: 1;
}
.plaque .nm {
  font-size: 11px;
}
.plaque .sc {
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  font-weight: 600;
}
.plaque .shield {
  width: 25px;
  height: 25px;
  background: var(--pc);
  color: #fff;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 10px;
}
.plaque .badge {
  font-size: 10px;
  color: var(--muted);
}
.plaque .crown {
  font-size: 10px;
  color: var(--gold);
}
.game-sidebar {
  position: absolute;
  right: 4%;
  top: 24%;
  width: 27%;
  bottom: 7%;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  padding-left: 30px;
  gap: 22px;
}
#roundPanel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
#roundPanel .eyebrow {
  font-size: 8px;
  color: var(--muted);
}
#roundLabel {
  font-size: 11px;
  line-height: 1.5;
  margin-top: 5px;
  color: var(--green);
}
#timer {
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}
#timer.urgent {
  color: var(--danger);
}
#timerBar {
  height: 3px;
  border-radius: 2px;
  background: #dfe4d4;
  overflow: hidden;
  width: 100%;
}
#timerBar i {
  display: block;
  height: 100%;
  background: #79935b;
  transition: width 0.25s linear;
  border-radius: 2px;
}
#timerBar.urgent i {
  background: var(--danger);
}
#clueCard {
  animation: enter 0.5s var(--ease);
}
.clueMeta {
  display: flex;
  gap: 12px;
  color: #7c8c6b;
  align-items: center;
}
#clueText {
  font-size: clamp(26px, 2.8vw, 42px);
  line-height: 1.15;
  margin: 22px 0 25px;
  letter-spacing: -0.04em;
}
#clueBlanks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
#clueStatus {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 18px;
}
#clueStatus.grace {
  color: #657f47;
}
#legend {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
#legend > .eyebrow {
  font-size: 8px;
  color: var(--muted);
}
#legend > div {
  display: flex;
  gap: 16px;
  margin: 12px 0;
}
#legend b {
  font-size: 12px;
  font-weight: 500;
}
#legend p {
  font-size: 10px;
  color: var(--muted);
}
#betweenClues {
  padding: 30px 0;
}
#betweenClues h2 {
  font-size: 32px;
  line-height: 1.1;
  margin: 20px 0 12px;
}
#betweenClues p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.mini-tiles {
  display: flex;
  gap: 4px;
}
.mini-tiles i {
  background: #e4e9d9;
  border: 1px solid #d0d9c5;
  width: 28px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  font-family: Georgia;
  font-style: normal;
  transform: rotate(-5deg);
}
.mini-tiles i:nth-child(2) {
  transform: translateY(-6px) rotate(8deg);
}
#objective {
  position: absolute;
  bottom: 4%;
  left: 4%;
  font-size: 11px;
  color: var(--muted);
}
#banner {
  position: absolute;
  left: 35%;
  bottom: 12%;
  transform: translateX(-50%);
  max-width: 55%;
  background: #284a39;
  color: var(--white);
  padding: 18px 32px;
  border-radius: 14px;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 27px;
  box-shadow: 0 10px 35px #213c3220;
  animation: bannerIn 0.4s var(--ease);
  z-index: 10;
}
#banner .sub {
  display: block;
  font:
    11px/1.5 "Helvetica Neue",
    Arial,
    sans-serif;
  margin-top: 8px;
  color: #d4dfc9;
}
@keyframes bannerIn {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
#ticker {
  position: absolute;
  bottom: 4%;
  right: 4%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  z-index: 11;
}
.tick {
  background: var(--white);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 11px;
  animation: enter 0.35s var(--ease);
}
.tick.fade {
  opacity: 0;
  transition: opacity 0.6s;
}
body[data-phase="lobby"] #ticker {
  display: none;
}
#podium {
  z-index: 12;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  padding: 110px 4% 35px;
}
#podium h1 {
  font-size: 64px;
}
#podiumCols {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 22px;
  margin-top: 18px;
}
.pcol {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  animation: enter 0.6s var(--ease);
  min-width: 90px;
}
.pcol .medal {
  font-family: Georgia;
  font-size: 25px;
  color: #95a781;
}
.pcol .face {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--pc);
  border: 5px solid #fffef9;
  box-shadow: 0 0 0 1px var(--line);
  position: relative;
}
.pcol .face:before,
.pcol .face:after {
  content: "";
  position: absolute;
  width: 3px;
  height: 5px;
  background: #fff;
  top: 13px;
  border-radius: 2px;
}
.pcol .face:before {
  left: 10px;
}
.pcol .face:after {
  right: 10px;
}
.pcol .pn {
  font-size: 13px;
}
.pcol .ps {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}
.pcol .block {
  width: 90px;
  max-height: 130px;
  border-radius: 8px 8px 0 0;
  background: #e3e9d8;
  border: 1px solid #d2dcc4;
}
.pcol.first .block {
  background: #bdcea4;
}
.pcol.first .medal {
  color: var(--gold);
}
#podiumHint {
  font-size: 12px;
  color: var(--muted);
}
.float3d {
  position: fixed;
  left: 0;
  top: 0;
  font-size: 23px;
  font-weight: 600;
  text-shadow: 0 1px 8px #fff;
  pointer-events: none;
  z-index: 5;
  white-space: nowrap;
}
@media (min-width: 1600px) {
  .lobby-copy {
    top: 21%;
  }
  .joinCard {
    margin-top: 40px;
  }
  .gathering {
    margin-top: 34px;
  }
  .intro {
    font-size: 18px;
  }
}
@media (max-height: 760px) and (min-width: 851px) {
  .lobby-copy {
    top: 18%;
  }
  .edition {
    margin-bottom: 16px;
  }
  h1 {
    font-size: 5vw;
  }
  .intro {
    margin-top: 17px;
    font-size: 13px;
  }
  .joinCard {
    margin-top: 22px;
    padding: 12px 18px 12px 12px;
    gap: 16px;
  }
  .joinCard img {
    width: 72px;
    height: 72px;
  }
  .gathering {
    margin-top: 18px;
  }
  .howto {
    bottom: 3%;
    padding-top: 16px;
  }
  #lobbyPlayers {
    margin: 9px 0;
  }
  .site-header {
    height: 80px;
  }
  #topbar {
    top: 102px;
  }
  .game-sidebar {
    gap: 18px;
  }
  #clueText {
    margin: 17px 0 20px;
  }
  #legend {
    padding-top: 15px;
  }
}
@media (max-width: 850px) {
  .site-header {
    height: 80px;
  }
  .brand-copy {
    font-size: 13px;
  }
  .brand-copy small {
    font-size: 7px;
  }
  .header-right {
    gap: 12px;
  }
  .header-right .pill {
    font-size: 9px;
    padding: 7px 10px;
  }
  #controls {
    font-size: 11px;
  }
  #controls summary {
    gap: 10px;
  }
  .lobby-copy {
    top: 15%;
    width: 49%;
  }
  h1 {
    font-size: 6vw;
  }
  .edition {
    font-size: 8px;
    margin-bottom: 20px;
  }
  .intro {
    font-size: 12px;
  }
  .joinCard {
    padding: 12px;
    gap: 10px;
  }
  .joinCard img {
    width: 58px;
    height: 58px;
  }
  .join-info h2 {
    font-size: 17px;
  }
  .join-info a {
    font-size: 9px;
  }
  .join-info > .eyebrow {
    font-size: 6px;
  }
  .howto {
    gap: 12px;
  }
  .howto > div {
    gap: 10px;
  }
  .howto p span {
    font-size: 9px;
  }
  .howto p strong {
    font-size: 10px;
  }
  .board-caption {
    font-size: 13px;
  }
  #stage {
    right: -3%;
    width: 55%;
    top: 20%;
    height: 55%;
  }
  .caption-line {
    width: 18px;
  }
  .game-sidebar {
    width: 32%;
    right: 3%;
    padding-left: 18px;
    top: 25%;
  }
  body:not([data-phase="lobby"]) #stage {
    width: 63%;
    top: 25%;
  }
  #clueText {
    font-size: 28px;
  }
  .blank {
    flex-basis: 27px;
    height: 32px;
    font-size: 18px;
  }
  #legend > div {
    gap: 8px;
  }
  #legend b {
    font-size: 10px;
  }
  .plaque .who {
    gap: 8px;
  }
  .plaque {
    min-width: 70px;
    padding: 6px;
  }
  .plaque .nm {
    font-size: 9px;
  }
  .plaque .sc {
    font-size: 14px;
  }
  .plaque .badge {
    display: none;
  }
  .plaque .shield {
    width: 20px;
    height: 20px;
  }
  .plaque {
    gap: 6px;
  }
  #topbar {
    top: 102px;
  }
  #timer {
    font-size: 30px;
  }
  #boardProgress {
    font-size: 10px;
  }
  #puzzleTitle {
    font-size: 9px;
  }
  #podium h1 {
    font-size: 45px;
  }
}
@media (max-width: 600px) and (orientation: portrait) {
  html,
  body {
    min-height: 100%;
    height: auto;
    overflow: auto;
  }
  #hud {
    position: relative;
    min-height: 1050px;
  }
  .site-header {
    position: relative;
    margin: 0 6%;
    left: auto;
    right: auto;
  }
  .header-right .pill {
    display: none;
  }
  #lobby {
    position: relative;
    padding: 40px 6% 0;
  }
  .lobby-copy {
    position: relative;
    top: auto;
    width: 100%;
    max-width: none;
  }
  .edition {
    margin-bottom: 18px;
  }
  h1 {
    font-size: 50px;
  }
  .intro {
    font-size: 14px;
    margin-top: 20px;
  }
  .joinCard {
    margin-top: 245px;
    width: 100%;
    padding: 17px;
    gap: 20px;
  }
  .joinCard img {
    width: 78px;
    height: 78px;
  }
  .join-info h2 {
    font-size: 22px;
  }
  .join-info > .eyebrow {
    font-size: 7px;
  }
  .join-info a {
    font-size: 10px;
  }
  #stage {
    top: 300px;
    right: 0;
    width: 100%;
    height: 255px;
  }
  .board-caption {
    display: none;
  }
  .gathering {
    margin: 25px 0;
  }
  .howto {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 30px;
    padding: 25px 0;
  }
  .howto p strong {
    font-size: 12px;
  }
  .howto p span {
    font-size: 11px;
  }
  .step-no {
    width: 30px;
    height: 30px;
  }
  body:not([data-phase="lobby"]) #hud {
    min-height: 1000px;
  }
  body:not([data-phase="lobby"]) #stage {
    top: 190px;
    left: 0;
    width: 100%;
    height: 330px;
  }
  .game-sidebar {
    position: absolute;
    top: 540px;
    left: 6%;
    right: 6%;
    width: auto;
    border: 0;
    padding: 0;
    bottom: auto;
  }
  #topbar {
    left: 6%;
    right: 6%;
    top: 104px;
    align-items: flex-start;
  }
  #plaques {
    max-width: 67%;
  }
  #objective {
    bottom: 25px;
    left: 6%;
    font-size: 10px;
  }
  #legend {
    padding-bottom: 20px;
  }
  #clueText {
    font-size: 32px;
  }
  #banner {
    left: 50%;
    bottom: auto;
    top: 455px;
    max-width: 85%;
    width: max-content;
    font-size: 23px;
  }
  #ticker {
    position: fixed;
    bottom: 20px;
    right: 5%;
    max-width: 90%;
  }
  .pcol {
    min-width: 60px;
  }
  #podiumCols {
    gap: 12px;
  }
  .pcol .block {
    width: 70px;
  }
  #podium h1 {
    font-size: 40px;
  }
  .pcol .pn {
    font-size: 11px;
  }
  #podium {
    position: fixed;
    padding-top: 100px;
  }
}

body[data-phase="gameEnd"] #gameUI,
body[data-phase="gameEnd"] #stage,
body[data-phase="gameEnd"] #ticker {
  display: none;
}
