/* eSmrtovnice — public site. Hand-written, no build step.
   Memorial Card system: warm paper, brass as the only accent, Lora for the
   person, Inter for the interface, religion colour as the card frame. */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/8e9860b6e62d6359-s.p.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/e4af272ccee01ff0-s.p.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Lora;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/_next/static/media/08aedeceaf1dcd57-s.p.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Lora;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/_next/static/media/5c0c2bcbaa4149ca-s.p.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f8f5ef;
  --card: #fffefb;
  --sunk: #f2ede4;
  --ink: #26221d;
  --ink-soft: #4a433a;
  --muted: #6f665b;
  --line: #e6dfd3;
  --line-strong: #d6cdbe;
  --brass: #b08d57;
  --brass-ink: #86662f; /* brass dark enough for text: 5:1 on card */
  --brass-soft: #f4ecdf;
  --lit: #fdf4e6;
  --danger: #9b3a36;
  --ok: #2e7d4f;
  --serif: Lora, Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 6px;
  --r: 12px;
  --shadow: 0 1px 2px rgba(38, 34, 29, 0.04), 0 4px 16px rgba(38, 34, 29, 0.06);
  --shadow-lift: 0 2px 4px rgba(38, 34, 29, 0.05), 0 12px 28px rgba(38, 34, 29, 0.1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --frame: #5c6650;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
}

/* ---------- base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img,
svg,
iframe {
  display: block;
  max-width: 100%;
}
input,
select,
textarea,
button {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
ul,
ol {
  padding: 0;
}
ul {
  list-style: none;
}
[hidden],
.hidden {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--brass-ink);
  outline-offset: 2px;
  border-radius: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--card);
  border-radius: var(--r-sm);
  text-decoration: none;
}
.skip-link:focus {
  top: 8px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap-narrow {
  max-width: 760px;
}
main {
  flex: 1;
  width: 100%;
  padding-bottom: 56px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary,
.btn-brass {
  background: var(--brass-ink);
  color: #fff;
}
.btn-primary:hover,
.btn-brass:hover {
  background: #6f5426;
}
.btn-outline,
.btn-ghost {
  background: var(--card);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-outline:hover,
.btn-ghost:hover {
  border-color: var(--brass);
  color: var(--brass-ink);
}
.btn-ink {
  background: var(--ink);
  color: var(--card);
}
.btn-ink:hover {
  background: #000;
}
.btn-sm {
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.9375rem;
}
.btn-block {
  width: 100%;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 254, 251, 0.96);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.brand img {
  width: 34px;
  height: 34px;
  filter: brightness(0);
  opacity: 0.85;
}
.brand span {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a:not(.btn) {
  display: block;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.975rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.nav-links a:not(.btn):hover {
  color: var(--ink);
  background: var(--sunk);
}
.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0 6px 0 10px;
  padding: 0 16px 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.975rem;
  color: var(--ink-soft);
}
.search-btn:hover {
  border-color: var(--brass);
  color: var(--ink);
}
.icon-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: none;
}
.icon-btn:hover {
  background: var(--sunk);
}
.icon-btn .icon {
  width: 24px;
  height: 24px;
}

@media (max-width: 960px) {
  .site-header .wrap {
    height: 60px;
    gap: 4px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .icon-btn {
    display: inline-flex;
  }
  #nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px var(--gutter) 20px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lift);
  }
  #nav-menu.is-open {
    display: flex;
  }
  #nav-menu a:not(.btn) {
    padding: 14px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.0625rem;
    color: var(--ink);
  }
  #nav-menu a:not(.btn):hover {
    background: none;
    color: var(--brass-ink);
  }
  #nav-menu .search-btn {
    display: none;
  }
  #nav-menu .nav-cta {
    margin-top: 16px;
    min-height: 50px;
  }
}

/* ---------- search dialog ---------- */

