/* Scripture scroll (/scroll/): one verse per screen, scroll-snapped. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0f172a; color: #fff; overscroll-behavior-y: none; }
body { font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* top bar, over the cards */
.top { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px;
       padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
       background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,0)); pointer-events: none; }
.top > * { pointer-events: auto; }
.icon-btn { width: 40px; height: 40px; border-radius: 999px; border: 0; display: inline-flex; align-items: center; justify-content: center;
            background: rgba(0,0,0,.28); color: #fff; cursor: pointer; text-decoration: none; flex-shrink: 0; }
.icon-btn[hidden] { display: none; }
.icon-btn .off, .icon-btn[aria-pressed="false"] .on { display: none; }
.icon-btn[aria-pressed="false"] .off { display: block; }
.icon-btn.nudge { animation: nudge 1.2s ease-in-out 3; box-shadow: 0 0 0 3px #60a5fa; }
@keyframes nudge { 50% { transform: scale(1.15); } }
.feed-btn { flex: 1; min-width: 0; margin: 0 auto; max-width: 70%; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
            border: 0; background: rgba(0,0,0,.28); border-radius: 999px; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.feed-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.banner { position: fixed; z-index: 19; top: calc(60px + env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; align-items: center; gap: 10px;
          padding: 8px 12px; border-radius: 12px; background: rgba(15,23,42,.85); font-size: .875rem; }
.banner[hidden], .toast[hidden] { display: none; }
.banner span { flex: 1; min-width: 0; }
.banner button { border: 0; border-radius: 999px; padding: 6px 12px; background: #2563eb; font-weight: 600; cursor: pointer; white-space: nowrap; }

/* the cards */
.feed { height: 100vh; height: 100dvh; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.card { position: relative; height: 100vh; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden;
        display: flex; align-items: center; background: #1e293b center / cover no-repeat; }
.card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.12), rgba(0,0,0,.28) 60%, rgba(0,0,0,.5)); }
.card.light::before { background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.1)); }
.card.light { color: #292524; }
.content { position: relative; width: 100%; padding: 80px 76px 110px 24px; }
.text { margin: 0; font-family: Georgia, "Times New Roman", serif; line-height: 1.45; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.card.light .text { text-shadow: none; }
.text .w { transition: background-color .1s; border-radius: 3px; }
.text .w.on { background: rgba(250, 204, 21, .45); }
.card.light .text .w.on { background: rgba(250, 204, 21, .6); }
.ref { display: inline-block; margin-top: 16px; font-weight: 700; font-size: 1.05rem; color: inherit; text-decoration: none;
       border-bottom: 1px solid rgba(255,255,255,.5); }
.card.light .ref { border-bottom-color: rgba(41,37,36,.5); }
.tag { position: absolute; left: 24px; bottom: calc(28px + env(safe-area-inset-bottom)); font-size: .8rem; opacity: .85; max-width: calc(100% - 110px);
       overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.actions { position: absolute; z-index: 2; right: 10px; bottom: calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; cursor: pointer; padding: 0;
       font-size: .7rem; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.5); text-decoration: none; color: inherit; }
.act i { width: 46px; height: 46px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.3); color: #fff; }
.card.light .act { text-shadow: none; }
.act.on i { background: #e11d48; }
.act.playing i { background: #2563eb; }

.card.end { background: #0f172a; text-align: center; }
.card.end .content { padding: 80px 24px; }
.card.end h2 { margin: 0 0 8px; font-size: 1.3rem; }
.card.end p { color: #cbd5e1; margin: 0 0 18px; }
.pill { display: inline-block; margin: 4px; padding: 10px 16px; border-radius: 999px; border: 0; background: #2563eb; color: #fff;
        font-weight: 600; cursor: pointer; text-decoration: none; }
.pill.alt { background: rgba(255,255,255,.12); }

/* sheets */
.sheet { position: fixed; z-index: 40; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.sheet-panel { position: relative; width: 100%; max-width: 560px; max-height: 85vh; display: flex; flex-direction: column;
               background: #fff; color: #111827; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 640px) { .sheet { align-items: center; } .sheet-panel { border-radius: 18px; } }
.sheet-head { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid #e5e7eb; }
.sheet-head h2 { flex: 1; margin: 0; font-size: 1.1rem; }
.close { border: 0; background: none; font-size: 1.6rem; line-height: 1; width: 40px; height: 40px; cursor: pointer; color: #4b5563; }
.sheet-body { overflow-y: auto; padding: 12px 16px 20px; }
.sheet-body h3 { margin: 18px 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: #4b5563; }
.note { font-size: .82rem; color: #4b5563; margin: 0 0 10px; }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 12px; cursor: pointer; }
.switch-row span { flex: 1; display: flex; flex-direction: column; }
.switch-row small { color: #4b5563; font-size: .8rem; }
.switch-row input { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: #d1d5db; position: relative; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.switch-row input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px; background: #fff; transition: left .2s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch-row input:checked { background: #2563eb; }
.switch-row input:checked::after { left: 21px; }
.row-btn { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; border: 1px solid #e5e7eb; background: #fff;
           border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; color: #111827; }
.row-btn small { color: #4b5563; }
.row-btn.current { border-color: #2563eb; box-shadow: inset 0 0 0 1px #2563eb; }
.my-feed { display: flex; align-items: stretch; gap: 6px; margin-bottom: 8px; }
.my-feed .row-btn { margin: 0; flex: 1; min-width: 0; }
.my-feed .row-btn strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mini { border: 1px solid #e5e7eb; background: #fff; border-radius: 10px; padding: 0 10px; cursor: pointer; color: #374151; font-size: .8rem; font-weight: 600; }
.ghost { display: inline-block; border: 1px dashed #9ca3af; background: none; border-radius: 12px; padding: 10px 14px; cursor: pointer; color: #1d4ed8; font-weight: 600; }
.file-label { cursor: pointer; }
#topic-search, .new-feed input { width: 100%; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid #d1d5db; color: #111827; background: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { border: 0; border-radius: 999px; padding: 6px 12px; background: #dbeafe; color: #1e3a8a; cursor: pointer; font-size: .875rem; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.swatch { position: relative; aspect-ratio: 9 / 14; border-radius: 10px; border: 2px solid transparent; background: #e5e7eb center / cover; cursor: pointer;
          padding: 0; overflow: hidden; color: #fff; font-size: .7rem; font-weight: 600; display: flex; align-items: flex-end; justify-content: center; }
.swatch span { background: rgba(0,0,0,.45); width: 100%; padding: 2px 0; }
.swatch.sel { border-color: #2563eb; box-shadow: 0 0 0 2px #93c5fd; }
.swatch .del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 999px; border: 0; background: rgba(0,0,0,.6); color: #fff;
               font-size: .9rem; line-height: 1; cursor: pointer; }
.add-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid #e5e7eb; background: #fff; border-radius: 12px;
           padding: 10px 12px; margin-bottom: 8px; cursor: pointer; color: #111827; }
.add-row .box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid #9ca3af; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.add-row.in .box { background: #2563eb; border-color: #2563eb; color: #fff; }
.add-row .box svg { width: 14px; height: 14px; stroke-width: 3; }
.new-feed { display: flex; gap: 8px; margin-top: 12px; }
.new-feed button { border: 0; border-radius: 10px; padding: 0 14px; background: #2563eb; color: #fff; font-weight: 600; cursor: pointer; white-space: nowrap; }

.toast { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: calc(110px + env(safe-area-inset-bottom));
         background: rgba(17,24,39,.92); color: #fff; padding: 8px 16px; border-radius: 999px; font-size: .875rem; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .feed { scroll-behavior: auto; } }
