.games-hero {
  margin-bottom: 1rem;
}

.games-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 240px));
  justify-content: center;
}

.games-card-grid .game-card {
  padding: 0.75rem;
  gap: 0.6rem;
}

.games-card-grid .game-card h2 {
  margin: 0;
  font-size: 1.05rem;
}

.games-card-grid .game-card p {
  margin: 0;
  font-size: 0.92rem;
}

.game-card {
  display: grid;
  gap: 0.75rem;
}

.game-card-media-link {
  display: block;
  width: 100%;
  max-width: 180px;
  margin-inline: auto;
  line-height: 0;
  border-radius: 10px;
}

.game-card-media-link:focus-visible {
  outline: 2px solid #1f6feb;
  outline-offset: 2px;
}

.game-card-media {
  display: block;
  width: 100%;
  max-width: 180px;
  height: 180px;
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f6f8fc;
  flex-shrink: 0;
}

.game-card-media-placeholder {
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #1e4d9f;
  letter-spacing: 0.06em;
  height: 180px;
  max-width: 180px;
}

.game-controls {
  display: grid;
  gap: 0.8rem;
}

.game-controls label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.game-controls select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem;
  background: #fff;
}

.game-status {
  margin: 0;
  color: var(--muted);
}

.game-status.error {
  color: var(--err);
}

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

.game-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.game-layout.hidden {
  display: none;
}

.board-card {
  overflow-x: auto;
  padding: 0.6rem;
}