#search-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 16px;
  background: rgba(38, 34, 29, 0);
  transition: background-color 0.2s;
  overflow-y: auto;
}
#search-drawer.is-open {
  background: rgba(38, 34, 29, 0.5);
}
.search-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  padding: 28px 24px 24px;
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.25s var(--ease);
}
#search-drawer.is-open .search-panel {
  opacity: 1;
  transform: none;
}
.search-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.search-panel > p {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-bottom: 20px;
}
.search-panel form {
  display: grid;
  gap: 16px;
}
.search-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex !important;
}
@media (max-width: 600px) {
  #search-drawer {
    align-items: flex-end;
    padding: 0;
  }
  .search-panel {
    border-radius: var(--r) var(--r) 0 0;
    transform: translateY(24px);
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}

/* ---------- forms ---------- */

.field {
  display: grid;
  gap: 6px;
}
.field-label,
.field > label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.field-input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 1.0625rem;
  line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.field-input {
  min-height: 132px;
  resize: vertical;
}
select.field-input {
  appearance: none;
  padding-right: 44px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%234a433a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.field-input:hover {
  border-color: #c4b9a7;
}
.field-input:focus {
  outline: none;
  border-color: var(--brass-ink);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.22);
}
.field-input::placeholder {
  color: #9a9084;
}
.field-input[aria-invalid="true"] {
  border-color: var(--danger);
}
.field-error {
  color: var(--danger);
  font-size: 0.9375rem;
}
.field-help {
  color: var(--muted);
  font-size: 0.875rem;
}
.form-status {
  font-size: 0.9375rem;
  padding: 12px 14px;
  border-radius: var(--r-sm);
}
.form-status:empty {
  display: none;
}
.form-status.is-error {
  background: #f8ebe9;
  color: var(--danger);
}
.form-status.is-ok {
  background: #e9f3ec;
  color: var(--ok);
}

/* ---------- page heads ---------- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 20px;
  font-size: 0.9rem;
  color: var(--muted);
}
.crumbs a {
  color: var(--ink-soft);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--brass-ink);
  text-decoration: underline;
}
.crumbs [aria-current] {
  color: var(--ink);
}
.page-head {
  padding: 36px 0 28px;
}
.page-head.center {
  text-align: center;
}
.eyebrow {
  display: block;
  margin-bottom: 10px;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-ink);
}
.page-head h1 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  letter-spacing: -0.015em;
}
.page-head .lede {
  margin-top: 12px;
  max-width: 62ch;
  font-size: 1.0625rem;
  color: var(--ink-soft);
}
.page-head.center .lede {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- home: masthead + day navigation ---------- */

.masthead {
  display: grid;
  gap: 24px;
  padding: 36px 0 8px;
}
.masthead-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.masthead h1 {
  font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.25rem);
  letter-spacing: -0.02em;
}
.masthead .lede {
  margin-top: 10px;
  max-width: 60ch;
  color: var(--ink-soft);
}
.quick-search {
  display: flex;
  align-items: center;
  width: min(100%, 420px);
  min-height: 52px;
  padding: 4px 4px 4px 16px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.quick-search:focus-within {
  border-color: var(--brass-ink);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.22);
}
.quick-search .icon {
  color: var(--muted);
}
.quick-search input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 10px;
  border: 0;
  background: none;
  font-size: 1.0625rem;
}
.quick-search input:focus {
  outline: none;
}
.quick-search .btn {
  min-height: 44px;
  padding: 0 18px;
}

