@font-face { font-family: "Schola"; src: url(/static/fonts/texgyreschola-regular.otf); font-display: swap; }
@font-face { font-family: "Schola"; font-style: italic; src: url(/static/fonts/texgyreschola-italic.otf); font-display: swap; }
@font-face { font-family: "Schola"; font-weight: bold; src: url(/static/fonts/texgyreschola-bold.otf); font-display: swap; }
@font-face { font-family: "Schola"; font-weight: bold; font-style: italic; src: url(/static/fonts/texgyreschola-bolditalic.otf); font-display: swap; }

:root {
  --bg: #f7f2ea; --paper: #fffdf9; --ink: #2b2118; --muted: #7d6b5a; --line: #e8ddcf;
  --accent: #7b4a2a; --accent-ink: #fffaf3; --head: #fffdf9; --head-ink: #2b2118; --head-hover: #f3ebdf; --mark: #f1e0b6; --chip: #f3ebdf;
  --gold: #b08a4a; --ok: #4f7a3a; --no: #a3402c; --maybe: #a07a2c;
  --shadow: 0 6px 24px rgba(60,40,20,.10);
  --img-filter: none; --lyr-size: 19px; --score-h: 45vh; --header-h: 56px; --nav-h: 0px; --score-zoom: 1;
  --serif: "Schola", "Century Schoolbook", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --p-introit: #5b8a46; --p-offertorium: #a8483a; --p-communio: #c9bfb2; --p-adoracio: #4a6f96; --p-exodus: #7b5a3e;
  --p-ordinarium: #b08a4a; --p-psalm: #7d5a8c; --p-other: #9a8b7c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16110d; --paper: #1f1812; --ink: #efe5d8; --muted: #a99682; --line: #3a2e24;
    --accent: #cf9f6e; --accent-ink: #1a130d; --head: #1f1812; --head-ink: #efe5d8; --head-hover: #2c231b; --mark: #5a4626; --chip: #2c231b;
    --gold: #cfa964; --ok: #94bf7c; --no: #e3a08f; --maybe: #e0bd6c; --shadow: 0 6px 24px rgba(0,0,0,.5);
    --img-filter: invert(.9) sepia(.15);
  }
}
:root[data-theme="dark"] {
  --bg: #16110d; --paper: #1f1812; --ink: #efe5d8; --muted: #a99682; --line: #3a2e24;
  --accent: #cf9f6e; --accent-ink: #1a130d; --head: #1f1812; --head-ink: #efe5d8; --head-hover: #2c231b; --mark: #5a4626; --chip: #2c231b;
  --gold: #cfa964; --ok: #94bf7c; --no: #e3a08f; --maybe: #e0bd6c; --shadow: 0 6px 24px rgba(0,0,0,.5);
  --img-filter: invert(.9) sepia(.15);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.4; padding-bottom: var(--nav-h); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- header & navigation (tablet first) ---------- */
#top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
  min-height: var(--header-h); padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  background: var(--head); color: var(--head-ink); border-bottom: 1px solid var(--line);
}
.brand { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex: none; color: var(--accent); }
.logo-mark { display: block; width: 24px; height: 36px; background: currentColor; -webkit-mask: url(/static/logo.svg) center / contain no-repeat; mask: url(/static/logo.svg) center / contain no-repeat; }
.brand svg, .iconbtn svg { width: 24px; height: 24px; fill: currentColor; }
.scholabtn {
  background: none; border: 0; text-align: left; padding: 4px 8px; border-radius: 10px; cursor: pointer; min-width: 0;
  display: flex; flex-direction: column; line-height: 1.15; max-width: 34vw;
}
.scholabtn:hover { background: var(--head-hover); }
.sname { font-family: var(--serif); font-weight: bold; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srole { font-size: 12px; color: var(--muted); }
.nav { flex: 1; display: flex; gap: 2px; justify-content: center; min-width: 0; }
.nav a {
  display: flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 10px; text-decoration: none;
  font-size: 15px; white-space: nowrap; opacity: .85;
}
.nav a svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.nav a:hover { background: var(--head-hover); opacity: 1; }
.nav a.on { background: var(--chip); color: var(--accent); opacity: 1; font-weight: 600; }
.iconbtn { background: none; border: 0; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; flex: none; color: inherit; }
.iconbtn:hover { background: var(--head-hover); }
.popmenu {
  position: absolute; right: 10px; top: calc(100% - 2px); background: var(--paper); color: var(--ink);
  border-radius: 14px; box-shadow: var(--shadow); padding: 6px; min-width: 250px; display: flex; flex-direction: column; z-index: 40;
}
.popmenu.left { right: auto; left: 56px; }
.popmenu .who { padding: 10px 12px 8px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; word-break: break-all; }
.popmenu a, .popmenu button { text-align: left; padding: 12px; border-radius: 9px; text-decoration: none; background: none; border: 0; cursor: pointer; font-size: 15px; }
.popmenu a:hover, .popmenu button:hover { background: var(--chip); }
.popmenu .on { font-weight: 700; color: var(--accent); }
.popmenu small { display: block; color: var(--muted); font-size: 12px; }

@media (max-width: 1100px) {
  :root { --nav-h: calc(62px + env(safe-area-inset-bottom)); }
  .scholabtn { max-width: none; flex: 1; }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--paper); color: var(--ink);
    border-top: 1px solid var(--line); justify-content: space-around; gap: 0; height: var(--nav-h);
    padding: 4px 4px env(safe-area-inset-bottom); box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  }
  .nav a { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 4px; flex: 1; justify-content: center; min-width: 0; opacity: .7; }
  .nav a svg { width: 24px; height: 24px; }
  .nav a:hover { background: none; }
  .nav a.on { background: none; color: var(--accent); opacity: 1; }
  .nav a span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
}
@media (min-width: 641px) and (max-width: 1100px) {
  :root { --nav-h: calc(52px + env(safe-area-inset-bottom)); }
  .nav a { flex-direction: row; font-size: 14px; gap: 8px; }
}
@media (max-width: 640px) { :root { --header-h: 52px; } }

