/* Memorijal QR — stilovi
   Ton: svijetlo, svečano. Bijela podloga s ornamentalnim uzorkom, script imena, filigranski okvir. */

:root {
  --paper: #FFFFFF;
  --paper-2: #F3F3F3;
  --stone: #DCDCDC;
  --white: #FFFFFF;
  --ink: #2B2B2B;
  --ink-2: #5A5A5A;
  --ink-3: #8C8C8C;
  --accent: #3A3A3A;
  --accent-2: #6E6E6E;
  --accent-soft: rgba(0, 0, 0, .06);
  --flame: #E3A23C;
  --ok: #4C6B4F;
  --danger: #A2433A;
  --line: rgba(0, 0, 0, .12);
  --line-strong: rgba(0, 0, 0, .3);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 10px 30px -14px rgba(0, 0, 0, .25);
  --app-h: 100dvh;
  --font-script: "Great Vibes", "Snell Roundhand", "Brush Script MT", cursive;
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-ui: "Roboto", "Helvetica Neue", Arial, system-ui, sans-serif;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23000' stroke-opacity='.075' stroke-width='1'%3E%3Ccircle cx='80' cy='80' r='9'/%3E%3Ccircle cx='80' cy='80' r='42'/%3E%3Ccircle cx='80' cy='80' r='60'/%3E%3Cellipse cx='80' cy='36' rx='8' ry='20' transform='rotate(0 80 80)'/%3E%3Cellipse cx='80' cy='36' rx='8' ry='20' transform='rotate(30 80 80)'/%3E%3Cellipse cx='80' cy='36' rx='8' ry='20' transform='rotate(60 80 80)'/%3E%3Cellipse cx='80' cy='36' rx='8' ry='20' transform='rotate(90 80 80)'/%3E%3Cellipse cx='80' cy='36' rx='8' ry='20' transform='rotate(120 80 80)'/%3E%3Cellipse cx='80' cy='36' rx='8' ry='20' transform='rotate(150 80 80)'/%3E%3Cellipse cx='80' cy='36' rx='8' ry='20' transform='rotate(180 80 80)'/%3E%3Cellipse cx='80' cy='36' rx='8' ry='20' transform='rotate(210 80 80)'/%3E%3Cellipse cx='80' cy='36' rx='8' ry='20' transform='rotate(240 80 80)'/%3E%3Cellipse cx='80' cy='36' rx='8' ry='20' transform='rotate(270 80 80)'/%3E%3Cellipse cx='80' cy='36' rx='8' ry='20' transform='rotate(300 80 80)'/%3E%3Cellipse cx='80' cy='36' rx='8' ry='20' transform='rotate(330 80 80)'/%3E%3Ccircle cx='150.0' cy='80.0' r='5'/%3E%3Ccircle cx='147.6' cy='98.1' r='5'/%3E%3Ccircle cx='140.6' cy='115.0' r='5'/%3E%3Ccircle cx='129.5' cy='129.5' r='5'/%3E%3Ccircle cx='115.0' cy='140.6' r='5'/%3E%3Ccircle cx='98.1' cy='147.6' r='5'/%3E%3Ccircle cx='80.0' cy='150.0' r='5'/%3E%3Ccircle cx='61.9' cy='147.6' r='5'/%3E%3Ccircle cx='45.0' cy='140.6' r='5'/%3E%3Ccircle cx='30.5' cy='129.5' r='5'/%3E%3Ccircle cx='19.4' cy='115.0' r='5'/%3E%3Ccircle cx='12.4' cy='98.1' r='5'/%3E%3Ccircle cx='10.0' cy='80.0' r='5'/%3E%3Ccircle cx='12.4' cy='61.9' r='5'/%3E%3Ccircle cx='19.4' cy='45.0' r='5'/%3E%3Ccircle cx='30.5' cy='30.5' r='5'/%3E%3Ccircle cx='45.0' cy='19.4' r='5'/%3E%3Ccircle cx='61.9' cy='12.4' r='5'/%3E%3Ccircle cx='80.0' cy='10.0' r='5'/%3E%3Ccircle cx='98.1' cy='12.4' r='5'/%3E%3Ccircle cx='115.0' cy='19.4' r='5'/%3E%3Ccircle cx='129.5' cy='30.5' r='5'/%3E%3Ccircle cx='140.6' cy='45.0' r='5'/%3E%3Ccircle cx='147.6' cy='61.9' r='5'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: #E9E9E9 var(--pattern);
  background-size: 160px 160px;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
}