.day-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.day-nav-title {
  text-align: center;
  min-width: 0;
}
.day-nav-title h2 {
  font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem);
}
.day-nav-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.day-nav-picker input[type="date"] {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.day-nav-picker input[type="date"]:focus {
  outline: none;
  border-color: var(--brass-ink);
}
.day-nav-today {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--brass-soft);
  color: var(--brass-ink);
}
a.day-nav-today:hover {
  background: #eadcc4;
}
.day-nav-today.is-today {
  background: none;
  color: var(--muted);
  font-weight: 500;
}
.day-nav-filter {
  margin-top: 8px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.day-nav-filter a {
  color: var(--brass-ink);
}
.day-nav-btn {
  min-height: 48px;
}
.day-nav-disabled {
  display: inline-flex;
  align-items: center;
  padding: 0 22px;
  color: var(--line-strong);
  font-weight: 600;
}
.day-nav .arrow-only {
  display: none;
}
@media (max-width: 640px) {
  .day-nav {
    grid-template-columns: 48px 1fr 48px;
    gap: 6px;
    padding: 12px 8px;
  }
  .day-nav-btn,
  .day-nav-disabled {
    width: 48px;
    padding: 0;
    justify-content: center;
  }
  .day-nav .arrow-label {
    display: none;
  }
  .day-nav .arrow-only {
    display: inline;
    font-size: 1.4rem;
    line-height: 1;
  }
  .masthead-top {
    align-items: stretch;
  }
  .quick-search {
    width: 100%;
  }
}

.results-line {
  padding: 4px 0;
  color: var(--ink-soft);
}
.results-line strong {
  color: var(--ink);
}
.results-line a {
  color: var(--brass-ink);
  margin-left: 6px;
}

/* ---------- memorial cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 20px;
  padding: 24px 0;
}
.smrtovnica.mcard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 22px 22px;
  background: var(--card);
  border: 1.5px solid var(--frame);
  border-radius: var(--r-sm);
  /* inner rule — the printed-notice double frame */
  box-shadow: inset 0 0 0 5px var(--card), inset 0 0 0 6px color-mix(in srgb, var(--frame) 28%, transparent), var(--shadow);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.smrtovnica.mcard:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 5px var(--card), inset 0 0 0 6px color-mix(in srgb, var(--frame) 28%, transparent), var(--shadow-lift);
}
.mcard-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 24px;
  margin: -8px 0 6px;
}
.tip-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--sunk);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tribute-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--lit);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
}
.obiljezje {
  width: 30px;
  height: 30px;
  object-fit: contain;
  opacity: 0.9;
}
.mcard .photo {
  width: 112px;
  height: 112px;
  margin: 14px 0 16px;
  object-fit: cover;
  border: 2px solid var(--frame);
  border-radius: 4px;
  background: var(--sunk);
}
.mcard .uvodni {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 4px;
  /* imported notices often carry the whole text here — keep the name in view */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mcard h2 {
  font-size: 1.375rem;
  line-height: 1.3;
}
.years {
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.grad-link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
.grad-link:hover {
  color: var(--brass-ink);
  text-decoration-color: currentColor;
}
.grad-link .icon {
  width: 16px;
  height: 16px;
}
.mcard .excerpt {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mcard .more {
  margin-top: auto;
  padding-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--brass-ink);
  text-decoration: none;
}
.mcard .more::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.mcard:hover .more {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- empty state, pager ---------- */

.empty-state {
  margin: 24px 0;
  padding: 48px 24px;
  text-align: center;
  background: var(--card);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
}
.empty-state h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}
.empty-state p {
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 auto 20px;
}
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 8px 0 24px;
}
.pager-page {
  min-width: 2ch;
  text-align: center;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ---------- ads: bounded, labelled, reserved ---------- */

.ad-slot {
  margin: 8px 0;
}
.ad-slot::before {
  content: "Oglas";
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9a9084;
  text-align: center;
}
.ad-slot ins.adsbygoogle {
  text-align: center;
  border-radius: var(--r-sm);
  background: var(--sunk);
}
.ad-slot ins.adsbygoogle[data-ad-format="auto"] {
  min-height: 250px;
}
@media (min-width: 768px) {
  .ad-slot ins.adsbygoogle[data-ad-format="auto"] {
    min-height: 120px;
  }
}

/* ---------- sections, rows ---------- */

.section {
  margin-top: 40px;
}
.section-title {
  font-size: 1.375rem;
  margin-bottom: 16px;
}
/* city index: reads like the index page of a newspaper, not a tag cloud */
.directory {
  display: grid;
  gap: 20px 48px;
  margin-top: 48px;
  padding: 32px 0 8px;
  border-top: 1px solid var(--line-strong);
}
@media (min-width: 900px) {
  .directory {
    grid-template-columns: 240px 1fr;
  }
  .directory-types {
    grid-column: 2;
  }
}
.directory-head h2 {
  font-size: 1.5rem;
}
.directory-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.directory-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 8px;
  font-weight: 600;
  color: var(--brass-ink);
  text-decoration: none;
}
.directory-all:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.directory-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
}
@media (min-width: 640px) {
  .directory-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .directory-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.directory-list li {
  display: flex;
  border-bottom: 1px solid var(--line);
}
.directory-list a {
  display: flex;
  align-items: center;
  flex: 1;
  min-height: 44px;
  padding: 6px 0;
  line-height: 1.3;
  font-family: var(--serif);
  font-size: 1.0625rem;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.15s;
}
.directory-list a:hover {
  color: var(--brass-ink);
}
.directory-types {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.directory-types a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
.directory-types a:hover {
  color: var(--brass-ink);
  text-decoration-color: currentColor;
}

.rows {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.rows li + li {
  border-top: 1px solid var(--line);
}
.rows a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 16px;
  text-decoration: none;
}
.rows a:hover {
  background: var(--paper);
}
.row-thumb {
  width: 44px;
  height: 44px;
  flex: none;
  object-fit: cover;
  border-radius: 4px;
  background: var(--sunk);
}
.row-text {
  display: grid;
  min-width: 0;
}
.row-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.0625rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-meta {
  font-size: 0.875rem;
  color: var(--muted);
}
.rows a::after {
  content: "›";
  margin-left: auto;
  padding-left: 8px;
  font-size: 1.4rem;
  color: var(--line-strong);
}
.rows-foot a {
  justify-content: center;
  min-height: 52px;
  font-weight: 600;
  color: var(--brass-ink);
}
.rows-foot a::after {
  display: none;
}

/* ---------- detail page ---------- */

/* the notice page needs room for its side column; old browsers without
   :has() keep the narrow single-column layout, which still works */
main:has(> .detail) {
  max-width: 1120px;
}
.detail {
  display: grid;
  gap: 28px;
  padding-top: 20px;
}
@media (min-width: 960px) {
  .detail {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 40px;
  }
  .detail-aside {
    position: sticky;
    top: 88px;
  }
}
.notice {
  position: relative;
  padding: clamp(28px, 5vw, 48px) clamp(20px, 5vw, 56px);
  background: var(--card);
  border: 3px solid var(--frame);
  border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 7px var(--card), inset 0 0 0 8px color-mix(in srgb, var(--frame) 30%, transparent), var(--shadow);
  text-align: center;
}
.notice-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.notice .obiljezje {
  width: 52px;
  height: 52px;
}
.notice .photo {
  width: 168px;
  height: 168px;
  object-fit: cover;
  border: 3px solid var(--frame);
  border-radius: 4px;
  background: var(--sunk);
}
.notice .uvodni {
  color: var(--ink-soft);
  font-size: 1.0625rem;
  margin-bottom: 8px;
}
.notice h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.notice .years {
  font-size: 1.1875rem;
  margin-top: 8px;
}
.notice .grad-link {
  font-size: 1.0625rem;
  margin-top: 10px;
}
.notice .tip-badge {
  margin-bottom: 14px;
}
.rule {
  width: 64px;
  height: 1px;
  margin: 26px auto;
  background: var(--brass);
  border: 0;
}
.notice .glavni {
  font-size: 1.125rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.notice .ozalosceni {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: left;
  color: var(--ink-soft);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.panel {
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.panel + .panel {
  margin-top: 16px;
}
.panel h2 {
  font-size: 1.125rem;
  margin-bottom: 12px;
}
.tribute-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--ink-soft);
}
.tribute-count strong {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
#candle-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  border: 1.5px solid var(--brass);
  border-radius: 999px;
  background: var(--card);
  color: var(--brass-ink);
  font-size: 1.0625rem;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s;
}
#candle-btn:hover {
  background: var(--brass-soft);
}
#candle-btn .candle-icon {
  display: inline-block;
  font-size: 1.5rem;
  line-height: 1;
}
#candle-btn.is-lit {
  background: var(--lit);
  border-color: #e7cf9f;
  color: var(--ink);
  cursor: default;
}
.tribute-note {
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
}
@keyframes candle-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(248, 207, 126, 0.6);
  }
  100% {
    box-shadow: 0 0 0 22px rgba(248, 207, 126, 0);
  }
}
@keyframes candle-rise {
  40% {
    transform: translateY(-3px) scale(1.12);
  }
}
#candle-btn.is-lighting {
  animation: candle-glow 1.1s var(--ease) 1;
}
#candle-btn.is-lighting .candle-icon {
  animation: candle-rise 0.9s var(--ease) 1;
}
.meta-list {
  display: grid;
  gap: 4px;
  font-size: 0.9375rem;
}
.meta-list dt {
  color: var(--muted);
}
.meta-list dd {
  margin: 0 0 8px;
  font-weight: 600;
}
.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.share-row a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  transition: border-color 0.15s;
}
.share-row a:hover {
  border-color: var(--brass);
}
.share-row img {
  width: 26px;
  height: 26px;
}
.notice-banner {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: var(--r);
  background: #e9f3ec;
  color: #1f5537;
}
.notice-banner strong {
  display: block;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}
