/* ============================================================================
   ČASOLOV — oblikovni sistem
   »Kinematografski atlas«: črnilno temno nebo, zlato, serifna tipografija za
   letnice, steklene površine in sij v barvi trenutnega zgodovinskega obdobja.
   ============================================================================ */

@property --era {
  syntax: "<color>";
  inherits: true;
  initial-value: #f5b942;
}

:root {
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --bg: #060a14;
  --bg-2: #0a1120;
  --surface: rgba(16, 24, 42, 0.74);
  --surface-solid: #0f1729;
  --surface-2: rgba(255, 255, 255, 0.035);
  --surface-3: rgba(255, 255, 255, 0.07);
  --field: rgba(3, 6, 14, 0.55);
  --line: rgba(160, 174, 200, 0.13);
  --line-strong: rgba(160, 174, 200, 0.24);
  --highlight: rgba(255, 255, 255, 0.06);

  --text: #eef2f8;
  --text-2: #a3aec2;
  --text-3: #8592a8;

  --gold: #f5b942;
  --gold-2: #fcd770;
  --gold-deep: #d4850f;
  --gold-soft: rgba(245, 185, 66, 0.13);
  --gold-line: rgba(245, 185, 66, 0.38);
  --gold-ink: #1a1203;

  --emerald: #34d399;
  --emerald-deep: #0fa877;
  --emerald-soft: rgba(52, 211, 153, 0.13);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.12);
  --orange: #fb923c;
  --violet: #a78bfa;
  --blue: #60a5fa;

  --era: #f5b942;

  --r-xl: 26px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --shadow-lg: 0 30px 60px -24px rgba(0, 0, 0, 0.7), 0 12px 24px -12px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 14px 30px -14px rgba(0, 0, 0, 0.6);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* združljivost s starejšimi imeni, ki jih uporablja app.js */
  --accent-gold: var(--gold);
  --accent-red: var(--red);
  --accent-emerald: var(--emerald);
  --text-main: var(--text);
  --text-muted: var(--text-2);

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #efe7d8;
  --bg-2: #e8dfcd;
  --surface: rgba(255, 251, 243, 0.86);
  --surface-solid: #fffaf1;
  --surface-2: rgba(92, 64, 24, 0.04);
  --surface-3: rgba(92, 64, 24, 0.08);
  --field: rgba(255, 255, 255, 0.75);
  --line: rgba(92, 66, 30, 0.14);
  --line-strong: rgba(92, 66, 30, 0.26);
  --highlight: rgba(255, 255, 255, 0.7);

  --text: #1e1912;
  --text-2: #5a5143;
  --text-3: #6f6553;

  --gold: #94600a;
  --gold-2: #c98a1e;
  --gold-deep: #9a6108;
  --gold-soft: rgba(185, 119, 14, 0.11);
  --gold-line: rgba(185, 119, 14, 0.4);

  --emerald: #0d9466;
  --emerald-deep: #0a7a54;
  --emerald-soft: rgba(13, 148, 102, 0.1);
  --red: #c93a3a;
  --red-soft: rgba(201, 58, 58, 0.09);
  --orange: #c2610c;
  --violet: #7c5cd6;
  --blue: #2f6fd1;

  --shadow-lg: 0 30px 60px -28px rgba(70, 48, 16, 0.35), 0 10px 20px -12px rgba(70, 48, 16, 0.18);
  --shadow-md: 0 12px 26px -14px rgba(70, 48, 16, 0.3);

  color-scheme: light;
}

body[data-era="1"] { --era: #60a5fa; }
body[data-era="2"] { --era: #a78bfa; }
body[data-era="3"] { --era: #fbbf24; }
body[data-era="4"] { --era: #f87171; }
body[data-era="5"] { --era: #34d399; }

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease, --era 1.4s ease;
  overflow-x: hidden;
}

button,
input,
select {
  font-family: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.ic {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==================== OZADJE: SIJ OBDOBJA + ZRNO ==================== */
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(55% 45% at 12% -8%, color-mix(in srgb, var(--era) 20%, transparent), transparent 70%),
    radial-gradient(45% 40% at 100% 4%, rgba(245, 185, 66, 0.08), transparent 70%),
    radial-gradient(60% 50% at 50% 115%, color-mix(in srgb, var(--era) 10%, transparent), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 40%);
}

[data-theme="light"] .bg-aurora {
  background:
    radial-gradient(55% 45% at 12% -8%, color-mix(in srgb, var(--era) 16%, transparent), transparent 70%),
    radial-gradient(45% 40% at 100% 4%, rgba(217, 154, 43, 0.14), transparent 70%),
    linear-gradient(180deg, #f6f0e4, var(--bg) 50%);
}

.bg-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

[data-theme="light"] .bg-grain {
  opacity: 0.12;
  mix-blend-mode: multiply;
}

/* ==================== ZGORNJA VRSTICA ==================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 940px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  user-select: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--gold-2), var(--gold-deep));
  box-shadow: 0 6px 18px -4px rgba(245, 185, 66, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.4s var(--ease-spring);
}

.brand:hover .brand-logo {
  transform: rotate(180deg);
}

.brand-logo svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #1a1203;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-title h1,
.brand-title .brand-name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-title h1 span,
.brand-title .brand-name span {
  color: var(--gold);
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 600;
  margin-top: 3px;
  letter-spacing: 0.01em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  height: 38px;
  padding: 0 13px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease-out);
}

.icon-btn.icon-only {
  width: 38px;
  padding: 0;
}

.icon-btn:hover {
  background: var(--surface-3);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: translateY(0) scale(0.97);
}

.streak-badge {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: var(--gold-line);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.streak-badge .ic {
  fill: currentColor;
  fill-opacity: 0.25;
}

/* ==================== VSEBNIK ==================== */
.container {
  max-width: 940px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 20px 64px;
  flex: 1;
}

.panel,
.event-card,
.guess-panel,
.round-result,
.summary-panel,
.archive-header-card,
.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md), inset 0 1px 0 var(--highlight);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft), 0 0 12px var(--gold);
  animation: dotBreath 2s ease-in-out infinite;
}

/* ==================== 1. VSTOPNI MENI ==================== */
.menu-view,
.game-view,
.archive-view,
.rooms-view {
  display: none;
}

.menu-view.visible,
.game-view.visible,
.archive-view.visible,
.rooms-view.visible {
  display: block;
  animation: viewIn 0.5s var(--ease-out);
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero {
  position: relative;
  height: 420px;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #070b14;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.07);
  margin-bottom: 16px;
  isolation: isolate;
}

#menu-preview-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 7, 16, 0.94) 0%, rgba(4, 7, 16, 0.72) 34%, rgba(4, 7, 16, 0.08) 66%, transparent 80%),
    linear-gradient(0deg, rgba(4, 7, 16, 0.75) 0%, transparent 38%);
  pointer-events: none;
}

.hero-content {
  position: absolute;
  left: 40px;
  bottom: 70px;
  max-width: 470px;
  color: #eef2f8;
  z-index: 2;
}

.hero-content .eyebrow {
  color: #fcd770;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 50px;
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 14px 0 14px;
  text-wrap: balance;
}

.hero-title em {
  white-space: nowrap;
  font-style: italic;
  font-weight: 700;
  background: linear-gradient(100deg, #fde68a, #f5b942 45%, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.78);
  margin-bottom: 22px;
  max-width: 430px;
}

.hero-desc strong {
  color: #fff;
  font-weight: 700;
}

.btn-hero {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 10px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--gold-ink);
  background: linear-gradient(135deg, #fde68a 0%, #f5b942 45%, #e0901a 100%);
  box-shadow: 0 14px 34px -8px rgba(245, 158, 11, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(120, 60, 0, 0.25);
  overflow: hidden;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}

.btn-hero::after,
.btn-submit-year::after,
.btn-share::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.btn-hero:hover::after,
.btn-submit-year:hover::after,
.btn-share:hover::after {
  left: 130%;
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -8px rgba(245, 158, 11, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(120, 60, 0, 0.25);
}

.btn-hero:active {
  transform: translateY(0) scale(0.985);
}

.btn-hero-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(26, 18, 3, 0.9);
  color: #fcd770;
}

.btn-hero-icon .ic {
  width: 22px;
  height: 22px;
}

.btn-hero-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-right: 6px;
}

.btn-hero-tag {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.14em;
  opacity: 0.7;
}

.btn-hero-title {
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.btn-hero-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(26, 18, 3, 0.12);
  transition: transform 0.3s var(--ease-out);
}

.btn-hero:hover .btn-hero-arrow {
  transform: translateX(3px);
}

.hero-eras {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 2;
  background: rgba(4, 7, 16, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-eras span {
  position: relative;
  padding: 11px 10px 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.7);
  text-align: center;
}

.hero-eras span::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--c);
  box-shadow: 0 0 12px var(--c);
}

/* Statistika menija */
.menu-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.mss-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--highlight);
}

.mss-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
}