.offline { background: var(--mark); color: var(--ink); text-align: center; font-size: 14px; padding: 7px 12px; }

/* ---------- generic page parts ---------- */
.page { max-width: 920px; margin: 0 auto; padding: 12px 18px 40px; }
.pagehead { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: 2px 0 12px; }
.pagehead h1 { font-family: var(--serif); font-size: 26px; line-height: 1.1; margin: 0; flex: 1; min-width: 200px; color: var(--accent); }
.pagehead .sub { color: var(--muted); font-size: 13.5px; width: 100%; margin-top: -6px; }
h2 { font-family: var(--serif); font-size: 20px; margin: 18px 0 8px; }
.hint { color: var(--muted); font-size: 14px; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; background: var(--paper); border: 1px dashed var(--line); border-radius: 16px; }
.loading { text-align: center; color: var(--muted); padding: 60px 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 16px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--chip); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { color: var(--no); }
.btn.small { min-height: 36px; padding: 5px 12px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; min-width: 0; }
.field { display: block; margin: 14px 0; }
.field > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font-size: 16px;
}
textarea { min-height: 70px; resize: vertical; }
dialog.dlg { border: 0; border-radius: 18px; padding: 20px 20px 18px; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
dialog.dlg::backdrop { background: rgba(20, 12, 6, .45); }
dialog.dlg h2 { margin: 0 0 6px; color: var(--accent); }
dialog.dlg .hint { margin: 0; }
dialog.dlg textarea { min-height: 140px; }
dialog.dlg label.chk { flex-wrap: nowrap; align-items: flex-start; }
dialog.dlg label.chk input { flex: none; }
dialog.dlg label.chk span { min-width: 0; overflow-wrap: anywhere; }
.fb-pic { margin: -4px 0 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.fb-pic label.btn { cursor: pointer; white-space: normal; }
#fb-prev { display: flex; align-items: flex-end; gap: 10px; }
#fb-prev img { max-width: 160px; max-height: 120px; border-radius: 8px; border: 1px solid var(--line); object-fit: contain; background: var(--bg); }
.row.end { justify-content: flex-end; margin-top: 16px; }
.box { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--nav-h)); transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 11px 18px; border-radius: 11px; z-index: 60; font-size: 15px; box-shadow: var(--shadow); max-width: calc(100% - 32px);
}
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--chip); color: var(--muted); white-space: nowrap; }

/* volume/page badge for the paper songbook */
.tp {
  display: inline-flex; align-items: baseline; gap: 4px; flex: none; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px;
  padding: 4px 10px; border-radius: 9px; background: var(--chip); color: var(--ink); white-space: nowrap; font-family: var(--sans);
}
.tp small { font-weight: 500; color: var(--muted); font-size: 12px; }

/* ---------- plan cards (week, plan view) ---------- */
.plans { display: grid; gap: 12px; }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.plan-h { display: flex; align-items: center; gap: 10px; padding: 9px 14px 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.plan-h .d { flex: 1; min-width: 180px; }
.plan-h .day { font-family: var(--serif); font-weight: bold; font-size: 20px; line-height: 1.15; }
.plan-h .day .rel { font-family: var(--sans); font-weight: 600; font-size: 12px; color: var(--accent); margin-left: 8px; vertical-align: middle;
  text-transform: uppercase; letter-spacing: .05em; }
.plan-h .ttl { color: var(--muted); font-size: 14px; margin-top: 2px; }
.plan-note { padding: 7px 14px; font-size: 15px; background: var(--bg); border-bottom: 1px solid var(--line); white-space: pre-wrap; }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 6px 14px; text-decoration: none; min-height: 48px; }
a.item:hover { background: var(--chip); }
.item + .item { border-top: 1px solid var(--line); }
.item .part { width: 112px; flex: none; font-size: 12.5px; color: var(--muted); font-variant: small-caps; text-transform: lowercase; letter-spacing: .03em;
  display: flex; align-items: center; gap: 7px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--p-other); }