.back-link:hover {
  color: var(--brass-ink);
}

/* ---------- prose pages ---------- */

.prose {
  max-width: 68ch;
  color: var(--ink-soft);
  font-size: 1.0625rem;
  line-height: 1.75;
}
.prose p + p,
.prose p + ol,
.prose ol + p {
  margin-top: 1em;
}
.prose h2 {
  margin: 2em 0 0.6em;
  font-size: 1.4rem;
  color: var(--ink);
}
.prose ol {
  padding-left: 1.4em;
  list-style: decimal;
}
.prose li + li {
  margin-top: 0.6em;
}
.prose a {
  color: var(--brass-ink);
  overflow-wrap: anywhere;
}
.link-cards {
  display: grid;
  gap: 12px;
  max-width: 560px;
}
.link-cards a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
  padding: 0 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-decoration: none;
  font-weight: 600;
}
.link-cards a::after {
  content: "›";
  font-size: 1.5rem;
  color: var(--muted);
}
.link-cards a:hover {
  border-color: var(--brass);
}

/* ---------- gradovi ---------- */

.grad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.grad-grid a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 500;
  transition: border-color 0.15s;
}
.grad-grid a:hover {
  border-color: var(--brass);
  color: var(--brass-ink);
}
.grad-grid span {
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--sunk);
}

