:root {
  color-scheme: dark;
  --page: #0f1117;
  --panel: #171b24;
  --panel-strong: #202633;
  --panel-soft: #121620;
  --ink: #f5f7fb;
  --muted: #a7b0c0;
  --line: #303848;
  --line-strong: #485266;
  --accent: #48c7bd;
  --accent-dark: #20958f;
  --accent-soft: rgba(72, 199, 189, 0.18);
  --easy-angle: #48c7bd;
  --hard-angle: #ff7a66;
  --timely: #f5c84b;
  --timely-soft: rgba(245, 200, 75, 0.16);
  --movly: #48c7bd;
  --movly-soft: rgba(72, 199, 189, 0.18);
  --quizly: #79c8ff;
  --quizly-soft: rgba(121, 200, 255, 0.16);
  --coral: #ff7a66;
  --gold: #f5c84b;
  --green: #68d391;
  --blue: #79c8ff;
  --orange: #ff9c47;
  --direction: #a8b8ff;
  --ray: #000000;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(72, 199, 189, 0.13), transparent 30%),
    linear-gradient(315deg, rgba(255, 122, 102, 0.09), transparent 36%),
    var(--page);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.home-shell {
  place-items: start center;
  align-content: start;
}

.game-panel {
  width: min(100%, 590px);
  background: rgba(23, 27, 36, 0.96);
  border: 1px solid rgba(72, 82, 102, 0.72);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.home-panel {
  width: min(100%, 1040px);
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  overflow: visible;
}

.nav-menu {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: auto;
  margin-left: auto;
}

.nav-menu-trigger {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 900;
  list-style: none;
}

.nav-menu-trigger::marker,
.nav-menu-trigger::-webkit-details-marker {
  display: none;
  content: "";
}

.nav-current {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.nav-current > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-menu-chevron {
  color: var(--muted);
  font-size: 0.76rem;
  transition: transform 160ms ease;
}

.nav-menu[open] .nav-menu-chevron {
  transform: rotate(180deg);
}

.nav-menu-trigger:hover,
.nav-menu-trigger:focus-visible {
  background: var(--panel-strong);
  outline: none;
}

.nav-menu-list {
  display: grid;
  gap: 8px;
}

.nav-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: none;
  width: max-content;
  min-width: 280px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 22, 32, 0.98);
  box-shadow: var(--shadow);
}

.nav-menu[open] .nav-menu-dropdown {
  display: grid;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.nav-home-link,
.nav-current-link {
  flex: 0 1 auto;
  max-width: min(210px, 38vw);
}

.nav-current-link span:last-child,
.nav-home-link span:last-child,
.nav-menu-dropdown .nav-link span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-link > i {
  font-size: 0.92rem;
}

.nav-icon-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.nav-icon-wrap i {
  font-size: 0.94rem;
}

.nav-game-icon {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-game-icon[hidden] {
  display: none;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  background: var(--panel-strong);
  color: var(--ink);
  outline: none;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.title-block {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 2.8rem, 2.8rem);
  line-height: 1;
}

.game-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.title-icon-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: var(--accent);
}

.title-icon-wrap i {
  font-size: 1.5rem;
}

.title-game-icon {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.title-game-icon[hidden] {
  display: none;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1rem;
}

.home-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.home-subtitle {
  max-width: 520px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.date-pill,
.icon-button,
.language-switch {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.date-pill {
  display: grid;
  place-items: center;
  min-width: 92px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  padding: 0;
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  color: var(--muted);
}

.language-button {
  min-width: 38px;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1;
}

.language-button.is-active {
  background: var(--accent);
  color: #061113;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
}

.mode-button.is-active {
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--mode-color, rgba(72, 199, 189, 0.35));
}

.mode-button[data-mode="easy"] {
  --mode-color: var(--easy-angle);
}

.mode-button[data-mode="hard"] {
  --mode-color: var(--hard-angle);
}

.movly-pool-switch .mode-button[data-pool="best"] {
  --mode-color: var(--easy-angle);
}

.movly-pool-switch .mode-button[data-pool="trending"] {
  --mode-color: var(--hard-angle);
}

.mode-button.is-active i {
  color: var(--mode-color);
}

.mode-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.mode-legend {
  margin: -8px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 22, 32, 0.7);
}

.mode-legend summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 900;
  list-style: none;
}

.mode-legend summary::-webkit-details-marker {
  display: none;
}

.mode-legend summary i {
  color: var(--accent);
}

.mode-legend-copy {
  display: grid;
  gap: 6px;
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.mode-legend-copy p {
  margin: 0;
}

.mode-legend-copy strong {
  color: var(--ink);
}

.angle-stage {
  --mode-angle: var(--easy-angle);
  --mode-angle-soft: rgba(72, 199, 189, 0.26);
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: min(58vh, 440px);
  min-height: 280px;
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at center, rgba(41, 49, 64, 0.76) 0 47%, rgba(18, 22, 32, 0.22) 48%),
    linear-gradient(145deg, var(--panel-strong), var(--panel-soft));
  overflow: hidden;
}

.angle-stage[data-mode="easy"] {
  --mode-angle: var(--easy-angle);
  --mode-angle-soft: rgba(72, 199, 189, 0.28);
}

.angle-stage[data-mode="hard"] {
  --mode-angle: var(--hard-angle);
  --mode-angle-soft: rgba(255, 122, 102, 0.28);
}

.angle-svg {
  width: min(100%, 420px);
  height: auto;
  display: block;
}

.guide-ring {
  fill: none;
  stroke: rgba(167, 176, 192, 0.24);
  stroke-width: 2;
}

.angle-sector {
  fill: var(--mode-angle-soft);
  stroke: none;
}

.angle-arc {
  fill: none;
  stroke: var(--mode-angle);
  stroke-width: 8;
  stroke-linecap: butt;
  stroke-linejoin: round;
}

.base-ray,
.target-ray {
  stroke: var(--ray);
  stroke-width: 7;
  stroke-linecap: round;
}

.origin-dot {
  fill: var(--ray);
  stroke: rgba(245, 247, 251, 0.82);
  stroke-width: 4;
}

.color-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 14px;
  margin-bottom: 18px;
}

.color-target,
.color-preview-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.color-target {
  min-height: 220px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.color-preview-wrap {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
}

.color-preview {
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgb(128, 128, 128);
}

.timely-panel {
  width: min(100%, 680px);
}

.movly-panel {
  width: min(100%, 650px);
}

.quizly-panel {
  width: min(100%, 720px);
}

.movly-panel .title-icon-wrap {
  color: var(--movly);
}

.quizly-panel .title-icon-wrap {
  color: var(--quizly);
}

.quizly-stage {
  position: relative;
  display: grid;
  min-height: 330px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(121, 200, 255, 0.12), transparent 42%),
    linear-gradient(315deg, rgba(245, 200, 75, 0.08), transparent 38%),
    linear-gradient(145deg, var(--panel-strong), var(--panel-soft));
  overflow: hidden;
}

.quizly-stage.is-error {
  border-color: rgba(255, 122, 102, 0.45);
}

.quizly-loading {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 260px;
  padding: 20px;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.quizly-loading i {
  color: var(--quizly);
  font-size: 1.35rem;
}

.quizly-loading[hidden] {
  display: none;
}

.quizly-question-wrap {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 18px;
}

.quizly-question-wrap[hidden] {
  display: none;
}

.quizly-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.quizly-progress,
.quizly-category,
.quizly-difficulty {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(167, 176, 192, 0.24);
  border-radius: 999px;
  background: rgba(167, 176, 192, 0.1);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.quizly-progress {
  border-color: rgba(121, 200, 255, 0.34);
  background: rgba(121, 200, 255, 0.12);
  color: var(--quizly);
}

.quizly-difficulty {
  border-color: rgba(245, 200, 75, 0.32);
  background: rgba(245, 200, 75, 0.11);
  color: var(--gold);
}

.quizly-question {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.quizly-answers {
  position: relative;
  display: grid;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(167, 176, 192, 0.24);
}

.quizly-answers::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(120px, 36%);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--quizly), rgba(245, 200, 75, 0.75));
}

.quizly-answer {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111721;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.quizly-answer:hover:not(:disabled),
.quizly-answer:focus-visible:not(:disabled) {
  border-color: var(--quizly);
  background:
    linear-gradient(145deg, rgba(121, 200, 255, 0.12), transparent 62%),
    #111721;
  outline: none;
}

.quizly-answer:disabled {
  cursor: default;
}

.quizly-answer.is-selected {
  border-color: rgba(121, 200, 255, 0.56);
  background:
    linear-gradient(145deg, rgba(121, 200, 255, 0.16), transparent 62%),
    #111721;
}

.quizly-answer.is-selected .quizly-answer-letter {
  border-color: rgba(121, 200, 255, 0.48);
  background: rgba(121, 200, 255, 0.14);
  color: var(--quizly);
}

.quizly-answer-letter,
.quizly-review-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(167, 176, 192, 0.22);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
}

.quizly-answer-text {
  min-width: 0;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.quizly-answer-result {
  display: grid;
  place-items: center;
  color: transparent;
}

.quizly-answer.is-correct {
  border-color: rgba(104, 211, 145, 0.48);
  background:
    linear-gradient(145deg, rgba(104, 211, 145, 0.14), transparent 62%),
    #111721;
}

.quizly-answer.is-wrong {
  border-color: rgba(255, 122, 102, 0.48);
  background:
    linear-gradient(145deg, rgba(255, 122, 102, 0.14), transparent 62%),
    #111721;
}

.quizly-answer.is-correct .quizly-answer-letter,
.quizly-review-item.is-correct .quizly-review-index {
  border-color: rgba(104, 211, 145, 0.46);
  background: rgba(104, 211, 145, 0.14);
  color: var(--green);
}

.quizly-answer.is-wrong .quizly-answer-letter,
.quizly-review-item:not(.is-correct) .quizly-review-index {
  border-color: rgba(255, 122, 102, 0.44);
  background: rgba(255, 122, 102, 0.13);
  color: var(--coral);
}

.quizly-answer.is-correct .quizly-answer-result {
  color: var(--green);
}

.quizly-answer.is-wrong .quizly-answer-result {
  color: var(--coral);
}

.quizly-result-panel {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 300px;
  padding: 22px;
  text-align: center;
}

.quizly-result-panel[hidden] {
  display: none;
}

.quizly-result-panel p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.quizly-result-panel h2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
}

.quizly-result-panel h2 i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 1.05rem;
}

