@font-face {
  font-family: Pixel;
  src: url("/fonts/press-start-2p-latin-400-normal.woff2");
}
@font-face {
  font-family: DM;
  src: url("/fonts/dm-sans-latin-400-normal.woff2");
}
@font-face {
  font-family: DM;
  src: url("/fonts/dm-sans-latin-700-normal.woff2");
  font-weight: 700;
}
:root {
  color-scheme: dark;
  --bg: #161120;
  --panel: #251c34;
  --well: #1b1527;
  --line: #473654;
  --bright: #be9af7;
  --edge: #8661b6;
  --tint: #3e2d54;
  --ink: #f6efff;
  --dim: #c5b6d2;
  --exact: #a0d4a5;
  --else: #f5ca82;
  --absent: #686074;
  --pink: #f3a7c4;
  font:
    16px/1.45 DM,
    system-ui,
    sans-serif;
}
:root[data-theme="cobalt"] {
  --bg: #101724;
  --panel: #202b40;
  --well: #172031;
  --line: #384a69;
  --bright: #a0baff;
  --edge: #6b89c2;
  --tint: #2c3e60;
}
:root[data-theme="evergreen"] {
  --bg: #111c1b;
  --panel: #202f2c;
  --well: #162521;
  --line: #385548;
  --bright: #9fd3b3;
  --edge: #638e75;
  --tint: #2b493c;
}
:root[data-theme="raspberry"] {
  --bg: #20131e;
  --panel: #342132;
  --well: #291726;
  --line: #5e3c52;
  --bright: #f2a2ca;
  --edge: #b46e96;
  --tint: #512e45;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(
    color-mix(in srgb, var(--dim) 10%, transparent) 0.65px,
    transparent 0.8px
  );
  background-size: 8px 8px;
  color: var(--ink);
  min-height: 100svh;
}
button,
input {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
a {
  color: var(--bright);
}
button {
  border: 0;
  background: none;
}
button:disabled {
  cursor: default;
  opacity: 0.65;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--bright);
  outline-offset: 3px;
}
button:active:not(:disabled) {
  transform: translateY(2px);
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h2 {
  font-size: 1.6rem;
  letter-spacing: -0.045em;
  line-height: 1.2;
}
h3 {
  line-height: 1.3;
}
svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.top {
  background: var(--well);
  border-bottom: 1px solid var(--line);
}
.top-inner,
main {
  width: min(100% - 56px, 990px);
  margin: auto;
}
.top-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 44px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font:
    16px Pixel,
    monospace;
  text-decoration: none;
  letter-spacing: -1px;
}
.brand img {
  width: 23px;
  height: 23px;
  image-rendering: pixelated;
}
nav,
.tools {
  display: flex;
  align-items: center;
  gap: 6px;
}
nav button {
  padding: 8px 16px;
  border-radius: 6px;
  color: var(--dim);
  font-weight: 700;
  font-size: 0.87rem;
}
nav [aria-current="page"] {
  color: var(--bright);
  background: var(--tint);
}
.tools {
  margin-left: auto;
  gap: 8px;
}
.icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--dim);
}
.icon:hover,
.secondary:hover {
  border-color: var(--bright);
  color: var(--ink);
}
main {
  padding: 32px 0 16px;
}
.marquee {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #382649;
  border: 2px solid var(--edge);
  border-radius: 13px;
  box-shadow: 0 5px 0 #100c17;
  height: clamp(190px, 22vw, 248px);
  margin-bottom: 22px;
}
.marquee canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  position: absolute;
  inset: 0;
  z-index: -2;
}
.marquee:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    #241636e8 0%,
    #281936bb 31%,
    transparent 69%
  );
}
.marquee-text {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 5.5%;
}
.marquee-label,
.eyeline,
.tiny {
  font:
    9px/1.65 Pixel,
    monospace;
  letter-spacing: 0.03em;
}
.marquee-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f2d0f4;
}
.live-dot {
  width: 7px;
  height: 7px;
  background: #fac0d6;
  box-shadow: 0 0 0 3px #664369;
}
.marquee h1 {
  font:
    clamp(31px, 5vw, 59px) / 1.27 Pixel,
    monospace;
  letter-spacing: -0.065em;
  margin: 13px 0 8px;
  color: #fff1df;
  text-shadow:
    0 4px #a67eae,
    0 8px #40264f;
}
.marquee p {
  font-size: 1.05rem;
  color: #f2dfef;
}
.columns {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 20px;
  align-items: stretch;
}
.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 3px 0 #100d174d;
}
.heading {
  display: flex;
  align-items: center;
  gap: 12px;
}
.badge-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--bright);
}
.badge-icon.pink {
  color: var(--pink);
  background: #422c40;
  border-color: #5d3950;
}
.muted,
.help {
  color: var(--dim);
  font-size: 0.92rem;
}
.intro {
  margin: 12px 0 19px;
}
.field {
  display: grid;
  gap: 7px;
  font-size: 0.875rem;
  font-weight: 700;
}
input {
  color: var(--ink);
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 14px;
  min-width: 0;
  width: 100%;
}
input::placeholder {
  color: #ad9fb8;
}
input:focus {
  border-color: var(--bright);
}
.primary,
.secondary {
  min-height: 45px;
  border-radius: 7px;
  font-weight: 700;
  padding: 10px 16px;
  display: inline-flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}
