:root {
  color-scheme: light;
  --ink: #263048;
  --muted: #667085;
  --blue: #2f9fdb;
  --blue-deep: #167dc3;
  --orange: #f58220;
  --green: #44bd57;
  --red: #f05a52;
  --red-deep: #d03f3f;
  --purple: #7658d6;
  --cream: #fff4c9;
  --yellow: #ffe06f;
  --shadow: rgba(30, 38, 64, 0.24);
  font-family: "Trebuchet MS", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@font-face {
  font-family: "Roboto Slab";
  src: url("assets/fonts/roboto-slab-900.ttf") format("truetype");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(68, 189, 87, 0.2), transparent 24rem),
    radial-gradient(circle at 82% 0%, rgba(245, 130, 32, 0.22), transparent 26rem),
    linear-gradient(180deg, #f5fbff 0%, #dff3ff 46%, #fff0c9 100%);
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  overflow-x: hidden;
}

button {
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 3px solid rgba(255, 224, 111, 0.95);
  outline-offset: 3px;
}

.phone-shell {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 991 / 1686;
  min-height: min(760px, calc(100vh - 28px));
  max-height: calc(100vh - 28px);
  border-radius: 30px;
  padding: 12px;
  background: #18223c;
  box-shadow: 0 24px 70px var(--shadow);
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 12px;
  display: none;
  overflow: hidden;
  border-radius: 22px;
  padding: 28px;
  background-size: cover;
  background-position: center;
}

.screen.is-active {
  display: flex;
  flex-direction: column;
}

.screen-home {
  background-image: url("assets/words-puzzle-game-kit/png/Main/bg.png");
}

.screen-game {
  background-image: var(--category-bg, url("assets/words-puzzle-game-kit/png/Game Play/bg.png"));
}

.screen-leaderboard {
  background-image: url("assets/words-puzzle-game-kit/png/Ranking/bg.png");
}

.brand {
  position: relative;
  min-height: 68px;
  padding: 0;
  color: #fff;
}

.brand-mark {
  position: absolute;
  left: 0;
  top: 50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.08) 44%),
    linear-gradient(180deg, #fff9dc 0%, #ffe06f 58%, #ffc64a 100%);
  color: #254264;
  font-family: "Sgnika-Bold", "Signika-Bold", "Signika", "Trebuchet MS", ui-sans-serif, system-ui, sans-serif;
  font-weight: 1000;
  font-size: 1.72rem;
  line-height: 1;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.82),
    inset 0 -5px 0 rgba(214, 132, 34, 0.38);
  transform: translateY(-50%);
  z-index: 2;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  line-height: 0;
}

.brand-copy {
  position: absolute;
  left: 50%;
  top: 50%;
  min-width: 0;
  width: min(248px, calc(100% - 142px));
  text-align: center;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.sound-toggle {
  position: absolute;
  top: 50%;
  right: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #24405b;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.08) 44%),
    linear-gradient(180deg, #fff9dc 0%, #ffe987 62%, #ffcf50 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.8),
    inset 0 -5px 0 rgba(214, 132, 34, 0.38);
  transform: translateY(-50%);
  z-index: 2;
}

.speaker-icon {
  position: relative;
  width: 24px;
  height: 22px;
}

.speaker-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 7px -5px 0 -1px currentColor, 7px 5px 0 -1px currentColor;
}

.speaker-icon::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 4px;
  width: 9px;
  height: 14px;
  border: 3px solid currentColor;
  border-left: 0;
  border-radius: 0 14px 14px 0;
}

.sound-toggle.is-muted::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 3px solid var(--red-deep);
  border-radius: 50%;
}

.sound-toggle.is-muted::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 4px;
  border-radius: 99px;
  background: var(--red-deep);
  transform: rotate(-42deg);
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.brand p {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.2;
  font-weight: 900;
  font-size: 0.88rem;
  text-align: center;
  white-space: nowrap;
}

