/* vilnius.agape.lt: Old Town limewash and copper.
   Signature: church photos framed as arched windows. Everything else stays quiet. */

:root {
  --bg: #edefea;          /* limewash */
  --bg-2: #e1e5df;        /* shaded plaster */
  --raise: #f7f8f5;
  --ink: #1d2829;         /* slate */
  --ink-2: #3c4949;
  --muted: #566260;
  --line: #c9d1cb;
  --copper: #2f6b5e;      /* verdigris roofs */
  --copper-2: #234f45;
  --on-copper: #f3f5f1;
  --amber: #c98a2b;       /* candle only */
  --glow: rgba(236, 170, 72, 0.5);
  --bar: #1d2829;
  --on-bar: #e9ede8;
  --focus: #234f45;

  --display: "Gloock", "Iowan Old Style", Georgia, serif;
  --text: "Literata", Georgia, "Times New Roman", serif;

  --measure: 37rem;
  --wide: 70rem;
  --gutter: 16px;
  --player-h: 0px;
  --arch-v: 40%;          /* vertical radius that makes a semicircle for a 4:5 box */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101716;
    --bg-2: #172120;
    --raise: #1a2422;
    --ink: #e3e8e4;
    --ink-2: #b9c3be;
    --muted: #93a09b;
    --line: #2d3a37;
    --copper: #7db9a9;
    --copper-2: #a3d2c5;
    --on-copper: #0f1a18;
    --amber: #e6ae52;
    --glow: rgba(240, 180, 80, 0.4);
    --bar: #1a2422;
    --on-bar: #e3e8e4;
    --focus: #e6ae52;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.125rem/1.72 var(--text);
  font-optical-sizing: auto;
  padding-bottom: var(--player-h);
  overflow-x: hidden;
}
body.player-on { --player-h: 84px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--copper); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--copper); color: var(--on-copper); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; letter-spacing: -0.005em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.5rem, 9vw, 4.4rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.1rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.1em; }

.visually-hidden, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 99; background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; }
.skip:focus { left: 1rem; }

.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.col { max-width: var(--measure); }
.small { font-size: 0.9rem; line-height: 1.55; color: var(--muted); }
.lede { font-size: 1.28rem; line-height: 1.55; color: var(--ink-2); }

/* ---------------------------------------------------------------- header & footer */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem 1.4rem; flex-wrap: wrap; padding-top: 1rem; padding-bottom: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 1.35rem; line-height: 1; }
.brand svg { width: 30px; height: 30px; flex: none; }
.site-nav { display: flex; gap: 1.2rem; font-size: 1rem; }
.site-nav a { color: var(--ink-2); text-decoration: none; padding: 0.3rem 0; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--copper); }