.quizly-result-panel.is-win h2 {
  color: var(--green);
}

.quizly-result-panel.is-win h2 i {
  background: rgba(104, 211, 145, 0.16);
  box-shadow: inset 0 0 0 1px rgba(104, 211, 145, 0.42);
}

.quizly-result-panel.is-loss h2 {
  color: var(--coral);
}

.quizly-result-panel.is-loss h2 i {
  background: rgba(255, 122, 102, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 102, 0.42);
}

.quizly-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.quizly-actions [hidden] {
  display: none;
}

.quizly-actions #retryButton:not([hidden]) {
  grid-column: 1 / -1;
  justify-self: center;
}

.quizly-actions #prevButton {
  justify-self: start;
}

.quizly-actions #submitButton {
  justify-self: center;
}

.quizly-actions #nextButton {
  justify-self: end;
}

.quizly-review-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quizly-review-list[hidden] {
  display: none;
}

.quizly-review-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111721;
}

.quizly-review-result.is-wrong {
  color: var(--coral);
}

.quizly-review-result.is-correct {
  color: var(--green);
}

.quizly-review-item .quizly-review-result.is-correct {
  color: var(--green);
}

.quizly-review-item .quizly-review-result.is-wrong {
  color: var(--coral);
}

.quizly-review-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.quizly-review-question,
.quizly-review-answer {
  margin: 0;
  overflow-wrap: anywhere;
}