.menu-panel {
  margin-top: 22px;
  padding: 24px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 44%),
    linear-gradient(180deg, #4aa7d3, #267faf);
  box-shadow: 0 8px 0 #1d6f99, 0 18px 32px rgba(0, 0, 0, 0.18);
}

.menu-panel h2 {
  color: var(--yellow);
  text-align: center;
  text-transform: uppercase;
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: 0;
}

.menu-field {
  position: relative;
  margin: 24px 0 0;
  padding: 18px 14px 14px;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
}

.menu-field legend {
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 1000;
}

.difficulty-grid,
.category-grid {
  display: grid;
  gap: 8px;
}

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

.category-window {
  max-height: 264px;
  overflow: hidden;
}

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

.choice {
  position: relative;
  min-height: 42px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.02) 42%),
    linear-gradient(180deg, #36bdff 0%, #1598ec 58%, #0874cc 100%);
  font-family: "Roboto Slab", "Trebuchet MS", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.42),
    inset 0 -5px 0 rgba(0, 77, 147, 0.42);
}

.category-choice {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 76px;
  padding: 9px 10px 15px;
  text-align: left;
  overflow: hidden;
}

.choice::after {
  content: "";
  position: absolute;
  inset: 3px 5px auto;
  height: 28%;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent);
  pointer-events: none;
}

.category-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: #0d67ac;
  background: linear-gradient(180deg, #fff8d9, #fff0ae);
  font-size: 1.35rem;
  line-height: 1;
  text-shadow: none;
  box-shadow: 0 3px 0 rgba(154, 94, 26, 0.38), 0 6px 12px rgba(19, 76, 122, 0.24);
}

.category-name {
  min-width: 0;
  font-size: 0.9em;
  line-height: 1.05;
}

.category-info {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 40px;
}

.category-stars {
  position: absolute;
  top: calc(50% + 13px);
  left: 0;
  color: #f7b733;
  font-size: 0.88rem;
  line-height: 1;
  -webkit-text-stroke: 1px rgba(91, 67, 26, 0.42);
  paint-order: stroke fill;
}

.category-progress {
  position: absolute;
  right: 10px;
  bottom: 7px;
  left: 10px;
  height: 6px;
  border-radius: 99px;
  background: rgba(54, 66, 82, 0.36);
  overflow: hidden;
}

.category-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #eff3f6, #aeb9c4);
}

.choice.is-selected {
  color: #9d4318;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.06) 44%),
    linear-gradient(180deg, #fff9dc 0%, #ffe987 62%, #ffcf50 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.8),
    inset 0 -5px 0 rgba(214, 132, 34, 0.38);
}

.choice.is-selected .category-icon {
  background: linear-gradient(180deg, #42c5ff, #1194e8);
  color: #fff;
  box-shadow: 0 3px 0 rgba(0, 90, 157, 0.5), 0 6px 12px rgba(111, 70, 17, 0.22);
}

.choice.is-selected .category-progress {
  background: rgba(90, 80, 68, 0.28);
}

.category-pager {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.pager-button,
.random-button {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 8px;
  font-family: "Roboto Slab", "Trebuchet MS", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  overflow: hidden;
}

.pager-button::after,
.random-button::after,
.progress-button::after,
.sound-toggle .speaker-icon::before {
  z-index: 1;
}

.pager-button {
  width: 64px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.02) 42%),
    linear-gradient(180deg, #ff9a2f 0%, #f27c20 60%, #df5d17 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    inset 0 -5px 0 rgba(150, 62, 18, 0.34);
}

.pager-button:disabled {
  color: rgba(36, 64, 91, 0.62);
  cursor: default;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.02) 42%),
    linear-gradient(180deg, #d9dee5, #b8c1cc);
  text-shadow: none;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.42),
    inset 0 -5px 0 rgba(40, 52, 68, 0.18);
}