.mss-icon.flame {
  color: var(--orange);
  background: rgba(251, 146, 60, 0.12);
  border-color: rgba(251, 146, 60, 0.35);
}

.mss-text {
  display: flex;
  flex-direction: column;
}

.mss-val {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.mss-lbl {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
}

/* Prosta igra + arhiv */
.menu-actions-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.panel {
  padding: 18px;
  border-radius: var(--r-lg);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 13px;
}

.panel-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex: none;
}

.panel-icon.emerald {
  color: var(--emerald);
  background: var(--emerald-soft);
  border: 1px solid color-mix(in srgb, var(--emerald) 35%, transparent);
}

.panel-icon.violet {
  color: var(--violet);
  background: color-mix(in srgb, var(--violet) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--violet) 35%, transparent);
}

.panel-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.panel-sub {
  font-size: 13px;
  color: var(--text-2);
}

.freeplay-menu-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.era-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--field);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 11px 38px 11px 14px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.era-select:hover,
.era-select:focus {
  border-color: var(--gold-line);
  outline: none;
}

.era-select option {
  background: var(--surface-solid);
  color: var(--text);
}

.freeplay-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  font-size: 13px;
  color: var(--text-2);
}

.freeplay-info > span:first-child {
  flex: 1 1 220px;
}

.freeplay-left {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.freeplay-left b {
  margin-left: 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.fp-pip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px color-mix(in srgb, var(--emerald) 60%, transparent);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.fp-pip.used {
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.btn:disabled,
.btn-secondary-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), filter 0.2s ease, box-shadow 0.2s ease;
}

.btn-emerald {
  color: #03211a;
  background: linear-gradient(135deg, #6ee7b7, #10b981);
  box-shadow: 0 10px 24px -10px rgba(16, 185, 129, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-emerald .ic {
  fill: currentColor;
  stroke: none;
  width: 15px;
  height: 15px;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn:active {
  transform: scale(0.98);
}

.menu-btn-archive {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), border-color 0.2s ease;
}

.menu-btn-archive:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--violet) 45%, transparent);
}

.archive-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  flex: none;
  transition: transform 0.3s var(--ease-out);
}

.menu-btn-archive:hover .archive-arrow {
  transform: translateX(3px);
}

/* Kako igrati — trije koraki */
.how-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.how-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-strong);
}

.how-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
  color: var(--gold);
  background: var(--gold-soft);
}

.how-steps strong {
  display: block;
  font-size: 13.5px;
  font-weight: 750;
}

.how-steps span:not(.how-num) {
  display: block;
  font-size: 12px;
  color: var(--text-3);
}

/* ==================== 2. ODER IGRE ==================== */
.eraly-stage-card {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 14px;
  background: #070b14;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.07);
  transition: box-shadow 0.4s ease;
}

.eraly-stage-card.golden-flight {
  animation: goldenPulse 1.6s ease-in-out infinite;
}

.eraly-stage-card.stall-flight {
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(239, 68, 68, 0.6);
  animation: stallShake 0.5s ease-in-out 2;
}

@keyframes goldenPulse {
  0%, 100% { box-shadow: var(--shadow-lg), 0 0 0 1px rgba(251, 191, 36, 0.55), 0 0 36px rgba(251, 191, 36, 0.3); }
  50% { box-shadow: var(--shadow-lg), 0 0 0 1px rgba(251, 191, 36, 0.9), 0 0 70px rgba(251, 191, 36, 0.55); }
}

@keyframes stallShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(1px); }
}

.eraly-canvas-Viewport {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.eraly-canvas-Viewport.is-flying {
  cursor: pointer;
}

#eraly-game-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* HUD na nebu */
.stage-hud {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.35s ease, transform 0.45s var(--ease-out);
}

.is-flying .stage-hud {
  opacity: 0;
  transform: translateY(-8px);
}

.hud-left,
.hud-year {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 6px;
  border-radius: 14px;
  background: rgba(4, 8, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.7);
}

.mode-pill {
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 10px;
  border-radius: 9px;
  color: #1a1203;
  background: linear-gradient(135deg, #fde68a, #f5b942);
}

.round-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.round-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  font-size: 11px;
  font-weight: 800;
  color: rgba(226, 232, 240, 0.55);
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.round-dot.current {
  border-color: #fcd770;
  color: #fcd770;
  animation: dotBreath 1.6s ease-in-out infinite;
}

.round-dot.pop {
  animation: dotPop 0.6s var(--ease-spring);
}

.round-dot.tier-perfect {
  background: linear-gradient(135deg, #fde047, #f59e0b);
  border-color: #fde68a;
  color: #1a1203;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.65);
}

.round-dot.tier-great {
  background: rgba(52, 211, 153, 0.22);
  border-color: #34d399;
  color: #a7f3d0;
}

.round-dot.tier-good {
  background: rgba(251, 191, 36, 0.18);
  border-color: #fbbf24;
  color: #fde68a;
}

.round-dot.tier-ok {
  background: rgba(251, 146, 60, 0.2);
  border-color: #fb923c;
  color: #fed7aa;
}

.round-dot.tier-miss {
  background: rgba(248, 113, 113, 0.2);
  border-color: #f87171;
  color: #fecaca;
}

@keyframes dotPop {
  0% { transform: scale(0.4); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

@keyframes dotBreath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(252, 215, 112, 0.35); }
  50% { box-shadow: 0 0 0 5px rgba(252, 215, 112, 0); }
}

.hud-year {
  align-items: baseline;
  gap: 6px;
  padding: 7px 14px 8px;
}

.jys-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: rgba(226, 232, 240, 0.55);
}

.jys-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  color: #fcd770;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(245, 185, 66, 0.45);
}

.jys-max {
  font-size: 12px;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.45);
}