.quizly-review-question {
  font-weight: 900;
}

.quizly-review-divider {
  display: block;
  width: 100%;
  height: 1px;
  margin: 6px 0 4px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(121, 200, 255, 0.72), rgba(167, 176, 192, 0.22) 52%, transparent);
}

.quizly-review-answer {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.quizly-review-answer span {
  color: var(--ink);
}

.quizly-review-answer.is-user span {
  color: var(--coral);
}

.movly-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 250px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(199, 244, 100, 0.1), transparent 44%),
    linear-gradient(315deg, rgba(121, 200, 255, 0.09), transparent 42%),
    linear-gradient(145deg, var(--panel-strong), var(--panel-soft));
  overflow: hidden;
}

.movly-stage.is-error {
  border-color: rgba(255, 122, 102, 0.45);
}

.movly-loading {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 180px;
  color: var(--muted);
  font-weight: 900;
}

.movly-loading i {
  color: var(--movly);
  font-size: 1.35rem;
}

.movly-loading[hidden] {
  display: none;
}

.movly-emoji-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2em;
  max-width: 100%;
  margin: 0;
  padding: 20px;
  color: var(--ink);
  font-family:
    "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", "Twemoji Mozilla",
    sans-serif;
  font-size: 3.2rem;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
  overflow-x: auto;
  white-space: nowrap;
}

.movly-emoji-line.is-long {
  gap: 0.16em;
  font-size: 3rem;
}

.movly-emoji-line.is-very-long {
  gap: 0.12em;
  font-size: 2.7rem;
}

.movly-emoji-token {
  flex: 0 0 auto;
}

.movly-stage.is-loading .movly-emoji-line {
  display: none;
}

.movly-result {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 136px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(199, 244, 100, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(199, 244, 100, 0.1), transparent 52%),
    #111721;
}

.movly-result[hidden] {
  display: none;
}

.movly-poster {
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, var(--panel-strong), var(--panel-soft));
  background-position: center;
  background-size: cover;
  color: var(--movly);
  font-size: 1.5rem;
}

.movly-result-copy {
  min-width: 0;
}

.movly-result-copy h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

.movly-result-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 850;
}

.timely-stage {
  position: relative;
  display: grid;
  min-height: 420px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(245, 200, 75, 0.09), transparent 40%),
    linear-gradient(145deg, var(--panel-strong), var(--panel-soft));
  overflow: hidden;
}

.timely-loading {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 240px;
  color: var(--muted);
  font-weight: 900;
}

.timely-loading i {
  color: var(--timely);
  font-size: 1.4rem;
}

.timely-loading[hidden] {
  display: none;
}

.timely-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  list-style: none;
}

.timely-stage.is-loading .timely-list {
  display: none;
}

