@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-0: #0b0f1a;
  --bg-1: #101a2b;
  --bg-2: #14223a;
  --accent-1: #ffb347;
  --accent-2: #ff6b6b;
  --accent-3: #5eead4;
  --text-0: #f6f7fb;
  --text-1: #c6d0e1;
  --muted: #7f8aa3;
  --card: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --font-body: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body,
#app {
  height: 100%;
  min-height: 100dvh;
  width: 100%;
  min-width: 100vw;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior-y: none;
}

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text-0);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}

button,
input,
textarea,
select,
label {
  font-family: inherit;
  border: none;
  outline: none;
}

.app {
  --app-stable-height: min(var(--tg-viewport-stable-height, var(--app-vh, 100dvh)), var(--app-vh, 100dvh));
  --app-safe-top: max(var(--tg-content-safe-area-inset-top, 0px), env(safe-area-inset-top), var(--app-vv-top, 0px));
  --app-safe-bottom: max(var(--tg-content-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom));
  --app-control-safe-bottom: var(--app-safe-bottom);
  --telegram-host-clearance: 0px;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: var(--app-stable-height);
  min-height: var(--app-stable-height);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: calc(6px + var(--app-safe-top) + var(--telegram-host-clearance)) 14px var(--app-safe-bottom);
  font-family: var(--font-display);
  background: radial-gradient(1200px 800px at 10% 0%, #1c2a42 0%, #0c1120 60%),
    radial-gradient(1200px 800px at 90% 100%, #1a2f35 0%, #0b0f1a 60%);
  overscroll-behavior-y: none;
}

.app.match-screen {
  grid-template-rows: 1fr;
}

.app-wallpaper-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.9;
}

.app.telegram-host {
  --app-safe-top: max(
    var(--tg-content-safe-area-inset-top, 0px),
    var(--tg-safe-area-inset-top, 0px),
    env(safe-area-inset-top),
    var(--app-vv-top, 0px)
  );
  --app-safe-bottom: min(max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px)), 2px);
  --app-control-safe-bottom: min(max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px)), 14px);
  /* Telegram top controls still need a little manual headroom on some Android WebViews. */
  --telegram-host-clearance: clamp(18px, 3.2dvh, 28px);
}

.app.telegram-host.match-screen {
  --telegram-host-clearance: clamp(14px, 2.6dvh, 22px);
}

.app.viewport-compact {
  padding: calc(4px + var(--app-safe-top) + var(--telegram-host-clearance)) 10px var(--app-safe-bottom);
}

.app.viewport-compact .topbar {
  padding: 1px 4px 6px;
}

.app.viewport-compact .content {
  gap: 8px;
}

.app.viewport-compact .card {
  padding: 12px;
  border-radius: 14px;
}

.app.viewport-compact .section-title {
  font-size: 14px;
  margin-bottom: 8px;
}

.app.viewport-compact .greeting {
  font-size: 13px;
}

.app.viewport-compact .badge {
  padding: 5px 8px;
  font-size: 10px;
}

.app.viewport-compact .primary-button,
.app.viewport-compact .secondary-button {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
}

.app.viewport-compact .round-countdown-wrap {
  min-height: clamp(140px, 32vh, 220px);
}

.app.viewport-compact .round-countdown {
  padding: 14px 10px;
}

.app.viewport-compact .round-countdown-label {
  font-size: 15px;
}

.app.viewport-compact .round-countdown-value {
  font-size: clamp(44px, 11vw, 72px);
}

.app.viewport-compact .game-answer-box {
  min-height: 46px;
  padding: 10px 12px;
  font-size: 14px;
}

.app.viewport-compact .keyboard {
  min-height: clamp(120px, 22dvh, 180px);
  gap: 4px;
  padding-bottom: calc(6px + min(var(--app-control-safe-bottom), 12px));
}

.app.viewport-compact .game-shell-match .keyboard {
  min-height: 0;
  padding-bottom: calc(2px + min(var(--app-control-safe-bottom), 8px));
}

.app.telegram-host.viewport-compact .keyboard {
  padding-bottom: calc(12px + min(var(--app-control-safe-bottom), 14px));
}

.app.telegram-host.viewport-compact .game-shell-match .keyboard {
  padding-bottom: calc(2px + min(var(--app-control-safe-bottom), 8px));
}

.app.viewport-compact .key {
  min-height: clamp(28px, 4dvh, 36px);
  font-size: 14px;
}

.app.viewport-compact .vote-card {
  min-height: 0;
  max-height: 100%;
  gap: 6px;
  padding: 10px;
}

.app.viewport-compact .vote-target-list {
  gap: 5px;
  margin: 4px 0 6px;
  grid-auto-rows: minmax(48px, auto);
}

.app.viewport-compact .vote-target-row {
  min-height: 48px;
  padding: 6px 7px;
}

.app.viewport-compact .vote-target-name {
  font-size: 13px;
}

.app.viewport-compact .vote-target-score {
  font-size: 15px;
}

.app.viewport-compact .vote-bonus-slot {
  width: 42px;
  height: 42px;
  min-width: 42px;
}

.app.viewport-compact .vote-bonus-slot-image {
  width: 100%;
  height: 100%;
}

.app.viewport-compact .vote-portfolio-grid {
  grid-template-columns: repeat(4, minmax(52px, 1fr));
  gap: 7px;
  margin: 4px 0 6px;
}

.app.viewport-compact .vote-portfolio-icon {
  max-width: 62px;
  max-height: 62px;
}

.app.viewport-tiny .card {
  padding: 10px;
  border-radius: 12px;
}

.app.viewport-tiny .section-title {
  font-size: 13px;
  margin-bottom: 7px;
}

.app.viewport-tiny .greeting {
  font-size: 12px;
}

.app.viewport-tiny .primary-button,
.app.viewport-tiny .secondary-button {
  padding: 9px 10px;
  border-radius: 11px;
  font-size: 13px;
}

.app.viewport-tiny .vote-target-row {
  min-height: 44px;
  padding: 5px 6px;
}

.app.viewport-tiny .vote-bonus-slot {
  width: 40px;
  height: 40px;
  min-width: 40px;
}

.app.viewport-tiny .vote-bonus-slot-image {
  width: 100%;
  height: 100%;
}

.app.telegram-host.viewport-tiny .bottom-nav {
  margin-bottom: 12px;
}

.app.telegram-host.viewport-tiny .nav-item {
  min-height: 74px;
  padding: 5px 3px 7px;
}

.app.telegram-host.viewport-tiny .nav-icon {
  top: 1px;
  width: 46px;
  height: 46px;
}

.app.telegram-host.viewport-tiny .nav-icon-image {
  width: 42px;
  height: 42px;
}

.app.telegram-host.viewport-tiny .nav-label {
  margin-top: 28px;
  font-size: 11px;
}

.app.telegram-host.viewport-tiny .content.match-active {
  padding-top: 4px;
}

.app.telegram-host.viewport-tiny .match-stage-countdown .match-stage-scroll {
  padding-top: 8px;
}

.app.telegram-host.viewport-tiny .match-live-body {
  padding-bottom: 124px;
}

.app.telegram-host.viewport-tiny .match-live-footer,
.app.telegram-host.viewport-tiny .match-stage-ended .match-exit-button,
.app.telegram-host.viewport-tiny .match-stage-countdown .match-exit-button {
  bottom: calc(22px + var(--app-control-safe-bottom));
}

.app.telegram-host.viewport-tiny .keyboard {
  min-height: clamp(112px, 20dvh, 156px);
  padding-bottom: calc(14px + min(var(--app-control-safe-bottom), 14px));
}

.app.telegram-host.viewport-tiny .wheel-wrap {
  height: clamp(228px, 36dvh, 300px);
  margin: 2px auto 6px;
}

.app img {
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.app::before,
.app::after {
  content: '';
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 179, 71, 0.35), transparent 60%);
  filter: blur(10px);
  opacity: 0.7;
  z-index: 0;
}

.app::before {
  top: -120px;
  left: -80px;
}

.app::after {
  bottom: -140px;
  right: -100px;
  background: radial-gradient(circle at 30% 30%, rgba(94, 234, 212, 0.35), transparent 60%);
}

.topbar {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  /* Keep room for Telegram overlays, but avoid stealing too much vertical space on short screens. */
  padding: clamp(2px, 0.8dvh, 8px) 6px 8px;
}

.topbar-right {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.topbar-status-stack {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  position: relative;
}

.secondary-button.admin-open {
  border-color: rgba(94, 234, 212, 0.35);
}

.brand {
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  font-size: 18px;
  color: var(--text-0);
  display: flex;
  align-items: center;
  gap: 8px;
}

.energy {
  font-family: var(--font-display);
  background: rgba(255, 179, 71, 0.15);
  color: var(--accent-1);
  border: 1px solid rgba(255, 179, 71, 0.3);
  padding: 7px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
}

.energy-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
  min-width: 0;
}

.energy-block-lives {
  cursor: pointer;
}

.energy-block.is-open .energy {
  box-shadow: 0 0 0 2px rgba(94, 234, 212, 0.2);
}

