    :root {
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      --text-base: clamp(14px, 1.4vw, 16px);
      --text-small: clamp(12px, 1.1vw, 14px);
      --heading-size: clamp(20px, 2.2vw, 26px);
      --heading-sub: clamp(16px, 1.7vw, 20px);
      font-size: var(--text-base);
      color-scheme: dark;
    }

    :root.pref-large-text {
      --text-base: clamp(17px, 2vw, 20px);
      --text-small: clamp(15px, 1.8vw, 18px);
      --heading-size: clamp(24px, 2.6vw, 32px);
      --heading-sub: clamp(20px, 2.2vw, 26px);
      font-size: var(--text-base);
    }

    body {
      margin: 0;
      padding: 0;
      background: radial-gradient(circle at top, #1e293b, #020617);
      color: #f9fafb;
      min-height: 100vh;
      font-size: 1rem;
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      -webkit-text-size-adjust: 100%;
      text-size-adjust: 100%;
      touch-action: manipulation;
      scroll-behavior: smooth;
      width: 100%;
      box-sizing: border-box;
    }

    body.modal-open {
      overflow: hidden;
    }

    .pref-high-contrast body {
      background: #000;
      color: #fff;
    }

    .pref-high-contrast .card {
      background: #0f172a;
      border-color: #fef08a;
      box-shadow: 0 0 0 2px rgba(254, 240, 138, 0.4);
    }

    .pref-high-contrast .btn-slim,
    .pref-high-contrast .btn-god-mode,
    .pref-high-contrast .btn-prestige {
      border-color: #fef08a;
      color: #fef08a;
    }

    .pref-high-contrast .btn-prestige {
      background: linear-gradient(135deg, #fde047, #f97316);
      color: #1f2937;
    }

    .pref-high-contrast .tag {
      border-color: #fef08a;
      color: #fef08a;
    }

    .pref-reduce-motion *,
    .pref-reduce-motion *::before,
    .pref-reduce-motion *::after {
      animation: none !important;
      transition: none !important;
    }

    *,
    *::before,
    *::after {
      -webkit-tap-highlight-color: transparent;
      box-sizing: border-box;
    }

    button,
    select,
    input,
    textarea {
      font: inherit;
      color: inherit;
      touch-action: manipulation;
    }

    .skip-link {
      position: absolute;
      left: -999px;
      top: -999px;
      background: #38bdf8;
      color: #0f172a;
      padding: 8px 12px;
      border-radius: 8px;
      z-index: 999;
      font-weight: 600;
    }

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      margin: -1px;
      padding: 0;
      overflow: hidden;
      clip: rect(0 0 0 0);
      white-space: nowrap;
      border: 0;
    }

    .skip-link:focus {
      left: 12px;
      top: 12px;
    }

.app-header {
      position: sticky;
      top: 0;
      width: 100%;
      z-index: 10;
      background: rgba(2, 6, 23, 0.9);
      border-bottom: 1px solid rgba(148, 163, 184, 0.2);
      backdrop-filter: blur(8px);
      padding: clamp(8px, 2vw, 14px) clamp(12px, 4vw, 24px);
      box-sizing: border-box;
    }

    .event-banner {
      width: min(100%, 1200px);
      margin: 12px auto 0;
      padding: 12px 16px;
      display: flex;
      align-items: center;
      gap: 12px;
      border-radius: 12px;
      border: 1px solid rgba(148, 163, 184, 0.25);
      background: rgba(15, 23, 42, 0.95);
      box-shadow: 0 10px 30px rgba(15, 23, 42, 0.7);
      transition: transform 260ms ease, opacity 260ms ease;
      opacity: 0;
      transform: translateY(-12px);
      color: #f8fafc;
    }

    .event-banner.banner-visible {
      opacity: 1;
      transform: translateY(0);
    }

    .event-banner.hidden {
      display: none;
    }

    .event-banner-icon {
      font-size: 20px;
      line-height: 1;
    }

    .event-banner-body {
      flex: 1;
      font-size: var(--text-base);
      line-height: 1.4;
    }

    .event-banner-close {
      border: none;
      background: rgba(255, 255, 255, 0.08);
      color: inherit;
      width: 28px;
      height: 28px;
      border-radius: 999px;
      display: grid;
      place-items: center;
      cursor: pointer;
    }

    .event-banner-close:hover {
      background: rgba(255, 255, 255, 0.15);
    }

    .banner-positive {
      border-color: rgba(34, 197, 94, 0.5);
      box-shadow: 0 16px 30px rgba(34, 197, 94, 0.2);
    }

    .banner-mixed {
      border-color: rgba(251, 191, 36, 0.45);
      box-shadow: 0 16px 30px rgba(251, 191, 36, 0.2);
    }

    .banner-negative {
      border-color: rgba(248, 113, 113, 0.45);
      box-shadow: 0 16px 30px rgba(248, 113, 113, 0.2);
    }

    .header-inner {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .header-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .header-actions .lang-select {
      min-width: 72px;
    }

    .header-title {
      font-size: var(--heading-size);
      font-weight: 700;
    }

    .header-tagline {
      font-size: var(--heading-sub);
      color: #94a3b8;
    }

    @supports (padding: max(0px)) {
      body {
        padding-top: max(0px, env(safe-area-inset-top));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
      }
      .app-header {
        padding-top: max(8px, env(safe-area-inset-top));
      }
    }

    .app {
      width: min(100%, 1200px);
      margin: 16px auto 32px;
      padding: 0 clamp(12px, 4vw, 24px);
      display: grid;
      grid-template-columns: 1.2fr 1.3fr 1.1fr;
      gap: clamp(12px, 3vw, 20px);
    }

    .card {
      background: rgba(15, 23, 42, 0.95);
      border-radius: 12px;
      padding: 12px 14px;
      box-shadow: 0 10px 30px rgba(15, 23, 42, 0.7);
      border: 1px solid rgba(148, 163, 184, 0.25);
      backdrop-filter: blur(10px);
    }

    h1, h2, h3 {
      margin: 4px 0 8px 0;
      font-weight: 600;
      font-size: var(--heading-size);
    }
    h1, h2 {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    h2 {
      border-bottom: 1px solid rgba(148, 163, 184, 0.2);
      padding-bottom: 4px;
      margin-bottom: 6px;
    }

    .subtitle {
      font-size: var(--heading-sub);
      color: #9ca3af;
      line-height: 1.3;
    }

    .lang-select {
      background: rgba(15, 23, 42, 0.85);
      border: 1px solid rgba(148, 163, 184, 0.4);
      border-radius: 8px;
      color: #f9fafb;
      padding: 4px 8px;
      font-size: var(--text-base);
      min-width: 72px;
    }

    .stats-main {
      display: grid;
      grid-template-columns: 1fr;
      gap: 8px;
      margin-top: 8px;
    }

    .stat-line {
      display: flex;
      justify-content: space-between;
      font-size: var(--text-base);
    }

    .stat-label {
      color: #e5e7eb;
    }

    .stat-value {
      font-variant-numeric: tabular-nums;
      font-weight: 600;
      font-size: var(--text-base);
    }

    .big-number {
      font-weight: 700;
    }

.click-button {
      width: 100%;
      margin-top: 10px;
      padding: 10px;
      border-radius: 999px;
      border: none;
      background: linear-gradient(135deg, #38bdf8, #6366f1);
      color: white;
      font-size: var(--text-base);
      font-weight: 600;
      cursor: pointer;
      box-shadow: 0 10px 25px rgba(56, 189, 248, 0.35);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: transform 0.05s ease, box-shadow 0.05s ease, opacity 0.1s ease;
      position: relative;
      overflow: hidden;
    }

    .click-button:active,
    .click-button:focus-visible {
      transform: translateY(1px) scale(0.99);
      box-shadow: 0 5px 15px rgba(56, 189, 248, 0.25);
      opacity: 0.95;
      outline: 2px solid #f97316;
      outline-offset: 3px;
    }

    .click-button.pulse::after {
      content: "";
      position: absolute;
      left: 50%;
      top: 50%;
      width: 10px;
      height: 10px;
      background: rgba(255, 255, 255, 0.6);
      border-radius: 50%;
      transform: translate(-50%, -50%) scale(1);
      animation: ripple 0.4s ease-out forwards;
      pointer-events: none;
    }

    @keyframes ripple {
      from {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1);
      }
      to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(16);
      }
    }

    .gauges {
      margin-top: 10px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      font-size: var(--text-base);
    }

    .gauge {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .gauge-label-row {
      display: flex;
      justify-content: space-between;
    }

    .gauge-bar {
      position: relative;
      width: 100%;
      height: 6px;
      border-radius: 999px;
      background: #020617;
      overflow: hidden;
      border: 1px solid rgba(148, 163, 184, 0.5);
    }

    .gauge-fill {
      position: absolute;
      height: 100%;
      left: 0;
      top: 0;
      border-radius: 999px;
      background: linear-gradient(90deg, #22c55e, #a3e635);
      width: 0;
      transition: width 0.15s linear;
    }

    .gauge-fill.bad {
      background: linear-gradient(90deg, #ef4444, #f97316);
    }

    .layout-column {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .buildings-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
      max-height: calc(100vh - 160px);
      overflow-y: auto;
      padding-right: 4px;
    }

    .building-row {
      display: grid;
      grid-template-columns: 1.4fr 0.9fr;
      gap: 6px;
      align-items: stretch;
      font-size: var(--text-base);
    }

    .building-info {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .hidden {
      display: none !important;
    }

    .god-mode-card .god-mode-buttons {
      display: flex;
      gap: 8px;
      margin-top: 8px;
      flex-wrap: wrap;
    }

.btn-god-mode {
      padding: 6px 10px;
      border-radius: 8px;
      border: 1px solid rgba(148, 163, 184, 0.5);
      background: rgba(15, 23, 42, 0.8);
      color: #f9fafb;
      cursor: pointer;
      font-weight: 600;
      transition: background 0.1s ease, color 0.1s ease;
    }

    .btn-god-mode.active {
      background: linear-gradient(135deg, #f97316, #fb923c);
      border-color: transparent;
      color: #0f172a;
    }

    .building-name-button {
      font-weight: 600;
      font-size: var(--text-base);
      background: none;
      border: none;
      color: #f8fafc;
      padding: 0;
      cursor: pointer;
      text-align: left;
      display: inline-flex;
      gap: 10px;
      align-items: flex-start;
    }

    .building-name-button:focus-visible {
      outline: 2px solid rgba(56, 189, 248, 0.9);
      outline-offset: 2px;
      border-radius: 6px;
    }

    .building-emoji {
      font-size: clamp(24px, 4vw, 36px);
      line-height: 1;
      flex-shrink: 0;
      filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.6));
    }

    .pref-large-text .building-emoji {
      font-size: clamp(30px, 5vw, 42px);
    }

    .building-name-label {
      font-size: var(--heading-sub);
      line-height: 1.2;
      letter-spacing: 0.01em;
    }

    .building-tooltip {
      margin-top: 6px;
      padding: 6px 8px;
      border-radius: 8px;
      background: rgba(15, 23, 42, 0.9);
      border: 1px solid rgba(148, 163, 184, 0.35);
      color: #f8fafc;
      font-size: var(--text-base);
      box-shadow: 0 6px 12px rgba(2, 6, 23, 0.6);
      animation: fadeIn 0.15s ease;
    }

    .building-qty {
      font-size: var(--text-base);
      color: #9ca3af;
    }

    .building-meta {
      font-size: var(--text-base);
      color: #9ca3af;
    }

    .building-buy {
      display: flex;
      flex-direction: column;
      gap: 3px;
      align-items: flex-end;
      justify-content: center;
    }

    .btn-buy {
      border-radius: 999px;
      border: none;
      padding: 4px 8px;
      font-size: var(--text-base);
      cursor: pointer;
      background: #22c55e;
      color: #022c22;
      font-weight: 600;
      transition: filter 0.1s ease, transform 0.05s ease, opacity 0.15s ease;
      white-space: nowrap;
    }

    .btn-buy.disabled {
      background: #4b5563;
      color: #9ca3af;
      cursor: not-allowed;
      opacity: 0.6;
    }

    .building-placeholder {
      font-size: var(--text-base);
      color: #94a3b8;
      text-align: center;
      padding: 8px 0;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(-2px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .btn-buy:active:not(.disabled) {
      transform: translateY(1px) scale(0.99);
      filter: brightness(0.97);
    }

    .small {
      font-size: var(--text-small);
      line-height: 1.4;
      color: #94a3b8;
    }

    .section {
      margin-bottom: 6px;
    }

    .section + .section {
      margin-top: 6px;
    }

    .upgrades-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
      max-height: 160px;
      overflow-y: auto;
      padding-right: 4px;
    }

    .upgrade-item {
      font-size: var(--text-base);
      border-radius: 6px;
      border: 1px solid rgba(148, 163, 184, 0.35);
      padding: 4px 6px;
      display: flex;
      justify-content: space-between;
      gap: 6px;
    }

    .upgrade-title {
      font-weight: 600;
      margin-bottom: 2px;
    }

    .btn-upgrade {
      border-radius: 999px;
      border: none;
      padding: 4px 10px;
      font-size: var(--text-base);
      cursor: pointer;
      background: #6366f1;
      color: white;
      font-weight: 600;
      white-space: nowrap;
    }

    .btn-upgrade.disabled {
      background: #4b5563;
      color: #9ca3af;
      cursor: not-allowed;
      opacity: 0.6;
    }

    .prestige-card {
      margin-top: 6px;
      border-radius: 8px;
      border: 1px dashed rgba(252, 211, 77, 0.8);
      padding: 6px;
      font-size: var(--text-base);
      background: rgba(120, 53, 15, 0.35);
    }

    .btn-prestige {
      margin-top: 4px;
      width: 100%;
      padding: 5px;
      border-radius: 999px;
      border: none;
      background: linear-gradient(135deg, #facc15, #f97316);
      color: #111827;
      font-weight: 700;
      cursor: pointer;
      font-size: var(--text-base);
    }

    .btn-slim,
    .btn-god-mode,
    .btn-prestige {
      position: relative;
    }

    .btn-slim:focus-visible,
    .btn-god-mode:focus-visible,
    .btn-prestige:focus-visible,
    .lang-select:focus-visible {
      outline: 2px solid #38bdf8;
      outline-offset: 2px;
    }

    .btn-prestige.disabled {
      background: #4b5563;
      color: #9ca3af;
      cursor: not-allowed;
      opacity: 0.7;
    }

    .log-panel {
      font-size: var(--text-small);
      line-height: 1.4;
      max-height: 130px;
      overflow-y: auto;
      padding-right: 4px;
    }

    .log-entry {
      opacity: 0.8;
      margin-bottom: 2px;
    }

    .tag {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      padding: 1px 6px;
      border-radius: 999px;
      font-size: var(--text-small);
      border: 1px solid rgba(148, 163, 184, 0.6);
      background: rgba(15, 23, 42, 0.95);
    }

    .progress-card,
    .tabs-card {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .news-card,
    .news-list,
    .news-item {
      display: none;
    }

    .progress-actions {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }

    .btn-slim {
      border: 1px solid rgba(248, 250, 252, 0.4);
      background: transparent;
      color: #f8fafc;
      padding: 4px 8px;
      border-radius: 6px;
      font-size: 12px;
      cursor: pointer;
      transition: background 0.1s ease;
    }

    .btn-slim:hover {
      background: rgba(248, 250, 252, 0.1);
    }

    .btn-slim.danger {
      border-color: rgba(248, 113, 113, 0.8);
      color: #fecaca;
    }

.achievements-list {
      scroll-behavior: smooth;
      display: flex;
      flex-direction: column;
      gap: 8px;
      max-height: 200px;
      overflow-y: auto;
      padding-right: 4px;
    }

    .achievement-item {
      border-radius: 8px;
      border: 1px solid rgba(148, 163, 184, 0.3);
      padding: 6px 8px;
      font-size: 12px;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .achievement-item.unlocked {
      border-color: rgba(74, 222, 128, 0.7);
      background: rgba(22, 163, 74, 0.1);
    }

    .achievement-title {
      font-weight: 600;
      display: flex;
      justify-content: space-between;
      align-items: center;
}

.achievement-status {
      font-size: 11px;
      color: #94a3b8;
    }

    .icon-button {
      border: 1px solid rgba(148, 163, 184, 0.4);
      background: rgba(15, 23, 42, 0.5);
      color: #f8fafc;
      border-radius: 50%;
      width: 32px;
      height: 32px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }

    .settings-modal {
      position: fixed;
      inset: 0;
      background: rgba(2, 6, 23, 0.85);
      z-index: 60;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .settings-modal.hidden {
      display: none;
    }

    .settings-dialog {
      width: min(95vw, 520px);
      background: #0f172a;
      border: 1px solid rgba(148, 163, 184, 0.5);
      border-radius: 16px;
      padding: 16px;
      box-shadow: 0 25px 55px rgba(2, 6, 23, 0.8);
    }

    .settings-dialog-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }

    .settings-dialog-header h3 {
      margin: 0;
      font-size: 18px;
    }

    .settings-tabs {
      display: flex;
      gap: 8px;
      margin-bottom: 12px;
    }

    .settings-tab {
      flex: 1;
      border-radius: 999px;
      border: 1px solid rgba(148, 163, 184, 0.4);
      padding: 6px;
      background: rgba(15, 23, 42, 0.7);
      color: #f8fafc;
      cursor: pointer;
    }

    .settings-tab.active {
      background: rgba(56, 189, 248, 0.2);
      border-color: #38bdf8;
    }

    .settings-section {
      font-size: 13px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .settings-section.hidden {
      display: none;
    }

    .tutorial-overlay {
      position: fixed;
      inset: 0;
      background: rgba(2, 6, 23, 0.7);
      z-index: 70;
      display: flex;
      align-items: center;
      justify-content: center;
      pointer-events: none;
    }

    .tutorial-overlay.hidden {
      display: none;
    }

    .tutorial-card {
      background: #0f172a;
      border: 1px solid rgba(248, 250, 252, 0.3);
      border-radius: 12px;
      padding: 16px;
      width: min(90vw, 400px);
      pointer-events: auto;
    }

    .tutorial-step-label {
      font-size: 12px;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: #94a3b8;
      margin-bottom: 6px;
    }

    .tutorial-actions {
      display: flex;
      justify-content: space-between;
      margin-top: 12px;
      gap: 8px;
      flex-wrap: wrap;
    }

    .tutorial-highlight {
      position: relative;
      box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.5);
      border-radius: 10px;
      transition: box-shadow 0.2s ease;
    }

    .particle {
      position: fixed;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: rgba(56, 189, 248, 0.9);
      pointer-events: none;
      animation: particle-fall 0.6s ease-out forwards;
    }

    @keyframes particle-fall {
      from {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
      to {
        opacity: 0;
        transform: translateY(40px) scale(0.5);
      }
    }

    .celebration {
      position: fixed;
      inset: 0;
      pointer-events: none;
      animation: fadeOut 2s forwards;
    }

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

    .confetti {
      position: absolute;
      top: -20px;
      left: calc(var(--rand) * 100%);
      width: 6px;
      height: 14px;
      background: hsl(calc(var(--rand) * 360), 80%, 60%);
      animation: confetti-fall 2s linear forwards;
    }

    @keyframes confetti-fall {
      to {
        transform: translateY(100vh) rotate(360deg);
      }
    }

    .event-modal {
      position: fixed;
      inset: 0;
      background: rgba(2, 6, 23, 0.8);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 50;
    }

    .event-modal.hidden {
      display: none;
    }

    .event-dialog {
      background: #0f172a;
      border: 1px solid rgba(148, 163, 184, 0.5);
      border-radius: 12px;
      width: min(90vw, 420px);
      padding: 16px;
      position: relative;
      box-shadow: 0 20px 45px rgba(2, 6, 23, 0.7);
    }

    .modal-close {
      position: absolute;
      top: 8px;
      right: 8px;
      border: none;
      background: transparent;
      color: #94a3b8;
      font-size: 20px;
      cursor: pointer;
    }

    .event-choices {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-top: 12px;
    }

    .event-choice-btn {
      border: 1px solid rgba(148, 163, 184, 0.4);
      border-radius: 8px;
      padding: 10px;
      text-align: left;
      background: rgba(15, 23, 42, 0.8);
      color: #e2e8f0;
      cursor: pointer;
      font-size: 13px;
    }

    .event-choice-btn:hover,
    .event-choice-btn:focus-visible {
      background: rgba(59, 130, 246, 0.2);
      outline: none;
    }

    .event-result {
      margin-top: 12px;
      font-size: 13px;
      color: #fef08a;
      min-height: 24px;
    }

    .event-minigame {
      margin-top: 12px;
      border: 1px dashed rgba(248, 250, 252, 0.2);
      border-radius: 10px;
      padding: 10px;
    }

    .minigame-buttons {
      display: flex;
      gap: 8px;
      margin-top: 8px;
    }

    .minigame-buttons button {
      flex: 1;
      border: 1px solid rgba(248, 250, 252, 0.4);
      border-radius: 8px;
      padding: 8px 0;
      background: rgba(15, 23, 42, 0.9);
      color: #f8fafc;
      cursor: pointer;
    }

    .accessibility-panel {
      border: 1px solid rgba(148, 163, 184, 0.3);
      border-radius: 8px;
      padding: 4px 8px;
      background: rgba(15, 23, 42, 0.7);
    }

    .accessibility-panel summary {
      font-weight: 600;
      cursor: pointer;
      outline: none;
    }

    .accessibility-options {
      margin-top: 6px;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .option-row {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
    }

    .tabs-header {
      display: flex;
      gap: 6px;
      margin-bottom: 8px;
    }

    .tab-btn {
      flex: 1;
      border: 1px solid rgba(148, 163, 184, 0.4);
      border-radius: 999px;
      padding: 6px;
      background: rgba(15, 23, 42, 0.7);
      color: #f8fafc;
      cursor: pointer;
      font-size: 13px;
    }

    .tab-btn.active {
      background: rgba(56, 189, 248, 0.2);
      border-color: #38bdf8;
    }

    .tab-panel.hidden {
      display: none;
    }

    .contracts-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      max-height: 200px;
      overflow-y: auto;
      padding-right: 4px;
    }

    .contract-card {
      border: 1px solid rgba(148, 163, 184, 0.35);
      border-radius: 10px;
      padding: 8px;
      background: rgba(15, 23, 42, 0.7);
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .contract-requirements,
    .active-contract {
      font-size: var(--text-small);
      color: #94a3b8;
    }

    .contract-actions {
      display: flex;
      justify-content: flex-end;
    }

    @media (max-width: 960px) {
      .app {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px;
        margin-top: 8px;
        width: min(100%, 600px);
      }
      .buildings-list,
      .upgrades-list {
        max-height: none;
      }
      .card,
      .layout-column {
        width: 100%;
      }
    }

    @media (max-width: 640px) {
      .header-inner {
        text-align: center;
        align-items: center;
      }
      .header-top {
        justify-content: center;
      }
      .event-banner {
        margin: 12px 16px 0;
        width: auto;
        flex-wrap: wrap;
      }
      .click-button {
        font-size: var(--heading-sub);
        padding: 12px;
      }
      .tag {
        padding: 3px 8px;
      }
      .card {
        padding: 14px 12px;
      }
    }

    .flex-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 6px;
    }

    .chips-row {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      margin-top: 4px;
    }

  