.timely-card {
  display: grid;
  grid-template-columns: 30px 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111721;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.timely-card[draggable="true"] {
  cursor: grab;
}

.timely-card.is-dragging {
  opacity: 0.5;
}

.timely-drop-placeholder {
  min-height: 74px;
  border: 2px dashed rgba(245, 200, 75, 0.44);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(245, 200, 75, 0.1), rgba(72, 199, 189, 0.06)),
    rgba(245, 200, 75, 0.04);
  pointer-events: none;
}

.timely-card.is-revealed {
  border-color: rgba(245, 200, 75, 0.34);
}

.timely-card.is-locked {
  border-color: rgba(104, 211, 145, 0.5);
  background:
    linear-gradient(145deg, rgba(104, 211, 145, 0.13), rgba(104, 211, 145, 0.05)),
    #111721;
}

.timely-card.is-locked .timely-position {
  background: rgba(104, 211, 145, 0.18);
  color: var(--green);
}

.timely-card.is-locked .timely-grip {
  color: var(--green);
  opacity: 0.65;
}

.timely-position {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
}

.timely-grip {
  display: grid;
  place-items: center;
  color: var(--line-strong);
}

.timely-event-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.timely-year {
  width: fit-content;
  min-height: 26px;
  padding: 5px 8px;
  border: 1px solid rgba(245, 200, 75, 0.38);
  border-radius: 8px;
  background: var(--timely-soft);
  color: var(--timely);
  font-size: 0.8rem;
  font-weight: 950;
  line-height: 1;
}

.timely-year[hidden] {
  display: none;
}

.timely-event-text {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 780;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.timely-card-actions {
  display: grid;
  grid-template-columns: 34px;
  gap: 6px;
}

.timely-move-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--muted);
  cursor: pointer;
}

.timely-move-button:hover:not(:disabled),
.timely-move-button:focus-visible:not(:disabled) {
  border-color: var(--timely);
  color: var(--timely);
  outline: none;
}

.timely-move-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.status-strip.is-win {
  border-color: rgba(104, 211, 145, 0.42);
  background: rgba(104, 211, 145, 0.12);
}

.status-strip.is-loss {
  border-color: rgba(255, 122, 102, 0.45);
  background: rgba(255, 122, 102, 0.12);
}

.status-copy {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.status-copy.is-badged > i {
  display: none;
}

.status-copy i {
  flex: 0 0 auto;
  color: var(--accent);
}

.status-copy .feedback-badge i {
  color: inherit;
}

.status-copy .movly-feedback-pill i {
  color: inherit;
}

.status-copy .color-feedback-icon i,
.status-copy .color-channel-icon i {
  color: inherit;
}

.status-strip.is-win .status-copy i {
  color: var(--green);
}

.status-strip.is-loss .status-copy i {
  color: var(--coral);
}

.status-strip.is-wrong #statusIcon {
  color: var(--coral);
}

.status-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  min-width: 0;
  font-size: 1rem;
  font-weight: 850;
}

.attempt-dots {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.attempt-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--line-strong);
}

.attempt-icon.is-used {
  color: var(--accent);
}

.attempt-icon.is-wrong {
  color: var(--coral);
}

.attempt-icon.is-correct {
  color: var(--green);
}

.attempt-icon.is-skip {
  color: var(--gold);
}

.attempt-icon.is-win {
  color: var(--green);
}

.attempt-icon.is-loss {
  color: var(--coral);
}

.guess-form {
  margin: 0 0 16px;
}

.color-form {
  display: grid;
  gap: 14px;
  margin: 0 0 16px;
}

.rgb-controls {
  display: grid;
  gap: 10px;
}

.rgb-control {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 78px;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111721;
}

.rgb-channel,
.channel-pill {
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  font-weight: 950;
}

.rgb-channel {
  width: 28px;
  height: 28px;
  color: #080b10;
}

.rgb-channel.is-red,
.channel-pill.is-r {
  background: #ff7368;
}

.rgb-channel.is-green,
.channel-pill.is-g {
  background: #68d391;
}

.rgb-channel.is-blue,
.channel-pill.is-b {
  background: #79c8ff;
}

.rgb-slider-wrap {
  --slider-accent: var(--accent);
  --slider-zone: rgba(72, 199, 189, 0.46);
  --slider-muted: rgba(72, 82, 102, 0.92);
  --allowed-min: 0%;
  --allowed-max: 100%;
  --slider-thumb-size: 24px;
  --slider-thumb-half: calc(var(--slider-thumb-size) / 2);
  --slider-track-top: 11px;
  position: relative;
  display: grid;
  min-width: 0;
  gap: 4px;
}

.rgb-slider-wrap::before {
  position: absolute;
  z-index: 0;
  top: var(--slider-track-top);
  left: var(--slider-thumb-half);
  right: var(--slider-thumb-half);
  height: 8px;
  border: 1px solid rgba(167, 176, 192, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      var(--slider-muted) 0 var(--allowed-min),
      var(--slider-zone) var(--allowed-min) var(--allowed-max),
      var(--slider-muted) var(--allowed-max) 100%
    );
  box-shadow:
    inset 0 1px 1px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(245, 247, 251, 0.03);
  content: "";
  pointer-events: none;
}