.dot.introit { background: var(--p-introit); } .dot.offertorium { background: var(--p-offertorium); }
.dot.communio { background: var(--p-communio); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); } .dot.adoracio { background: var(--p-adoracio); }
.dot.exodus { background: var(--p-exodus); } .dot.ordinarium { background: var(--p-ordinarium); } .dot.psalm { background: var(--p-psalm); }
.item .main { flex: 1; min-width: 0; }
.item .t { font-family: var(--serif); font-weight: bold; font-size: 18px; line-height: 1.25; }
.item .n { font-size: 14px; color: var(--muted); font-style: italic; margin-top: 2px; white-space: pre-wrap; }
.item .nomusic { font-size: 12px; color: var(--muted); }
.item .go { width: 20px; height: 20px; fill: var(--muted); flex: none; }
.att { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.att button {
  border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 14px; min-height: 36px;
  display: inline-flex; align-items: center; gap: 6px;
}
.att button b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.att button.on.tak { background: var(--ok); border-color: var(--ok); color: #fff; }
.att button.on.nie { background: var(--no); border-color: var(--no); color: #fff; }
.att button.on.moze { background: var(--maybe); border-color: var(--maybe); color: #fff; }
.att button.on b { color: inherit; }
.plan-f { display: flex; gap: 8px; justify-content: flex-end; padding: 4px 10px 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .page { padding: 10px 10px 30px; }
  .pagehead h1 { font-size: 23px; }
  .item { flex-wrap: wrap; gap: 2px 10px; padding: 6px 12px; }
  .item .part { width: 100%; }
  .plan-h { padding: 8px 12px; }
}

/* plan list (history) */
.plist { display: grid; gap: 8px; }
.prow { display: flex; gap: 14px; align-items: center; padding: 12px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; }
.prow:hover { background: var(--chip); }
.prow .date { width: 92px; flex: none; font-variant-numeric: tabular-nums; }
.prow .date b { display: block; font-size: 17px; }
.prow .date small { color: var(--muted); font-size: 12px; }
.prow .songs { flex: 1; min-width: 0; font-family: var(--serif); font-size: 15px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.prow .songs b { color: var(--ink); font-family: var(--sans); font-size: 14px; }
.prow.future { border-color: var(--accent); }

/* ---------- songbook (search + contents) ---------- */
.searchbox { position: relative; }
.searchbox input { padding-left: 42px; height: 52px; font-size: 18px; border-radius: 14px; }
.searchbox svg { position: absolute; left: 13px; top: 15px; width: 22px; height: 22px; fill: var(--muted); }
.results { margin-top: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.res { display: flex; gap: 12px; align-items: center; padding: 11px 16px; text-decoration: none; border-bottom: 1px solid var(--line); cursor: pointer; }
.res:last-child { border-bottom: 0; }
.res:hover, .res.sel { background: var(--chip); }
.res .t { font-family: var(--serif); font-size: 18px; font-weight: bold; }
.res .c { font-size: 12.5px; color: var(--muted); margin-top: 2px; text-transform: lowercase; font-variant: small-caps; letter-spacing: .02em; }
.res .s { font-family: var(--serif); font-size: 15px; color: var(--muted); margin-top: 3px; }
.res .stat { font-size: 12px; color: var(--accent); margin-top: 2px; }
.res-empty { text-align: center; color: var(--muted); padding: 26px 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.card { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; text-decoration: none; }
.card .t { font-family: var(--serif); font-weight: bold; font-size: 16px; flex: 1; }
.part-h { font-family: var(--serif); font-size: 15px; color: var(--accent); letter-spacing: .06em; margin: 26px 0 8px; }
details.chap { background: var(--paper); border: 1px solid var(--line); border-radius: 13px; margin-bottom: 8px; }
details.chap summary { padding: 14px 16px; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
details.chap summary::-webkit-details-marker { display: none; }
details.chap summary .n { color: var(--muted); font-weight: normal; font-size: 13px; }
details.chap ol { margin: 0; padding: 0 0 8px; list-style: none; }
details.chap li a { display: flex; gap: 10px; align-items: center; padding: 9px 16px 9px 22px; text-decoration: none; font-family: var(--serif); font-size: 16px; }
details.chap li a span { flex: 1; }
details.chap li a .tp { font-size: 12.5px; padding: 2px 8px; }
details.chap li a:hover { background: var(--chip); }
details.chap li.grp { padding: 10px 16px 2px; font-size: 12px; color: var(--muted); letter-spacing: .05em; }
details.chap li.sub a { padding-left: 34px; }

/* ---------- song ---------- */
/* reading mode: on the song screen the app header and tab bar are hidden; the song bar is the only chrome */
body.reading { --header-h: 0px; --nav-h: 0px; }
body.reading #top, body.reading .nav { display: none; }
body.reading .songbar { padding-top: max(4px, env(safe-area-inset-top)); }
.song { max-width: 1400px; margin: 0 auto; background: var(--paper); min-height: calc(100vh - var(--header-h) - var(--nav-h)); }
.songbar {
  position: sticky; top: var(--header-h); z-index: 10; display: flex; align-items: center; gap: 2px; padding: 4px 6px;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.songbar .grow { min-width: 0; }
.songbar .grow .ttl { font-family: var(--serif); font-weight: bold; font-size: 17px; line-height: 1.2; color: var(--accent); padding: 0 4px;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.songbar .grow .ctx { font-size: 11.5px; color: var(--muted); padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb { background: none; border: 1px solid transparent; height: 42px; min-width: 42px; padding: 0 9px; border-radius: 10px; cursor: pointer; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; text-decoration: none; color: var(--ink); flex: none; }
.tb:hover { background: var(--chip); }
.tb.on { background: var(--accent); color: var(--accent-ink); }
.tb[disabled] { opacity: .3; pointer-events: none; }
.tb[hidden] { display: none; }
.tb.dot { position: relative; }
.tb.dot::after { content: ""; position: absolute; top: 7px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); }
.tb.on.dot::after { background: var(--accent-ink); border-color: var(--accent); }
.tb svg { width: 22px; height: 22px; fill: currentColor; }
.tb .lbl { font-size: 13px; }
@media (max-width: 700px) { .tb .lbl, .songbar .tb.wide { display: none; } .tb { min-width: 40px; padding: 0 5px; } .songbar .grow .ttl { font-size: 15px; } }
/* the "⋯" sheet of the song screen */
.msheet { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .35); display: flex; align-items: flex-end; justify-content: center; }
.msheet[hidden] { display: none; }
.mcard { background: var(--paper); color: var(--ink); width: min(520px, 100%); max-height: 88dvh; overflow: auto; border-radius: 18px 18px 0 0;
  padding: 8px 14px calc(10px + env(safe-area-inset-bottom)); box-shadow: var(--shadow); }
.mgrab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 6px; }
.sopt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 6px 4px; background: none; border: 0; border-bottom: 1px solid var(--line);
  color: var(--ink); font: inherit; font-size: 15.5px; text-align: left; text-decoration: none; cursor: pointer; }
.sopt > svg { width: 22px; height: 22px; fill: var(--muted); flex: none; }
.sopt > span { flex: 1; min-width: 0; }
.sopt small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.25; }
.sopt .pill { margin: 2px 6px 0 0; }
.sopt .sw { flex: none; width: 40px; height: 24px; border-radius: 12px; background: var(--line); position: relative; transition: background .15s; }
.sopt .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.sopt.on .sw { background: var(--accent); }
.sopt.on .sw::after { left: 19px; }
.sopt.on > svg { fill: var(--accent); }
.msize { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.msec > summary { list-style: none; }
.msec > summary::-webkit-details-marker { display: none; }
.msec > summary > svg:last-child { width: 20px; height: 20px; fill: var(--muted); flex: none; transition: transform .15s; }
.msec[open] > summary > svg:last-child { transform: rotate(90deg); }
.msec > .sopt { padding-left: 38px; font-size: 14.5px; min-height: 46px; }
.mnav .songnav { padding: 10px 4px 2px; border-top: 0; }
.tprops:empty { display: none; }
.tprops { padding: 6px 0; border-bottom: 1px solid var(--line); }
.szrow { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.szrow span { flex: 1; font-weight: 600; font-size: 15px; }
.szrow b { min-width: 58px; text-align: center; font-variant-numeric: tabular-nums; font-size: 15px; }
.szrow .tb { border-color: var(--line); font-size: 20px; width: 44px; height: 40px; }
.szrow .tb:disabled { opacity: .3; }
.szreset { margin-top: 2px; width: 100%; background: none; border: 0; color: var(--muted); font-size: 13px; padding: 6px; cursor: pointer; text-decoration: underline; }
/* voice tutor: a second row of the song bar (stays visible while the score scrolls) */
.songbar { flex-wrap: wrap; }
.tutor { flex: 0 0 100%; order: 9; border-top: 1px solid var(--line); margin-top: 4px; padding: 6px 4px 2px; }
.tutor[hidden] { display: none; }
.trow { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.tgrp { display: flex; align-items: center; gap: 6px; }
.tgrp + .tgrp { margin-left: auto; }
.tvoices .btn { min-width: 44px; padding: 0 8px; font-weight: 600; }
@media (max-width: 520px) { .tgrp + .tgrp { margin-left: 0; flex: 1; justify-content: flex-end; } }
.trow + .trow { margin-top: 4px; }
.tutor .tb { border-color: var(--line); height: 40px; min-width: 44px; }
.tutor .tplay { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); min-width: 54px; border-radius: 22px; height: 44px; }
.tvoices { display: flex; gap: 4px; flex-wrap: wrap; }
.tvoices .btn { min-height: 40px; }
.tutor select { width: auto; min-height: 40px; padding: 4px 8px; font-size: 14px; }
.tone { font-family: var(--serif); padding: 0 6px; }
.ttempo { display: flex; align-items: center; gap: 2px; }
.ttempo .tb { font-size: 20px; }
.ttempo .tb:disabled { opacity: .3; }
.tbpm { background: none; border: 0; cursor: pointer; color: var(--ink); min-width: 78px; text-align: center; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; padding: 0 2px; }
.tbpm small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
#tpos { flex: 1; min-width: 100px; height: 30px; accent-color: var(--accent); margin: 0; }
.tbar { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }
.tlink { background: none; border: 0; padding: 4px 0; font-size: 13px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.tprop { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 8px; margin-top: 4px; background: var(--chip); border-radius: 10px; font-size: 14px; }
.lineflag { display: flex; gap: 8px; align-items: baseline; margin: 6px 8px 0; padding: 4px 10px; border-radius: 9px; background: var(--mark); font-size: 14px; }
.lineflag span { flex: 1; }
.lineflag small { color: var(--muted); }
.lineflag button { background: none; border: 0; cursor: pointer; font-size: 15px; color: var(--muted); padding: 0 4px; }
body.marking .score img:not(.ornament) { outline: 2px dashed var(--accent); outline-offset: -2px; cursor: pointer; }
.score.digital .digi { position: relative; transform-origin: 0 0; }
.score.digital .digi-svg { filter: var(--img-filter); }
.score.digital .digi-svg svg { display: block; max-width: 100%; height: auto; }      /* OSMD draws a little wider than its box */
.pline { position: absolute; width: 3px; margin-left: -1px; border-radius: 2px; background: var(--accent); opacity: .75; pointer-events: none; transition: left .08s linear; }
.pline[hidden] { display: none; }
/* ---------- note editor ---------- */
.ed { display: flex; flex-direction: column; height: 100dvh; background: var(--paper); max-width: 1400px; margin: 0 auto; }
.ed-bar { flex: none; flex-wrap: nowrap; }
.ed-line { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 44px; text-align: center; }
.ed-bar .btn { margin-left: 4px; }
.ed-bar .tb { font-size: 20px; }
.ed-img { flex: none; position: relative; max-height: 24vh; overflow: auto; border-bottom: 1px solid var(--line); }
.ed-img img { display: block; width: 100%; height: auto; filter: var(--img-filter); cursor: zoom-in; }
.ed-img.big { max-height: 55vh; }
.ed-img.big img { width: 180%; max-width: none; cursor: zoom-out; }
.ed-imgnav { position: sticky; left: 0; bottom: 0; display: flex; align-items: center; gap: 4px; justify-content: flex-end; padding: 2px 6px; font-size: 12px; color: var(--muted); background: linear-gradient(transparent, var(--paper) 60%); }
.ed-imgnav button { background: var(--chip); border: 0; border-radius: 8px; min-width: 34px; height: 28px; font-size: 17px; color: var(--ink); cursor: pointer; }
.ed-score { flex: 1 1 auto; min-height: 120px; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.ed-host { position: relative; display: inline-block; min-width: 100%; padding: 0 8px; }
.ed-host svg { filter: var(--img-filter); display: block; }
.ed-sel { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 3px solid var(--accent); border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.ed-meas { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 6px 8px; border-top: 1px solid var(--line); scrollbar-width: thin; }
.ed-meas button { flex: none; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 4px 10px; font-size: 13px; color: var(--ink); cursor: pointer; white-space: nowrap; }
.ed-meas button.ok { color: var(--ok); }
.ed-meas button.bad { border-color: var(--no); color: var(--no); }
.ed-meas button.short { color: var(--maybe); }
.ed-meas button.cur { outline: 2px solid var(--accent); outline-offset: 1px; }
.ed-meas small { color: var(--muted); }
.ed-info { flex: none; font-size: 13px; color: var(--muted); padding: 2px 10px 0; min-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-tools { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.ed-row { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.ed-row::-webkit-scrollbar { display: none; }
.ed-tools button, .ed-bar button.tb-ed { flex: none; min-width: 46px; height: 46px; padding: 0 8px; border: 1px solid var(--line); background: var(--paper);
  border-radius: 11px; font-size: 18px; line-height: 1; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  touch-action: manipulation; }
.ed-tools button svg { width: 22px; height: 22px; fill: currentColor; }
.ed-tools button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ed-tools button:disabled { opacity: .3; cursor: default; }
.ed-tools sup, .ed-tools sub { font-size: 11px; }
.ed-sheet { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .35); display: flex; align-items: flex-end; justify-content: center; }
.ed-card { background: var(--paper); color: var(--ink); width: min(560px, 100%); max-height: 88dvh; overflow: auto; border-radius: 18px 18px 0 0;
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); box-shadow: var(--shadow); }
.ed-card h3 { margin: 0 0 6px; font-family: var(--serif); color: var(--accent); }
.ed-card .chk { display: flex; gap: 8px; align-items: center; margin: 8px 0; font-size: 14.5px; }
.ed-card textarea { width: 100%; }
.ed-scope { margin: 8px 0 12px; padding-top: 6px; border-top: 1px solid var(--line); }
.ed-err { color: var(--no); font-size: 14px; }
@media (min-width: 900px) { .ed-img { max-height: 30vh; } }
@media (max-width: 700px) {
  .ed-bar .ctx { display: none; }
  .ed-row { flex-wrap: wrap; }                       /* every tool visible on a phone, no hidden sideways scrolling */
  .ed-tools button { min-width: 44px; height: 44px; padding: 0 6px; font-size: 17px; }
}
.tmsg { font-size: 14px; color: var(--muted); padding: 4px 4px 2px; }
.songhead { padding: 18px 20px 6px; display: flex; gap: 14px; align-items: flex-start; }
.songhead .grow > .grp { font-size: 12px; color: var(--muted); letter-spacing: .05em; }
.songhead h1 { font-family: var(--serif); font-size: 27px; line-height: 1.2; margin: 4px 0 2px; }
.songhead .ch { font-size: 12.5px; color: var(--muted); font-variant: small-caps; text-transform: lowercase; letter-spacing: .03em; }
.songhead .tp { font-size: 17px; padding: 6px 12px; margin-top: 6px; }
.songnote { margin: 6px 12px 2px; padding: 6px 12px; background: var(--chip); border-radius: 10px; font-size: 15px; white-space: pre-wrap; }
.score { padding: 2px 4px 0; overflow-x: auto; touch-action: pan-x pan-y; -webkit-user-select: none; user-select: none; }
.score img { display: block; width: calc(var(--score-zoom) * 100%); height: auto; margin: 0 auto; filter: var(--img-filter); }
.score img.ornament { width: 60%; margin: 10px auto; }
.lyrics { padding: 6px 16px 40px; touch-action: pan-x pan-y; }
.flow { font-family: var(--serif); font-size: var(--lyr-size); line-height: 1.38; }
.flow img { filter: var(--img-filter); max-width: 100%; height: auto; }
.lyrics .flow { column-width: 17em; column-gap: 2.2em; }
.flow p { margin: 0; }
.flow .strofa { break-inside: avoid; margin: 0 0 .9em; padding-left: 1.6em; }
.flow .strofa.sung { border-left: 2px dotted var(--gold); }     /* read from under the notes (verses.py) */
.flow .Body-Strofa, .flow .Body-Strofa-bezswiatla { text-indent: -1.6em; }
.flow .noinden, .flow .noinden3 { text-indent: 0; }
.flow .noinden3 { padding-left: 1em; }
.flow .margines20em { padding-left: 2em; }
.flow .margines40em { padding-left: 4em; }
.flow .noindent, .flow .noinden1 { text-indent: 0; }
.flow .space-before { margin-top: .7em; }
.flow .space-after { margin-bottom: .7em; }
.flow .space { margin: .4em 0; }
.flow .kyrie { margin-top: .6em; }
.flow .smaller { font-size: .78em; }
.flow .small { font-size: .88em; }
.flow .large { font-size: 1.12em; }
.flow .italic, .flow em { font-style: italic; }
.flow .bold, .flow strong { font-weight: bold; }
.flow .underline { text-decoration: underline; text-underline-offset: 2px; }
.flow .szary { color: var(--muted); }
.flow .centerit, .flow .a1, .flow .a2, .flow .a3, .flow .IKOS, .flow .Kontakion, .flow .stasis { text-align: center; text-indent: 0; margin: .6em 0; }
.flow .a3, .flow .a2 { font-size: .85em; }
.flow .IKOS, .flow .Kontakion, .flow .stasis { font-weight: bold; font-size: .9em; letter-spacing: .04em; }
.flow .toright { text-align: right; }
.flow .lektor { padding-left: 5em; text-indent: -5em; }
.flow .indent-inv { padding-left: 1em; text-indent: -1em; }
.flow table { border-collapse: collapse; width: 100%; margin: .5em 0; break-inside: avoid; }
.flow td { vertical-align: top; padding: 0 .6em .4em 0; }
.flow .wtabeli, .flow .wtabeliswiatlo { text-indent: 0; }
.flow .wtabeliswiatlo { margin-top: .6em; }
.flow .tytsec2, .flow .subtitle2, .flow .tytsek, .flow .tytsekT1 { font-weight: bold; text-indent: 0; margin: .8em 0 .4em; }
.score .flow { padding: 8px 12px; }
.songnav { display: flex; justify-content: space-between; gap: 10px; padding: 12px 16px 24px; border-top: 1px solid var(--line); }
.songnav a { text-decoration: none; font-size: 14px; color: var(--muted); max-width: 48%; }
.songnav a b { display: block; font-family: var(--serif); color: var(--ink); font-size: 16px; }
.songnav a.nx { text-align: right; margin-left: auto; }
.blocked { max-width: 560px; margin: 60px auto; text-align: center; padding: 30px 20px; }
.blocked h1 { font-family: var(--serif); }

/* pinned mode: score on top (own scroll), lyrics scroll independently below */
body.pinned { overflow: hidden; }
body.pinned .song { display: flex; flex-direction: column; height: calc(100dvh - var(--header-h) - var(--nav-h)); min-height: 0; }
body.pinned .songbar { position: relative; top: 0; }
body.pinned .songhead, body.pinned .songnote { display: none; }
body.pinned .score { height: var(--score-h); overflow-y: auto; flex: none; border-bottom: 1px solid var(--line); overscroll-behavior: contain; }
body.pinned .lyrics { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-top: 12px; }
.resizer { display: none; }
body.pinned .resizer {
  display: flex; align-items: center; justify-content: center; flex: none; height: 20px; cursor: row-resize; touch-action: none;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.resizer i { width: 46px; height: 5px; border-radius: 5px; background: var(--muted); opacity: .5; }

/* landscape: score on the left, lyrics on the right; each column scrolls and zooms on its own */
@media (orientation: landscape) and (min-width: 640px) {
  body.pinned .song { display: grid; grid-template-columns: var(--score-w, 58%) 16px minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  body.pinned .songbar { grid-column: 1 / -1; grid-row: 1; }
  body.pinned .songnote { grid-column: 1 / -1; grid-row: 2; }
  body.pinned .score { grid-column: 1; grid-row: 3; height: auto; min-height: 0; border-bottom: 0; padding-bottom: 24px; }
  body.pinned .resizer {
    grid-column: 2; grid-row: 3; height: auto; cursor: col-resize; border-bottom: 0;
    border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  }
  body.pinned .resizer i { width: 5px; height: 46px; }
  body.pinned .lyrics { grid-column: 3; grid-row: 3; min-height: 0; padding-top: 10px; }
}

/* ---------- plan editor ---------- */
.editor .meta { display: grid; grid-template-columns: 200px 1fr; gap: 0 14px; }
@media (max-width: 640px) { .editor .meta { grid-template-columns: 1fr; } }
.eitems { display: grid; gap: 10px; margin: 8px 0 14px; }
.eitem { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid;
  grid-template-columns: 170px 1fr auto; gap: 8px 12px; align-items: center; }
.eitem .song-t { font-family: var(--serif); font-weight: bold; font-size: 17px; }
.eitem .song-t small { display: block; font-family: var(--sans); font-weight: normal; font-size: 12px; color: var(--accent); }
.eitem .ctl { display: flex; gap: 2px; }
.eitem .ctl button { width: 40px; height: 40px; border: 0; background: none; border-radius: 9px; cursor: pointer; font-size: 18px; color: var(--muted); }
.eitem .ctl button:hover { background: var(--chip); color: var(--ink); }
.eitem .free { display: grid; grid-template-columns: 1fr 70px 80px; gap: 8px; }
.eitem .note { grid-column: 2 / 4; }
.eitem input, .eitem select { min-height: 42px; padding: 8px 10px; font-size: 15px; }
@media (max-width: 640px) {
  .eitem { grid-template-columns: 1fr auto; }
  .eitem .partcell { grid-column: 1 / 2; }
  .eitem .songcell { grid-column: 1 / 3; }
  .eitem .note { grid-column: 1 / 3; }
  .eitem .ctl { grid-row: 1; grid-column: 2; }
}
.picker { background: var(--paper); border: 2px solid var(--accent); border-radius: 14px; padding: 12px; }
.picker .results { max-height: 50vh; overflow-y: auto; }
.picker .row > select { width: 190px; flex: none; }

/* ---------- attendance grid ---------- */
.gridwrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
table.grid th, table.grid td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid th.name, table.grid td.name { text-align: left; padding-left: 14px; position: sticky; left: 0; background: var(--paper); z-index: 1; min-width: 130px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
table.grid thead th { font-weight: 600; font-size: 12.5px; color: var(--muted); }
table.grid thead th b { display: block; color: var(--ink); font-size: 14px; }
table.grid tr.me td { background: var(--bg); }
table.grid tr.me td.name { font-weight: 700; background: var(--bg); }
table.grid tfoot td { font-weight: 600; color: var(--muted); border-bottom: 0; }
.mk { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; font-weight: 700; border: 1px solid transparent; }
.mk.tak { background: var(--ok); color: #fff; } .mk.nie { background: var(--no); color: #fff; } .mk.moze { background: var(--maybe); color: #fff; }
button.mk { cursor: pointer; border-color: var(--line); background-color: var(--paper); font-size: 15px; }
button.mk.tak { background: var(--ok); } button.mk.nie { background: var(--no); } button.mk.moze { background: var(--maybe); }

/* ---------- members ---------- */
.mlist { display: grid; gap: 8px; }
.mrow { display: flex; gap: 12px; align-items: center; padding: 10px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; flex-wrap: wrap; }
.mrow .who { flex: 1; min-width: 180px; }
.mrow .who b { display: block; }
.mrow .who small { color: var(--muted); word-break: break-all; }
.mrow select { width: auto; min-width: 190px; min-height: 40px; padding: 6px 10px; }
.invites .mrow code { font-size: 13px; word-break: break-all; background: var(--chip); padding: 3px 6px; border-radius: 6px; }

.tip { display: flex; gap: 12px; align-items: flex-start; background: var(--chip); border-radius: 14px; padding: 9px 12px; margin-bottom: 12px; font-size: 13.5px; }
.tip .grow b { display: block; margin-bottom: 2px; font-size: 15px; }
.tip button { background: none; border: 0; font-size: 18px; cursor: pointer; color: var(--muted); }
.tip .row { margin-top: 8px; }
.tip .row .btn { background: var(--paper); border: 1px solid var(--line); color: var(--ink); font-size: 14px; }

/* ---------- QR code overlay (join link) ---------- */
.qrlay { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 16px; }
.qrcard {
  background: #fffdf9; color: #2b2118; border-radius: 22px; padding: 26px 28px; text-align: center;
  width: min(560px, 100%); max-height: 100%; overflow: auto; box-shadow: var(--shadow);
}
.qrcard .qrname { font-family: var(--serif); font-weight: bold; font-size: 22px; color: #7b4a2a; }
.qrcard h2 { margin: 4px 0 14px; font-size: 28px; }
.qrcard img { display: block; width: min(420px, 100%, 62vh); height: auto; margin: 0 auto; image-rendering: pixelated; }
.qrcard p { font-size: 16px; margin: 14px 0 0; }
.qrcard .qrurl { font-size: 12px; color: #75695f; word-break: break-all; }
.qrcard .qrbtns { justify-content: center; margin-top: 18px; }
.qrcard .btn { background: #fff; color: #1f1a17; border-color: #e6ded3; }
.qrcard .btn.primary { background: #7b4a2a; color: #fff; border-color: #7b4a2a; }
@media print {
  body.qr-open > :not(.qrlay) { display: none !important; }
  body.qr-open { padding: 0; background: #fff; }
  .qrlay { position: static; background: none; padding: 0; }
  .qrcard { box-shadow: none; width: 100%; }
  .qrcard img { width: 12cm; }
  .qrbtns { display: none !important; }
}

/* ---------- voices (SATB) ---------- */
.attv { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-top: 3px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.attv i { font-style: normal; opacity: .6; }
@media (max-width: 640px) { .att { justify-content: flex-start; margin-left: 0; } }
.attv b { color: var(--ink); font-weight: 600; }
.voicepick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.mrow .voicepick { margin-top: 0; }
table.tel { border-collapse: collapse; width: 100%; font-size: 14.5px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
table.tel th, table.tel td { padding: 7px 12px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.tel th:first-child, table.tel td:first-child { text-align: left; }
table.tel th { font-size: 12.5px; color: var(--muted); font-weight: 600; }
table.tel tr:last-child td { border-bottom: 0; }
.telbars { display: flex; align-items: flex-end; gap: 3px; height: 130px; padding: 8px 10px 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.telbars div { flex: 1; min-width: 14px; max-width: 36px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.telbars i { display: block; width: 100%; min-height: 2px; background: var(--accent); border-radius: 3px 3px 0 0; }
.telbars small { font-size: 10px; color: var(--muted); padding: 2px 0 4px; }
.srcpick { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.srcpick label { font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
form .srcpick { margin-top: 10px; }
.pill.big { font-size: 14px; padding: 5px 12px; color: var(--ink); }
.voicetip .grow b { margin-bottom: 4px; }
.mrow select.voicesel { min-width: 120px; }
/* ---------- the schola's own scores ---------- */
.pill.warn { background: var(--mark); color: var(--ink); white-space: normal; }
h2.colh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
h2.colh .n { font-family: var(--sans); font-size: 13px; font-weight: normal; color: var(--muted); }
h2.colh .pill { font-family: var(--sans); font-weight: normal; }
.mrow .who a { text-decoration: none; }
.mrow .who a:hover b { text-decoration: underline; }
.mrow .who small .pill { margin-right: 4px; }
.mrow .who small .by { word-break: normal; }
.mrow select[data-act="move"] { min-width: 0; max-width: 100%; }
#nform input[type=file] { width: 100%; max-width: 100%; padding: 8px 0; }
label.chk { display: inline-flex; gap: 8px; align-items: center; font-size: 15px; flex-wrap: wrap; }
label.chk input[type=checkbox] { width: 20px; height: 20px; }
input[type=number] { width: 90px; min-height: 44px; padding: 8px 10px; border-radius: 11px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 16px; }
.songnote.ownnote { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; white-space: normal; background: var(--mark); }
table.grid tr.vgroup td { background: var(--chip); font-weight: 600; font-size: 13px; color: var(--accent); padding: 5px 14px; text-align: left; }
table.grid tr.vgroup td span { color: var(--muted); font-weight: normal; margin-left: 4px; }
table.grid tfoot tr.vsum td { font-weight: normal; font-size: 12.5px; padding-top: 3px; padding-bottom: 3px; }

/* ---------- projector remote at the bottom of the song page (see bindRemote) ---------- */
body.remoting { padding-bottom: calc(var(--nav-h) + var(--remote-h, 170px)); }
body.pinned.remoting .song { height: calc(100dvh - var(--header-h) - var(--nav-h) - var(--remote-h, 170px)); }
.remote { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--head); color: var(--ink);
  border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(60, 40, 20, .12);
  padding: 8px max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
.remote .rin { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.rhead { display: flex; align-items: center; gap: 6px; font-size: 14px; min-height: 40px; }
.rcode { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.rcode svg { width: 20px; height: 20px; fill: var(--muted); }
.rcode b { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .08em; }
.rdot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.rdot.lost { background: var(--no); }
.rnow { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rhint { font-size: 13px; color: var(--muted); line-height: 1.35; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; cursor: pointer; }
.rchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 1px; }
.rchips::-webkit-scrollbar { display: none; }
.rchip { flex: none; min-width: 46px; height: 42px; padding: 0 13px; border-radius: 21px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font-size: 16px; cursor: pointer; }
.rchip.skip { opacity: .45; }
.rchip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); opacity: 1; }
.rctl { display: flex; gap: 8px; }
.rctl .btn { flex: 1; min-height: 50px; justify-content: center; }
.rctl .btn svg { width: 22px; height: 22px; }
.rctl .rnext { flex: 2; font-size: 17px; }
.rpair { display: flex; gap: 8px; }
.rpair input { flex: 1; min-width: 0; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 22px; letter-spacing: .15em;
  text-transform: uppercase; text-align: center; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
