/* Demo styles. Everything inside .device is the sample app. */
:root {
  --card: #e8dfcd;
  --card-ink: #1a1916;
  --card-mute: #6b6354;
  --sunday: #c0504d;
  --tile: #14151b;
}
.demo-intro { padding: 56px 0 28px; }
.controls { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 26px; }
.seg { display: inline-flex; border: 1px solid var(--gold-dim); border-radius: 999px; padding: 3px; background: var(--panel); }
.seg button { font: 600 14px var(--sans); border: 0; background: transparent; color: var(--muted); padding: 9px 22px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--gold); color: #1a1916; }
.linkish { font: 14px var(--sans); background: none; border: 0; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; }
.linkish:hover { color: #e3c24f; }

.stage-wrap { margin: 18px auto 0; display: flex; justify-content: center; }
.scaler { transform-origin: top left; }
.demo-note { max-width: 680px; margin: 30px auto 80px; text-align: center; font-size: 14px; color: var(--muted); }

/* Device frames */
.device { background: radial-gradient(120% 90% at 100% 100%, #24211a 0%, transparent 55%), linear-gradient(160deg, #1e1f26, #15161c 45%); color: var(--parchment-dim); position: relative; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,0.5); text-align: left; }
.device.mobile { width: 390px; height: 790px; border-radius: 46px; border: 10px solid #0b0c10; font-family: var(--serif); }
.device.desktop { width: 980px; height: 640px; border-radius: 12px; border: 1px solid #34364a; }
.device.mobile button, .device.mobile input, .device.mobile select { font-family: var(--serif); }
.titlebar { display: none; align-items: center; gap: 8px; height: 30px; padding: 0 12px; font-size: 13px; color: var(--parchment-dim); font-weight: 600; flex: none; }
.titlebar i { width: 12px; height: 12px; border-radius: 50%; background: #3a3c48; display: block; }
.titlebar span { margin: 0 auto; transform: translateX(-24px); }
.desktop .titlebar { display: flex; }
.body { flex: 1; min-height: 0; display: flex; position: relative; }
.mobile .body { flex-direction: column; }
.screen-wrap { position: relative; flex: 1; min-height: 0; min-width: 0; }
.screen { position: absolute; inset: 0; overflow-y: auto; scrollbar-width: none; padding: 40px 18px 100px; outline: 0; }
.screen::-webkit-scrollbar { display: none; }
.desktop .screen { padding: 22px 26px 40px; }

/* Navigation */
.sidebar { display: none; width: 188px; flex: none; background: rgba(12,13,17,0.45); border-right: 1px solid var(--line-soft); padding: 14px 10px; flex-direction: column; gap: 1px; overflow: hidden; }
.desktop .sidebar { display: flex; }
.sidebar .collapse { color: var(--muted); padding: 4px 10px 14px; }
.sidebar .collapse svg { width: 20px; height: 20px; }
.sidebar .grp { font: 600 11.5px var(--sans); color: var(--muted); padding: 12px 10px 5px; }
.sidebar button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: 13.5px var(--sans); color: var(--parchment-dim); background: transparent; border: 0; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.sidebar button:hover { background: rgba(255,255,255,0.05); }
.sidebar button[aria-current="true"] { background: #101117; color: var(--parchment); font-weight: 600; }
.sidebar svg, .tabbar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; opacity: 0.85; }

.tabbar { display: none; position: absolute; left: 12px; right: 12px; bottom: 12px; height: 68px; border-radius: 26px; background: rgba(28,30,40,0.96); border: 1px solid rgba(255,255,255,0.05); padding: 6px; z-index: 4; }
.mobile .tabbar { display: flex; }
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; letter-spacing: 0.04em; color: var(--muted); background: transparent; border: 0; cursor: pointer; border-radius: 18px; }
.tabbar svg { width: 22px; height: 22px; }
.tabbar button[aria-current="true"] { color: var(--gold); background: rgba(201,162,39,0.08); }

/* Type inside the app */
.device h2 { font-size: 26px; margin: 0; font-weight: 500; }
.device.desktop h2 { font-size: 30px; }
.device h3 { font-size: 18px; margin: 0; }
.device p { margin: 0 0 12px; }
.sub { color: var(--muted); font-size: 14px; }
.kicker { text-transform: uppercase; letter-spacing: 0.16em; font-size: 11px; color: var(--gold); margin: 0 0 6px; }
.device button { font-family: inherit; }
.page-title { margin: 6px 0 16px; }

/* Home header */
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plus { background: none; border: 0; color: var(--gold); font-size: 30px; line-height: 1; cursor: pointer; padding: 4px 8px; font-weight: 300; }
.month-row { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 10px; font-size: 20px; color: var(--parchment); }
.desktop .month-row { display: none; }
.arrow { background: none; border: 0; color: var(--gold-dim); font-size: 22px; cursor: pointer; padding: 0 8px; line-height: 1; }
.arrow:hover { color: var(--gold); }

.week-wrap { display: flex; align-items: center; justify-content: center; gap: 4px; }
.desktop .week-wrap { margin: 16px 0 0; }
.week { display: flex; gap: 8px; justify-content: center; flex: 1; }
.desktop .week { flex: none; gap: 7px; }
.day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 44px; height: 54px; flex: none; background: var(--tile); border: 1.5px solid transparent; border-radius: 14px; color: var(--muted); cursor: pointer; padding: 0; font-size: 11px; text-transform: lowercase; position: relative; }
.desktop .day { width: 38px; height: 50px; text-transform: uppercase; font-family: var(--sans); font-size: 9.5px; }
.day b { font: 500 19px var(--serif); color: var(--parchment); }
.desktop .day b { font-size: 17px; }
.day.fast { background: var(--violet-bg); color: #8f87b8; }
.day.fast b { color: #b9b1de; }
.day.sun b { color: var(--sunday); }
.day.sel { border-color: var(--gold); }
.day .mk { position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.mobile .week .day:nth-child(1), .mobile .week .day:nth-child(7) { width: 30px; opacity: 0.6; }
.chev-row { display: flex; justify-content: center; margin: 2px 0 0; }
.chev { background: none; border: 0; color: var(--gold-dim); cursor: pointer; padding: 2px 30px; }
.chev svg { width: 38px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.chev[aria-expanded="true"] svg { transform: rotate(180deg); }

.month { margin: 8px 0 0; }
.month .dow { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 11px; color: var(--faint); text-transform: lowercase; margin-bottom: 6px; }
.month .cells { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px 4px; }
.month .day { width: auto; height: 46px; background: transparent; margin: 0 auto; width: 100%; max-width: 52px; }
.month .day.fast { background: var(--violet-bg); }
.month .day b { font-size: 17px; color: var(--parchment-dim); }
.month .day.fast b { color: #b9b1de; }
.month .day.sun b { color: var(--sunday); }
.month .day .mk { bottom: 6px; }
.month .day.fast .mk { background: #8f87b8; }
.month .day.sun .mk { background: var(--sunday); }
.month .blank { height: 46px; }

.litur { text-align: center; color: var(--muted); font-size: 17px; margin: 14px 0 22px; min-height: 22px; }
.desktop .litur { text-align: left; margin: 26px 0 12px; font-size: 17px; }
.dateline { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.dateline b { font: 500 21px var(--serif); color: var(--parchment); }
.desktop .dateline { justify-content: flex-start; margin-bottom: 10px; }
.desktop .dateline b { font: 700 17px var(--sans); }
.dateline span { color: var(--faint); font-size: 15px; }
.desktop .dateline span { display: none; }
.commit { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.commit button { background: none; border: 0; color: var(--gold); font-size: inherit; cursor: pointer; padding: 0; }
.commit button:hover { color: #e3c24f; }
.desktop .commit { font-family: var(--sans); font-size: 13px; }
.desktop .commit .dot-sep { display: none; }
.desktop .commit button { margin-left: 8px; font-weight: 600; }

.marker { display: flex; gap: 10px; background: var(--violet-bg); border-radius: 12px; padding: 11px 14px; margin: 0 0 14px; color: #d9d3ee; font-size: 14px; line-height: 1.5; }

/* Cards */
.cards { display: flex; gap: 12px; overflow-x: auto; margin: 0 -18px; padding: 0 18px 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
.desktop .cards { margin: 0 -26px; padding: 0 26px 4px; }
.cards::-webkit-scrollbar { display: none; }
.card-r { position: relative; flex: none; width: 112px; min-height: 212px; background: var(--card); color: var(--card-ink); border-radius: 22px; padding: 14px 12px 12px; display: flex; flex-direction: column; text-align: left; cursor: pointer; border: 0; scroll-snap-align: start; }
.desktop .card-r { width: 132px; min-height: 232px; border-radius: 20px; padding: 14px; font-family: var(--serif); }
.card-r .ic { width: 20px; height: 20px; stroke: #7a6a38; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card-r .kind { font-size: 11px; color: var(--card-mute); margin: 10px 0 6px; font-family: var(--serif); }
.desktop .card-r .kind { font-family: var(--sans); font-size: 11px; margin-top: 8px; }
.card-r .ttl { font: 500 19px/1.15 var(--serif); color: var(--card-ink); margin-bottom: 8px; }
.desktop .card-r .ttl { font-size: 20px; }
.card-r .desc { font-size: 12px; line-height: 1.4; color: var(--card-mute); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-r.open .desc { -webkit-line-clamp: unset; }
.card-r .foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; padding-top: 10px; font-size: 12px; color: #5a564c; }
.card-r .expand { background: none; border: 0; padding: 0; color: #5a564c; cursor: pointer; line-height: 1; }
.card-r .expand svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; }
.card-r .circle { position: absolute; top: 10px; right: 10px; }
.card-r.paused { opacity: 0.55; }
.circle { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.6px solid #a98c25; background: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; color: #1a1916; }
.circle:hover { border-color: #7a6310; }
.circle svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.circle[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); }
.circle[aria-pressed="true"] svg { opacity: 1; }
.circle:disabled { opacity: 0.35; cursor: default; }
.add-card { flex: none; width: 112px; min-height: 212px; border: 1.5px dashed var(--line); border-radius: 22px; background: transparent; color: var(--gold); cursor: pointer; font-size: 15px; }
.desktop .add-card { width: 132px; min-height: 232px; border-radius: 20px; font-family: var(--serif); }
.add-card:hover { border-color: var(--gold-dim); }

/* Pictures */
.pic { position: relative; border-radius: 18px; overflow: hidden; min-height: 210px; background: #101117; margin-top: 20px; }
.desktop .pic { min-height: 250px; margin-top: 18px; }
.pic .pan { position: absolute; inset: -5%; background: center / cover no-repeat; animation: drift 40s ease-in-out forwards; }
.pic.still .pan { animation: none; inset: 0; }
@keyframes drift { from { transform: scale(1.06) translate(-1.5%, 1%); } to { transform: scale(1.06) translate(1.5%, -1%); } }
.pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,15,20,0) 45%, rgba(14,15,20,0.8)); }
.pic .words { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 18px 18px 16px; }
.pic .words small.k { display: block; font: 12px var(--sans); color: #efe6d2; margin-bottom: 4px; }
.mobile .pic .words small.k { font-family: var(--serif); }
.pic .words q { display: block; font: 500 21px/1.3 var(--serif); color: #f6efdd; quotes: none; }
.pic .words small.a { display: block; margin-top: 6px; font: 12px var(--sans); color: #efe6d2; }
.mobile .pic .words small.a { font-family: var(--serif); }
.pic.progress { min-height: 330px; margin-top: 18px; }
.desktop .pic.progress { min-height: 430px; margin-top: 6px; }
.pic.progress .words { text-align: center; }
.pic.progress .words q { font: italic 500 19px/1.45 var(--serif); }
.pic.progress .words q::before { content: "\201C"; display: block; font-size: 50px; line-height: 0.6; color: var(--gold); margin-bottom: 6px; font-style: normal; }
.pic.progress .words small.a { font-size: 11px; letter-spacing: 0.06em; text-transform: none; }

/* Prayers */
.pr-pick { display: flex; justify-content: center; margin: 10px 0 12px; }
.pr-pick select { appearance: none; -webkit-appearance: none; background: #4c4d55 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='14' fill='none' stroke='%23fff' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'><path d='M2 5l3-3 3 3M2 9l3 3 3-3'/></svg>") right 8px center no-repeat; color: #f1ece0; border: 0; border-radius: 6px; padding: 5px 28px 5px 12px; font: 14px var(--sans); min-width: 230px; text-align: left; }
.rope-wrap { position: relative; text-align: center; }
.rope-wrap .again { position: absolute; top: 2px; right: 0; background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; padding: 4px; }
.rope-wrap .again:hover { color: var(--parchment); }
.rope { display: block; margin: 4px auto 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rope .num { font: 300 54px var(--sans); fill: var(--gold); text-anchor: middle; }
.rope .of { font: 13px var(--sans); fill: var(--muted); text-anchor: middle; }
.rope .of.done { fill: var(--gold-dim); }
.countbar { display: block; width: 100%; margin-top: 12px; background: var(--gold); color: var(--ground); border: 0; border-radius: 6px; padding: 10px; font: 15px var(--sans); cursor: pointer; }
.mobile .countbar { font-family: var(--serif); border-radius: 12px; }
.countbar:hover { background: #dbb637; }
.hint-line { text-align: center; color: var(--faint); font-size: 14px; margin: 8px 0 14px; }
.rope-words { border-top: 1px solid var(--line-soft); padding-top: 18px; text-align: center; font: 500 20px/1.5 var(--serif); color: var(--parchment); }
.rope-words small { display: block; font: 10px var(--sans); color: var(--faint); margin-top: 6px; }
.pr-foot { display: flex; align-items: center; gap: 8px; margin-top: 22px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.pr-foot .t { background: var(--panel); color: var(--muted); border: 0; border-radius: 4px; width: 42px; height: 24px; font: 14px var(--sans); cursor: pointer; }
.pr-foot .t[aria-pressed="true"] { background: var(--gold); color: var(--ground); }
.pr-foot .sp { flex: 1; }
.pr-foot .hide { background: none; border: 0; color: var(--gold); font: 14px var(--sans); cursor: pointer; }
.prayer-text { font-family: var(--serif); font-size: 19px; line-height: 1.75; color: var(--parchment); }
.prayer-text p { margin-bottom: 1em; }
.prayer-text cite { display: block; font: 12px var(--sans); color: var(--muted); font-style: normal; margin-top: 4px; letter-spacing: 0.04em; }

/* Reading */
.disclosure { border-bottom: 1px solid var(--line-soft); margin: 0; }
.disclosure > button { display: flex; width: 100%; justify-content: space-between; align-items: center; background: transparent; border: 0; color: var(--parchment); font: 500 21px var(--serif); padding: 18px 2px; cursor: pointer; text-align: left; }
.disclosure .chv { display: grid; place-items: center; color: var(--parchment-dim); transition: transform 0.25s; }
.disclosure .chv svg { width: 14px; height: 9px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.disclosure .chv.up { transform: rotate(180deg); }
.disclosure .inner { padding: 0 2px 18px; }
.disclosure .prayer-text { font-size: 17px; line-height: 1.7; margin: 0; }
.r-day { font-size: 13px; color: var(--muted); margin-top: 4px; }
.r-saint { font: 500 24px/1.3 var(--serif); color: var(--gold); margin: 6px 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.desktop .r-saint { font-size: 27px; }
.u { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.pn { font: italic 13px var(--sans); color: var(--muted); margin: 0 0 6px; }
.life-date { font: 500 18px var(--serif); color: var(--gold); margin: 4px 0 8px; }
.life-h { font: 500 16px var(--serif); color: var(--parchment); margin-bottom: 10px; }
.life-n { font: 500 14px var(--serif); letter-spacing: 0.02em; color: var(--parchment); margin: 12px 0 8px; }
.fathers { margin-top: 16px; }
.fathers small { display: block; font-size: 12px; color: var(--muted); }
.fathers q { display: block; font: 500 18px/1.45 var(--serif); color: var(--parchment); quotes: none; margin: 6px 0; }
.r-foot { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }
.ps { font: 10.5px var(--sans); color: var(--muted); margin: 6px 0 0; text-decoration: none; }
.ps a { color: var(--muted); }

/* The text trails off, and the demo says so. */
.trail { position: relative; max-height: 64px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, transparent 100%); }
.trail.tall { max-height: 96px; }
.demo-only { font: italic 15px var(--serif); color: var(--parchment); border-top: 1px solid var(--line-soft); margin: 4px 0 0; padding-top: 14px; }
.demo-only a, .demo-only-box a { color: var(--gold); }
.demo-only-box { background: var(--panel); border: 1px dashed var(--gold-dim); border-radius: 12px; padding: 13px 16px; margin: 16px 0 6px; font-size: 14px; line-height: 1.5; color: var(--parchment); }
.demo-only-box b { color: var(--gold); font-weight: 600; }

/* Prayers, as the app sets a sequence */
.seq { padding: 0 2px; }
.seq .pt { font: 500 16px var(--sans); color: var(--gold); margin: 16px 0 3px; }
.mobile .seq .pt { font-family: var(--serif); font-size: 18px; }
.seq .pb { font: 19px/1.6 var(--serif); color: var(--parchment); }
.seq .pb p { margin: 2px 0 0; }
.desktop .seq { padding: 0 6%; }
.gl, .u { font: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; color: var(--gold); text-align: inherit; }
.gl { border-bottom: 1px dashed var(--gold-dim); }
.gl:hover { color: #e3c24f; border-bottom-color: var(--gold); }
.u:hover { color: #e3c24f; }

/* Home with nothing taken on */
.empty { text-align: center; padding: 26px 0 8px; }
.empty-plus { width: 54px; height: 54px; border-radius: 50%; border: 1.5px solid var(--gold-dim); background: transparent; color: var(--gold); font: 300 32px/1 var(--sans); cursor: pointer; margin: 0 auto 14px; display: grid; place-items: center; padding: 0 0 3px; }
.empty-plus:hover { border-color: var(--gold); background: rgba(201,162,39,0.08); }
.empty p { font: 500 20px var(--serif); color: var(--parchment); margin: 0; }

/* Progress */
.prose-box { font-family: var(--serif); font-size: 20px; line-height: 1.55; color: var(--parchment); margin: 6px 0 6px; }
.prose-box p { margin: 0 0 6px; }
.by-rule { border-top: 1px solid var(--line-soft); }
.br-h { padding: 10px 0 4px; }
.rule-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font: 15px var(--serif); color: var(--parchment); }
.rr-r { color: var(--muted); font: 13px var(--sans); white-space: nowrap; }
.rr-r b { color: var(--gold); font-weight: 400; margin-right: 14px; }
.sample { margin: 14px 0 0; font-size: 12px; }
.figure { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 20px; }
.figure b { font: 500 32px var(--serif); color: var(--gold); }
.figure span { font-size: 13px; color: var(--muted); }
.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row .top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; color: var(--parchment-dim); }
.bar-row .top span { color: var(--muted); }
.track { height: 7px; background: #262831; border-radius: 99px; overflow: hidden; }
.fill { height: 100%; background: var(--gold); border-radius: 99px; transition: width 0.5s; }
.paused-row .fill { background: var(--violet); opacity: 0.6; }
.desktop .progress-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.cap { font: 12px/1.4 var(--sans); color: #efe6d2; text-align: center; }
.mobile .cap { font-family: var(--serif); }

/* Library, glossary, settings */
.lib-item { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 14px; padding: 14px 16px; margin: 10px 0; }
.lib-item .txt { flex: 1; }
.lib-item b { display: block; font: 500 17px var(--serif); color: var(--parchment); }
.lib-item span { font-size: 13px; color: var(--muted); }
.dbtn { background: var(--gold); color: #1a1916; border: 0; border-radius: 999px; padding: 10px 20px; font-weight: 600; font-size: 14px; cursor: pointer; }
.dbtn:hover { background: #dbb637; }
.dbtn.ghost { background: transparent; color: var(--gold); border: 1px solid var(--gold-dim); }
.dbtn.ghost:hover { background: rgba(201,162,39,0.1); }
.field { margin: 18px 0; }
.field label, .field .lab { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input[type="text"] { width: 100%; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 10px; color: var(--parchment); padding: 12px 14px; font-size: 16px; }
.field input[type="text"]:focus { border-color: var(--gold); outline: 0; }
.field .hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.mini-seg { display: inline-flex; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.mini-seg button { background: var(--panel); color: var(--muted); border: 0; padding: 9px 16px; font-size: 14px; cursor: pointer; border-right: 1px solid var(--line-soft); }
.mini-seg button:last-child { border-right: 0; }
.mini-seg button[aria-pressed="true"] { background: #2a2820; color: var(--gold); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.toggle-row small { display: block; color: var(--muted); font-size: 12px; }
.switch { width: 46px; height: 28px; border-radius: 99px; background: #33353f; border: 0; position: relative; cursor: pointer; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #cfc8b6; transition: transform 0.2s; }
.switch[aria-checked="true"] { background: var(--gold-dim); }
.switch[aria-checked="true"]::after { transform: translateX(18px); background: #fff7e0; }
.desktop .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.gloss-link { display: block; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; color: var(--parchment); padding: 14px 16px; margin-top: 18px; cursor: pointer; font-size: 16px; }

/* Toast, welcome, splash */
.toast { position: absolute; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #23252e; border: 1px solid var(--gold-dim); color: var(--parchment); padding: 11px 20px; border-radius: 999px; font: italic 16px var(--serif); transition: opacity 0.35s, transform 0.35s; white-space: nowrap; z-index: 5; }
.desktop .toast { bottom: 24px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.welcome { position: absolute; inset: 0; z-index: 10; background: #15161c; display: flex; align-items: center; justify-content: center; padding: 28px; }
.welcome[hidden], .splash[hidden] { display: none; }
.welcome .inner { max-width: 380px; text-align: center; }
.welcome .mark { width: 64px; margin: 0 auto 18px; }
.welcome h2 { font-size: 30px; }
.welcome p { color: var(--muted); font-size: 15px; margin-top: 10px; }
.welcome input { width: 100%; text-align: center; background: var(--panel); border: 1px solid var(--line-soft); color: var(--parchment); border-radius: 12px; padding: 13px; font: 18px var(--serif); margin: 8px 0 18px; }
.welcome input:focus { border-color: var(--gold); outline: 0; }
.splash { position: absolute; inset: 0; z-index: 20; background: #15161c; display: grid; place-items: center; }
.splash svg { width: 150px; height: 150px; overflow: visible; }
.splash .ld { fill: #c9a227; opacity: 0; animation: knot 0.35s ease-out forwards; }
.splash .lx { fill: #c9a227; opacity: 0; animation: knot 0.6s ease-out forwards; animation-delay: 1.5s; }
@keyframes knot { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }
.splash .ld { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  .pic .pan { animation: none; }
  .toast, .fill, .switch::after { transition: none; }
  .splash .ld, .splash .lx { animation: none; opacity: 1; }
}

/* Glossary sheet */
.sheet { position: absolute; inset: 0; z-index: 8; background: rgba(8,9,12,0.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.desktop .sheet { align-items: center; padding: 28px; }
.sheet-card { position: relative; width: 100%; max-width: 560px; max-height: 80%; overflow-y: auto; background: #1d1f27; border: 1px solid var(--line-soft); border-radius: 22px 22px 0 0; padding: 26px 24px 30px; scrollbar-width: none; }
.mobile .sheet-card { padding-bottom: 96px; max-height: 86%; }
.desktop .sheet-card { border-radius: 16px; }
.sheet-card h3 { font: 500 26px var(--serif); color: var(--parchment); margin: 0 0 2px; }
.sheet-card .pron { font: italic 13px var(--sans); color: var(--muted); margin-bottom: 12px; }
.sheet-card .short { font: 500 17px/1.5 var(--serif); color: var(--gold); }
.sheet-card p { font: 16px/1.65 var(--serif); color: var(--parchment-dim); }
.sheet-x { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.sheet-x:hover { color: var(--parchment); }
.rels { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.rels span { font: 12px var(--sans); color: var(--muted); }
.rel { background: transparent; border: 1px solid var(--gold-dim); color: var(--gold); border-radius: 999px; padding: 5px 13px; font: 13px var(--sans); cursor: pointer; }
.rel:hover { background: rgba(201,162,39,0.1); }
.gloss-item { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.gloss-item:hover { border-color: var(--gold-dim); }