.random-button {
  width: 126px;
  color: #9d4318;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.06) 44%),
    linear-gradient(180deg, #fff9dc 0%, #ffe987 62%, #ffcf50 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.8),
    inset 0 -5px 0 rgba(214, 132, 34, 0.38);
}

.progress-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  margin-top: 16px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.02) 42%),
    linear-gradient(180deg, #ff9a2f 0%, #f27c20 60%, #df5d17 100%);
  font-family: "Roboto Slab", "Trebuchet MS", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    inset 0 -5px 0 rgba(150, 62, 18, 0.34);
  overflow: hidden;
}

.progress-button > span {
  position: relative;
  z-index: 1;
}

.progress-stars {
  color: #fff3a6;
  font-size: 0.9rem;
  line-height: 1;
}

.pager-button::before,
.random-button::before,
.progress-button::before,
.sound-toggle::before,
.summary-grid div::before,
.leaderboard-row::before,
.timer-badge::before,
.clue-card::before,
.answer-slot::before,
.tool-button::before {
  content: "";
  position: absolute;
  inset: 3px 5px auto;
  height: 28%;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent);
  pointer-events: none;
}

.game-hud,
.leaderboard-header {
  display: grid;
  grid-template-columns: 58px 1fr 82px;
  gap: 12px;
  align-items: center;
  flex: 0 0 auto;
  color: #fff;
}

.leaderboard-header {
  grid-template-columns: 58px 1fr;
}

.game-hud span,
.leaderboard-header span,
.timer-badge span,
.clue-card span,
.result-kicker,
.result-stats span,
.summary-grid span,
.leaderboard-head span,
.leaderboard-row small {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.68rem;
  font-weight: 1000;
}

.game-hud strong,
.leaderboard-header h2 {
  display: block;
  font-size: 1.1rem;
  line-height: 1.05;
}

.game-hud small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.leaderboard-header h2 {
  margin: 0;
  font-family: "Sgnika-Bold", "Signika-Bold", "Signika", "Trebuchet MS", ui-sans-serif, system-ui, sans-serif;
  font-weight: 1000;
  font-size: 1.85rem;
}

.leaderboard-header p {
  margin-top: 6px;
  max-width: 24ch;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.25;
  font-weight: 800;
}

.back-button {
  width: 58px;
  height: 42px;
  background: url("assets/words-puzzle-game-kit/png/Challenge/back-icon.png") center / contain no-repeat;
}

.timer-badge {
  position: relative;
  display: grid;
  place-items: center;
  height: 72px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.18) 42%, rgba(255, 255, 255, 0) 43%),
    linear-gradient(180deg, #fffdf0 0%, #ffe98a 48%, #ffc84c 100%);
  color: #254264;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.8),
    inset 0 -6px 0 rgba(195, 111, 25, 0.42);
  overflow: hidden;
}

.timer-badge strong {
  position: relative;
  z-index: 1;
  font-size: 1.7rem;
}

.timer-badge span {
  position: relative;
  z-index: 1;
}

.timer-badge.is-low strong {
  color: #d92836;
}

.clue-stage {
  flex: 0 0 auto;
  margin-top: 18px;
  min-height: 94px;
}

.clue-card {
  position: relative;
  min-height: 64px;
  padding: 10px 18px 11px;
  border-radius: 8px;
  color: #24405b;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(255, 255, 255, 0.18) 42%, rgba(255, 255, 255, 0) 43%),
    linear-gradient(180deg, #fffdf2 0%, #fff0b8 52%, #ffe08a 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.82),
    inset 0 -6px 0 rgba(214, 132, 34, 0.3);
  overflow: hidden;
}

.clue-card span {
  position: relative;
  z-index: 1;
  color: var(--orange);
}

.clue-card p {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin-top: 5px;
  padding-bottom: 2px;
  overflow: hidden;
  font-size: 1.08rem;
  line-height: 1.06;
  font-weight: 1000;
}

.clue-card[data-fit="medium"] p {
  font-size: 0.96rem;
  line-height: 1.04;
}

.clue-card[data-fit="long"] p {
  font-size: 0.88rem;
  line-height: 1.03;
}

.round-progress {
  display: flex;
  justify-content: center;
  flex: 0 0 auto;
  gap: 7px;
  min-height: 10px;
  margin-top: 14px;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.44);
}

