/* Named game-client to avoid nginx's /quiz WebSocket prefix route. */
.jwq-root {
  --jwq-bg: #08070a;
  --jwq-panel: rgba(24, 22, 28, 0.96);
  --jwq-panel-soft: rgba(255, 255, 255, 0.045);
  --jwq-border: rgba(255, 255, 255, 0.11);
  --jwq-text: #f7f3ea;
  --jwq-muted: #aaa39a;
  --jwq-yellow: #e6d15b;
  --jwq-yellow-strong: #f3dc5d;
  --jwq-green: #74d69b;
  --jwq-red: #ef7f7f;
  --jwq-radius: 22px;
  position: fixed;
  inset: 0;
  z-index: 12000;
  overflow: hidden;
  color: var(--jwq-text);
  background:
    radial-gradient(circle at 12% 15%, rgba(230, 209, 91, 0.09), transparent 28rem),
    radial-gradient(circle at 88% 82%, rgba(110, 72, 139, 0.13), transparent 32rem),
    var(--jwq-bg);
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.jwq-root.hidden {
  display: none !important;
}

.jwq-root *,
.jwq-root *::before,
.jwq-root *::after {
  box-sizing: border-box;
}

.jwq-root button,
.jwq-root input,
.jwq-root select {
  font: inherit;
}

.jwq-root button {
  -webkit-tap-highlight-color: transparent;
}

.jwq-shell {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.jwq-header {
  min-height: 74px;
  padding:
    max(12px, env(safe-area-inset-top))
    max(22px, env(safe-area-inset-right))
    12px
    max(22px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(8, 7, 10, 0.82);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.jwq-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.jwq-brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid rgba(230, 209, 91, 0.5);
  border-radius: 14px;
  color: var(--jwq-yellow);
  background: rgba(230, 209, 91, 0.08);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -1px;
  transform: rotate(-3deg);
}

.jwq-brand > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.jwq-brand strong {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jwq-brand small {
  margin-top: 2px;
  color: var(--jwq-muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.jwq-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.jwq-connection {
  min-height: 34px;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--jwq-border);
  border-radius: 999px;
  color: var(--jwq-muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  white-space: nowrap;
}

.jwq-connection i {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.jwq-connection--online {
  color: var(--jwq-green);
}

.jwq-connection--connecting,
.jwq-connection--authenticating,
.jwq-connection--reconnecting {
  color: var(--jwq-yellow);
}

.jwq-connection--offline,
.jwq-connection--auth-required {
  color: var(--jwq-red);
}

.jwq-icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--jwq-border);
  border-radius: 14px;
  color: var(--jwq-text);
  background: rgba(255, 255, 255, 0.045);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.jwq-icon-button:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.085);
}

.jwq-main {
  min-height: 0;
  overflow: auto;
  padding:
    clamp(24px, 4vw, 56px)
    max(clamp(18px, 4vw, 52px), env(safe-area-inset-right))
    max(34px, env(safe-area-inset-bottom))
    max(clamp(18px, 4vw, 52px), env(safe-area-inset-left));
  scrollbar-width: thin;
  scrollbar-color: rgba(230, 209, 91, 0.34) transparent;
  -webkit-overflow-scrolling: touch;
}

.jwq-main h1,
.jwq-main h2,
.jwq-main p {
  margin-top: 0;
}

.jwq-main h1 {
  margin-bottom: 14px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.jwq-main h2 {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.jwq-main p {
  color: var(--jwq-muted);
  line-height: 1.55;
}

.jwq-home,
.jwq-lobby,
.jwq-round,
.jwq-results,
.jwq-game-over {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.jwq-home {
  display: grid;
  gap: clamp(26px, 4vw, 48px);
}

.jwq-hero {
  width: min(820px, 100%);
}

.jwq-hero > p:not(.jwq-eyebrow) {
  max-width: 640px;
  margin-bottom: 22px;
  font-size: clamp(16px, 2vw, 20px);
}

.jwq-eyebrow,
.jwq-round-label {
  margin-bottom: 12px !important;
  color: var(--jwq-yellow) !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.jwq-home-grid,
.jwq-lobby-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 18px;
}

.jwq-card {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  overflow: hidden;
  border: 1px solid var(--jwq-border);
  border-radius: var(--jwq-radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    var(--jwq-panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.jwq-card--primary {
  border-color: rgba(230, 209, 91, 0.23);
  background:
    radial-gradient(circle at 100% 0, rgba(230, 209, 91, 0.13), transparent 48%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    var(--jwq-panel);
}

.jwq-card > p {
  margin-bottom: 25px;
}

.jwq-card-number {
  position: absolute;
  top: 22px;
  right: 24px;
  color: rgba(255, 255, 255, 0.13);
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.jwq-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.jwq-setting label,
.jwq-join-form > label {
  display: grid;
  gap: 7px;
  color: var(--jwq-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.jwq-setting select,
.jwq-join-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--jwq-border);
  border-radius: 13px;
  outline: none;
  color: var(--jwq-text);
  background: rgba(0, 0, 0, 0.24);
}

.jwq-setting select:focus,
.jwq-join-form input:focus {
  border-color: rgba(230, 209, 91, 0.68);
  box-shadow: 0 0 0 3px rgba(230, 209, 91, 0.09);
}

.jwq-setting select:disabled {
  opacity: 0.7;
}

.jwq-eras {
  min-width: 0;
  margin: 6px 0 18px;
  padding: 0;
  grid-column: 1 / -1;
  border: 0;
}

.jwq-eras legend {
  margin-bottom: 10px;
  color: var(--jwq-text);
  font-size: 13px;
  font-weight: 750;
}

.jwq-eras legend span {
  margin-left: 6px;
  color: var(--jwq-muted);
  font-size: 11px;
  font-weight: 500;
}

.jwq-era-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.jwq-era {
  position: relative;
  cursor: pointer;
}

.jwq-era input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.jwq-era span {
  min-height: 34px;
  padding: 8px 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--jwq-border);
  border-radius: 999px;
  color: var(--jwq-muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px;
  font-weight: 650;
  transition: 160ms ease;
}

.jwq-era:hover span {
  border-color: rgba(255, 255, 255, 0.22);
}

.jwq-era input:checked + span {
  border-color: rgba(230, 209, 91, 0.55);
  color: var(--jwq-yellow);
  background: rgba(230, 209, 91, 0.1);
}

.jwq-era input:focus-visible + span {
  outline: 2px solid var(--jwq-yellow);
  outline-offset: 2px;
}

.jwq-era input:disabled + span {
  cursor: default;
  opacity: 0.72;
}

.jwq-primary-button,
.jwq-secondary-button,
.jwq-ghost-button,
.jwq-sound-button,
.jwq-inline-connection button,
.jwq-connection-overlay button {
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.jwq-primary-button {
  border: 1px solid var(--jwq-yellow);
  color: #17140b;
  background: var(--jwq-yellow);
  box-shadow: 0 12px 30px rgba(230, 209, 91, 0.13);
}

.jwq-primary-button:hover:not(:disabled) {
  background: var(--jwq-yellow-strong);
  transform: translateY(-1px);
}

.jwq-secondary-button {
  border: 1px solid rgba(230, 209, 91, 0.36);
  color: var(--jwq-yellow);
  background: rgba(230, 209, 91, 0.075);
}

.jwq-secondary-button:hover:not(:disabled) {
  border-color: rgba(230, 209, 91, 0.7);
  background: rgba(230, 209, 91, 0.12);
}

.jwq-ghost-button {
  border: 1px solid var(--jwq-border);
  color: var(--jwq-text);
  background: rgba(255, 255, 255, 0.035);
}

.jwq-ghost-button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.075);
}

.jwq-sound-button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--jwq-border);
  color: var(--jwq-text);
  background: rgba(255, 255, 255, 0.045);
}

.jwq-primary-button:disabled,
.jwq-secondary-button:disabled,
.jwq-ghost-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.4);
  opacity: 0.45;
}

.jwq-primary-button:focus-visible,
.jwq-secondary-button:focus-visible,
.jwq-ghost-button:focus-visible,
.jwq-sound-button:focus-visible,
.jwq-icon-button:focus-visible,
.jwq-answer:focus-visible,
.jwq-room-code button:focus-visible {
  outline: 2px solid var(--jwq-yellow);
  outline-offset: 3px;
}

.jwq-full {
  width: 100%;
}

.jwq-join-form {
  display: grid;
  gap: 13px;
}

.jwq-join-form input {
  height: 70px;
  text-align: center;
  color: var(--jwq-yellow);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.32em;
}

.jwq-join-form input::placeholder {
  color: rgba(255, 255, 255, 0.18);
}

.jwq-notice {
  padding: 13px 16px;
  border: 1px solid rgba(230, 209, 91, 0.25);
  border-radius: 14px;
  color: #e8dfb2;
  background: rgba(230, 209, 91, 0.07);
  font-size: 13px;
  line-height: 1.45;
}

.jwq-lobby {
  display: grid;
  gap: 22px;
}

.jwq-lobby-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.jwq-lobby-top h1 {
  margin-bottom: 0;
}

.jwq-room-code {
  min-width: 270px;
  padding: 17px 20px;
  border: 1px solid rgba(230, 209, 91, 0.28);
  border-radius: 18px;
  background: rgba(230, 209, 91, 0.065);
}

.jwq-room-code > span {
  display: block;
  color: var(--jwq-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.jwq-room-code > strong {
  margin: 4px 0 9px;
  display: block;
  color: var(--jwq-yellow);
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.22em;
}

.jwq-room-code > div {
  display: flex;
  gap: 8px;
}

.jwq-room-code button {
  padding: 0;
  border: 0;
  color: var(--jwq-text);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.jwq-room-code button + button {
  padding-left: 8px;
  border-left: 1px solid var(--jwq-border);
}

.jwq-card-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.jwq-card-heading h2 {
  margin: 0;
}

.jwq-card-heading > span {
  color: var(--jwq-muted);
  font-size: 12px;
}

.jwq-player-list {
  min-height: 160px;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.jwq-player {
  min-height: 58px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.jwq-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  border-radius: 12px;
  color: #161208;
  background: linear-gradient(145deg, #f0de78, #a79236);
  font-weight: 900;
}

.jwq-player-copy {
  min-width: 0;
  display: grid;
  flex: 1;
}

.jwq-player-copy strong,
.jwq-player-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jwq-player-copy strong {
  font-size: 14px;
}

.jwq-player-copy small {
  margin-top: 2px;
  color: var(--jwq-muted);
  font-size: 11px;
}

.jwq-host-badge {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--jwq-yellow);
  background: rgba(230, 209, 91, 0.095);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.jwq-online-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--jwq-green);
  box-shadow: 0 0 0 4px rgba(116, 214, 155, 0.08);
}

.jwq-player--empty {
  min-height: 47px;
  justify-content: center;
  border-style: dashed;
  color: rgba(255, 255, 255, 0.25);
  background: transparent;
  font-size: 12px;
}

.jwq-lobby-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.jwq-lobby-actions .jwq-primary-button {
  min-width: 210px;
}

.jwq-wait-label {
  min-height: 48px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--jwq-muted);
  font-size: 13px;
}

.jwq-wait-label span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--jwq-yellow);
  animation: jwq-pulse 1.4s ease-in-out infinite;
}

.jwq-center-state {
  width: min(720px, 100%);
  min-height: calc(100dvh - 180px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.jwq-center-state > p:not(.jwq-eyebrow):not(.jwq-round-label) {
  max-width: 550px;
}

.jwq-vinyl {
  width: clamp(130px, 25vw, 220px);
  aspect-ratio: 1;
  margin-bottom: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, transparent 0 8px, rgba(255, 255, 255, 0.045) 9px 10px),
    radial-gradient(circle, var(--jwq-yellow) 0 15%, #252029 16% 21%, #0d0c0f 22% 100%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
  animation: jwq-spin 3s linear infinite;
}

.jwq-vinyl i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0b090b;
}

.jwq-loader {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.jwq-loader i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--jwq-yellow);
  animation: jwq-loader 1.1s ease-in-out infinite;
}

.jwq-loader i:nth-child(2) {
  animation-delay: 120ms;
}

.jwq-loader i:nth-child(3) {
  animation-delay: 240ms;
}

.jwq-loader--small {
  height: 18px;
}

.jwq-loader--small i {
  width: 5px;
  height: 5px;
}

.jwq-timer-ring {
  --jwq-progress: 1;
  width: clamp(152px, 27vw, 220px);
  aspect-ratio: 1;
  margin: 12px 0 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, #111014 61%, transparent 62%),
    conic-gradient(var(--jwq-yellow) calc(var(--jwq-progress) * 1turn), rgba(255, 255, 255, 0.08) 0);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 24px 80px rgba(0, 0, 0, 0.28);
}

.jwq-timer-ring strong {
  font-size: clamp(58px, 11vw, 94px);
  line-height: 1;
  letter-spacing: -0.07em;
}

.jwq-countdown h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.jwq-round {
  display: grid;
  gap: clamp(16px, 3vw, 28px);
}

.jwq-round-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.jwq-round-head h1 {
  margin-bottom: 0;
  font-size: clamp(32px, 5vw, 58px);
}

.jwq-timer-ring--small {
  width: 96px;
  margin: 0;
  flex: none;
}

.jwq-timer-ring--small strong {
  font-size: 38px;
}

.jwq-audio-stage {
  min-height: clamp(110px, 18vw, 170px);
  padding: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(230, 209, 91, 0.18);
  border-radius: var(--jwq-radius);
  background:
    radial-gradient(circle, rgba(230, 209, 91, 0.1), transparent 55%),
    rgba(255, 255, 255, 0.025);
}

.jwq-wave {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.jwq-wave i {
  width: 7px;
  height: 25%;
  border-radius: 999px;
  background: linear-gradient(to top, #927f25, var(--jwq-yellow));
  box-shadow: 0 0 14px rgba(230, 209, 91, 0.14);
  animation: jwq-wave 0.9s ease-in-out infinite alternate;
}

.jwq-wave i:nth-child(2),
.jwq-wave i:nth-child(6) {
  animation-delay: -0.15s;
}

.jwq-wave i:nth-child(3),
.jwq-wave i:nth-child(5) {
  animation-delay: -0.3s;
}

.jwq-wave i:nth-child(4) {
  animation-delay: -0.45s;
}

.jwq-audio-warning {
  color: var(--jwq-red);
  font-size: 13px;
  font-weight: 700;
}

.jwq-answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.jwq-answer {
  min-height: 84px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  border: 1px solid var(--jwq-border);
  border-radius: 17px;
  color: var(--jwq-text);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  cursor: pointer;
  transition: 150ms ease;
}

.jwq-answer:hover:not(:disabled) {
  border-color: rgba(230, 209, 91, 0.52);
  background: rgba(230, 209, 91, 0.075);
  transform: translateY(-1px);
}

.jwq-answer > span,
.jwq-result-option > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  color: var(--jwq-muted);
  background: rgba(0, 0, 0, 0.2);
  font-size: 13px;
  font-weight: 850;
}

.jwq-answer strong {
  overflow: hidden;
  font-size: clamp(14px, 2vw, 17px);
  line-height: 1.3;
  text-overflow: ellipsis;
}

.jwq-answer.is-selected {
  border-color: var(--jwq-yellow);
  color: var(--jwq-yellow);
  background: rgba(230, 209, 91, 0.11);
}

.jwq-answer.is-selected > span {
  border-color: rgba(230, 209, 91, 0.45);
  color: #19150a;
  background: var(--jwq-yellow);
}

.jwq-answer:disabled:not(.is-selected) {
  cursor: default;
  opacity: 0.48;
}

.jwq-answer-status {
  min-height: 28px;
  color: var(--jwq-muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.jwq-answer-status.is-ok {
  color: var(--jwq-green);
}

.jwq-key-hint {
  margin: -14px 0 0 !important;
  font-size: 11px;
  text-align: center;
}

.jwq-results {
  display: grid;
  justify-items: center;
}

.jwq-results h1 {
  margin-bottom: 8px;
  text-align: center;
}

.jwq-correct-name {
  margin-bottom: 28px !important;
  color: var(--jwq-yellow) !important;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 850;
  text-align: center;
}

.jwq-result-options {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.jwq-result-option {
  min-height: 58px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--jwq-border);
  border-radius: 14px;
  color: var(--jwq-muted);
  background: rgba(255, 255, 255, 0.025);
}

.jwq-result-option strong {
  min-width: 0;
  overflow: hidden;
  flex: 1;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jwq-result-option b {
  color: var(--jwq-green);
}

.jwq-result-option.is-correct {
  border-color: rgba(116, 214, 155, 0.55);
  color: #d7f3e2;
  background: rgba(116, 214, 155, 0.09);
}

.jwq-result-option.is-wrong {
  border-color: rgba(239, 127, 127, 0.42);
  color: #efb2b2;
  background: rgba(239, 127, 127, 0.07);
}

.jwq-scoreboard {
  width: min(760px, 100%);
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--jwq-border);
  border-radius: var(--jwq-radius);
  background: rgba(255, 255, 255, 0.025);
}

.jwq-scoreboard h2 {
  margin-bottom: 13px;
}

.jwq-scoreboard ol {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  list-style: none;
}

.jwq-scoreboard li {
  min-height: 48px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}

.jwq-scoreboard li > span,
.jwq-scoreboard li > small {
  color: var(--jwq-muted);
  font-size: 11px;
}

.jwq-scoreboard li > strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jwq-scoreboard li > b {
  color: var(--jwq-yellow);
  font-size: 14px;
}

.jwq-next-round {
  margin: 18px 0 0 !important;
  font-size: 12px;
}

.jwq-pause-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(230, 209, 91, 0.3);
  border-radius: 50%;
  color: var(--jwq-yellow);
  background: rgba(230, 209, 91, 0.07);
  font-size: 38px;
  font-weight: 900;
}

.jwq-pause-time {
  margin-top: 12px;
  color: var(--jwq-yellow);
  font-size: 24px;
}

.jwq-game-over {
  min-height: calc(100dvh - 180px);
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.jwq-game-over h1 {
  margin-bottom: 26px;
}

.jwq-game-over > .jwq-notice {
  margin-top: -12px;
  margin-bottom: 18px;
}

.jwq-final-list {
  width: min(720px, 100%);
  margin: 0;
  padding: 10px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--jwq-border);
  border-radius: var(--jwq-radius);
  background: rgba(255, 255, 255, 0.025);
  list-style: none;
}

.jwq-final-player {
  min-height: 68px;
  padding: 10px 15px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
}

.jwq-final-player:first-child {
  border: 1px solid rgba(230, 209, 91, 0.25);
  background: rgba(230, 209, 91, 0.075);
}

.jwq-final-rank {
  font-size: 25px;
  text-align: center;
}

.jwq-final-player > span:nth-child(2) {
  min-width: 0;
  display: grid;
}

.jwq-final-player strong,
.jwq-final-player small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jwq-final-player small {
  margin-top: 3px;
  color: var(--jwq-muted);
  font-size: 11px;
}

.jwq-final-player > b {
  color: var(--jwq-yellow);
  font-size: 13px;
}

.jwq-final-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.jwq-inline-connection {
  min-height: 58px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--jwq-border);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
}

.jwq-inline-connection p {
  margin: 0;
  font-size: 13px;
}

.jwq-inline-connection button,
.jwq-connection-overlay button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(230, 209, 91, 0.4);
  color: var(--jwq-yellow);
  background: rgba(230, 209, 91, 0.07);
}

.jwq-connection-overlay {
  position: absolute;
  inset: 74px 0 0;
  z-index: 5;
  padding: 22px;
  display: grid;
  place-items: center;
  background: rgba(8, 7, 10, 0.76);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.jwq-connection-overlay > div {
  width: min(430px, 100%);
  padding: 28px;
  border: 1px solid var(--jwq-border);
  border-radius: var(--jwq-radius);
  background: #151318;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.jwq-connection-overlay h2 {
  margin: 12px 0 8px;
}

.jwq-connection-overlay p {
  margin-bottom: 18px;
  font-size: 13px;
}

.jwq-offline-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(230, 209, 91, 0.3);
  border-radius: 50%;
  color: var(--jwq-yellow);
  background: rgba(230, 209, 91, 0.07);
  font-size: 27px;
  font-weight: 800;
}

@keyframes jwq-spin {
  to { transform: rotate(1turn); }
}

@keyframes jwq-loader {
  0%, 70%, 100% { transform: translateY(0); opacity: 0.45; }
  35% { transform: translateY(-7px); opacity: 1; }
}

@keyframes jwq-wave {
  from { height: 22%; }
  to { height: 100%; }
}

@keyframes jwq-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

@media (max-width: 820px) {
  .jwq-home-grid,
  .jwq-lobby-grid {
    grid-template-columns: 1fr;
  }

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

  .jwq-room-code {
    width: 100%;
    min-width: 0;
  }

  .jwq-center-state,
  .jwq-game-over {
    min-height: calc(100dvh - 150px);
  }
}

@media (max-width: 620px) {
  .jwq-header {
    min-height: 64px;
    padding:
      max(8px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      8px
      max(12px, env(safe-area-inset-left));
  }

  .jwq-brand-mark {
    width: 40px;
    height: 40px;
  }

  .jwq-brand small {
    display: none;
  }

  .jwq-connection {
    width: 10px;
    min-height: 10px;
    padding: 0;
    overflow: hidden;
    border: 0;
    color: transparent;
    background: transparent;
  }

  .jwq-connection i {
    width: 9px;
    height: 9px;
    color: var(--jwq-muted);
  }

  .jwq-connection--online i { color: var(--jwq-green); }
  .jwq-connection--connecting i,
  .jwq-connection--authenticating i,
  .jwq-connection--reconnecting i { color: var(--jwq-yellow); }
  .jwq-connection--offline i,
  .jwq-connection--auth-required i { color: var(--jwq-red); }

  .jwq-main {
    padding:
      22px
      max(14px, env(safe-area-inset-right))
      max(24px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
  }

  .jwq-main h1 {
    font-size: clamp(36px, 12vw, 54px);
  }

  .jwq-card {
    padding: 20px 17px;
    border-radius: 18px;
  }

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

  .jwq-setting:nth-child(3) {
    grid-column: 1 / -1;
  }

  .jwq-eras legend span {
    margin: 4px 0 0;
    display: block;
  }

  .jwq-era-grid {
    gap: 6px;
  }

  .jwq-era span {
    min-height: 38px;
    padding: 9px 11px;
  }

  .jwq-lobby-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .jwq-lobby-actions .jwq-primary-button,
  .jwq-lobby-actions .jwq-ghost-button {
    width: 100%;
  }

  .jwq-wait-label {
    justify-content: center;
  }

  .jwq-round {
    gap: 15px;
  }

  .jwq-round-head {
    gap: 12px;
  }

  .jwq-round-head h1 {
    font-size: 31px;
  }

  .jwq-timer-ring--small {
    width: 76px;
  }

  .jwq-timer-ring--small strong {
    font-size: 30px;
  }

  .jwq-answer-grid,
  .jwq-result-options {
    grid-template-columns: 1fr;
  }

  .jwq-answer {
    min-height: 68px;
    padding: 11px 13px;
  }

  .jwq-answer > span {
    width: 34px;
    height: 34px;
  }

  .jwq-key-hint {
    display: none;
  }

  .jwq-scoreboard {
    padding: 13px;
  }

  .jwq-scoreboard li {
    grid-template-columns: 22px minmax(0, 1fr) auto;
  }

  .jwq-scoreboard li > small {
    display: none;
  }

  .jwq-final-actions {
    width: 100%;
    flex-direction: column;
  }

  .jwq-final-actions button {
    width: 100%;
  }

  .jwq-inline-connection {
    flex-wrap: wrap;
  }

  .jwq-connection-overlay {
    inset: 64px 0 0;
  }
}

@media (max-width: 390px) {
  .jwq-brand > span:last-child {
    max-width: 145px;
  }

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

  .jwq-setting:nth-child(3) {
    grid-column: auto;
  }

  .jwq-room-code > strong {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jwq-root *,
  .jwq-root *::before,
  .jwq-root *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