.rgb-slider-wrap[data-channel="r"] {
  --slider-accent: #ff7368;
  --slider-zone: rgba(255, 115, 104, 0.48);
}

.rgb-slider-wrap[data-channel="g"] {
  --slider-accent: #68d391;
  --slider-zone: rgba(104, 211, 145, 0.48);
}

.rgb-slider-wrap[data-channel="b"] {
  --slider-accent: #79c8ff;
  --slider-zone: rgba(121, 200, 255, 0.5);
}

.rgb-slider {
  position: relative;
  z-index: 1;
  width: calc(100% - var(--slider-thumb-size));
  height: 30px;
  margin-inline: var(--slider-thumb-half);
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
  -webkit-appearance: none;
  appearance: none;
}

.rgb-slider::-webkit-slider-runnable-track {
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.rgb-slider::-webkit-slider-thumb {
  width: var(--slider-thumb-size);
  height: var(--slider-thumb-size);
  margin-top: -9px;
  border: 3px solid #0e121a;
  border-radius: 50%;
  background: var(--slider-accent);
  box-shadow:
    0 0 0 1px rgba(245, 247, 251, 0.2),
    0 5px 14px rgba(0, 0, 0, 0.35);
  -webkit-appearance: none;
  appearance: none;
}

.rgb-slider::-moz-range-track {
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.rgb-slider::-moz-range-thumb {
  width: calc(var(--slider-thumb-size) - 6px);
  height: calc(var(--slider-thumb-size) - 6px);
  border: 3px solid #0e121a;
  border-radius: 50%;
  background: var(--slider-accent);
  box-shadow:
    0 0 0 1px rgba(245, 247, 251, 0.2),
    0 5px 14px rgba(0, 0, 0, 0.35);
}

.rgb-slider:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

.rgb-range-values {
  --range-min-pct: 0%;
  --range-max-pct: 100%;
  --range-mid-pct: 50%;
  --range-bg: rgba(72, 199, 189, 0.15);
  --range-border: rgba(72, 199, 189, 0.32);
  --range-ink: var(--accent);
  position: relative;
  display: block;
  min-height: 18px;
  margin-inline: var(--slider-thumb-half);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
}

.rgb-range-values[data-channel="r"] {
  --range-bg: rgba(255, 115, 104, 0.14);
  --range-border: rgba(255, 115, 104, 0.34);
  --range-ink: #ffaaa3;
}

.rgb-range-values[data-channel="g"] {
  --range-bg: rgba(104, 211, 145, 0.14);
  --range-border: rgba(104, 211, 145, 0.34);
  --range-ink: #9ce6b6;
}

.rgb-range-values[data-channel="b"] {
  --range-bg: rgba(121, 200, 255, 0.15);
  --range-border: rgba(121, 200, 255, 0.36);
  --range-ink: #a8dcff;
}

.rgb-range-values span,
.rgb-range-values::after {
  min-width: 28px;
  min-height: 16px;
  padding: 2px 6px;
  border: 1px solid var(--range-border);
  border-radius: 999px;
  background: var(--range-bg);
  color: var(--range-ink);
  font-size: 0.68rem;
  font-weight: 950;
  text-align: center;
}

.rgb-range-values span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
}

.rgb-range-values [data-range-min] {
  left: var(--range-min-pct);
}

.rgb-range-values [data-range-max] {
  left: var(--range-max-pct);
}

.rgb-range-values.is-min-edge [data-range-min] {
  transform: none;
}

.rgb-range-values.is-max-edge [data-range-max] {
  transform: translateX(-100%);
}

.rgb-range-values.is-full span {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.rgb-range-values.is-full [data-range-min] {
  left: 0;
  transform: none;
}

.rgb-range-values.is-full [data-range-max] {
  left: 100%;
  transform: translateX(-100%);
}

.rgb-range-values::after {
  position: absolute;
  top: 0;
  left: clamp(22px, var(--range-mid-pct), calc(100% - 22px));
  display: none;
  width: max-content;
  content: attr(data-range);
  transform: translateX(-50%);
}

.rgb-range-values.is-fixed span,
.rgb-range-values.is-tight span {
  display: none;
}

.rgb-range-values.is-fixed::after,
.rgb-range-values.is-tight::after {
  display: block;
}

.rgb-number-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.rgb-step-button {
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  cursor: pointer;
}

.rgb-step-button:hover:not(:disabled),
.rgb-step-button:focus-visible:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.rgb-step-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.rgb-number {
  width: 78px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e121a;
  color: var(--ink);
  padding: 0 9px;
  font-weight: 850;
  text-align: center;
}

.rgb-number:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
}

.rgb-number:disabled,
.rgb-slider:disabled {
  opacity: 0.55;
}

.color-submit {
  width: 100%;
}

.timely-form {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.timely-submit {
  width: 100%;
}

.guess-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.movly-form .input-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.guess-input {
  width: 100%;
  min-height: 50px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #0e121a;
  color: var(--ink);
  padding: 0 14px;
  font-size: 1.22rem;
  font-weight: 850;
}

.guess-input:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
}

.guess-input:disabled {
  color: var(--muted);
  background: #171b24;
}

.movly-search-wrap {
  position: relative;
}

.movly-suggestions {
  position: absolute;
  z-index: 8;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  max-height: 330px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d121b;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.48);
  overflow-y: auto;
}

