/*
 * Poke Sketch design system
 * A playful, production-ready party-game skin layered after style.css.
 */

:root {
  --ink: #111a36;
  --ink-2: #19254b;
  --ink-3: #26345f;
  --paper: #fffaf0;
  --paper-2: #fff4df;
  --paper-3: #f6ead4;
  --white: #ffffff;
  --cobalt: #4169e8;
  --cobalt-dark: #2f50c6;
  --coral: #ff6b67;
  --coral-dark: #dc4c50;
  --yellow: #ffd34e;
  --yellow-dark: #e3a921;
  --mint: #63d9b6;
  --mint-dark: #269b7d;
  --sky: #77c9ff;
  --lavender: #b6a8ff;
  --text: #17213f;
  --muted: #66708b;
  --line: #d9d5cb;
  --danger: #d84852;
  --success: #168b6c;

  /* Backward-compatible tokens used throughout the existing game. */
  --red: var(--coral);
  --red-dark: var(--coral-dark);
  --blue: var(--cobalt);
  --teal: var(--mint);
  --dark: var(--ink);
  --mid: var(--muted);
  --light: #f1eee6;

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --shadow-xs: 0 2px 0 rgba(9, 15, 36, .12);
  --shadow: 0 12px 30px rgba(8, 15, 38, .16);
  --shadow-lg: 0 24px 70px rgba(6, 11, 30, .28);
  --paper-shadow: 0 5px 0 rgba(9, 15, 36, .16), 0 20px 45px rgba(4, 9, 28, .18);
  --ease-bounce: cubic-bezier(.2, .85, .24, 1.18);
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
  scrollbar-color: rgba(65, 105, 232, .55) rgba(17, 26, 54, .08);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  touch-action: manipulation;
}

a {
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

::selection {
  color: var(--ink);
  background: var(--yellow);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

input::placeholder,
textarea::placeholder {
  color: #8b91a4;
  opacity: 1;
}

.ps-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.ps-icon svg {
  display: block;
}

.hidden,
[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Shared buttons and fields */
.btn {
  min-height: 46px;
  padding: .72rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 14px;
  box-shadow: 0 4px 0 rgba(10, 17, 43, .18);
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: .96rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .005em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .48rem;
  cursor: pointer;
  transition:
    transform 160ms var(--ease-bounce),
    box-shadow 160ms ease,
    filter 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(10, 17, 43, .16), 0 12px 24px rgba(10, 17, 43, .14);
  filter: none;
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(10, 17, 43, .18);
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-create,
.btn-primary {
  color: #fff;
  background: var(--coral);
  border-color: var(--coral-dark);
}

.btn-create:hover,
.btn-primary:hover {
  background: #ff7c76;
}

.btn-join {
  color: #fff;
  background: var(--cobalt);
  border-color: var(--cobalt-dark);
}

.btn-join:hover {
  background: #5178ef;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.input-group label,
.profile-row label {
  color: var(--text);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.input-shell {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: 0 .9rem;
  color: var(--muted);
  background: #fff;
  border: 2px solid #dcd9d1;
  border-radius: 14px;
  box-shadow: inset 0 2px 0 rgba(17, 26, 54, .025);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-shell:focus-within {
  color: var(--cobalt);
  background: #fff;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 4px rgba(65, 105, 232, .12);
}

.input-shell > .ps-icon svg {
  width: 20px;
  height: 20px;
}

.input-shell input,
.input-group .input-shell input {
  width: 100%;
  min-width: 0;
  padding: .68rem 0;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  font-size: 1rem;
  font-weight: 800;
}

.input-shell input:focus,
.input-group .input-shell input:focus {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.code-shell input {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 1.2rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.home-error,
.gen-error,
.bug-error,
.fp-add-error {
  color: #9f2936;
  background: #fff0ee;
  border: 2px solid #f4b5b2;
  border-radius: 12px;
  font-size: .82rem;
  font-weight: 800;
}

/* Home shell */
.home-body {
  min-height: 100vh;
  padding: 0;
  display: block;
  overflow-x: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 8% 12%, rgba(119, 201, 255, .2) 0 2px, transparent 3px),
    radial-gradient(circle at 88% 22%, rgba(255, 211, 78, .22) 0 2px, transparent 3px),
    linear-gradient(145deg, #101831 0%, #162249 52%, #111934 100%);
  background-size: 34px 34px, 42px 42px, auto;
}

.home-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
}

.home-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-loop {
  position: absolute;
  width: 440px;
  height: 440px;
  border: 32px solid rgba(99, 217, 182, .08);
  border-radius: 47% 53% 58% 42%;
  transform: rotate(22deg);
}

.ambient-loop-one {
  top: -210px;
  left: -155px;
}

.ambient-loop-two {
  right: -220px;
  bottom: 3%;
  width: 520px;
  height: 520px;
  border-color: rgba(255, 107, 103, .08);
  transform: rotate(-28deg);
}

.ambient-star {
  position: absolute;
  color: rgba(255, 211, 78, .6);
  font-family: "Fredoka", sans-serif;
  font-size: 3rem;
  line-height: 1;
}

.ambient-star-one {
  top: 18%;
  left: 4%;
  transform: rotate(-15deg);
}

.ambient-star-two {
  right: 6%;
  top: 49%;
  color: rgba(119, 201, 255, .5);
  transform: rotate(18deg);
}

.ambient-doodle {
  position: absolute;
  right: 12%;
  top: 9%;
  color: rgba(255, 255, 255, .06);
  font-family: "Fredoka", sans-serif;
  font-size: 12rem;
  font-weight: 700;
  transform: rotate(12deg);
}

.site-nav {
  width: min(100% - 48px, 1240px);
  min-height: 76px;
  margin: 0 auto;
  padding: 14px 210px 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, .11);
}

.nav-brand,
.lobby-brand,
.stage-brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: inherit;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav-brand {
  color: #fff;
  font-size: 1.24rem;
}

.nav-brand-mark {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--paper);
  border: 3px solid var(--yellow);
  border-radius: 15px;
  box-shadow: 0 4px 0 rgba(5, 10, 28, .24);
  transform: rotate(-3deg);
}

.nav-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.nav-links a {
  min-height: 40px;
  padding: .58rem .85rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: rgba(255, 255, 255, .78);
  border-radius: 11px;
  font-size: .84rem;
  font-weight: 800;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .09);
  transform: translateY(-1px);
}

.home-wrapper,
.home-main {
  width: min(100% - 48px, 1240px);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(46px, 7vw, 94px) 0 40px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(42px, 6vw, 80px);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  align-items: center;
  gap: clamp(34px, 5vw, 76px);
}

.hero-copy {
  position: relative;
  min-width: 0;
  padding-bottom: 252px;
}

.eyebrow,
.lobby-eyebrow,
.overlay-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--mint);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .105em;
  line-height: 1.2;
  text-transform: uppercase;
}

.live-dot,
.deck-status i,
.sketch-live i,
.chat-live-pill i,
.waiting-pulse,
.artist-status-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  flex: 0 0 auto;
  background: var(--mint);
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(99, 217, 182, .16);
}

.hero-title {
  max-width: 760px;
  margin: .9rem 0 1rem;
  color: #fff;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: clamp(3.25rem, 6vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -.047em;
  line-height: .91;
}

.hero-title span {
  color: var(--yellow);
  text-shadow: 0 5px 0 rgba(7, 12, 34, .28);
}

.hero-lede {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  font-weight: 700;
  line-height: 1.62;
}

.hero-chips {
  margin-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.hero-chip {
  min-height: 36px;
  padding: .45rem .72rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: #fff;
  background: rgba(255, 255, 255, .075);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero-sketch-card {
  position: absolute;
  left: clamp(8px, 6vw, 78px);
  bottom: 0;
  width: min(440px, calc(100% - 24px));
  height: 210px;
  color: var(--text);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 10px 12px 0 rgba(5, 10, 28, .24);
  transform: rotate(-2.25deg);
}

.hero-sketch-card::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 43%;
  width: 76px;
  height: 24px;
  background: rgba(255, 211, 78, .78);
  border: 1px solid rgba(17, 26, 54, .08);
  transform: rotate(3deg);
}

.sketch-card-top {
  height: 42px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px dashed #d9d1bf;
  font-family: "Fredoka", sans-serif;
  font-size: .72rem;
  font-weight: 700;
}

.sketch-live {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--coral-dark);
}

.sketch-live i {
  width: 7px;
  height: 7px;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 107, 103, .12);
}

.sketch-timer {
  padding: .22rem .5rem;
  color: #fff;
  background: var(--cobalt);
  border-radius: 8px;
}

.sketch-canvas {
  position: relative;
  height: 116px;
  overflow: hidden;
  background:
    linear-gradient(rgba(65, 105, 232, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(65, 105, 232, .045) 1px, transparent 1px),
    #fffef9;
  background-size: 18px 18px;
}

.sketch-face {
  position: absolute;
  left: 50%;
  top: 58%;
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
  font-size: 2.3rem;
  font-weight: 700;
  transform: translate(-50%, -50%) rotate(2deg);
}

.sketch-ear {
  position: absolute;
  top: 20px;
  width: 40px;
  height: 72px;
  background: var(--yellow);
  border: 4px solid var(--ink);
  border-radius: 65% 35% 45% 55%;
}

.sketch-ear-left {
  left: calc(50% - 76px);
  transform: rotate(-31deg);
}

.sketch-ear-right {
  right: calc(50% - 76px);
  transform: scaleX(-1) rotate(-31deg);
}

.sketch-tail {
  position: absolute;
  right: 52px;
  top: 44px;
  width: 58px;
  height: 42px;
  border-top: 12px solid var(--yellow);
  border-right: 12px solid var(--yellow);
  transform: skew(-18deg) rotate(10deg);
  filter: drop-shadow(3px 3px 0 var(--ink));
}

.sketch-guesses {
  position: absolute;
  inset: auto 12px -18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
}

.guess-pill {
  padding: .42rem .62rem;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 rgba(17, 26, 54, .14);
  font-size: .67rem;
  font-weight: 900;
  white-space: nowrap;
}

.guess-two {
  background: var(--yellow);
  transform: translateY(7px);
}

.guess-three {
  color: #fff;
  background: var(--mint-dark);
}

.play-deck {
  position: relative;
  color: var(--text);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: 11px 13px 0 rgba(5, 10, 28, .24), var(--shadow-lg);
  overflow: hidden;
}

.play-deck::after {
  content: "";
  position: absolute;
  right: -45px;
  bottom: -55px;
  width: 140px;
  height: 140px;
  border: 20px solid rgba(65, 105, 232, .07);
  border-radius: 50%;
  pointer-events: none;
}

.play-deck-head {
  padding: 1.35rem 1.45rem 1.05rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.play-deck .section-kicker {
  color: var(--cobalt);
}

.play-deck h2,
.section-heading h2,
.browse-title,
.mode-card h2 {
  margin: .18rem 0 0;
  color: var(--ink);
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.05;
}

.play-deck h2 {
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
}

.deck-status {
  padding: .38rem .62rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: #13785e;
  background: #e9fbf4;
  border: 1px solid #b9eadb;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 900;
}

.deck-status i {
  width: 7px;
  height: 7px;
}

.entry-tabs {
  margin: 0 1.45rem;
  padding: 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--paper-3);
  border-radius: 13px;
}

.entry-tab {
  min-height: 42px;
  padding: .55rem .65rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.entry-tab:hover {
  color: var(--ink);
}

.entry-tab.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 7px rgba(17, 26, 54, .1);
}

.play-deck .home-error {
  width: auto;
  max-width: none;
  margin: .9rem 1.45rem 0;
}

.home-cards {
  width: 100%;
  display: block;
}

.home-card,
.entry-panel {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 1.25rem 1.45rem 1.45rem;
  display: none;
  flex-direction: column;
  gap: .95rem;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}

.home-card.active,
.entry-panel.active {
  display: flex;
  animation: panel-enter 220ms ease both;
}

.home-card:hover {
  transform: none;
}

.form-intro {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}

.form-intro h3 {
  margin: 0;
  color: var(--ink);
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.form-intro p {
  margin: .12rem 0 0;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.4;
}

.form-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--coral);
  border: 2px solid var(--coral-dark);
  border-radius: 13px;
  box-shadow: 0 3px 0 rgba(17, 26, 54, .13);
  transform: rotate(-3deg);
}

.form-icon-blue {
  background: var(--cobalt);
  border-color: var(--cobalt-dark);
  transform: rotate(3deg);
}

.form-icon svg {
  width: 20px;
  height: 20px;
}

.btn-primary {
  width: 100%;
  margin-top: .12rem;
}

.card-join .btn-primary {
  background: var(--cobalt);
  border-color: var(--cobalt-dark);
}

.form-footnote {
  margin: -.15rem 0 0 !important;
  color: #7d8293 !important;
  font-size: .7rem !important;
  font-weight: 800 !important;
  text-align: center;
}

@keyframes panel-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.how-strip {
  color: var(--text);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: var(--paper-shadow);
  overflow: hidden;
}

.section-heading {
  padding: 1.5rem 1.65rem 1.2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 2px dashed #d8d0bf;
}

.section-heading .section-kicker,
.section-card .section-kicker {
  color: var(--cobalt);
}

.section-heading h2,
.browse-title,
.mode-card h2 {
  font-size: clamp(1.65rem, 3vw, 2.3rem);
}

.section-heading > p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.how-card {
  position: relative;
  min-height: 230px;
  padding: 1.4rem;
  color: var(--text);
  border-right: 2px dashed #ddd4c3;
}

.how-card:last-child {
  border-right: 0;
}

.step-no {
  position: absolute;
  top: 1.1rem;
  right: 1.2rem;
  color: #d8d2c5;
  font-family: "Fredoka", sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

.how-icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--mint);
  border: 3px solid var(--ink);
  border-radius: 17px;
  box-shadow: 4px 4px 0 rgba(17, 26, 54, .14);
  transform: rotate(-4deg);
}