.board-stage {
  position: relative;
  display: inline-block;
  width: fit-content;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.word-board {
  display: grid;
  gap: var(--board-gap, 0.2rem);
  justify-content: start;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.board-overlay {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: visible;
}

.confetti-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0;
  z-index: 40;
  transition: opacity 120ms ease;
}

.confetti-layer.active {
  opacity: 1;
}

.ws-cell {
  width: var(--cell-size, 2rem);
  height: var(--cell-size, 2rem);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  font-size: var(--cell-font-size, 1rem);
  text-transform: uppercase;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.ws-cell.temp {
  background: #dbe9ff;
  border-color: #7aa9f8;
}

.ws-cell.found {
  background: #dff7eb;
  border-color: #57b37a;
}

.ws-cell.revealed {
  background: #ffeaa7;
  border-color: #fdcb6e;
}

.clues-card h2 {
  margin-top: 0;
}

.clues-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.55rem;
}

.clues-list li {
  color: var(--text);
  line-height: 1.35;
}

.clues-list li.resolved {
  color: var(--ok);
  text-decoration: line-through;
}

.clues-list li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.clue-hint-btn {
  flex-shrink: 0;
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border: 1px solid #ffb700;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.15rem 0.2rem;
  border-radius: 4px;
  transition: all 0.2s;
  min-width: 24px;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clue-hint-btn:hover {
  background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.clue-hint-btn:active {
  transform: translateY(0);
}

.clue-hint-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeInHint 0.15s ease-out;
}

@keyframes fadeInHint {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.clue-hint-modal {
  background: var(--surface);
  border-radius: 12px;
  max-width: 400px;
  width: 90vw;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: slideUpHint 0.2s ease-out;
}

@keyframes slideUpHint {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.clue-hint-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 0.8rem;
}

.clue-hint-modal-header h3 {
  margin: 0;
  font-size: 1rem;
}

.clue-hint-modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  color: var(--muted);
  transition: color 0.2s;
}

.clue-hint-modal-close:hover {
  color: var(--text);
}

.clue-hint-modal-content {
  padding: 1rem;
  text-align: center;
}

.clue-hint-modal-content code {
  background: #f0f0f0;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-family: "Courier New", monospace;
  font-size: 1.2rem;
  font-weight: 600;
  display: inline-block;
}

.clue-hint-options {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.4rem;
  text-align: left;
}

.clue-hint-option {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fbff;
  font-weight: 600;
  line-height: 1.4;
}

@media (max-width: 920px) {
  .game-layout {
    grid-template-columns: 1fr;
  }
}

.timed-layout {
  margin-top: 1rem;
}

.timed-layout.hidden {
  display: none;
}

.timed-main-card {
  display: grid;
  gap: 0.85rem;
}

.timed-hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.7rem;
}

.timed-stat {
  display: grid;
  gap: 0.15rem;
}

.timed-stat-label {
  color: var(--muted);
  font-size: 0.86rem;
}

.timed-stat strong {
  font-size: 1.35rem;
  line-height: 1;
}

.timed-heart {
  display: inline-block;
  margin-right: 0.12rem;
  font-size: 1.2rem;
}

.timed-heart.on {
  color: #e53935;
}

.timed-heart.off {
  color: #c7ccd6;
}

.timed-clock {
  --clock-progress: 100%;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#1f8bff var(--clock-progress), #e8edf8 0);
  position: relative;
  font-weight: 800;
  font-size: 1.15rem;
}

.timed-clock::after {
  content: "";
  position: absolute;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #fff;
}

.timed-clock span {
  position: relative;
  z-index: 1;
}

.timed-clock.warning {
  background: conic-gradient(#ff9800 var(--clock-progress), #f2eee6 0);
}

.timed-clock.critical {
  background: conic-gradient(#d32f2f var(--clock-progress), #f8e8e8 0);
}

.timed-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.timed-streak-indicator {
  min-width: 190px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.35rem 0.55rem;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.2rem 0.45rem;
  align-items: center;
}

.timed-streak-indicator .streak-title {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.timed-streak-indicator .streak-number {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.timed-streak-indicator .streak-flames {
  font-size: 0.85rem;
  color: #ff8f00;
  letter-spacing: 0.05em;
}

.timed-streak-indicator .streak-meter {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: #e9eef7;
}

.timed-streak-indicator .streak-meter > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 180ms ease;
}

.timed-streak-indicator.cold .streak-meter > span {
  background: linear-gradient(90deg, #9bb4d8, #6b8ec3);
}

.timed-streak-indicator.warm .streak-meter > span {
  background: linear-gradient(90deg, #ffbf59, #ff9800);
}

.timed-streak-indicator.hot .streak-meter > span {
  background: linear-gradient(90deg, #ff8a65, #ef6c00);
}

.timed-streak-indicator.legend .streak-meter > span {
  background: linear-gradient(90deg, #ff5f6d, #ff1744);
}

.timed-question-bubble {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #eef6ff, #f8fbff);
  font-weight: 700;
  line-height: 1.4;
}

.timed-question-bubble p {
  margin: 0;
}

.timed-playfield {
  position: relative;
  min-height: 390px;
  border: 1px dashed #cfd9eb;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 20%, #f5f9ff, #eef4ff 60%, #e9f1ff);
  overflow: hidden;
}

.timed-inline-restart {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 5;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.9), rgba(245, 249, 255, 0.8));
}

.timed-inline-restart.hidden {
  display: none;
}

.timed-playfield.feedback-correct {
  box-shadow: inset 0 0 0 3px rgba(63, 169, 91, 0.35);
  animation: feedbackPulseCorrect 260ms ease;
}

.timed-playfield.feedback-wrong,
.timed-playfield.feedback-timeout {
  box-shadow: inset 0 0 0 3px rgba(198, 40, 40, 0.35);
  animation: feedbackPulseWrong 260ms ease;
}

.timed-hit-badge {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  z-index: 4;
  color: #fff;
  animation: hitBadgePop 620ms ease forwards;
  pointer-events: none;
}

.timed-hit-badge.success {
  background: linear-gradient(135deg, #38b36f, #2e7d32);
}

.timed-hit-badge.error {
  background: linear-gradient(135deg, #e45f5f, #c62828);
}

.timed-hit-badge.timeout {
  background: linear-gradient(135deg, #ef6c00, #d84315);
}

.timed-balloon {
  position: absolute;
  --balloon-hue: 230;
  --balloon-tilt: 0deg;
  --balloon-scale: 1;
  transform: translate(-50%, -50%);
  border: 1px solid hsl(var(--balloon-hue) 58% 38%);
  border-radius: 999px;
  background:
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0) 38%),
    linear-gradient(140deg, hsl(var(--balloon-hue) 84% 72%), hsl(var(--balloon-hue) 68% 49%));
  color: #fff;
  box-shadow: 0 10px 18px rgba(36, 64, 112, 0.24);
  cursor: pointer;
  padding: 1.05rem 1.35rem;
  max-width: min(360px, 80vw);
  min-width: 170px;
  text-align: center;
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.25;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  overflow: visible;
  position: absolute;
  animation-name: timedBalloonFloat;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.timed-balloon p {
  margin: 0;
}

.timed-balloon::before {
  content: "";
  position: absolute;
  top: 16%;
  left: 22%;
  width: 20%;
  height: 12%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  filter: blur(0.3px);
  pointer-events: none;
}

.timed-balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  width: 10px;
  height: 8px;
  border-radius: 0 0 6px 6px;
  background: hsl(var(--balloon-hue) 64% 42%);
  pointer-events: none;
}

@keyframes timedBalloonFloat {
  0% {
    transform: translate(-50%, -50%) translate(0, 0) rotate(calc(var(--balloon-tilt) * -0.35)) scale(var(--balloon-scale));
  }
  20% {
    transform: translate(-50%, -50%) translate(calc(var(--drift-x, 0) * 0.45), calc(var(--drift-y, 0) * 0.52)) rotate(calc(var(--balloon-tilt) * 0.55)) scale(calc(var(--balloon-scale) * 1.02));
  }
  50% {
    transform: translate(-50%, -50%) translate(var(--drift-x, 0), var(--drift-y, 0)) rotate(calc(var(--balloon-tilt) * -0.75)) scale(calc(var(--balloon-scale) * 0.98));
  }
  75% {
    transform: translate(-50%, -50%) translate(calc(var(--drift-x, 0) * 0.35), calc(var(--drift-y, 0) * -0.35)) rotate(calc(var(--balloon-tilt) * 0.38)) scale(calc(var(--balloon-scale) * 1.01));
  }
  100% {
    transform: translate(-50%, -50%) translate(0, 0) rotate(calc(var(--balloon-tilt) * -0.35)) scale(var(--balloon-scale));
  }
}

.timed-balloon:hover {
  filter: brightness(1.08);
}

.hangman-layout {
  margin-top: 1rem;
}

.hangman-layout.hidden {
  display: none;
}

.hangman-main-card {
  display: grid;
  gap: 0.9rem;
  position: relative;
  overflow: hidden;
}

.hangman-main-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.hangman-lose-card {
  animation: hangman-lose-shake 0.62s cubic-bezier(0.2, 0.6, 0.3, 1);
}

.hangman-lose-card::after {
  opacity: 1;
  animation: hangman-lose-flash 0.8s ease-out;
}

.hangman-hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.hangman-stat {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  background: #fff;
  display: grid;
  gap: 0.12rem;
}

.hangman-stat-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.hangman-stat strong {
  font-size: 1.05rem;
}

.hangman-board {
  display: grid;
  grid-template-columns: minmax(220px, 260px) 1fr;
  gap: 1rem;
  align-items: center;
}

.hangman-figure {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
  background: linear-gradient(180deg, #f8fbff, #f3f8ff);
  border: 1px solid #d8e3f7;
  border-radius: 12px;
}

.hangman-lose-figure {
  animation: hangman-lose-pulse 0.85s ease-out;
}

.hangman-figure .gallow,
.hangman-figure .part {
  position: absolute;
  display: block;
  background: #364c73;
  border-radius: 999px;
}

.hangman-figure .base {
  left: 30px;
  right: 30px;
  bottom: 24px;
  height: 7px;
}

.hangman-figure .pole {
  left: 56px;
  bottom: 24px;
  width: 7px;
  height: 170px;
}

.hangman-figure .top {
  left: 56px;
  top: 26px;
  width: 95px;
  height: 7px;
}

.hangman-figure .rope {
  left: 145px;
  top: 26px;
  width: 4px;
  height: 24px;
  background: #9b7f43;
}

.hangman-figure .part {
  opacity: 0;
  transition: opacity 120ms ease;
}

.hangman-figure .head {
  left: 127px;
  top: 48px;
  width: 38px;
  height: 38px;
  border: 4px solid #364c73;
  border-radius: 50%;
  background: transparent;
}

.hangman-figure .body {
  left: 145px;
  top: 86px;
  width: 4px;
  height: 56px;
}

.hangman-figure .arm-left {
  left: 145px;
  top: 94px;
  width: 4px;
  height: 32px;
  transform: rotate(45deg);
  transform-origin: top;
}

.hangman-figure .arm-right {
  left: 145px;
  top: 94px;
  width: 4px;
  height: 32px;
  transform: rotate(-45deg);
  transform-origin: top;
}

.hangman-figure .leg-left {
  left: 145px;
  top: 138px;
  width: 4px;
  height: 38px;
  transform: rotate(35deg);
  transform-origin: top;
}

.hangman-figure .leg-right {
  left: 145px;
  top: 138px;
  width: 4px;
  height: 38px;
  transform: rotate(-35deg);
  transform-origin: top;
}

.hangman-figure[data-stage="1"] .head,
.hangman-figure[data-stage="2"] .head,
.hangman-figure[data-stage="3"] .head,
.hangman-figure[data-stage="4"] .head,
.hangman-figure[data-stage="5"] .head,
.hangman-figure[data-stage="6"] .head {
  opacity: 1;
}

.hangman-figure[data-stage="2"] .body,
.hangman-figure[data-stage="3"] .body,
.hangman-figure[data-stage="4"] .body,
.hangman-figure[data-stage="5"] .body,
.hangman-figure[data-stage="6"] .body {
  opacity: 1;
}

.hangman-figure[data-stage="3"] .arm-left,
.hangman-figure[data-stage="4"] .arm-left,
.hangman-figure[data-stage="5"] .arm-left,
.hangman-figure[data-stage="6"] .arm-left {
  opacity: 1;
}

.hangman-figure[data-stage="4"] .arm-right,
.hangman-figure[data-stage="5"] .arm-right,
.hangman-figure[data-stage="6"] .arm-right {
  opacity: 1;
}

.hangman-figure[data-stage="5"] .leg-left,
.hangman-figure[data-stage="6"] .leg-left {
  opacity: 1;
}

.hangman-figure[data-stage="6"] .leg-right {
  opacity: 1;
}

.hangman-word-box {
  display: grid;
  gap: 0.65rem;
}

.hangman-hint,
.hangman-used {
  margin: 0;
}

.hangman-word-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hangman-slot {
  min-width: 1.5rem;
  text-align: center;
  border-bottom: 2px solid #3b557f;
  padding: 0 0.12rem;
  font-size: 1.35rem;
  font-weight: 900;
}

.hangman-slot.fixed {
  border-bottom-color: transparent;
}

.hangman-keyboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
  gap: 0.45rem;
}

.hangman-end-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.4rem;
}

.hangman-key {
  border: 1px solid #b9cbe9;
  background: #fff;
  border-radius: 8px;
  min-height: 38px;
  font-weight: 700;
  cursor: pointer;
}

.hangman-key.correct {
  background: #e6f7ed;
  border-color: #7fcb98;
}

.hangman-key.wrong {
  background: #ffe8e8;
  border-color: #e5a0a0;
}

.hangman-key:disabled {
  cursor: default;
  opacity: 0.65;
}

@keyframes hangman-lose-shake {
  0% { transform: translateX(0); }
  15% { transform: translateX(-10px) rotate(-0.6deg); }
  30% { transform: translateX(8px) rotate(0.6deg); }
  45% { transform: translateX(-7px) rotate(-0.4deg); }
  60% { transform: translateX(6px) rotate(0.4deg); }
  75% { transform: translateX(-4px) rotate(-0.2deg); }
  100% { transform: translateX(0); }
}

@keyframes hangman-lose-flash {
  0% {
    background: radial-gradient(circle at 50% 40%, rgba(239, 68, 68, 0.34), rgba(239, 68, 68, 0));
  }
  100% {
    background: radial-gradient(circle at 50% 40%, rgba(239, 68, 68, 0), rgba(239, 68, 68, 0));
  }
}

@keyframes hangman-lose-pulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(220, 38, 38, 0));
  }
  30% {
    transform: scale(1.03);
    filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.55));
  }
  60% {
    transform: scale(0.99);
    filter: drop-shadow(0 0 8px rgba(220, 38, 38, 0.4));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(220, 38, 38, 0));
  }
}