/* Kinematografski napis med poletom */
.flight-cinematic-overlay {
  position: absolute;
  top: 26px;
  left: 62%;
  z-index: 4;
  transform: translate(-50%, -10px) scale(0.94);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.45s var(--ease-out);
  padding: 9px 22px 10px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(4, 8, 20, 0.72), rgba(4, 8, 20, 0.5));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  min-width: 200px;
}

.flight-cinematic-overlay.visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.fco-badge {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7dd3fc;
  white-space: nowrap;
}

.kind-golden .fco-badge { color: #fde047; }
.kind-stall .fco-badge { color: #fca5a5; }

.fco-year-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: 3px 0 1px;
}

.fco-year-prefix {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.5);
}

.fco-year-counter {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  text-shadow: 0 0 18px rgba(125, 211, 252, 0.55);
}

.kind-golden .fco-year-counter {
  color: #fef3c7;
  text-shadow: 0 0 22px rgba(251, 191, 36, 0.85);
}

.kind-stall .fco-year-counter {
  color: #fecaca;
  text-shadow: 0 0 16px rgba(239, 68, 68, 0.6);
}

.odometer {
  display: inline-flex;
  height: 1em;
  overflow: hidden;
}

.odo-col {
  display: inline-block;
  height: 1em;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.odo-col.lead {
  opacity: 0.2;
}

.odo-strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.odo-strip span {
  display: block;
  height: 1em;
  line-height: 1em;
  text-align: center;
  width: 0.64em;
}

.fco-gain {
  font-size: 13px;
  font-weight: 900;
  color: #6ee7b7;
  font-variant-numeric: tabular-nums;
}

.kind-golden .fco-gain { color: #fde047; }
.kind-stall .fco-gain { color: #f87171; }

.fco-skip {
  margin-top: 4px;
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.38);
  transition: opacity 0.3s ease;
}

.flight-cinematic-overlay.landed {
  animation: landedPop 0.55s var(--ease-spring);
}

.flight-cinematic-overlay.landed .fco-skip {
  opacity: 0;
}

@keyframes landedPop {
  0% { transform: translate(-50%, 0) scale(1); }
  35% { transform: translate(-50%, 0) scale(1.1); }
  100% { transform: translate(-50%, 0) scale(1); }
}

/* Pot 0 → 2026 pod nebom */
.journey-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 18px 14px;
  background: linear-gradient(180deg, #0a1020, #070b16);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.eraly-era-pill {
  font-size: 11.5px;
  font-weight: 750;
  color: #e2e8f0;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.eraly-era-pill::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 7px;
  background: var(--era);
  box-shadow: 0 0 8px var(--era);
  vertical-align: 1px;
}

.journey-track {
  position: relative;
  height: 6px;
  margin-bottom: 8px;
}

.jt-rail {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
}

.emr-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6 40%, #f59e0b 75%, #fcd770);
  box-shadow: 0 0 12px rgba(245, 185, 66, 0.45);
}

.emr-head {
  position: absolute;
  right: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: #fff7d6;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.35), 0 0 16px rgba(251, 191, 36, 0.95);
}

.jt-mark {
  position: absolute;
  top: -3px;
  width: 1.5px;
  height: 12px;
  background: rgba(255, 255, 255, 0.25);
}

.jt-mark i {
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.4);
  font-variant-numeric: tabular-nums;
}

.jt-goal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
  color: #fcd770;
}

.jt-goal .ic {
  width: 16px;
  height: 16px;
}

/* ==================== KARTICA DOGODKA + ODŠTEVALNIK ==================== */
.event-card {
  position: relative;
  padding: 20px 26px 24px;
  margin-bottom: 12px;
  overflow: hidden;
}

.event-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--era), transparent);
  box-shadow: 0 0 18px var(--era);
}

.event-card::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--era) 16%, transparent), transparent 70%);
  pointer-events: none;
}

.timer-bar-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 16px;
}

.timer-progress-track {
  flex: 1;
  height: 6px;
  border-radius: 6px;
  background: var(--surface-3);
  overflow: hidden;
}

.timer-progress-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--emerald-deep), var(--emerald));
  box-shadow: 0 0 10px color-mix(in srgb, var(--emerald) 60%, transparent);
  transition: width 0.1s linear;
}

.timer-progress-fill.warn {
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-2));
  box-shadow: 0 0 10px color-mix(in srgb, var(--gold) 60%, transparent);
}

.timer-progress-fill.danger {
  background: linear-gradient(90deg, #dc2626, var(--red));
  box-shadow: 0 0 12px color-mix(in srgb, var(--red) 70%, transparent);
}

.timer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-2);
}

.timer-chip .ic {
  width: 15px;
  height: 15px;
}

.timer-Display {
  font-size: 14px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  color: var(--emerald);
  min-width: 46px;
  text-align: right;
}

.timer-Display.warn {
  color: var(--gold);
}

.timer-bar-card.tense .timer-chip {
  border-color: color-mix(in srgb, var(--red) 55%, transparent);
  background: var(--red-soft);
  animation: chipShake 0.5s ease-in-out infinite;
}

.timer-bar-card.tense .timer-progress-track {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--red) 35%, transparent), 0 0 14px color-mix(in srgb, var(--red) 40%, transparent);
}

@keyframes chipShake {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-1.5px) rotate(-2deg); }
  75% { transform: translateX(1.5px) rotate(2deg); }
}

.timer-Display.danger {
  color: var(--red);
  animation: pulseFast 0.45s infinite alternate;
}

@keyframes pulseFast {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0.6; transform: scale(1.08); }
}

.event-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.meta-badges {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-2);
}

.badge .ic {
  width: 13px;
  height: 13px;
}

.badge-era {
  color: var(--era);
  border-color: color-mix(in srgb, var(--era) 40%, transparent);
  background: color-mix(in srgb, var(--era) 12%, transparent);
}

[data-theme="light"] .badge-era {
  color: color-mix(in srgb, var(--era) 70%, #1e1912);
}

.badge-region {
  color: var(--emerald);
  border-color: color-mix(in srgb, var(--emerald) 35%, transparent);
  background: var(--emerald-soft);
}

.round-counter {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.event-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
  text-wrap: balance;
}

.event-prompt {
  position: relative;
  z-index: 1;
  font-size: 15.5px;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 68ch;
}

.card-enter {
  animation: cardEnter 0.55s var(--ease-out) both;
}

#guess-panel.card-enter {
  animation-delay: 0.08s;
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* ==================== VNOS LETNICE ==================== */
.guess-panel {
  padding: 22px 26px 24px;
}

.guess-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.guess-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-2);
}

.guess-range-note {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
}

.year-input-group {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 20px;
}

.step-btn {
  width: 54px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  user-select: none;
  transition: all 0.18s var(--ease-out);
}

.step-btn:hover {
  color: var(--gold);
  border-color: var(--gold-line);
  background: var(--gold-soft);
}

.step-btn:active {
  transform: scale(0.94);
}

.year-input-wrapper {
  flex: 1;
  min-width: 0;
}

.year-input {
  width: 100%;
  height: 76px;
  background: var(--field);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 900;
  text-align: center;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
  -moz-appearance: textfield;
}

.year-input::-webkit-outer-spin-button,
.year-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.year-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft), 0 0 30px -6px color-mix(in srgb, var(--gold) 55%, transparent);
}