/* ---------- Ljuska aplikacije (telefon) ---------- */

.app {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.55)),
    var(--pattern),
    var(--paper);
  background-size: auto, 160px 160px, auto;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 720px) {
  :root { --app-h: calc(100vh - 48px); }
  .app {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: 430px;
    height: var(--app-h);
    margin: 24px auto;
    border-radius: 36px;
    border: 1px solid rgba(0, 0, 0, .25);
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5), 0 0 0 8px rgba(0, 0, 0, .04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 20px 28px;
}

.screen-center { align-items: center; text-align: center; }

.spacer { flex: 1; }

/* ---------- Tipografija ---------- */

.h1 {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}

.h2 {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.05;
  margin: 0;
}

.h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  margin: 0;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; color: var(--ink-3); }
.quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 21px;
  line-height: 1.3;
  color: var(--ink-2);
  margin: 0;
}

.prose p { margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }
.prose { font-size: 16px; line-height: 1.65; color: var(--ink); }

.head { display: flex; flex-direction: column; gap: 4px; }
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

/* Ukrasni razdjelnik */
.ornament {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--accent-2);
  width: 100%;
}
.ornament::before, .ornament::after {
  content: ""; flex: 1; max-width: 90px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong));
}
.ornament::after { background: linear-gradient(90deg, var(--line-strong), transparent); }
.ornament svg { width: 54px; height: 16px; flex: none; }

/* ---------- Gumbi ---------- */

.btn {
  appearance: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font: 500 15.5px/1 var(--font-ui);
  letter-spacing: .01em;
  padding: 15px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  transition: transform .12s ease, background .15s ease, opacity .15s ease;
  text-decoration: none;
}
.btn:hover { background: #444; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-block { width: 100%; }
.btn-outline { background: rgba(255,255,255,.7); color: var(--ink); }
.btn-outline:hover { background: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-bronze { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn-bronze:hover { background: var(--accent); }
.btn-dashed { background: rgba(255,255,255,.5); color: var(--ink-2); border-style: dashed; border-color: var(--line-strong); font-weight: 400; }
.btn-dashed:hover { background: #fff; }
.btn-sm { min-height: 38px; padding: 9px 14px; font-size: 14px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }

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

:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- Polja ---------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: flex; gap: 10px; }
.field-row > .field { flex: 1; min-width: 0; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-2); letter-spacing: .02em; }
.field .hint { font-size: 12.5px; color: var(--ink-3); }
.field .error { font-size: 13px; color: var(--danger); }

.input, .select, .textarea {
  width: 100%;
  font: 400 16px/1.3 var(--font-ui);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-height: 48px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder, .textarea::placeholder { color: #A5A5A5; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input.is-invalid { border-color: var(--danger); }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%235A5A5A' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 38px;
}
.textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.counter { font-size: 12.5px; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }

input[type="date"].input { min-height: 48px; }
input[type="file"] { display: none; }

.switch {
  position: relative; width: 44px; height: 26px; flex: none;
  border-radius: 13px; background: var(--stone); border: 0; cursor: pointer;
  transition: background .2s ease;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transition: transform .2s ease;
}
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }

.segmented {
  display: flex; background: var(--paper-2); border-radius: var(--radius-sm); padding: 4px; gap: 4px;
}
.segmented button {
  flex: 1; border: 0; background: transparent; border-radius: 6px; padding: 10px;
  font: 500 14.5px var(--font-ui); color: var(--ink-2); cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.1); }

/* ---------- Kartice, chipovi ---------- */

.card {
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.card-soft { background: var(--paper-2); border-color: transparent; }
.card-selected { border: 2px solid var(--ink); }
.card-dashed { background: rgba(255,255,255,.5); border-style: dashed; border-color: var(--line-strong); box-shadow: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.7);
  border-radius: 999px;
  padding: 7px 13px;
  font: 400 14px var(--font-ui);
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.chip:hover { background: #fff; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.tag {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em;
  padding: 3px 9px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2);
}
.tag-green { background: rgba(76, 107, 79, .12); color: var(--ok); }
.tag-bronze { background: var(--ink); color: #fff; }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

.list-row { display: flex; align-items: center; gap: 12px; }
.list-row .grow { flex: 1; min-width: 0; }

/* ---------- Koraci ---------- */

.steps { display: flex; align-items: center; gap: 8px; }
.steps .bar { flex: 1; height: 3px; border-radius: 2px; background: var(--stone); }
.steps .bar.on { background: var(--ink); }
.steps .label { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: var(--ink-3); margin-left: 6px; }

.wizard-top { display: flex; align-items: center; gap: 10px; }
.back {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--ink);
  flex: none; text-decoration: none;
}
.back:hover { background: var(--paper-2); }

/* ---------- Fotografije (placeholderi) ---------- */

.ph {
  position: relative;
  background: var(--stone);
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .92);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
}
.ph::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, .3));
  pointer-events: none;
}
.ph > * { position: relative; z-index: 1; }
.ph-badge {
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px);
  padding: 4px 8px; border-radius: 999px; font-size: 11.5px;
}
.ph-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--ink);
  display: grid; place-items: center; font-size: 14px;
}