.progress-dot.is-current {
  background: var(--yellow);
}

.progress-dot.is-done {
  background: var(--green);
}

.answer-slots {
  display: grid;
  align-self: center;
  justify-content: center;
  width: 100%;
  max-width: 360px;
  flex: 0 0 auto;
  gap: 8px;
  margin: 8px 0 12px;
}

.answer-slot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.2) 44%, rgba(255, 255, 255, 0) 45%),
    linear-gradient(180deg, #ffffff 0%, #eaf8ff 100%);
  color: #24405b;
  font-size: clamp(0.95rem, 5vw, 1.45rem);
  font-weight: 1000;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.86),
    inset 0 -5px 0 rgba(37, 66, 100, 0.18);
  overflow: hidden;
}

.answer-slot.is-hint {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.18) 42%, rgba(255, 255, 255, 0) 43%),
    linear-gradient(180deg, #fffdf0 0%, #ffe98a 48%, #ffc84c 100%);
}

.answer-slot {
  z-index: 0;
}

.letter-grid {
  display: grid;
  align-self: center;
  width: 100%;
  max-width: 360px;
  flex: 0 0 auto;
  gap: 3px;
  padding: 7px;
  border-radius: 8px;
  background: rgba(31, 65, 112, 0.42);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.letter-grid.is-large {
  gap: 2px;
  padding: 5px;
}

.tile {
  aspect-ratio: 1;
  padding: 0;
  background: transparent;
  overflow: visible;
}

.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tile.is-disabled {
  opacity: 0.5;
}

.tool-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  flex: 0 0 auto;
  gap: 8px;
  margin-top: 12px;
}

.tool-button {
  position: relative;
  min-height: 49px;
  border-radius: 8px;
  color: #fff;
  font-weight: 1000;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.02) 42%),
    linear-gradient(180deg, #5ddc6f 0%, #3cc350 58%, #269d3b 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.42),
    inset 0 -5px 0 rgba(23, 100, 43, 0.38);
  overflow: hidden;
}

.tool-button.shuffle {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.02) 42%),
    linear-gradient(180deg, #ff9a2f 0%, #f27c20 60%, #df5d17 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    inset 0 -5px 0 rgba(150, 62, 18, 0.34);
}

.tool-button.backspace {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.02) 42%),
    linear-gradient(180deg, #ff786e 0%, #f15959 58%, #d83d46 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    inset 0 -5px 0 rgba(142, 38, 48, 0.36);
}

.tool-button.skip {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.02) 42%),
    linear-gradient(180deg, #9b82f3 0%, #8467e5 58%, var(--purple) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.42),
    inset 0 -5px 0 rgba(70, 48, 143, 0.36);
}

.tool-button {
  z-index: 0;
}

.tool-button {
  isolation: isolate;
}

.result-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(20, 36, 59, 0.58);
}

.result-overlay.is-win {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 224, 111, 0.24), transparent 12rem),
    rgba(20, 36, 59, 0.58);
}

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

.celebration-burst {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.celebration-burst span {
  position: absolute;
  color: #fff3a6;
  font-size: 1.45rem;
  opacity: 0;
  animation: burst-star 900ms ease-out forwards;
  transform: rotate(var(--angle)) translateY(0) scale(0.55);
}

@keyframes burst-star {
  0% {
    opacity: 0;
    transform: rotate(var(--angle)) translateY(0) scale(0.35);
  }
  18% {
    opacity: 1;
  }
  78% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: rotate(var(--angle)) translateY(calc(-1 * var(--distance))) scale(1.1);
  }
}