.movly-suggestions[hidden] {
  display: none;
}

.movly-suggestion,
.movly-suggestion-empty {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111721;
  color: var(--ink);
}

.movly-suggestion {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  cursor: pointer;
  text-align: left;
}

.movly-suggestion:hover,
.movly-suggestion.is-active,
.movly-suggestion:focus-visible {
  border-color: var(--movly);
  background:
    linear-gradient(145deg, rgba(72, 199, 189, 0.12), transparent 58%),
    #111721;
  outline: none;
}

.movly-suggestion-empty {
  display: grid;
  place-items: center;
  padding: 10px;
  color: var(--muted);
  font-weight: 850;
}

.movly-mini-poster {
  display: grid;
  place-items: center;
  width: 32px;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel-strong);
  color: var(--movly);
  overflow: hidden;
}

.movly-mini-poster.is-skip {
  color: var(--gold);
}

.movly-mini-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movly-suggestion-copy,
.movly-guess-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.movly-suggestion-title,
.movly-guess-title {
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movly-suggestion-year,
.movly-guess-meta {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.movly-guess-meta {
  display: flex;
  min-width: 0;
}

.movly-guess-meta:empty {
  display: none;
}

.movly-feedback-pills {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.movly-feedback-pills.is-status {
  justify-content: center;
}

.movly-feedback-pill {
  --pill-color: var(--movly);
  --pill-bg: rgba(72, 199, 189, 0.13);
  --pill-border: rgba(72, 199, 189, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 24px;
  padding: 4px 7px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-color);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.movly-feedback-pill.is-year {
  --pill-color: var(--gold);
  --pill-bg: rgba(245, 200, 75, 0.13);
  --pill-border: rgba(245, 200, 75, 0.32);
}

.movly-feedback-fallback {
  color: var(--muted);
}

.guess-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 124px;
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #061113;
  cursor: pointer;
  font-weight: 950;
}

.guess-button:hover:not(:disabled),
.guess-button:focus-visible:not(:disabled) {
  background: #62ddd4;
}

.guess-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.skip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 100px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--muted);
  cursor: pointer;
  font-weight: 950;
}

.skip-button:hover:not(:disabled),
.skip-button:focus-visible:not(:disabled) {
  border-color: var(--movly);
  color: var(--movly);
  outline: none;
}

.skip-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.form-message {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--coral);
  font-size: 0.88rem;
  font-weight: 750;
  visibility: hidden;
}

.form-message.is-visible {
  visibility: visible;
}