.timed-balloon.correct-reveal {
  border-color: #2e7d32;
}

.timed-balloon.correct-hit {
  background: linear-gradient(135deg, #3fa95b, #2e7d32);
  border-color: #2e7d32;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
  animation: balloonHitGood 420ms ease;
}

.timed-balloon.wrong-hit {
  background: linear-gradient(135deg, #d65b5b, #c62828);
  border-color: #b71c1c;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.2);
  animation: balloonHitBad 420ms ease;
}

.timed-balloon.timeout-reveal {
  box-shadow: 0 0 0 3px rgba(239, 108, 0, 0.24);
}

.timed-balloon:disabled {
  cursor: default;
}

@keyframes feedbackPulseCorrect {
  0% { transform: scale(1); }
  50% { transform: scale(1.01); }
  100% { transform: scale(1); }
}

@keyframes feedbackPulseWrong {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-3px); }
  100% { transform: translateX(0); }
}

@keyframes hitBadgePop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px) scale(0.7);
  }
  20% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1.04);
  }
  75% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px) scale(0.92);
  }
}

@keyframes balloonHitGood {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.12); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes balloonHitBad {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  20% { transform: translate(-50%, -50%) rotate(-5deg); }
  40% { transform: translate(-50%, -50%) rotate(5deg); }
  60% { transform: translate(-50%, -50%) rotate(-4deg); }
  80% { transform: translate(-50%, -50%) rotate(3deg); }
  100% { transform: translate(-50%, -50%) rotate(0deg); }
}