.result-card {
  position: relative;
  width: min(100%, 340px);
  padding: 28px 26px 24px;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  color: #24405b;
  box-shadow: 0 8px 0 rgba(141, 125, 86, 0.45), 0 24px 44px rgba(0, 0, 0, 0.22);
  animation: result-pop 320ms cubic-bezier(0.17, 0.9, 0.28, 1.25);
}

.result-card.is-category-complete {
  width: min(100%, 360px);
  padding: 34px 28px 26px;
  border-radius: 22px 22px 12px 12px;
  background:
    linear-gradient(90deg, rgba(153, 95, 35, 0.16), transparent 8%, transparent 92%, rgba(153, 95, 35, 0.16)),
    linear-gradient(180deg, #fff9df 0%, #fff0bf 50%, #ffe49a 100%);
  box-shadow:
    inset 0 8px 0 rgba(255, 255, 255, 0.64),
    inset 0 -8px 0 rgba(190, 119, 40, 0.24),
    0 18px 36px rgba(0, 0, 0, 0.24);
}

.result-card.is-category-complete::before,
.result-card.is-category-complete::after {
  content: "";
  position: absolute;
  right: 22px;
  left: 22px;
  height: 18px;
  border-radius: 99px;
  background:
    linear-gradient(180deg, #ffe8a8, #d6933b);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.54);
}

.result-card.is-category-complete::before {
  top: -8px;
}

.result-card.is-category-complete::after {
  bottom: -8px;
}

.result-card.is-category-complete .result-kicker {
  color: #d86a22;
}

.result-card.is-category-complete h2 {
  color: #9d4318;
}

@keyframes result-pop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.result-icon {
  display: block;
  width: 118px;
  margin: 0 auto 4px;
}

.result-kicker {
  color: var(--yellow);
}

.result-card h2 {
  margin-top: 2px;
  color: var(--red);
  font-size: 2.35rem;
  line-height: 1;
}

.result-stars {
  margin-top: 10px;
  color: #ffc941;
  font-family: "Trebuchet MS", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.42rem;
  line-height: 1;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 0 rgba(144, 92, 17, 0.2);
}

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

.result-card p {
  margin: 10px auto 18px;
  color: #536273;
  line-height: 1.25;
  font-weight: 900;
  text-shadow: none;
}

.clue-card p,
.leaderboard-row small {
  text-shadow: none;
}

.result-stats,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.result-stats div,
.summary-grid div {
  padding: 12px 8px;
  border-radius: 8px;
  background: #eff9ff;
}

.result-stats strong,
.summary-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 1.25rem;
}

.primary-action,
.secondary-action {
  width: 100%;
  border-radius: 8px;
  font-weight: 1000;
}

.primary-action {
  min-height: 68px;
  margin-top: 24px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 40%),
    linear-gradient(180deg, var(--red), var(--red-deep));
  font-size: 1.2rem;
  box-shadow: 0 8px 0 #a82f37, 0 16px 26px rgba(0, 0, 0, 0.22);
}

.secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.secondary-actions:has(.secondary-action:only-child) {
  grid-template-columns: 1fr;
}

.secondary-action {
  min-height: 48px;
  color: #24405b;
  background: #eff9ff;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.1);
}

.summary-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 24px;
}