.how-icon svg {
  width: 25px;
  height: 25px;
}

.how-icon-blue {
  background: var(--sky);
  transform: rotate(4deg);
}

.how-icon-coral {
  background: var(--coral);
}

.how-icon-yellow {
  background: var(--yellow);
}

.how-card h3 {
  margin: 1rem 0 .38rem;
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.how-card p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.55;
}

.home-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 1.25rem;
}

.section-card,
.browse-section {
  width: 100%;
  max-width: none;
  padding: 1.45rem;
  color: var(--text);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--paper-shadow);
}

.browse-header {
  margin-bottom: 1rem;
  padding-bottom: .9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px dashed #d8d0bf;
}

.browse-title {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.btn-browse-refresh {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 13px;
  box-shadow: 0 3px 0 rgba(17, 26, 54, .16);
  cursor: pointer;
  transition: transform 180ms var(--ease-bounce), background 150ms ease;
}

.btn-browse-refresh:hover {
  color: var(--ink);
  background: #ffdf74;
  border-color: var(--ink);
  transform: rotate(12deg) translateY(-1px);
}

.browse-list {
  max-height: 310px;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  overflow: auto;
  padding: 2px 5px 5px 2px;
}

.browse-empty {
  margin: 0;
  padding: 1.35rem;
  color: var(--muted);
  background: #f5efe3;
  border: 2px dashed #d5cdbd;
  border-radius: 14px;
  font-size: .85rem;
}

.browse-row {
  min-height: 66px;
  padding: .72rem .8rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  color: var(--text);
  background: #fff;
  border: 2px solid #e1ddd4;
  border-radius: 15px;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.browse-row:hover {
  background: #fff;
  border-color: var(--cobalt);
  box-shadow: 0 5px 14px rgba(17, 26, 54, .09);
  transform: translateY(-1px);
}

.browse-info {
  min-width: 0;
}

.browse-host {
  color: var(--ink);
  font-size: .9rem;
  font-weight: 900;
}

.browse-meta {
  color: var(--muted);
  font-size: .72rem;
}

.browse-code {
  padding: .28rem .52rem;
  color: var(--cobalt-dark);
  background: #edf1ff;
  border-radius: 8px;
  font-family: "Fredoka", sans-serif;
  font-size: .9rem;
  letter-spacing: .12em;
}

.browse-join-btn {
  min-height: 36px;
  padding: .45rem .78rem !important;
  color: #fff;
  background: var(--cobalt);
  border-color: var(--cobalt-dark);
  border-radius: 10px;
  font-size: .74rem !important;
}

.mode-card {
  position: relative;
  min-height: 100%;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  color: #fff;
  background: var(--cobalt);
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--paper-shadow);
}

.mode-card::before {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -70px;
  width: 190px;
  height: 190px;
  border: 28px solid rgba(255, 255, 255, .09);
  border-radius: 50%;
}

.mode-card .section-kicker {
  color: #c8ffe9;
}

.mode-card h2 {
  margin-top: .35rem;
  color: #fff;
}

.mode-card p {
  position: relative;
  margin: .65rem 0 1.35rem;
  color: rgba(255, 255, 255, .78);
  font-size: .9rem;
  font-weight: 700;
}

.mode-card-art {
  width: 56px;
  height: 56px;
  margin-bottom: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 17px;
  box-shadow: 4px 4px 0 rgba(17, 26, 54, .18);
  transform: rotate(4deg);
}

.mode-card-art svg {
  width: 27px;
  height: 27px;
}

.mode-link {
  position: relative;
  margin-top: auto;
  min-height: 42px;
  padding: .58rem .8rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 11px;
  box-shadow: 0 3px 0 rgba(17, 26, 54, .2);
  font-family: "Fredoka", sans-serif;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 150ms var(--ease-bounce), background 150ms ease;
}

.mode-link:hover {
  background: #ffdf75;
  transform: translateY(-2px);
}

/* Co-op entry card */
.coop-mode-launch {
  position: relative;
  margin: .15rem 0 .75rem;
  padding: .8rem;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: .7rem;
  color: var(--ink);
  text-decoration: none;
  background: #e9fff4;
  border: 2px solid #42b883;
  border-radius: 14px;
  box-shadow: 0 3px 0 rgba(17, 26, 54, .12);
  transition: transform 150ms var(--ease-bounce), box-shadow 150ms ease;
}
.coop-mode-launch:hover { transform: translateY(-2px); box-shadow: 0 5px 0 rgba(17, 26, 54, .14); }
.coop-mode-launch strong,
.coop-mode-launch small { display: block; }
.coop-mode-launch strong { font: 800 .86rem "Fredoka", sans-serif; }
.coop-mode-launch small { margin-top: 2px; color: var(--muted); font-size: .64rem; font-weight: 800; }
.coop-mode-launch > i { padding: .25rem .45rem; color: #fff; background: var(--cobalt); border-radius: 999px; font-size: .55rem; font-style: normal; font-weight: 900; text-transform: uppercase; }
.classic-entry-label { display: flex; align-items: center; gap: .55rem; margin: .5rem 0 .85rem; color: var(--muted); font-size: .62rem; font-weight: 900; text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.classic-entry-label::before,.classic-entry-label::after { content: ""; height: 1px; flex: 1; background: #ddd5c5; }

.game-mode-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 10px;
}
.game-mode-icon svg { width: 17px; height: 17px; }
.mode-icon-coop { background: #9cefc9; }

.replay-feature-banner {
  margin: 0;
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 20%, rgba(255, 255, 255, .42) 0 3px, transparent 4px),
    var(--yellow);
  background-size: 22px 22px, auto;
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: var(--paper-shadow);
  font-family: "Nunito", sans-serif;
  text-decoration: none;
  transition: transform 170ms var(--ease-bounce), box-shadow 170ms ease;
}

.replay-feature-banner:hover {
  transform: translateY(-3px) rotate(-.2deg);
  box-shadow: 0 8px 0 rgba(9, 15, 36, .16), 0 24px 50px rgba(4, 9, 28, .2);
}

.replay-feature-banner .rfb-icon {
  width: 54px;
  height: 54px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--coral);
  border: 3px solid var(--ink);
  border-radius: 16px;
  font-size: 1.55rem;
  filter: none;
  transform: rotate(-4deg);
}

.replay-feature-banner .rfb-title {
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
}

.replay-feature-banner .rfb-badge {
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  font-size: .6rem;
  letter-spacing: .08em;
}

.replay-feature-banner .rfb-blurb {
  margin-top: .18rem;
  color: #5b4a16;
  font-size: .78rem;
  font-weight: 800;
}

.replay-feature-banner .rfb-cta {
  padding: .55rem .78rem;
  color: #fff;
  background: var(--ink);
  border-radius: 11px;
  font-size: .75rem;
  white-space: nowrap;
}

.featured-section {
  padding: 1.45rem;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .9rem;
}

.featured-card,
.drawing-card {
  position: relative;
  overflow: hidden;
  color: var(--text);
  background: #fff;
  border: 2px solid #ded9cf;
  border-radius: 16px;
  box-shadow: 0 4px 0 rgba(17, 26, 54, .11);
  transition: transform 160ms var(--ease-bounce), border-color 160ms ease, box-shadow 160ms ease;
}

.featured-card:hover,
.drawing-card:hover {
  border-color: var(--cobalt);
  box-shadow: 0 7px 0 rgba(17, 26, 54, .11), 0 14px 26px rgba(17, 26, 54, .1);
  transform: translateY(-3px);
}

.featured-card img,
.drawing-card img {
  width: 100%;
  display: block;
  aspect-ratio: 1;
  object-fit: contain;
  background:
    linear-gradient(45deg, #f7f3eb 25%, transparent 25%),
    linear-gradient(-45deg, #f7f3eb 25%, transparent 25%),
    #fffdf8;
  background-position: 0 0, 0 8px;
  background-size: 16px 16px;
}

.featured-card .fc-name,
.drawing-card .dc-label {
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
  font-size: .85rem;
}

.featured-card .fc-artist,
.drawing-card .dc-date {
  color: var(--muted);
}

.fc-replay {
  min-height: 32px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 0 2px 0 rgba(17, 26, 54, .16);
}

.dc-download,
.dc-replay {
  min-height: 34px;
  color: var(--ink);
  background: #f2eee5;
  border-top: 1px solid #ddd7cc;
  font-weight: 900;
}

.dc-replay {
  background: var(--yellow);
}

.site-footer {
  min-height: 92px;
  padding: 1.15rem 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  color: rgba(255, 255, 255, .65);
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.site-footer .footer-brand {
  color: #fff;
  font-size: 1rem;
}

.site-footer .nav-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.site-footer p {
  margin: 0;
  font-size: .78rem;
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .25rem;
}

.footer-links a {
  padding: .45rem .58rem;
  color: rgba(255, 255, 255, .68);
  border-radius: 8px;
  font-size: .75rem;
  font-weight: 800;
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

/* Account and social surfaces */
.account-widget {
  position: fixed;
  top: 14px;
  right: 20px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}

.acct-chip {
  min-height: 48px;
  padding: 4px 14px 4px 5px;
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(4, 9, 28, .22);
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms var(--ease-bounce), box-shadow 160ms ease;
}

.acct-chip:hover {
  filter: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(4, 9, 28, .18);
}

.acct-chip img {
  width: 36px;
  height: 36px;
  border: 2px solid #ded8cc;
}

.acct-chip .acct-name {
  max-width: 128px;
}

#acct-signin {
  gap: 9px;
}

.signin-perks {
  max-width: 230px;
  padding: .75rem .85rem;
  color: var(--text);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 15px;
  box-shadow: 0 5px 0 rgba(4, 9, 28, .18);
}

.signin-perks::before {
  border-color: transparent transparent var(--ink) transparent;
}

.signin-perks::after {
  border-color: transparent transparent var(--paper) transparent;
}

.signin-perks .sp-title {
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
  font-size: .78rem;
}

.signin-perks li {
  color: var(--muted);
  font-size: .7rem;
}

.signin-perks li::before {
  color: var(--coral);
}

.supp-perks .sp-join {
  min-height: 34px;
  padding: .48rem .65rem;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 9px;
}

.supp-perks .sp-dismiss {
  color: var(--muted);
}

.friends-launch {
  position: fixed;
  top: 88px;
  left: 22px;
  z-index: 1150;
  min-height: 42px;
  padding: .5rem .8rem;
  display: flex;
  align-items: center;
  gap: .42rem;
  color: var(--ink);
  background: var(--mint);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 0 4px 0 rgba(4, 9, 28, .22);
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms var(--ease-bounce), box-shadow 160ms ease;
}

.friends-launch:hover {
  filter: none;
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 0 6px 0 rgba(4, 9, 28, .18);
}

.friends-launch .fl-badge {
  color: #fff;
  background: var(--coral-dark);
}

.friends-panel {
  position: fixed;
  inset: 12px 12px 12px auto;
  width: min(390px, calc(100vw - 24px));
  max-width: none;
  z-index: 1300;
  overflow: hidden;
  color: var(--text);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: -10px 14px 0 rgba(5, 10, 28, .2), 0 28px 70px rgba(5, 10, 28, .35);
  transform: translateX(calc(100% + 36px));
  transition: transform 260ms var(--ease-bounce);
}

.friends-panel.show {
  transform: translateX(0);
}

.friends-panel.hidden {
  display: none;
}

.fp-head {
  min-height: 68px;
  padding: .9rem 1rem;
  color: #fff;
  background: var(--cobalt);
  border-bottom: 3px solid var(--ink);
}

.fp-title {
  font-family: "Fredoka", sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
}

.fp-title .ps-icon svg {
  width: 22px;
  height: 22px;
}

.fp-close {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(17, 26, 54, .18);
  border: 2px solid rgba(255, 255, 255, .28);
  border-radius: 11px;
}

.fp-close:hover {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--ink);
}

.fp-tabs {
  padding: .7rem .9rem 0;
  gap: 5px;
  background: var(--paper);
}

.fp-tab {
  min-height: 40px;
  padding: .48rem .55rem;
  color: var(--muted);
  background: #eee8dc;
  border: 0;
  border-radius: 10px 10px 0 0;
  font-family: "Fredoka", sans-serif;
  font-size: .8rem;
  font-weight: 700;
}

.fp-tab.active {
  color: #fff;
  background: var(--cobalt);
  border-bottom-color: transparent;
}

.fp-body {
  padding: 1rem 1rem 1.25rem;
}

.fp-code {
  min-height: 42px;
  margin-bottom: .75rem;
  padding: .58rem .65rem;
  color: var(--muted);
  background: #f1eadc;
  border: 2px dashed #d4cbbb;
  border-radius: 11px;
  font-size: .75rem;
}

.fp-code strong {
  color: var(--cobalt-dark);
  font-family: "Fredoka", sans-serif;
  font-size: .85rem;
  letter-spacing: .09em;
}

.fp-copy {
  width: 32px;
  height: 32px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 9px;
  cursor: pointer;
}

.fp-add {
  gap: .5rem;
}

.fp-add-input {
  min-width: 0;
  min-height: 44px;
  padding: .58rem .7rem;
  color: var(--text);
  background: #fff;
  border: 2px solid #dcd8cf;
  border-radius: 11px;
}

.fp-add-input:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(65, 105, 232, .11);
}

.fp-add-btn {
  min-width: 66px;
  min-height: 44px;
  color: #fff;
  background: var(--cobalt);
  border: 2px solid var(--cobalt-dark);
  border-radius: 11px;
  box-shadow: 0 3px 0 rgba(17, 26, 54, .15);
}

.fp-add-error {
  margin-top: .5rem;
  padding: .45rem .58rem;
}

.fp-section-title {
  margin: 1rem 0 .45rem;
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .09em;
}

.fp-row {
  min-height: 58px;
  margin-bottom: .45rem;
  padding: .5rem .55rem;
  background: #fff;
  border: 2px solid #e1ddd5;
  border-radius: 13px;
}

.fp-name {
  overflow: hidden;
  color: var(--text);
  font-size: .85rem;
  font-weight: 900;
}

.fp-name-txt {
  overflow: hidden;
}

.fp-name-txt,
.fp-name-txt em {
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fp-name-txt em {
  color: var(--muted);
}

.fp-av {
  width: 34px;
  height: 34px;
  border: 2px solid #ddd7cb;
}

.fp-av-ph {
  color: var(--muted);
  background: #eee8dc;
}

.fp-dot.on {
  background: var(--mint-dark);
  box-shadow: 0 0 0 3px rgba(38, 155, 125, .16);
}

.fp-dot.off {
  background: #b7b7bd;
}

.fp-mini {
  min-height: 34px;
  padding: .35rem .55rem;
  color: var(--text);
  background: #eee9df;
  border: 1px solid #dcd5c8;
  border-radius: 9px;
  font-size: .72rem;
  font-weight: 900;
}

.fp-join {
  color: #fff;
  background: var(--cobalt);
  border-color: var(--cobalt-dark);
}

.fp-accept {
  color: #116d56;
  background: #dff8ef;
  border-color: #91dac5;
}

.fp-decline:hover,
.fp-remove:hover {
  color: #a42d38;
  background: #fff0ee;
  border-color: #efb2b0;
}

.fp-empty {
  margin-top: .65rem;
  padding: 1.5rem .8rem;
  color: var(--muted);
  background: #f2ecdf;
  border: 2px dashed #d5cdbd;
  border-radius: 13px;
}

.fp-drawings-grid {
  gap: .7rem;
}

.fp-draw-card {
  overflow: hidden;
  background: #fff;
  border: 2px solid #ded8ce;
  border-radius: 14px;
  box-shadow: 0 3px 0 rgba(17, 26, 54, .1);
}

.fp-draw-card img {
  background: #fffdf7;
}

.fp-draw-label {
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
}

.fp-draw-label em {
  color: var(--muted);
  font-family: "Nunito", sans-serif;
}

.fp-draw-replay {
  min-height: 30px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 0 2px 0 rgba(17, 26, 54, .15);
}

.friend-invite-toast {
  min-width: min(360px, calc(100vw - 30px));
  padding: .9rem 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 17px;
  box-shadow: 0 7px 0 rgba(5, 10, 28, .2), var(--shadow-lg);
}

.fit-body {
  font-size: .88rem;
  font-weight: 800;
}

.fit-join,
.fit-dismiss {
  min-height: 38px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 0 3px 0 rgba(17, 26, 54, .15);
  font-family: "Fredoka", sans-serif;
}

.fit-join {
  color: #fff;
  background: var(--coral);
}

.fit-dismiss {
  color: var(--ink);
  background: #eee8dc;
}

/* Modal family */
.avatar-modal-backdrop,
.bug-modal-backdrop,
.rp-modal,
.replay-upsell {
  position: fixed;
  inset: 0;
  z-index: 2000;
  padding: clamp(14px, 3vw, 32px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: rgba(7, 12, 31, .76);
  backdrop-filter: blur(10px);
}

.avatar-modal,
.bug-modal,
.rp-card,
.replay-upsell .ru-card {
  position: relative;
  width: min(100%, 460px);
  max-width: 460px;
  max-height: min(92vh, 820px);
  padding: clamp(1.25rem, 3vw, 1.8rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
  overflow: auto;
  color: var(--text);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: 9px 10px 0 rgba(5, 10, 28, .24), var(--shadow-lg);
  animation: modal-in 220ms var(--ease-bounce) both;
}

.bug-modal {
  align-items: stretch;
}

.avatar-modal h2,
.bug-modal h2,
.rp-title,
.replay-upsell .ru-title {
  margin: 0;
  color: var(--ink);
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
  text-align: center;
}

.avatar-modal > p,
.bug-modal > p,
.rp-subtitle {
  margin: -.35rem 0 .1rem;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.acct-modal {
  width: min(100%, 520px) !important;
  max-width: 520px !important;
}

.avatar-canvas-wrap,
.border-canvas-wrap {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(45deg, #ece8df 25%, transparent 25%),
    linear-gradient(-45deg, #ece8df 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ece8df 75%),
    linear-gradient(-45deg, transparent 75%, #ece8df 75%),
    #fff;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  background-size: 18px 18px;
  border: 3px solid var(--ink);
  border-radius: 15px;
  box-shadow: 0 4px 0 rgba(17, 26, 54, .13);
}

#avatar-canvas {
  width: 200px;
  height: 200px;
  display: block;
}

.profile-pic-preview {
  width: 124px;
  height: 124px;
  background: #fff;
  border: 4px solid var(--yellow);
  box-shadow: 0 0 0 3px var(--ink), 0 6px 0 rgba(17, 26, 54, .14);
}

.avatar-palette {
  max-width: 280px;
  gap: 7px;
}

.avatar-swatch,
.border-swatch {
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(17, 26, 54, .3), 0 2px 3px rgba(17, 26, 54, .15);
}

.avatar-swatch.active,
.border-swatch.active {
  border-color: #fff;
  box-shadow: 0 0 0 3px var(--ink);
}

.avatar-tools {
  gap: .5rem;
}

.avatar-size,
.border-size,
.avatar-tool-btn {
  min-width: 38px;
  min-height: 38px;
  color: var(--text);
  background: #fff;
  border: 2px solid #d8d3c9;
  border-radius: 10px;
  font-weight: 900;
}

.avatar-size.active,
.avatar-size:hover,
.border-size.active,
.border-size:hover,
.avatar-tool-btn:hover {
  color: var(--cobalt-dark);
  background: #edf1ff;
  border-color: var(--cobalt);
}

.avatar-tool-btn.danger:hover {
  color: #a32a35;
  background: #fff0ee;
  border-color: var(--coral);
}

.avatar-sep {
  background: #d9d3c7;
}

.avatar-actions,
.bug-actions {
  width: 100%;
  display: flex;
  gap: .65rem;
}

.avatar-actions .btn,
.bug-actions .btn {
  flex: 1;
}

.profile-row {
  width: 100%;
}

.profile-row input,
.bug-modal textarea,
.rp-speed {
  width: 100%;
  min-height: 46px;
  padding: .65rem .75rem;
  color: var(--text);
  background: #fff;
  border: 2px solid #d9d5cc;
  border-radius: 12px;
  outline: 0;
}

.profile-row input:focus,
.bug-modal textarea:focus,
.rp-speed:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 4px rgba(65, 105, 232, .11);
}

.bug-modal textarea {
  min-height: 130px;
  resize: vertical;
}

.acct-link-btn {
  min-height: 38px;
  padding: .35rem .55rem;
  color: var(--cobalt-dark);
  border-radius: 9px;
  font-weight: 900;
  text-underline-offset: 3px;
}

.acct-link-btn:hover {
  color: var(--ink);
  background: #ece8de;
}

.supp-divider {
  color: #95680c;
}

.supp-divider::before,
.supp-divider::after {
  background: #ead9a2;
}

.setup-hint {
  color: var(--muted);
  line-height: 1.5;
}

.nc-toggle {
  gap: .45rem;
}

.nc-toggle button {
  min-height: 40px;
  color: var(--text);
  background: #fff;
  border: 2px solid #d8d3c9;
  border-radius: 10px;
}

.nc-toggle button.active {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--ink);
}

.nc-colors input[type="color"] {
  border-color: #d8d3c9;
}

.border-buttons {
  gap: .55rem;
}

.drawings-grid {
  width: 100%;
  max-height: 54vh;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: .8rem;
  padding: 5px;
}

.rp-card {
  width: min(100%, 720px);
  max-width: 720px;
}

.rp-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: #eee8dc;
  border: 2px solid #d9d1c4;
  border-radius: 11px;
  font-family: "Nunito", sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
}

.rp-close:hover {
  color: #fff;
  background: var(--coral);
  border-color: var(--coral-dark);
}

.rp-canvas-wrap {
  max-width: 100%;
  padding: 7px;
  display: inline-block;
  background: #eee9df;
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 5px 0 rgba(17, 26, 54, .13);
}

.rp-canvas {
  max-width: 100%;
  height: auto;
  display: block;
  background: #fff;
  border-radius: 10px;
}

.rp-bar {
  width: 100%;
  height: 11px;
  margin: .6rem 0;
  overflow: hidden;
  background: #ded8cd;
  border: 2px solid var(--ink);
  border-radius: 999px;
}

.rp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--cobalt), var(--coral));
}

.rp-controls {
  gap: .65rem;
}

.rp-speed-wrap {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
}

.rp-speed {
  width: auto;
  min-height: 42px;
  padding: .45rem 2rem .45rem .6rem;
  font-size: .82rem;
}

.rpp-list {
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .75rem;
}

.rpp-item {
  overflow: hidden;
  background: #fff;
  border: 2px solid #ddd7cc;
  border-radius: 14px;
  box-shadow: 0 3px 0 rgba(17, 26, 54, .1);
}

.rpp-item:hover {
  border-color: var(--cobalt);
  transform: translateY(-2px);
}

.rpp-item .rpp-pokemon {
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
}

.replay-upsell .ru-card {
  width: min(100%, 440px);
  max-width: 440px;
  border-color: var(--ink);
}

.replay-upsell .ru-icon {
  width: 58px;
  height: 58px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 17px;
}

.replay-upsell .ru-blurb {
  margin: 0;
  color: var(--muted);
}

.star-row {
  justify-content: center;
  color: #d4cfc5;
}

.star {
  color: #d4cfc5;
}

.star.active {
  color: var(--yellow-dark);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.96) rotate(-.5deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

/* Loading and lobby */
.game-body {
  min-height: 100vh;
  color: var(--text);
  background: var(--ink);
  overflow-x: hidden;
}

.screen-loading {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #fff;
  background:
    radial-gradient(circle at 24% 30%, rgba(65, 105, 232, .35), transparent 31%),
    radial-gradient(circle at 78% 72%, rgba(255, 107, 103, .22), transparent 28%),
    var(--ink);
}

.screen-loading.hidden {
  display: none !important;
}

.loading-inner {
  gap: 1.15rem;
}

.loading-logo {
  padding: .8rem 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 8px 9px 0 rgba(0, 0, 0, .22);
  transform: rotate(-1.5deg);
}

.loading-logo img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.loading-logo span {
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.loading-msg {
  color: rgba(255, 255, 255, .66);
  font-size: .88rem;
}

.loading-dots span {
  width: 11px;
  height: 11px;
  background: var(--coral);
}

.loading-dots span:nth-child(2) {
  background: var(--yellow);
}

.loading-dots span:nth-child(3) {
  background: var(--mint);
}

#screen-lobby {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 54px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 12%, rgba(119, 201, 255, .18) 0 2px, transparent 3px),
    radial-gradient(circle at 92% 74%, rgba(255, 211, 78, .18) 0 2px, transparent 3px),
    linear-gradient(145deg, #101831, #17254e 55%, #101831);
  background-size: 38px 38px, 45px 45px, auto;
}

.lobby-panel,
.lobby-shell {
  width: min(100%, 1180px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  text-align: left;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: 12px 14px 0 rgba(4, 9, 28, .24), var(--shadow-lg);
}

.lobby-topbar {
  min-height: 92px;
  padding: 1rem 1.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: #fff;
  background: var(--cobalt);
  border-bottom: 3px solid var(--ink);
}

.lobby-brand {
  color: #fff;
  font-size: 1.15rem;
}

.lobby-brand .nav-brand-mark {
  width: 44px;
  height: 44px;
}

.lobby-logo-img {
  width: 100%;
  height: 100%;
  margin: 0;
}

.room-share {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.room-share-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.room-share-copy .label {
  color: rgba(255, 255, 255, .82);
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.room-share-copy .lobby-hint {
  color: rgba(255, 255, 255, .62);
  font-size: .67rem;
}

.room-code-box {
  min-height: 52px;
  padding: .4rem .48rem .4rem .8rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 4px 0 rgba(17, 26, 54, .22);
}

.room-code {
  min-width: 104px;
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1;
}

.btn-copy {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: #eee8dc;
  border: 2px solid #d5cdbf;
  border-radius: 10px;
  cursor: pointer;
}

.btn-copy:hover {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--ink);
}

.lobby-content {
  padding: 1.25rem;
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
  align-items: stretch;
  gap: 1.1rem;
}

.lobby-party-card,
.lobby-settings-card {
  min-width: 0;
  padding: 1.25rem;
  background: #fff;
  border: 2px solid #ddd8ce;
  border-radius: 20px;
  box-shadow: 0 5px 0 rgba(17, 26, 54, .1);
}

.lobby-party-card {
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(rgba(255, 255, 255, .94), rgba(255, 255, 255, .94)),
    radial-gradient(circle at 20% 10%, var(--sky) 0 2px, transparent 3px);
  background-size: auto, 24px 24px;
}

.lobby-settings-card {
  background: #fffdf8;
}

.lobby-eyebrow {
  color: var(--cobalt);
}

.lobby-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .8rem;
}

.lobby-title-row h1,
.lobby-title-row h2 {
  margin: .28rem 0 0;
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.05;
}

.lobby-title-row h1 {
  font-size: clamp(1.85rem, 3vw, 2.45rem);
}

.lobby-title-row h2 {
  font-size: clamp(1.4rem, 2vw, 1.75rem);
}

.lobby-title-row p {
  margin: .25rem 0 0;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
}

.lobby-count-pill {
  min-height: 36px;
  padding: .42rem .62rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  flex: 0 0 auto;
  color: var(--ink);
  background: var(--mint);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 rgba(17, 26, 54, .13);
  font-family: "Fredoka", sans-serif;
  font-size: .75rem;
}

.lobby-players-title {
  margin: 1.15rem 0 .5rem;
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .09em;
}

.lobby-player-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: .48rem;
}

.lobby-player-list li {
  min-height: 58px;
  padding: .55rem .7rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  overflow: hidden;
  color: var(--text);
  background: var(--paper);
  border: 2px solid #ded8cd;
  border-radius: 14px;
  font-size: .9rem;
  font-weight: 900;
}

.lobby-player-list li .player-avatar {
  width: 38px !important;
  height: 38px !important;
}

.lobby-player-list li > span:not(.host-badge):not(.av-frame):not(.player-icon) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-avatar {
  object-fit: cover;
  background: #fff;
  border: 2px solid #d5cfc3;
}

.player-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: #eee8dc;
  border-radius: 50%;
}

.host-badge {
  margin-left: auto;
  padding: .25rem .55rem;
  color: var(--ink);
  background: var(--yellow);
  border: 1px solid #d9a923;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 900;
}

.disconnected-tag {
  color: #9b6810;
}

.empty-slot-note {
  min-height: 46px;
  margin-top: auto;
  padding: .75rem .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  color: var(--muted);
  background: #f1ecdf;
  border: 2px dashed #d5ccbb;
  border-radius: 13px;
  font-size: .75rem;
  font-weight: 800;
}

.settings-badge {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 13px;
  box-shadow: 0 3px 0 rgba(17, 26, 54, .13);
  transform: rotate(4deg);
}

.host-settings {
  width: 100%;
  margin-top: 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  background: transparent;
  border: 0;
}

.settings-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem;
  color: var(--text);
  font-family: "Nunito", sans-serif;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.settings-title small {
  color: var(--muted);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.settings-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .55rem;
}

.preset-btn {
  min-height: 64px;
  padding: .55rem .65rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: .12rem;
  color: var(--text);
  background: #f3eee4;
  border: 2px solid #dbd5c9;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.preset-btn:hover {
  border-color: var(--cobalt);
  transform: translateY(-1px);
}

.preset-btn.active {
  color: #fff;
  background: var(--cobalt);
  border-color: var(--cobalt-dark);
  box-shadow: 0 3px 0 rgba(17, 26, 54, .14);
}

.preset-btn span {
  font-family: "Fredoka", sans-serif;
  font-size: .8rem;
  font-weight: 700;
}

.preset-btn small {
  color: var(--muted);
  font-size: .65rem;
  font-weight: 700;
}

.preset-btn.active small {
  color: rgba(255, 255, 255, .72);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

.settings-grid label {
  gap: .35rem;
}

.settings-grid label > span,
.settings-gens-label,
.settings-vis-label,
.invite-friends-title {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.settings-grid select,
#setting-visibility {
  width: 100%;
  min-height: 44px;
  padding: .55rem 2.1rem .55rem .7rem;
  color: var(--text);
  background: #fff;
  border: 2px solid #d9d4ca;
  border-radius: 11px;
  font-size: .82rem;
  font-weight: 800;
  outline: 0;
}

.settings-grid select:focus,
#setting-visibility:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(65, 105, 232, .1);
}

.settings-gens {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .48rem;
}

.gen-checkbox {
  min-width: 0;
  min-height: 52px;
  padding: .48rem .55rem;
  color: var(--text);
  background: #fff;
  border: 2px solid #ddd7cc;
  border-radius: 11px;
  font-size: .76rem;
  font-weight: 900;
}

.gen-checkbox:hover {
  background: #f3f5ff;
  border-color: var(--cobalt);
}

.gen-checkbox input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--cobalt);
}

.gen-checkbox input[type="checkbox"]:checked + span {
  color: var(--cobalt-dark);
}

.gen-checkbox em {
  color: var(--muted);
  font-size: .61rem;
}

.settings-visibility {
  margin-top: .15rem;
}

.settings-vis-label,
.invite-friends-title {
  margin-bottom: .35rem;
}

.invite-friends {
  padding-top: .75rem;
  border-top: 2px dashed #d8d0bf;
}

.invite-friends-list {
  max-height: 170px;
  gap: .4rem;
}

.invite-row {
  min-height: 44px;
  padding: .35rem .45rem;
  background: #f2ede3;
  border-radius: 10px;
}

.invite-name {
  font-size: .8rem;
}

.invite-btn {
  min-height: 32px;
  color: #fff;
  background: var(--cobalt);
  border: 1px solid var(--cobalt-dark);
}

.settings-summary {
  margin: 1rem 0 .7rem;
  padding: .85rem;
  background: #edf1ff;
  border: 2px solid #bcc9f3;
  border-radius: 13px;
}

.ss-title {
  color: var(--cobalt-dark);
}

.ss-rows {
  color: var(--text);
}

.ss-gens {
  color: var(--muted);
}

.lobby-waiting-msg {
  margin-top: 1rem;
  padding: .75rem .9rem;
  color: #72560a;
  background: #fff6d8;
  border: 2px solid #ead080;
  border-radius: 12px;
  font-size: .8rem;
  font-weight: 800;
}

.waiting-pulse {
  background: var(--yellow-dark);
  box-shadow: 0 0 0 4px rgba(227, 169, 33, .14);
}

.lobby-footer {
  min-height: 78px;
  padding: .9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #eee7d9;
  border-top: 2px solid #d8d0c1;
}

.lobby-footer-copy {
  max-width: 620px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.lobby-footer-copy strong {
  color: var(--ink);
}

.lobby-footer .btn {
  min-width: 180px;
}

/* In-game stage */
#screen-game {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--text);
  background: #dce1ec;
}

.game-topbar {
  position: relative;
  z-index: 50;
  height: 68px;
  min-height: 68px;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: minmax(215px, 1fr) minmax(280px, 1.6fr) minmax(170px, 1fr);
  align-items: center;
  gap: 1rem;
  color: #fff;
  background: var(--ink);
  border-bottom: 3px solid var(--cobalt);
  box-shadow: 0 3px 0 rgba(7, 12, 31, .18);
}

.topbar-left,
.topbar-center,
.topbar-right {
  min-width: 0;
  display: flex;
  align-items: center;
}

.topbar-left {
  gap: .85rem;
}

.topbar-center {
  flex-direction: column;
  justify-content: center;
  gap: .2rem;
  text-align: center;
}

.topbar-right {
  justify-content: flex-end;
  gap: .65rem;
}

.stage-brand {
  color: #fff;
  font-size: .94rem;
}

.stage-brand img {
  width: 34px;
  height: 34px;
  padding: 2px;
  background: var(--paper);
  border: 2px solid var(--yellow);
  border-radius: 10px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .2);
}

.round-label {
  padding: .35rem .52rem;
  color: rgba(255, 255, 255, .68);
  background: rgba(255, 255, 255, .075);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 8px;
  font-family: "Nunito", sans-serif;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .05em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.artist-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  color: rgba(255, 255, 255, .62);
  font-size: .65rem;
  font-weight: 800;
}

.artist-status-dot {
  width: 7px;
  height: 7px;
}

.word-display {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--yellow);
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: clamp(.9rem, 1.45vw, 1.18rem);
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timer-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1;
}

