:root {
  --quest-bg: #020817;
  --quest-bg-soft: #06152d;
  --quest-panel: rgba(7, 24, 54, 0.94);
  --quest-panel-soft: rgba(11, 34, 72, 0.9);
  --quest-line: rgba(69, 151, 255, 0.26);
  --quest-line-bright: rgba(45, 207, 255, 0.68);
  --quest-text: #f4f8ff;
  --quest-muted: #91a9cb;
  --quest-cyan: #29d8ff;
  --quest-blue: #2379ff;
  --quest-violet: #a548ff;
  --quest-gold: #ffc928;
  --quest-orange: #ff9d16;
  --quest-green: #46dd68;
  --quest-danger: #ff5775;
  --quest-radius: 18px;
  --quest-shadow: 0 20px 52px rgba(0, 4, 17, 0.52);
}

.game-dashboard-page {
  min-width: 0;
  color: var(--quest-text);
  background:
    radial-gradient(circle at 66% 12%, rgba(19, 85, 181, 0.22), transparent 33rem),
    radial-gradient(circle at 82% 70%, rgba(104, 29, 182, 0.16), transparent 32rem),
    linear-gradient(150deg, #010611 0%, #03112a 48%, #020817 100%);
}

.game-dashboard-page::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.48) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(69, 196, 255, 0.28) 0 1px, transparent 1.5px);
  background-position: 0 0, 36px 52px;
  background-size: 92px 92px, 131px 131px;
  opacity: 0.26;
}

.game-dashboard-page,
.game-dashboard-page button,
.game-dashboard-page input,
.game-dashboard-page select {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

.game-dashboard-page .game-site-header {
  display: none;
}

.game-dashboard-page [hidden] {
  display: none !important;
}

.game-dashboard-page .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.quest-language-host .language-switcher {
  margin: 0;
}

.quest-language-host .language-toggle {
  min-height: 46px;
  border-color: var(--quest-line);
  color: var(--quest-text);
  background: rgba(13, 39, 82, 0.9);
}

.quest-language-host .language-menu {
  right: 0;
  left: auto;
  color: #13203e;
}

.quest-shell {
  width: min(1920px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
}

.quest-topbar {
  position: sticky;
  top: 10px;
  z-index: 30;
  display: grid;
  grid-template-columns: 172px minmax(290px, 430px) auto auto;
  gap: 10px;
  align-items: center;
  justify-content: start;
  min-height: 78px;
  padding: 8px 10px;
  border: 1px solid var(--quest-line);
  border-radius: var(--quest-radius);
  background: rgba(3, 15, 38, 0.92);
  box-shadow: 0 14px 38px rgba(0, 4, 17, 0.5);
  backdrop-filter: blur(18px);
}

.game-dashboard-page.is-tug-war-active .quest-topbar {
  display: none;
}

.game-dashboard-page.is-tug-war-active .quest-view-header {
  display: none;
}

.game-dashboard-page.is-tug-war-active .quest-shell {
  padding-top: 8px;
}

.game-dashboard-page.is-tug-war-active .quest-layout {
  margin-top: 0;
}

.game-dashboard-page.is-tug-war-active .quest-team-grid {
  margin-top: 0;
}

.quest-logo,
.quest-player-card,
.quest-resources,
.quest-icon-button {
  border: 1px solid rgba(74, 143, 230, 0.2);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(17, 43, 87, 0.82), rgba(4, 18, 43, 0.9));
}

.quest-logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60px;
  padding: 8px 16px;
  color: var(--quest-text);
  text-decoration: none;
}

.quest-logo img {
  display: block;
  width: 100%;
  max-width: 152px;
  height: auto;
}

.quest-logo small {
  margin-top: 7px;
  color: var(--quest-muted);
  font-size: 0.69rem;
  letter-spacing: 0.02em;
}

.quest-player-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 9px;
  align-items: center;
  min-height: 60px;
  padding: 7px 12px;
}

.quest-avatar {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border: 3px solid rgba(67, 209, 255, 0.72);
  border-radius: 50%;
  color: #fff;
  background-color: #102d65;
  background-image: url("/assets/game/hero-learner.webp");
  background-position: center 28%;
  background-size: cover;
  box-shadow: 0 0 24px rgba(48, 190, 255, 0.3);
  font-weight: 900;
  font-size: 1.45rem;
}

.quest-player-card > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.quest-player-card span,
.quest-player-card small {
  overflow: hidden;
  color: var(--quest-muted);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quest-player-card .quest-player-name {
  color: var(--quest-text);
  font-size: 0.98rem;
  font-weight: 900;
}

.quest-player-card .xp-track {
  height: 7px;
  margin-top: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
}

.quest-player-card .xp-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--quest-gold), var(--quest-orange));
  box-shadow: 0 0 14px rgba(255, 193, 31, 0.55);
}

.quest-resources.game-dashboard {
  display: grid;
  grid-template-columns: repeat(5, 112px);
  gap: 4px;
  width: max-content;
  min-height: 60px;
  padding: 5px;
}

.quest-resources.game-dashboard .quest-resource {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
  min-width: 0;
  min-height: 50px;
  padding: 6px;
  border: 0;
  border-right: 1px solid rgba(97, 155, 226, 0.18);
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
}

.quest-resources.game-dashboard .quest-resource:last-child {
  border-right: 0;
}

.quest-resource::before,
.quest-resource::after {
  display: none !important;
}

.quest-resource-icon {
  font-size: 1.15rem;
  filter: drop-shadow(0 0 8px rgba(255, 203, 43, 0.35));
}

.quest-resource div {
  display: grid;
  min-width: 0;
}

.quest-resource div > span {
  overflow: hidden;
  color: var(--quest-muted);
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quest-resources.game-dashboard .stat-card-coins span:not(.stat-icon),
.quest-resources.game-dashboard .stat-card-gems span:not(.stat-icon) {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
  overflow: hidden;
}

.quest-resources.game-dashboard .quest-resource strong {
  display: block;
  overflow: hidden;
  color: var(--quest-text);
  font-size: 0.86rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quest-resource-add {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(64, 210, 255, 0.4);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, #276dff, #04a8cb);
  font-weight: 900;
  cursor: pointer;
}

.quest-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quest-icon-button {
  display: grid;
  width: 54px;
  min-height: 54px;
  place-items: center;
  border-color: rgba(69, 151, 255, 0.24);
  color: #fff;
  font-size: 1.4rem;
  text-decoration: none;
  cursor: pointer;
}

.quest-layout {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.quest-sidebar {
  position: sticky;
  top: 112px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: calc(100vh - 130px);
  padding: 12px;
  border: 1px solid var(--quest-line);
  border-radius: var(--quest-radius);
  background: rgba(3, 16, 40, 0.88);
  box-shadow: var(--quest-shadow);
}

.quest-nav {
  display: grid;
  gap: 7px;
}

.quest-nav-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 49px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #c6d6ee;
  background: transparent;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.quest-nav-item > span:first-child {
  font-size: 1.25rem;
  text-align: center;
  filter: saturate(1.2);
}

.quest-nav-item:hover {
  border-color: rgba(50, 175, 255, 0.35);
  color: #fff;
  background: rgba(27, 102, 191, 0.22);
  transform: translateX(2px);
}

.quest-nav-item[aria-current="page"] {
  border-color: rgba(72, 215, 255, 0.8);
  color: #fff;
  background: linear-gradient(100deg, rgba(22, 120, 228, 0.96), rgba(8, 62, 126, 0.8));
  box-shadow: inset 0 0 18px rgba(64, 218, 255, 0.14), 0 0 20px rgba(27, 151, 255, 0.25);
}

.quest-streak-card,
.quest-mini-ranking {
  padding: 13px;
  border: 1px solid rgba(65, 136, 226, 0.2);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(9, 34, 72, 0.9), rgba(4, 19, 43, 0.9));
}

.quest-streak-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.quest-streak-card > span {
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(255, 120, 24, 0.5));
}

.quest-streak-card div {
  display: grid;
}

.quest-streak-card small,
.quest-mini-ranking > span {
  color: var(--quest-muted);
  font-size: 0.72rem;
}

.quest-streak-dots {
  grid-column: 1 / -1;
  display: flex !important;
  justify-content: space-between;
}

.quest-streak-dots i {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 203, 39, 0.9);
  border-radius: 50%;
  background: #bc6a00;
  box-shadow: 0 0 8px rgba(255, 179, 26, 0.4);
}

