/* «Добрый звон» — мини-приложение. Цвета, шрифты и орнамент — в kit/dz.css (общие с сайтом).
   Тёмная тема включается по теме Telegram (класс html.dark). */
:root { --prayer-size: 20px; --tabs-h: 68px; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { min-height: 100vh; padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 16px); }
button, input, textarea, select { font: inherit; color: inherit; }
button { -webkit-appearance: none; appearance: none; }

/* ---------- шапка ---------- */
.top { position: relative; overflow: hidden; padding: 12px 18px 16px; color: #F6ECD6;
  background:
    radial-gradient(120% 90% at 85% -20%, rgba(229,176,82,.22), transparent 55%),
    radial-gradient(80% 60% at 0% 120%, rgba(22,56,107,.9), transparent 70%),
    linear-gradient(180deg, #092042, #0C2750);
  border-radius: 0 0 26px 26px; box-shadow: 0 10px 30px -14px rgba(9,32,66,.55); margin-bottom: 18px; }
.top::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(229,176,82,.75), transparent); }
.brand { display: flex; align-items: center; gap: 12px; position: relative; }
.logo-wrap { position: relative; width: 44px; height: 46px; flex: none; display: grid; place-items: center; }
.logo-img { width: 44px; height: 46px; object-fit: contain; display: none; filter: drop-shadow(0 2px 8px rgba(229,176,82,.35)); }
.logo-wrap.has-img .logo-img { display: block; }
.logo-wrap.has-img .logo-mark { display: none; }
.logo-mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--gold-bright);
  font-family: var(--serif); font-weight: 700; font-size: 17px; box-shadow: inset 0 0 0 1.5px rgba(229,176,82,.55); }
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: .01em; color: var(--gold-bright); line-height: 1.15; }
.brand-sub { font-size: 14.5px; color: rgba(246,236,214,.78); margin-top: 2px; }