.timer-copy span {
  color: rgba(255, 255, 255, .52);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.timer-copy strong {
  margin-top: .18rem;
  color: #fff;
  font-family: "Fredoka", sans-serif;
  font-size: 1.05rem;
}

.timer-ring {
  position: relative;
  width: 46px;
  height: 46px;
  display: block;
  flex: 0 0 auto;
  background: conic-gradient(var(--mint) var(--timer-angle, 360deg), rgba(255, 255, 255, .13) 0);
  border: 0;
  border-radius: 50%;
  box-shadow: none;
}

.timer-ring::after {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--ink);
  border-radius: inherit;
}

.timer-ring.warning {
  background: conic-gradient(var(--yellow) var(--timer-angle, 180deg), rgba(255, 255, 255, .13) 0);
}

.timer-ring.danger {
  background: conic-gradient(var(--coral) var(--timer-angle, 45deg), rgba(255, 255, 255, .13) 0);
  animation: timer-pulse 600ms ease-in-out infinite;
}

.round-intro-banner {
  position: fixed;
  top: 82px;
  left: 50%;
  z-index: 120;
  min-width: min(340px, calc(100vw - 30px));
  padding: .72rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 15px;
  box-shadow: 0 6px 0 rgba(4, 9, 28, .2), var(--shadow);
  opacity: 0;
  transform: translate(-50%, -14px) rotate(-1deg);
  transition: opacity 180ms ease, transform 220ms var(--ease-bounce);
}

