@import url("https://api.fontshare.com/v2/css?f[]=satoshi@400,500,600,700&display=swap");

:root {
  --bg: #f1eadc;
  --p: #fffaf0;
  --p2: #e6ddcd;
  --line: #171713;
  --w: #171713;
  --text: #171713;
  --mut: #655f55;
  --pink: #ff5d36;
  --blue: #3557ff;
  --lime: #dfff43;
  --green: #dfff43;
  --paper: #fffaf0;
  --ink: #171713;
  --acid: #dfff43;
  --cobalt: #3557ff;
  --coral: #ff5d36;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  position: relative;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Cabinet Grotesk", "Arial Narrow", Arial, sans-serif;
  background: linear-gradient(
      90deg,
      transparent 49.9%,
      #17171310 50%,
      transparent 50.1%
    ),
    var(--bg);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.34;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
  content: "";
  pointer-events: none;
}

body::after {
  position: fixed;
  z-index: -2;
  width: 35vw;
  height: 35vw;
  right: -9vw;
  top: 18vh;
  border: 3.5vw solid var(--cobalt);
  border-radius: 50%;
  content: "";
  opacity: 0.08;
  pointer-events: none;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--cobalt) !important;
}

.app,
body > main:not(.app) {
  width: min(1440px, 100%);
  padding: 20px clamp(18px, 3vw, 48px) 64px;
}

.app > header,
body > main:not(.app) > header {
  min-height: 64px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}

.brand,
body > main:not(.app) > header b {
  color: var(--ink) !important;
  font-size: 22px;
  font-weight: 900 !important;
  letter-spacing: -0.035em !important;
  text-decoration: none;
}

.brand i,
body > main:not(.app) > header b i {
  width: 35px;
  height: 35px;
  color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 1px;
  background: var(--cobalt);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-4deg);
}

.primary,
.ghost,
.target,
.switch button,
.filters button,
.card button {
  border-radius: 2px !important;
  font-weight: 800 !important;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease,
    color 180ms ease;
}

.primary {
  color: var(--ink) !important;
  border: 2px solid var(--ink) !important;
  background: var(--acid) !important;
  box-shadow: 5px 5px 0 var(--ink) !important;
}

.primary:hover:not(:disabled) {
  box-shadow: 2px 2px 0 var(--ink) !important;
  transform: translate(3px, 3px);
}

.ghost {
  color: var(--ink) !important;
  border: 2px solid var(--ink) !important;
  background: transparent !important;
}

.ghost:hover:not(:disabled) {
  color: var(--paper) !important;
  background: var(--ink) !important;
  transform: translateY(-2px);
}

.primary:disabled,
.ghost:disabled {
  opacity: 0.36;
  box-shadow: none !important;
}

.eyebrow,
.kicker {
  margin: 0;
  color: var(--cobalt) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
  text-transform: none !important;
}

h1,
h2,
h3,
p {
  letter-spacing: normal !important;
}

h1,
h2,
h3 {
  font-weight: 900;
}

.intro {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
  min-height: calc(100vh - 104px);
  padding: clamp(52px, 8vw, 118px) 0;
}

.intro-copy {
  display: flex;
  grid-column: span 7;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding-right: clamp(32px, 6vw, 96px);
}

.intro-copy h1,
.auth-story h1 {
  width: 100%;
  max-width: 1120px;
  margin: 16px 0 0;
  font-size: clamp(58px, 8.2vw, 132px);
  line-height: 0.78 !important;
  letter-spacing: -0.075em !important;
}

.intro-copy h1 em,
.auth-story h1 em {
  color: var(--coral);
  font-style: normal;
}

.intro-copy > p:not(.kicker),
.auth-lede {
  max-width: 640px;
  margin-top: 32px !important;
  color: var(--ink) !important;
  font-size: clamp(18px, 1.55vw, 23px) !important;
  line-height: 1.28;
}

.inline-card-art {
  position: relative;
  display: inline-grid;
  width: clamp(66px, 8vw, 120px);
  height: clamp(42px, 5vw, 76px);
  place-items: center;
  margin: 0 0.06em;
  overflow: hidden;
  vertical-align: 0.08em;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--cobalt);
  box-shadow: inset 0 0 0 7px var(--acid);
  transform: rotate(-6deg);
}

.inline-card-art::after {
  position: absolute;
  width: 160%;
  height: 4px;
  background: var(--paper);
  content: "";
  transform: rotate(-18deg);
}

.inline-card-art i {
  z-index: 1;
  color: var(--ink);
  font-size: 0.3em;
  font-style: normal;
  letter-spacing: 0.08em;
}

.taste-marquee {
  width: min(100%, 720px);
  margin-top: 42px;
  overflow: hidden;
  border-block: 2px solid var(--ink);
  white-space: nowrap;
}