.guess-list {
  display: grid;
  gap: 8px;
  min-height: 184px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.color-guess-list {
  display: grid;
  gap: 8px;
  min-height: 232px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.movly-guess-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guess-item {
  display: grid;
  grid-template-columns: auto minmax(58px, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111721;
  font-weight: 850;
}

.color-guess-item {
  display: grid;
  grid-template-columns: auto 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111721;
  font-weight: 850;
}

.movly-guess-item {
  display: grid;
  grid-template-columns: auto 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111721;
  font-weight: 850;
}

.movly-guess-item .movly-mini-poster {
  width: 26px;
}

.movly-guess-result {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--coral);
}

.movly-guess-result.is-win {
  color: var(--green);
}

.movly-guess-result.is-skip {
  color: var(--gold);
}

.mini-swatch {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
}

.guess-index {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 0.76rem;
}

.guess-value {
  min-width: 0;
}

.guess-feedback {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.feedback-badge {
  --badge-color: var(--direction);
  --badge-bg: rgba(168, 184, 255, 0.14);
  --badge-border: rgba(168, 184, 255, 0.32);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid var(--badge-border);
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-color);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.color-feedback-badge {
  --badge-color: var(--ink);
  --badge-bg: rgba(167, 176, 192, 0.1);
  --badge-border: rgba(167, 176, 192, 0.24);
  min-width: 116px;
  min-height: 34px;
  gap: 7px;
  padding: 6px 9px;
  justify-content: center;
  color: var(--ink);
}

.color-channel-icon {
  display: inline-grid;
  place-items: center;
  font-size: 0.72rem;
}

.color-channel-icon.is-r {
  color: #ff7368;
}

.color-channel-icon.is-g {
  color: #68d391;
}

.color-channel-icon.is-b {
  color: #79c8ff;
}

.color-feedback-icons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.color-feedback-icon {
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  color: var(--muted);
}

.color-feedback-icon.is-higher,
.color-feedback-icon.is-lower {
  color: var(--direction);
}

.color-feedback-icon.is-cold {
  color: var(--blue);
}

.color-feedback-icon.is-warm {
  color: var(--gold);
}

.color-feedback-icon.is-hot {
  color: var(--orange);
}

.color-feedback-icon.is-veryHot {
  color: var(--coral);
}

.color-feedback-icon.is-exact {
  color: var(--green);
}

.channel-pill {
  width: 24px;
  height: 24px;
  color: #080b10;
  font-size: 0.74rem;
}

.channel-value {
  min-width: 30px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.feedback-badge.is-higher,
.feedback-badge.is-lower {
  --badge-color: var(--direction);
  --badge-bg: rgba(168, 184, 255, 0.14);
  --badge-border: rgba(168, 184, 255, 0.34);
}

.feedback-badge.is-cold {
  --badge-color: var(--blue);
  --badge-bg: rgba(121, 200, 255, 0.14);
  --badge-border: rgba(121, 200, 255, 0.34);
}

.feedback-badge.is-warm {
  --badge-color: var(--gold);
  --badge-bg: rgba(245, 200, 75, 0.14);
  --badge-border: rgba(245, 200, 75, 0.34);
}

.feedback-badge.is-hot {
  --badge-color: var(--orange);
  --badge-bg: rgba(255, 156, 71, 0.14);
  --badge-border: rgba(255, 156, 71, 0.36);
}

.feedback-badge.is-veryHot {
  --badge-color: var(--coral);
  --badge-bg: rgba(255, 122, 102, 0.14);
  --badge-border: rgba(255, 122, 102, 0.36);
}

.feedback-badge.is-exact {
  --badge-color: var(--green);
  --badge-bg: rgba(104, 211, 145, 0.14);
  --badge-border: rgba(104, 211, 145, 0.34);
}

.empty-guess {
  display: grid;
  place-items: center;
  min-height: 40px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--line-strong);
}

.timely-attempt-history {
  display: grid;
  gap: 8px;
  margin: -4px 0 14px;
}

.timely-attempt-history[hidden] {
  display: none;
}

.timely-attempt-row {
  display: grid;
  grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111721;
}

.timely-attempt-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.timely-attempt-cells {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.timely-attempt-cell {
  display: grid;
  place-items: center;
  min-height: 26px;
  border: 1px solid rgba(167, 176, 192, 0.2);
  border-radius: 8px;
  background: rgba(167, 176, 192, 0.08);
  color: var(--muted);
}

.timely-attempt-cell.is-exact {
  border-color: rgba(104, 211, 145, 0.38);
  background: rgba(104, 211, 145, 0.13);
  color: var(--green);
}

.timely-attempt-cell.is-wrong {
  border-color: rgba(255, 122, 102, 0.36);
  background: rgba(255, 122, 102, 0.12);
  color: var(--coral);
}

.timely-attempt-cell.is-used {
  border-color: rgba(245, 200, 75, 0.28);
  background: rgba(245, 200, 75, 0.1);
  color: var(--timely);
}

.game-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.game-card {
  display: grid;
  gap: 18px;
  min-height: 320px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(167, 176, 192, 0.07), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow);
}

.game-card-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-size: 2rem;
  overflow: visible;
}

.game-card-art i {
  position: relative;
  z-index: 1;
}

.game-card-png {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-card-png[hidden] {
  display: none;
}

.game-card-copy {
  display: grid;
  align-content: start;
  gap: 8px;
}

.game-card-copy p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.game-card.is-movly .game-card-art {
  color: var(--movly);
}

.game-card.is-quizly .game-card-art {
  color: var(--quizly);
}

.game-status {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid rgba(167, 176, 192, 0.24);
  border-radius: 999px;
  background: rgba(167, 176, 192, 0.1);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.game-status i {
  color: var(--blue);
}

.game-status.is-inProgress i {
  color: var(--gold);
}

.game-status.is-won i {
  color: var(--green);
}

.game-status.is-lost i {
  color: var(--coral);
}

.play-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  align-self: end;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(167, 176, 192, 0.28);
  border-radius: 8px;
  background: rgba(167, 176, 192, 0.1);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-weight: 950;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.play-link:hover,
.play-link:focus-visible {
  border-color: rgba(167, 176, 192, 0.46);
  background: rgba(167, 176, 192, 0.16);
  outline: none;
}

.stats-dialog {
  width: min(92vw, 520px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.stats-dialog:not([open]) {
  display: none;
}

.stats-dialog::backdrop {
  background: rgba(5, 7, 12, 0.72);
  backdrop-filter: blur(5px);
}

.stats-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stats-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.stat-tile {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 96px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  text-align: center;
}

.stat-tile i {
  color: var(--accent);
}

.stat-value {
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 950;
}

.stat-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.distribution-section {
  display: grid;
  gap: 10px;
}

.distribution-list {
  display: grid;
  gap: 8px;
}

.distribution-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.distribution-attempt {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--muted);
  font-weight: 900;
}

.distribution-track {
  height: 28px;
  border-radius: 8px;
  background: var(--panel-soft);
  overflow: hidden;
}

.distribution-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 30px;
  height: 100%;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--accent-dark);
  color: #ecffff;
  font-size: 0.82rem;
  font-weight: 900;
}

.stats-empty {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.stats-empty[hidden] {
  display: none;
}

@media (max-width: 860px) {
  .game-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .app-shell {
    align-items: start;
    padding: 12px;
  }

  .game-panel {
    padding: 16px;
  }

  .colory-panel {
    display: flex;
    flex-direction: column;
  }

  .colory-panel .site-nav {
    order: 1;
  }

  .colory-panel .topbar {
    order: 2;
  }

  .colory-panel .mode-switch {
    order: 3;
  }

  .colory-panel .mode-legend {
    order: 4;
  }

  .colory-panel .color-stage {
    order: 5;
  }

  .colory-panel .color-form {
    order: 6;
  }

  .colory-panel .status-strip {
    order: 7;
  }

  .colory-panel .color-guess-list {
    order: 8;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .home-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .site-nav {
    flex-wrap: wrap;
    align-items: center;
    overflow: visible;
  }

  .nav-home-link,
  .nav-current-link {
    max-width: calc(50% - 4px);
    min-height: 40px;
  }

  .nav-menu {
    flex: 1 1 100%;
    width: 100%;
    margin-left: 0;
  }

  .nav-menu-trigger {
    min-height: 40px;
    font-size: 0.88rem;
  }

  .nav-current {
    flex: 1;
  }

  .nav-menu-dropdown {
    position: static;
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
    box-shadow: none;
  }

  .nav-menu-dropdown .nav-link {
    min-height: 38px;
    justify-content: flex-start;
    padding: 0 10px;
  }

  .nav-menu-dropdown .nav-icon-wrap {
    flex: 0 0 auto;
  }

  .game-card-grid,
  .color-stage {
    grid-template-columns: 1fr;
  }

  .color-target {
    min-height: 190px;
  }

  .color-preview-wrap {
    grid-template-columns: 1fr 96px;
    align-items: center;
  }

  .rgb-control {
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-areas:
      "channel slider"
      "number number";
    align-items: center;
    gap: 8px 10px;
    min-height: 104px;
    padding: 10px;
  }

  .rgb-channel {
    grid-area: channel;
  }

  .rgb-slider-wrap {
    --slider-thumb-size: 32px;
    --slider-track-top: 16px;
    grid-area: slider;
  }

  .rgb-slider-wrap::before {
    height: 10px;
  }

  .rgb-number-wrap {
    grid-area: number;
    justify-content: stretch;
  }

  .rgb-step-button {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
  }

  .rgb-slider {
    height: 42px;
  }

  .rgb-slider::-webkit-slider-runnable-track {
    height: 10px;
  }

  .rgb-slider::-webkit-slider-thumb {
    width: 32px;
    height: 32px;
    margin-top: -12px;
  }

  .rgb-slider::-moz-range-track {
    height: 10px;
  }

  .rgb-slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
  }

  .rgb-number {
    flex: 1 1 auto;
    width: 100%;
    min-height: 42px;
  }

  .angle-stage {
    min-height: 250px;
  }

  .movly-stage {
    min-height: 220px;
  }

  .movly-emoji-line {
    gap: 0.16em;
    font-size: 2.55rem;
    padding: 14px;
  }

  .movly-emoji-line.is-long {
    gap: 0.12em;
    font-size: 2.1rem;
  }

  .movly-emoji-line.is-very-long {
    gap: 0.1em;
    font-size: 1.8rem;
  }

  .movly-result {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .movly-poster {
    width: 72px;
  }

  .status-strip,
  .input-row {
    grid-template-columns: 1fr;
  }

  .movly-form .input-row {
    grid-template-columns: 1fr;
  }

  .status-strip {
    display: grid;
  }

  .attempt-dots {
    justify-content: start;
  }

  .quizly-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .guess-button {
    width: 100%;
  }

  .skip-button {
    width: 100%;
  }

  .guess-item {
    grid-template-columns: auto minmax(44px, 1fr);
  }

  .color-guess-item {
    grid-template-columns: auto 30px minmax(0, 1fr);
  }

  .movly-guess-item {
    grid-template-columns: auto 26px minmax(0, 1fr) 24px;
  }

  .timely-stage {
    min-height: 360px;
  }

  .timely-card {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .timely-drop-placeholder {
    min-height: 96px;
  }

  .timely-grip {
    display: none;
  }

  .timely-card-actions {
    grid-template-columns: 32px;
  }

  .timely-move-button {
    width: 32px;
  }

  .timely-attempt-row {
    grid-template-columns: 1fr;
  }

  .guess-feedback {
    grid-column: 1 / -1;
    justify-content: flex-start;
    text-align: left;
  }

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