/* =============================================================
   Maldos pasivaikščiojimas — stilius
   Aesthetic: warm "paper & pine" — cream ground, ink-brown text,
   a deep pine-green accent, terracotta used sparingly. Editorial,
   calm, reverent. Display: Fraunces (soft serif). Body: Newsreader.
   ============================================================= */

:root {
  --bg:        #f4efe4;
  --bg-card:   #faf6ec;
  --ink:       #211c16;
  --ink-soft:  #534b40;
  --muted:     #8c8373;
  --line:      #ddd3bf;
  --pine:      #2f6b5e;
  --pine-dk:   #234f45;
  --terra:     #b4532a;
  --gold:      #b8893a;
  --ok-bg:     #e4efe5; --ok-ink:#28553f;
  --err-bg:    #f6e2da;  --err-ink:#8a3318;
  --info-bg:   #eee7d6;  --info-ink:#6a5a36;
  --shadow:    0 1px 2px rgba(33,28,22,.05), 0 8px 24px rgba(33,28,22,.07);
  --radius:    14px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  /* faint paper grain */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(33,28,22,.025) 1px, transparent 0);
  background-size: 4px 4px;
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  font-optical-sizing: auto;
}

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 22px; }

a { color: var(--pine-dk); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--terra); }

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: .2em 0 .35em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin: 1.6em 0 .5em; }
h3 { font-size: 1.28rem; margin: 1.4em 0 .4em; }

p { margin: 0 0 1em; }