.taste-marquee > div {
  width: max-content;
  padding: 10px 0 8px;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.panel,
.play-panel {
  grid-column: span 5;
  align-self: center;
  padding: clamp(26px, 4vw, 54px) !important;
  color: var(--paper);
  border: 3px solid var(--ink) !important;
  border-radius: 2px !important;
  background: var(--cobalt) !important;
  box-shadow: 12px 12px 0 var(--ink) !important;
}

.play-panel .kicker,
.play-panel .hint,
.play-panel .field,
.play-panel .error {
  color: var(--paper) !important;
}

.play-panel h2 {
  margin: 10px 0 30px;
  font-size: clamp(35px, 4vw, 58px);
  line-height: 0.94;
}

.play-modes {
  margin-top: 28px;
  border-top: 2px solid var(--paper);
}

.play-mode {
  border-bottom: 2px solid var(--paper);
}

.play-mode-title {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding: 18px 0;
  color: var(--paper);
  border: 0;
  background: transparent;
  font-size: 18px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.play-mode-title span {
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
}

.play-mode-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

.play-mode-body > * {
  min-height: 0;
}

.play-mode:not(.is-open) .play-mode-body {
  overflow: hidden;
}

.play-mode.is-open .play-mode-body {
  grid-template-rows: 1fr;
  padding-bottom: 22px;
}

.play-mode .primary {
  width: 100%;
  margin-top: 20px;
}

.targets {
  gap: 5px;
}

.target {
  color: var(--paper);
  border: 1px solid var(--paper);
  background: transparent;
}

.target.on {
  color: var(--ink);
  border-color: var(--acid);
  background: var(--acid);
}

input,
textarea,
select,
.field input {
  color: var(--ink) !important;
  border: 2px solid var(--ink) !important;
  border-radius: 1px !important;
  background: var(--paper) !important;
}

input::placeholder,
textarea::placeholder {
  color: #81796e;
}

.play-panel input {
  border-color: var(--paper) !important;
}

.or {
  color: currentColor;
}

.game {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 0;
  margin-top: 32px;
  border: 3px solid var(--ink);
  background: var(--ink);
}

.board {
  min-height: 680px;
  padding: clamp(24px, 4vw, 58px);
  color: var(--paper);
  border: 0;
  border-radius: 0;
  background: var(--ink);
}

.side {
  padding: 26px 22px;
  color: var(--ink);
  border: 0;
  border-left: 3px solid var(--ink);
  border-radius: 0;
  background: var(--acid);
}

.side .eyebrow,
.side .sub,
.side small {
  color: var(--ink) !important;
}

.room-code-share {
  grid-template-columns: 1fr;
}

.roomcode {
  color: var(--paper) !important;
  border: 2px solid var(--ink) !important;
  border-radius: 1px !important;
  background: var(--cobalt) !important;
  font-size: 26px !important;
  letter-spacing: 0.13em;
}

.side .ghost:hover {
  color: var(--acid) !important;
}

.player {
  color: var(--ink);
}

.dot {
  background: var(--cobalt);
  box-shadow: none;
}

.score {
  border: 2px solid var(--ink);
  border-radius: 1px;
  background: transparent;
}

.score strong {
  color: var(--cobalt);
  font-size: 56px;
}

.board h1 {
  max-width: 1000px;
  font-size: clamp(45px, 6.5vw, 104px);
  line-height: 0.9 !important;
  letter-spacing: -0.06em !important;
}

.board h2,
.board h3 {
  color: var(--paper);
}

.board .eyebrow,
.board .timer,
.answer-emphasis {
  color: var(--acid) !important;
  text-shadow: none !important;
}

.timer b {
  color: var(--ink);
  background: var(--acid);
  clip-path: none;
  border-radius: 50%;
}

.prompt {
  max-width: 1100px;
  margin: 72px 0 38px;
  text-align: left;
}

.prompt p,
.wait > p,
.lobby-state > p,
.result > p,
.end > p {
  max-width: 680px;
  color: #bdb7aa;
  font-size: 18px;
}

.hand {
  gap: 0 !important;
  perspective: 1200px;
}

.hand .card {
  min-height: 230px;
  padding: 24px !important;
  color: var(--ink) !important;
  border: 2px solid var(--ink) !important;
  border-radius: 1px !important;
  background: var(--paper) !important;
  box-shadow: 8px 8px 0 var(--cobalt);
  transform-origin: 50% 100%;
}

.hand .card:nth-child(even) {
  background: var(--acid) !important;
}

.hand .card:hover {
  z-index: 2;
  box-shadow: 12px 12px 0 var(--coral);
  transform: translateY(-10px) rotate(-1deg) !important;
}

.hand .card.on {
  color: var(--paper) !important;
  background: var(--cobalt) !important;
  box-shadow: 12px 12px 0 var(--acid);
}

.hand .card small {
  color: currentColor;
  opacity: 0.58;
}

.selection-slot,
.answer,
.win-card,
.rank div,
.lobby-player,
.invite-panel,
.invite-result,
.invite-item {
  border: 2px solid currentColor !important;
  border-radius: 1px !important;
  box-shadow: none !important;
}

.answer {
  color: var(--ink) !important;
  background: var(--paper) !important;
}

.answer.on {
  color: var(--paper) !important;
  background: var(--cobalt) !important;
}

.wait,
.lobby-state,
.result,
.end {
  max-width: 1000px;
  min-height: 560px;
  justify-content: center;
}

.pulse {
  color: var(--ink);
  border-radius: 1px;
  background: var(--acid);
  box-shadow: 8px 8px 0 var(--cobalt);
}

.icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.icon svg path[d*="11 7"] {
  fill: currentColor;
  stroke: none;
}

.lobby-roster-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lobby-player {
  color: var(--ink);
  background: var(--paper) !important;
}

.close-room-modal,
.logout-confirm,
.home-confirm {
  background: #171713d9 !important;
}

.close-room-dialog,
.logout-confirm-card,
.home-confirm-card,
.room-target-picker,
.end-target-picker {
  color: var(--ink) !important;
  border: 3px solid var(--ink) !important;
  border-radius: 2px !important;
  background: var(--paper) !important;
  box-shadow: 12px 12px 0 var(--coral) !important;
}

.profile-page {
  max-width: 1320px !important;
  margin: 0 auto !important;
}

.auth-choice {
  display: grid !important;
  width: 100%;
  max-width: none !important;
  grid-template-columns: minmax(0, 7fr) minmax(390px, 5fr);
  gap: clamp(34px, 7vw, 110px);
  align-items: center;
  min-height: calc(100vh - 104px);
  padding: clamp(48px, 8vw, 110px) 0;
  text-align: left !important;
}

.auth-story {
  min-width: 0;
}

.auth-story h1 {
  font-size: clamp(58px, 7.4vw, 120px);
}

.auth-entry {
  padding: clamp(24px, 3vw, 42px);
  border: 3px solid var(--ink);
  background: var(--coral);
  box-shadow: 12px 12px 0 var(--ink);
}

.auth-entry .auth-tabs {
  display: flex !important;
  margin: 0 0 22px !important;
}

.auth-entry .auth-tabs button {
  min-width: 0;
  flex: 1;
}

.auth-entry .panel {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ink);
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.auth-entry .panel h2 {
  color: var(--ink);
  font-size: 34px;
}

.auth-entry .auth label,
.auth-entry .hint,
.auth-entry .auth-intro {
  color: var(--ink) !important;
}

.auth-entry .primary {
  background: var(--acid) !important;
}

.auth-entry .ghost {
  background: var(--paper) !important;
}

.forgot-password-link {
  color: var(--ink) !important;
}

.profile-card,
.security,
.history {
  color: var(--paper);
  border: 3px solid var(--ink) !important;
  border-radius: 2px !important;
  background: var(--cobalt) !important;
  box-shadow: 12px 12px 0 var(--ink);
}

.profile-card > h1 {
  max-width: 900px;
  color: var(--paper);
  font-size: clamp(48px, 7vw, 100px) !important;
  letter-spacing: -0.05em !important;
  text-transform: none !important;
}

.profile-card p,
.security p,
.history p {
  color: #e8e3d8 !important;
}

body > main:not(.app) {
  width: min(1500px, 100%);
}

body > main:not(.app) .notice {
  margin: 28px 0 0;
  padding: 15px 18px;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 1px;
  background: var(--acid);
}

.stats {
  gap: 0;
  margin: 0;
}

.stat {
  padding: 24px;
  color: var(--paper);
  border: 2px solid var(--ink);
  border-top: 0;
  border-radius: 0;
  background: var(--cobalt);
}

.stat:nth-child(2) {
  color: var(--ink);
  background: var(--coral);
}

.stat strong,
.stat:nth-child(2) strong {
  color: inherit;
  font-size: 42px;
}

.stat small {
  color: inherit;
}

.layout {
  grid-template-columns: minmax(360px, 5fr) minmax(0, 7fr);
  gap: 0;
  align-items: start;
  margin-top: 34px;
}

.create,
.library {
  padding: clamp(24px, 3vw, 44px);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
}

.library {
  border-left: 0;
  background: #e8dfcf;
}

.create h1 {
  max-width: 600px;
  font-size: clamp(44px, 5vw, 78px);
  line-height: 0.9;
}

.switch button,
.filters button,
.card button {
  color: var(--ink);
  border: 2px solid var(--ink);
  background: transparent;
}

.switch button.on,
.filters button.on {
  color: var(--paper);
  background: var(--cobalt);
}

.library .card {
  grid-template-columns: 90px minmax(0, 1fr) 100px auto;
  padding: 17px 0;
  color: var(--ink);
  border-top: 2px solid var(--ink);
}

.library .card .type {
  color: var(--cobalt);
}

.published,
.draft,
.disabled {
  border-radius: 1px;
}

.published {
  color: var(--ink);
  background: var(--acid);
}

.draft {
  color: var(--paper);
  background: var(--cobalt);
}

.disabled {
  color: var(--ink);
  background: #c9c0b2;
}

.registration-consent {
  background: #171713df !important;
}

.registration-consent-content {
  color: var(--ink) !important;
  border: 3px solid var(--ink) !important;
  border-radius: 2px !important;
  background: var(--paper) !important;
  box-shadow: none !important;
}

.registration-consent h1 {
  color: var(--ink) !important;
}

/* Keep the consent control in the same deep red as the primary action. */
.registration-consent-check input[type="checkbox"] {
  accent-color: var(--accent) !important;
}

.registration-consent-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px !important;
}

.registration-consent-actions button {
  width: 100%;
}

.registration-consent-actions .ghost {
  color: var(--ink) !important;
  border: 1px solid var(--ink) !important;
  background: transparent !important;
}

/* Keep every account credential field equally readable. */
.auth input {
  padding: 11px !important;
  font-size: 16px !important;
  line-height: 1.1;
}

@media (max-width: 520px) {
  .auth input {
    font-size: 16px !important;
  }
}

@media (max-width: 900px) {
  .intro,
  .auth-choice {
    display: block !important;
    min-height: auto;
    padding: 58px 0 80px;
  }

  .intro-copy {
    padding-right: 0;
  }

  .panel,
  .play-panel,
  .auth-entry {
    width: min(100%, 620px);
    margin: 56px 0 0 !important;
  }

  .game {
    display: flex;
    flex-direction: column;
  }

  .side {
    order: -1;
    border-bottom: 3px solid var(--ink);
    border-left: 0;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .library {
    border-top: 0;
    border-left: 3px solid var(--ink);
  }
}

@media (max-width: 600px) {
  .app,
  body > main:not(.app) {
    padding: 14px 13px 42px;
  }

  .app > header,
  body > main:not(.app) > header {
    min-height: 58px;
  }

  .brand {
    font-size: 18px;
  }

  .brand i {
    width: 30px;
    height: 30px;
  }

  .intro-copy h1,
  .auth-story h1 {
    font-size: clamp(48px, 16vw, 72px);
    line-height: 0.82 !important;
  }

  .inline-card-art {
    width: 58px;
    height: 38px;
    border-width: 2px;
  }

  .panel,
  .play-panel,
  .auth-entry {
    padding: 24px !important;
    box-shadow: 7px 7px 0 var(--ink) !important;
  }

  .row {
    flex-direction: column;
  }

  .row .ghost {
    width: 100%;
  }

  .game {
    margin-top: 18px;
    border-width: 2px;
  }

  .board {
    padding: 28px 16px;
  }

  .side {
    grid-template-columns: 1fr auto;
    padding: 15px;
  }

  .board h1 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .hand .card {
    min-height: 178px !important;
    box-shadow: 5px 5px 0 var(--cobalt);
  }

  .lobby-roster-list {
    grid-template-columns: 1fr;
  }

  .layout {
    margin-top: 20px;
  }

  .create,
  .library {
    min-width: 0;
    padding: 22px 16px;
  }

  .create .actions .primary,
  .create .actions .ghost {
    width: 100%;
    max-width: none;
  }

  .library-top {
    align-items: stretch;
    flex-direction: column;
  }

  .library-top input {
    width: 100%;
  }

  .filters {
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .library .card {
    grid-template-columns: 1fr auto;
  }

  .library .card .type,
  .library .card .text {
    grid-column: 1;
  }

  .library .card .badge,
  .library .card .card-actions {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Refined editorial direction */

:root {
  --bg: #121110;
  --p: #191816;
  --p2: #211f1c;
  --line: #3d3934;
  --w: #f1ede5;
  --text: #f1ede5;
  --mut: #aaa297;
  --pink: #9f3949;
  --blue: #b8aa96;
  --lime: #d7c8aa;
  --green: #667766;
  --paper: #f1ede5;
  --ink: #151412;
  --acid: #d7c8aa;
  --cobalt: #262321;
  --coral: #9f3949;
  --accent: #9f3949;
  --accent-hover: #b34758;
  --surface: #191816;
  --surface-raised: #211f1c;
  --hairline: rgb(241 237 229 / 16%);
}

html {
  background: var(--bg);
}

body {
  color: var(--text);
  font-family: "Satoshi", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.008em;
  background: radial-gradient(
      circle at 82% 12%,
      rgb(121 73 67 / 13%),
      transparent 31rem
    ),
    radial-gradient(circle at 18% 82%, rgb(108 98 82 / 9%), transparent 34rem),
    linear-gradient(145deg, #151412 0%, #0f0e0d 68%, #171412 100%);
}

body::before {
  opacity: 0.08;
  mix-blend-mode: soft-light;
}

body::after {
  display: none;
}

.panel,
.play-panel,
.auth-entry,
.profile-card,
.security,
.history,
.game,
.board,
.side,
.create,
.library,
.stat,
.hand .card,
.answer,
.win-card,
.close-room-dialog,
.logout-confirm-card,
.home-confirm-card,
.room-target-picker,
.end-target-picker,
.brand i,
body > main:not(.app) > header b i {
  box-shadow: none !important;
}

.app,
body > main:not(.app) {
  width: min(1440px, 100%);
  margin-inline: auto;
  padding: 24px clamp(24px, 4vw, 68px) 72px;
}

.app > header,
body > main:not(.app) > header {
  min-height: 62px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--hairline);
}

.brand,
body > main:not(.app) > header b {
  color: var(--paper) !important;
  font-size: 18px;
  font-weight: 600 !important;
  letter-spacing: -0.025em !important;
}

.brand i,
body > main:not(.app) > header b i {
  width: 30px;
  height: 30px;
  color: var(--paper);
  border: 1px solid rgb(241 237 229 / 38%);
  border-radius: 50%;
  background: transparent;
  transform: none;
}

.brand + *,
.profile-nav,
#account-nav {
  gap: 7px !important;
}

.kicker,
.eyebrow,
label,
.field,
.lobby-roster-title,
.card .type,
.library .card .type {
  color: var(--mut) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase;
}

.kicker {
  font-size: 14px !important;
}

h1,
h2,
h3 {
  font-family: "Satoshi", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
}

h1 {
  letter-spacing: -0.058em !important;
}

h2 {
  letter-spacing: -0.04em !important;
}

h3 {
  letter-spacing: -0.025em !important;
}

h1 em {
  color: #c8bbb0;
  font-style: normal;
}

p,
input,
textarea,
select,
button,
a {
  letter-spacing: 0.008em;
}

.primary,
.ghost,
.target,
.switch button,
.filters button,
.card button,
.answer {
  min-height: 42px;
  border-radius: 3px !important;
  font-size: 13px;
  font-weight: 600 !important;
  letter-spacing: 0.025em;
  box-shadow: none !important;
}

.primary {
  color: #fff9f0 !important;
  border: 1px solid var(--accent) !important;
  background: var(--accent) !important;
}

.primary:hover:not(:disabled) {
  border-color: var(--accent-hover) !important;
  background: var(--accent-hover) !important;
}

.ghost,
.target,
.switch button,
.filters button,
.card button {
  color: var(--paper) !important;
  border: 1px solid var(--hairline) !important;
  background: transparent !important;
}

.ghost:hover,
.target:hover,
.switch button:hover,
.filters button:hover,
.card button:hover {
  border-color: rgb(241 237 229 / 48%) !important;
  background: rgb(241 237 229 / 5%) !important;
}

.target.on,
.switch button.on,
.filters button.on {
  color: var(--ink) !important;
  border-color: var(--paper) !important;
  background: var(--paper) !important;
}

input,
textarea,
select {
  color: var(--paper) !important;
  border: 1px solid var(--hairline) !important;
  border-radius: 3px !important;
  background: rgb(255 255 255 / 3%) !important;
}

input::placeholder,
textarea::placeholder {
  color: #777168 !important;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #8e857a !important;
}

.intro,
.auth-choice {
  display: grid !important;
  grid-template-columns: minmax(0, 7fr) minmax(360px, 5fr);
  gap: clamp(58px, 8vw, 132px);
  align-items: center;
  min-height: calc(100vh - 92px);
  padding: clamp(70px, 10vh, 136px) 0;
}

/* The game-home copy is independently positioned: expanding the room-code
   form must never re-centre or shift it. */
.intro {
  align-items: start;
}

.intro-copy,
.auth-story {
  min-width: 0;
}

.intro-copy {
  display: block;
  grid-column: auto;
  align-self: start;
  margin-top: clamp(64px, 8vh, 112px);
  padding-right: 0;
}

.play-panel {
  grid-column: auto;
}

.intro-copy h1,
.auth-story h1 {
  max-width: 760px;
  margin: 22px 0 30px !important;
  color: var(--paper);
  font-size: clamp(52px, 6.4vw, 104px);
  line-height: 0.91 !important;
}

.intro-copy > p:not(.kicker),
.auth-lede {
  max-width: 570px !important;
  margin: 0 !important;
  color: #b8b0a5 !important;
  font-size: clamp(16px, 1.45vw, 20px) !important;
  line-height: 1.55;
}

.intro-copy > p b {
  color: var(--paper);
  font-weight: 600;
}

.play-panel,
.auth-entry {
  width: 100% !important;
  margin: 0 !important;
  padding: clamp(26px, 3vw, 42px) !important;
  color: var(--paper) !important;
  border: 1px solid var(--hairline) !important;
  border-radius: 5px !important;
  background: linear-gradient(145deg, rgb(255 255 255 / 4%), transparent 48%),
    rgb(24 23 21 / 84%) !important;
  backdrop-filter: blur(18px);
}

.play-panel h2,
.auth-entry h2 {
  margin: 14px 0 10px !important;
  color: var(--paper) !important;
  font-size: clamp(30px, 3vw, 46px);
  font-weight: 500;
}

.play-panel .hint,
.auth-entry .hint,
.auth-intro {
  color: var(--mut) !important;
}

.play-modes {
  display: block;
  margin-top: 28px;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: transparent;
}

.play-mode {
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--surface) !important;
}

.play-mode.is-open {
  background: var(--surface-raised) !important;
}

.play-mode + .play-mode {
  border-top: 1px solid var(--hairline) !important;
}

/* The selected mode must reveal its controls immediately and reliably. */
.play-mode-body {
  display: none !important;
  grid-template-rows: none !important;
}

.play-mode.is-open .play-mode-body {
  display: block !important;
  height: auto !important;
  padding: 0 18px 20px !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.play-mode.is-open .play-mode-body > * {
  min-height: auto !important;
}

.room-create-controls {
  display: block;
  padding: 0 18px 20px;
}

.play-mode-title {
  width: 100%;
  min-height: 66px;
  padding: 18px !important;
  color: #b5aea4 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 16.25px !important;
  font-weight: 600 !important;
  letter-spacing: 0.015em !important;
  text-align: left;
}

.play-mode.is-open .play-mode-title {
  color: var(--paper) !important;
}

.play-mode-body {
  padding: 0 18px 20px;
}

.play-mode:not(.is-open) .play-mode-body {
  height: 0;
  padding-block: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
}

.play-mode.is-open .play-mode-body {
  visibility: visible;
  opacity: 1;
  transition: opacity 280ms ease 100ms;
}

.targets {
  display: grid;
  grid-template-columns: repeat(4, minmax(34px, 1fr));
  gap: 6px;
}

.room-create-controls .targets {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  gap: 10px;
}

.room-create-controls .target {
  width: 100% !important;
}

.target {
  width: auto;
}

.play-mode #join {
  min-width: 124px;
  flex: 0 0 auto;
  padding-inline: 20px;
  white-space: nowrap;
}

.play-mode #join-code {
  padding-inline: 9px !important;
}

.taste-quotes {
  position: relative;
  width: min(100%, 570px);
  min-height: 48px;
  margin-top: 44px;
  padding-left: 22px;
  border-left: 1px solid #6e665e;
}

.taste-quotes p {
  position: absolute;
  top: 50%;
  right: 0;
  left: 22px;
  margin: 0 !important;
  color: #d1c9bd !important;
  font-size: 14px !important;
  font-weight: 500;
  letter-spacing: 0.03em;
  opacity: 0;
  transform: translateY(-50%);
}

.taste-quotes p.is-current {
  opacity: 1;
}

.taste-marquee {
  width: min(100%, 570px);
  margin-top: 8px;
  padding: 12px 0;
  overflow: hidden;
  color: #766f66;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.taste-marquee > div {
  width: max-content;
}

.game {
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1px;
  margin-top: 34px;
  overflow: hidden;
  border: 1px solid var(--hairline) !important;
  border-radius: 5px !important;
  background: var(--hairline) !important;
}

.board,
.side {
  border: 0 !important;
  border-radius: 0 !important;
}

.board {
  min-height: 650px;
  padding: clamp(28px, 4vw, 58px);
  color: var(--paper) !important;
  background: radial-gradient(
      circle at 70% 15%,
      rgb(122 63 72 / 14%),
      transparent 22rem
    ),
    #151412 !important;
}

.side {
  padding: 24px;
  color: var(--paper) !important;
  background: #1d1b19 !important;
}

.prompt {
  margin-top: 80px;
}

.prompt h1,
.lobby-state h1,
.result h1,
.end h1 {
  color: var(--paper) !important;
  font-weight: 500 !important;
}

.prompt-slot {
  display: inline-block;
  width: 2.7em;
  height: 0.09em;
  margin-inline: 0.08em;
  overflow: hidden;
  vertical-align: 0.13em;
  border-radius: 999px;
  background: currentColor;
  line-height: 0;
  text-indent: -9999px;
  white-space: nowrap;
}

.answer-emphasis {
  color: #c67d88 !important;
  text-shadow: none !important;
}

.hand {
  perspective: 900px;
}

.hand .card,
.answer {
  color: var(--paper) !important;
  border: 1px solid var(--hairline) !important;
  border-radius: 4px !important;
  background: #211f1c !important;
}

.hand .card {
  min-height: 184px;
}

.hand {
  position: relative;
  z-index: 0;
  overflow: visible;
  padding-top: 34px !important;
}

.hand .card {
  position: relative;
  z-index: 1;
}

.hand .card:hover,
.hand .card.on,
.answer:hover,
.answer.on {
  border-color: #80766d !important;
  background: #292623 !important;
}

.hand .card:hover,
.hand .card.on {
  z-index: 3;
}

.answer.on {
  color: #fff9f0 !important;
  border-color: var(--accent) !important;
  background: var(--accent) !important;
}

.answer.on .answer-emphasis {
  color: #fff9f0 !important;
}

.answer.self-answer {
  color: #a69d92 !important;
  border-style: dashed !important;
  background: rgb(255 255 255 / 2%) !important;
  cursor: not-allowed;
}

.hand .card small {
  color: #a66a73 !important;
  letter-spacing: 0.1em;
}

.hand .card span {
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.2;
}

/* Polling must never leave a playable card mid-fade or visually unavailable. */
.hand .card:not(:disabled),
.answers .answer:not(:disabled) {
  opacity: 1 !important;
}

.roomcode,
.room-code-share .roomcode {
  color: var(--paper) !important;
  border: 1px solid var(--hairline) !important;
  border-radius: 3px !important;
  background: rgb(255 255 255 / 3%) !important;
  font-weight: 500 !important;
  letter-spacing: 0.18em !important;
}

.room-code-share .roomcode {
  min-height: 76px;
  padding: 18px 16px !important;
  line-height: 1.1;
  font-size: 13px !important;
  letter-spacing: 0.06em !important;
}

.side .player {
  color: var(--paper) !important;
}

.lobby-player,
.rank div,
.score {
  color: var(--paper) !important;
  border: 1px solid var(--hairline) !important;
  border-radius: 3px !important;
  background: rgb(255 255 255 / 3%) !important;
}

.side .score small,
.side .score strong {
  color: var(--paper) !important;
}

.side .score strong {
  font-size: 56px;
}

.lobby-count {
  color: var(--paper) !important;
  font-weight: 600;
}

.mobile-roster {
  display: none;
}

.dot {
  background: #82927f;
  box-shadow: none;
}

.pulse {
  width: 44px;
  height: 44px;
  border: 1px solid #776f67 !important;
  border-radius: 50% !important;
  background: transparent !important;
}

.waiting-clock {
  position: relative;
  box-shadow: none !important;
}

.waiting-clock::before,
.waiting-clock::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  content: "";
  border-radius: 2px;
  background: #bdb4aa;
  transform-origin: 50% 100%;
}

.waiting-clock::before {
  height: 14px;
  transform: translate(-50%, -100%) rotate(-28deg);
}

.waiting-clock::after {
  height: 11px;
  transform: translate(-50%, -100%) rotate(118deg);
}

.win-card {
  color: var(--paper) !important;
  border: 1px solid var(--hairline) !important;
  border-radius: 4px !important;
  background: #211f1c !important;
}

.timer {
  color: var(--mut) !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timer b {
  color: var(--paper) !important;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: transparent !important;
  clip-path: none;
}

.auth-choice {
  width: 100%;
  max-width: none !important;
  text-align: left !important;
}

.auth-entry .panel {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.auth-entry .auth-tabs {
  gap: 7px;
}

.auth-entry .auth-tabs[hidden] {
  display: none !important;
}

.auth-entry .auth-tabs button {
  flex: 1;
}

.auth-entry .primary {
  color: #fff9f0 !important;
  border-color: var(--accent) !important;
  background: var(--accent) !important;
}

.auth-entry .ghost {
  color: var(--paper) !important;
  border-color: var(--hairline) !important;
  background: transparent !important;
}

.auth-entry form label {
  color: #9d968d !important;
}

.auth-entry .auth-intro {
  display: grid;
  gap: 9px;
  margin: 8px 0 0;
  padding: 22px 0 4px;
  color: #c7c0b6 !important;
  border-top: 1px solid var(--hairline);
  font-size: 15px;
  line-height: 1.55;
}

.auth-entry .auth-intro strong {
  color: var(--paper);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.auth-entry .auth-intro span {
  max-width: 36ch;
}

.profile-card,
.security,
.history {
  color: var(--paper) !important;
  border: 1px solid var(--hairline) !important;
  border-radius: 5px !important;
  background: var(--surface) !important;
}

.profile-card > h1 {
  color: var(--paper) !important;
  font-weight: 500 !important;
  font-size: clamp(32px, 4vw, 54px) !important;
  line-height: 1.05 !important;
  margin: 0 0 10px !important;
  letter-spacing: -0.045em !important;
  text-transform: none !important;
}

.profile-card > .eyebrow {
  color: var(--paper) !important;
  margin: 0 0 22px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: none;
}

.profile-card {
  padding: 34px !important;
}

.profile-card > p {
  margin: 0 !important;
  color: #bdb5aa !important;
  font-size: 16px !important;
  line-height: 1.45 !important;
}

.profile-card-tools {
  top: 24px !important;
  right: 24px !important;
}

.room-target-picker {
  width: min(100%, 760px) !important;
  margin: 20px 0 0 !important;
  padding: 28px !important;
}

.room-target-picker .targets {
  grid-template-columns: repeat(4, 84px) !important;
  justify-content: start;
  gap: 12px !important;
}

.room-target-picker .target {
  width: 84px;
  min-height: 56px;
}

.room-target-picker .actions {
  display: flex;
  gap: 12px;
  margin-top: 20px !important;
}

.room-target-picker .actions button {
  width: auto;
  min-width: 190px;
}

.profile-card-tool {
  width: 60px !important;
  height: 60px !important;
  color: var(--paper) !important;
  border-color: var(--hairline) !important;
  border-radius: 4px !important;
  background: transparent !important;
}

.profile-card-tool svg {
  width: 23px !important;
  height: 23px !important;
}

.profile-card-tool:hover {
  border-color: #8e857a !important;
  background: rgb(255 255 255 / 4%) !important;
}

body > main:not(.app) {
  color: var(--paper);
}

body > main:not(.app) .notice {
  margin-top: 28px;
  color: #b9b1a7;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: rgb(255 255 255 / 2%);
}

.stats {
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: var(--hairline);
}

.stat,
.stat:nth-child(2) {
  padding: 28px;
  color: var(--paper);
  border: 0 !important;
  background: var(--surface) !important;
}

.stat strong,
.stat:nth-child(2) strong {
  color: var(--paper);
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 500;
  letter-spacing: -0.055em;
}

.stat small {
  color: var(--mut);
  letter-spacing: 0.035em;
}

.layout {
  grid-template-columns: minmax(340px, 5fr) minmax(0, 7fr);
  gap: 1px;
  overflow: visible;
  background: var(--hairline);
}

.create,
.library {
  padding: clamp(26px, 3vw, 46px);
  color: var(--paper);
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--surface) !important;
}

.library {
  background: #1c1a18 !important;
}

.create h1 {
  max-width: 540px;
  color: var(--paper);
  font-size: clamp(42px, 4.5vw, 70px);
  font-weight: 500;
  line-height: 0.98 !important;
}

.switch,
.filters {
  gap: 6px;
}

.library .card {
  grid-template-columns: 94px minmax(0, 1fr) 100px auto;
  padding: 18px 0;
  color: var(--paper);
  border-top: 1px solid var(--hairline);
}

.library .card .text {
  font-weight: 500;
  letter-spacing: -0.006em;
  line-height: 1.42;
}

.badge,
.published,
.draft,
.disabled {
  color: #c7c0b6 !important;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  background: transparent !important;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.published {
  color: #9fb09d !important;
}

.draft {
  color: #c3b79e !important;
}

.disabled {
  color: #a67a7f !important;
}

.placeholder-box {
  color: #bbb3a8 !important;
  border: 1px solid var(--hairline) !important;
  border-radius: 4px !important;
  background: #151412 !important;
}

.invite-panel,
.invite-result,
.invite-item {
  border: 1px solid var(--hairline) !important;
  border-radius: 4px !important;
}

.close-room-modal,
.logout-confirm,
.home-confirm {
  background: rgb(9 8 7 / 82%) !important;
  backdrop-filter: blur(10px);
}

.close-room-dialog,
.logout-confirm-card,
.home-confirm-card,
.room-target-picker,
.end-target-picker {
  color: var(--paper) !important;
  border: 1px solid var(--hairline) !important;
  border-radius: 5px !important;
  background: var(--surface-raised) !important;
}

@media (max-width: 900px) {
  .intro,
  .auth-choice {
    display: block !important;
    min-height: auto;
    padding: 72px 0 96px;
  }

  .intro-copy {
    margin-top: 0;
  }

  .play-panel,
  .auth-entry {
    width: min(100%, 650px) !important;
    margin-top: 64px !important;
  }

  .game {
    display: flex;
    flex-direction: column;
  }

  .side {
    order: -1;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .create {
    position: static;
  }
}

@media (max-width: 600px) {
  .app,
  body > main:not(.app) {
    padding: 16px 15px 48px;
  }

  .app > header,
  body > main:not(.app) > header {
    min-height: 56px;
  }

  .brand,
  body > main:not(.app) > header b {
    font-size: 16px;
  }

  .intro-copy h1,
  .auth-story h1 {
    font-size: clamp(48px, 15vw, 70px);
    line-height: 0.91 !important;
  }

  .play-panel,
  .auth-entry {
    padding: 24px 20px !important;
  }

  .play-modes {
    display: block;
    background: transparent;
  }

  .play-mode + .play-mode {
    border-top: 1px solid var(--hairline) !important;
  }

  .targets {
    grid-template-columns: repeat(4, 1fr);
  }

  .row {
    flex-direction: column;
  }

  .row .ghost {
    width: 100%;
  }

  .board {
    padding: 30px 18px;
  }

  .layout {
    gap: 1px;
  }

  .create,
  .library {
    min-width: 0;
    padding: 26px 18px;
  }

  .create h1 {
    font-size: clamp(42px, 13vw, 60px);
  }

  .create .actions .primary,
  .create .actions .ghost {
    width: 100%;
    max-width: none;
  }

  .library-top {
    align-items: stretch;
    flex-direction: column;
  }

  .library-top input {
    width: 100%;
  }

  .filters {
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .library .card {
    grid-template-columns: 1fr auto;
  }

  .library .card .type,
  .library .card .text {
    grid-column: 1;
  }

  .library .card .badge,
  .library .card .card-actions {
    grid-column: 2;
  }
}