.year-input::placeholder {
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0;
}

/* Drsnik — razpon obdobja vprašanja, obarvan v barvi obdobja */
.timeline-assist {
  margin-bottom: 22px;
}

.slider-wrap {
  position: relative;
  padding-top: 34px;
}

.slider-bubble {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  min-width: 52px;
  padding: 4px 9px 5px;
  border-radius: 9px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--gold-ink);
  background: linear-gradient(135deg, #fde68a, #f5b942);
  box-shadow: 0 6px 16px -6px rgba(245, 158, 11, 0.7);
  pointer-events: none;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.slider-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  transform: translateX(-50%) rotate(45deg);
  background: #f5b942;
  border-radius: 2px;
  z-index: -1;
}

.slider-bubble.idle {
  color: var(--text-2);
  background: var(--surface-3);
  box-shadow: none;
}

.slider-bubble.idle::after {
  background: var(--surface-3);
}

.slider-bubble.outside {
  opacity: 0.55;
}

.timeline-slider {
  --fill: 50%;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 26px;
  background: transparent;
  cursor: pointer;
}

.timeline-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--era) 85%, #fff 0%) 0 var(--fill), transparent var(--fill)),
    color-mix(in srgb, var(--era) 18%, var(--surface-3));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.timeline-slider::-moz-range-track {
  height: 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--era) 18%, var(--surface-3));
}

.timeline-slider::-moz-range-progress {
  height: 8px;
  border-radius: 8px;
  background: var(--era);
}

.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #fde68a 60%, #f5b942);
  border: 3px solid #1a1203;
  box-shadow: 0 0 0 2px #f5b942, 0 4px 14px rgba(245, 158, 11, 0.6);
  transition: transform 0.15s ease;
}

.timeline-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #fde68a 60%, #f5b942);
  border: 3px solid #1a1203;
  box-shadow: 0 0 0 2px #f5b942, 0 4px 14px rgba(245, 158, 11, 0.6);
}

.timeline-slider:active::-webkit-slider-thumb {
  transform: scale(1.15);
}

.timeline-ticks {
  position: relative;
  height: 22px;
  margin: 6px 12px 0;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 700;
  user-select: none;
  font-variant-numeric: tabular-nums;
}

.timeline-ticks span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.timeline-ticks span:hover {
  color: var(--gold);
  background: var(--gold-soft);
}

.btn-submit-year {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 62px;
  border-radius: 16px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--gold-ink);
  background: linear-gradient(135deg, #fde68a 0%, #f5b942 45%, #e0901a 100%);
  box-shadow: 0 16px 34px -12px rgba(245, 158, 11, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(120, 60, 0, 0.25);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease;
}

.btn-submit-year .ic {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.btn-submit-year kbd {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(26, 18, 3, 0.12);
  border: 1px solid rgba(26, 18, 3, 0.18);
}

.btn-submit-year:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px -12px rgba(245, 158, 11, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(120, 60, 0, 0.25);
}

.btn-submit-year:active {
  transform: scale(0.99);
}

.year-input.shake {
  animation: stallShake 0.4s ease;
}

/* ==================== REZULTAT KROGA ==================== */
.round-result {
  display: none;
  padding: 22px 26px 24px;
  margin-top: 12px;
}

.round-result.visible {
  display: block;
  animation: cardEnter 0.4s var(--ease-out);
}

.round-result > * {
  transition: opacity 0.45s ease, transform 0.55s var(--ease-out);
}

.round-result.in-flight > *:not(.journey-step-banner) {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.round-result.revealed > :nth-child(1) { transition-delay: 0s; }
.round-result.revealed > :nth-child(2) { transition-delay: 0.08s; }
.round-result.revealed > :nth-child(3) { transition-delay: 0.16s; }
.round-result.revealed > :nth-child(4) { transition-delay: 0.22s; }
.round-result.revealed > :nth-child(5) { transition-delay: 0.26s; }
.round-result.revealed > :nth-child(6) { transition-delay: 0.32s; }
.round-result.revealed > :nth-child(7) { transition-delay: 0.4s; }

.journey-step-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  margin-bottom: 16px;
}

.jsb-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 24px;
  background: var(--surface-3);
}

.jsb-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--gold);
}

.jsb-sub {
  font-size: 13.5px;
  color: var(--text-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.round-result.in-flight .journey-step-banner {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.06), rgba(56, 189, 248, 0.18), rgba(56, 189, 248, 0.06));
  background-size: 200% 100%;
  border-color: rgba(56, 189, 248, 0.35);
  animation: bannerShimmer 1.2s linear infinite;
}

.round-result.in-flight .jsb-title {
  color: #38bdf8 !important;
}

.round-result.in-flight .jsb-icon {
  animation: iconBob 0.9s ease-in-out infinite;
}

@keyframes bannerShimmer {
  from { background-position: 200% 0; }
  to { background-position: 0% 0; }
}

@keyframes iconBob {
  0%, 100% { transform: translate(0, 0) rotate(-6deg); }
  50% { transform: translate(4px, -3px) rotate(4deg); }
}

.round-result.revealed .journey-step-banner {
  animation: bannerLand 0.6s var(--ease-spring);
}

@keyframes bannerLand {
  0% { transform: scale(0.97); }
  50% { transform: scale(1.015); }
  100% { transform: scale(1); }
}

.round-result[data-tier="tier-perfect"] .journey-step-banner {
  background: linear-gradient(120deg, rgba(251, 191, 36, 0.26), rgba(245, 158, 11, 0.08) 60%, rgba(253, 224, 71, 0.22));
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow: 0 0 34px -6px rgba(251, 191, 36, 0.35);
}
.round-result[data-tier="tier-great"] .journey-step-banner {
  background: var(--emerald-soft);
  border-color: color-mix(in srgb, var(--emerald) 45%, transparent);
}
.round-result[data-tier="tier-great"] .jsb-title { color: var(--emerald); }
.round-result[data-tier="tier-ok"] .journey-step-banner {
  background: color-mix(in srgb, var(--orange) 11%, transparent);
  border-color: color-mix(in srgb, var(--orange) 40%, transparent);
}
.round-result[data-tier="tier-ok"] .jsb-title { color: var(--orange); }
.round-result[data-tier="tier-miss"] .journey-step-banner,
.round-result[data-tier="tier-timeout"] .journey-step-banner {
  background: var(--red-soft);
  border-color: color-mix(in srgb, var(--red) 40%, transparent);
}
.round-result[data-tier="tier-miss"] .jsb-title,
.round-result[data-tier="tier-timeout"] .jsb-title { color: var(--red); }

.result-top-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.result-stat-box {
  position: relative;
  padding: 14px 12px 13px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: center;
  overflow: hidden;
}

.result-stat-box::before {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  top: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--text-3);
}

.result-stat-box.accent-emerald::before { background: var(--emerald); box-shadow: 0 0 10px var(--emerald); }
.result-stat-box.accent-gold::before { background: var(--gold); box-shadow: 0 0 10px var(--gold); }

.result-stat-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  font-weight: 800;
  margin-bottom: 4px;
}

.result-stat-val {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.01em;
}

.result-stat-val.correct-year {
  color: var(--emerald);
}

.result-stat-val.points-earned {
  color: var(--gold);
  font-size: 22px;
  padding-top: 5px;
}