/* ---------- Header ---------- */
.site-head {
  border-bottom: 1px solid var(--line);
  background: rgba(250,246,236,.82);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 20;
}
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { color: var(--pine); font-size: 1.35rem; line-height: 1; }
.brand-name { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.18rem; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink-soft); font-size: .98rem; }
.nav a:hover { color: var(--terra); }
.nav-user { color: var(--pine-dk); font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; cursor: pointer; border: none;
  font-family: "Newsreader", serif; font-size: 1rem; line-height: 1;
  padding: .72em 1.2em; border-radius: 999px; text-decoration: none;
  transition: transform .12s ease, background .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-solid  { background: var(--pine); color: #fbf8ef; }
.btn-solid:hover { background: var(--pine-dk); color: #fff; }
.btn-ghost  { background: transparent; color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--muted); }
.btn-terra  { background: var(--terra); color: #fdf2ec; }
.btn-terra:hover { background: #97431f; color:#fff; }
.btn-lg { font-size: 1.12rem; padding: .85em 1.6em; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Flash ---------- */
.flash { font-size: .98rem; }
.flash .wrap { padding-top: 12px; padding-bottom: 12px; }
.flash-info  { background: var(--info-bg); color: var(--info-ink); }
.flash-success { background: var(--ok-bg); color: var(--ok-ink); }
.flash-error { background: var(--err-bg); color: var(--err-ink); }

/* ---------- Main ---------- */
.main { padding-top: 30px; padding-bottom: 70px; }

/* ---------- Hero (landing) ---------- */
.hero { position: relative; padding: 64px 0 28px; }
.hero .eyebrow { font-family:"Fraunces",serif; text-transform: uppercase; letter-spacing: .18em; font-size: .76rem; color: var(--gold); margin: 0 0 14px; }
.hero h1 { max-width: 14ch; }
.hero .lede { font-size: 1.25rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { margin-top: 26px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-rule { margin: 40px 0 0; border: none; border-top: 1px solid var(--line); }

.prayer-symbols { color: var(--pine); letter-spacing: .5em; font-size: 1.1rem; margin: 6px 0 2px; }

/* prose blocks */
.prose { max-width: 64ch; }
.prose ol { padding-left: 1.2em; }
.prose li { margin: .4em 0; }
blockquote {
  margin: 1.4em 0; padding: .2em 0 .2em 1.1em;
  border-left: 3px solid var(--gold);
  font-style: italic; color: var(--ink-soft);
}
.video-frame { aspect-ratio: 16 / 9; width: 100%; max-width: 520px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); margin: 8px 0 6px; }

.verse-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow);
  max-width: 52ch; margin: 14px 0;
}
.verse-card h3 { margin-top: 0; color: var(--pine-dk); }
.verse-card p { font-style: italic; font-size: 1.18rem; margin: 0; }

/* ---------- Cards / lists ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 8px 0; }
.card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 6px;
}
.card h3 { margin: 0; }
.card .meta { color: var(--muted); font-size: .92rem; }
.card .card-foot { margin-top: auto; padding-top: 12px; }
.tag { display:inline-block; font-size:.74rem; letter-spacing:.08em; text-transform:uppercase; color: var(--pine-dk); background: var(--ok-bg); border-radius: 999px; padding: .28em .7em; }
.empty {
  text-align: center; padding: 50px 20px; color: var(--ink-soft);
  border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg-card);
}
.empty .big { font-family:"Fraunces",serif; font-size: 1.4rem; color: var(--ink); margin-bottom: .3em; }

/* ---------- Forms ---------- */
.form { max-width: 460px; }
.form.form-wide { max-width: 620px; }
.field { margin: 0 0 16px; }
.field label { display: block; font-size: .95rem; color: var(--ink-soft); margin-bottom: 5px; }
.field .hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.field input[type=text], .field input[type=email], .field input[type=password],
.field input[type=number], .field textarea, .field select {
  width: 100%; font-family: "Newsreader", serif; font-size: 1.02rem;
  padding: .68em .8em; color: var(--ink);
  background: #fffdf7; border: 1px solid var(--line); border-radius: 10px;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px rgba(47,107,94,.15);
}
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: .96rem; color: var(--ink-soft); }
.check input { margin-top: .35em; }
.form-actions { margin-top: 22px; display: flex; align-items: center; gap: 16px; }
.form-aside { color: var(--muted); font-size: .92rem; }

.page-head { margin-bottom: 18px; }
.page-head .sub { color: var(--muted); margin-top: -.4em; }

/* ---------- Walk / map ---------- */
.map { height: 60vh; min-height: 360px; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.walk-bar {
  position: sticky; bottom: 0; margin-top: 16px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.walk-stats { display: flex; gap: 22px; margin-left: auto; }
.walk-stats .stat b { font-family:"Fraunces",serif; font-size: 1.3rem; display:block; line-height:1; }
.walk-stats .stat span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }

.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0; }
.summary-grid .stat { background: var(--bg-card); border:1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow); }
.summary-grid .stat b { font-family:"Fraunces",serif; font-size: 2.1rem; display:block; }
.summary-grid .stat span { color: var(--muted); font-size: .85rem; }

.modal-back { position: fixed; inset: 0; background: rgba(33,28,22,.45); display:none; align-items:center; justify-content:center; z-index: 1000; padding: 20px; }
.modal-back.open { display: flex; }
.modal { background: var(--bg-card); border-radius: var(--radius); padding: 24px; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.modal h3 { margin-top: 0; }

@media (max-width: 560px) {
  .summary-grid { grid-template-columns: 1fr; }
  .walk-stats { width: 100%; justify-content: space-between; margin-left: 0; }
}

/* ---------- Notifications bell ---------- */
.nav-bell { position: relative; text-decoration: none; font-size: 1.1rem; }
.nav-bell .badge {
  position: absolute; top: -8px; right: -10px; background: var(--terra); color: #fff;
  font-size: .68rem; font-family: "Newsreader",serif; line-height: 1; padding: .2em .42em;
  border-radius: 999px; min-width: 1.4em; text-align: center;
}
.nav-user { text-decoration: none; }

/* ---------- Step guide ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 8px 0; max-width: 70ch; }
.step {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin: 0 0 16px; box-shadow: var(--shadow);
}
.step h3 { margin: 0 0 .3em; color: var(--pine-dk); }
.step p { margin: 0 0 .6em; }
.step-do { margin-top: 12px !important; }

/* ---------- Generic tables (admin) ---------- */
.table { width: 100%; border-collapse: collapse; margin: 12px 0; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.table th { font-family: "Fraunces", serif; font-weight: 600; color: var(--ink-soft); background: rgba(0,0,0,.02); }
.table tr:last-child td { border-bottom: none; }

/* ---------- Badges / pills ---------- */
.ach { display: inline-flex; align-items: center; gap: 8px; background: var(--ok-bg); color: var(--ok-ink); border-radius: 999px; padding: .4em .9em; margin: 4px 6px 4px 0; font-size: .9rem; }
.notif { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: var(--bg-card); }
.notif.unread { border-left: 3px solid var(--terra); }
.section-sep { border: none; border-top: 1px solid var(--line); margin: 34px 0; }
.guide-box { background: var(--bg-card); border:1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.tabs { display:flex; gap:8px; flex-wrap:wrap; margin: 8px 0 18px; }
.tabs a { padding:.4em .9em; border-radius:999px; text-decoration:none; color:var(--ink-soft); box-shadow: inset 0 0 0 1px var(--line); font-size:.92rem; }
.tabs a.active { background: var(--pine); color:#fbf8ef; box-shadow:none; }

/* ---------- Photo grid / moderation ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 10px 0; }
.photo-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.photo-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #e9e1cf; }
.photo-meta { padding: 10px 12px 2px; font-size: .86rem; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.photo-note { padding: 2px 12px 10px; font-size: .92rem; color: var(--ink-soft); }
.photo-actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px 12px; margin-top: auto; }
.photo-actions .btn { font-size: .82rem; padding: .5em .8em; }
.photo-report { padding: 0 12px 10px; }
.link-btn { background: none; border: none; color: var(--muted); font-family: "Newsreader", serif; font-size: .82rem; cursor: pointer; text-decoration: underline; padding: 0; }
.link-btn:hover { color: var(--terra); }

/* ---------- Group chat ---------- */
.chat-box { height: 52vh; min-height: 300px; overflow-y: auto; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 78%; padding: 8px 12px; border-radius: 12px; background: #efe8d8; align-self: flex-start; }
.chat-msg.mine { align-self: flex-end; background: var(--ok-bg); }
.chat-msg .who { display: block; font-size: .74rem; color: var(--muted); margin-bottom: 2px; }
.chat-msg .txt { white-space: pre-wrap; word-wrap: break-word; }
.chat-input { display: flex; gap: 10px; margin-top: 12px; }
.chat-input input { flex: 1; font-family: "Newsreader", serif; font-size: 1rem; padding: .6em .8em; background: #fffdf7; border: 1px solid var(--line); border-radius: 999px; }
.chat-input input:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px rgba(47,107,94,.15); }

/* ---------- Prayer wall ---------- */
.prayer-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 14px; }
.prayer-text { font-size: 1.05rem; margin: 0 0 12px; }
.prayer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.prayer-foot .meta { color: var(--muted); font-size: .85rem; }
.prayer-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pray-count { color: var(--pine-dk); font-size: .95rem; }
.btn-sm { font-size: .82rem; padding: .45em .9em; }