/* ---------- objavi wizard + contact form ---------- */

.form-card {
  padding: clamp(20px, 4vw, 36px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.form-stack {
  display: grid;
  gap: 20px;
}
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.form-actions .btn {
  flex: 1;
}
.wizard-progress {
  margin-bottom: 28px;
}
.wp-text {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
.wp-label {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
}
.wp-step {
  font-size: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
}
.wp-track {
  height: 6px;
  border-radius: 999px;
  background: var(--sunk);
  overflow: hidden;
}
.wp-fill {
  height: 100%;
  background: var(--brass);
  border-radius: 999px;
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.wizard-hint {
  font-size: 0.9375rem;
  color: var(--muted);
}
.obiljezje-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.obiljezje-picker label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  cursor: pointer;
  font-size: 0.8125rem;
  text-align: center;
  white-space: pre-line;
  color: var(--ink-soft);
}
.obiljezje-picker label:has(input:checked) {
  border-color: var(--brass-ink);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.22);
  background: var(--brass-soft);
}
.obiljezje-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.obiljezje-picker label:has(input:focus-visible) {
  outline: 2px solid var(--brass-ink);
  outline-offset: 2px;
}
.obiljezje-picker img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.image-picker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 280px;
  padding: 24px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--r);
  background: var(--paper);
  cursor: pointer;
  text-align: center;
  color: var(--ink-soft);
  font-weight: 600;
}
.image-picker:hover {
  border-color: var(--brass);
}
.image-picker .preview {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--sunk);
}
.image-picker .preview.is-empty {
  width: 72px;
  height: 72px;
  opacity: 0.5;
}
.image-picker input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.picker-x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.picker-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
}
.picker-progress img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
}
#imageUploadProgress {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--sunk);
  overflow: hidden;
}
#imageUploadProgress::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: var(--brass);
}
#picker-progress-text {
  width: 3.5em;
  display: flex;
  justify-content: center;
  font-size: 0.8125rem;
}
#picker-progress-text img {
  width: 18px;
  height: 18px;
}
.wizard-error {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 48px 0;
  text-align: center;
}