.energy-sub {
  font-family: var(--font-body);
  font-size: 12px;
  color: #f6f7fb;
  background: rgba(94, 234, 212, 0.18);
  border: 1px solid rgba(94, 234, 212, 0.4);
  border-radius: 10px;
  padding: 4px 8px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 78px;
  min-height: 24px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.energy-sub.placeholder {
  visibility: hidden;
}

.lives-chip {
  background: rgba(255, 107, 129, 0.14);
  color: #ff8ea1;
  border-color: rgba(255, 107, 129, 0.28);
}

.lives-sub {
  background: rgba(255, 107, 129, 0.12);
  border-color: rgba(255, 107, 129, 0.22);
}

.resource-popover {
  position: fixed;
  background: rgba(9, 14, 26, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 8px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  z-index: 120;
  animation: resourcePopoverIn 220ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.round-answers-popover {
  z-index: 145;
  width: min(320px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  gap: 10px;
  animation: roundAnswersPopoverIn 220ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.round-answers-popover::before {
  display: none;
}

.emote-popover {
  z-index: 150;
  width: min(320px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  gap: 10px;
}

.emote-popover::before {
  display: none;
}

.emote-popover-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: min(36dvh, 260px);
  overflow-y: auto;
  padding-right: 2px;
}

.emote-popover-item {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  cursor: pointer;
}

.emote-popover-item-image {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background-size: contain;
}

.round-answers-popover-list {
  display: grid;
  gap: 6px;
  max-height: min(42dvh, 320px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

.round-answer-entry {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.9);
  overflow-wrap: anywhere;
}

.round-answer-entry.correct {
  border-color: rgba(94, 234, 212, 0.22);
  background: rgba(94, 234, 212, 0.07);
}

.round-answer-entry.wrong {
  border-color: rgba(255, 107, 107, 0.22);
  background: rgba(255, 107, 107, 0.07);
}

@keyframes roundAnswersPopoverIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.resource-popover-energy,
.resource-popover-lives {
  transform-origin: calc(var(--resource-popover-arrow-x, 22px)) 0;
}

.resource-popover::before {
  content: '';
  position: absolute;
  top: -6px;
  left: calc(var(--resource-popover-arrow-x, 22px) - 5px);
  width: 10px;
  height: 10px;
  background: rgba(9, 14, 26, 0.96);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transform: rotate(45deg);
}

.resource-popover-title {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-0);
}

.resource-popover-count {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text-0);
}

.resource-popover-timer {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.84);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.resource-popover-message {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.resource-popover-actions {
  display: flex;
  gap: 8px;
}

.resource-popover-actions .secondary-button,
.resource-popover-actions .primary-button {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
}

.resource-popover-actions-single .primary-button,
.resource-popover-actions-single .secondary-button {
  flex: 0 0 auto;
  width: 100%;
}

@keyframes resourcePopoverIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.content {
  z-index: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.content.scrollable {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overflow-anchor: none;
  padding-right: 2px;
  padding-bottom: 8px;
}

.app.telegram-host.viewport-compact .content.scrollable {
  gap: 6px;
  padding-bottom: 4px;
}

.content.match-active {
  gap: 0;
  padding-top: clamp(10px, 2dvh, 18px);
  min-height: 100%;
  height: 100%;
  flex: 1 1 auto;
}

.app.telegram-host .content.match-active {
  padding-top: clamp(10px, 2dvh, 18px);
}

.app.telegram-host.viewport-compact .content.match-active {
  padding-top: clamp(6px, 1.2dvh, 10px);
}

.content.match-active > .game-shell-match-viewport {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.app.match-screen .content {
  grid-row: 1 / -1;
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.section-title {
  font-family: var(--font-display);
  font-size: 16px;
  margin: 0 0 10px;
  color: var(--text-0);
}

.greeting {
  font-family: var(--font-display);
  color: var(--text-1);
  font-size: 14px;
}

.greeting.blocked {
  color: #ff8b8b;
  font-weight: 600;
}

.greeting.success {
  color: #6ee7b7;
  font-weight: 700;
}

.greeting.feed-info {
  color: rgba(232, 238, 248, 0.94);
}

.greeting.feed-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.feed-notice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  line-height: 1;
  font-size: 14px;
  transform: translateY(1px);
}

.feed-notice-text {
  min-width: 0;
}

.greeting.feed-warn {
  color: #ffd36f;
  font-weight: 700;
  border-color: rgba(255, 211, 111, 0.28);
  background: rgba(255, 211, 111, 0.1);
}

.greeting.feed-danger {
  color: #ff8f8f;
  font-weight: 700;
  border-color: rgba(255, 143, 143, 0.28);
  background: rgba(255, 143, 143, 0.1);
}

.greeting.feed-success {
  color: #7bf0b7;
  font-weight: 700;
  border-color: rgba(123, 240, 183, 0.28);
  background: rgba(123, 240, 183, 0.1);
}

.greeting.feed-blocked {
  color: #b6c2d9;
  font-weight: 600;
  border-color: rgba(182, 194, 217, 0.22);
  background: rgba(182, 194, 217, 0.08);
}

.greeting.feed-info {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 110px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(6px);
}

.app.loading {
  pointer-events: none;
  user-select: none;
}

.browser-telegram-stub {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 32px);
  background:
    radial-gradient(1200px 760px at 12% 0%, #1e3150 0%, #0c1325 58%),
    radial-gradient(980px 700px at 90% 100%, #1f343d 0%, #080d19 62%);
}

.browser-telegram-stub__card {
  width: min(100%, 560px);
  padding: clamp(22px, 5vw, 36px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 16, 30, 0.78);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.45);
  text-align: center;
  display: grid;
  gap: 14px;
}

.browser-telegram-stub__eyebrow {
  margin: 0;
  color: rgba(198, 208, 225, 0.9);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.browser-telegram-stub__title {
  margin: 0;
  font-size: clamp(23px, 4vw, 34px);
  line-height: 1.2;
  color: #f8e8c2;
  text-wrap: balance;
}

.browser-telegram-stub__text {
  margin: 0;
  color: rgba(235, 241, 255, 0.92);
  font-size: clamp(16px, 2.7vw, 19px);
  line-height: 1.45;
}

.browser-telegram-stub__cta {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #161315;
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.2px;
  background:
    radial-gradient(120% 200% at 50% -90%, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, #ffd78c 0%, #ffb347 48%, #f29446 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 10px 28px rgba(243, 157, 53, 0.36),
    0 2px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.browser-telegram-stub__cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 16px 32px rgba(243, 157, 53, 0.4),
    0 6px 14px rgba(0, 0, 0, 0.26);
}

.browser-telegram-stub__cta:active {
  transform: translateY(1px);
}

.loader {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent-1);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.primary-button {
  font-family: var(--font-display);
  position: relative;
  isolation: isolate;
  letter-spacing: 0.1px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  color: #161315;
  background:
    radial-gradient(120% 200% at 50% -90%, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, #ffd78c 0%, #ffb347 48%, #f29446 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 10px 28px rgba(243, 157, 53, 0.36),
    0 2px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 16px 32px rgba(243, 157, 53, 0.4),
    0 6px 14px rgba(0, 0, 0, 0.26);
}

.primary-button:active {
  transform: translateY(1px) scale(0.99);
  filter: saturate(0.98);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.26) inset,
    0 7px 16px rgba(243, 157, 53, 0.32),
    0 2px 8px rgba(0, 0, 0, 0.22);
}

.secondary-button {
  font-family: var(--font-display);
  position: relative;
  isolation: isolate;
  letter-spacing: 0.1px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  color: var(--text-0);
  background:
    radial-gradient(130% 180% at 50% -100%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07));
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 8px 20px rgba(0, 0, 0, 0.24),
    0 2px 10px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.secondary-button:hover {
  transform: translateY(-2px);
  background:
    radial-gradient(130% 180% at 50% -100%, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  border-color: rgba(255, 255, 255, 0.34);
}

.secondary-button:active {
  transform: translateY(1px) scale(0.99);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 4px 10px rgba(0, 0, 0, 0.26),
    0 1px 5px rgba(0, 0, 0, 0.22);
}

.secondary-button.active {
  border-color: rgba(255, 179, 71, 0.8);
  box-shadow: 0 0 0 2px rgba(255, 179, 71, 0.2);
}

.button-stack {
  display: grid;
  gap: 10px;
}

.app.telegram-host.viewport-compact .button-stack {
  gap: 8px;
}

.round-tools-row {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.round-tools-row.round-tools-row-dual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.round-prompt-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  border: 0;
  background: transparent;
}

.inventory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.inventory-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.inventory-item-media {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border-width: 1px;
}

.inventory-item-label {
  font-size: 13px;
  line-height: 1.2;
}

.task {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.35;
}

.task-title {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.2px;
  color: var(--text-0);
}

.task-desc {
  font-size: 12px;
}

.task-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}

.task-actions.single {
  grid-template-columns: 1fr;
}

.task+.task {
  margin-top: 10px;
}

.shop-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition:
    border-color 0.2s ease,
    box-shadow 0.22s ease,
    transform 0.18s ease;
}

.shop-item+.shop-item {
  margin-top: 10px;
}

.shop-item>div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  line-height: 1.3;
}

.shop-title {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.2px;
  color: var(--text-0);
}

.shop-item .primary-button {
  width: 140px;
  min-width: 140px;
  padding: 10px 12px;
  font-size: 13px;
}

.shop-item.purchase-success {
  border-color: rgba(255, 211, 127, 0.42);
  box-shadow: 0 10px 24px rgba(242, 148, 70, 0.14);
  animation: shopPurchasePulse 640ms ease-out;
}

.shop-item.purchase-success .primary-button {
  animation: shopButtonSuccessFlash 640ms ease-out;
}

.shop-item span {
  color: var(--muted);
  font-size: 12px;
  display: block;
}

.leaderboard {
  display: grid;
  gap: 10px;
}

.leader-divider {
  height: 1px;
  margin: 2px 4px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.leader-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.leader-row-me {
  background:
    linear-gradient(135deg, rgba(255, 179, 71, 0.16), rgba(255, 140, 0, 0.08)),
    rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 179, 71, 0.45);
  box-shadow: 0 8px 22px rgba(255, 140, 0, 0.12);
}

.leader-name {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.2px;
}

.leader-score {
  font-family: var(--font-display);
}

.result-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.achievements-grid.achievements-grid-user {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.achievement-item {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition:
    transform 0.16s ease,
    border-color 0.18s ease,
    box-shadow 0.2s ease;
}

.achievement-item.achievement-item-user {
  padding: 4px;
  min-height: 0;
  display: block;
}

.achievement-item.achievement-item-user .image-touch-wrap-achievement {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

.achievement-item.achievement-item-user .achievement-image,
.achievement-item.achievement-item-user .achievement-emoji {
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

.achievement-item.achievement-item-user .achievement-emoji {
  font-size: clamp(26px, 7vw, 38px);
}

.achievement-item::after {
  content: '';
  position: absolute;
  inset: -20% 55% -20% -30%;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
  transform: translateX(-120%) rotate(8deg);
  opacity: 0;
  pointer-events: none;
}

.achievement-item.achievement-item-animate {
  border-color: rgba(255, 211, 127, 0.28);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24);
  animation: achievementTapWobble 920ms ease-in-out;
}

.achievement-item.achievement-item-animate::after {
  opacity: 1;
  animation: achievementShine 920ms ease-in-out;
}

.achievement-image {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.achievement-emoji {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  font-size: 28px;
  background: rgba(255, 255, 255, 0.08);
}

.achievement-emoji-button {
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

.achievement-title {
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.2;
}

.achievement-date {
  font-size: 11px;
  color: var(--muted);
}

@media (max-width: 360px) {
  .achievements-grid.achievements-grid-user {
    gap: 8px;
  }

  .achievement-item.achievement-item-user .image-touch-wrap-achievement {
    width: 100%;
    height: auto;
  }
}

.rules {
  font-family: var(--font-body);
  color: var(--text-1);
  font-size: 13px;
  line-height: 1.5;
}

.rules-article {
  display: grid;
  gap: 18px;
  font-size: 15px;
  line-height: 1.62;
}

.rules-hero {
  display: grid;
  gap: 10px;
}

.rules-hero-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.18;
  color: var(--text-0);
}

.rules-lead {
  margin: 0;
  font-size: 16px;
  color: rgba(232, 238, 248, 0.92);
}

.rules-section {
  display: grid;
  gap: 10px;
}

.rules-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.24;
  color: var(--text-0);
}

.rules-subheading {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: rgba(244, 247, 252, 0.96);
}

.rules-article p {
  margin: 0;
}

.rules-emphasis {
  font-style: italic;
  color: rgba(245, 247, 252, 0.95);
}

.rules-list,
.rules-steps {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}

.rules-list li::marker,
.rules-steps li::marker {
  color: rgba(255, 255, 255, 0.72);
}

.rules-list li,
.rules-steps li {
  padding-left: 4px;
}

.rules-article b {
  color: var(--text-0);
}

.rules-article i {
  color: rgba(245, 247, 252, 0.95);
}

.legal-article {
  gap: 20px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 14px 16px;
}

.legal-lead {
  margin-top: 4px;
}

.reveal-card {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.reveal-name {
  color: var(--text-0);
  font-weight: 700;
}

.reveal-answers {
  color: var(--muted);
  font-size: 12px;
  word-break: break-word;
}

.bottom-nav {
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 8px 8px calc(4px + var(--app-control-safe-bottom));
  border-radius: 18px 18px 0 0;
  background: rgba(10, 14, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.app.telegram-host.viewport-compact .bottom-nav {
  margin-bottom: 10px;
}

.nav-item {
  position: relative;
  display: grid;
  place-items: center;
  padding: 8px 4px 12px;
  border-radius: 0;
  font-size: 13px;
  min-height: 86px;
  color: var(--text-1);
  cursor: pointer;
  border: 0;
  background: transparent;
  isolation: isolate;
}

.app.telegram-host.viewport-compact .nav-item {
  min-height: 78px;
  padding: 6px 4px 8px;
}

.nav-item::after {
  content: '';
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 5px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd78c 0%, #ffb347 48%, #f29446 100%);
  opacity: 0;
  transform: scaleX(0.55);
  transform-origin: center;
  transition:
    opacity 0.24s ease,
    transform 0.26s cubic-bezier(0.22, 0.9, 0.2, 1);
  z-index: 1;
  pointer-events: none;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 0;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 40%, rgba(255, 179, 71, 0.45), rgba(242, 148, 70, 0));
  opacity: 0;
  filter: blur(2px);
  transition: opacity 0.26s ease;
  z-index: 0;
  pointer-events: none;
}

.nav-item.active {
  background: linear-gradient(140deg, rgba(255, 211, 127, 0.18), rgba(111, 137, 255, 0.14));
  color: var(--text-0);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transform: none;
}

.nav-icon {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 56px;
  height: 56px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.72);
  pointer-events: none;
  z-index: 0;
}

.app.telegram-host.viewport-compact .nav-icon {
  top: 2px;
  width: 50px;
  height: 50px;
}

.nav-icon svg {
  width: 48px;
  height: 48px;
  fill: currentColor;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.nav-icon-image {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
  opacity: 0.92;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.app.telegram-host.viewport-compact .nav-icon-image {
  width: 46px;
  height: 46px;
}

.nav-label {
  position: relative;
  z-index: 1;
  margin-top: 38px;
  font-size: 13px;
  letter-spacing: 0.2px;
  font-weight: 800;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.app.telegram-host.viewport-compact .nav-label {
  margin-top: 32px;
  font-size: 12px;
}

.nav-item.active .nav-icon {
  color: rgba(255, 216, 138, 0.98);
}

.nav-item.active .nav-label {
  font-weight: 800;
  color: #fff6d8;
  text-shadow: 0 2px 8px rgba(255, 179, 71, 0.18), 0 1px 4px rgba(0, 0, 0, 0.45);
}

.nav-item.active::after {
  opacity: 1;
  transform: scaleX(1);
  animation: navIndicatorReveal 260ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.nav-item.active::before {
  opacity: 1;
  animation: navIndicatorGlow 280ms ease-out;
}

.nav-item.active .nav-icon-image {
  opacity: 1;
  filter: drop-shadow(0 2px 7px rgba(255, 179, 71, 0.22));
}

.nav-item.active .nav-icon {
  animation: navIconLift 220ms ease-out;
}

.nav-item.active .nav-label {
  animation: navLabelSettle 220ms ease-out;
}

.nav-item:not(.active) .nav-label {
  color: rgba(255, 255, 255, 0.88);
}

@keyframes navIndicatorReveal {
  0% {
    opacity: 0;
    transform: scaleX(0.45);
  }

  60% {
    opacity: 1;
    transform: scaleX(1.06);
  }

  100% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes navIndicatorGlow {
  0% {
    opacity: 0;
    transform: scaleX(0.8);
  }

  100% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes navIconLift {
  0% {
    transform: translateX(-50%) translateY(2px) scale(0.96);
  }

  100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes navLabelSettle {
  0% {
    transform: translateY(2px);
    opacity: 0.92;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes answerCorrectPulse {
  0% {
    transform: scale(0.995);
  }

  40% {
    transform: scale(1.008);
    background-color: rgba(94, 234, 212, 0.12);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes answerWrongShake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-4px);
  }

  40% {
    transform: translateX(4px);
  }

  60% {
    transform: translateX(-3px);
  }

  80% {
    transform: translateX(2px);
  }
}

@keyframes achievementTapWobble {
  0% {
    transform: rotate(0deg) scale(1);
  }

  25% {
    transform: rotate(-1.2deg) scale(1.01);
  }

  50% {
    transform: rotate(1deg) scale(1.012);
  }

  75% {
    transform: rotate(-0.7deg) scale(1.006);
  }

  100% {
    transform: rotate(0deg) scale(1);
  }
}

@keyframes achievementShine {
  0% {
    transform: translateX(-120%) rotate(8deg);
    opacity: 0;
  }

  15% {
    opacity: 1;
  }

  100% {
    transform: translateX(180%) rotate(8deg);
    opacity: 0;
  }
}

@keyframes shopPurchasePulse {
  0% {
    transform: translateY(0);
  }

  35% {
    transform: translateY(-1px);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes shopButtonSuccessFlash {
  0% {
    filter: saturate(1);
  }

  35% {
    filter: saturate(1.2) brightness(1.05);
  }

  100% {
    filter: saturate(1);
  }
}

@keyframes actionDialogIn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes successModalPop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  70% {
    opacity: 1;
    transform: translateY(-1px) scale(1.01);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rewardModalIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }

  70% {
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fourPicsOverlayFadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes fourPicsExpandedPop {
  0% {
    opacity: 0.88;
    transform: scale(0.94);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes inlineImageFlipFromTile {
  from {
    transform: var(--inline-flip-from-transform, none);
    opacity: 0.9;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes panelFloatIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes wheelPointerPulse {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.07);
  }
}

@keyframes resultRowIn {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes resultActionsIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.bottom-nav::before,
.bottom-nav::after {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(94, 234, 212, 0.25), transparent 60%);
  filter: blur(6px);
  opacity: 0.7;
  pointer-events: none;
}

.bottom-nav::before {
  left: -40px;
  bottom: -60px;
}

.bottom-nav::after {
  right: -30px;
  top: -50px;
  background: radial-gradient(circle at 40% 40%, rgba(255, 179, 71, 0.2), transparent 60%);
}

.bottom-nav .bubble {
  position: absolute;
  border-radius: 999px;
  opacity: 0.5;
  pointer-events: none;
  background: linear-gradient(140deg, rgba(111, 137, 255, 0.5), rgba(94, 234, 212, 0.3));
  animation: floaty 8s ease-in-out infinite;
}

.bottom-nav .bubble.b1 {
  width: 26px;
  height: 26px;
  left: 18%;
  bottom: -6px;
  animation-delay: 0.4s;
}

.bottom-nav .bubble.b2 {
  width: 18px;
  height: 18px;
  right: 24%;
  bottom: -4px;
  animation-delay: 1.2s;
}

.bottom-nav .bubble.b3 {
  width: 12px;
  height: 12px;
  left: 52%;
  bottom: 4px;
  animation-delay: 2.2s;
}

@keyframes floaty {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.55;
  }

  50% {
    transform: translateY(-6px) scale(1.05);
    opacity: 0.85;
  }

  100% {
    transform: translateY(0) scale(1);
    opacity: 0.6;
  }
}

.settings-card {
  margin-bottom: 12px;
}

.setting-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-row>* {
  min-width: 0;
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-row-upload {
  align-items: center;
}

.setting-row-checkbox {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.slider {
  width: 160px;
  accent-color: #ffd27d;
}

.admin-modal {
  width: min(calc(100vw - 8px), 760px);
  max-width: calc(100vw - 8px);
  max-height: min(86vh, 860px);
  overflow-y: auto;
  padding-top: calc(28px + env(safe-area-inset-top));
  /* Admin UI should be compact and utilitarian (not the in-game display font). */
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: 12px;
  line-height: 1.25;
}

.admin-modal-overlay {
  place-items: start center;
  padding: calc(clamp(86px, 13dvh, 132px) + env(safe-area-inset-top)) 4px calc(16px + env(safe-area-inset-bottom));
}

.admin-card {
  margin-top: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 8px 0 12px;
}

.admin-tab {
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.admin-tab.active {
  background: rgba(255, 210, 125, 0.18);
  border-color: rgba(255, 210, 125, 0.6);
  color: var(--text-0);
}

.admin-tab-select {
  margin: 8px 0 12px;
}

.select.wide {
  width: 100%;
}

.admin-textarea {
  font-family: inherit;
  width: 100%;
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-0);
  border: 1px solid rgba(255, 255, 255, 0.12);
  resize: vertical;
}

.admin-input {
  font-family: inherit;
  width: 90px;
  max-width: 100%;
  border-radius: 10px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-0);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-input.wide {
  width: 100%;
}

.admin-ui-wallpaper-preview {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 220px;
  margin: 6px 0 10px;
  background-size: cover;
}

.admin-ui-icon-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.admin-ui-icon-preview {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background-size: contain;
  background-color: rgba(255, 255, 255, 0.05);
}

.admin-ui-icon-preview-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.admin-spam-popup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin: 6px 0 10px;
}

.admin-spam-popup-item {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.admin-spam-popup-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
}

.admin-ui-schedule-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}

.admin-ui-schedule-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.admin-ui-schedule-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.admin-ui-schedule-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.admin-ui-schedule-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-0);
}

.admin-upload-note {
  font-size: 11px;
  line-height: 1.35;
  word-break: break-word;
}

.admin-alchemy-recipe-preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.admin-alchemy-emote-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-alchemy-mini {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background-size: contain;
  background-color: rgba(255, 255, 255, 0.04);
}

.select {
  font-family: inherit;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-0);
}

.admin-round {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  margin-top: 8px;
}

.admin-round-preview {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.admin-preview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-actions.inline {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.admin-actions.inline .primary-button,
.admin-actions.inline .secondary-button {
  width: auto;
  min-width: 0;
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 12px;
}

.admin-collapsible-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.admin-collapsible-title {
  font-weight: 700;
  color: var(--text-0);
  font-size: 12px;
}

.admin-edit-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-items: center;
}

.admin-edit-grid label {
  font-size: 11px;
  color: var(--text-1);
}

.admin-achievement-preview-grid {
  margin-top: 8px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
}

.admin-actions {
  display: grid;
  gap: 6px;
}

.admin-pagination {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.admin-player {
  display: grid;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  margin-top: 8px;
}

.admin-player-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-player-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.admin-player-meta span {
  overflow-wrap: anywhere;
}

.admin-player-stats-summary {
  font-size: 11px;
  line-height: 1.25;
}

.admin-player-toggle {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 999px;
  padding: 0;
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-achievement-limit-row {
  display: grid;
  gap: 6px;
}

.admin-achievement-limit-row label {
  font-size: 11px;
  color: var(--text-1);
}

.admin-player-controls {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-items: center;
}

.admin-player-controls label {
  font-size: 11px;
  color: var(--text-1);
}

.admin-player-controls button {
  grid-column: 1 / -1;
}

.admin-player-checkbox-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 32px;
}

.admin-player-checkbox-row label {
  margin: 0;
}

.admin-player-checkbox-row input[type='checkbox'] {
  margin: 0;
}

.admin-inline-checkbox {
  grid-column: 1 / -1;
  padding: 0;
  border-bottom: none;
}

@media (max-width: 640px) {
  .setting-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 8px;
  }

  .setting-row-checkbox {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .admin-round {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .admin-actions {
    grid-template-columns: 1fr;
  }

  .admin-player-controls {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .admin-player-controls label {
    margin-top: 2px;
  }

  .admin-player-checkbox-row {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .admin-input,
  .select,
  .admin-input.wide,
  .select.wide {
    width: 100%;
  }
}

.admin-stats {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.admin-stat {
  font-size: 12px;
  color: var(--text-1);
}

.muted {
  font-family: var(--font-body);
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.2);
  color: var(--accent-3);
  font-weight: 700;
  font-size: 11px;
}

.round-badge {
  position: relative;
  width: 100%;
  justify-content: space-between;
  gap: 10px;
  overflow: visible;
  z-index: 34;
}

.round-badge-timer {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.round-badge-timer-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: visible;
  z-index: 38;
}

.round-points-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 3px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid rgba(179, 255, 223, 0.85);
  background: radial-gradient(100% 120% at 50% 20%,
      rgba(78, 185, 132, 0.96) 0%,
      rgba(27, 95, 63, 0.9) 64%,
      rgba(14, 63, 41, 0.9) 100%);
  color: #eafff4;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-shadow:
    0 0 10px rgba(194, 255, 230, 0.8),
    0 1px 0 rgba(8, 38, 24, 0.35);
  box-shadow:
    0 0 20px rgba(106, 255, 190, 0.5),
    0 8px 22px rgba(0, 0, 0, 0.34);
  pointer-events: none;
  transform-origin: 100% 100%;
  will-change: transform, opacity;
  animation: roundPointsPopPulse 1.05s cubic-bezier(0.12, 0.9, 0.2, 1) both;
  z-index: 42;
}

@keyframes roundPointsPopPulse {
  0% {
    transform: translate3d(0, 12px, 0) scale(0.72);
    opacity: 0;
    filter: saturate(1);
  }

  18% {
    transform: translate3d(0, -1px, 0) scale(1.24);
    opacity: 1;
    filter: saturate(1.28);
  }

  50% {
    transform: translate3d(0, -5px, 0) scale(1.06);
    opacity: 1;
    filter: saturate(1.16);
  }

  100% {
    transform: translate3d(0, -20px, 0) scale(0.9);
    opacity: 0;
    filter: saturate(1);
  }
}

.game-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  min-height: 70vh;
  overflow: hidden;
}

.game-shell-match-viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.game-shell-match {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1 1 auto;
  height: 100%;
  min-height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow-x: hidden;
  overflow-y: hidden;
  overscroll-behavior: none;
  will-change: transform;
}

.match-stage {
  display: grid;
  flex: 1 1 auto;
  height: 100%;
  min-height: 100%;
  gap: 8px;
}

.match-stage-ended,
.match-stage-countdown,
.match-stage-live {
  padding-bottom: calc(6px + var(--app-safe-bottom));
}

.app.telegram-host .match-stage-ended,
.app.telegram-host .match-stage-countdown,
.app.telegram-host .match-stage-live {
  padding-bottom: calc(2px + min(var(--app-safe-bottom), 6px));
}

.match-stage-ended,
.match-stage-countdown {
  grid-template-rows: minmax(0, 1fr) auto;
}

.match-stage-live {
  min-height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.match-stage-scroll {
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 4px;
}

.app.telegram-host .match-stage-ended .match-stage-scroll,
.app.telegram-host .match-stage-live .match-live-head {
  padding-top: clamp(8px, 1.6dvh, 18px);
}

.app.telegram-host.viewport-compact .match-stage-ended .match-stage-scroll,
.app.telegram-host.viewport-compact .match-stage-live .match-live-head {
  padding-top: clamp(2px, 0.4dvh, 8px);
}

.match-stage-countdown .match-stage-scroll {
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding-top: clamp(34px, 8dvh, 72px);
}

.app.telegram-host.viewport-compact .match-stage-countdown .match-stage-scroll {
  padding-top: clamp(14px, 3dvh, 26px);
}

.countdown-feed {
  width: min(560px, 100%);
  display: grid;
  gap: 6px;
  align-self: center;
}

.match-live-head {
  display: grid;
  gap: 8px;
}

.match-live-body {
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
}

.match-live-footer {
  display: grid;
  gap: 4px;
  align-content: end;
  align-self: end;
  justify-self: center;
  width: min(560px, 100%);
  z-index: 25;
  position: relative;
}

.match-exit-button {
  width: min(560px, 100%);
  align-self: center;
  margin-top: auto;
}

.match-stage-ended .match-exit-button,
.match-stage-countdown .match-exit-button {
  position: relative;
  z-index: 25;
  justify-self: center;
  align-self: end;
}

.round-countdown-wrap {
  display: flex;
  width: 100%;
  flex: 0 0 auto;
  min-height: auto;
  align-items: center;
  justify-content: center;
  padding-top: 0;
}

.round-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(360px, 100%);
  font-family: var(--font-display);
  font-size: 18px;
  text-align: center;
  padding: 18px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.round-countdown-label {
  font-size: 18px;
  line-height: 1.3;
}

.round-countdown-value {
  display: inline-block;
  font-size: clamp(52px, 13vw, 86px);
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #ffd166;
  text-shadow: 0 0 24px rgba(255, 209, 102, 0.45);
  animation: countdown-pulse 0.45s ease;
}

@keyframes countdown-pulse {
  0% {
    transform: scale(0.84);
    opacity: 0.7;
  }

  55% {
    transform: scale(1.12);
    opacity: 1;
  }

  100% {
    transform: scale(1);
  }
}

.timer {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.timer-bonus-marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.timer-bonus-mark {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.48);
  transform: translate(-50%, -50%);
  opacity: 0.75;
}

.timer>span {
  position: relative;
  z-index: 1;
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ff6b6b, #ffb347);
  transition: width 0.14s linear;
}

.game-canvas {
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.image-grid.image-grid-expanded {
  grid-template-columns: 1fr;
}

.image-grid.image-grid-overlay-expanded {
  position: relative;
  isolation: isolate;
}

.image-grid.image-grid-overlay-expanded::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 12px;
  background: rgba(6, 10, 18, 0.5);
  pointer-events: none;
  animation: fourPicsOverlayFadeIn 420ms cubic-bezier(0.18, 0.84, 0.22, 1);
}

.image-touch-wrap {
  position: relative;
  width: 100%;
}

.image-touch-wrap-single {
  width: 100%;
}

.image-touch-wrap-achievement {
  width: 48px;
  height: 48px;
}

.image-touch-wrap-reward {
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

.wheel-reward-modal {
  display: grid;
  gap: 10px;
  text-align: center;
}

.wheel-reward-bonus-icon {
  pointer-events: none;
}

.image-grid .image-touch-wrap.expanded {
  grid-column: 1 / -1;
  z-index: 2;
}

.image-grid.image-grid-overlay-expanded .image-touch-wrap.expanded {
  position: static;
  aspect-ratio: 1 / 1;
  z-index: auto;
  grid-column: auto;
}

.image-grid.image-grid-overlay-expanded .image-touch-wrap:not(.expanded) {
  opacity: 0.55;
  transition: opacity 0.42s cubic-bezier(0.18, 0.84, 0.22, 1);
}

.image-grid img,
.image-single img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  user-select: none;
  -webkit-user-drag: none;
  /* Prevent long-press context actions on mobile browsers. */
  -webkit-touch-callout: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.image-tile {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 0;
  margin: 0;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    opacity 0.18s ease,
    box-shadow 0.2s ease,
    border-color 0.18s ease,
    filter 0.2s ease;
}

.image-single {
  width: 100%;
}

.image-grid img.selected {
  outline: 2px solid rgba(255, 209, 102, 0.9);
  box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.3);
}

.image-tile.selected {
  border-color: rgba(255, 209, 102, 0.95);
  box-shadow:
    0 0 0 2px rgba(255, 209, 102, 0.98),
    0 0 0 6px rgba(255, 209, 102, 0.5),
    0 0 18px rgba(255, 209, 102, 0.45);
  transform: translateY(-1px) scale(1.01);
}

.image-tile.locked-blur {
  filter: blur(14px) saturate(0.2) brightness(0.18) contrast(0.9);
  box-shadow: inset 0 0 0 999px rgba(2, 6, 14, 0.68);
  pointer-events: none;
}

.round-floating-layer {
  position: absolute;
  left: 12px;
  right: 12px;
  top: clamp(110px, 20dvh, 220px);
  z-index: 22;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.round-floating-toast {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 12, 22, 0.26);
  backdrop-filter: blur(4px);
  color: rgba(246, 247, 251, 0.96);
  padding: 8px 10px;
  line-height: 1.28;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  justify-self: center;
  width: min(86vw, 360px);
}

.round-floating-toast.success {
  border-color: rgba(94, 234, 212, 0.38);
  color: #bff5eb;
  text-align: center;
}

.round-floating-toast.waiting {
  border-color: rgba(255, 179, 71, 0.58);
  background: rgba(6, 10, 18, 0.82);
  backdrop-filter: blur(7px);
  text-align: center;
  width: min(88vw, 430px);
}

.round-floating-toast.waiting .waiting-headline {
  font-size: 20px;
  line-height: 1.16;
  color: #ffe0a8;
}

.round-floating-toast.waiting .waiting-admin-comment {
  margin-top: 4px;
  font-size: 14px;
  color: rgba(250, 243, 233, 0.95);
}

.round-floating-toast.waiting .waiting-status {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 226, 176, 0.95);
}

.round-floating-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #ffd89a;
}

.round-floating-sub {
  margin-top: 2px;
  font-size: 12px;
}

.round-floating-toast.emotes {
  border-color: rgba(94, 234, 212, 0.28);
  text-align: center;
}

.round-floating-emote-line {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.round-floating-emote-user {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-floating-emote-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex: 0 0 auto;
}

.round-floating-emote-line+.round-floating-emote-line {
  margin-top: 4px;
}

.image-grid img.expanded,
.image-single img.expanded {
  grid-column: 1 / -1;
  aspect-ratio: auto;
  max-height: min(65dvh, 520px);
  object-fit: contain;
  background: rgba(10, 12, 20, 0.35);
}

.image-tile.expanded {
  grid-column: 1 / -1;
  aspect-ratio: unset;
  height: min(65dvh, 520px);
  background-size: contain;
  background-color: rgba(10, 12, 20, 0.35);
}

.image-grid.image-grid-overlay-expanded .image-tile.expanded {
  position: absolute;
  inset: 0;
  z-index: 2;
  grid-column: auto;
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 1 / 1;
  margin: auto;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45);
  background-color: rgba(8, 11, 20, 0.96);
  background-size: contain;
}

.image-tile.inline-flip-animating {
  will-change: transform;
  transform-origin: top left;
  animation: inlineImageFlipFromTile var(--inline-flip-duration-ms, 420ms) cubic-bezier(0.18, 0.84, 0.22, 1);
}

.image-grid.image-grid-overlay-expanded .image-tile.expanded.inline-flip-animating {
  animation: inlineImageFlipFromTile var(--inline-flip-duration-ms, 420ms) cubic-bezier(0.18, 0.84, 0.22, 1);
}

.image-tile.inline-flip-target-hidden {
  visibility: hidden;
}

.inline-image-flip-ghost {
  position: fixed;
  z-index: 170;
  pointer-events: none;
  background-repeat: no-repeat;
  will-change: transform;
  transform-origin: top left;
  box-sizing: border-box;
}

.image-preview-overlay {
  z-index: 1200;
  padding: 20px;
}

.image-preview-modal {
  width: min(92vw, 720px);
  max-height: 90vh;
  background: rgba(7, 10, 20, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.image-preview-full {
  width: 100%;
  height: min(72vh, 560px);
  max-height: calc(90vh - 84px);
  border-radius: 12px;
  background-color: rgba(0, 0, 0, 0.35);
  background-size: contain;
}

.image-preview-close {
  align-self: center;
}

.banana-stars {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 6px 0 2px;
  color: #fde68a;
  font-size: 12px;
  letter-spacing: 2px;
  animation: bananaFloat 0.8s ease-in-out infinite;
}

.banana-stars span:nth-child(2) {
  animation-delay: 0.1s;
}

.banana-stars span:nth-child(3) {
  animation-delay: 0.2s;
}

.banana-stars span:nth-child(4) {
  animation-delay: 0.3s;
}

.banana-stars span:nth-child(5) {
  animation-delay: 0.4s;
}

@keyframes bananaFloat {
  0% {
    transform: translateY(0);
    opacity: 0.6;
  }

  50% {
    transform: translateY(-6px);
    opacity: 1;
  }

  100% {
    transform: translateY(0);
    opacity: 0.7;
  }
}

.answer-box {
  font-family: var(--font-body);
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: rgba(240, 247, 255, 0.92);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.game-answer-box {
  min-height: 54px;
  padding: 14px 16px;
  font-size: 17px;
  line-height: 1.2;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.answer-box.feedback-correct {
  border-color: rgba(94, 234, 212, 0.55);
  box-shadow: 0 0 0 2px rgba(94, 234, 212, 0.14), 0 10px 22px rgba(14, 116, 144, 0.12);
  animation: answerCorrectPulse 460ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.answer-box.feedback-wrong {
  border-color: rgba(255, 107, 107, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.13);
  animation: answerWrongShake 360ms ease-out;
}

input.answer-box::placeholder {
  color: rgba(226, 235, 247, 0.7);
  font-weight: 600;
}

.keyboard {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2dvh, 10px);
  margin-top: 0;
  position: relative;
  z-index: 4;
  background: transparent;
  padding-top: clamp(6px, 1.4dvh, 12px);
  min-height: clamp(132px, 24dvh, 200px);
  padding-bottom: calc(4px + min(var(--app-control-safe-bottom), 10px));
}

.game-shell-match .keyboard {
  min-height: 0;
  gap: clamp(4px, 0.8dvh, 8px);
  padding-top: clamp(2px, 0.6dvh, 6px);
  padding-bottom: calc(2px + min(var(--app-control-safe-bottom), 6px));
}

.game-shell-match .game-answer-box {
  margin-bottom: clamp(4px, 1dvh, 10px);
}

.game-shell-match .round-submit-controls {
  margin-top: 0;
  padding-top: clamp(0px, 0.25dvh, 4px);
  padding-bottom: 0;
}

.round-tools-row {
  width: min(100%, 560px);
  align-self: center;
}

.round-inline-emotes {
  width: min(100%, 560px);
  align-self: center;
  display: grid;
  gap: 4px;
  margin-top: 0;
  margin-bottom: 0;
}

.round-inline-emotes-overlay {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  width: min(100%, 560px);
  z-index: 6;
  pointer-events: none;
}

.round-inline-emote-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 24px;
  padding: 0 4px;
  color: rgba(244, 247, 252, 0.95);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65);
}

.round-inline-emote-user {
  max-width: min(58vw, 260px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.round-inline-emote-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
}

.admin-alchemy-picker-label {
  font-size: 13px;
  color: var(--text-0);
  margin: 6px 0 4px;
}

.admin-alchemy-select {
  position: relative;
  display: grid;
  gap: 6px;
}

.admin-alchemy-select-trigger {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-0);
  text-align: left;
}

.admin-alchemy-select-main {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-alchemy-select-placeholder {
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: rgba(245, 247, 251, 0.82);
  font-weight: 700;
}

.admin-alchemy-select-caret {
  color: rgba(245, 247, 251, 0.78);
  font-size: 11px;
}

.admin-alchemy-select-menu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 8px;
  max-height: min(36dvh, 260px);
  overflow-y: auto;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(14, 22, 34, 0.96);
}

.admin-alchemy-select-option {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 0;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-0);
  text-align: center;
  min-height: 58px;
}

.admin-alchemy-select-option.selected {
  border-color: rgba(255, 209, 102, 0.62);
  background: rgba(255, 179, 71, 0.16);
}

.admin-alchemy-picker-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.admin-alchemy-picker-item {
  flex: 0 0 auto;
  padding: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  cursor: pointer;
}

.admin-alchemy-picker-item.selected {
  border-color: var(--accent-1);
  background: rgba(255, 179, 71, 0.15);
}

.admin-alchemy-picker-placeholder {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 247, 251, 0.88);
  font-weight: 700;
}

.keyboard-row {
  display: grid;
  gap: 6px;
}

.keyboard-row.controls {
  grid-template-columns: 1fr;
}

.keyboard-row.controls.controls-with-emoji {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
}

.round-submit-controls {
  width: min(100%, 560px);
  align-self: center;
  margin-top: 8px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.round-submit-controls .round-submit-main {
  min-width: 0;
  margin-top: 0;
}

.round-submit-controls .round-emoji-key {
  width: clamp(40px, 5.6dvh, 52px);
  min-width: clamp(40px, 5.6dvh, 52px);
}

.sequence-list {
  display: grid;
  gap: 8px;
}

.sequence-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform;
  transition: transform 0.18s ease-out, box-shadow 0.15s ease, border-color 0.15s ease;
}

.sequence-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sequence-main>span:first-child {
  overflow-wrap: anywhere;
}

.sequence-actions {
  display: flex;
  gap: 6px;
}

.sequence-actions .secondary-button {
  width: 36px;
  padding: 6px 0;
  font-size: 12px;
}

.sequence-hint {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
}

.sequence-row.dragging {
  border-color: rgba(255, 209, 102, 0.7);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  transform: scale(1.01);
  cursor: grabbing;
}

.sequence-row.locked {
  cursor: default;
}

.spam-popup-layer {
  position: absolute;
  inset: 0;
  z-index: 18;
  pointer-events: none;
}

.spam-popup {
  position: absolute;
  min-width: 180px;
  max-width: min(92vw, 360px);
  min-height: 120px;
  padding: 10px 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(23, 34, 56, 0.96), rgba(13, 21, 36, 0.94));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  pointer-events: auto;
  overflow: hidden;
}

.spam-popup.spam-popup-keyboard {
  border-color: rgba(255, 193, 103, 0.34);
}

.spam-popup.spam-popup-field {
  border-color: rgba(120, 226, 255, 0.28);
}

.spam-popup-head {
  font-family: var(--font-display);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.spam-popup-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.06);
}

.spam-popup-note {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.86);
}

.spam-popup-close {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(10, 16, 26, 0.82);
  color: rgba(255, 255, 255, 0.96);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.spam-popup-close:disabled {
  cursor: default;
  opacity: 0.72;
}

.spam-popup-close.corner-top-left {
  top: 8px;
  left: 8px;
}

.spam-popup-close.corner-top-right {
  top: 8px;
  right: 8px;
}

.spam-popup-close.corner-bottom-left {
  bottom: 8px;
  left: 8px;
}

.spam-popup-close.corner-bottom-right {
  bottom: 8px;
  right: 8px;
}

.key {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: clamp(8px, 1.5dvh, 12px) 0;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-0);
  cursor: pointer;
  min-height: clamp(34px, 5.2dvh, 46px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: transform 0.04s ease, background 0.08s ease;
}

@media (max-height: 740px) {
  .app {
    padding-top: calc(8px + var(--app-safe-top) + var(--telegram-host-clearance));
  }

  .app.telegram-host {
    --telegram-host-clearance: clamp(16px, 3.2dvh, 24px);
  }

  .topbar {
    padding-bottom: 6px;
  }

  .app.telegram-host .topbar {
    padding-top: clamp(2px, 0.6dvh, 6px);
  }

  .content {
    gap: 10px;
  }

  .game-shell {
    gap: 8px;
  }

  .keyboard {
    min-height: clamp(132px, 24dvh, 200px);
    padding-bottom: calc(6px + min(var(--app-control-safe-bottom), 12px));
  }

  .game-shell-match .keyboard {
    min-height: 0;
    padding-bottom: calc(2px + min(var(--app-control-safe-bottom), 8px));
  }

  .keyboard-row {
    gap: 4px;
  }

  .key {
    font-size: 15px;
    min-height: clamp(30px, 4.5dvh, 40px);
  }
}

.key:active {
  transform: translateY(1px);
  background: rgba(255, 255, 255, 0.12);
}

.key.emoji-key {
  width: clamp(40px, 5.6dvh, 52px);
  min-width: clamp(40px, 5.6dvh, 52px);
  min-height: clamp(34px, 5.2dvh, 46px);
  padding: 0;
  font-size: clamp(20px, 3.2dvh, 26px);
  line-height: 1;
  display: grid;
  place-items: center;
}

.key.accent {
  background: rgba(94, 234, 212, 0.2);
  border-color: rgba(94, 234, 212, 0.4);
  color: var(--accent-3);
  font-weight: 700;
}

.fade-up {
  animation: fadeUp 0.6s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.matchmaking {
  border: 1px solid rgba(255, 179, 71, 0.4);
  background: linear-gradient(120deg, rgba(255, 179, 71, 0.15), rgba(255, 107, 107, 0.1));
}

.wheel-card,
.vote-card {
  margin-top: 12px;
  animation: panelFloatIn 240ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.app.telegram-host.viewport-compact .wheel-card,
.app.telegram-host.viewport-compact .vote-card {
  margin-top: 4px;
}

.vote-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: min(74dvh, 720px);
  max-height: min(82dvh, 780px);
  overflow: hidden;
}

.wheel-wrap {
  position: relative;
  width: min(100%, 720px);
  height: clamp(300px, 49dvh, 430px);
  margin: 10px auto 12px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 78% 50%, rgba(17, 25, 45, 0.46) 0%, rgba(9, 15, 27, 0.88) 58%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  transform: translateZ(0);
}

.app.telegram-host.viewport-compact .wheel-wrap {
  height: clamp(252px, 42dvh, 340px);
  margin: 4px auto 8px;
}

.wheel {
  position: absolute;
  left: 108%;
  top: 50%;
  width: clamp(560px, 148vw, 860px);
  height: clamp(560px, 148vw, 860px);
  border-radius: 50%;
  border: 10px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 0 30px rgba(0, 0, 0, 0.35),
    0 20px 48px rgba(0, 0, 0, 0.38);
  background-clip: padding-box;
  backface-visibility: hidden;
  will-change: transform;
}

.wheel-svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  transform: translateZ(0);
  backface-visibility: hidden;
  shape-rendering: geometricPrecision;
  overflow: visible;
}

.wheel-segment {
  vector-effect: non-scaling-stroke;
}

.wheel-icon-back {
  fill: rgba(9, 13, 24, 0.72);
}

.wheel-icon-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.42);
  stroke-width: 0.48;
}

.wheel-icon-emoji {
  font-size: 4.6px;
  font-weight: 700;
  fill: rgba(255, 255, 255, 0.95);
}

.wheel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.wheel.spinning {
  will-change: transform;
}

.wheel-pointer {
  position: absolute;
  top: 50%;
  left: clamp(34px, 18vw, 122px);
  width: 44px;
  height: 32px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.32));
  animation: wheelPointerPulse 1.2s ease-in-out infinite;
  z-index: 8;
}

.wheel-pointer::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff6d98 0%, #ff1e64 62%, #c60a48 100%);
  transform: translateY(-50%);
  box-shadow:
    0 0 0 2px rgba(255, 30, 100, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.wheel-pointer::after {
  content: '';
  position: absolute;
  left: 20px;
  top: 50%;
  width: 20px;
  height: 18px;
  background: #ff1e64;
  transform: translateY(-50%);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.game-shell-results>.leader-row {
  animation: resultRowIn 240ms ease-out both;
}

.game-shell-results>.leader-row:nth-of-type(2) {
  animation-delay: 40ms;
}

.game-shell-results>.leader-row:nth-of-type(3) {
  animation-delay: 80ms;
}

.game-shell-results>.leader-row:nth-of-type(4) {
  animation-delay: 120ms;
}

.game-shell-results .result-actions {
  animation: resultActionsIn 260ms ease-out both;
}

.game-shell.blurred {
  filter: blur(4px);
}

.vote-target-list {
  display: grid;
  gap: 7px;
  margin: 8px 0 10px;
  width: min(100%, 560px);
  align-self: center;
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  grid-auto-rows: minmax(56px, auto);
  overflow-y: auto;
  padding-right: 2px;
}

.vote-hint-text {
  margin-top: -2px;
  text-align: center;
}

.vote-my-points {
  color: rgba(255, 216, 151, 0.95);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.vote-actions {
  display: grid;
  grid-template-columns: 34px repeat(2, minmax(0, 1fr));
  gap: 5px;
  align-items: center;
  width: 118px;
}

.vote-target-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 48px;
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  min-height: 56px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.vote-target-row.active {
  border-color: rgba(255, 179, 71, 0.55);
  background: rgba(255, 179, 71, 0.12);
  box-shadow: 0 8px 22px rgba(255, 179, 71, 0.16);
}

.vote-target-row.self {
  border-color: rgba(94, 234, 212, 0.72);
  background: rgba(94, 234, 212, 0.12);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.22);
}

.vote-self-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.08);
  margin-top: 6px;
}

.vote-target-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vote-target-rank {
  font-family: var(--font-display);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.64);
  font-variant-numeric: tabular-nums;
}

.vote-target-you {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, 0.62);
  background: rgba(94, 234, 212, 0.2);
  color: #bff5eb;
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.vote-target-score-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 3px;
  line-height: 1;
}

.vote-target-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.1px;
}

.vote-target-score-before {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.64);
  font-variant-numeric: tabular-nums;
}

.vote-target-score-arrow {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.vote-target-score {
  min-width: 28px;
  text-align: right;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-1);
}

.vote-target-score.changed {
  color: #ffd897;
}

.vote-target-score-delta {
  font-size: 10px;
  color: rgba(255, 216, 151, 0.82);
  font-variant-numeric: tabular-nums;
}

.vote-transfer-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-display);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.78);
}

.vote-transfer-count.active {
  border-color: rgba(255, 179, 71, 0.62);
  background: rgba(255, 179, 71, 0.14);
  color: #ffd897;
}

.vote-bonus-slot {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.vote-bonus-slot.filled {
  border-color: rgba(255, 179, 71, 0.58);
  background: rgba(255, 179, 71, 0.14);
}

.vote-bonus-slot.with-image {
  background-color: rgba(255, 179, 71, 0.14);
}

.vote-bonus-slot.drop-target {
  border-color: rgba(94, 234, 212, 0.88);
  background: rgba(94, 234, 212, 0.2);
  box-shadow: 0 0 0 2px rgba(94, 234, 212, 0.28);
}

.vote-bonus-slot-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  pointer-events: none;
  display: block;
}

.vote-bonus-slot-empty {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.72);
}

.vote-bonus-slot-text {
  font-size: 10px;
  line-height: 1.1;
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.vote-portfolio-title {
  margin-top: auto;
  margin-bottom: 2px;
  color: rgba(255, 233, 190, 0.95);
  text-align: center;
}

.vote-wheel-hint {
  margin-top: 2px;
}

.vote-portfolio-area {
  width: min(100%, 560px);
  align-self: center;
  flex: 0 0 auto;
  min-height: 56px;
}

.vote-transfer-btn {
  min-width: 38px;
  height: 34px;
  padding: 0;
  font-size: 17px;
  border-radius: 10px;
  line-height: 1;
  font-weight: 800;
}

.vote-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(60px, 1fr));
  grid-auto-rows: auto;
  gap: 10px;
  margin: 7px 0 10px;
  align-items: stretch;
  width: min(100%, 560px);
  align-self: center;
}

.vote-portfolio-item {
  position: relative;
  min-height: 0;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
  display: grid;
  place-items: center;
  padding: 3px;
  touch-action: none;
}

.vote-portfolio-item.selected {
  border-color: rgba(255, 179, 71, 0.85);
  box-shadow: 0 0 0 2px rgba(255, 179, 71, 0.22);
}

.vote-portfolio-item.assigned {
  border-color: rgba(94, 234, 212, 0.6);
}

.vote-portfolio-icon {
  width: 100%;
  height: 100%;
  max-width: 76px;
  max-height: 76px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border-width: 1px;
  pointer-events: none;
  background-size: cover;
}

.vote-bonus-slot-placeholder {
  visibility: hidden;
  pointer-events: none;
  border-color: transparent;
  background: transparent;
}

.vote-drag-ghost {
  position: fixed;
  z-index: 180;
  width: 66px;
  height: 66px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(8, 14, 24, 0.88);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
}

.vote-drag-ghost-image {
  width: 58px;
  height: 58px;
  border-radius: 11px;
  border-width: 1px;
}

.vote-drag-ghost-text {
  padding: 0 6px;
  text-align: center;
  line-height: 1.15;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.92);
}

.vote-portfolio-fallback {
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.vote-portfolio-count {
  position: absolute;
  top: 4px;
  right: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  background: rgba(10, 18, 32, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.vote-portfolio-temp {
  position: absolute;
  left: 5px;
  right: 5px;
  top: -14px;
  font-size: 8px;
  line-height: 1.1;
  color: #ffd897;
  text-align: center;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}

.vote-portfolio-assigned {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  font-size: 9px;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.78);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vote-bonus-popover {
  z-index: 150;
  width: min(300px, calc(100vw - 26px));
  max-width: calc(100vw - 26px);
}

.vote-error {
  color: #ff9ea9;
}

.final-choice-ranking {
  max-height: min(34dvh, 280px);
}

.final-choice-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 560px);
  align-self: center;
}

.final-choice-actions .primary-button,
.final-choice-actions .secondary-button {
  min-height: 48px;
  background: linear-gradient(180deg, rgba(54, 65, 84, 0.92), rgba(31, 38, 53, 0.96));
  color: rgba(244, 247, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.final-choice-actions .primary-button.active,
.final-choice-actions .secondary-button.active {
  background: linear-gradient(180deg, #ffc96e 0%, #ffad3a 55%, #f08d16 100%);
  color: #1c1306;
  border-color: rgba(255, 201, 110, 0.9);
  box-shadow:
    0 0 0 2px rgba(255, 179, 71, 0.28),
    0 14px 32px rgba(240, 141, 22, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.final-choice-actions .primary-button:disabled,
.final-choice-actions .secondary-button:disabled {
  opacity: 0.58;
}

@media (max-width: 480px) {
  .vote-card {
    min-height: min(72dvh, 640px);
    max-height: min(82dvh, 700px);
    padding: 12px;
    gap: 6px;
  }

  .vote-target-row {
    grid-template-columns: minmax(0, 1fr) auto 44px;
    gap: 6px;
    padding: 7px 8px;
    min-height: 50px;
  }

  .vote-target-row.self {
    grid-template-columns: minmax(0, 1fr) auto 44px;
  }

  .vote-target-name {
    font-size: 14px;
  }

  .vote-target-score {
    font-size: 16px;
  }

  .vote-target-list {
    gap: 6px;
    margin: 6px 0 8px;
    width: 100%;
  }

  .final-choice-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .vote-bonus-slot {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .vote-bonus-slot-image {
    width: 100%;
    height: 100%;
  }

  .vote-portfolio-grid {
    grid-template-columns: repeat(4, minmax(56px, 1fr));
    grid-auto-rows: auto;
    gap: 8px;
    margin: 4px 0 8px;
  }

  .vote-portfolio-item {
    min-height: 0;
  }

  .vote-portfolio-icon {
    max-width: 70px;
    max-height: 70px;
  }

  .vote-portfolio-title {
    font-size: 12px;
    margin-top: 4px;
  }
}

@media (max-height: 760px) {
  .vote-card {
    min-height: min(70dvh, 600px);
    max-height: min(84dvh, 650px);
    gap: 6px;
  }

  .vote-target-list {
    margin: 4px 0 6px;
  }

  .vote-target-row {
    padding: 7px 8px;
  }

  .vote-target-name {
    font-size: 14px;
  }

  .vote-target-score {
    font-size: 16px;
  }

  .vote-portfolio-grid {
    gap: 8px;
    margin: 4px 0 8px;
  }

  .vote-portfolio-icon {
    max-width: 68px;
    max-height: 68px;
  }
}

@media (max-height: 690px) {
  .vote-card {
    min-height: min(68dvh, 560px);
    max-height: min(84dvh, 600px);
    padding: 10px;
  }

  .vote-target-list {
    gap: 5px;
  }

  .vote-target-row {
    padding: 6px 7px;
    min-height: 46px;
  }

  .vote-target-rank {
    font-size: 13px;
  }

  .vote-target-name {
    font-size: 13px;
  }

  .vote-target-score {
    font-size: 15px;
  }

  .vote-bonus-slot {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }

  .vote-bonus-slot-image {
    width: 100%;
    height: 100%;
  }

  .vote-portfolio-grid {
    grid-template-columns: repeat(4, minmax(52px, 1fr));
    gap: 7px;
  }

  .vote-portfolio-icon {
    max-width: 62px;
    max-height: 62px;
  }
}

@media (max-width: 420px) and (max-height: 920px) {
  .vote-card {
    min-height: min(68dvh, 560px);
    max-height: min(82dvh, 620px);
    padding: 10px;
  }

  .vote-target-list {
    max-height: min(40dvh, 320px);
  }

  .vote-target-row {
    gap: 5px;
  }

  .vote-portfolio-grid {
    grid-template-columns: repeat(4, minmax(54px, 1fr));
    gap: 7px;
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 15, 0.7);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 100;
}

.modal-overlay.action-dialog-overlay {
  z-index: 160;
}

.wheel-reward-overlay {
  z-index: 155;
}

.modal-overlay.action-dialog-overlay .modal {
  animation: actionDialogIn 210ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.modal-overlay.modal-overlay-fullscreen {
  place-items: stretch;
}

.modal {
  width: min(92vw, 360px);
  background: rgba(18, 26, 40, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
  position: relative;
}

.modal.modal-fullscreen {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-height: 100dvh;
  margin: 0;
  border-radius: 0;
  /* Telegram Web adds its own header; keep content clear of it. */
  padding: calc(clamp(56px, 10dvh, 86px) + env(safe-area-inset-top)) 14px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.modal.modal-fullscreen.modal-fullscreen-round {
  overflow: hidden;
}

.offline-round-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
}

.offline-round-scroll {
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.offline-round-footer {
  display: grid;
  gap: 6px;
  width: min(560px, 100%);
  justify-self: center;
  align-content: end;
  padding-bottom: calc(4px + min(var(--app-control-safe-bottom), 10px));
}

.legal-modal-overlay {
  place-items: start center;
  padding: calc(clamp(84px, 15dvh, 132px) + env(safe-area-inset-top)) 12px calc(clamp(64px, 12dvh, 104px) + env(safe-area-inset-bottom));
}

.modal.legal-modal {
  width: min(88vw, 460px);
  max-width: 100%;
  max-height: min(70dvh, 720px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.legal-modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
  background:
    linear-gradient(180deg, rgba(18, 26, 40, 0.99) 0%, rgba(18, 26, 40, 0.97) 78%, rgba(18, 26, 40, 0.92) 100%);
}

.legal-modal-close {
  position: static;
  flex: 0 0 auto;
}

.legal-modal-title {
  min-width: 0;
  margin: 0;
}

.alchemy-modal {
  overflow: hidden;
}

.alchemy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.alchemy-progress {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-0);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.alchemy-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  padding: 6px 0;
}

.alchemy-emote-button {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  cursor: pointer;
}

.alchemy-emote-button.selected {
  border-color: rgba(255, 179, 71, 0.72);
  box-shadow: 0 0 0 2px rgba(255, 179, 71, 0.25);
}

.alchemy-emote-image {
  width: 100%;
  height: 100%;
  border-radius: 9px;
  background-size: contain;
}

.alchemy-combine-panel {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.alchemy-slots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.alchemy-slot {
  width: min(22vw, 84px);
  height: min(22vw, 84px);
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
}

.alchemy-slot.filled {
  border-style: solid;
  border-color: rgba(255, 179, 71, 0.55);
}

.alchemy-slot-image {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background-size: contain;
}

.alchemy-slot-placeholder {
  font-size: 22px;
  line-height: 1;
}

.alchemy-slot-plus {
  font-size: 22px;
  color: rgba(255, 255, 255, 0.72);
}

.alchemy-result-modal {
  width: min(92vw, 320px);
  text-align: center;
  display: grid;
  gap: 12px;
}

.alchemy-result-image {
  width: min(50vw, 180px);
  height: min(50vw, 180px);
  margin: 0 auto;
  border-radius: 12px;
  background-size: contain;
}

@media (max-height: 700px) {
  .app.telegram-host {
    --telegram-host-clearance: clamp(14px, 2.8dvh, 20px);
  }

  .modal.modal-fullscreen {
    padding-top: calc(clamp(42px, 8dvh, 64px) + env(safe-area-inset-top));
    gap: 6px;
  }

  .legal-modal-overlay {
    padding-top: calc(clamp(18px, 2.4dvh, 24px) + env(safe-area-inset-top));
  }

  .practice-header {
    padding: 6px 0;
  }

  .practice-hearts {
    font-size: 20px;
    gap: 6px;
  }

  .answer-box {
    padding: 10px;
    font-size: 14px;
  }

  .game-answer-box {
    min-height: 50px;
    padding: 12px 14px;
    font-size: 15px;
  }
}

.offline-success-modal {
  width: min(92vw, 360px);
  text-align: center;
  display: grid;
  gap: 14px;
  animation: successModalPop 240ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.reward-modal-overlay {
  z-index: 140;
}

.achievement-reward-modal {
  width: min(92vw, 340px);
  text-align: center;
  display: grid;
  gap: 12px;
  overflow: hidden;
  animation: rewardModalIn 260ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.achievement-reward-image {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  margin: 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.18);
}

.achievement-reward-emoji {
  font-size: 64px;
  line-height: 1;
}

.achievement-reward-title {
  color: var(--text-0);
  font-weight: 700;
}

.achievement-info-modal {
  width: 100%;
  height: 100%;
  text-align: center;
  display: grid;
  align-content: start;
  gap: 12px;
  background: rgba(14, 22, 34, 0.98);
}

.achievement-info-modal .image-touch-wrap-reward {
  width: min(100%, 520px);
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.achievement-info-image {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  margin: 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

.achievement-info-emoji {
  font-size: clamp(72px, 18vw, 132px);
  line-height: 1;
}

.achievement-info-comment {
  max-width: 560px;
  margin: 0 auto;
  font-size: 14px;
  color: var(--text-0);
}

.achievement-info-date {
  font-size: 13px;
  color: var(--muted);
}

.achievement-fireworks {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 22px;
}

.achievement-fireworks span {
  animation: reward-pop 1.2s ease-in-out infinite;
}

.achievement-fireworks span:nth-child(2n) {
  animation-delay: 0.2s;
}

.achievement-fireworks span:nth-child(3n) {
  animation-delay: 0.4s;
}

@keyframes reward-pop {

  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.8;
  }

  50% {
    transform: translateY(-5px) scale(1.12);
    opacity: 1;
  }
}

.practice-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  background: rgba(18, 26, 40, 0.92);
  backdrop-filter: blur(6px);
}

.practice-back {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-0);
  border-radius: 999px;
  padding: 8px 10px;
  font-family: var(--font-display);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.practice-hearts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 24px;
  line-height: 1;
}

.practice-lives-cluster {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  cursor: pointer;
}

.practice-hearts .heart.full {
  color: rgba(255, 102, 102, 1);
  text-shadow: 0 6px 16px rgba(255, 102, 102, 0.25);
}

.practice-hearts .heart.empty {
  color: rgba(255, 255, 255, 0.25);
}

.practice-lives-timer {
  font-size: 12px;
  opacity: 0.85;
  text-align: center;
  min-width: 74px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.offline-lives-timer {
  font-size: 12px;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.92);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.practice-hints {
  all: unset;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 7px 12px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-0);
  cursor: pointer;
}

.practice-hints:disabled {
  opacity: 0.72;
  cursor: default;
}

.practice-hints:active {
  transform: translateY(1px);
}

.sequence-row.hint-ok {
  outline: 2px solid rgba(94, 234, 212, 0.75);
  outline-offset: -1px;
}

.practice-hints .hint-count {
  font-weight: 700;
  font-size: 14px;
}

.practice-hints .hint-mark {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: rgba(255, 179, 71, 0.18);
  border: 1px solid rgba(255, 179, 71, 0.35);
  color: var(--accent-1);
  font-weight: 900;
}

.practice-header-popover {
  z-index: 130;
}

.secondary-button.danger {
  border-color: rgba(255, 102, 102, 0.35);
  color: rgba(255, 204, 204, 1);
}

.admin-file {
  width: 100%;
}

.modal-close {
  font-family: var(--font-display);
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-0);
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 0;
  padding: 0;
}

.orientation-lock {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  text-align: center;
  padding: 24px;
  background: rgba(5, 8, 12, 0.95);
  color: var(--text-0);
}

.orientation-lock.active {
  display: grid;
}

.orientation-lock .hint {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 8px;
}

.rules,
.task-desc,
.shop-item span,
.reveal-answers,
.muted,
.answer-box,
.sequence-hint,
.admin-textarea,
.admin-input,
.select,
.admin-player-controls label,
.spam-popup-note {
  font-family: var(--font-body);
}

.tap-debug-panel {
  position: fixed;
  right: 10px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  width: min(94vw, 420px);
  max-height: min(72vh, 560px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(120, 226, 255, 0.35);
  background: rgba(4, 10, 23, 0.92);
  backdrop-filter: blur(10px);
  z-index: 2100;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.96);
  pointer-events: auto;
}

.tap-debug-panel.collapsed {
  width: auto;
  max-width: min(94vw, 420px);
  max-height: none;
}

.tap-debug-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand-debug-trigger {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  text-align: left;
  cursor: default;
}

.tap-debug-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(123, 240, 255, 0.95);
}

.tap-debug-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tap-debug-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}

.tap-debug-meta {
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.82);
}

.tap-debug-meta code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  color: rgba(180, 255, 255, 0.96);
  word-break: break-all;
}

.tap-debug-list {
  min-height: 48px;
  max-height: min(24vh, 180px);
  overflow: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 6px;
}

.tap-debug-line,
.tap-debug-empty {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.9);
  white-space: pre-wrap;
  word-break: break-word;
}

.tap-debug-line+.tap-debug-line {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.tap-debug-empty {
  color: rgba(255, 255, 255, 0.65);
}

.tap-debug-block {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  padding: 6px;
  display: grid;
  gap: 4px;
}

.tap-debug-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tap-debug-block-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(143, 244, 255, 0.95);
}

.tap-debug-kv {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.9);
  word-break: break-word;
}

.tap-debug-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.tap-debug-inline-filters {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tap-debug-select {
  max-width: 130px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.95);
  font-size: 10px;
  padding: 3px 6px;
}

.tap-debug-check {
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.82);
}

.tap-debug-line-warn {
  color: rgba(255, 210, 128, 0.98);
}

.tap-debug-group {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.74);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tap-debug-advanced {
  margin-top: 4px;
}

.tap-debug-advanced > summary {
  cursor: pointer;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.84);
  margin-bottom: 4px;
}

.tap-debug-export-priority {
  border-color: rgba(255, 220, 138, 0.32);
  background: rgba(255, 190, 90, 0.08);
}

.tap-debug-actions-grid-export .tap-debug-btn-export {
  font-weight: 600;
  min-height: 30px;
}

.tap-debug-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tap-debug-mode-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.02em;
}

.tap-debug-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.tap-debug-badge-test {
  background: rgba(255, 189, 89, 0.2);
  color: rgba(255, 223, 166, 0.98);
  border: 1px solid rgba(255, 189, 89, 0.45);
}

.tap-debug-badge-prod {
  background: rgba(101, 217, 255, 0.16);
  color: rgba(175, 240, 255, 0.98);
  border: 1px solid rgba(101, 217, 255, 0.42);
}

@media (max-width: 520px) {
  .tap-debug-actions-grid-export {
    grid-template-columns: 1fr;
  }
}