.quest-mini-ranking {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quest-content {
  min-width: 0;
}

.quest-view {
  animation: quest-view-in 260ms ease both;
}

.quest-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--quest-line);
  border-radius: var(--quest-radius);
  color: var(--quest-text);
  background:
    linear-gradient(145deg, rgba(9, 31, 67, 0.96), rgba(4, 18, 43, 0.96));
  box-shadow: var(--quest-shadow), inset 0 1px rgba(255, 255, 255, 0.03);
}

.quest-panel::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(120deg, rgba(58, 159, 255, 0.06), transparent 34%, transparent 72%, rgba(115, 39, 255, 0.05));
}

.quest-panel > * {
  position: relative;
  z-index: 1;
}

.quest-panel h1,
.quest-panel h2,
.quest-panel h3,
.quest-view h1,
.quest-view h2 {
  color: var(--quest-text);
}

.quest-panel p,
.quest-panel small {
  color: var(--quest-muted);
}

.game-dashboard-page .coach-summary div {
  color: #0b1535;
}

.game-dashboard-page .coach-summary span {
  color: #5f6d85;
}

.game-dashboard-page .coach-summary strong {
  color: #081434;
  text-shadow: none;
}

.game-dashboard-page [data-notifications] {
  display: grid;
  gap: 10px;
}

.game-dashboard-page [data-notifications] p {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(198, 218, 255, 0.82);
  border-radius: 8px;
  color: #0b1535;
  background: rgba(246, 249, 255, 0.96);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.84);
  font-weight: 800;
  line-height: 1.45;
}

.quest-panel-heading,
.quest-view-header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.quest-panel-heading h1,
.quest-panel-heading h2,
.quest-panel-heading p,
.quest-view-header h1,
.quest-view-header p {
  margin: 0;
}

.quest-panel-heading p,
.quest-kicker {
  color: var(--quest-gold) !important;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quest-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr);
  gap: 14px;
}

.quest-adventure-card {
  min-height: 348px;
  padding: 24px;
  background:
    radial-gradient(circle at 70% 40%, rgba(22, 88, 179, 0.32), transparent 25rem),
    linear-gradient(145deg, rgba(5, 30, 70, 0.98), rgba(3, 15, 39, 0.98));
}

.quest-adventure-heading h1 {
  margin-top: 4px;
  font-size: clamp(1.05rem, 1.45vw, 1.35rem);
}

.quest-zone-badge {
  padding: 8px 12px;
  border: 1px solid rgba(65, 213, 255, 0.35);
  border-radius: 999px;
  color: #c8f5ff;
  background: rgba(20, 126, 180, 0.2);
  font-size: 0.72rem;
  font-weight: 800;
}

.quest-adventure-art {
  position: relative;
  min-height: 220px;
  margin-top: 8px;
  background-image:
    linear-gradient(rgba(2, 13, 35, 0.08), rgba(2, 13, 35, 0.18)),
    url("/assets/game/adventure-islands.webp");
  background-position: center 55%;
  background-size: cover;
}

.quest-island-path {
  position: absolute;
  right: 120px;
  bottom: 24px;
  left: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
}

.quest-island-path::before {
  position: absolute;
  top: 48px;
  right: 10%;
  left: 10%;
  height: 5px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, var(--quest-green) 0 38%, var(--quest-cyan) 38% 76%, rgba(77, 100, 139, 0.52) 76%);
  box-shadow: 0 0 15px rgba(43, 194, 255, 0.55);
}

.quest-level-node {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.quest-level-node > span {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 4px solid rgba(104, 217, 255, 0.7);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #1678d9, #0a3f86);
  box-shadow: 0 0 22px rgba(37, 178, 255, 0.45);
  font-size: 1.35rem;
  font-weight: 950;
}

.quest-level-node.is-complete > span {
  border-color: #8eff72;
  background: linear-gradient(145deg, #50c53e, #1a7b31);
  box-shadow: 0 0 22px rgba(74, 229, 91, 0.38);
}

.quest-level-node.is-current > span {
  width: 76px;
  height: 76px;
  border-color: #d2f8ff;
  background: linear-gradient(145deg, #28bdf2, #1557c7);
  box-shadow: 0 0 9px #fff, 0 0 34px rgba(39, 204, 255, 0.88);
}

.quest-level-node.is-locked > span {
  border-color: #516684;
  color: #9babc3;
  background: #1b2b47;
  box-shadow: none;
}

.quest-level-node small {
  color: var(--quest-gold);
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(255, 197, 29, 0.55);
}

.quest-boss-island {
  position: absolute;
  right: 10px;
  bottom: 30px;
  display: grid;
  width: 124px;
  height: 124px;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 44, 255, 0.75), rgba(76, 15, 117, 0.45) 48%, transparent 70%);
  filter: drop-shadow(0 0 24px rgba(177, 48, 255, 0.5));
}

.quest-boss-silhouette {
  width: 92px;
  height: 92px;
  color: transparent;
  background: url("/assets/game/shadow-boss.webp") center / cover no-repeat;
  filter: drop-shadow(0 0 12px #e341ff);
}

.quest-boss-island strong {
  position: absolute;
  bottom: 22px;
  color: #fff;
  font-size: 0.9rem;
  text-shadow: 0 0 8px #e541ff;
}

.quest-primary-button,
.quest-success-button {
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid rgba(255, 228, 116, 0.85);
  border-radius: 13px;
  color: #15203a;
  background: linear-gradient(180deg, #ffe33d, #ff9f00);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.7), 0 6px 18px rgba(255, 153, 0, 0.26);
  font-weight: 950;
  cursor: pointer;
}

.quest-adventure-card > .quest-primary-button {
  position: absolute;
  right: 24px;
  bottom: 22px;
  min-width: 180px;
}

.quest-success-button {
  border-color: rgba(140, 255, 139, 0.75);
  color: #fff;
  background: linear-gradient(180deg, #55df65, #159b36);
  box-shadow: 0 6px 18px rgba(24, 181, 66, 0.24);
}

.quest-daily-reward-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 348px;
  padding: 20px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 44%, rgba(127, 54, 249, 0.28), transparent 13rem),
    linear-gradient(145deg, rgba(17, 27, 71, 0.98), rgba(15, 11, 54, 0.98));
}

.quest-daily-reward-card .quest-panel-heading {
  text-align: left;
}

.quest-daily-reward-card p,
.quest-daily-reward-card strong {
  margin: 0;
}

.quest-notification-dot {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--quest-danger);
  font-size: 0.75rem;
  font-weight: 900;
}

.quest-chest-art {
  display: grid;
  min-height: 110px;
  place-items: center;
  background: radial-gradient(circle, rgba(92, 64, 255, 0.34), transparent 68%);
}

.quest-chest-art span {
  width: 150px;
  height: 116px;
  color: transparent;
  background: url("/assets/game/reward-chest.webp") center / contain no-repeat;
  filter: drop-shadow(0 0 18px rgba(96, 110, 255, 0.58));
  animation: quest-chest-float 2.8s ease-in-out infinite;
}

.quest-daily-reward-card .reward-loot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.quest-daily-reward-card .reward-loot span {
  padding: 5px 8px;
  border: 1px solid rgba(107, 129, 255, 0.26);
  border-radius: 8px;
  color: #dbe5ff;
  background: rgba(10, 23, 63, 0.8);
  font-size: 0.72rem;
}

.quest-home-middle {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.5fr);
  gap: 14px;
  margin-top: 14px;
}