/* ---------- 404 ---------- */

.not-found {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 64px 0;
  text-align: center;
}
.not-found img {
  width: 160px;
  opacity: 0.8;
}
.not-found h1 {
  font-size: 2.25rem;
}
.not-found p {
  color: var(--ink-soft);
  margin-bottom: 12px;
}

/* ---------- embed ---------- */

.embed-builder {
  display: grid;
  gap: 16px;
}
.embed-builder iframe {
  width: 100%;
  height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
}
.embed-body {
  display: block;
  min-height: 0;
  background: var(--card);
}
.embed-widget {
  font-size: 1rem;
}
.embed-head,
.embed-foot {
  display: block;
  padding: 14px 16px;
  text-decoration: none;
}
.embed-head {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.embed-foot {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--brass-ink);
  border-top: 1px solid var(--line);
}
.embed-widget .rows {
  border: 0;
  border-radius: 0;
}
.embed-empty {
  padding: 24px 16px;
  color: var(--muted);
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: auto;
  background: var(--card);
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  gap: 32px;
  padding: 44px 0 28px;
}
@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
}
.footer-brand p {
  margin-top: 12px;
  max-width: 34ch;
  color: var(--ink-soft);
}
.footer-col h2 {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.footer-col ul {
  display: grid;
  gap: 2px;
}
.footer-col a,
.footer-col button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9375rem;
}
.footer-col a:hover,
.footer-col button:hover {
  color: var(--brass-ink);
}
.socials {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.socials a:hover {
  border-color: var(--brass);
}
.socials img {
  width: 26px;
  height: 26px;
}
.footer-bottom {
  padding: 18px 0 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------- daily reminder dialog ---------- */

#push-dialog {
  border: 0;
  border-radius: var(--r);
  background: var(--card);
  color: var(--ink);
  padding: 28px 24px 22px;
  max-width: 26rem;
  width: calc(100% - 2rem);
  box-shadow: var(--shadow-lift);
  margin: auto;
}
#push-dialog::backdrop {
  background: rgba(38, 34, 29, 0.5);
}
#push-dialog h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
#push-dialog p {
  color: var(--ink-soft);
}
#push-dialog fieldset {
  margin: 16px 0 8px;
  padding: 0;
  border: 0;
}
#push-dialog legend {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 8px;
}
#push-dialog fieldset label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
}
#push-dialog fieldset label + label {
  margin-top: 8px;
}
#push-dialog fieldset label:has(input:checked) {
  border-color: var(--brass);
  background: var(--brass-soft);
}
#push-dialog input[type="checkbox"],
#push-dialog input[type="radio"] {
  accent-color: var(--brass-ink);
  width: 1.125rem;
  height: 1.125rem;
}
#push-dialog [data-push-status] {
  font-size: 0.875rem;
  color: var(--danger);
  margin-top: 8px;
}
#push-dialog [data-push-status]:empty {
  display: none;
}
.push-actions {
  display: grid;
  gap: 4px;
  margin-top: 16px;
}
.push-quiet {
  min-height: 44px;
  color: var(--ink-soft);
  background: none;
  border: 0;
}
.push-quiet:hover {
  color: var(--brass-ink);
}
.push-close {
  position: fixed;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card);
  background: none;
  border: 0;
  opacity: 0.85;
}
.push-close:hover {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .smrtovnica.mcard:hover {
    transform: none;
  }
}