.diff-banner {
  text-align: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 12px;
}

.visual-timeline-compare {
  position: relative;
  height: 46px;
  margin: 4px 0 8px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.vt-track {
  position: absolute;
  top: 50%;
  left: 16px;
  right: 16px;
  height: 4px;
  margin-top: -2px;
  border-radius: 4px;
  background: linear-gradient(90deg,
    color-mix(in srgb, #3b82f6 45%, transparent) 0 74%,
    color-mix(in srgb, #8b5cf6 50%, transparent) 74% 88.3%,
    color-mix(in srgb, #f59e0b 55%, transparent) 88.3% 94.4%,
    color-mix(in srgb, #ef4444 55%, transparent) 94.4% 98.1%,
    #10b981 98.1% 100%);
}

.vt-connector {
  position: absolute;
  top: 50%;
  margin-top: -3px;
  height: 6px;
  background: linear-gradient(90deg, var(--gold), var(--emerald));
  border-radius: 3px;
  opacity: 0.85;
  transform: scaleX(0);
}

.round-result.revealed .vt-connector {
  transform: scaleX(1);
  transition: transform 0.7s var(--ease-out) 0.55s;
}

.vt-pin {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 2;
  border: 3px solid var(--surface-solid);
}

.vt-pin.guess {
  background: var(--gold);
  box-shadow: 0 0 12px color-mix(in srgb, var(--gold) 80%, transparent);
}

.vt-pin.actual {
  background: var(--emerald);
  box-shadow: 0 0 0 4px var(--emerald-soft), 0 0 12px var(--emerald);
}

.round-result.revealed .vt-pin.guess {
  animation: pinDrop 0.5s var(--ease-spring) 0.35s both;
}

.round-result.revealed .vt-pin.actual {
  animation: pinDrop 0.5s var(--ease-spring) 1.1s both;
}

@keyframes pinDrop {
  0% { transform: translate(-50%, -220%) scale(0.6); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.vt-legend {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 16px;
}

.vt-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vt-legend strong {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.lg-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.lg-dot.gold { background: var(--gold); }
.lg-dot.emerald { background: var(--emerald); }

.explanation-card {
  position: relative;
  padding: 16px 18px 17px;
  margin-bottom: 18px;
  border-radius: var(--r-md);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 9%, transparent), transparent 60%),
    var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--gold) 22%, var(--line));
}

.explanation-card h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 7px;
}

.explanation-card h4 .ic {
  width: 16px;
  height: 16px;
}

.explanation-card p {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text);
}

.btn-next-round {
  width: 100%;
  height: 56px;
  border-radius: 16px;
  border: none;
  color: #03211a;
  background: linear-gradient(135deg, #6ee7b7, #10b981);
  box-shadow: 0 14px 30px -12px rgba(16, 185, 129, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  font-size: 15.5px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), filter 0.2s ease;
}

.btn-next-round:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* ==================== POVZETEK ==================== */
.summary-panel {
  display: none;
  padding: 30px 26px 24px;
  position: relative;
  overflow: hidden;
}

.summary-panel::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -160px;
  width: 520px;
  height: 320px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(245, 185, 66, 0.22), transparent);
  pointer-events: none;
}

.summary-panel.visible {
  display: block;
  animation: cardEnter 0.5s var(--ease-out);
}

.summary-panel.summary-enter .summary-round-item {
  animation: cardEnter 0.5s var(--ease-out) both;
}

.summary-panel.summary-enter .summary-rank-badge {
  animation: landedRank 0.7s var(--ease-spring) 0.1s both;
}

@keyframes landedRank {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

.summary-header {
  position: relative;
  text-align: center;
  margin-bottom: 24px;
}

.summary-rank-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.summary-reached-year-label {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 600;
  margin-bottom: 2px;
}

.summary-total-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  line-height: 1;
}

#summary-year-reached {
  font-family: var(--font-display);
  font-size: 76px;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums lining-nums;
  background: linear-gradient(180deg, #fff3c4 0%, #fcd770 40%, #e0901a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 24px rgba(245, 158, 11, 0.35));
}

[data-theme="light"] #summary-year-reached {
  background: linear-gradient(180deg, #d99a2b, #9a6108);
  -webkit-background-clip: text;
  background-clip: text;
  filter: none;
}

.summary-of {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-3);
}

.summary-subtitle {
  margin: 12px auto 0;
  max-width: 520px;
  font-size: 14px;
  color: var(--text-2);
}

.summary-rounds-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.summary-round-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px 13px 18px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
}

.summary-round-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--text-3);
}

.summary-round-item.tier-perfect::before { background: #fbbf24; box-shadow: 0 0 12px #fbbf24; }
.summary-round-item.tier-great::before { background: var(--emerald); }
.summary-round-item.tier-good::before { background: var(--gold); }
.summary-round-item.tier-ok::before { background: var(--orange); }
.summary-round-item.tier-miss::before,
.summary-round-item.tier-timeout::before { background: var(--red); }

.sri-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sri-emoji {
  font-size: 18px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--surface-3);
}

.sri-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.sri-years {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 2px;
}

.sri-score {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--gold);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.summary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.btn-share,
.btn-secondary-action,
.btn-ghost {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 54px;
  border-radius: 15px;
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease, background 0.2s ease;
}

.btn-share {
  border: none;
  color: var(--gold-ink);
  background: linear-gradient(135deg, #fde68a 0%, #f5b942 45%, #e0901a 100%);
  box-shadow: 0 14px 30px -12px rgba(245, 158, 11, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-secondary-action {
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
}

.btn-ghost {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 700;
}

.btn-share:hover,
.btn-secondary-action:hover,
.btn-ghost:hover {
  transform: translateY(-1px);
}

.btn-secondary-action:hover,
.btn-ghost:hover {
  border-color: var(--gold-line);
  background: var(--surface-3);
}

.next-daily-timer {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}

/* ==================== FINALE ==================== */
.finale-strip {
  display: none;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow-md), 0 0 30px -10px color-mix(in srgb, var(--gold) 50%, transparent);
}

.finale-strip.visible {
  display: block;
  animation: cardEnter 0.45s var(--ease-out);
}

.finale-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.finale-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
}

.finale-skip {
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text-2);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.finale-chips {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.fin-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-3);
  opacity: 0.45;
  transform: scale(0.94);
  transition: all 0.4s var(--ease-spring);
}

.fin-chip b {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
}

.fin-chip i {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.fin-chip.on {
  opacity: 1;
  transform: scale(1);
  color: var(--text);
}

.fin-chip.on.tier-perfect { background: linear-gradient(135deg, rgba(253, 224, 71, 0.3), rgba(245, 158, 11, 0.15)); border-color: #fbbf24; box-shadow: 0 0 18px -4px rgba(251, 191, 36, 0.7); }
.fin-chip.on.tier-great { background: var(--emerald-soft); border-color: var(--emerald); }
.fin-chip.on.tier-good { background: var(--gold-soft); border-color: var(--gold-line); }
.fin-chip.on.tier-ok { background: color-mix(in srgb, var(--orange) 12%, transparent); border-color: var(--orange); }
.fin-chip.on.tier-miss,
.fin-chip.on.tier-timeout { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 50%, transparent); }

.btn-secondary-action.full {
  width: 100%;
  margin-bottom: 10px;
}

.btn-share:disabled {
  opacity: 0.7;
  cursor: progress;
}

.countdown {
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  font-weight: 800;
}

/* ==================== SOBE S PRIJATELJI ==================== */
.panel-icon.blue {
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--blue) 35%, transparent);
}