.round-intro-banner.show {
  opacity: 1;
  transform: translate(-50%, 0) rotate(-1deg);
}

.round-intro-banner span {
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.round-intro-banner strong {
  font-family: "Fredoka", sans-serif;
  font-size: 1rem;
}

.game-main {
  min-width: 0;
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 290px;
  overflow: hidden;
  background: #cfd6e5;
}

.game-sidebar {
  width: auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--paper);
}

.sidebar-left {
  border-right: 3px solid var(--ink);
}

.sidebar-right {
  border-left: 3px solid var(--ink);
}

.sidebar-title {
  min-height: 48px;
  padding: .75rem .85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  color: var(--ink);
  background: #eee7d9;
  border-bottom: 2px solid #d5cdbf;
  font-family: "Fredoka", sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sidebar-count {
  color: var(--cobalt);
}

.chat-live-pill {
  padding: .22rem .45rem;
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  color: #146d57;
  background: #e0f8f0;
  border: 1px solid #a9decf;
  border-radius: 999px;
  font-family: "Nunito", sans-serif;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .05em;
}

.chat-live-pill i {
  width: 6px;
  height: 6px;
}

.player-list {
  padding: .65rem;
  gap: .5rem;
}

.player-list li {
  position: relative;
  min-height: 52px;
  padding: .5rem .55rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  overflow: hidden;
  color: var(--text);
  background: #fff;
  border: 2px solid #dfdad0;
  border-radius: 13px;
  font-size: .78rem;
  font-weight: 900;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.player-list li.drawing {
  color: var(--ink);
  background: #fff4c9;
  border: 2px solid #d9ad2d;
  box-shadow: 0 3px 0 rgba(17, 26, 54, .1);
  transform: translateX(2px);
}

.player-list li.disconnected {
  opacity: .52;
  text-decoration: none;
  filter: grayscale(.5);
}

.player-list .player-avatar {
  width: 32px !important;
  height: 32px !important;
}

.player-name-text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-score {
  margin-left: auto;
  padding: .27rem .4rem;
  color: var(--cobalt-dark);
  background: #edf1ff;
  border-radius: 8px;
  font-family: "Fredoka", sans-serif;
  font-size: .68rem;
  font-weight: 700;
}

.streak-badge {
  padding: .14rem .35rem;
  color: #a34d16;
  background: #fff0d8;
  border-color: #ecc084;
  font-size: .62rem;
}

.card-border {
  z-index: 4;
}

.game-center {
  min-width: 0;
  min-height: 0;
  padding: clamp(7px, 1.1vw, 14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 16%, rgba(255, 255, 255, .35) 0 2px, transparent 3px),
    linear-gradient(145deg, #dfe5f0, #cbd3e2);
  background-size: 26px 26px, auto;
}

.canvas-wrapper {
  position: relative;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 17px;
  overscroll-behavior: none;
}

#draw-canvas,
#cursor-canvas {
  width: min(100%, 800px);
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 800 / 540;
  object-fit: contain;
  border-radius: 14px;
  touch-action: none;
  overscroll-behavior: none;
}

#draw-canvas {
  display: block;
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: 0 7px 0 rgba(17, 26, 54, .15), 0 18px 36px rgba(17, 26, 54, .16);
}

#cursor-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  border: 3px solid transparent;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.canvas-wrapper.correct-flash::after {
  inset: max(0px, calc((100% - min(100%, 800px)) / 2));
  border-radius: 14px;
  box-shadow: inset 0 0 0 6px rgba(38, 155, 125, .75);
}