.quest-mission-preview,
.quest-topics-panel {
  min-height: 290px;
  padding: 18px;
}

.quest-text-button {
  border: 0;
  color: #83cfff;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.quest-mission-preview > [data-dashboard-missions] {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.quest-mission-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(60, 136, 231, 0.18);
  border-radius: 11px;
  background: rgba(9, 31, 67, 0.68);
}

.quest-mission-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: rgba(214, 66, 79, 0.2);
}

.quest-mission-row > div {
  display: grid;
  gap: 4px;
}

.quest-mission-row strong {
  color: var(--quest-text);
  font-size: 0.78rem;
}

.quest-mission-row small,
.quest-mission-reward {
  color: var(--quest-muted);
  font-size: 0.68rem;
}

.quest-mission-reward {
  color: var(--quest-gold);
  font-weight: 900;
}

.quest-mission-track,
.quest-topic-progress {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(93, 122, 165, 0.28);
}

.quest-mission-track i,
.quest-topic-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2de167, #b6ed3a);
}

.quest-empty-state {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  color: var(--quest-muted);
  text-align: center;
}

.quest-empty-state span {
  font-size: 2.5rem;
}

.quest-topic-grid,
.quest-topic-library {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.quest-topic-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 218px;
  align-items: flex-end;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(65, 205, 255, 0.42);
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, #0c7892, #062c61);
  box-shadow: inset 0 0 28px rgba(48, 221, 255, 0.08);
  text-align: left;
  cursor: pointer;
  transition: 180ms ease;
}