.rooms-btn:hover {
  border-color: color-mix(in srgb, var(--blue) 45%, transparent);
}

.ic.flip {
  transform: scaleX(-1);
}

.rooms-root {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rooms-root .panel {
  padding: 20px;
}

.rooms-note h3,
.rooms-onboard h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 6px;
}

.rooms-note p,
.rooms-onboard > p {
  color: var(--text-2);
  font-size: 14.5px;
  max-width: 60ch;
}

.rooms-note .btn {
  margin-top: 14px;
}

.rooms-loading {
  color: var(--text-2);
  font-weight: 650;
}

.rooms-onboard {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 520px;
}

.rooms-invite {
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  font-size: 14px;
}

.rooms-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rooms-field label,
.room-invite label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
}

.rooms-input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--field);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rooms-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft);
}

.rooms-input.code,
.code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rooms-error {
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

.rooms-fine {
  font-size: 12.5px;
  color: var(--text-3);
}

.rooms-link {
  border: none;
  background: none;
  padding: 2px 0;
  color: var(--gold);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rooms-link.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  text-decoration: none;
}

.rooms-link.back .ic {
  transform: scaleX(-1);
}

.rooms-link.danger {
  color: var(--red);
}

.rooms-me {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  font-size: 14px;
  color: var(--text-2);
}

.rooms-me strong {
  color: var(--text);
}

.rooms-rename {
  display: grid;
  grid-template-columns: minmax(0, 280px) auto;
  gap: 8px;
  align-items: center;
}

.rooms-rename .rooms-error {
  grid-column: 1 / -1;
}

.rooms-h {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 10px;
}

.rooms-h span {
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-3);
  margin-left: 6px;
}

.rooms-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rooms-empty {
  color: var(--text-2);
  font-size: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-strong);
}

.room-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 12px;
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease;
}

.room-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-line);
}

.room-card-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
}

.room-card-meta {
  grid-row: 2;
  font-size: 12.5px;
  color: var(--text-3);
  font-weight: 650;
}

.room-card .archive-arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.rooms-forms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rooms-forms form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rooms-forms .rooms-h {
  margin-bottom: 0;
}

.room-head {
  display: grid;
  grid-template-columns: 1fr minmax(0, 1.1fr);
  gap: 20px;
  align-items: end;
}

.room-title h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 6px 0 4px;
  overflow-wrap: anywhere;
}

.room-title p {
  font-size: 13.5px;
  color: var(--text-2);
}

.room-invite {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.room-invite.fresh {
  border-color: var(--gold-line);
  background: var(--gold-soft);
  animation: bannerLand 0.6s var(--ease-spring);
}

.room-invite-row {
  display: flex;
  gap: 8px;
}

.room-invite-row .rooms-input {
  flex: 1;
  font-size: 13px;
}

.room-invite-row .btn,
.room-invite-row .btn-secondary-action {
  height: 46px;
  flex: none;
  padding: 0 14px;
  font-size: 13.5px;
}

.room-daynav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.room-daynav .icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

.room-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.room-date strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  text-transform: capitalize;
}

.room-date span {
  font-size: 12.5px;
  color: var(--text-3);
  font-weight: 650;
}

.room-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: var(--r-md);
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
}

.room-cta p {
  font-size: 14px;
  font-weight: 600;
  max-width: 46ch;
}

.btn-hero.small {
  padding: 8px 8px 8px 16px;
  border-radius: 14px;
}

.btn-hero.small .btn-hero-title {
  font-size: 15px;
}

.room-board {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rb-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.rb-row.you {
  border-color: var(--gold-line);
  background: var(--gold-soft);
}

.rb-row.perfect {
  box-shadow: 0 0 18px -6px var(--gold);
}

.rb-rank {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.rb-name {
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rb-name em {
  font-style: normal;
  color: var(--text-3);
  font-weight: 650;
}

.rb-emojis {
  font-size: 15px;
  letter-spacing: 1px;
}

.rb-year {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  min-width: 52px;
  text-align: right;
}

.rb-points {
  font-size: 12.5px;
  font-weight: 750;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  min-width: 64px;
  text-align: right;
}

.rb-pending,
.rb-hidden {
  grid-column: 3 / -1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-3);
}

.rb-hidden {
  color: var(--emerald);
}

.rb-hidden .ic {
  width: 14px;
  height: 14px;
}

.room-week-scroll {
  overflow-x: auto;
}

.room-week-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.room-week-table th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-strong);
}

.room-week-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
}

.room-week-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.room-week-table tr.you td {
  background: var(--gold-soft);
  font-weight: 750;
}

.room-week-table em {
  font-style: normal;
  color: var(--text-3);
}

.room-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.room-leave-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}

.room-leave-confirm .btn-secondary-action {
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-rooms-cta {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 15px;
  border: 1px solid color-mix(in srgb, var(--blue) 45%, transparent);
  background: color-mix(in srgb, var(--blue) 12%, transparent);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out);
}

.btn-rooms-cta span {
  flex: 1;
}

.btn-rooms-cta:hover {
  transform: translateY(-1px);
}

.btn-rooms-cta .ic:first-child {
  color: var(--blue);
}

@media (max-width: 640px) {
  .rooms-forms,
  .room-head {
    grid-template-columns: 1fr;
  }
  .room-title h2 {
    font-size: 24px;
  }
  .room-invite-row {
    flex-wrap: wrap;
  }
  .room-invite-row .rooms-input {
    flex-basis: 100%;
  }
  .rb-row {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 2px 8px;
  }
  .rb-emojis {
    grid-column: 2;
    grid-row: 2;
    font-size: 13px;
  }
  .rb-year {
    grid-column: 3;
    grid-row: 1;
  }
  .rb-points {
    grid-column: 3;
    grid-row: 2;
  }
  .rb-pending,
  .rb-hidden {
    grid-column: 3;
  }
}

/* ==================== 3. ARHIV ==================== */
.archive-header-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px 26px;
  margin-bottom: 14px;
  border-radius: var(--r-xl);
}

.archive-header-card h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 6px 0 4px;
}

.archive-header-card p {
  font-size: 14px;
  color: var(--text-2);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 14px;
}

.cal-month {
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--highlight);
}

.cal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cal-head h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  text-transform: capitalize;
}

.cal-head span {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.cal-wd {
  text-align: center;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-bottom: 4px;
}

.cal-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-family: var(--font-ui);
  color: var(--text-2);
  background: transparent;
  padding: 0;
}