.draw-toolbar {
  width: auto;
  max-width: 100%;
  min-height: 58px;
  padding: .42rem .55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .48rem;
  overflow-x: auto;
  overflow-y: hidden;
  flex: 0 0 auto;
  color: var(--text);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 5px 0 rgba(17, 26, 54, .14), var(--shadow);
  scrollbar-width: thin;
}

.toolbar-section {
  gap: .32rem;
  flex: 0 0 auto;
}

.toolbar-section + .toolbar-section {
  padding-left: .48rem;
  border-left: 2px solid #d9d3c7;
}

.color-palette {
  max-width: 190px;
  gap: 4px;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(17, 26, 54, .32), 0 2px 3px rgba(17, 26, 54, .14);
}

.color-swatch:hover {
  transform: scale(1.16);
}

.color-swatch.active {
  border-color: #fff;
  box-shadow: 0 0 0 3px var(--ink);
  transform: scale(1.08);
}

.tool-group {
  max-width: none;
  flex-wrap: nowrap;
}

.tool-btn {
  min-width: 38px;
  min-height: 38px;
  padding: .38rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: #fff;
  border: 2px solid #d8d3ca;
  border-radius: 10px;
}

.tool-btn:hover {
  color: var(--cobalt-dark);
  background: #eef1ff;
  border-color: var(--cobalt);
}