.site-foot { margin-top: 4rem; background: var(--bg-2); color: var(--muted); font-size: 0.92rem; line-height: 1.6; padding: 2.5rem 0 calc(2.5rem + var(--player-h)); }
.site-foot a { color: var(--ink-2); }
.foot-grid { display: grid; gap: 1.2rem 3rem; }
.foot-brand { font-family: var(--display); font-size: 1.3rem; color: var(--ink); margin: 0 0 0.3rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 0; padding: 0; list-style: none; }
.foot-credit { font-size: 0.8rem; max-width: 46rem; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-credit { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 50px; padding: 0.75rem 1.6rem; border: 0; border-radius: 999px;
  background: var(--copper); color: var(--on-copper);
  font: 600 1.02rem/1.2 var(--text); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s;
}
.btn:hover { background: var(--copper-2); }
.btn-line { background: transparent; color: var(--copper); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-line:hover { background: var(--copper); color: var(--on-copper); }

/* ---------------------------------------------------------------- the arched window */
.arch { position: relative; margin: 0; aspect-ratio: 4 / 5; --r: 50% 50% 4px 4px / var(--arch-v) var(--arch-v) 4px 4px; }
.arch img, .arch > span { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); background: var(--bg-2); }
.arch::after { /* the window's stone keyline */
  content: ""; position: absolute; inset: -7px; border: 1px solid var(--copper); opacity: 0.55;
  border-radius: 50% 50% 8px 8px / var(--arch-v) var(--arch-v) 8px 8px; pointer-events: none;
}
.arch-empty > span {
  display: block;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='%23edefea' fill-opacity='.85'%3E%3Cpath d='M14 52V32l5-10 5 10v20zM27 52V26l5-16 5 16v26zM40 52V32l5-10 5 10v20z'/%3E%3Crect x='10' y='52' width='44' height='3' rx='1.5'/%3E%3C/g%3E%3C/svg%3E") center 62% / 46% no-repeat,
    linear-gradient(170deg, #3d7d6f, #1f4a41);
}
.arch-tall { aspect-ratio: 3 / 5; --arch-v: 30%; }
.arch-mid { aspect-ratio: 3 / 4.4; --arch-v: 34%; }

/* ---------------------------------------------------------------- home: hero */
.hero { display: grid; gap: 2.2rem; padding-top: 1rem; padding-bottom: 1rem; align-items: center; }
.triptych { display: grid; grid-template-columns: 1fr 1.22fr 1fr; gap: clamp(14px, 3vw, 26px); align-items: end; padding: 8px 8px 0; max-width: 34rem; }
.triptych a { display: block; border-radius: 50% 50% 4px 4px / 30% 30% 4px 4px; }
.triptych a:hover .arch img { filter: saturate(1.15); }
.triptych .arch::after { inset: -6px; }
.triptych-caption { display: grid; grid-template-columns: 1fr 1.22fr 1fr; gap: clamp(14px, 3vw, 26px); padding: 0 8px; margin-top: 0.7rem; max-width: 34rem; font-size: 0.82rem; line-height: 1.3; color: var(--muted); text-align: center; }
.hero h1 { margin-bottom: 1.1rem; }
.hero .lede { max-width: 32rem; }
.hero-facts { font-size: 1rem; color: var(--muted); margin: -0.2rem 0 1.6rem; max-width: 30rem; }
@media (min-width: 880px) {
  .hero { grid-template-columns: 1.05fr 1fr; gap: 4rem; padding-top: 3rem; padding-bottom: 2rem; }
  .hero-media { order: 2; }
}

/* ---------------------------------------------------------------- home: route */
.route { margin-top: 4rem; }
.route > h2 { margin-bottom: 1.6rem; }
.route-list { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.route-stop { display: grid; grid-template-columns: 92px 1fr; gap: 1.3rem; align-items: start; }
.route-stop .arch { width: 92px; margin: 7px; margin-left: 7px; width: calc(92px - 14px); }
.route-stop .arch::after { inset: -5px; }
.route-num { position: absolute; z-index: 1; left: 50%; bottom: -12px; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--copper); color: var(--on-copper); display: grid; place-items: center; font: 600 0.9rem/1 var(--text); box-shadow: 0 0 0 3px var(--bg); }
.route-stop h3 { margin: 0.2rem 0 0.25rem; }
.route-stop h3 a { color: var(--ink); text-decoration: none; }
.route-stop h3 a:hover { color: var(--copper); }
.route-stop .addr { font-size: 0.95rem; color: var(--muted); margin: 0 0 0.5rem; }
.route-stop p { margin-bottom: 0.4rem; }
.route-leg { display: grid; grid-template-columns: 92px 1fr; gap: 1.3rem; align-items: center; min-height: 3.6rem; font-size: 0.95rem; color: var(--muted); font-style: italic; }
.route-leg::before { content: ""; justify-self: center; width: 0; height: 100%; min-height: 3.6rem; border-left: 2px dotted var(--copper); opacity: 0.7; }
@media (min-width: 640px) {
  .route-stop, .route-leg { grid-template-columns: 130px 1fr; gap: 1.8rem; }
  .route-stop .arch { width: calc(130px - 14px); }
}

/* ---------------------------------------------------------------- inscription (Bible verse plaque) */
.plaque { text-align: center; margin: 4.5rem auto 0; max-width: 40rem; }
.plaque blockquote, .lens blockquote {
  margin: 1.4rem 0; padding: 1.8rem clamp(1rem, 5vw, 2.6rem) 1.5rem;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  position: relative; text-align: center;
}
.plaque blockquote::before, .lens blockquote::before { /* the keystone */
  content: ""; position: absolute; top: -7px; left: 50%; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg);
  background: var(--bg); border: 1px solid var(--copper);
}
.plaque blockquote p, .lens blockquote p { font-family: var(--display); font-size: clamp(1.35rem, 4.6vw, 1.75rem); line-height: 1.3; color: var(--ink); margin: 0 0 0.9rem; text-wrap: balance; }
.plaque cite, .lens cite { font-style: normal; font-size: 0.95rem; color: var(--muted); }
.plaque > p { text-align: left; }
@media (min-width: 640px) { .plaque > p { text-align: center; } }

/* ---------------------------------------------------------------- candle (prayer) */
.candle { width: 30px; height: 64px; flex: none; overflow: visible; }
.candle .wax { fill: #f4efe2; stroke: #d6cdb8; stroke-width: 1.2; }
.candle .wick { fill: var(--ink-2); }
.candle .flame { fill: var(--amber); transform-origin: 15px 22px; opacity: 0; transform: scale(0.4); transition: opacity 0.4s ease, transform 0.6s cubic-bezier(.2, 1.6, .4, 1); }
.candle .halo { fill: var(--glow); opacity: 0; filter: blur(5px); transition: opacity 0.8s ease; }
.lit .candle .flame { opacity: 1; transform: scale(1); animation: flicker 3.2s 0.7s ease-in-out infinite; }
.lit .candle .halo { opacity: 1; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(0); } 30% { transform: scale(0.94, 1.05) rotate(-2deg); } 60% { transform: scale(1.03, 0.97) rotate(1.5deg); } }

.city-count { display: inline-flex; align-items: center; gap: 0.9rem; text-align: left; margin-top: 0.6rem; color: var(--ink-2); }
.city-count strong { font-family: var(--display); font-weight: 400; font-size: 1.9rem; line-height: 1; color: var(--ink); margin-right: 0.15em; }
.city-count span { max-width: 22rem; }

/* ---------------------------------------------------------------- bands */
.band { margin-top: 4rem; padding: 2rem clamp(1.2rem, 4vw, 2.4rem); background: var(--bg-2); border-radius: 4px; }
.band h2 { font-size: clamp(1.4rem, 4.2vw, 1.75rem); margin-bottom: 0.6rem; }
.band p { max-width: 34rem; }
.band-split { display: grid; gap: 1rem 2.4rem; align-items: center; }
@media (min-width: 760px) { .band-split { grid-template-columns: 1fr auto; } }

/* ---------------------------------------------------------------- stop page */
.stop-hero { display: grid; gap: 1.8rem; padding-top: 0.6rem; }
.stop-hero .arch { width: min(17.5rem, 64vw); margin: 7px 0 0 7px; }
.stepper { display: flex; align-items: center; gap: 0.8rem; font-size: 0.95rem; color: var(--muted); margin: 0 0 0.9rem; }
.stepper ol { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.stepper a { display: block; width: 14px; height: 18px; border: 1.5px solid var(--copper); border-radius: 50% 50% 2px 2px / 40% 40% 2px 2px; }
.stepper a[aria-current="step"] { background: var(--copper); }
.stepper a:hover { background: color-mix(in srgb, var(--copper) 35%, transparent); }
.stop-hero h1 { margin-bottom: 0.8rem; }
.stop-hero .addr { font-size: 1rem; color: var(--muted); margin: 0 0 1.1rem; }
.stop-hero .addr a { white-space: nowrap; }
@media (min-width: 880px) {
  .stop-hero { grid-template-columns: 1fr minmax(18rem, 25rem); gap: 4rem; align-items: center; padding-top: 2.4rem; }
  .stop-hero .arch { order: 2; margin: 7px 7px 0; width: calc(100% - 14px); max-width: none; }
}

/* listen */
.listen { margin: 1.6rem 0 0; }
.play-big { display: flex; align-items: center; gap: 1rem; width: 100%; max-width: 30rem; padding: 0; background: none; border: 0; color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.play-big .disc { flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--copper); display: grid; place-items: center; transition: background-color 0.15s, transform 0.15s; }
.play-big:hover .disc { background: var(--copper-2); }
.play-big:active .disc { transform: scale(0.96); }
.play-big svg { width: 26px; height: 26px; fill: var(--on-copper); }
.play-big strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.35rem; line-height: 1.2; }
.play-big small { display: block; font-size: 0.95rem; color: var(--muted); }
.i-pause { display: none; }
.is-playing .i-play { display: none; }
.is-playing .i-pause { display: inline; }
.chapters { list-style: none; margin: 1.3rem 0 0; padding: 0; max-width: 30rem; counter-reset: ch; border-top: 1px solid var(--line); }
.chapters button { display: grid; grid-template-columns: 3.6rem 1fr; gap: 0.6rem; width: 100%; padding: 0.6rem 0; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); text-align: left; font: inherit; font-size: 1rem; line-height: 1.4; cursor: pointer; }
.chapters button:hover { color: var(--copper); }
.chapters .t { color: var(--muted); font-variant-numeric: tabular-nums; }
.chapters .current button { color: var(--copper); }
.chapters .current .t { color: var(--copper); }
.notice { background: var(--bg-2); border-left: 3px solid var(--copper); padding: 0.9rem 1.1rem; font-size: 1rem; margin: 1.6rem 0 0; max-width: 32rem; }
.notice-ok { border-left-color: var(--copper); }
.notice-err { border-left-color: #b3261e; }

/* story */
.story { margin-top: 3.2rem; }
.story h2 { margin: 2.6rem 0 0.9rem; }
.story h2:first-child { margin-top: 0; }
.story > h2:first-child + p::first-letter {
  float: left; font-family: var(--display); font-size: 4.1em; line-height: 0.82; padding: 0.06em 0.1em 0 0; color: var(--copper);
}
.story p { hyphens: auto; }

/* lens */
.lens { margin-top: 3.6rem; text-align: center; }
.lens h2 { font-size: clamp(1.35rem, 4.2vw, 1.7rem); }
.lens > p { text-align: left; }
@media (min-width: 640px) { .lens > p { text-align: center; } }

/* pray */
.pray { margin-top: 3.6rem; padding: 2.2rem clamp(1.2rem, 5vw, 2.6rem); background: var(--bg-2); border-radius: 4px; }
.pray h2 { margin-bottom: 1rem; }
.pray .prayer { font-style: italic; font-size: 1.2rem; line-height: 1.6; color: var(--ink-2); }
.pray-row { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 1.1rem; row-gap: 0.7rem; align-items: center; margin-top: 1.6rem; }
.pray-row .candle { grid-row: 1 / span 2; align-self: end; }
.pray-row .btn { justify-self: start; }
.pray-count { margin: 0; font-size: 0.98rem; color: var(--muted); }
.pray-count strong { color: var(--ink); font-weight: 600; }
.btn-pray[aria-pressed="true"] { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); cursor: default; }
.pop { display: inline-block; animation: pop 0.5s ease; }
@keyframes pop { 40% { transform: scale(1.3); } }