.today-strip { position: relative; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(229,176,82,.22); }
.today-date { font-family: var(--serif); font-size: 27px; font-weight: 600; line-height: 1.15; color: #FFF7E6; }
.today-feast { margin-top: 6px; font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.35; color: var(--gold-light); }
.today-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 9px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: rgba(255,255,255,.08); color: #F3E6CA; box-shadow: inset 0 0 0 1px rgba(229,176,82,.28); }
.tag svg { width: 16px; height: 16px; fill: none; stroke: var(--gold-bright); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tag.fast { background: rgba(229,176,82,.16); color: #FBE3B0; }
.top.compact .today-strip { display: none; }
.top.compact { padding-bottom: 14px; }

/* ---------- экран ---------- */
.screen { padding: 0 16px 16px; max-width: 640px; margin: 0 auto; animation: rise .28s ease backwards; }  /* backwards: после анимации нет transform — position:fixed внутри работает */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
h2 { font-family: var(--serif); font-size: 26px; line-height: 1.2; margin: 4px 0 14px; font-weight: 600; letter-spacing: -.005em; }
h3 { font-family: var(--sans); font-size: 13px; margin: 22px 2px 10px; color: var(--gold); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 14.5px; line-height: 1.45; }
.hint { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 10px 2px; }
.trial { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14.5px; line-height: 1.45; margin: 14px 2px; }
.trial svg { width: 18px; height: 18px; flex: none; margin-top: 2px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); margin: 0 0 14px; }
.card.hero { background: linear-gradient(165deg, var(--card) 30%, var(--bg2)); }
.card.gold { border-color: var(--gold-line); box-shadow: inset 0 0 0 1px var(--gold-soft), var(--shadow); }
.card-head { display: flex; align-items: center; gap: 10px; }
.big-date { font-family: var(--serif); font-size: 30px; font-weight: 600; margin: 6px 0 4px; line-height: 1.15; }
.ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--gold-soft); color: var(--gold); }
.ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- переключатели ---------- */
.ctl-label { font-size: 14.5px; color: var(--muted); margin: 0 2px 8px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chips-row button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 15px 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); font-size: 16px; font-weight: 500; box-shadow: var(--shadow-sm); transition: background .15s, color .15s; }
.chips-row button svg { width: 19px; height: 19px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chips-row button.on { background: var(--navy); border-color: var(--navy); color: #FBEFD3; box-shadow: 0 4px 12px -4px rgba(9,32,66,.45); }
.chips-row button.on svg { stroke: var(--gold-bright); }
html.dark .chips-row button.on { background: var(--gold-bright); border-color: var(--gold-bright); color: #0A1E3D; }
html.dark .chips-row button.on svg { stroke: #0A1E3D; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--bg2);
  border: 1px solid var(--line); margin-bottom: 14px; }
.seg button { border: 0; background: transparent; min-height: 44px; border-radius: 12px; padding: 0 6px; font-size: 15.5px; font-weight: 500; cursor: pointer;
  color: var(--ink-2); line-height: 1.15; }
.seg button.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(9,32,66,.1), 0 3px 10px -3px rgba(9,32,66,.18), inset 0 -2px 0 var(--gold-bright); }
html.dark .seg button.on { background: var(--navy-3); }

.btn { display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px; min-height: 56px;
  border: 0; border-radius: 16px; padding: 0 18px; font-size: 18px; font-weight: 600; letter-spacing: .01em;
  background: linear-gradient(180deg, var(--navy-2), var(--navy)); color: #FBEFD3; cursor: pointer; margin-top: 12px;
  box-shadow: 0 8px 20px -10px rgba(9,32,66,.7); text-decoration: none; transition: transform .12s ease; }
.btn:active { transform: scale(.985); }
.btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html.dark .btn { background: linear-gradient(180deg, #F0C670, #E1A945); color: #0A1E3D; box-shadow: 0 8px 20px -10px rgba(229,176,82,.6); }
.btn.secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.btn.gold { background: linear-gradient(180deg, #F0C670, #E1A945); color: #0A1E3D; box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 10px 22px -10px rgba(201,145,46,.85); }
.btn:disabled { opacity: .55; }
.link { background: none; border: 0; color: var(--gold); padding: 6px 0; cursor: pointer; font-size: 16px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- молитвы ---------- */
.controls { padding: 16px 16px 2px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0 14px; border-top: 1px solid var(--line); }
.toolbar > span { font-size: 15px; color: var(--muted); }
.size-ctl { display: flex; gap: 8px; }
.size-ctl button { min-width: 52px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2);
  font-family: var(--serif); font-size: 17px; font-weight: 600; cursor: pointer; }
.size-ctl button + button { font-size: 21px; }
.temple-line { display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.temple-line .t { font-size: 15.5px; line-height: 1.4; }

.prayer { padding: 20px 18px 16px; }
.prayer h4 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.25; color: var(--ink); }
html:not(.dark) .prayer h4 { color: var(--navy); }
.prayer .rep { display: inline-block; margin-left: 8px; font-family: var(--sans); font-size: 13px; font-weight: 700;
  color: var(--gold); background: var(--gold-soft); border-radius: 999px; padding: 2px 10px; vertical-align: 3px; white-space: nowrap; }
.prayer .about { color: var(--muted); font-size: 15px; margin: 6px 0 14px; line-height: 1.4; }
.prayer .text { font-family: var(--serif); font-size: var(--prayer-size); line-height: 1.62; white-space: pre-line; color: var(--ink); }
.prayer .text::first-letter { color: var(--gold); font-weight: 700; font-size: 1.6em; line-height: 1; }
.prayer details { margin-top: 14px; border-radius: 14px; background: var(--bg2); }
.prayer summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; cursor: pointer;
  color: var(--ink); font-size: 15.5px; font-weight: 600; min-height: 48px; }
.prayer summary::-webkit-details-marker { display: none; }
.prayer summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg) translateY(-3px); transition: transform .2s; flex: none; }
.prayer details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.prayer details p { margin: 0; padding: 0 14px 14px; font-size: calc(var(--prayer-size) - 2px); line-height: 1.55; font-family: var(--serif); }
.prayer .src { margin-top: 14px; font-size: 13.5px; color: var(--muted); }

/* ---------- формы ---------- */
label.field { display: block; margin: 12px 0; }
label.field > span { display: block; font-size: 15.5px; color: var(--ink-2); margin: 0 2px 8px; line-height: 1.4; }
textarea, input[type=text], input[type=time], select {
  width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 14px 15px;
  font-size: 18px; outline: none; transition: border-color .15s, box-shadow .15s; }
select { appearance: none; padding-right: 44px; min-height: 54px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B9862A' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center / 20px no-repeat; }
textarea { min-height: 140px; resize: vertical; font-family: var(--serif); line-height: 1.55; }
textarea::placeholder, input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
textarea:focus, input:focus, select:focus { border-color: var(--gold-line); box-shadow: 0 0 0 4px var(--gold-soft); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px dashed var(--gold-line); color: var(--ink); background: var(--gold-soft);
  border-radius: 999px; padding: 9px 14px; font-size: 15px; cursor: pointer; text-align: left; }
.chip svg { width: 17px; height: 17px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.choice { display: flex; gap: 14px; align-items: flex-start; padding: 15px 16px; border: 1.5px solid var(--line);
  border-radius: 16px; background: var(--card); margin: 10px 0; cursor: pointer; transition: border-color .15s, box-shadow .15s; box-shadow: var(--shadow-sm); }
.choice.on { border-color: var(--gold-line); box-shadow: inset 0 0 0 1px var(--gold-line), 0 6px 16px -10px rgba(185,134,42,.6); background: linear-gradient(0deg, color-mix(in srgb, var(--gold-soft) 45%, var(--card)), var(--card)); }
.choice .radio { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); flex: none; margin-top: 1px; transition: .15s; background: var(--card); }
.choice.on .radio { border-color: var(--gold-bright); background: radial-gradient(var(--gold-bright) 0 44%, var(--card) 48%); }
.choice b { display: block; font-weight: 600; font-size: 17px; line-height: 1.3; }
.choice small { display: block; color: var(--muted); font-size: 14.5px; margin-top: 3px; line-height: 1.35; }
.choice .mine { display: inline-block; margin-left: 6px; color: var(--gold); font-weight: 700; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.45; cursor: pointer; }
.consent input { width: 26px; height: 26px; accent-color: var(--gold-bright); flex: none; margin: 0; }
.note-box { background: var(--bg2); border-radius: 14px; padding: 14px 16px; font-size: 15.5px; line-height: 1.5; white-space: pre-line; color: var(--ink-2); }
.note-box.gold { background: var(--gold-soft); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.switch:last-child { border-bottom: 0; }
.switch > span { display: inline-flex; align-items: center; gap: 10px; }
.switch > span svg { width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.switch.sub > span { color: var(--muted); padding-left: 32px; font-size: 16px; }
.switch input[type=checkbox] { appearance: none; width: 54px; height: 32px; border-radius: 999px; background: var(--line); flex: none;
  position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch input[type=checkbox]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px;
  border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input[type=checkbox]:checked { background: var(--ok); }
.switch input[type=checkbox]:checked::after { left: 25px; }
.switch input[type=time] { width: 124px; text-align: center; padding: 10px; }
.switch .st { display: flex; flex-direction: column; gap: 2px; }
.switch .st small { color: var(--muted); font-size: 14px; line-height: 1.3; }
.switch .seg.mini { width: 186px; flex: none; padding: 3px; border-radius: 13px; }
.switch .seg.mini button { min-height: 38px; font-size: 15px; border-radius: 10px; }
.switch-note { margin: 2px 0 6px 32px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }

/* ---------- заявки ---------- */
.req-card { padding: 16px 16px 14px; }
.req-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 10px; margin-bottom: 8px; }
.req-no { font-size: 14px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.req-no b { color: var(--ink-2); font-weight: 600; }
.req .names, .req-card .names { font-family: var(--serif); font-size: 19px; line-height: 1.4; margin: 2px 0 6px; }
.req-meta { font-size: 14.5px; color: var(--muted); line-height: 1.4; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 11px 5px 8px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pill.wait { background: var(--wait-soft); color: var(--wait); }
.pill.done { background: var(--ok-soft); color: var(--ok); }
.steps { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13.5px; color: var(--muted); }
.steps .st { display: inline-flex; align-items: center; gap: 6px; }
.steps .st i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.steps .st.ok i { background: var(--ok); }
.steps .st.now i { background: var(--gold-bright); box-shadow: 0 0 0 4px var(--wait-soft); }
.steps .bar { flex: 1; height: 2px; border-radius: 2px; background: var(--line); }
.steps .bar.ok { background: var(--ok); }
.empty { text-align: center; padding: 26px 18px; color: var(--muted); }
.empty svg { width: 34px; height: 34px; fill: none; stroke: var(--gold-line); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }

/* ---------- свеча: candle.css ---------- */
@media (prefers-reduced-motion: reduce) { .screen { animation: none !important; } }

/* ---------- меню «Ещё» и храм ---------- */
.menu-item { display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 14px; background: var(--card); min-height: 76px;
  border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 12px; cursor: pointer; width: 100%; text-align: left; box-shadow: var(--shadow); }
.menu-item .ic { width: 46px; height: 46px; border-radius: 14px; }
.menu-item .ic svg { width: 24px; height: 24px; }
.menu-item .mt { flex: 1; min-width: 0; }
.menu-item b { display: block; font-size: 18px; font-weight: 600; }
.menu-item small { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }
.menu-item .chev { width: 10px; height: 10px; border-right: 2px solid var(--gold-line); border-top: 2px solid var(--gold-line); transform: rotate(45deg); margin-right: 6px; flex: none; }
.back { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 6px; text-decoration: none; font-size: 16px; min-height: 40px; }
.back::before { content: ""; width: 9px; height: 9px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.temple-name { font-family: var(--serif); font-size: 23px; font-weight: 600; margin: 8px 0 6px; line-height: 1.25; }
.info-row { display: flex; gap: 10px; align-items: center; color: var(--ink-2); font-size: 15.5px; margin-top: 6px; }
.info-row svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sched { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.sched:last-child { border-bottom: 0; padding-bottom: 2px; }
.sched b { display: block; font-weight: 600; font-size: 16.5px; line-height: 1.3; }
.sched small { display: block; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.sched .time { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--gold); white-space: nowrap; }
.feast-title { font-family: var(--serif); font-size: 21px; line-height: 1.35; margin-top: 10px; }
.saints { margin: 10px 0 0; padding: 0; list-style: none; }
.saints li { position: relative; padding: 8px 0 8px 22px; line-height: 1.45; border-bottom: 1px dashed var(--line); font-size: 16px; }
.saints li:last-child { border-bottom: 0; }
.saints li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 7px; height: 7px; transform: rotate(45deg); border: 1.5px solid var(--gold-line); }
details.card summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 17.5px; font-weight: 600; cursor: pointer; min-height: 28px; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg) translateY(-3px); flex: none; transition: transform .2s; }
details.card[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
details.card p { line-height: 1.6; white-space: pre-line; margin: 12px 0 0; font-size: 16.5px; color: var(--ink-2); }

/* ---------- нижнее меню ---------- */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--card) 94%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -18px rgba(9,32,66,.4); }
.tabs button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 12.5px; font-weight: 500; color: var(--muted); cursor: pointer; padding: 0; }
.tabs .ti { display: grid; place-items: center; width: 56px; height: 32px; border-radius: 999px; transition: background .2s; }
.tabs svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on { color: var(--ink); font-weight: 700; }
.tabs button.on .ti { background: var(--gold-soft); color: var(--gold); }
html:not(.dark) .tabs button.on .ti { color: #8A5F14; }
.tabs button.on svg { stroke-width: 1.9; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 18px); transform: translate(-50%, 20px); opacity: 0;
  background: var(--navy); color: #FBEFD3; padding: 13px 18px; border-radius: 14px; font-size: 16px; transition: .25s; z-index: 20;
  max-width: calc(100% - 32px); text-align: center; pointer-events: none; box-shadow: var(--shadow-lg); }
html.dark .toast { background: var(--gold-bright); color: #0A1E3D; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.success { text-align: center; padding: 26px 18px 20px; }
.success h2 { margin: 12px 0 10px; font-size: 24px; }
.success p { line-height: 1.5; }
.success .mark { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.success .mark svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.success .mark.bell { background: var(--gold-soft); color: var(--gold); }
.success .mark img { width: 46px; height: 48px; object-fit: contain; }
.loading { display: flex; justify-content: center; gap: 8px; padding: 70px 0; }
.loading .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold-bright); animation: pulse 1.2s infinite ease-in-out; }
.loading .dot:nth-child(2) { animation-delay: .2s; } .loading .dot:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { 0%, 100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
.err { color: var(--danger); font-size: 15px; margin-top: 10px; font-weight: 500; }
.err:empty { display: none; }
.orn { margin: 6px auto 18px; max-width: 260px; }

/* ---------- выбор храма: карточка с системным списком, поиск ---------- */
.field-label { font-size: 15.5px; color: var(--ink-2); margin: 12px 2px 8px; }
.picker { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 14px; border: 1.5px solid var(--line);
  border-radius: 16px; background: var(--card); box-shadow: var(--shadow-sm); cursor: pointer; }
.picker .pk { flex: 1; min-width: 0; }
.picker b { display: block; font-size: 17px; font-weight: 600; line-height: 1.3; }
.picker small { display: block; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.picker .pk-change { color: var(--gold); font-weight: 600; font-size: 15px; flex: none; }
.picker select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; }
.picker:focus-within { border-color: var(--gold-line); box-shadow: 0 0 0 4px var(--gold-soft); }
.finder { position: relative; margin: 4px 0 6px; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 56px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow-sm); }
.search:focus-within { border-color: var(--gold-line); box-shadow: 0 0 0 4px var(--gold-soft); }
.search svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 17.5px; padding: 14px 0; box-shadow: none !important; }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }
.suggest { position: absolute; left: 0; right: 0; top: 62px; z-index: 6; background: var(--card); border: 1px solid var(--gold-line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.sg { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 13px 14px; border: 0; background: none; cursor: pointer; border-bottom: 1px solid var(--line); }
.sg:last-child { border-bottom: 0; }
.sg:active { background: var(--gold-soft); }
.sg svg { width: 20px; height: 20px; flex: none; margin-top: 2px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sg b { display: block; font-size: 16.5px; font-weight: 600; }
.sg small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.sg-empty { padding: 16px; color: var(--muted); font-size: 15.5px; }
.btn.near { margin-top: 10px; min-height: 52px; font-size: 17px; }
.btn.near svg { color: var(--gold); }

/* поиск храма по базе России: подсказки, расстояние, «принимает записки», подпись OSM */
.sg-main { flex: 1; min-width: 0; }
.sg-dist { flex: none; align-self: center; color: var(--gold); font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.sg-ok { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; padding: 2px 9px 2px 6px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 600; }
.sg .sg-ok svg { width: 14px; height: 14px; margin: 0; stroke: currentColor; stroke-width: 2.2; }
.sg-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; color: var(--muted); font-size: 13.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.sg-head svg { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 1.8; }
.sg-attr { padding: 8px 14px 10px; color: var(--muted); font-size: 12px; text-align: right; background: var(--bg2); }
.note-box svg { width: 18px; height: 18px; vertical-align: -3px; fill: none; stroke: var(--gold); stroke-width: 2; }
.info-row a { color: inherit; text-decoration: underline; text-decoration-color: var(--gold-line); text-underline-offset: 3px; }
.info-row span { min-width: 0; overflow-wrap: anywhere; }

/* ---------- статусы заявок (Мои заявки) ---------- */
.pill.rej { background: color-mix(in srgb, var(--danger) 14%, var(--card)); color: var(--danger); }
.pill.new { background: var(--navy); color: #FBEFD3; }
html.dark .pill.new { background: var(--gold-bright); color: #0A1E3D; }
.req-reply { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg2); font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.req-reply.rej { background: color-mix(in srgb, var(--danger) 10%, var(--card)); }
.req-reply svg { width: 18px; height: 18px; flex: none; margin-top: 2px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.donation small { color: var(--muted); font-size: 14px; }

/* ---------- кабинет храма ---------- */
html.cab-mode .top { background:
    radial-gradient(120% 90% at 85% -20%, rgba(229,176,82,.30), transparent 55%),
    linear-gradient(180deg, #0B2246, #0F2C57); }
html.cab-mode .brand-sub { color: var(--gold-light); font-weight: 500; }
.lead { font-size: 17px; line-height: 1.5; margin: 0 0 10px; }
.cab-entry { border-color: var(--gold-line); box-shadow: inset 0 0 0 1px var(--gold-soft), var(--shadow); }
.cab-entry .ic { background: var(--navy); color: var(--gold-bright); }
html.dark .cab-entry .ic { background: var(--gold-bright); color: #0A1E3D; }
.code-input { font-family: var(--serif); font-size: 21px !important; letter-spacing: .05em; text-transform: uppercase; text-align: center; }
.cab-hero { position: relative; overflow: hidden; }
.cab-photo { display: block; width: calc(100% + 36px); margin: -18px -18px 14px; height: 150px; object-fit: cover; }
.pause-badge { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 7px 12px; border-radius: 999px; background: var(--wait-soft); color: var(--wait); font-weight: 600; font-size: 15px; }
.pause-badge svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 14px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 14px 14px 16px; min-height: 132px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); cursor: pointer; color: var(--ink); }
.stat:disabled { cursor: default; opacity: 1; }
.stat-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); margin-bottom: 6px; }
.stat-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.stat-n { font-family: var(--serif); font-size: 36px; font-weight: 600; line-height: 1.05; }
.stat-l { font-size: 15px; line-height: 1.3; color: var(--ink-2); font-weight: 500; }
.stat-s { font-size: 13.5px; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.stat.accent { background: linear-gradient(165deg, var(--navy-2), var(--navy)); border-color: var(--navy); color: #FBEFD3; }
.stat.accent .stat-l, .stat.accent .stat-s { color: rgba(251,239,211,.85); }
.stat.accent .stat-ic { background: rgba(229,176,82,.18); color: var(--gold-bright); }
.stat.accent .stat-n { color: var(--gold-bright); }
html.dark .stat.accent { background: linear-gradient(165deg, #F0C670, #E1A945); border-color: #E1A945; color: #0A1E3D; }
html.dark .stat.accent .stat-l, html.dark .stat.accent .stat-s, html.dark .stat.accent .stat-n { color: #0A1E3D; }
html.dark .stat.accent .stat-ic { background: rgba(9,32,66,.14); color: #0A1E3D; }
.cab-line { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 14px 16px; font-size: 16px; }
.cab-line > div { display: inline-flex; align-items: center; gap: 8px; }
.cab-line svg { width: 20px; height: 20px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.switch[hidden], [hidden] { display: none !important; }

.cab-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 16px; }
.cnt { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--line); color: var(--ink); font-size: 13.5px; font-weight: 700; }
.cnt.hot { background: var(--navy); color: #FBEFD3; }
html.dark .cnt.hot { background: var(--gold-bright); color: #0A1E3D; }
.filt button { min-height: 42px; padding: 0 15px; font-size: 15.5px; }
.date-f { margin-top: 0; }
.sel-all { margin: 4px 2px 10px; }
.chk-l { display: inline-flex; align-items: center; gap: 12px; font-size: 16px; cursor: pointer; min-height: 44px; }
.chk { width: 28px; height: 28px; accent-color: var(--gold-bright); flex: none; margin: 0; cursor: pointer; }
.req-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 14px 14px 12px; transition: border-color .15s, box-shadow .15s; }
.req-row.sel { border-color: var(--gold-line); box-shadow: inset 0 0 0 1px var(--gold-line), var(--shadow); }
.req-row.overdue { border-left: 4px solid var(--wait); }
.chk-wrap { display: grid; place-items: center; min-width: 44px; min-height: 44px; margin: -6px -4px 0 -6px; cursor: pointer; }
.req-body { flex: 1; min-width: 0; cursor: pointer; }
.req-row .names { font-family: var(--serif); font-size: 20px; line-height: 1.4; margin: 2px 0 6px; overflow-wrap: anywhere; }
.late { color: var(--wait); font-weight: 600; }
.req-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.qbtn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 0 16px; border-radius: 13px; border: 0; cursor: pointer;
  font-size: 16px; font-weight: 600; background: var(--navy); color: #FBEFD3; }
.qbtn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.qbtn.gold { background: linear-gradient(180deg, #F0C670, #E1A945); color: #0A1E3D; }
.qbtn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
html.dark .qbtn { background: var(--navy-3); }
html.dark .qbtn.gold { background: linear-gradient(180deg, #F0C670, #E1A945); }
html.dark .qbtn.ghost { background: transparent; }
.qbtn:disabled { opacity: .5; }
.bulk { position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 10px); z-index: 12; max-width: 620px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--gold-line); box-shadow: var(--shadow-lg); font-weight: 600; font-size: 16px; }
.bulk-b { display: flex; gap: 6px; flex: none; }
.bulk .qbtn { padding: 0 13px; font-size: 15.5px; min-height: 46px; }
.bulk .qbtn.ghost { padding: 0 11px; }
#bulkN { line-height: 1.2; font-size: 15px; }
body:has(.bulk:not([hidden])) .screen { padding-bottom: 90px; }

.req-one { padding: 18px; }
.names-big { margin: 10px 0 12px; padding-left: 0; list-style: none; font-family: var(--serif); font-size: 24px; line-height: 1.5; }
.names-big li { padding: 4px 0; border-bottom: 1px dashed var(--line); overflow-wrap: anywhere; }
.names-big li:last-child { border-bottom: 0; }
.names-big.one { font-size: 22px; }

.list-tools { border-top: 0; padding-top: 0; }
.list-tools b { color: var(--ink); }
.svc { padding: 18px 18px 14px; }
.svc h4 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--navy); }
html.dark .svc h4 { color: var(--gold-light); }
.svc h4 small { margin-left: auto; font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--muted); }
.svc .cross { color: var(--gold); }
.svc-names { margin: 0; padding: 0; list-style: none; font-family: var(--serif); font-size: 24px; line-height: 1.55; }
.svc-names li { padding: 3px 0; border-bottom: 1px dashed var(--line); overflow-wrap: anywhere; }
.svc-names li:last-child { border-bottom: 0; }
.btn.sure { box-shadow: 0 0 0 4px var(--gold-soft), 0 10px 22px -10px rgba(201,145,46,.85); }

.photo-card { padding: 14px; }
.photo-box { display: grid; place-items: center; gap: 6px; height: 170px; border-radius: 14px; overflow: hidden; background: var(--bg2); color: var(--muted); border: 1.5px dashed var(--line); }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-box svg { width: 40px; height: 40px; fill: none; stroke: var(--gold-line); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.file-btn { cursor: pointer; }
.place-row { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.place-row .pr-ic { color: var(--gold); display: grid; place-items: center; }
.place-row .pr-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.place-row input { flex: 1; min-width: 0; font-size: 17px; padding: 12px 14px; }
.pr-x { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; flex: none; color: var(--muted); }
.pr-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
input:disabled, textarea:disabled { opacity: .75; }
.switch input[type=checkbox]:disabled { opacity: .6; }
.staff-row { display: flex; align-items: center; gap: 12px; padding: 14px; }
.staff-row .mt { flex: 1; min-width: 0; }
.staff-row b { display: block; font-size: 17px; font-weight: 600; }
.staff-row small { display: block; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.staff-row .mine { color: var(--gold); font-weight: 700; }
.invite { text-align: center; }
.code-big { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: .06em; margin: 8px 0 4px; color: var(--ink); user-select: all; }

/* выбор храма в записке и свече: карточка-кнопка «Сменить» открывает полный поиск */
button.picker { width: 100%; text-align: left; font: inherit; color: inherit; margin: 0 0 6px; }
button.picker:focus-visible { border-color: var(--gold-line); box-shadow: 0 0 0 4px var(--gold-soft); outline: none; }
.sg-empty svg { width: 18px; height: 18px; vertical-align: -3px; fill: none; stroke: var(--gold); stroke-width: 2; }