.tool-btn.active {
  color: #fff;
  background: var(--cobalt);
  border-color: var(--cobalt-dark);
  box-shadow: 0 3px 0 rgba(17, 26, 54, .13);
}

.tool-btn.danger:hover {
  color: #fff;
  background: var(--coral);
  border-color: var(--coral-dark);
}

.slider-group {
  min-width: 142px;
  gap: .24rem;
}

.tool-slider {
  color: var(--muted);
  font-size: .65rem;
}

.tool-slider .slider-lbl {
  min-width: 48px;
}

.tool-slider input[type="range"] {
  accent-color: var(--cobalt);
}

.tool-slider .slider-val {
  min-width: 30px;
  color: var(--ink);
  font-weight: 900;
}

.shape-fill-toggle {
  color: var(--muted);
  font-size: .66rem;
}

.shape-fill-toggle input {
  accent-color: var(--cobalt);
}

.cw-popup {
  background: rgba(7, 12, 31, .74);
  backdrop-filter: blur(8px);
}

.cw-card {
  color: var(--text);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 8px 9px 0 rgba(5, 10, 28, .22), var(--shadow-lg);
}

.cw-title {
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
  font-size: 1.1rem;
}

.cw-hex {
  color: var(--text);
  background: #fff;
  border-color: #d7d2c8;
}

.cw-hex:focus {
  border-color: var(--cobalt);
}

.cw-close {
  min-height: 40px;
  color: #fff;
  background: var(--cobalt);
  border: 2px solid var(--cobalt-dark);
  border-radius: 10px;
}

.chat-log {
  padding: .65rem;
  gap: .42rem;
  background: #fffdf8;
}

.chat-msg {
  padding: .48rem .56rem;
  color: var(--text);
  background: #f0ebe1;
  border: 1px solid #e0d9cc;
  border-radius: 11px;
  font-size: .76rem;
  line-height: 1.35;
}

.msg-name {
  color: var(--cobalt-dark);
  font-weight: 900;
}

.chat-msg.correct {
  color: #11634f;
  background: #def7ee;
  border-color: #9ed9c8;
  font-weight: 900;
}

.chat-msg.system {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}

.chat-msg.hint {
  color: #57438f;
  background: #eeeaff;
  border: 1px solid #ccc2f7;
  border-left: 4px solid var(--lavender);
}

.chat-input-row {
  padding: .58rem;
  gap: .42rem;
  background: #eee7d9;
  border-top: 2px solid #d5cdbf;
}

.guess-wrap input {
  min-height: 44px;
  padding: .58rem .72rem;
  color: var(--text);
  background: #fff;
  border: 2px solid #d7d1c6;
  border-radius: 12px;
  font-size: .82rem;
}

.guess-wrap input:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(65, 105, 232, .1);
}

.guess-wrap input:disabled {
  color: #92929a;
  background: #e5e1d9;
}

.chat-input-row button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--coral);
  border: 2px solid var(--coral-dark);
  border-radius: 12px;
  box-shadow: 0 3px 0 rgba(17, 26, 54, .14);
}

.autocomplete-list {
  bottom: calc(100% + 7px);
  overflow: hidden;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 0 -8px 24px rgba(17, 26, 54, .18);
}

.autocomplete-list li {
  padding: .52rem .7rem;
  color: var(--text);
  border-bottom: 1px solid #dfd8cd;
}

.autocomplete-list li:last-child {
  border-bottom: 0;
}

.autocomplete-list li:hover,
.autocomplete-list li.ac-active {
  color: var(--cobalt-dark);
  background: #edf1ff;
}

.autocomplete-list li strong {
  color: var(--cobalt-dark);
}

#mob-players-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 10px;
}

#mob-sidebar-backdrop {
  background: rgba(7, 12, 31, .62);
  backdrop-filter: blur(3px);
}

/* Round overlays, results, and feedback */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: rgba(9, 15, 38, .72);
  border-radius: 17px;
  backdrop-filter: blur(7px);
}