.summary-grid div {
  position: relative;
  min-height: 78px;
  text-align: center;
  color: #254264;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.18) 42%, rgba(255, 255, 255, 0) 43%),
    linear-gradient(180deg, #fffdf0 0%, #ffe98a 48%, #ffc84c 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.8),
    inset 0 -6px 0 rgba(195, 111, 25, 0.42);
  overflow: hidden;
}

.summary-grid strong {
  position: relative;
  z-index: 1;
  font-size: 1.45rem;
}

.summary-grid span {
  position: relative;
  z-index: 1;
}

.leaderboard-panel {
  min-height: 0;
  margin-top: 18px;
  padding: 16px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(180deg, #4aa7d3, #267faf);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.26),
    inset 0 -6px 0 rgba(14, 86, 132, 0.34);
  overflow: hidden;
}

.leaderboard-head,
.leaderboard-row {
  display: grid;
  grid-template-columns: 1fr 42px 42px 52px;
  gap: 6px;
  align-items: center;
}

.leaderboard-head {
  color: rgba(255, 255, 255, 0.78);
  padding: 0 6px 8px;
}

.leaderboard-head span:not(:first-child),
.leaderboard-row > span {
  text-align: center;
}

.leaderboard-list {
  max-height: 390px;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 4px;
}

.leaderboard-row {
  position: relative;
  width: 100%;
  min-height: 66px;
  margin-top: 8px;
  padding: 10px 6px 10px 12px;
  border-radius: 8px;
  color: #24405b;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(255, 255, 255, 0.18) 42%, rgba(255, 255, 255, 0) 43%),
    linear-gradient(180deg, #fffdf2 0%, #fff0b8 50%, #ffd979 100%);
  text-align: left;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.8),
    inset 0 -6px 0 rgba(196, 126, 37, 0.28);
  overflow: hidden;
}

.leaderboard-row.is-best {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.02) 42%),
    linear-gradient(180deg, #ff9a2f 0%, #f27c20 60%, #df5d17 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    inset 0 -5px 0 rgba(150, 62, 18, 0.34);
}

.leaderboard-row strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 1.04rem;
}

.leaderboard-row small {
  position: relative;
  z-index: 1;
  margin-top: 2px;
  color: currentColor;
  opacity: 0.72;
}

.leaderboard-row > span {
  position: relative;
  z-index: 1;
  font-weight: 1000;
}

.toast {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 150px;
  z-index: 20;
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: rgba(20, 36, 59, 0.92);
  text-align: center;
  font-weight: 1000;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
  animation: rise 1.35s ease both;
}

@keyframes rise {
  0% { opacity: 0; transform: translateY(12px); }
  14%, 82% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-8px); }
}

@media (max-height: 760px) {
  .screen {
    padding: 20px;
  }

  .game-hud {
    grid-template-columns: 50px 1fr 72px;
    gap: 10px;
  }

  .back-button {
    width: 50px;
    height: 36px;
  }

  .timer-badge {
    height: 62px;
  }

  .brand-mark {
    width: 56px;
    height: 56px;
  }

  .menu-panel {
    margin-top: 16px;
    padding: 20px;
  }

  .menu-field {
    margin-top: 18px;
  }

  .clue-card {
    min-height: 58px;
    padding: 9px 16px 10px;
  }

  .clue-stage {
    margin-top: 12px;
    min-height: 86px;
  }

  .clue-card p {
    font-size: 1.12rem;
    line-height: 1.05;
  }

  .clue-card[data-fit="medium"] p,
  .clue-card[data-fit="long"] p {
    font-size: 1rem;
    line-height: 1.04;
  }

  .round-progress {
    margin-top: 10px;
  }

  .answer-slots {
    max-width: 270px;
    gap: 6px;
    margin: 6px 0 8px;
  }

  .letter-grid {
    max-width: 270px;
  }

  .tool-row {
    margin-top: 8px;
  }

  .tool-button {
    min-height: 44px;
  }
}

@media (max-width: 380px) {
  .screen {
    padding: 18px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    font-size: 1.16rem;
  }

  .difficulty-grid {
    gap: 6px;
  }

  .choice {
    font-size: 0.86rem;
  }

  .category-choice {
    grid-template-columns: 34px 1fr;
    gap: 6px;
    min-height: 70px;
    padding: 8px;
  }

  .category-icon {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }

  .tool-button {
    font-size: 0.86rem;
  }
}