.timed-result-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.timed-result-modal.hidden {
  display: none;
}

.timed-result-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 16, 34, 0.54);
  backdrop-filter: blur(2px);
}

.timed-result-panel {
  position: relative;
  z-index: 1;
  width: min(680px, 94vw);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(145deg, #ffffff, #f5f9ff);
  box-shadow: 0 24px 54px rgba(13, 30, 61, 0.28);
  padding: 1.1rem;
  animation: timedResultModalIn 220ms ease;
}

.timed-result-panel h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.7vw, 1.65rem);
}

.timed-result-hero {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.timed-result-message {
  margin: 0;
  color: var(--muted);
}

.timed-result-pill {
  width: fit-content;
  border: 1px solid #f2c86b;
  background: linear-gradient(135deg, #fff4cf, #ffe69a);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.timed-result-pill span {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6d5600;
}

.timed-result-pill strong {
  font-size: 1.12rem;
  line-height: 1;
}

.timed-result-sections {
  display: grid;
  gap: 0.8rem;
}

.timed-result-block h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  color: #24324f;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.timed-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

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

.timed-result-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 0.7rem 0.75rem;
  display: grid;
  gap: 0.2rem;
}

.timed-result-item span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.timed-result-item strong {
  font-size: 1.33rem;
  line-height: 1;
}

.timed-result-item.highlight {
  background: linear-gradient(135deg, #fff4cf, #ffe69a);
  border-color: #f2c86b;
}

.timed-result-item.success {
  background: linear-gradient(135deg, #e9fbe9, #cbf0cb);
  border-color: #97d697;
}

.timed-result-item.danger {
  background: linear-gradient(135deg, #ffe9e9, #ffd2d2);
  border-color: #f0aaaa;
}

.timed-result-item.warning {
  background: linear-gradient(135deg, #fff2df, #ffe5c1);
  border-color: #f0c488;
}

.timed-result-actions {
  margin-top: 1rem;
  justify-content: flex-end;
}

body.timed-result-open {
  overflow: hidden;
}

@keyframes timedResultModalIn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 920px) {
  .timed-hud {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .timed-progress {
    justify-content: center;
  }

  .timed-playfield {
    min-height: 460px;
  }

  .timed-balloon {
    max-width: min(320px, 88vw);
    min-width: 150px;
    font-size: 1.02rem;
  }

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

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

  .hangman-board {
    grid-template-columns: 1fr;
  }

  .hangman-hud {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .timed-result-grid {
    grid-template-columns: 1fr;
  }

  .timed-result-actions {
    justify-content: stretch;
  }
}