.overlay-box {
  width: min(94%, 470px);
  max-width: 470px;
  padding: clamp(1.25rem, 3vw, 1.8rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .85rem;
  color: var(--text);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 8px 9px 0 rgba(5, 10, 28, .22), var(--shadow-lg);
  animation: modal-in 220ms var(--ease-bounce) both;
}

.overlay-kicker {
  color: var(--cobalt);
}

.overlay-box h3 {
  margin: 0;
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.overlay-box p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.5;
}

.overlay-box strong {
  color: var(--coral-dark);
}

.word-select-box {
  max-width: 520px;
}

.word-choices {
  width: 100%;
  gap: .6rem;
  margin-top: .2rem;
}

.word-choice-btn {
  width: 100%;
  min-height: 50px;
  padding: .7rem 1rem;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 13px;
  box-shadow: 0 3px 0 rgba(17, 26, 54, .12);
  font-family: "Fredoka", sans-serif;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.2;
}

.word-choice-btn:nth-child(2) {
  background: #edf1ff;
}

.word-choice-btn:nth-child(3) {
  background: #e9faf4;
}

.word-choice-btn:hover {
  color: #fff;
  background: var(--cobalt);
  border-color: var(--ink);
  transform: translateY(-2px);
}

.round-scores,
.final-scores {
  gap: .42rem;
}

.score-row {
  min-height: 44px;
  padding: .48rem .65rem;
  color: var(--text);
  background: #fff;
  border: 2px solid #dfd9ce;
  border-radius: 11px;
  font-size: .8rem;
  font-weight: 900;
}

.score-row .pts {
  color: var(--cobalt-dark);
  font-family: "Fredoka", sans-serif;
  font-size: .7rem;
}

.score-row.top {
  background: #fff4c8;
  border-color: #d9ad2d;
}

.next-round-msg {
  color: var(--muted);
}

.gameover-box {
  width: min(96%, 830px);
  max-width: 830px !important;
  max-height: 92%;
  align-items: stretch;
  overflow-y: auto;
}

.gameover-box > h3,
.gameover-box > p,
.gameover-box > .overlay-kicker {
  align-self: center;
  text-align: center;
}

.gameover-lede {
  max-width: 600px;
}

.gallery-title {
  margin-top: .35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.gallery-title > span {
  color: var(--muted);
  font-family: "Nunito", sans-serif;
  font-size: .68rem;
  font-weight: 800;
}

.drawing-gallery {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem;
}

.gallery-card {
  overflow: hidden;
  background: #fff;
  border: 2px solid #ded8cd;
  border-radius: 14px;
  box-shadow: 0 4px 0 rgba(17, 26, 54, .1);
}

.gallery-card:hover {
  border-color: var(--cobalt);
  box-shadow: 0 6px 0 rgba(17, 26, 54, .1), 0 12px 22px rgba(17, 26, 54, .1);
  transform: translateY(-2px);
}

.gallery-img {
  background: #fffdf8;
  border-bottom: 2px solid #ddd7cb;
  object-fit: contain;
}

.gallery-label {
  padding: .5rem .55rem .2rem;
}

.gallery-pokemon {
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
  font-size: .78rem;
}

.gallery-drawer {
  color: var(--muted);
  font-size: .68rem;
}

.gallery-card-footer {
  padding: .35rem .5rem .5rem;
}

.gallery-dl {
  min-height: 34px;
  margin: 0;
  padding: .38rem .55rem !important;
  border-radius: 9px;
  font-size: .68rem !important;
}

.vote-btn {
  min-height: 34px;
  padding: .32rem .5rem;
  color: #a82f40;
  background: #fff1f0;
  border: 2px solid #ecb0af;
  border-radius: 9px;
}

.vote-btn:hover:not(:disabled),
.vote-btn.voted {
  color: #fff;
  background: var(--coral);
  border-color: var(--coral-dark);
}

.gallery-card.vote-winner {
  border-color: var(--yellow-dark) !important;
  box-shadow: 0 0 0 4px rgba(255, 211, 78, .32), 0 6px 0 rgba(17, 26, 54, .1);
}

.vote-winner-banner {
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 12px;
  font-family: "Fredoka", sans-serif;
  font-size: .72rem;
}

.gameover-actions {
  gap: .55rem;
}

.gameover-actions .btn {
  min-height: 42px;
  padding: .58rem .85rem;
  font-size: .78rem;
}

.go-save-prompt {
  max-width: 480px;
  margin: .45rem auto 0;
  padding: .8rem .9rem;
  background: #fff4c9;
  border: 2px solid #d9ad2d;
  border-radius: 13px;
}

.go-save-head {
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
}

.go-save-sub {
  color: #685a35;
}

.go-save-done {
  max-width: 480px;
  color: #11634f;
  background: #def7ee;
  border-color: #91d3c0;
}

.kofi-wrap {
  margin-top: .4rem;
}

.score-pop {
  color: var(--mint-dark);
  font-family: "Fredoka", sans-serif;
  text-shadow: 0 3px 0 #fff, 0 6px 18px rgba(17, 26, 54, .22);
}

.guess-hint {
  color: #6f5511;
  background: #fff4c9;
  border: 2px solid #dfbf55;
  border-radius: 10px;
}

.toast {
  bottom: 5rem;
  max-width: calc(100vw - 30px);
  padding: .7rem 1rem;
  color: #fff;
  background: var(--ink);
  border: 2px solid var(--yellow);
  border-radius: 13px;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .2), var(--shadow);
  font-size: .82rem;
}

.mute-btn,
.bug-btn {
  position: fixed;
  z-index: 900;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 0 4px 0 rgba(5, 10, 28, .22);
  opacity: .82;
  transition: transform 150ms var(--ease-bounce), opacity 150ms ease;
}

.mute-btn {
  right: 18px;
  bottom: 18px;
}

.bug-btn {
  left: 18px;
  bottom: 18px;
}

.mute-btn:hover,
.bug-btn:hover {
  color: var(--ink);
  opacity: 1;
  transform: translateY(-2px);
}

.bug-btn .ps-icon svg,
.mute-btn .ps-icon svg {
  width: 19px;
  height: 19px;
}

body.mode-lol {
  --coral: #c9a24a;
  --coral-dark: #8f6c21;
  --cobalt: #0bc4e3;
  --cobalt-dark: #078da8;
  --yellow: #e7c66a;
}

body.mode-lol .game-topbar,
body.mode-lol .overlay-box,
body.mode-lol #draw-canvas {
  border-color: var(--ink);
}

@keyframes timer-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.07); filter: brightness(1.15); }
}