/* worship */
.worship { margin-top: 3.6rem; }
.worship h2 { margin-bottom: 0.9rem; }
.times { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45; margin: 1rem 0 0.8rem; }
.times th { text-align: left; font-weight: 600; font-size: 0.85rem; color: var(--muted); border-bottom: 1px solid var(--ink); padding: 0 0.7rem 0.45rem 0; }
.times td { padding: 0.65rem 0.7rem 0.65rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.times td:nth-child(2) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.times tr.en td { color: var(--copper); font-weight: 600; }

/* photos */
.photos { margin-top: 3.6rem; }
.photos h2 { margin-bottom: 1rem; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 74%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 8px; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
.gallery li { scroll-snap-align: start; }
.gallery button, .gallery > li > a { display: block; padding: 0; border: 0; background: none; width: 100%; cursor: zoom-in; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.gallery span { display: block; font-size: 0.85rem; line-height: 1.4; color: var(--muted); margin-top: 0.35rem; }
@media (min-width: 700px) {
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin-right: 0; padding-right: 0; }
}

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; color: #eef1ed; }
.lightbox::backdrop { background: rgba(10, 15, 14, 0.92); }
.lightbox figure { margin: 0; height: 100%; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 3.5rem 0.8rem 1rem; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 3px; }
.lightbox figcaption { padding: 0.8rem 1rem 0; font-size: 0.95rem; text-align: center; min-height: 2.6rem; }
.lb-btn { position: absolute; background: rgba(255, 255, 255, 0.12); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb-btn:hover { background: rgba(255, 255, 255, 0.24); }
.lb-close { top: 0.7rem; right: 0.7rem; }
.lb-prev { left: 0.7rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.7rem; top: 50%; transform: translateY(-50%); }

/* next stop */
.next-stop { margin-top: 3.6rem; display: grid; grid-template-columns: 84px 1fr; gap: 1.4rem; align-items: center; padding: 1.4rem 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.next-stop .arch { width: calc(84px - 12px); margin: 6px; }
.next-stop .arch::after { inset: -5px; }
.next-stop .small { margin: 0 0 0.2rem; }
.next-stop strong { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(1.4rem, 4.6vw, 1.85rem); line-height: 1.15; }
.next-stop:hover strong { color: var(--copper); }

/* ---------------------------------------------------------------- contact door */
.door-band { margin-top: 4rem; padding: 2rem clamp(1.2rem, 4vw, 2.4rem); border: 1px solid var(--line); border-radius: 4px; }
.door-band h2 { font-size: clamp(1.4rem, 4.2vw, 1.75rem); margin-bottom: 0.6rem; }
.door-band > p { max-width: 34rem; }
.door summary { list-style: none; display: inline-flex; }
.door summary::-webkit-details-marker { display: none; }
.door[open] summary { display: none; }

.form { display: grid; gap: 1rem; max-width: 32rem; font-size: 1rem; }
.form label { display: grid; gap: 0.35rem; font-weight: 600; }
.form .opt { font-weight: 400; color: var(--muted); }
.form input, .form textarea, .form select {
  font: 400 1rem/1.5 var(--text); color: var(--ink); background: var(--raise);
  border: 1px solid var(--line); border-radius: 4px; padding: 0.75rem 0.85rem; width: 100%;
}
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--copper); outline: 2px solid var(--copper); outline-offset: 0; }
.form button { justify-self: start; }
.form-status { margin: 0; min-height: 1.4em; font-size: 0.95rem; }
.form-status.err { color: #b3261e; }
@media (prefers-color-scheme: dark) { .form-status.err { color: #ff8a80; } }
.sent { font-size: 1.15rem; margin: 0; }

/* ---------------------------------------------------------------- inner pages */
.page { padding-top: 2rem; }
.page h1 { margin-bottom: 1rem; }
.narrow-page { max-width: var(--measure); }
.church-list { margin-top: 2rem; }
.church { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.church:first-child { border-top-color: var(--ink); }
.church h2 { font-size: 1.55rem; margin-bottom: 0.6rem; }
.svc { list-style: none; margin: 0 0 0.7rem; padding: 0; }
.svc li { padding: 0.15rem 0; }
.svc strong { color: var(--copper); font-weight: 600; }
.church .addr { font-size: 1rem; color: var(--muted); margin: 0; }
.also { padding-left: 1.1rem; }
.also li { margin-bottom: 0.6rem; }
.prose h2 { margin: 2.2rem 0 0.7rem; font-size: 1.6rem; }

/* ---------------------------------------------------------------- sticky audio player */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem max(12px, env(safe-area-inset-right)) calc(0.7rem + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: var(--bar); color: var(--on-bar);
  font-size: 0.9rem;
  animation: rise 0.3s ease;
}
@keyframes rise { from { transform: translateY(100%); } }
.player[hidden] { display: none; }
.p-btn { flex: none; width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--on-bar); cursor: pointer; display: grid; place-items: center; }
.p-btn svg { width: 22px; height: 22px; fill: var(--bar); }
.p-skip, .p-rate { flex: none; min-width: 2.6rem; min-height: 44px; padding: 0 0.3rem; background: none; border: 0; color: var(--on-bar); font: 600 0.85rem/1 var(--text); cursor: pointer; opacity: 0.85; }
.p-skip:hover, .p-rate:hover { opacity: 1; }
.p-mid { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; column-gap: 0.6rem; align-items: center; padding: 0 0.4rem; }
.p-title { font-family: var(--display); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-time { font-size: 0.78rem; opacity: 0.75; font-variant-numeric: tabular-nums; }
.p-mid input[type=range] { grid-column: 1 / -1; width: 100%; margin: 0.35rem 0 0; accent-color: #7db9a9; }
.player :focus-visible { outline-color: #e6ae52; }
@media (max-width: 420px) { .p-skip[data-skip="-15"] { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================================================================ v3 refinements */

/* Limewash: a barely-there plaster grain on the page, like the Old Town's walls. */
body {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .25 0 0 0 0 .24 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  body { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E"); }
}

/* The one entrance: the three arched windows rise into place, left to right. */
@keyframes arch-in { from { opacity: 0; transform: translateY(18px); } }
.triptych a { animation: arch-in 0.9s cubic-bezier(.2, .8, .2, 1) both; }
.triptych a:nth-child(2) { animation-delay: 0.12s; }
.triptych a:nth-child(3) { animation-delay: 0.24s; }

.btn-small { min-height: 42px; padding: 0.5rem 1.15rem; font-size: 0.95rem; }

/* Route: map beside the list on wide screens */
.route-grid { display: grid; gap: 2.2rem; align-items: start; }
.map-figure { margin: 0; }
.map-figure figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-top: 0.9rem; }
.map-figure figcaption .small { flex: 1 1 14rem; margin: 0; }
@media (min-width: 960px) {
  .route-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 4rem; }
  .map-figure { order: 2; position: sticky; top: 1.5rem; }
}

.route-map { display: block; width: 100%; height: auto; font-family: var(--text); }
.route-map .m-bg { fill: var(--raise); stroke: var(--line); }
.route-map .m-walk { fill: none; stroke: var(--copper); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0.1 9; }
.route-map .m-arrow { fill: none; stroke: var(--copper); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.route-map .m-arch { fill: var(--copper); stroke: var(--raise); stroke-width: 3; }
.route-map .m-num { fill: var(--on-copper); font-size: 18px; font-weight: 600; text-anchor: middle; }
.route-map .m-pin:hover .m-arch { fill: var(--copper-2); }
.route-map .m-pin:focus-visible { outline: none; }
.route-map .m-pin:focus-visible .m-arch { stroke: var(--focus); }
.route-map .m-land rect { fill: none; stroke: var(--muted); stroke-width: 1.3; }
.route-map .m-land text { fill: var(--muted); font-size: 15px; font-style: italic; }
.route-map .m-scale path { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.route-map .m-scale text, .route-map .m-north text { fill: var(--muted); font-size: 13px; }
.route-map .m-north path { fill: var(--muted); }

/* Next stop: directions line under the card */
.next-dir { margin: 0.7rem 0 0; }

/* Worship page: the church's arched photo beside its times */
.church.has-arch { display: grid; grid-template-columns: 78px 1fr; gap: 1.3rem; align-items: start; }
.church-arch { display: block; padding: 6px; }
.church-arch .arch::after { inset: -5px; }
@media (min-width: 640px) { .church.has-arch { grid-template-columns: 120px 1fr; gap: 1.8rem; } }

/* Story: a quiet stone mark between the story and what follows */
.story::after { content: ""; display: block; width: 12px; height: 12px; margin: 2.6rem 0 0; transform: rotate(45deg); border: 1px solid var(--copper); opacity: 0.7; }