.primary {
  color: #281b39;
  background: var(--bright);
  border: 1px solid color-mix(in srgb, var(--bright), white 20%);
  box-shadow: 0 3px var(--edge);
}
.primary:hover {
  filter: brightness(1.06);
}
.primary:active {
  box-shadow: 0 1px var(--edge);
}
.primary.wide {
  width: 100%;
  margin-top: 14px;
}
.secondary {
  background: var(--tint);
  border: 1px solid var(--line);
  color: var(--bright);
}
.lock-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--dim);
  font-size: 0.78rem;
  margin-top: 15px;
}
.lock-note svg {
  width: 14px;
  height: 14px;
}
.legend {
  display: grid;
  gap: 11px;
  margin: 17px 0 0;
}
.legend-row {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 0.84rem;
  color: var(--dim);
}
.legend-row b {
  color: var(--ink);
}
.sample {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  font:
    12px Pixel,
    monospace;
  border-radius: 4px;
  box-shadow: inset 0 -3px #0002;
}
.exact {
  background: var(--exact) !important;
  color: #203d29 !important;
}
.elsewhere {
  background: var(--else) !important;
  color: #493514 !important;
}
.absent {
  background: var(--absent) !important;
  color: white !important;
}
.guide .intro {
  margin-bottom: 0;
}
.palette-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--well);
}
.palette-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dim);
  font-size: 0.84rem;
  font-weight: 700;
}
.palette-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.palette-name {
  font-size: 0.78rem;
  color: var(--dim);
  margin-right: 8px;
}
.swatch {
  width: 31px;
  height: 32px;
  padding: 6px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
}
.swatch[aria-pressed="true"] {
  border-color: var(--bright);
}
.swatch i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #fff4;
}
.grape i {
  background: #aa7ce5;
}
.cobalt i {
  background: #7798ea;
}
.evergreen i {
  background: #74ae91;
}
.raspberry i {
  background: #db7fa8;
}
footer {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dim);
  opacity: 0.75;
  font-size: 0.72rem;
  padding: 21px 2px;
}
.footer-mark {
  color: var(--bright);
}
.footer-line {
  height: 1px;
  background: var(--line);
  flex: 1;
}
#notice {
  position: sticky;
  top: 6px;
  z-index: 3;
  margin-bottom: 8px;
  background: #462e45;
  color: #ffe1e7;
  padding: 9px 13px;
  border: 1px solid #956580;
  border-radius: 7px;
}
.loading {
  padding: 25px;
  text-align: center;
}
.lobby-list {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}
.seat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--well);
  border-radius: 7px;
  font-size: 0.86rem;
}
.seat strong,
.compare h3,
.score-names span {
  overflow-wrap: anywhere;
}
.seat small,
.progress {
  color: var(--dim);
}
.player-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #ba9bf7;
  margin-right: 7px;
}
.seat-1 {
  background: #efa4bc;
}
.share-line,
.composer {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.share-line input {
  font-size: 0.8rem;
}
.share-line button {
  white-space: nowrap;
}
.invite-label {
  font-size: 0.84rem;
  margin: 12px 0 6px;
}
.play-wrap,
.archive,
.reveal-wrap {
  max-width: 720px;
  margin: auto;
}
.round-top,
.section-top,
.chat-head,
.result-head,
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.round-top {
  padding: 0 0 15px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.round-top h1,
.section-top h1 {
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}
.score-names {
  min-width: 0;
  display: flex;
  gap: 13px;
  font-size: 0.81rem;
}
.score-names b {
  font:
    13px Pixel,
    monospace;
  color: var(--bright);
  margin-left: 4px;
}
.board {
  display: grid;
  gap: 5px;
}
.row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  padding: 0;
}
.tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 5px;
  background: var(--well);
  border: 1px solid var(--line);
  font:
    clamp(14px, 4.5vw, 21px) / 1 Pixel,
    monospace;
}
.tile.exact,
.tile.elsewhere,
.tile.absent {
  border-color: transparent;
  box-shadow: inset 0 -3px #0002;
}
.active-row .tile {
  border-color: var(--edge);
}
.active-row .next {
  box-shadow: inset 0 0 0 1px var(--bright);
}
.play-board {
  width: min(100%, 265px);
  margin: 14px auto;
}
.play-info,
.play-hint {
  text-align: center;
  color: var(--dim);
  font-size: 0.85rem;
}
.play-hint {
  min-height: 27px;
}
.keyboard {
  margin: 3px auto 0;
  max-width: 500px;
  display: grid;
  gap: 5px;
}
.keyline {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.key {
  flex: 0 1 9.6%;
  padding: 0;
  background: var(--tint);
  border-radius: 5px;
  border: 1px solid var(--line);
  box-shadow: 0 2px var(--well);
  font-weight: 700;
  min-height: 45px;
}
.key.action {
  flex: 1 1 14%;
  font-size: 0.78rem;
}
.key.enter {
  background: var(--bright);
  color: #251a32;
}
.key:active {
  filter: brightness(1.3);
}
.wait {
  text-align: center;
  padding: 12px;
  color: var(--bright);
}
.flip .tile {
  animation: flip 0.24s ease-out;
}
.flip .tile:nth-child(2) {
  animation-delay: 25ms;
}
.flip .tile:nth-child(3) {
  animation-delay: 50ms;
}
.flip .tile:nth-child(4) {
  animation-delay: 75ms;
}
.flip .tile:nth-child(5) {
  animation-delay: 100ms;
}
@keyframes flip {
  from {
    transform: rotateX(75deg);
  }
  to {
    transform: rotateX(0);
  }
}
.result-head {
  margin: 20px 0;
}
.result-head h2 {
  font-size: 1.95rem;
}
.word {
  border: 1px solid var(--line);
  background: var(--well);
  padding: 8px 11px;
  border-radius: 7px;
  display: grid;
  gap: 5px;
}
.word small {
  font-size: 0.72rem;
  color: var(--dim);
}
.word b {
  font:
    13px Pixel,
    monospace;
  color: var(--bright);
}
.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.compare h3 {
  font-size: 0.94rem;
}
.compare small {
  color: var(--dim);
  font-size: 0.76rem;
}
.compare .board {
  margin-top: 8px;
}
.compare .tile {
  aspect-ratio: auto;
  height: 37px;
  font-size: 14px;
}
.compare button.row:hover .tile,
.compare .selected .tile {
  outline: 1px solid var(--bright);
}
.chat {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding: 16px 0;
}
.chat h3 {
  font-size: 1.02rem;
}
.chat-head small,
.ready-details {
  font-size: 0.8rem;
  color: var(--dim);
}
.messages {
  padding: 10px 0;
  display: grid;
  gap: 7px;
  max-height: 220px;
  overflow: auto;
}
.bubble {
  background: var(--well);
  border-radius: 8px;
  padding: 8px 11px;
  max-width: 90%;
  width: fit-content;
  overflow-wrap: anywhere;
}
.bubble.mine {
  justify-self: end;
  background: var(--tint);
}
.bubble small,
.bubble q {
  display: block;
  color: var(--bright);
  font-size: 0.76rem;
}
.bubble q {
  border-left: 2px solid var(--bright);
  padding-left: 6px;
  margin: 3px 0;
}
.quote-draft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--bright);
  font-size: 0.85rem;
  padding: 6px;
}
.ready-details {
  margin-top: 8px;
  text-align: center;
}
.archive-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.archive-row span {
  display: grid;
  gap: 4px;
}
.archive-row small {
  color: var(--dim);
}
.archive-row b {
  color: var(--bright);
  font:
    11px Pixel,
    monospace;
}
.archive .help {
  padding: 22px 0;
}
.back {
  color: var(--bright);
  font-weight: 700;
  padding: 10px 0;
}
.empty-chat {
  font-size: 0.83rem;
  color: var(--dim);
}
dialog {
  width: min(370px, calc(100% - 24px));
  padding: 22px;
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
}
dialog::backdrop {
  background: #100c1cd9;
}
.pref-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.pref-row input {
  width: 21px;
  height: 21px;
  accent-color: var(--bright);
}
dialog .palette-bar {
  display: grid;
  margin: 14px 0 2px;
}
dialog .palette-controls {
  justify-content: space-between;
}
.leave-room { width: 100%; margin-top: 14px; }
.resume-room { display: block; text-align: center; margin-top: 8px; }
.reduce *,
.reduce *::before {
  animation: none !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 700px) {
  .columns {
    grid-template-columns: 1fr;
  }
  .top-inner,
  main {
    width: min(100% - 28px, 530px);
  }
  .top-inner {
    min-height: 57px;
    gap: 14px;
  }
  main {
    padding-top: 16px;
  }
  .marquee {
    height: 167px;
    margin-bottom: 16px;
  }
  .marquee-label {
    font-size: 7px;
  }
  .marquee-text {
    padding-left: 5%;
  }
  .marquee h1 {
    font-size: clamp(26px, 7.6vw, 40px);
    margin: 10px 0;
  }
  .marquee p {
    font-size: 0.86rem;
  }
  .panel {
    padding: 19px;
  }
  .columns {
    gap: 13px;
  }
  .brand {
    font-size: 13px;
    gap: 6px;
  }
  .brand img {
    width: 19px;
    height: 19px;
  }
  .tools {
    gap: 1px;
  }
  .icon {
    width: 33px;
    height: 40px;
    background: transparent;
    border: 0;
  }
  nav {
    gap: 0;
  }
  nav button {
    font-size: 0.82rem;
    padding: 8px 9px;
  }
  .palette-bar {
    padding: 8px 11px;
  }
  .play-wrap,
  .reveal-wrap {
    padding: 14px 10px;
  }
  .play-board {
    width: clamp(190px, min(62vw, 34svh), 255px);
  }
  .keyboard {
    gap: 5px;
  }
  .keyline {
    gap: 3px;
  }
  .play-info {
    font-size: 0.8rem;
  }
  .compare {
    gap: 9px;
  }
  .compare .row {
    gap: 3px;
  }
  .compare .tile {
    font-size: 12px;
    min-height: 40px;
  }
  .round-top {
    flex-wrap: wrap;
    gap: 7px;
  }
  .compare .board {
    gap: 4px;
  }
  .score-names {
    gap: 10px;
  }
  .result-head h2 {
    font-size: 1.55rem;
  }
  .chat-head {
    flex-wrap: wrap;
    gap: 4px;
  }
  .word b {
    font-size: 11px;
  }
  .chat {
    margin-top: 13px;
  }
  .play-wrap .round-top {
    margin-bottom: 9px;
  }
  .intro {
    margin: 10px 0 14px;
  }
}
@media (max-width: 370px) {
  .top-inner,
  main {
    width: calc(100% - 18px);
  }
  .top-inner {
    gap: 7px;
  }
  .brand {
    font-size: 12px;
  }
  .palette-name {
    display: none;
  }
  .marquee {
    height: 149px;
  }
  .marquee:before {
    background: linear-gradient(
      90deg,
      #241636d9,
      #2819368c 46%,
      transparent 72%
    );
  }
  .keyline {
    gap: 2px;
  }
  .key.action {
    font-size: 0.7rem;
  }
  .play-wrap {
    padding-inline: 5px;
  }
  .result-head {
    align-items: flex-start;
  }
  .section-top h1 {
    font-size: 1.4rem;
  }
  .guide .legend-row {
    font-size: 0.82rem;
  }
}
@media (max-width: 700px) {
  main:has(.play-wrap) .play-wrap {
    display: flex;
    flex-direction: column;
    min-height: calc(100svh - 132px);
  }
  .play-wrap .keyboard {
    width: 100%;
    margin-top: auto;
  }
  .play-wrap .key.action {
    flex: 0 0 max(44px, 13%);
  }
}
@media (max-width: 700px) and (max-height: 650px) {
  body main:has(.play-wrap) {
    padding-top: 6px;
  }
  main .play-wrap .round-top {
    padding-bottom: 5px;
    margin-bottom: 5px;
  }
  main .play-wrap .play-board {
    width: min(56vw, 184px);
    margin: 7px auto;
  }
  main .play-wrap .play-hint {
    min-height: 22px;
  }
}