.quest-topic-card.is-violet { border-color: rgba(200, 72, 255, 0.46); background: linear-gradient(145deg, #632190, #24104f); }
.quest-topic-card.is-indigo { border-color: rgba(86, 126, 255, 0.5); background: linear-gradient(145deg, #173f9f, #101f58); }
.quest-topic-card.is-blue { border-color: rgba(61, 149, 255, 0.5); background: linear-gradient(145deg, #1358a9, #082751); }

.quest-topic-card:hover {
  z-index: 2;
  border-color: rgba(153, 233, 255, 0.92);
  box-shadow: 0 12px 32px rgba(0, 141, 255, 0.28), inset 0 0 28px rgba(48, 221, 255, 0.12);
  transform: translateY(-5px);
}

.quest-topic-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.quest-topic-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, rgba(4, 10, 29, 0.45) 56%, rgba(3, 8, 24, 0.98) 84%);
}

.quest-topic-card-copy {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100%;
  gap: 5px;
  padding: 12px;
}

.quest-topic-card-copy strong {
  min-height: 2.2em;
  font-size: 0.78rem;
}

.quest-topic-card-copy small,
.quest-topic-card-copy em {
  color: #dce9ff;
  font-size: 0.66rem;
  font-style: normal;
}

.quest-topic-card-copy em {
  position: absolute;
  right: 12px;
  bottom: 11px;
}

.quest-home-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.quest-friends-card {
  background-image:
    linear-gradient(90deg, rgba(6, 24, 53, 0.98) 0 62%, rgba(6, 24, 53, 0.3)),
    url("/assets/game/friends.webp");
  background-position: center, right 28%;
  background-size: cover, 52%;
  background-repeat: no-repeat;
}

.quest-compact-card {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 92px;
  padding: 14px;
}

.quest-compact-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
  background: rgba(35, 116, 221, 0.24);
  font-size: 1.7rem;
}

.quest-compact-card div {
  display: grid;
  min-width: 0;
}

.quest-compact-card small {
  color: var(--quest-gold);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.quest-compact-card strong {
  overflow: hidden;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quest-compact-card button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(58, 187, 255, 0.42);
  border-radius: 10px;
  color: #fff;
  background: rgba(22, 93, 182, 0.5);
  cursor: pointer;
}

.quest-view-header {
  min-height: 92px;
  margin-bottom: 14px;
  padding: 18px 22px;
  border: 1px solid var(--quest-line);
  border-radius: var(--quest-radius);
  background: linear-gradient(110deg, rgba(8, 35, 77, 0.96), rgba(21, 18, 65, 0.9));
  box-shadow: var(--quest-shadow);
}

.quest-view-header h1 {
  margin-top: 4px;
  font-size: clamp(1.45rem, 2.4vw, 2.25rem);
}

.quest-missions-layout,
.quest-team-grid,
.quest-lessons-grid,
.quest-leaderboard-layout {
  display: grid;
  gap: 14px;
}

.quest-missions-layout {
  grid-template-columns: 1.25fr 0.75fr;
}

.quest-live-missions,
.quest-daily-mission-card,
.quest-lessons-grid .quest-panel,
.quest-team-grid .quest-panel,
.quest-leaderboard-layout .quest-panel {
  padding: 20px;
}

.game-dashboard-page .mission strong {
  color: #101a3d;
}

.game-dashboard-page .mission span {
  color: #5f6d84;
}

.game-dashboard-page .mission small {
  color: #5279b7;
  font-weight: 800;
}

.game-dashboard-page .coach-card,
.game-dashboard-page .coach-summary div,
.game-dashboard-page .coach-focus,
.game-dashboard-page .coach-topic,
.game-dashboard-page .coach-insights article,
.game-dashboard-page .coach-recommendations,
.game-dashboard-page .coach-chart,
.game-dashboard-page .coach-skill-panel,
.game-dashboard-page .coach-skill,
.game-dashboard-page .coach-plan,
.game-dashboard-page .badge-tile {
  color: #101a37;
}

.game-dashboard-page .coach-card strong,
.game-dashboard-page .coach-focus h3,
.game-dashboard-page .coach-topic strong,
.game-dashboard-page .coach-skill strong,
.game-dashboard-page .badge-tile strong {
  color: #13224a;
}

.game-dashboard-page .coach-summary span,
.game-dashboard-page .coach-topic span,
.game-dashboard-page .coach-insights span,
.game-dashboard-page .coach-skill span,
.game-dashboard-page .coach-plan span,
.game-dashboard-page .badge-tile span {
  color: #586981;
}

.game-dashboard-page .coach-card p,
.game-dashboard-page .coach-skill small {
  color: #53657f;
}

.game-dashboard-page .coach-skill > div:first-child span {
  color: #61718a;
}

.game-dashboard-page .coach-chart text {
  fill: #13224a;
}

.game-dashboard-page .badge-tile {
  opacity: 1;
  background: #e7eef8;
}

.game-dashboard-page .badge-tile:not(.is-unlocked) {
  background: #d7e0ec;
}

.quest-daily-mission-card {
  background: radial-gradient(circle at 90% 10%, rgba(255, 189, 31, 0.14), transparent 16rem), var(--quest-panel);
}

.quest-daily-mission-card .daily-mission-answer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  margin-top: 18px;
}

.game-dashboard-page input,
.game-dashboard-page select {
  min-height: 44px;
  border: 1px solid rgba(80, 146, 231, 0.32);
  border-radius: 11px;
  color: #eef6ff;
  background: rgba(2, 14, 35, 0.75);
}

.game-dashboard-page input::placeholder {
  color: #718aaa;
}

.game-dashboard-page .activity-wide {
  margin-top: 14px;
  padding: 20px;
}

.game-dashboard-page .activity-grid {
  overflow-x: auto;
  border-color: rgba(45, 121, 213, 0.34);
  background: rgba(2, 13, 33, 0.75);
}

.quest-topic-library {
  margin: 0 0 14px;
}

.quest-topic-library .quest-topic-card {
  min-height: 310px;
}

.quest-lessons-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analytics-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.analytics-stat {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 54px;
  padding: 11px 14px;
  border: 1px solid rgba(77, 153, 255, 0.24);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(15, 48, 99, 0.74), rgba(5, 24, 57, 0.82));
}

.analytics-stat:last-child {
  grid-column: 1 / -1;
}

.analytics-stat span {
  color: var(--quest-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.analytics-stat strong {
  color: var(--quest-text);
  font-size: 0.95rem;
  text-align: right;
}

.quest-training-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
}

.quest-training-settings {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 620px;
  padding: 20px;
}

.quest-training-settings label {
  display: grid;
  gap: 6px;
  color: var(--quest-muted);
  font-weight: 800;
}

.quest-training-settings select {
  width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
}

.quest-training-settings select option {
  color: #eef6ff;
}

.quest-training-settings .topic-select-hint {
  margin: -6px 0 0;
  color: var(--quest-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.quest-training-settings .mode-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.quest-training-settings .mode-chip {
  min-height: 45px;
  border-color: rgba(74, 145, 235, 0.3);
  color: #dceaff;
  background: rgba(10, 33, 70, 0.72);
}

.quest-training-settings .mode-chip.is-active {
  border-color: var(--quest-cyan);
  color: #fff;
  background: linear-gradient(110deg, #1a75dd, #0a4d9b);
}

.quest-training-hero {
  display: grid;
  min-height: 210px;
  place-items: center;
  margin-top: auto;
  border-radius: 15px;
  background: radial-gradient(circle, rgba(62, 189, 255, 0.25), transparent 68%);
  font-size: 7rem;
}

.quest-arena-panel {
  padding: 16px;
  background:
    radial-gradient(circle at 80% 10%, rgba(169, 54, 255, 0.12), transparent 23rem),
    radial-gradient(circle at 12% 85%, rgba(36, 166, 255, 0.12), transparent 22rem),
    var(--quest-panel);
}

.quest-arena-panel .problem-card {
  max-width: none;
  border-color: rgba(66, 151, 255, 0.32);
  background: rgba(6, 23, 53, 0.76);
  box-shadow: none;
}

.quest-arena-panel .question-arena {
  border-color: rgba(74, 147, 235, 0.26);
  color: var(--quest-text);
  background: rgba(3, 16, 41, 0.76);
}

.quest-arena-panel .question-arena h2,
.quest-arena-panel .question-arena p {
  color: var(--quest-text);
}

.quest-arena-panel .answer-form {
  display: grid;
  grid-template-columns: 1fr auto;
}

.quest-team-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quest-team-grid .compact-form,
.quest-team-grid .duel-join-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.quest-team-grid .duel-join-form {
  grid-template-columns: 1fr 1fr auto;
}

.quest-team-grid .duel-board {
  border-color: rgba(71, 144, 236, 0.25);
  background: rgba(2, 15, 37, 0.7);
}

.quest-team-grid [data-team-card] {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid rgba(71, 164, 255, 0.3);
  border-radius: 12px;
  background: rgba(4, 25, 59, 0.72);
}

.quest-team-grid [data-team-card] strong { color: #fff; font-size: 1rem; }
.quest-team-grid [data-team-card] span { color: var(--quest-muted); line-height: 1.45; }

.quest-team-grid [data-guild-stats] {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.quest-team-grid .guild-stat {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border: 1px solid rgba(71, 144, 236, 0.2);
  border-radius: 10px;
  background: rgba(2, 16, 41, 0.58);
}

.quest-team-grid .guild-stat span { color: var(--quest-muted); }
.quest-team-grid .guild-stat strong { color: var(--quest-text); }

.tug-war-host {
  grid-column: 1 / -1;
  overflow: hidden;
  padding: 0;
  border-color: rgba(42, 132, 234, 0.54);
  border-radius: 12px;
  background: #061a3e;
  box-shadow:
    inset 0 0 0 1px rgba(125, 199, 255, 0.08),
    0 24px 60px rgba(2, 8, 23, 0.22);
}

.tug-card {
  position: relative;
  aspect-ratio: 2170 / 428;
  min-height: 0;
}

.tug-card h2,
.tug-settings h2 {
  margin: 0;
  color: #fff;
}

.tug-card p {
  margin: 8px 0 0;
  color: var(--quest-muted);
  line-height: 1.5;
}

.tug-card-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #061a3e;
  box-shadow: none;
}

.tug-card-scene::before {
  content: none;
}

.tug-card-scene::after {
  content: none;
}

.tug-card-icon {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 12px;
  background: #071a36;
  object-fit: cover;
}

.tug-card .quest-primary-button {
  position: absolute;
  right: 2%;
  top: 59%;
  z-index: 3;
  width: 18%;
  min-width: 0;
  min-height: 0;
  height: 36%;
  padding: 0;
  border: 0;
  border-radius: 12% / 32%;
  color: transparent;
  background: transparent;
  box-shadow: none;
  font-size: 0;
  transform: translateY(-50%);
}

.tug-card .quest-primary-button::after {
  content: none;
}

.tug-card .quest-primary-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.95);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.48);
}

.tug-card.is-locked .quest-primary-button {
  display: grid;
  place-items: center;
  color: #101a3d;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  filter: none;
  font-size: 24px;
  opacity: 1;
  cursor: not-allowed;
}

.tug-access-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
}

.tug-access-notice p {
  flex: 1 1 240px;
  margin: 0;
  color: var(--quest-text);
}

.tug-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.tug-settings-grid label {
  display: grid;
  gap: 6px;
  color: var(--quest-muted);
  font-weight: 850;
}

.tug-settings-grid input,
.tug-settings-grid select,
.tug-answer {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(147, 197, 253, 0.3);
  border-radius: 8px;
  color: #eaf3ff;
  background: rgba(3, 12, 28, 0.72);
  font: inherit;
  font-weight: 850;
  padding: 0 12px;
}

.tug-settings-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tug-settings-actions .button,
.tug-result-actions .button {
  min-height: 48px;
  border-radius: 12px;
  font-weight: 950;
}

.tug-settings-actions .button-ghost,
.tug-result-actions .button-ghost {
  border-color: rgba(191, 219, 254, 0.72);
  color: #f8fbff;
  background: rgba(15, 34, 71, 0.82);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.tug-settings-actions .button-soft,
.tug-result-actions .button-soft {
  border-color: rgba(219, 234, 254, 0.88);
  color: #153e8a;
  background: #e8f0ff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

.tug-settings-actions .button:hover,
.tug-result-actions .button:hover,
.tug-settings-actions .button:focus-visible,
.tug-result-actions .button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.tug-countdown {
  min-height: 420px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    radial-gradient(circle at center, rgba(250, 204, 21, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(249, 115, 22, 0.2));
}

.tug-countdown span {
  color: #fff;
  font-size: clamp(4rem, 15vw, 9rem);
  font-weight: 1000;
  animation: tugPop 0.7s ease both;
}

.tug-arena {
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px, 0.74fr) minmax(360px, 1.3fr) minmax(230px, 0.74fr);
  gap: 8px;
  align-items: stretch;
  min-height: 0;
  max-height: calc(100vh - 132px);
  padding: 8px;
  overflow: auto;
  border: 3px solid rgba(125, 211, 252, 0.48);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.5), transparent 28%),
    linear-gradient(180deg, #38bdf8 0%, #a7f3d0 48%, #15803d 100%);
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.18),
    0 24px 70px rgba(2, 8, 23, 0.32);
}

.game-dashboard-page.is-tug-war-active .tug-arena {
  height: calc(100vh - 30px);
  max-height: none;
  overflow: hidden;
}

.game-dashboard-page.is-tug-war-active .tug-war-host {
  min-height: calc(100vh - 30px);
}

.tug-team-panel,
.tug-stage {
  border-radius: 18px;
}

.tug-team-panel {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 10px;
  border: 3px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.12),
    0 18px 34px rgba(15, 23, 42, 0.28);
}

.tug-team-panel.is-blue {
  background:
    radial-gradient(circle at 18% 8%, rgba(186, 230, 253, 0.42), transparent 33%),
    linear-gradient(180deg, #0f7de8, #034ea9 54%, #05265e);
  border-color: #38bdf8;
}

.tug-team-panel.is-orange {
  background:
    radial-gradient(circle at 82% 8%, rgba(254, 215, 170, 0.5), transparent 33%),
    linear-gradient(180deg, #ef4444, #c2410c 54%, #6b1d12);
  border-color: #fb923c;
}

.tug-team-panel header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 56px;
  margin: -2px -2px 2px;
  padding: 6px;
  border-radius: 15px;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.24);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 -12px 22px rgba(0, 0, 0, 0.16);
}

.tug-team-panel header > div:not(.tug-team-avatar) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tug-team-panel header span,
.tug-task small,
.tug-task span {
  font-weight: 950;
}

.tug-team-panel header span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.75rem, 1vw, 0.88rem);
  line-height: 1;
  white-space: nowrap;
}

