/* Fontovi iz foldera fonts/ (bez Google servera, zbog privatnosti). Ako fajlova nema, koriste se rezervni fontovi. */
@font-face { font-family: "Poiret One"; src: url("../fonts/PoiretOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Josefin Sans"; src: url("../fonts/JosefinSans-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Josefin Sans"; src: url("../fonts/JosefinSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Josefin Sans"; src: url("../fonts/JosefinSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("../fonts/PlayfairDisplay-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("../fonts/PlayfairDisplay-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("../fonts/PlayfairDisplay-Italic.ttf") format("truetype"); font-style: italic; font-display: swap; }

:root {
  --paper: #f3e9d2;
  --ink: #1f1812;
  --gold: #c9a45c;
  --gold-light: #e8cf94;
  --accent: #8b2e16;
  --muted: #7a6a55;
  --panel-bg: rgba(243, 233, 210, 0.97);
  --dark-bg: rgba(14, 11, 8, 0.88);
  --font-deco: "Poiret One", "Josefin Sans", "Century Gothic", sans-serif;
  --font-geo: "Josefin Sans", "Century Gothic", "Segoe UI", sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; font-family: var(--font-serif); color: var(--ink); background: #0b0908; }
.hidden { display: none !important; }

/* ---------- Mapa i slojevi efekata ---------- */
#map { position: absolute; inset: 0; }
#map .maplibregl-canvas { filter: sepia(0.55) contrast(0.95) brightness(0.95); }

#season-grade, #weather-fx, #film-grain, #vignette { position: absolute; inset: 0; pointer-events: none; }
#season-grade { z-index: 3; mix-blend-mode: multiply; opacity: 0; transition: background-color 2.5s ease, opacity 2.5s ease; }
#weather-fx { z-index: 4; }
#film-grain { z-index: 5; opacity: 0.09; mix-blend-mode: overlay; }
#vignette {
  z-index: 6;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%);
  animation: flicker 6s infinite;
}
@keyframes flicker {
  0%, 100% { opacity: 1; } 47% { opacity: 1; } 48% { opacity: 0.85; } 49% { opacity: 1; }
  72% { opacity: 0.93; } 73% { opacity: 1; }
}

/* ---------- Art Deco kartica (uvod i kraj) ---------- */
#intro {
  /* fixed + inset 0 = tačno vidljivi deo ekrana (i na telefonu sa adresnom trakom); ceo uvod se skroluje */
  position: fixed; inset: 0; z-index: 30;
  display: flex; padding: 1.5rem; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: radial-gradient(ellipse at center, rgba(10,8,6,0.35) 0%, rgba(10,8,6,0.88) 75%);
}
.deco-card {
  position: relative; width: min(720px, 94vw);
  background: var(--dark-bg);
  border: 1px solid var(--gold);
  outline: 1px solid rgba(201,164,92,0.35); outline-offset: 6px;
  padding: 2.6rem 2.4rem 2.2rem; text-align: center; color: var(--paper);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: rise 1.2s ease-out both;
}
.deco-card.small { width: min(420px, 92vw); padding: 2rem; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.deco-corner { position: absolute; width: 22px; height: 22px; border-color: var(--gold); border-style: solid; }
.deco-corner.tl { top: -8px; left: -8px; border-width: 2px 0 0 2px; }
.deco-corner.tr { top: -8px; right: -8px; border-width: 2px 2px 0 0; }
.deco-corner.bl { bottom: -8px; left: -8px; border-width: 0 0 2px 2px; }
.deco-corner.br { bottom: -8px; right: -8px; border-width: 0 2px 2px 0; }

.deco-kicker { font-family: var(--font-geo); letter-spacing: 0.35em; text-transform: uppercase; font-size: 0.75rem; color: var(--gold); margin: 0 0 1.4rem; }
/* Uvod: pisci */
.intro-title { font-family: var(--font-deco); font-weight: 400; font-size: clamp(2rem, 6vw, 3rem); color: var(--gold-light); margin: 0 0 1.6rem; text-shadow: 0 2px 18px rgba(201,164,92,0.35); }
.writer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.9rem; }
.writer-card {
  display: flex; flex-direction: column; gap: 0.3rem; text-align: left; cursor: pointer;
  background: rgba(201,164,92,0.06); border: 1px solid rgba(201,164,92,0.45); color: var(--paper);
  padding: 1rem 1.1rem; transition: all 0.25s ease;
}
.writer-card:hover { background: rgba(201,164,92,0.16); border-color: var(--gold); transform: translateY(-2px); }
.w-name { font-family: var(--font-deco); font-size: 1.45rem; color: var(--gold-light); line-height: 1.1; }
.w-years { font-family: var(--font-geo); font-size: 0.75rem; letter-spacing: 0.15em; color: var(--gold); }
.w-tag { font-style: italic; font-size: 0.88rem; color: #d9ceb6; }
.w-count { font-family: var(--font-geo); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-top: 0.3rem; }

/* Uvod: dela */
#view-works .back { color: var(--gold); display: block; margin: 0 auto 1rem; }
.work-list { }
.work-card + .work-card { margin-top: 1.8rem; padding-top: 1.8rem; border-top: 1px solid rgba(201,164,92,0.3); }
/* ---------- Učitavanje: knjiga koja lista stranice ---------- */
#intro.loading .deco-card { display: none; }
#loader { margin: auto; display: none; flex-direction: column; align-items: center; gap: 1.2rem; transition: opacity 0.4s ease; }
#intro.loading #loader { display: flex; }
.book { position: relative; width: 132px; height: 88px; perspective: 700px; }
.book::before, .book::after { content: ""; position: absolute; top: 0; width: 50%; height: 100%; background: var(--paper);
  border: 1px solid var(--gold); box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
.book::before { left: 0; border-right: none; background: linear-gradient(90deg, #e8dcc0, var(--paper)); }
.book::after { right: 0; border-left: 1px solid rgba(139,46,22,0.4); background: linear-gradient(270deg, #e8dcc0, var(--paper)); }
.book .page { position: absolute; top: 2px; left: 50%; width: calc(50% - 2px); height: calc(100% - 4px); z-index: 2;
  transform-origin: left center; background: #f8f1e0; border: 1px solid rgba(201,164,92,0.6);
  background-image: repeating-linear-gradient(180deg, transparent 0 9px, rgba(31,24,18,0.12) 9px 10px);
  animation: flip 2.4s ease-in-out infinite; backface-visibility: visible; }
.book .p2 { animation-delay: 0.4s; }
.book .p3 { animation-delay: 0.8s; }
@keyframes flip { 0%, 15% { transform: rotateY(0deg); } 60%, 100% { transform: rotateY(-180deg); } }
.loader-text { font-family: var(--font-geo); letter-spacing: 0.35em; text-transform: uppercase; font-size: 0.75rem; color: var(--gold); margin: 0;
  animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .book .page, .loader-text { animation: none; } }

/* margin: auto centrira karticu kad staje, a kad ne staje skroluje se ceo uvod (bez odsecanja vrha) */
.deco-card { margin: auto; }
#intro { scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
.upcoming { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid rgba(201,164,92,0.3); text-align: left; }
.upcoming-title { font-family: var(--font-geo); text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.75rem; color: var(--gold); text-align: center; margin: 0 0 0.8rem; }
.upcoming ul { list-style: none; margin: 0; padding: 0; }
.upcoming li { display: flex; justify-content: space-between; padding: 0.35rem 0; border-bottom: 1px dotted rgba(201,164,92,0.25); color: #bfb29a; font-style: italic; }
.upcoming .y { font-family: var(--font-geo); font-style: normal; font-size: 0.8rem; color: var(--gold); }
.scene-card + .scene-card { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid rgba(201,164,92,0.3); }
.scene-title {
  font-family: var(--font-deco); font-weight: 400; margin: 0;
  font-size: clamp(2.3rem, 7vw, 3.6rem); line-height: 1.05; color: var(--gold-light);
  letter-spacing: 0.04em; text-shadow: 0 2px 18px rgba(201,164,92,0.35);
}
.scene-writer { font-family: var(--font-geo); text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.9rem; color: var(--paper); margin: 1rem 0 0.3rem; }
.scene-meta { font-family: var(--font-geo); font-size: 0.85rem; color: var(--gold); letter-spacing: 0.15em; margin: 0 0 1.2rem; }
.deco-rule { width: 120px; height: 1px; margin: 0 auto 1.2rem; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.scene-text { font-family: var(--font-serif); font-style: italic; font-size: 1.05rem; line-height: 1.55; color: #e9dfc8; margin: 0 0 1.8rem; }

.deco-btn {
  font-family: var(--font-geo); text-transform: uppercase; letter-spacing: 0.25em; font-size: 0.9rem;
  color: var(--ink); background: linear-gradient(180deg, var(--gold-light), var(--gold));
  border: none; padding: 0.9rem 2.2rem; cursor: pointer; position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, letter-spacing 0.3s ease;
}
.deco-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,164,92,0.4); letter-spacing: 0.32em; }

/* ---------- Link ka stranici O sajtu ---------- */
.info-link { display: block; margin-top: 1.6rem; font-family: var(--font-geo); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: #a8987a; text-decoration: none; }
.info-link:hover { color: var(--gold); }

/* ---------- Potpis muzike ---------- */
#music-credit {
  position: absolute; top: 3.9rem; left: 1rem; z-index: 10; max-width: min(320px, 70vw);
  font-family: var(--font-geo); font-size: 0.7rem; line-height: 1.35; color: var(--gold-light);
  background: var(--dark-bg); border: 1px solid rgba(201,164,92,0.5); padding: 0.35rem 0.6rem;
  opacity: 0; transform: translateY(-4px); transition: opacity 0.6s ease, transform 0.6s ease; pointer-events: none;
}
#music-credit.show { opacity: 1; transform: none; }
#music-credit:empty { display: none; }

/* ---------- Gornja traka ---------- */
#topbar {
  position: absolute; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 10;
  background: var(--dark-bg); border: 1px solid var(--gold); color: var(--paper);
  padding: 0.55rem 1.6rem; text-align: center; min-width: 240px;
}
#current-date { font-family: var(--font-deco); font-size: 1.7rem; color: var(--gold-light); letter-spacing: 0.05em; }
#current-date { transition: opacity 0.28s ease; }
#current-date.fade { opacity: 0; }
#countdown { font-family: var(--font-geo); font-size: 0.8rem; letter-spacing: 0.12em; color: var(--gold); }

/* ---------- Dugmad gore levo ---------- */
#toggles { position: absolute; top: 1rem; left: 1rem; z-index: 10; display: flex; gap: 0.4rem; }
#toggles button, #controls button {
  background: var(--dark-bg); color: var(--gold-light); border: 1px solid var(--gold);
  width: 2.4rem; height: 2.4rem; cursor: pointer; font-size: 1rem;
}
#toggles button:hover, #controls button:hover { background: var(--gold); color: var(--ink); }
#toggles button.off { opacity: 0.45; }
#toggles .text-btn { width: auto; padding: 0 0.9rem; font-family: var(--font-geo); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- Kartica ---------- */
#panel {
  position: absolute; top: 6.5rem; right: 1rem; width: min(400px, 92vw); max-height: calc(100vh - 16rem); z-index: 10;
  background: var(--panel-bg); padding: 1.4rem 1.5rem; overflow-y: auto;
  border-top: 4px solid var(--accent); box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  animation: slideIn 0.6s ease-out both;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
#panel-close { position: absolute; top: 0.3rem; right: 0.6rem; background: none; border: none; font-size: 1.7rem; cursor: pointer; color: var(--muted); }
#panel h2 { margin: 0.2rem 0 0.6rem; font-size: 1.35rem; line-height: 1.25; }
#panel .date { font-family: var(--font-geo); color: var(--accent); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; margin: 0; }
#panel .note { background: rgba(139,46,22,0.08); border-left: 3px solid var(--accent); padding: 0.45rem 0.7rem; font-size: 0.85rem; }
#panel .sources { font-size: 0.8rem; color: var(--muted); border-top: 1px solid rgba(0,0,0,0.12); margin-top: 1rem; padding-top: 0.6rem; }
#panel .sources ul { padding-left: 1.1rem; margin: 0.3rem 0 0; }
#panel .sources a { color: var(--accent); }
#panel .debug { color: #b35c00; font-size: 0.75rem; font-family: monospace; }
#panel .place-line { font-family: var(--font-geo); font-size: 0.8rem; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
#panel .kind { display: inline-block; background: #2f4a5c; color: var(--paper); padding: 0.1rem 0.45rem; margin-right: 0.5rem; font-size: 0.65rem; letter-spacing: 0.12em; }
#panel.world { border-top-color: #2f4a5c; }

/* Kraj priče (unutar kartice) */
.end-block { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 2px solid var(--ink); text-align: center; }
.end-title { font-family: var(--font-deco); font-size: 1.6rem; margin: 0 0 0.3rem; color: var(--accent); }
.end-text { font-style: italic; font-size: 0.9rem; margin: 0 0 1rem; }
.end-actions { display: flex; gap: 0.8rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.deco-btn.small { padding: 0.6rem 1.3rem; font-size: 0.75rem; }
.link-btn { background: none; border: none; cursor: pointer; font-family: var(--font-geo); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Novinski isečak */
#panel.newspaper { background: #efe6d0; border-top: none; font-family: var(--font-serif); }
#panel.newspaper .masthead {
  font-family: "Old English Text MT", "UnifrakturMaguntia", var(--font-serif); font-size: 1.7rem; text-align: center;
  border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); padding: 0.3rem 0; margin: 0.6rem 0 0.4rem;
}
#panel.newspaper .masthead-sub { display: flex; justify-content: space-between; font-family: var(--font-geo); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; border-bottom: 1px solid var(--ink); padding-bottom: 0.3rem; margin-bottom: 0.8rem; }
#panel.newspaper h2 { text-align: center; font-size: 1.45rem; font-weight: 700; }
#panel.newspaper .body { column-count: 1; text-align: justify; hyphens: auto; }

/* ---------- Donji deo ---------- */
#bottom { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; z-index: 10; }
#controls { display: flex; align-items: center; gap: 0.4rem; background: var(--dark-bg); border: 1px solid var(--gold); padding: 0.45rem 0.6rem; }
#controls .nav-btn { width: auto; padding: 0 1rem; font-family: var(--font-geo); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
#progress { font-family: var(--font-geo); font-size: 0.8rem; color: var(--gold); letter-spacing: 0.1em; min-width: 3.2rem; text-align: center; }
#controls button:disabled { opacity: 0.35; cursor: default; }
#countdown:empty, #gap-pill:empty { display: none; }
#btn-next.hint, #btn-sound.hint { animation: hint 1.6s ease-in-out infinite; }
@keyframes hint { 0%, 100% { box-shadow: 0 0 0 0 rgba(201,164,92,0.7); } 50% { box-shadow: 0 0 0 8px rgba(201,164,92,0); } }
#time-slider { flex: 1; margin-left: 0.6rem; accent-color: var(--gold); }

#chapter-strip { display: flex; gap: 0.5rem; overflow-x: auto; padding-top: 0.5rem; scrollbar-width: thin; }
.chapter-chip {
  flex: 0 0 auto; max-width: 230px; text-align: left; cursor: pointer;
  background: rgba(14,11,8,0.78); color: var(--paper); border: 1px solid rgba(201,164,92,0.4);
  padding: 0.4rem 0.7rem; font-family: var(--font-geo); transition: all 0.2s ease;
}
.chapter-chip .d { display: block; font-size: 0.68rem; letter-spacing: 0.1em; color: var(--gold); text-transform: uppercase; }
.chapter-chip .t { display: block; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chapter-chip:hover { border-color: var(--gold); }
.chapter-chip.active { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.chapter-chip.active .d { color: var(--accent); }
.chapter-chip.done { opacity: 0.6; }
.chapter-chip.world { border-color: rgba(120,160,190,0.5); }
.chapter-chip.world .d { color: #9cc0d8; }
.chapter-chip.world.active { background: #9cc0d8; border-color: #9cc0d8; }
.chapter-chip.world.active .d { color: #1f3646; }

/* "X dana kasnije" */
/* Razmak između prethodne i ove tačke ("11 meseci kasnije"); stoji uvek ispod gornje trake */
#gap-pill {
  position: absolute; top: calc(100% + 0.6rem); left: 50%; transform: translate(-50%, -8px); z-index: 11; white-space: nowrap;
  font-family: var(--font-deco); font-size: 1.5rem; color: var(--gold-light); letter-spacing: 0.08em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.9); opacity: 0; pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#gap-pill.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Markeri ---------- */
.marker {
  width: 18px; height: 18px; border-radius: 50%; cursor: pointer;
  background: var(--accent); border: 2px solid var(--paper);
  animation: pulse 2.2s infinite;
}
.marker.world { background: #2f4a5c; }
.marker.active { width: 24px; height: 24px; background: var(--gold); border-color: var(--ink); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(201,164,92,0.75); }
  70% { box-shadow: 0 0 0 16px rgba(201,164,92,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,164,92,0); }
}


/* ---------- Početna: jezik, kartice, na današnji dan, po godini ---------- */
.intro-head { position: relative; }
.lang-switch { position: absolute; top: -0.2rem; right: 0; font-family: var(--font-geo); font-size: 0.75rem; letter-spacing: 0.15em; }
.lang-switch a { color: #a8987a; text-decoration: none; padding: 0.2rem 0.3rem; }
.lang-switch a:hover { color: var(--gold-light); }
.lang-switch .active { color: var(--gold-light); padding: 0.2rem 0.3rem; border-bottom: 1px solid var(--gold); }
.lang-switch .sep { color: rgba(201,164,92,0.5); }
.intro-tabs { display: flex; justify-content: center; margin: -0.4rem auto 1.6rem; width: fit-content; border: 1px solid var(--gold); }
.intro-tabs button {
  background: transparent; border: none; cursor: pointer; padding: 0.65rem 1.4rem;
  font-family: var(--font-geo); text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.8rem; color: var(--gold-light);
  transition: background 0.2s ease, color 0.2s ease;
}
.intro-tabs button + button { border-left: 1px solid var(--gold); }
.intro-tabs button:hover { background: rgba(201,164,92,0.18); }
.intro-tabs button.active { background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--ink); cursor: default; }

.today-box { text-align: left; margin: 0 0 1.6rem; }
.today-title { font-family: var(--font-geo); text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.7rem; color: var(--gold); margin: 0 0 0.4rem; }
.today-item, .year-item {
  position: relative; display: flex; flex-direction: column; gap: 0.15rem; width: 100%; text-align: left; cursor: pointer;
  background: rgba(201,164,92,0.06); border: 1px solid rgba(201,164,92,0.35); margin: 0 0 0.5rem; padding: 0.6rem 2.6rem 0.6rem 0.8rem; color: var(--paper);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.today-item::after, .year-item::after {
  content: "›"; position: absolute; right: 0.8rem; top: 50%; transform: translateY(-50%);
  font-family: var(--font-geo); font-size: 1.6rem; color: var(--gold); transition: transform 0.2s ease;
}
.today-item:hover, .year-item:hover { background: rgba(201,164,92,0.16); border-color: var(--gold); }
.today-item:hover::after, .year-item:hover::after { transform: translate(4px, -50%); }
.today-item:hover .ti-title, .year-item:hover .yi-title { color: var(--gold-light); }
.ti-when, .yi-date { font-family: var(--font-geo); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.ti-title, .yi-title { font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.3; transition: color 0.2s ease; }
.ti-meta, .yi-meta { font-family: var(--font-serif); font-style: italic; font-size: 0.85rem; color: #bfb29a; }
.year-item .kind, .today-item .kind { display: inline-block; background: #2f4a5c; color: var(--paper); padding: 0.05rem 0.4rem; margin-right: 0.5rem; font-size: 0.6rem; letter-spacing: 0.12em; }

.year-picker { display: flex; justify-content: center; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.yp-step { background: none; border: 1px solid var(--gold); color: var(--gold-light); width: 2.4rem; height: 2.4rem; font-size: 1.3rem; cursor: pointer; }
.yp-step:hover { background: var(--gold); color: var(--ink); }
.yp-input {
  width: 6.5rem; text-align: center; background: transparent; color: var(--gold-light); border: none; border-bottom: 1px solid var(--gold);
  font-family: var(--font-deco); font-size: 2rem; -moz-appearance: textfield; appearance: textfield;
}
.yp-input::-webkit-outer-spin-button, .yp-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.decade-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; margin-bottom: 0.6rem; }
.decade-chip { background: none; border: none; border-bottom: 1px solid transparent; color: #a8987a; font-family: var(--font-geo); font-size: 0.78rem; letter-spacing: 0.08em; padding: 0.3rem 0.45rem; cursor: pointer; }
.decade-chip:hover { color: var(--gold-light); }
.decade-chip.active { color: var(--gold-light); border-bottom-color: var(--gold); }
.year-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; margin-bottom: 1.2rem; }
.year-chip { background: none; border: 1px solid rgba(201,164,92,0.4); color: #d9ceb6; font-family: var(--font-geo); font-size: 0.75rem; letter-spacing: 0.08em; padding: 0.25rem 0.5rem; cursor: pointer; }
.year-chip:hover { border-color: var(--gold); color: var(--gold-light); }
.year-chip.active { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.year-results { text-align: left; }
.yr-h { font-family: var(--font-geo); text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.7rem; color: var(--gold); margin: 1rem 0 0.4rem; }
.yr-alive { font-family: var(--font-serif); color: var(--paper); margin: 0; }
.yr-alive span { color: #a8987a; font-size: 0.85rem; }
.yr-none { font-style: italic; color: #bfb29a; text-align: center; margin: 1.2rem 0 0.6rem; }

.text-link { display: block; margin-top: 0.9rem; font-family: var(--font-geo); font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: #a8987a; }
.text-link:hover { color: var(--gold); }
.intro-foot { margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.4rem; }
.intro-foot .info-link { display: inline; margin: 0; }

/* Traka dok radi ▶ (ističe zdesna nalevo) i dugme Dalje */
.hold { display: flex; align-items: center; gap: 0.8rem; margin-top: 1rem; padding-top: 0.7rem; border-top: 1px solid rgba(0,0,0,0.12); }
#panel .hold { position: sticky; bottom: -1.4rem; background: var(--panel-bg); padding-bottom: 0.9rem; margin-bottom: -0.5rem; }
#panel.newspaper .hold { background: #efe6d0; }
.hold-track { flex: 1; height: 3px; background: rgba(139,46,22,0.15); }
.hold-fill { width: 100%; height: 100%; background: var(--accent); transition-property: width; transition-timing-function: linear; }
.hold-skip { font-family: var(--font-geo); font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; cursor: pointer;
  background: none; border: 1px solid var(--accent); color: var(--accent); padding: 0.35rem 0.9rem; }
.hold-skip:hover { background: var(--accent); color: var(--paper); }

/* ---------- O vremenu (brojke i reči) ---------- */
#panel.era { border-top-color: var(--gold); }
#panel .era-h { font-family: var(--font-geo); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.72rem; color: var(--accent); margin: 1.2rem 0 0.6rem; }
.num-grid { display: grid; gap: 0.6rem; }
.num-card { border-left: 3px solid var(--gold); padding: 0.3rem 0.7rem; background: rgba(201,164,92,0.1); }
.num-value { font-family: var(--font-deco); font-size: 1.6rem; line-height: 1.1; color: var(--ink); }
.num-label { font-size: 0.9rem; }
.num-note { font-size: 0.8rem; font-style: italic; color: var(--muted); margin-top: 0.2rem; }
.num-src { font-size: 0.72rem; color: var(--muted); margin-top: 0.25rem; }
.num-src a { color: var(--accent); }
.word-list { margin: 0; }
.word-list dt { font-family: var(--font-serif); font-weight: 700; font-size: 1.05rem; margin-top: 0.8rem; }
.word-list dd { margin: 0.15rem 0 0; font-size: 0.9rem; }
.word-list .wl { font-family: var(--font-geo); font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-right: 0.3rem; }
.end-pdf { text-align: center; margin: 1rem 0 0; }
.pdf-link { font-family: var(--font-geo); font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); }

@media (max-width: 700px) {
  #music-credit { top: auto; bottom: 8.8rem; left: 0.5rem; right: 0.5rem; max-width: none; text-align: center; }
  #time-slider { display: none; }
  #controls { justify-content: center; }
  #controls .nav-btn { flex: 1; }
  #panel { top: auto; bottom: 9.5rem; left: 0.5rem; right: 0.5rem; width: auto; max-height: 42vh; }
  #topbar { top: 3.8rem; min-width: 0; padding: 0.4rem 1rem; }
  #current-date { font-size: 1.3rem; }
  #gap-pill { font-size: 1.1rem; }
  #intro { padding: 1.2rem 0.8rem; }
  .deco-card { padding: 2rem 1.3rem 1.8rem; }
  #toggles { left: 0.5rem; gap: 0.3rem; }
  #toggles .text-btn { padding: 0 0.55rem; letter-spacing: 0.06em; font-size: 0.72rem; }
  .intro-tabs button { padding: 0.6rem 1rem; letter-spacing: 0.15em; }
  .intro-foot { flex-direction: column; align-items: center; gap: 0.7rem; }
  .lang-switch { position: static; text-align: center; margin: -0.8rem 0 1rem; }
}
