:root {
  --paper: #f6ecd6; --card: #fffaf0; --ink: #2b2118; --muted: #65533e;
  --accent: #8a3b12; --accent-ink: #fffaf0; --line: #d9c7a3; --soft: #efe0bf;
  --ok: #2f6b3a; --draft: #85540f; --triage: #9b8158; --image: #cdb991; --focus: #1f5fbf;
  --mark: #f3c69b; --shadow: 0 1px 2px rgb(60 40 20 / .08), 0 6px 18px rgb(60 40 20 / .08);
  --serif: "Noto Serif", "Noto Serif Telugu", "Noto Serif Devanagari", "Noto Serif Bengali", Georgia, "Times New Roman", serif;
  --sans: "Noto Sans", "Noto Sans Telugu", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tabbar: 64px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #1d1813; --card: #27201a; --ink: #f1e6d2; --muted: #c2b39c;
    --accent: #e8a172; --accent-ink: #1d1813; --line: #4a3d2f; --soft: #332a21;
    --ok: #8fd19e; --draft: #e8b86a; --triage: #a08c6c; --image: #5b4d3c; --focus: #8ab4ff;
    --mark: #7a4a24; --shadow: 0 1px 2px rgb(0 0 0 / .3); }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.6 var(--serif);
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); overflow-x: hidden; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.25; font-weight: 600; }
h1 { font-size: 1.75rem; margin: .4em 0 .4em; }
h2 { font-size: 1.3rem; margin: 1.4em 0 .5em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; z-index: 20; } .skip:focus { left: 8px; top: 8px; background: var(--card); padding: 8px; }
img { max-width: 100%; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0;
  background: var(--paper); z-index: 10; min-height: 60px; }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.2; min-height: 44px; justify-content: center; }
.sri { font-size: 14px; color: var(--accent); letter-spacing: .05em; }
.name { font-weight: 600; font-size: 18px; }
.topnav { display: none; gap: 4px; align-items: center; font-family: var(--sans); font-size: 16px; }
.topnav a { color: var(--ink); text-decoration: none; padding: 10px 12px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
.topnav a:hover { background: var(--soft); }
.topnav a[aria-current="page"] { background: var(--soft); color: var(--accent); font-weight: 600; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none;
  border-radius: 999px; padding: 6px 14px; font: 16px var(--sans); min-height: 44px; min-width: 44px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 10px 0; }

main { padding: 0 16px 32px; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; }
main:focus { outline: none; }

/* Home: the reverent welcome */
.hero { text-align: center; padding: 28px 0 4px; display: none; }
body.route-home .hero { display: block; }
.invocation { font-size: 26px; color: var(--accent); margin: 0 0 6px; letter-spacing: .08em; }
.hero h1 { font-size: clamp(1.6rem, 5.5vw, 2.6rem); margin: 0 auto .3em; max-width: 24ch; }
.reverence { font-style: italic; color: var(--muted); max-width: 36em; margin: 0 auto; font-size: 1.05rem; }
.lede { font-size: 1.05rem; color: var(--muted); }

/* The guide box */
.askzone { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 0 12px; gap: 6px; }
.askcol { width: 100%; }
.mic { display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; width: 148px; height: 148px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font: 600 16px/1.2 var(--sans);
  box-shadow: 0 8px 24px rgb(0 0 0 / .18); padding: 18px; }
.mic svg { width: 48px; height: 48px; fill: currentColor; }
.mic.listening { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 18px rgb(138 59 18 / .18); } }
@media (prefers-reduced-motion: reduce) { .mic.listening { animation: none; outline: 4px solid var(--focus); } * { scroll-behavior: auto !important; } }
.hint { color: var(--muted); font: 15px/1.5 var(--sans); margin: 8px 0 10px; }
.promise { font-size: 14px; margin-top: 8px; }
.composer { display: flex; gap: 8px; width: 100%; }
.composer input { flex: 1; min-width: 0; font: 17px var(--sans); padding: 12px 14px; min-height: 52px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.composer.narrow { max-width: 420px; }
.send, .btn { font: 600 16px var(--sans); min-height: 48px; padding: 0 18px; border-radius: 12px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; justify-content: center; }
.btn.quiet { background: var(--card); color: var(--accent); }
.btn.sm { min-height: 44px; font-size: 15px; padding: 0 12px; }
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.on { background: var(--accent); color: var(--accent-ink); }

/* Compact ask bar on every other view */
body.inview .askzone { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 0; text-align: left; }
body.inview .mic { width: 52px; height: 52px; padding: 0; box-shadow: none; }
body.inview .mic svg { width: 26px; height: 26px; }
body.inview .mic span, body.inview #micnote, body.inview .promise { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body.inview .composer input { min-height: 48px; box-shadow: none; }
body:not(.route-home):not(.route-guide) .talk { display: none; }
body.route-guide .view { order: -1; }
body.route-guide .guide { border-top: 0; }
.guide { border-bottom: 1px solid var(--line); }
body.route-home .guide { border-bottom: 0; }

/* Conversation */
.talk { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.turn { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); min-width: 0; }
.you { font: 15px var(--sans); color: var(--muted); margin: 0 0 8px; }
.label { font: 600 13px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; }
h2.label { font-size: 13px; }
.quote { border-left: 3px solid var(--ok); padding: 6px 10px; margin: 8px 0; background: var(--soft); border-radius: 0 10px 10px 0; overflow-wrap: anywhere; }
.quote .orig { font-size: 20px; }
.quote .iast, .iast { font-style: italic; color: var(--muted); }
.cite { font: 14px var(--sans); overflow-wrap: anywhere; }
.cite a { display: inline-block; padding: 10px 0; }
.draft { border: 1px dashed var(--draft); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.draft .notice { font: 600 14px var(--sans); color: var(--draft); margin: 0 0 6px; }
.tag { font: 600 12px var(--sans); border-radius: 6px; padding: 1px 6px; background: var(--soft); color: var(--ink); text-decoration: none; }
.facts { margin: .25rem 0 0; padding-left: 1.2rem; color: var(--muted); font: 15px/1.5 var(--sans); }

/* Badges and bars */
.state { display: inline-flex; align-items: center; font: 600 13px var(--sans); border-radius: 999px; padding: 2px 10px; border: 1px solid currentColor; white-space: nowrap; }
.state.small { font-size: 12px; padding: 1px 8px; }
.state.checked { color: var(--ok); } .state.draft { color: var(--draft); } .state.triage, .state.image, .state.other { color: var(--muted); }
.bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); margin: 8px 0; }
.seg { display: block; height: 100%; }
.s-checked { background: var(--ok); } .s-draft { background: var(--draft); } .s-triage { background: var(--triage); } .s-image { background: var(--image); }
.legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font: 14px var(--sans); color: var(--muted); margin: 6px 0 0; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dot.checked { background: var(--ok); } .dot.draft { background: var(--draft); } .dot.triage { background: var(--triage); } .dot.image { background: var(--image); }