.tug-team-panel header strong {
  display: block;
  color: #fff;
  font-size: clamp(1rem, 1.35vw, 1.24rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.tug-team-panel header em {
  min-width: 48px;
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.78);
  border-radius: 12px;
  color: #020617;
  background: linear-gradient(180deg, #fef08a, #facc15);
  font-style: normal;
  font-size: clamp(1.35rem, 2.35vw, 1.95rem);
  font-weight: 1000;
  text-shadow: none;
  box-shadow: inset 0 -8px 0 rgba(202, 138, 4, 0.2), 0 8px 16px rgba(0, 0, 0, 0.2);
}

.tug-team-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 -8px 12px rgba(0, 0, 0, 0.12),
    0 8px 16px rgba(15, 23, 42, 0.18);
}

.tug-team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tug-task {
  display: grid;
  gap: 7px;
  min-height: 118px;
  padding: 10px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  color: #061539;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.95));
  box-shadow: inset 0 -10px 18px rgba(15, 23, 42, 0.05);
}

.tug-team-panel.is-orange .tug-task {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 237, 213, 0.95));
}

.tug-task strong {
  color: #050b2e;
  font-size: clamp(1.25rem, 1.9vw, 1.85rem);
  line-height: 1.15;
  text-align: center;
}

.tug-task small { color: #0757aa; font-size: 0.9rem; }
.tug-team-panel.is-orange .tug-task small { color: #b63b19; }

.tug-task span {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 12px;
  color: #1d4ed8;
  background: #bfdbfe;
}

.tug-team-panel.is-orange .tug-task span {
  color: #9a3412;
  background: #fed7aa;
}

.tug-answer {
  min-height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  color: #eaf6ff;
  background: rgba(2, 6, 23, 0.82);
  font-size: 1.08rem;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.36);
}

.tug-team-panel.is-orange .tug-answer {
  color: #fff7ed;
  border-color: rgba(254, 215, 170, 0.38);
  background: rgba(69, 10, 10, 0.74);
}

.tug-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.tug-keypad button {
  min-height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(180deg, #1d7ee8, #0757b5);
  font: inherit;
  font-size: 1.02rem;
  font-weight: 1000;
  cursor: pointer;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.24);
  box-shadow: inset 0 -5px 0 rgba(3, 37, 89, 0.42), 0 5px 10px rgba(0, 0, 0, 0.18);
}

.tug-team-panel.is-orange .tug-keypad button {
  background: linear-gradient(180deg, #c4602f, #973817);
  box-shadow: inset 0 -5px 0 rgba(69, 10, 10, 0.38), 0 5px 10px rgba(0, 0, 0, 0.18);
}

.tug-keypad button[data-tug-submit] {
  grid-column: 1 / -1;
  min-height: 48px;
  border-color: rgba(187, 247, 208, 0.72);
  background: linear-gradient(180deg, #38ef5d, #09a938);
  font-size: clamp(1rem, 1.7vw, 1.32rem);
  box-shadow: inset 0 -8px 0 rgba(21, 128, 61, 0.38), 0 8px 18px rgba(0, 0, 0, 0.28);
}

.tug-keypad button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.tug-feedback {
  min-height: 18px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 900;
}

.tug-feedback.is-good { color: #bbf7d0; }
.tug-feedback.is-bad { color: #fee2e2; }

.tug-stage {
  display: grid;
  grid-template-rows: minmax(280px, 1fr) auto;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tug-scoreboard {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: min(980px, 88%);
  justify-self: center;
  margin-bottom: -2px;
  z-index: 2;
}

.tug-scoreboard strong {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 3px solid rgba(255, 255, 255, 0.58);
  border-radius: 14px;
  color: #fff;
  font-size: clamp(1rem, 1.85vw, 1.55rem);
  font-weight: 1000;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.24);
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.12), 0 10px 24px rgba(15, 23, 42, 0.2);
}

.tug-scoreboard strong.is-blue {
  justify-content: flex-end;
  background: linear-gradient(180deg, #178aff, #0756be);
}

.tug-scoreboard strong.is-orange {
  justify-content: flex-start;
  background: linear-gradient(180deg, #ef4444, #f97316);
}

.tug-scoreboard strong em {
  min-width: 52px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #020617;
  background: linear-gradient(180deg, #fef08a, #facc15);
  font-style: normal;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  text-shadow: none;
  box-shadow: inset 0 -7px 0 rgba(202, 138, 4, 0.22);
}

.tug-timer {
  min-width: 132px;
  min-height: 62px;
  display: grid;
  place-items: center;
  border: 5px solid #8b5a2b;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(180deg, #1f2937, #020617);
  font-size: clamp(1.65rem, 3.1vw, 2.45rem);
  font-weight: 1000;
  letter-spacing: 0;
  text-shadow: 0 4px 0 #020617;
  box-shadow:
    0 0 0 5px rgba(120, 53, 15, 0.28),
    0 10px 24px rgba(15, 23, 42, 0.24);
}

.is-final-countdown .tug-timer {
  animation: tugPulse 0.65s ease infinite alternate;
}

.tug-scene {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 2px rgba(14, 165, 233, 0.22), 0 18px 36px rgba(15, 23, 42, 0.18);
}

.tug-moving,
.tug-center-knot {
  transform: translateX(var(--rope-shift));
  transition: transform 420ms cubic-bezier(0.2, 0.85, 0.25, 1.15);
}

.tug-character {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: tugLean 1s ease-in-out infinite alternate;
}

.tug-character.is-orange {
  animation-delay: -0.35s;
}

.tug-progress {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  box-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.2);
}

.tug-progress span {
  display: block;
  width: calc(50% + var(--rope-shift));
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #facc15, #fb923c);
  transition: width 420ms cubic-bezier(0.2, 0.85, 0.25, 1.15);
}

.tug-result-backdrop {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(8px);
}

.tug-result-modal {
  width: min(560px, 100%);
  padding: 24px;
  border: 1px solid rgba(147, 197, 253, 0.26);
  border-radius: 8px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.18), transparent 40%),
    #071327;
  text-align: center;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.tug-result-modal h2 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.tug-result-score {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.tug-result-score span {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.tug-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.tug-confetti {
  animation: tugConfetti 1.7s ease-in-out infinite;
  transform-origin: center;
}

@keyframes tugPop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes tugLean {
  from { transform: rotate(-1deg) translateY(0); }
  to { transform: rotate(2deg) translateY(-2px); }
}

@keyframes tugPulse {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

@keyframes tugConfetti {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(120px) rotate(220deg); opacity: 0; }
}

@media (max-width: 1180px) {
  .tug-arena {
    grid-template-columns: 1fr 1fr;
  }

  .tug-stage {
    grid-column: 1 / -1;
  }

  .tug-scoreboard {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .tug-settings-grid,
  .tug-arena {
    grid-template-columns: 1fr;
  }

  .tug-war-host {
    padding: 0;
  }

  .tug-card {
    min-height: 0;
  }

  .tug-card-icon {
    height: 100%;
  }

  .tug-card .quest-primary-button {
    top: 59%;
    right: 2%;
    bottom: auto;
    left: auto;
    width: 18%;
    height: 36%;
    transform: translateY(-50%);
  }

  .tug-stage {
    grid-column: auto;
    grid-row: auto;
  }

  .tug-scoreboard,
  .tug-result-score {
    grid-template-columns: 1fr;
  }

  .tug-arena {
    min-height: 0;
    padding: 8px;
  }

  .tug-scoreboard {
    gap: 8px;
  }

  .tug-scoreboard strong {
    min-height: 62px;
    justify-content: space-between;
  }

  .tug-timer {
    min-width: 0;
    min-height: 64px;
  }

  .tug-stage {
    grid-template-rows: minmax(280px, 1fr) auto;
  }

  .tug-scene {
    min-height: 280px;
  }

  .tug-keypad button {
    min-height: 54px;
  }
}

.quest-leaderboard-layout {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
}

.quest-podium {
  min-height: 330px;
  grid-row: span 2;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 194, 40, 0.2), transparent 15rem),
    var(--quest-panel);
}

.quest-leaderboard-list .leaderboard {
  margin-top: 14px;
}

.quest-leaderboard-list .leaderboard li {
  color: #101a3d;
}

.quest-leaderboard-list .leaderboard span {
  color: #101a3d;
  font-weight: 900;
}

.quest-leaderboard-list .leaderboard strong {
  color: #1d5bd8;
}

.quest-rank-summary-panel {
  align-self: start;
  max-width: 270px;
  padding: 14px;
}

.quest-rank-summary-panel h2 {
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
}

.quest-rank-summary-panel [data-leaderboard-tabs] {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.quest-rank-summary-panel .leaderboard-slab {
  padding: 9px 12px;
  border: 1px solid rgba(198, 218, 255, 0.82);
  border-radius: 8px;
  background: rgba(246, 249, 255, 0.96);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.84);
}

.quest-rank-summary-panel .leaderboard-slab strong {
  color: #0b1535;
  font-size: 0.95rem;
  line-height: 1.15;
}

.quest-rank-summary-panel .leaderboard-slab span {
  color: #5f6d85;
  margin-top: 2px;
  font-size: 0.82rem;
  line-height: 1.15;
}

.quest-store-balance {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--quest-line);
  border-radius: 14px;
  background: rgba(7, 27, 59, 0.86);
}

.quest-store-balance span {
  padding: 8px 12px;
  border: 1px solid rgba(67, 145, 239, 0.25);
  border-radius: 10px;
  background: rgba(2, 15, 37, 0.68);
}

.quest-store-section {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--quest-line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(75, 190, 255, 0.1), transparent 18rem),
    rgba(7, 27, 59, 0.72);
}

.quest-store-section h2 {
  margin: 0;
  color: var(--quest-gold);
  font-size: 0.95rem;
  text-transform: uppercase;
}

.quest-store-section .joker-pack-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quest-store-section .money-pack-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.quest-store-feedback {
  margin-top: 14px;
  color: #d5e6ff;
}

.quest-store-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.quest-store-card {
  display: grid;
  min-height: 270px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--quest-line);
  border-radius: var(--quest-radius);
  color: var(--quest-text);
  background: linear-gradient(145deg, rgba(10, 38, 80, 0.96), rgba(13, 13, 48, 0.96));
  box-shadow: var(--quest-shadow);
  text-align: center;
  cursor: pointer;
}

.quest-store-card > span {
  font-size: 4.5rem;
  filter: drop-shadow(0 0 18px rgba(55, 175, 255, 0.4));
}

.quest-store-card strong {
  font-size: 1.12rem;
}

.quest-store-card small {
  color: var(--quest-muted);
}

.game-mobile-nav,
.game-mobile-more {
  display: none;
}

.game-dashboard-page :is(button, a, input, select):focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(36, 198, 255, 0.45);
}

.game-dashboard-page button:disabled,
.game-dashboard-page [aria-disabled="true"] {
  cursor: not-allowed;
  filter: grayscale(0.45);
  opacity: 0.52;
}

.game-dashboard-page [data-start-match] {
  border-color: rgba(94, 205, 255, 0.9);
  color: #ffffff;
  background: linear-gradient(145deg, #1d64dc, #123c91);
  box-shadow: 0 10px 24px rgba(28, 111, 232, 0.34);
  text-shadow: 0 1px 2px rgba(0, 9, 31, 0.75);
}

.game-dashboard-page [data-start-match]:hover {
  border-color: #8ce7ff;
  color: #ffffff;
  background: linear-gradient(145deg, #2879f3, #174bac);
}

.game-dashboard-page .training-tag.is-verified {
  border-color: rgba(77, 255, 221, 0.7);
  color: #b9fff1;
  background: rgba(15, 126, 111, 0.46);
  box-shadow: inset 0 0 12px rgba(54, 232, 202, 0.1);
}

.game-dashboard-page .training-tag.is-nvo {
  border-color: rgba(255, 214, 64, 0.78);
  color: #fff2a8;
  background: rgba(160, 104, 0, 0.52);
  box-shadow: inset 0 0 12px rgba(255, 202, 36, 0.1);
}

@keyframes quest-view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes quest-chest-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

@media (max-width: 1450px) {
  .quest-topbar { grid-template-columns: 150px minmax(250px, 320px) auto auto; }
  .quest-resource-compact { display: none !important; }
  .quest-resources.game-dashboard { grid-template-columns: repeat(3, 112px); }
  .quest-home-footer-grid { grid-template-columns: repeat(2, 1fr); }
  .quest-topic-card { min-height: 200px; }
}

@media (max-width: 1100px) {
  .quest-shell { padding: 10px; }
  .quest-topbar { position: static; grid-template-columns: 150px 1fr auto; }
  .quest-resources.game-dashboard { grid-column: 1 / -1; grid-row: 2; }
  .quest-layout { grid-template-columns: 78px minmax(0, 1fr); }
  .quest-sidebar { top: 10px; padding: 8px; }
  .quest-nav-item { grid-template-columns: 1fr; justify-items: center; min-height: 52px; padding: 6px; }
  .quest-nav-item > span:last-child { display: none; }
  .quest-streak-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .quest-streak-dots, .quest-mini-ranking { display: none !important; }
  .quest-home-grid, .quest-home-middle { grid-template-columns: 1fr; }
  .quest-topic-grid { grid-template-columns: repeat(4, minmax(145px, 1fr)); overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
  .quest-topic-card { scroll-snap-align: start; }
  .quest-missions-layout, .quest-training-layout, .quest-leaderboard-layout { grid-template-columns: 1fr; }
  .quest-training-settings { min-height: 0; }
  .quest-training-settings .mode-grid { grid-template-columns: repeat(5, 1fr); }
  .quest-training-hero { display: none; }
  .quest-podium { grid-row: auto; min-height: 220px; }
  .quest-store-grid { grid-template-columns: repeat(2, 1fr); }
  .quest-store-section .joker-pack-grid,
  .quest-store-section .money-pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .game-dashboard-page { padding-bottom: 82px; }
  .quest-shell { min-height: auto; padding: 0; }
  .quest-topbar { position: sticky; top: 0; grid-template-columns: 1fr auto; gap: 6px; min-height: 0; padding: 7px; border-width: 0 0 1px; border-radius: 0; }
  .quest-logo { display: none; }
  .quest-player-card { grid-template-columns: 42px 1fr; min-width: 0; padding: 6px 8px; }
  .quest-avatar { width: 42px; height: 42px; font-size: 1rem; }
  .quest-player-card .quest-player-name { font-size: 0.78rem; }
  .quest-player-card span, .quest-player-card small { font-size: 0.6rem; }
  .quest-resources.game-dashboard { grid-column: 1 / -1; display: flex; gap: 5px; overflow-x: auto; padding: 4px 0 0; border: 0; border-radius: 0; background: transparent; scroll-snap-type: x mandatory; }
  .quest-resources.game-dashboard .quest-resource { flex: 0 0 105px; min-height: 44px; padding: 5px 7px; border: 1px solid rgba(74, 143, 230, 0.2); background: rgba(9, 29, 64, 0.9); scroll-snap-align: start; }
  .quest-resources.game-dashboard .quest-resource-icon { font-size: 1rem; }
  .quest-resources.game-dashboard .quest-resource strong { font-size: 0.8rem; }
  .quest-resource div > span { font-size: 0.56rem; }
  .quest-resource-add { width: 21px; height: 21px; }
  .quest-top-actions { grid-column: 2; grid-row: 1; }
  .quest-icon-button { width: 40px; min-height: 48px; font-size: 1.05rem; }
  .quest-top-actions .quest-icon-button:first-child { display: none; }
  .quest-layout { display: block; margin-top: 0; }
  .quest-sidebar { display: none; }
  .quest-content { padding: 8px; }
  .quest-view-header { min-height: 76px; margin-bottom: 8px; padding: 13px; border-radius: 14px; }
  .quest-view-header h1 { font-size: 1.25rem; }
  .quest-view-header .quest-primary-button { min-width: auto; padding: 8px 12px; }
  .quest-home-grid, .quest-home-middle, .quest-home-footer-grid, .quest-missions-layout, .quest-lessons-grid, .quest-training-layout, .quest-team-grid, .quest-leaderboard-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 0; }
  .quest-adventure-card { min-height: 350px; padding: 14px; border-radius: 15px; }
  .quest-adventure-heading { align-items: flex-start; }
  .quest-adventure-heading h1 { max-width: 230px; font-size: 0.96rem; }
  .quest-zone-badge { padding: 6px 9px; }
  .quest-adventure-art { min-height: 240px; }
  .quest-island-path { right: 50px; bottom: 54px; left: -4px; }
  .quest-island-path::before { top: 35px; }
  .quest-level-node > span { width: 45px; height: 45px; border-width: 3px; font-size: 0.95rem; }
  .quest-level-node.is-current > span { width: 55px; height: 55px; }
  .quest-level-node small { font-size: 0.62rem; letter-spacing: 0; }
  .quest-boss-island { right: -14px; bottom: 62px; width: 82px; height: 82px; }
  .quest-boss-silhouette { font-size: 3.3rem; }
  .quest-boss-island strong { bottom: 6px; font-size: 0.65rem; }
  .quest-adventure-card > .quest-primary-button { right: 14px; bottom: 14px; left: 14px; min-width: 0; width: calc(100% - 28px); }
  .quest-daily-reward-card { min-height: 320px; padding: 14px; }
  .quest-chest-art { min-height: 90px; }
  .quest-chest-art span { font-size: 5rem; }
  .quest-mission-preview, .quest-topics-panel, .quest-live-missions, .quest-daily-mission-card, .quest-lessons-grid .quest-panel, .quest-team-grid .quest-panel, .quest-leaderboard-layout .quest-panel { min-height: 0; padding: 14px; border-radius: 14px; }
  .analytics-stats { grid-template-columns: 1fr; }
  .analytics-stat:last-child { grid-column: auto; }
  .quest-topic-grid, .quest-topic-library { display: flex; gap: 9px; margin-top: 10px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x mandatory; }
  .quest-topic-card, .quest-topic-library .quest-topic-card { flex: 0 0 min(72vw, 240px); min-height: 250px; scroll-snap-align: start; }
  .quest-home-footer-grid { display: flex; overflow-x: auto; padding: 8px 0; scroll-snap-type: x mandatory; }
  .quest-compact-card { flex: 0 0 78vw; scroll-snap-align: start; }
  .quest-training-settings { padding: 12px; }
  .quest-training-settings .mode-grid { display: flex; overflow-x: auto; }
  .quest-training-settings .mode-chip { flex: 0 0 auto; padding: 8px 12px; }
  .quest-arena-panel { padding: 7px; }
  .quest-arena-panel .problem-card { padding: 10px; }
  .quest-arena-panel .training-boost { display: grid; gap: 8px; }
  .quest-arena-panel .question-arena { min-height: 260px; padding: 15px; }
  .quest-arena-panel .question-arena h2 { font-size: 1.45rem; }
  .quest-arena-panel .answer-form { grid-template-columns: 1fr; }
  .quest-arena-panel .arena-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quest-team-grid .compact-form, .quest-team-grid .duel-join-form, .quest-daily-mission-card .daily-mission-answer { grid-template-columns: 1fr; }
  .quest-store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .quest-store-card { min-height: 190px; padding: 12px; }
  .quest-store-card > span { font-size: 3rem; }
  .quest-store-section { padding: 12px; }
  .quest-store-section .joker-pack-grid,
  .quest-store-section .money-pack-grid { grid-template-columns: 1fr; }
  .game-mobile-nav { position: fixed; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); left: 8px; z-index: 80; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; min-height: 64px; padding: 6px; border: 1px solid rgba(64, 181, 255, 0.42); border-radius: 18px; background: rgba(3, 15, 39, 0.96); box-shadow: 0 -8px 30px rgba(0, 4, 17, 0.55); backdrop-filter: blur(16px); }
  .game-mobile-nav button { display: grid; place-items: center; gap: 2px; min-width: 0; padding: 5px 2px; border: 1px solid transparent; border-radius: 11px; color: #9eb4d2; background: transparent; font-weight: 800; }
  .game-mobile-nav button > span { font-size: 1.1rem; }
  .game-mobile-nav button small { font-size: 0.58rem; }
  .game-mobile-nav button[aria-current="page"] { border-color: rgba(68, 202, 255, 0.6); color: #fff; background: linear-gradient(145deg, #166eca, #0b3f82); box-shadow: 0 0 15px rgba(34, 162, 255, 0.3); }
  .game-mobile-nav .game-mobile-play { margin-top: -18px; border-color: rgba(255, 226, 77, 0.8); color: #16213a; background: linear-gradient(180deg, #ffe53d, #ff9e00); box-shadow: 0 5px 18px rgba(255, 157, 0, 0.3); }
  .game-mobile-more { position: fixed; right: 8px; bottom: calc(82px + env(safe-area-inset-bottom)); z-index: 85; display: grid; min-width: 210px; padding: 8px; border: 1px solid rgba(65, 178, 255, 0.45); border-radius: 14px; background: rgba(3, 17, 43, 0.98); box-shadow: var(--quest-shadow); }
  .game-mobile-more button, .game-mobile-more a { padding: 12px; border: 0; border-radius: 9px; color: #eaf4ff; background: transparent; font-weight: 800; text-align: left; text-decoration: none; }
  .game-mobile-more :is(button, a):hover { background: rgba(29, 112, 211, 0.28); }
  .joker-shop-card { width: calc(100vw - 16px); max-height: calc(100vh - 20px); overflow-y: auto; padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .quest-view,
  .quest-chest-art span,
  .quest-nav-item,
  .quest-topic-card {
    animation: none !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Телефон: компактна горна лента и долно меню, залепено за ръба ── */
@media (max-width: 700px) {
  .game-dashboard-page { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .quest-top-actions { align-self: center; gap: 6px; }
  .quest-language-host .language-toggle { width: 44px; min-height: 44px; justify-content: center; gap: 0; padding: 0; }
  .quest-language-host .language-toggle .language-globe,
  .quest-language-host .language-toggle [data-language-current],
  .quest-language-host .language-toggle .language-caret { display: none; }
  .quest-language-host .language-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 240px; }
  .quest-resources.game-dashboard { grid-column: 1 / -1; width: 100%; overflow: visible; }
  .quest-resources.game-dashboard .quest-resource { flex: 1 1 0; min-width: 0; gap: 6px; }
  .quest-resources.game-dashboard .quest-resource div { min-width: 0; }
  .quest-resources.game-dashboard .quest-resource div > span:not(.stat-icon) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .quest-resources.game-dashboard .quest-resource strong { font-size: 0.95rem; }
  .game-mobile-nav { right: 0; bottom: 0; left: 0; min-height: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: 16px 16px 0 0; background: #030f27; }
  .game-mobile-more { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* ── Таблет: ресурсите заемат целия ред, всички пет се виждат ── */
@media (min-width: 701px) and (max-width: 1100px) {
  .quest-resources.game-dashboard { grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; box-sizing: border-box; }
  .quest-resources.game-dashboard .quest-resource-compact { display: grid !important; }
}

/* ── Дърпане на въже: зони на арената ──
   Всеки отбор има собствена зона, за да не падне оранжевият отбор под сцената,
   когато колоните намалеят (така беше на таблет). */
.tug-arena { grid-template-areas: "score score score" "blue stage orange"; }
.tug-arena > .tug-scoreboard { grid-area: score; }
.tug-arena > .tug-team-panel.is-blue { grid-area: blue; }
.tug-arena > .tug-stage { grid-area: stage; }
.tug-arena > .tug-team-panel.is-orange { grid-area: orange; }

/* Таблет хоризонтално: трите части в един ред, менюто вляво само с иконки */
@media (max-width: 1180px) {
  .tug-arena {
    grid-template-columns: minmax(190px, 0.8fr) minmax(250px, 1.2fr) minmax(190px, 0.8fr);
    grid-template-areas: "score score score" "blue stage orange";
  }
  .tug-scene { min-height: 220px; }
  .tug-team-panel { padding: 8px; gap: 6px; }
  .tug-keypad button { min-height: 42px; }
  .game-dashboard-page.is-tug-war-active .tug-arena { overflow: auto; }
  .game-dashboard-page.is-tug-war-active .quest-layout { grid-template-columns: 78px minmax(0, 1fr); }
  .game-dashboard-page.is-tug-war-active .quest-sidebar { padding: 8px; }
  .game-dashboard-page.is-tug-war-active .quest-nav-item { grid-template-columns: 1fr; justify-items: center; min-height: 52px; padding: 6px; }
  .game-dashboard-page.is-tug-war-active .quest-nav-item > span:last-child { display: none; }
  .game-dashboard-page.is-tug-war-active .quest-streak-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .game-dashboard-page.is-tug-war-active .quest-streak-dots,
  .game-dashboard-page.is-tug-war-active .quest-mini-ranking { display: none !important; }
}

/* Таблет вертикално: въжето отгоре на цяла ширина, двата отбора един до друг отдолу */
@media (min-width: 701px) and (max-width: 1180px) and (orientation: portrait) {
  .tug-arena {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "score score" "stage stage" "blue orange";
    align-content: start;
  }
  .tug-stage { grid-template-rows: auto auto; width: min(100%, 500px); justify-self: center; }
  .tug-scene { height: auto; min-height: 0; aspect-ratio: 560 / 330; }
  .tug-keypad button { min-height: 38px; }
  .tug-task { padding: 8px; }
}

/* Телефон: всичко една под друга и може да се скролира */
@media (max-width: 760px) {
  .tug-arena {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "score" "stage" "blue" "orange";
  }
  .game-dashboard-page.is-tug-war-active .tug-arena { overflow: auto; }
}