/* League mode landing page keeps the same product shell with its gold accent. */
.league-home .home-wrapper {
  width: min(100% - 40px, 920px);
  min-height: 100vh;
  padding: 34px 0 54px;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.league-home .home-nav {
  align-self: stretch;
  margin: 0;
  padding: .72rem .9rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  backdrop-filter: blur(12px);
}

.league-home .home-nav a {
  color: #fff;
  font-size: .8rem;
  font-weight: 900;
}

.league-home .home-logo {
  max-width: 680px;
  text-align: center;
}

.league-home .logo-icon-wrap {
  width: 84px;
  height: 84px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  border: 3px solid #c89b3c;
  border-radius: 24px;
  box-shadow: 0 7px 0 rgba(4, 9, 28, .24);
  animation: none;
  transform: rotate(-3deg);
}

.league-home .logo-icon-wrap img {
  width: 100%;
  height: 100%;
}

.league-home .home-logo h1 {
  margin: 1rem 0 .3rem;
  color: #e3bd62;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: clamp(2.7rem, 8vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .95;
  text-shadow: 4px 4px 0 #075a72, 8px 8px 0 rgba(4, 9, 28, .26);
}

.league-home .home-logo p {
  margin: .55rem 0 0;
  color: rgba(255, 255, 255, .78);
}

.league-home .champ-count {
  color: #72dcf0 !important;
  font-size: .75rem !important;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.league-home .home-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.league-home .home-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 1.35rem;
  gap: .8rem;
  color: var(--text);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: var(--paper-shadow);
}

.league-home .home-card:hover {
  transform: translateY(-3px);
}

.league-home .home-card h2 {
  color: var(--ink);
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 1.25rem;
  line-height: 1.1;
}

.league-home .home-card p {
  color: var(--muted);
}

.league-home .input-group input {
  min-height: 50px;
  padding: .7rem .8rem;
  color: var(--text);
  background: #fff;
  border: 2px solid #d8d3ca;
  border-radius: 13px;
  outline: 0;
}

.league-home .input-group input:focus {
  border-color: #0bc4e3;
  box-shadow: 0 0 0 4px rgba(11, 196, 227, .13);
}

.league-home .browse-section {
  width: 100%;
  padding: 1.25rem;
  color: var(--text);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: var(--paper-shadow);
}

.league-home .browse-title {
  color: var(--ink);
}

.league-home .browse-empty,
.league-home .browse-meta {
  color: var(--muted);
}

.league-home .browse-row {
  background: #fff;
  border-color: #ddd7cc;
}

.league-home .browse-host {
  color: var(--ink);
}

.league-home .kofi-wrap {
  margin: 0;
}

/* Responsive home and lobby */
@media (max-width: 1080px) {
  .site-nav {
    padding-right: 190px;
  }

  .home-hero {
    grid-template-columns: minmax(0, 1fr) minmax(350px, .9fr);
    gap: 34px;
  }

  .hero-title {
    font-size: clamp(3.1rem, 7vw, 4.75rem);
  }

  .game-main {
    grid-template-columns: 180px minmax(0, 1fr) 240px;
  }

  .stage-brand span {
    display: none;
  }

  .game-topbar {
    grid-template-columns: minmax(170px, 1fr) minmax(240px, 1.4fr) minmax(140px, 1fr);
  }

  .round-label {
    font-size: .62rem;
  }

  .color-palette {
    max-width: 150px;
  }

  .color-swatch {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 900px) {
  .site-nav,
  .home-wrapper,
  .home-main {
    width: min(100% - 32px, 760px);
  }

  .site-nav {
    padding-right: 170px;
  }

  .nav-links a:not(:last-child) {
    display: none;
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-bottom: 230px;
  }

  .hero-title,
  .hero-lede {
    max-width: 700px;
  }

  .play-deck {
    width: min(100%, 620px);
    margin: 0 auto;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: .75rem;
  }

  .home-content-grid {
    grid-template-columns: 1fr;
  }

  .mode-card {
    min-height: 280px;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .site-footer p {
    display: none;
  }

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

  .lobby-party-card {
    min-height: 360px;
  }

  .sidebar-left {
    display: none;
  }

  .sidebar-left.mob-open {
    position: fixed;
    top: 68px;
    left: 0;
    bottom: 0;
    z-index: 90;
    width: 230px;
    display: flex;
    border-right: 3px solid var(--ink);
    box-shadow: 10px 0 30px rgba(7, 12, 31, .22);
  }

  #mob-players-btn {
    display: flex;
  }

  #mob-sidebar-backdrop.visible {
    display: block;
  }

  .game-main {
    grid-template-columns: minmax(0, 1fr) 240px;
  }

  .game-topbar {
    height: 62px;
    min-height: 62px;
    padding: 0 .7rem;
    grid-template-columns: minmax(150px, 1fr) minmax(190px, 1.5fr) minmax(112px, 1fr);
    gap: .55rem;
  }

  .stage-brand {
    display: none;
  }

  .sidebar-left.mob-open {
    top: 62px;
  }

  .draw-toolbar {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .home-wrapper,
  .home-main {
    padding-top: 42px;
    gap: 42px;
  }

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

  .how-card {
    min-height: 0;
    border-right: 0;
    border-bottom: 2px dashed #ddd4c3;
  }

  .how-card:last-child {
    border-bottom: 0;
  }

  .replay-feature-banner {
    align-items: flex-start;
  }

  .replay-feature-banner .rfb-cta {
    display: none;
  }

  .lobby-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .room-share {
    width: 100%;
    justify-content: space-between;
  }

  .room-share-copy {
    align-items: flex-start;
  }

  .lobby-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .lobby-footer .btn {
    width: 100%;
  }

  .game-topbar {
    grid-template-columns: minmax(108px, .8fr) minmax(140px, 1.4fr) minmax(68px, .6fr);
  }

  .round-label {
    font-size: .56rem;
  }

  .artist-status {
    display: none;
  }

  .timer-copy {
    display: none;
  }

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

  .game-center {
    min-height: 0;
    flex: 1 1 auto;
    padding: 6px;
    gap: 6px;
  }

  .sidebar-right {
    width: 100%;
    max-height: 31vh;
    min-height: 148px;
    flex: 0 0 auto;
    border-top: 3px solid var(--ink);
    border-left: 0;
  }

  .sidebar-right .sidebar-title {
    min-height: 38px;
    padding: .45rem .65rem;
  }

  .chat-log {
    min-height: 54px;
  }

  .draw-toolbar {
    min-height: 52px;
    padding: .34rem .4rem;
    flex-wrap: nowrap;
  }

  .tool-btn {
    min-width: 40px;
    min-height: 40px;
  }

  .slider-group {
    min-width: 190px;
  }

  .gameover-box {
    max-height: 96%;
  }
}

@media (max-width: 560px) {
  .site-nav,
  .home-wrapper,
  .home-main {
    width: min(100% - 22px, 520px);
  }

  .site-nav {
    min-height: 66px;
    padding: 10px 118px 10px 0;
  }

  .nav-brand {
    font-size: 1rem;
  }

  .nav-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .nav-links {
    display: none;
  }

  .account-widget {
    top: 10px;
    right: 10px;
  }

  .acct-chip {
    min-height: 44px;
    padding-right: 9px;
  }

  .acct-chip img {
    width: 32px;
    height: 32px;
  }

  .acct-chip .acct-name {
    max-width: 70px;
    font-size: .72rem;
  }

  .friends-launch {
    top: auto;
    right: 66px;
    bottom: 14px;
    left: auto;
  }

  .friends-panel {
    inset: 6px;
    width: auto;
    border-radius: 19px;
  }

  .hero-copy {
    padding-bottom: 200px;
  }

  .hero-title {
    margin-top: .7rem;
    font-size: clamp(2.75rem, 14vw, 4rem);
  }

  .hero-lede {
    font-size: .95rem;
  }

  .hero-chips {
    gap: .4rem;
  }

  .hero-chip {
    font-size: .69rem;
  }

  .hero-sketch-card {
    left: 0;
    width: calc(100% - 6px);
    height: 176px;
  }

  .sketch-canvas {
    height: 90px;
  }

  .sketch-guesses {
    gap: .25rem;
  }

  .guess-pill {
    padding: .35rem .45rem;
    font-size: .56rem;
  }

  .play-deck,
  .how-strip,
  .section-card,
  .browse-section,
  .mode-card,
  .replay-feature-banner {
    border-width: 2px;
    border-radius: 20px;
    box-shadow: 6px 7px 0 rgba(5, 10, 28, .2);
  }

  .play-deck-head,
  .home-card,
  .entry-panel {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .entry-tabs {
    margin: 0 1rem;
  }

  .section-heading,
  .section-card,
  .browse-section,
  .mode-card {
    padding: 1.1rem;
  }

  .replay-feature-banner {
    padding: 1rem;
  }

  .replay-feature-banner .rfb-icon {
    width: 46px;
    height: 46px;
  }

  .replay-feature-banner .rfb-title {
    font-size: .95rem;
  }

  .replay-feature-banner .rfb-blurb {
    font-size: .7rem;
  }

  .browse-row {
    flex-wrap: wrap;
  }

  .browse-info {
    flex: 1 1 calc(100% - 70px);
  }

  .browse-code {
    margin-left: auto;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  #screen-lobby {
    padding: 9px;
  }

  .lobby-panel,
  .lobby-shell {
    border-width: 2px;
    border-radius: 20px;
    box-shadow: 7px 8px 0 rgba(4, 9, 28, .22);
  }

  .lobby-topbar,
  .lobby-content {
    padding: .85rem;
  }

  .lobby-brand {
    font-size: 1rem;
  }

  .room-share-copy {
    display: none;
  }

  .room-code-box {
    width: 100%;
  }

  .room-code {
    margin-right: auto;
  }

  .lobby-party-card,
  .lobby-settings-card {
    padding: 1rem;
    border-radius: 16px;
  }

  .settings-presets {
    grid-template-columns: 1fr;
  }

  .preset-btn {
    min-height: 54px;
  }

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

  .settings-gens {
    grid-template-columns: 1fr 1fr;
  }

  .game-topbar {
    height: 56px;
    min-height: 56px;
    padding: 0 .45rem;
    grid-template-columns: minmax(95px, .8fr) minmax(115px, 1.2fr) 46px;
    gap: .35rem;
  }

  .sidebar-left.mob-open {
    top: 56px;
    width: min(250px, 82vw);
  }

  .round-label {
    padding: .3rem .38rem;
    font-size: .5rem;
  }

  .word-display {
    font-size: .78rem;
    letter-spacing: .1em;
  }

  .timer-ring {
    width: 38px;
    height: 38px;
  }

  .timer-ring::after {
    inset: 5px;
  }

  .round-intro-banner {
    top: 68px;
  }

  .sidebar-right {
    max-height: 34vh;
    min-height: 142px;
  }

  .chat-input-row {
    padding: .4rem;
  }

  .guess-wrap input,
  .chat-input-row button {
    min-height: 42px;
    height: 42px;
  }

  .overlay {
    padding: .5rem;
  }

  .overlay-box {
    width: 98%;
    padding: 1.1rem;
    border-radius: 17px;
  }

  .drawing-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .55rem !important;
  }

  .gallery-card-footer {
    flex-wrap: wrap;
  }

  .gallery-dl {
    min-width: 72px;
  }

  .gameover-actions .btn {
    flex: 1 1 calc(50% - .4rem);
  }

  .avatar-modal,
  .bug-modal,
  .rp-card,
  .replay-upsell .ru-card {
    border-width: 2px;
    border-radius: 19px;
    box-shadow: 6px 7px 0 rgba(5, 10, 28, .22);
  }

  .avatar-actions,
  .bug-actions,
  .border-buttons {
    flex-wrap: wrap;
  }

  .avatar-actions .btn,
  .bug-actions .btn,
  .border-buttons .btn {
    min-width: 120px;
  }

  .drawings-grid,
  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rp-controls {
    width: 100%;
  }

  .rp-controls .btn {
    flex: 1;
  }

  .bug-btn {
    left: 12px;
    bottom: 12px;
  }

  .mute-btn {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-height: 680px) and (min-width: 721px) {
  .game-topbar {
    height: 58px;
    min-height: 58px;
  }

  .draw-toolbar {
    min-height: 50px;
    padding-block: .28rem;
  }

  .tool-btn {
    min-height: 36px;
    min-width: 36px;
  }
}

@media (max-width: 680px) {
  .league-home .home-wrapper {
    width: min(100% - 22px, 520px);
    padding-block: 14px 36px;
  }

  .league-home .home-cards {
    grid-template-columns: 1fr;
  }

  .league-home .home-logo h1 {
    font-size: clamp(2.5rem, 15vw, 3.8rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .hero-sketch-card,
  .how-icon,
  .mode-card-art,
  .settings-badge,
  .loading-logo {
    transform: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #46506b;
    --line: #aaa59d;
  }

  .hero-lede,
  .site-footer,
  .nav-links a {
    color: #fff;
  }

  :where(.home-card, .section-card, .how-strip, .play-deck, .lobby-panel, .overlay-box, .avatar-modal, .bug-modal, .rp-card) {
    border-width: 4px;
  }
}

@media (forced-colors: active) {
  .btn,
  .tool-btn,
  .entry-tab,
  .gen-checkbox,
  .preset-btn,
  .overlay-box,
  .play-deck,
  .section-card,
  .lobby-panel {
    border: 2px solid ButtonText;
  }

  .live-dot,
  .deck-status i,
  .artist-status-dot,
  .waiting-pulse {
    forced-color-adjust: none;
  }
}