.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.row select, .select select, .field select { font: 16px var(--sans); min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 0 8px; max-width: 100%; }
.select { font: 15px var(--sans); display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.view { margin-top: 12px; min-width: 0; }
.view:empty { display: none; }
.small { font: 14px/1.5 var(--sans); color: var(--muted); }
.standin { font: italic 13px/1.4 var(--sans); color: var(--muted); margin: 2px 0; flex-basis: 100%; }
.listenrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.callout { background: var(--card); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 0 12px 12px 0; font-style: italic; box-shadow: var(--shadow); }

/* Breadcrumbs */
.crumbs ol { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; font: 14px var(--sans); color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs span { padding: 10px 0; }
.crumbs li + li::before { content: "›"; margin: 0 6px; color: var(--muted); }
.crumbs a { display: inline-block; padding: 10px 0; }

/* Home sections */
.numbers { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 4px 18px 14px; box-shadow: var(--shadow); margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stat strong { display: block; font-size: 1.7rem; line-height: 1.1; color: var(--accent); }
.stat span { font: 14px var(--sans); color: var(--muted); }
.cards { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
.cards > li > .card { height: 100%; }
.card { display: block; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
a.card:hover { border-color: var(--accent); }
.way { display: grid; grid-template-columns: 44px 1fr; gap: 2px 12px; align-items: center; min-height: 72px; }
.wayicon { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; }
.wayicon svg { width: 24px; height: 24px; fill: var(--accent); }
.wayname { font-weight: 600; font-size: 1.1rem; }
.waydesc { font: 14px/1.4 var(--sans); color: var(--muted); }
.collection h2 { margin-top: .2em; }
.fullname { font-style: italic; color: var(--muted); margin: 0 0 6px; }

/* Lists and thumbnails */
.list { list-style: none; padding: 0; display: grid; gap: 10px; }
.list a.card .title { display: block; }
.list small { color: var(--muted); font-family: var(--sans); }
.thumbs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.thumb { display: grid; gap: 6px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.thumb img, .noimg { width: 100%; height: auto; aspect-ratio: 10 / 7; object-fit: cover; border-radius: 8px; background: var(--soft); display: grid; place-items: center; color: var(--muted); }
.scanid { font: 600 14px var(--sans); }
.thumb .state { justify-self: start; }

/* Page reader */
.page { display: grid; gap: 14px; min-width: 0; }
.page > * { min-width: 0; }
.pageside { min-width: 0; }
.pageside .pager { border-top: 1px solid var(--line); padding-top: 10px; }
.pagehead h1 { margin: .2em 0; overflow-wrap: anywhere; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0; }
.viewer { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.viewer.none { padding: 16px; }
.stage { position: relative; overflow: hidden; touch-action: pan-y; cursor: zoom-in; display: flex; justify-content: center; background: var(--soft); }
.viewer.zoomed .stage { touch-action: none; cursor: grab; }
.stage img { display: block; width: 100%; height: auto; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; }
.viewer.tall .stage img { width: auto; max-width: 100%; max-height: calc(100vh - 230px); }
.tools { display: flex; align-items: center; gap: 6px; padding: 6px; border-top: 1px solid var(--line); font: 14px var(--sans); }
.tool { min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 600 20px var(--sans); cursor: pointer; }
.zoomlevel { margin: 0 6px; color: var(--muted); min-width: 4ch; }
.viewer figcaption { padding: 0 10px 8px; margin: 0; font-size: 13px; }
.viewer:fullscreen { display: flex; flex-direction: column; border-radius: 0; }
.viewer:fullscreen .stage { flex: 1; align-items: center; }
.viewer:fullscreen .stage img { max-height: 100%; width: auto; }
.lines { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.lines li { padding: 10px; border-bottom: 1px solid var(--line); cursor: pointer; overflow-wrap: anywhere; min-height: 44px; }
.lines li:hover { background: var(--soft); }
.lines li[aria-current="true"] { background: var(--soft); box-shadow: inset 4px 0 0 var(--accent); }
.lines .n { font: 13px var(--sans); color: var(--muted); margin-right: 6px; }
.lines .orig { font-size: 1.2rem; }
.c-low, .low { text-decoration: underline wavy var(--draft); text-underline-offset: 5px; }
.c-medium { text-decoration: underline dotted var(--muted); text-underline-offset: 5px; }
.cert { font: 13px var(--sans); color: var(--draft); }
.lineactions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; cursor: default; }
.facts-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font: 15px var(--sans); margin: 12px 0; }
.facts-dl dt { color: var(--muted); }
.facts-dl dd { margin: 0; }
.related { padding-left: 1.2rem; }
.related a { display: inline-block; padding: 8px 0; }
mark, .changed { background: var(--mark); color: inherit; border-radius: 4px; padding: 0 2px; }
.tablewrap { overflow-x: auto; max-width: 100%; position: relative; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; }
th, td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
thead th { font: 600 13px var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
tbody th { font: 13px var(--sans); color: var(--muted); white-space: nowrap; }

/* Search */
.searchform { margin: 12px 0; }
.filters { margin-top: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.filters summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font: 600 15px var(--sans); }
.fieldrow { display: grid; gap: 10px; padding: 4px 0 12px; }
.field { display: grid; gap: 4px; font: 14px var(--sans); color: var(--muted); }
.field.inline { display: flex; align-items: center; gap: 10px; }
.field.inline input { min-height: 44px; flex: 1; max-width: 260px; }
.check { display: flex; align-items: center; gap: 8px; font: 15px var(--sans); min-height: 44px; }
.check input { width: 22px; height: 22px; }
.hits { list-style: none; padding: 0; display: grid; gap: 10px; }
.hit { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; overflow-wrap: anywhere; }
.hitlink { display: grid; text-decoration: none; color: var(--ink); padding: 4px 0; min-height: 44px; }
.hitlink .orig { font-size: 1.2rem; }
.hit .cite, .hit .meta { margin: 4px 0; font: 14px var(--sans); color: var(--muted); }

/* Scholar's desk */
.deskhome { display: grid; gap: 8px; }
.deskhome > * { min-width: 0; }
.deskbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.deskbar h1 { margin: 0 8px 0 0; }
.deskgrid { display: grid; gap: 16px; margin-top: 12px; min-width: 0; }
.deskgrid > * { min-width: 0; }
.desklines .orig { font-size: 1.15rem; }
.desklines tr.sel { background: var(--soft); box-shadow: inset 4px 0 0 var(--accent); }
.desklines .acts { white-space: nowrap; width: 1%; }
.desklines .tool { font-size: 18px; }
.citebox { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 8px; margin-top: 12px; }
.citeout { display: block; font: 15px var(--sans); padding: 8px 10px; background: var(--soft); border-radius: 8px; overflow-wrap: anywhere; }
.vlist { list-style: none; padding: 0; margin: 0; }
.vlist li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.vlist li.cur { font-weight: 600; }
.vlist a { display: inline-block; padding: 8px 4px; min-width: 44px; }
.deskonly { display: none; }
.phoneonly { display: block; }

/* Static pages */
.prose { max-width: 42em; }
.prose p, .prose li { overflow-wrap: break-word; }
.prose-list { padding-left: 1.3rem; }
.prose-list li { margin: 6px 0; }
.lost { text-align: center; padding: 24px 0; }
.lost .chips { justify-content: center; }

/* Player bar and phone tab bar */
.player { position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabbar) + 8px + env(safe-area-inset-bottom)); z-index: 12;
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; background: var(--card); border: 1px solid var(--accent);
  border-radius: 14px; box-shadow: 0 8px 24px rgb(0 0 0 / .2); max-width: 720px; margin: 0 auto; }
.playinfo { flex: 1; min-width: 0; }
.playtitle { margin: 0; font: 600 15px var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playnote { margin: 0; font: italic 12px var(--sans); color: var(--muted); }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 11; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); height: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted);
  text-decoration: none; font: 12px var(--sans); min-height: 44px; }
.tabbar svg { width: 24px; height: 24px; fill: currentColor; }
.tabbar a[aria-current="page"] { color: var(--accent); font-weight: 600; }

.foot { color: var(--muted); font: 14px var(--sans); text-align: center; padding: 16px; border-top: 1px solid var(--line); }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 14px; }
.foot nav a { display: inline-block; padding: 10px 0; min-height: 44px; }
.foot p { margin: 6px auto; max-width: 60em; }
.demo { font-style: italic; }

dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); max-width: 540px; width: calc(100% - 32px); }
dialog::backdrop { background: rgb(30 20 10 / .45); }
dialog label.label { display: block; }
dialog textarea { width: 100%; font: 16px var(--sans); min-height: 80px; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
dialog dl dd { margin: 0 0 8px; overflow-wrap: anywhere; }

/* Offline: a quiet note while the network is gone or an offline copy shows. */
.offnote { display: none; margin: 0; padding: .5rem 16px; background: var(--soft);
  color: var(--ink); border-bottom: 1px solid var(--line); font-size: .9rem; }
body.offline .offnote, body.offlinecopy .offnote { display: block; }
body.offline .send, body.offline .mic { opacity: .5; }

.stage:focus-visible, .lines li:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }

/* Tablets and up */
@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cards.wide { grid-template-columns: 1fr; }
  .fieldrow { grid-template-columns: repeat(2, 1fr); }
  .deskhome { grid-template-columns: 3fr 2fr; gap: 32px; }
}
/* The scholar's desk and wide screens */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; }
  .top { padding: 6px 24px; }
  .player { bottom: 16px; }
  main { max-width: 1040px; padding: 0 32px 48px; }
  body.route-page main, body.route-desk main, body.route-compare main { max-width: 1440px; }
  .askzone { padding-top: 36px; }
  .mic { width: 168px; height: 168px; }
  body.route-home .askcol { max-width: 680px; }
  body.inview .askzone { max-width: 760px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .fieldrow { grid-template-columns: 2fr 1fr 2fr auto; align-items: end; }
  .page { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; column-gap: 28px; }
  .page > header { grid-column: 1 / -1; }
  .page .viewer { position: sticky; top: 76px; }
  .page .stage img { max-height: calc(100vh - 200px); width: auto; max-width: 100%; }
  .deskgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 28px; }
  .deskgrid .viewer { position: sticky; top: 76px; }
  .deskonly { display: inline-flex; }
  .phoneonly { display: none; }
  .home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (min-width: 1280px) {
  .cards { grid-template-columns: repeat(5, 1fr); }
  .way { grid-template-columns: 1fr; text-align: left; align-content: start; }
  .wayicon { grid-row: auto; }
}
@media (max-width: 400px) {
  .stats .stat strong { font-size: 1.4rem; }
  .tools { flex-wrap: wrap; }
  .pager .small { display: none; }
}
@media print {
  .top, .tabbar, .player, .guide, .foot nav, .tools, .lineactions { display: none !important; }
  body { padding: 0; background: #fff; color: #000; }
}
.desklines td { overflow-wrap: normal; }
.desklines td[lang="sa-Latn"] { min-width: 7em; }
.vlist { font: 15px/1.5 var(--sans); }
/* Long work titles must not push a filter wider than the page. */
.filters .field, .filters label { min-width: 0; max-width: 100%; }
.filters select { width: 100%; max-width: 100%; text-overflow: ellipsis; }
.filters .row, .filters > div { min-width: 0; max-width: 100%; flex-wrap: wrap; }

/* Study notes: folded by default under the summary. */
details.study { margin: 1rem 0; }
details.study > summary { cursor: pointer; font-weight: 600; padding: .4rem 0; }
details.study ul { padding-left: 1.2rem; }