.portrait { width: 96px; height: 96px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--accent-2); }
.portrait-sm { width: 58px; height: 58px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--accent-2); }
.portrait-round { width: 64px; height: 64px; border-radius: 50%; flex: none; }

/* Filigranski okvir oko portreta */
.frame {
  --size: 230px;
  position: relative;
  width: var(--size);
  height: var(--size);
  flex: none;
  margin: 0 auto;
}
.frame .frame-photo {
  position: absolute;
  left: 50%; top: 50%;
  width: 60%; height: 60%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: 0 0 0 4px #fff, 0 0 0 8px #4B4B4B;
}
.frame .frame-photo::after { display: none; }
.frame svg { position: absolute; inset: 0; width: 100%; height: 100%; color: #3F3F3F; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.grid-3 .ph { aspect-ratio: 1; cursor: pointer; border-radius: 6px; }
.grid-3 .ph.is-selected { outline: 3px solid var(--ink); outline-offset: -3px; }
.grid-3 .ph.is-cover::before {
  content: "Naslovna"; position: absolute; left: 6px; top: 6px; z-index: 2;
  background: #fff; color: var(--ink); font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px;
}
.grid-3 .more { background: var(--paper-2); color: var(--ink); font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.grid-3 .more::after { display: none; }

/* ---------- QR ploča ---------- */

.plate {
  --plate-size: 132px;
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 12px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, #d8d8d6 0%, #f4f4f2 38%, #c6c6c3 68%, #e8e8e6 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.8),
    inset 0 -1px 0 rgba(0,0,0,.18),
    0 6px 18px -8px rgba(0, 0, 0, .5);
}
.plate::before {
  content: ""; position: absolute; inset: 5px; border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, .18); pointer-events: none;
}
.plate .screw {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #8f8f8c);
  box-shadow: 0 0 0 1px rgba(0,0,0,.2);
}
.plate .screw:nth-child(1) { top: 7px; left: 7px; }
.plate .screw:nth-child(2) { top: 7px; right: 7px; }
.plate .screw:nth-child(3) { bottom: 7px; left: 7px; }
.plate .screw:nth-child(4) { bottom: 7px; right: 7px; }
.plate .qr {
  width: var(--plate-size); height: var(--plate-size);
  background: #fff; padding: 6px; border-radius: 4px;
}
.plate .qr svg { width: 100%; height: 100%; display: block; }
.plate .engrave {
  font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; color: #4a4a48;
  text-shadow: 0 1px 0 rgba(255,255,255,.7);
  max-width: 180px; text-align: center; line-height: 1.15;
}
.plate-sm { --plate-size: 64px; padding: 10px; gap: 5px; }
.plate-sm .engrave { font-size: 9px; }

/* ---------- Karta groblja ---------- */

.map {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #EDEDED;
  cursor: crosshair;
}
.map svg { display: block; width: 100%; height: auto; }
.map .pin { transition: transform .2s ease; }
.map-note {
  position: absolute; left: 10px; bottom: 8px;
  font-size: 11.5px; color: var(--ink-2);
  background: rgba(255,255,255,.9); padding: 3px 8px; border-radius: 999px;
}

/* ---------- Donja navigacija ---------- */

.tabbar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 4px; border-radius: 10px;
  text-decoration: none; color: var(--ink-3); font-size: 11.5px; font-weight: 500; letter-spacing: .04em;
}
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.is-active { color: var(--ink); }
.tabbar a.is-active svg { color: var(--ink); }