.cal-cell b {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.cal-cell i {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}

.cal-cell.empty {
  visibility: hidden;
}

.cal-cell.off {
  color: var(--text-3);
  opacity: 0.35;
}

.cal-cell.off i {
  display: none;
}

.cal-cell.open {
  cursor: pointer;
  border-style: dashed;
  border-color: var(--line-strong);
  background: var(--surface-2);
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease;
}

.cal-cell.open:hover {
  transform: translateY(-2px);
  border-color: var(--gold-line);
  color: var(--gold);
}

/* zaporedna lestvica enega odtenka: več zlata = dlje doseženo leto */
.cal-cell.played {
  cursor: pointer;
  color: var(--text);
  background: color-mix(in srgb, var(--gold) var(--heat), var(--surface-2));
  border-color: color-mix(in srgb, var(--gold) calc(var(--heat) * 0.8), transparent);
  transition: transform 0.2s var(--ease-out);
}

.cal-cell.played:hover {
  transform: translateY(-2px) scale(1.04);
}

.cal-cell.played.perfect {
  box-shadow: 0 0 14px -2px rgba(251, 191, 36, 0.8);
}

.cal-cell.today {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

[data-tip] {
  position: relative;
}

[data-tip]:hover::after,
[data-tip]:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 20;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

.cal-legend {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  font-size: 12px;
  font-weight: 650;
  color: var(--text-2);
  padding: 4px 4px 0;
}

.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.cal-legend em {
  font-style: normal;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.lg-cell {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  display: inline-block;
}

.lg-cell.open {
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
}

.lg-ramp {
  width: 120px;
  height: 10px;
  border-radius: 5px;
  display: inline-block;
  background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 18%, var(--surface-2)), var(--gold));
}

/* ==================== ZBIRKA MEJNIKOV ==================== */
.menu-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-side .panel {
  flex: 1;
}

.panel-icon.gold {
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
}

.collection-btn:hover {
  border-color: var(--gold-line);
}

.coll-progress {
  width: 150px;
  height: 4px;
  margin-top: 6px;
  border-radius: 4px;
  background: var(--surface-3);
  overflow: hidden;
}

.coll-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-2));
  transition: width 0.6s var(--ease-out);
}

.modal-card.wide {
  max-width: 760px;
}

.modal-sub {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 2px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.coll-card {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
  animation: cardEnter 0.4s var(--ease-out) both;
}

.coll-card.focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft), 0 0 24px -6px var(--gold);
}

.coll-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 220 / 120;
}

.coll-body {
  padding: 10px 12px 12px;
}

.coll-year {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.coll-name {
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 4px;
}

.coll-desc {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.45;
}

.coll-card.locked .coll-year,
.coll-card.locked .coll-name {
  color: var(--text-3);
}

/* ==================== OBVESTILA ==================== */
.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: min(92vw, 380px);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 12px;
  text-align: left;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--gold-line);
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.6), 0 0 26px -10px var(--gold);
  cursor: pointer;
  animation: toastIn 0.5s var(--ease-spring);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.toast.out {
  opacity: 0;
  transform: translateY(10px);
}

.toast-k {
  grid-column: 1;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.toast strong {
  grid-column: 1;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
}

.toast-y {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  color: var(--gold);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: none; }
}

/* ==================== MODALA ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3, 5, 12, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-backdrop.visible {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.modal-backdrop.visible .modal-card {
  animation: modalIn 0.45s var(--ease-spring);
}

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

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  border-radius: var(--r-xl);
  background: var(--surface-solid);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--line);
}

.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-top h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.015em;
}

.btn-close-modal {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-close-modal:hover {
  background: var(--surface-3);
  transform: rotate(90deg);
}

.modal-subhead {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-3);
  margin-bottom: 12px;
}

.stats-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.stat-mini {
  padding: 14px 8px 12px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: center;
}

.stat-mini-val {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.stat-mini-lbl {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 650;
  margin-top: 3px;
}

.dist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12.5px;
}

.dist-label {
  width: 110px;
  color: var(--text-2);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.dist-bar-wrap {
  flex: 1;
  height: 24px;
  border-radius: 8px;
  background: var(--surface-2);
  overflow: hidden;
}

.dist-bar {
  height: 100%;
  min-width: 0;
  padding-right: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-2));
  color: var(--gold-ink);
  font-weight: 900;
  font-size: 11.5px;
  animation: barGrow 0.8s var(--ease-out) both;
  transform-origin: left center;
}

.dist-count {
  width: 24px;
  text-align: right;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.chart-empty {
  font-size: 13px;
  color: var(--text-3);
  padding: 10px 0 18px;
}

.stats-trend {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 22px;
}

.trend-plot {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  height: 150px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(0deg, transparent 0 32.5px, var(--line) 32.5px 33.5px);
  background-position: 0 -20px;
}

.trend-col {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.trend-bar {
  width: min(70%, 22px);
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--gold-2), var(--gold-deep));
  animation: barRise 0.7s var(--ease-out) both;
  transform-origin: bottom;
}

.trend-bar.perfect {
  box-shadow: 0 0 12px -2px var(--gold);
}

.trend-col:hover .trend-bar {
  filter: brightness(1.15);
}

.trend-val {
  font-size: 10px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
  font-variant-numeric: tabular-nums;
}

.trend-x {
  position: absolute;
  bottom: -19px;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-3);
  white-space: nowrap;
}

.trend-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 130px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

@keyframes barRise {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.stats-eras {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 22px;
}

.era-row {
  display: grid;
  grid-template-columns: 112px 1fr 128px;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}

.era-name {
  display: flex;
  gap: 7px;
  align-items: baseline;
  color: var(--text-2);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.era-name b {
  font-family: var(--font-display);
  color: var(--text);
  font-weight: 900;
  min-width: 22px;
}

.era-track {
  height: 10px;
  border-radius: 5px;
  background: var(--surface-3);
  overflow: hidden;
}

.era-fill {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-2));
  animation: barGrow 0.8s var(--ease-out) both;
  transform-origin: left;
}

.era-val {
  text-align: right;
  font-weight: 750;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.era-row.weakest .era-name b {
  color: var(--red);
}

.era-note {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 4px;
}

@keyframes barGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}

.rules-list li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}

.rules-list strong {
  color: var(--text);
}

.rule-icon {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 13%, transparent);
}

.rule-icon.gold { color: var(--gold); background: var(--gold-soft); }
.rule-icon.emerald { color: var(--emerald); background: var(--emerald-soft); }
.rule-icon.red { color: var(--red); background: var(--red-soft); }

/* ==================== ODZIVNOST ==================== */
@media (max-width: 760px) {
  .hero {
    height: 520px;
  }
  .hero-shade {
    background:
      linear-gradient(0deg, rgba(4, 7, 16, 0.96) 0%, rgba(4, 7, 16, 0.82) 42%, rgba(4, 7, 16, 0.1) 72%, transparent 85%);
  }
  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 58px;
  }
  .hero-title {
    font-size: 38px;
  }
  .hero-desc {
    font-size: 14px;
  }
  .btn-hero {
    width: 100%;
  }
  .btn-hero-text {
    flex: 1;
  }
  .hero-eras span {
    font-size: 8.5px;
    letter-spacing: 0.04em;
    padding: 10px 2px 9px;
  }
  .menu-actions-grid,
  .how-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    padding: 10px 14px;
  }
  .brand-subtitle,
  .hide-sm {
    display: none;
  }
  .nav-actions {
    gap: 5px;
  }
  .brand {
    gap: 9px;
  }
  .brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }
  .brand-title h1,
  .brand-title .brand-name {
    font-size: 19px;
  }
  .icon-btn {
    height: 34px;
    padding: 0 9px;
    border-radius: 11px;
  }
  .icon-btn.icon-only,
  #btn-back-menu,
  #btn-open-stats {
    width: 34px;
    padding: 0;
  }
  .container {
    padding: 14px 14px 48px;
  }
  .menu-stats-strip {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }
  .mss-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
  }
  .mss-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .mss-val {
    font-size: 18px;
  }
  .mss-lbl {
    font-size: 11px;
    line-height: 1.25;
  }

  .eraly-canvas-Viewport {
    height: 240px;
  }
  .stage-hud {
    top: 10px;
    left: 10px;
    right: 10px;
  }
  .hud-left {
    gap: 6px;
    padding: 5px;
  }
  .mode-pill {
    display: none;
  }
  .round-dot {
    width: 22px;
    height: 22px;
    font-size: 10.5px;
  }
  .hud-year {
    padding: 6px 10px 7px;
  }
  .jys-value {
    font-size: 22px;
  }
  .jys-max,
  .guess-range-note {
    display: none;
  }
  .flight-cinematic-overlay {
    left: 64%;
    top: 18px;
    min-width: 150px;
    padding: 6px 12px 7px;
  }
  .fco-year-counter {
    font-size: 30px;
  }
  .fco-skip {
    display: none;
  }
  .journey-bar {
    grid-template-columns: 1fr auto;
    gap: 10px 12px;
    padding: 10px 14px 12px;
  }
  .eraly-era-pill {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .jt-mark i {
    display: none;
  }
  .journey-track {
    margin-bottom: 0;
  }

  .event-card {
    padding: 16px 18px 20px;
  }
  .event-title {
    font-size: 23px;
  }
  .event-prompt {
    font-size: 15px;
  }
  .guess-panel,
  .round-result {
    padding: 18px;
  }
  .year-input-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }
  .year-input-wrapper {
    grid-column: 1 / -1;
    order: -1;
  }
  .step-btn {
    width: auto;
    height: 44px;
  }
  .year-input {
    height: 70px;
  }
  .btn-submit-year {
    font-size: 15px;
  }
  .btn-submit-year kbd {
    display: none;
  }
  .result-top-grid {
    grid-template-columns: 1fr 1fr;
  }
  .result-stat-box.accent-gold {
    grid-column: 1 / -1;
  }
  .result-stat-val {
    font-size: 26px;
  }
  .summary-panel {
    padding: 24px 16px 18px;
  }
  #summary-year-reached {
    font-size: 58px;
  }
  .summary-actions {
    grid-template-columns: 1fr;
  }
  .sri-score {
    font-size: 15px;
  }
  .stats-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .archive-header-card {
    padding: 20px;
  }
  .archive-header-card h2 {
    font-size: 25px;
  }
  .archive-grid {
    grid-template-columns: 1fr;
  }
  .cal-month {
    padding: 14px 12px;
  }
  .cal-cell i {
    font-size: 8.5px;
  }
  .era-row {
    grid-template-columns: 86px 1fr 96px;
    gap: 8px;
    font-size: 11.5px;
  }
  .era-name {
    gap: 5px;
    font-size: 9.5px;
    white-space: nowrap;
  }
  .era-name b {
    min-width: 16px;
    font-size: 12px;
  }
  .trend-mm {
    display: none;
  }
  .collection-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .topbar-inner {
    padding: 9px 10px;
    gap: 8px;
  }
  .brand {
    gap: 7px;
  }
  .brand-title h1 {
    font-size: 17px;
  }
  .nav-actions {
    gap: 4px;
  }
  .icon-btn {
    height: 32px;
    padding: 0 7px;
    gap: 4px;
  }
  .icon-btn.icon-only,
  #btn-back-menu,
  #btn-open-stats {
    width: 32px;
  }
  .icon-btn .ic {
    width: 16px;
    height: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* ==================== OGLASI IN SPONZORJI ==================== */
.ad-slot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0;
}

.ad-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.ad-body {
  border-radius: var(--r-md);
  overflow: hidden;
}

/* Rezerviran prostor, da se stran med nalaganjem oglasa ne premakne */
.ad-mode-adsense .ad-body {
  min-height: 250px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
}

.ad-summary {
  margin-bottom: 10px;
}

.modal-card .ad-slot {
  margin-bottom: 0;
}

.sponsor-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s var(--ease-out);
}

a.sponsor-card:hover {
  border-color: var(--gold-line);
  transform: translateY(-1px);
}

.sponsor-logo {
  height: 40px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

.sponsor-text {
  font-size: 12.5px;
  color: var(--text-2);
}

.sponsor-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
}

.sponsor-card.rail {
  flex-direction: column;
  text-align: center;
  padding: 18px 12px;
}

/* Pokončna pasova ob strani: lepljiva, poravnana z vrhom igre */
.ad-rails {
  display: none;
}

@media (min-width: 1320px) {
  .ad-rails:not([hidden]) {
    display: block;
  }
  .ad-rail {
    position: fixed;
    top: 86px;
    width: 160px;
    margin: 0;
    z-index: 5;
  }
  .ad-rail.left {
    left: calc(50% - 470px - 24px - 160px);
  }
  .ad-rail.right {
    right: calc(50% - 470px - 24px - 160px);
  }
  .ad-rail.ad-mode-adsense .ad-body {
    min-height: 600px;
  }
}

body.no-ads .ad-slot,
body.no-ads .ad-rails {
  display: none !important;
}

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

/* ==================== SVETLA TEMA: oder in pot ==================== */
[data-theme="light"] .eraly-stage-card,
[data-theme="light"] .hero {
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(92, 66, 30, 0.18);
}

[data-theme="light"] .journey-bar {
  background: var(--surface-solid);
  border-top: 1px solid var(--line);
}

[data-theme="light"] .eraly-era-pill {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line);
}

[data-theme="light"] .jt-rail {
  background: var(--surface-3);
}

[data-theme="light"] .jt-mark {
  background: var(--line-strong);
}

[data-theme="light"] .jt-mark i {
  color: var(--text-3);
}

[data-theme="light"] .jt-goal {
  color: var(--gold);
}

/* ==================== NOGA IN INFORMATIVNE STRANI ==================== */
.site-footer {
  max-width: 940px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 20px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--text-3);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.site-footer a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
  color: var(--gold);
}

.doc-main {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 20px 56px;
  flex: 1;
}

.doc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 34px 36px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.doc-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.doc-card h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 42px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 14px;
}

.doc-lead {
  font-size: 17px;
  color: var(--text-2);
  margin-bottom: 8px;
}

.doc-card h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin: 30px 0 10px;
}

.doc-card p,
.doc-card li {
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.7;
}

.doc-card p + p {
  margin-top: 10px;
}

.doc-card ul {
  padding-left: 22px;
  margin: 8px 0;
}

.doc-card li + li {
  margin-top: 6px;
}

.doc-card strong {
  color: var(--text);
}

.doc-card a {
  color: var(--gold);
  font-weight: 600;
  text-underline-offset: 3px;
}

.doc-meta {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px !important;
  color: var(--text-3) !important;
}

.doc-contact {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 18px 0 6px;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
}

.doc-contact a {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  word-break: break-all;
}

.doc-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--gold-2), var(--gold-deep));
  color: var(--gold-ink) !important;
  font-weight: 800 !important;
  text-decoration: none;
}

@media (max-width: 640px) {
  .doc-card {
    padding: 24px 20px;
    border-radius: var(--r-lg);
  }
  .site-footer {
    justify-content: center;
    text-align: center;
  }
  .site-footer nav {
    justify-content: center;
  }
}