/* ---------- Skeniranje ---------- */

.viewfinder {
  position: relative;
  aspect-ratio: 1;
  border-radius: 18px;
  background:
    radial-gradient(60% 60% at 50% 45%, #444, #1d1d1d);
  overflow: hidden;
  display: grid; place-items: center;
  color: rgba(255,255,255,.6);
  font-size: 13px;
}
.viewfinder .corner {
  position: absolute; width: 34px; height: 34px; border: 3px solid #fff;
}
.viewfinder .corner:nth-child(1) { top: 26px; left: 26px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.viewfinder .corner:nth-child(2) { top: 26px; right: 26px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.viewfinder .corner:nth-child(3) { bottom: 26px; left: 26px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.viewfinder .corner:nth-child(4) { bottom: 26px; right: 26px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.viewfinder .scanline {
  position: absolute; left: 34px; right: 34px; height: 2px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: scan 2.4s ease-in-out infinite;
}
@keyframes scan { 0%, 100% { top: 34px; } 50% { top: calc(100% - 34px); } }

/* ---------- Javni memorijal ---------- */

.cover {
  position: relative;
  min-height: var(--app-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 60px 24px 90px;
  color: var(--ink);
}
.cover .lead {
  font-family: var(--font-script);
  font-size: 44px;
  line-height: 1;
  margin: 0;
  color: var(--ink);
}
.cover .name {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 52px;
  line-height: 1;
  margin: 6px 0 0;
}
.cover .quote { font-size: 20px; max-width: 300px; }
.cover .meta { font-size: 13px; color: var(--ink-3); }
.cover .btn { width: 100%; max-width: 320px; }
.cover-top {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 16px 20px; display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
  color: var(--ink-3);
}

.dates {
  display: flex; justify-content: space-between; gap: 16px; width: 100%; max-width: 330px;
  margin-top: 4px;
}
.dates > div { display: flex; flex-direction: column; gap: 2px; }
.dates > div:first-child { text-align: left; }
.dates > div:last-child { text-align: right; }
.dates b { font-size: 18px; font-weight: 700; }
.dates span { font-size: 14px; color: var(--ink-2); }

.chapters {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 4;
}
.chapters a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--ink-3); padding: 6px 2px; border-radius: 8px;
  font-size: 11.5px; font-weight: 500; letter-spacing: .02em;
}
.chapters a b { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--ink); }
.chapters a:hover { background: var(--paper-2); color: var(--ink); }

.section { padding: 28px 20px; display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 70px; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }

.audio {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: var(--radius);
}
.audio .play {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--ink); color: #fff;
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.audio .track { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.audio .progress { height: 4px; background: var(--paper-2); border-radius: 2px; overflow: hidden; }
.audio .progress i { display: block; height: 100%; width: 0; background: var(--ink); }
.audio .time { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; display: flex; justify-content: space-between; }

.timeline { position: relative; display: flex; flex-direction: column; gap: 22px; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px;
  background: var(--line-strong);
}
.tl-item { position: relative; display: flex; flex-direction: column; gap: 6px; }
.tl-item::before {
  content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; border: 2px solid var(--ink);
}
.tl-item .year { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--ink-3); }
.tl-item .title { font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1.1; }
.tl-item .text { color: var(--ink-2); font-size: 15px; }
.tl-item .ph { height: 96px; }
.tl-photos { display: flex; gap: 6px; }
.tl-photos .ph { flex: 1; height: 84px; }

.memory { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: var(--radius); }
.memory .who { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.memory .who b { font-weight: 700; }
.memory .who span { font-size: 12.5px; color: var(--ink-3); }
.memory p { margin: 0; color: var(--ink-2); }
.memory .ph { height: 110px; }

.tl-editor { display: flex; flex-direction: column; gap: 8px; }
.tl-editor .row { display: flex; gap: 8px; align-items: center; }
.tl-editor .row .input.year { width: 76px; flex: none; text-align: center; }
.tl-editor .remove { width: 36px; height: 36px; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 18px; border-radius: 50%; }
.tl-editor .remove:hover { background: var(--paper-2); color: var(--danger); }

.floatbar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; gap: 8px; padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.floatbar .btn { flex: 1; min-height: 46px; font-size: 14px; padding: 10px 6px; white-space: nowrap; }
.floatbar .btn-icon { flex: none; width: 50px; padding: 10px; }

.flame {
  display: inline-block; width: 10px; height: 14px;
  background: radial-gradient(60% 70% at 50% 65%, #fff3c4 0%, var(--flame) 45%, #c4651f 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  transform-origin: 50% 100%;
  animation: flicker 1.1s ease-in-out infinite alternate;
}
@keyframes flicker {
  from { transform: scale(1) rotate(-3deg); }
  to { transform: scale(1.08, 1.15) rotate(3deg); }
}

/* ---------- Sažetak narudžbe ---------- */

.summary { display: flex; flex-direction: column; gap: 8px; }
.summary .line { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--ink-2); }
.summary .line b { color: var(--ink); font-weight: 700; }
.summary .total { display: flex; justify-content: space-between; border-top: 1px dashed var(--line-strong); padding-top: 10px; margin-top: 2px; }
.summary .total .h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.price { font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1; }
.price small { font-family: var(--font-ui); font-size: 12.5px; font-weight: 400; color: var(--ink-3); margin-left: 4px; }
.plan-title { font-family: var(--font-display); font-size: 26px; font-weight: 600; }

.plan-features { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; font-size: 14.5px; color: var(--ink-2); }
.plan-features li { display: flex; gap: 8px; align-items: flex-start; }
.plan-features li::before { content: ""; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--accent-2); flex: none; }

.check { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }

/* ---------- Sheet (modal) ---------- */

.sheet-wrap {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-wrap .overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.sheet {
  position: relative; width: 100%; max-width: 430px; max-height: 88vh; overflow-y: auto;
  background: #fff var(--pattern); background-size: 160px 160px;
  border-radius: 22px 22px 0 0;
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 16px;
  animation: sheet-in .25s ease-out;
}
@media (min-width: 720px) {
  .sheet { border-radius: 22px; margin-bottom: 40px; }
}
.sheet .handle { width: 40px; height: 4px; border-radius: 2px; background: var(--stone); margin: 0 auto; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 60; max-width: min(380px, calc(100% - 32px));
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px;
  font-size: 14.5px; box-shadow: var(--shadow);
  animation: toast-in .2s ease-out;
}
@keyframes toast-in { from { transform: translate(-50%, 8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ---------- Razno ---------- */

.confirm-qr { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.icon-row { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--paper-2); color: var(--ink);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none;
  border: 1px solid var(--line);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--flame); display: inline-block; margin-right: 6px; }

.lightbox { display: flex; flex-direction: column; gap: 10px; }
.lightbox .ph { height: 260px; border-radius: 12px; }
