/* Living Book. Load after style.css and pdf-guided/style.css.
   Opt in with <body class="living-book">. No remote assets. */
body.living-book {
  --ink: #292820;
  --muted: #6d6b61;
  --paper: #fffefb;
  --line: #dfddd3;
  --accent: #405b4d;
  --book-hebrew: "Noto Serif Hebrew", "Frank Ruhl Libre", "Times New Roman", serif;
  --book-english: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --book-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #efeee8;
  font: 14px/1.5 var(--book-ui);
  -webkit-font-smoothing: antialiased;
}
.living-book header {
  padding: 17px clamp(16px, 3vw, 48px);
  background: #f8f7f2;
  border-bottom: 1px solid var(--line);
}
.living-book .brand { gap: 12px; }
.living-book .mark { font: 34px/1 var(--book-hebrew); color: var(--accent); }
.living-book h1 { font: 23px/1.15 var(--book-english); letter-spacing: -.025em; }
.living-book header p { margin-top: 3px; font-size: 12px; }
.living-book .local { font-size: 9px; letter-spacing: .12em; font-weight: 500; }
.living-book .toolbar {
  padding: 12px clamp(16px, 3vw, 48px);
  gap: 9px;
  background: #f8f7f2;
  align-items: end;
}
.living-book label { font: 11px/1.4 var(--book-ui); color: var(--muted); gap: 5px; }
.living-book :is(button, select, input) {
  font: 13px/1.2 var(--book-ui);
  color: var(--ink);
  border: 1px solid #d0cfc4;
  border-radius: 5px;
  background: var(--paper);
  min-height: 36px;
  padding: 8px 10px;
}
.living-book button { touch-action: manipulation; }
.living-book button:hover { background: #e8ece5; border-color: #9ca89b; }
.living-book button:active { background: #dde5da; }
.living-book button:disabled { opacity: .45; cursor: default; }
.living-book :is(button, input, select, a, summary, [tabindex]):focus-visible {
  outline: 2px solid #587761;
  outline-offset: 3px;
}
.living-book .primary,
.living-book button.active,
.living-book button[aria-pressed="true"] {
  color: #fffef9;
  background: var(--accent);
  border-color: var(--accent);
}
.living-book .primary:hover { background: #31483c; }
.living-book #number { width: 64px; }
.living-book :is(#previous, #next) { width: 36px; font-size: 18px; padding: 5px; }
.living-book #mode { max-width: 250px; }
.living-book main { max-width: 1800px; padding: 20px clamp(16px, 3vw, 48px) 32px; }
.living-book .heading { align-items: baseline; margin-bottom: 10px; gap: 20px; }
.living-book h2 { font: 29px/1.2 var(--book-english); margin: 0 0 5px; }
.living-book h3 { font: 22px/1.3 var(--book-english); }
.living-book .eyebrow { font-size: 9px; letter-spacing: .12em; font-weight: 500; margin-bottom: 4px; }
.living-book #range { margin: 0; font-size: 11px; }
.living-book #status { margin: 7px 0 12px; font-size: 12px; }
.living-book .workspace { gap: 22px; grid-template-columns: minmax(0, 1fr) 360px; }
body.living-book:is(.facsimile-mode, .vilna-mode) .workspace { grid-template-columns: minmax(0, 1fr); }
.living-book .facsimile-columns { grid-template-columns: minmax(0, 1fr) minmax(320px, 370px); gap: 22px; margin-top: 12px; }
.living-book .facsimile-toolbar {
  margin: 12px 0;
  gap: 9px;
  padding: 10px 12px;
  background: #f8f7f2;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.living-book .facsimile-toolbar label:has(input[type="checkbox"]) { flex-direction: row; align-items: center; align-self: center; }
.living-book input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; min-height: 0; }
.living-book input[type="range"] { width: 140px; min-height: 24px; padding: 0; border: 0; background: transparent; accent-color: var(--accent); }
.living-book .source-notice { color: var(--muted); font-size: 12px; max-width: 85ch; margin: 6px 0 10px; }
.living-book :is(.notice, .empty-note) { background: #f8f2e5; border-radius: 4px; color: #66532c; font: 12px/1.55 var(--book-ui); }
.living-book .notice { border-left: 2px solid #b29455; padding: 10px 13px; }
.living-book #wagshal-status { font-size: 12px; color: var(--muted); }
.living-book #wagshal-view > .actions { align-items: center; font-size: 11px; color: var(--muted); margin-bottom: 10px; gap: 7px; }
.living-book .actions button { font-size: 11px; min-height: 29px; padding: 5px 9px; }
.living-book :is(.wagshal-viewport, .daf-scroll, .source-surface, .pdf-guided-root) {
  background: #e7e5dd;
  border: 1px solid #d4d1c5;
  border-radius: 3px;
  overscroll-behavior: contain;
  scrollbar-color: #aaa99f #e7e5dd;
}
.living-book :is(.wagshal-viewport, #source-image-viewport) { height: calc(100vh - 250px); min-height: 460px; }
.living-book #wagshal-canvas { background: #fff; margin: 0 auto; }
.living-book :is(#wagshal-canvas, .pdf-guided-page) { box-shadow: 0 2px 14px #302c2314; }
/* Never change renderer font sizes, geometry, or line height here. */
.living-book .layout-word:not(.selected):not(.line-active):not(:hover):not(:focus-visible) { background: transparent; border-bottom-color: transparent; }
.living-book .live-word.uncertain .live-text { color: #303030; }
.living-book .layout-word:is(.selected, .line-active),
.living-book .subtle-links .layout-word.line-active { background: #cfb66e33; border-bottom: 1px solid #a58b48; }
.living-book .gemara-line:is(:hover, .line-active) { background: #cfb66e29; outline: 1px solid #a58b4877; }
.living-book .layout-word:focus-visible, .living-book .gemara-line:focus-visible { outline: 2px solid #587761; }
.living-book .pdf-guided-text [data-ref]:hover { background: #cfb66e29; }
/* Explicit diagnostics opt-in retains the existing placement cues. */
.living-book .book-diagnostics-on .layout-word.uncertain { background: #e99a0010; border-bottom: 1px dashed #a66b00; }
.living-book .book-diagnostics-on .live-word.uncertain .live-text { color: #946300; }
.living-book .book-diagnostics-on .layout-word:not(.uncertain):not(.selected):not(.line-active) { background: #405b4d0d; border-bottom: 1px solid #405b4d66; }
.living-book :is(aside, .source-study) {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px;
  scrollbar-color: #b9b8ac transparent;
  scroll-behavior: auto;
}
.living-book .source-study { position: sticky; top: 16px; height: auto; max-height: calc(100vh - 32px); min-height: 300px; overflow: auto; }
.living-book aside h2 { font-size: 23px; }
.living-book .smart-header { gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.living-book .smart-header h3 { font-size: 23px; }
.living-book .smart-header button { background: transparent; border-color: transparent; min-width: 32px; min-height: 32px; padding: 5px; color: var(--muted); }
.living-book .smart-options { gap: 12px; margin: 15px 0; }
.living-book .smart-options label { flex-direction: row; font-size: 12px; color: var(--ink); }
.living-book .smart-default { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; margin: 17px 0 8px; }
.living-book .smart-excerpt { font: 24px/1.7 var(--book-hebrew); padding: 12px 14px; background: #f3f0e6; border-right: 2px solid #a58b48; margin: 0 0 16px; text-align: right; direction: rtl; }
.living-book :is(.en, .source-study .en, #wagshal-study .en) { font: 19px/1.65 var(--book-english); }
.living-book :is(.he, .source-study .he, #wagshal-study .he, .comment-body, .smart-commentary .comment-body) { font: 23px/1.75 var(--book-hebrew); text-align: right; }
.living-book :is(.he, .comment-body)[dir="rtl"] { unicode-bidi: isolate; }
.living-book .smart-scope { font: 12px/1.5 var(--book-ui); color: var(--muted); }
.living-book .smart-passage { padding-top: 18px; margin-top: 22px; }
.living-book .smart-passage h4 { font: 13px/1.4 var(--book-ui); font-weight: 600; margin-bottom: 10px; }
.living-book .smart-commentary { margin-top: 22px; padding-top: 18px; }
.living-book .smart-commentary h3 { font-size: 20px; }
.living-book :is(.details, .edition, .link-label) { font: 11px/1.5 var(--book-ui); }
.living-book .details summary { padding: 7px 0; }
.living-book .amud { border-radius: 5px; }
.living-book .amud-head { background: #faf9f4; }
.living-book .segment { padding: 22px; }
.living-book .segment.selected { background: #f2f3eb; box-shadow: inset 2px 0 var(--accent); }
.living-book .pair { gap: 32px; }
.living-book .vilna-columns { grid-template-columns: minmax(0, 1fr) 340px; }
.living-book .book-diagnostics { margin: 12px 0; padding: 0 12px; background: #f8f7f2; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font: 12px/1.5 var(--book-ui); }
.living-book .book-diagnostics > summary { cursor: pointer; padding: 10px 0; }
.living-book .book-diagnostics[open] { padding-bottom: 12px; }
.living-book .book-diagnostics .facsimile-toolbar { border: 0; padding: 0; }
.living-book .book-zoom { display: flex; align-items: center; gap: 6px; }
.living-book .book-zoom output { min-width: 4ch; text-align: center; font: 11px var(--book-ui); color: var(--muted); }
.living-book .book-zoom button { min-width: 34px; }
.living-book .book-hint { font: 12px/1.6 var(--book-ui); color: var(--muted); }
.living-book footer { border-top: 1px solid var(--line); padding-top: 16px; font-size: 11px; line-height: 1.7; }
@media (min-width: 1500px) {
  .living-book .facsimile-columns { grid-template-columns: minmax(0, 1fr) 400px; gap: 30px; }
  .living-book .source-study { padding: 26px; }
}
@media (max-width: 1050px) {
  .living-book .workspace, .living-book .facsimile-columns, .living-book .vilna-columns { grid-template-columns: minmax(0, 1fr); }
  .living-book :is(aside, .source-study) { position: static; max-height: none; height: auto; }
  .living-book .source-study { margin-top: 6px; }
  .living-book .local { display: none; }
}
@media (max-width: 650px) {
  .living-book header { padding: 14px 16px; }
  .living-book main { padding: 16px 12px 24px; }
  .living-book .toolbar { padding: 12px 16px; gap: 8px; }
  .living-book .heading { display: flex; flex-wrap: wrap; gap: 6px; }
  .living-book #mode { max-width: 220px; }
  .living-book .pair { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .living-book .pair .he { grid-row: 1; }
  .living-book .column-heads { display: none; }
  .living-book .segment { padding: 18px; }
  .living-book :is(aside, .source-study) { padding: 20px; }
  .living-book :is(.wagshal-viewport, #source-image-viewport) { height: 68vh; min-height: 360px; }
  .living-book :is(button, select, input) { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .living-book *, .living-book *::before, .living-book *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media print {
  body.living-book { background: white; }
  .living-book :is(header, .toolbar, .facsimile-toolbar, .book-diagnostics, footer, .source-study, aside) { display: none; }
  .living-book main { padding: 0; }
  .living-book .facsimile-columns { display: block; }
  .living-book .wagshal-viewport { overflow: visible; height: auto; border: 0; background: white; }
  .living-book :is(#wagshal-canvas, .pdf-guided-page) { box-shadow: none; }
}
/* Procedural paper: no watermarked or external image assets. */
body.living-book {
  background-color:#e7e3d9;
  background-image:radial-gradient(ellipse at 50% 25%,#f4f1e8 0%,transparent 75%),repeating-linear-gradient(7deg,#79654c04 0 1px,transparent 1px 5px);
}
.living-book .wagshal-viewport {
  background:#d8d1c1;
  border-color:#c8bfad;
  box-shadow:inset 5px 0 12px #4b3d2820,0 7px 22px #40332012;
}
.living-book .pdf-guided-page {
  background-color:#fffef8;
  background-image:linear-gradient(90deg,#72613e0e,transparent 2%,transparent 97%,#72613e13);
  box-shadow:1px 0 #e3dbc9,3px 0 #faf8ef,4px 0 #bfb6a4,6px 0 #f6f2e6,8px 0 13px #352a2420;
}
.living-book .pdf-guided-page::before {
  content:"";position:absolute;inset:0;pointer-events:none;z-index:1;
  background-image:repeating-linear-gradient(103deg,transparent 0 6px,#6f573e05 6px 7px,transparent 7px 11px),repeating-linear-gradient(3deg,transparent 0 13px,#6f573e04 13px 14px,transparent 14px 19px),radial-gradient(ellipse at 18% 35%,#e3d5b508,transparent 65%);
}
.living-book .pdf-guided-text {position:relative;z-index:2;}
.living-book .pdf-guided-page-title {z-index:2;}
.living-book .pdf-guided-page::before {
  opacity:.045;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65 .08' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)'/%3E%3C/svg%3E");
}

.mobile-study-jump,.mobile-study-back {display:none;}
@media(max-width:1050px){
  .living-book .mobile-study-jump {display:block;position:fixed;bottom:16px;left:16px;right:16px;z-index:50;background:#405b4d;color:#fff;box-shadow:0 3px 14px #0003;min-height:44px;}
  .living-book .mobile-study-back {display:block;margin-bottom:12px;}
  .living-book #wagshal-study {scroll-margin-top:16px;padding-bottom:65px;}
}
.mobile-study-jump[hidden] {display:none!important;}

.living-book .mobile-study-jump:is(:hover,:focus,:active) {background:#31483c;color:#fff;}

/* Daf-first composition: one reading strip, study only on demand. */
body.daf-first > header {display:none;}
body.daf-first main {padding:8px 16px 12px;max-width:none;}
body.daf-first #navigation {padding:8px 16px;gap:8px;min-height:48px;align-items:center;position:relative;z-index:20;}
body.daf-first #navigation > label {display:flex;flex-direction:row;align-items:center;font-size:12px;}
body.daf-first #navigation :is(button,select,input) {min-height:32px;padding:5px 8px;}
body.daf-first #navigation #tractate {width:165px;}
body.daf-first #navigation #number {width:54px;}
body.daf-first .compact-daf-controls {display:flex;align-items:center;gap:8px;margin:0;padding:0;background:none;border:0;}
body.daf-first .compact-daf-controls label {display:flex;flex-direction:row;align-items:center;gap:5px;}
body.daf-first #wagshal-zoom {width:100px;min-height:20px;padding:0;}
body.daf-first .workspace {display:block;}
body.daf-first #wagshal-status {margin:0 0 5px;font-size:11px;line-height:16px;}
body.daf-first #wagshal-columns {display:grid;grid-template-columns:minmax(0,1fr);gap:14px;}
body.daf-first #wagshal-columns.has-study {grid-template-columns:minmax(0,1fr) 360px;}
body.daf-first .wagshal-viewport {height:calc(100vh - 94px);min-height:380px;padding:0;background:#e7e3d9;border:0;box-shadow:none;}
body.daf-first #pdf-guided-mount {width:max-content;min-width:100%;}
body.daf-first .pdf-guided-page {margin-left:auto;margin-right:auto;}
body.daf-first #wagshal-study {position:sticky;top:8px;max-height:calc(100vh - 94px);min-height:0;}
.reading-options {position:relative;margin-left:auto;}
.reading-options > summary {cursor:pointer;white-space:nowrap;padding:7px 10px;border:1px solid #d0cfc4;border-radius:5px;list-style:none;}
.reading-options[open] {padding:12px;background:#fffefb;border:1px solid #d0cfc4;border-radius:5px;max-width:450px;}
.reading-options[open] > label {margin:10px 0;}
body.daf-first .reading-options[open] {position:absolute;right:16px;top:8px;box-shadow:0 8px 24px #0002;max-height:calc(100vh - 32px);overflow:auto;}
body.daf-first .reading-options .heading {display:block;}
body.daf-first footer {font-size:10px;padding:4px 16px;}
body:not(.daf-first) .compact-daf-controls {display:none;}
@media(max-width:1050px){body.daf-first #wagshal-columns.has-study {grid-template-columns:minmax(0,1fr);}body.daf-first #wagshal-study {max-height:none;position:static;}}
@media(max-width:650px){body.daf-first #navigation {padding:6px 10px;gap:5px;}body.daf-first main {padding:6px 10px;}body.daf-first #navigation #tractate{width:130px;}body.daf-first .compact-daf-controls{gap:6px;flex-wrap:wrap;}body.daf-first .wagshal-viewport {height:calc(100vh - 145px);}}
body.daf-first #wagshal-columns .wagshal-viewport {height:calc(100vh - 94px);min-height:380px;}
body.daf-first #pdf-guided-mount {border:0;min-width:0;background:none;box-sizing:border-box;}
@media(max-width:650px){body.daf-first #wagshal-columns .wagshal-viewport {height:calc(100vh - 145px);}}

body.daf-first #navigation {position:sticky;top:0;z-index:30;background:#f8f7f2;}

@media(max-width:650px){
  body.daf-first #navigation > label {font-size:0;gap:0;}
  body.daf-first #navigation > label :is(input,select){font-size:12px;}
  body.daf-first .compact-daf-controls {display:contents;}
  body.daf-first .compact-daf-controls label:has(#wagshal-zoom){font-size:0;gap:0;}
  body.daf-first .reading-options > summary {font-size:0;padding:5px 9px;}
  body.daf-first .reading-options > summary::after {content:'⋯';font:18px system-ui;}
}

/* Shared navigation must remain compact in every exposed mode. */
body.reader-first > header {display:none;}
body.reader-first main {padding:8px 16px 12px;max-width:none;}
body.reader-first #navigation {padding:8px 16px;gap:8px;min-height:48px;align-items:center;position:relative;z-index:20;}
body.reader-first #navigation > label {display:flex;flex-direction:row;align-items:center;font-size:12px;}
body.reader-first #navigation :is(button,select,input) {min-height:32px;padding:5px 8px;}
body.reader-first #navigation #tractate {width:165px;}
body.reader-first #navigation #number {width:54px;}
body.reader-first .reading-options[open] {position:absolute;right:16px;top:8px;box-shadow:0 8px 24px #0002;max-height:calc(100vh - 32px);overflow:auto;}
body.reader-first .reading-options .heading {display:block;}
body.reader-first footer {font-size:10px;padding:4px 16px;}
body.reader-first #navigation {position:sticky;top:0;z-index:30;background:#f8f7f2;}
body.reader-first .reading-options[open] {position:absolute;right:16px;top:8px;z-index:50;width:min(420px,calc(100vw - 32px));box-sizing:border-box;}

body.reader-first .legacy-controls,body.reader-first .pdf-controls {display:none;padding:0;border:0;background:none;margin:0;gap:8px;align-items:center;}
body.reader-first[data-view='vilna'] .legacy-controls,body.reader-first[data-view='facsimile'] .pdf-controls {display:flex;}
body.reader-first .active-mode-caption {font:11px/16px var(--book-ui);color:var(--muted);margin:0 0 5px;}
body.reader-first #vilna-title {margin:8px 0;font-size:18px;}
body.reader-first #vilna-view .vilna-columns {margin-top:0;}
body.reader-first .daf-scroll {height:calc(100vh - 110px);min-height:400px;}
body.reader-first #facsimile-view .notice {margin:0;}
body.reader-first #source-file-links {margin:4px 0;font-size:11px;}
body.reader-first .reading-options .notice {font-size:12px;margin:10px 0;}

/* Primary Vilna uses TalmudLab's complementary flow spacers, not fixed columns. */
body[data-view="vilna"] .vilna-columns {grid-template-columns:minmax(0,1fr);gap:14px;}
body[data-view="vilna"] .vilna-columns.has-study {grid-template-columns:minmax(0,1fr) 360px;}
body[data-view="vilna"] .daf-scroll {height:calc(100vh - 94px);min-height:380px;background:#e7e3d9;padding:0 16px 20px;border:0;}
body[data-view="vilna"] #daf-root {position:relative;background:#fffef8;box-shadow:0 1px 8px #0002;min-height:350px;}
body[data-view="vilna"] #vilna-english {display:none;}
body[data-view="vilna"] #wagshal-study {position:sticky;top:8px;max-height:calc(100vh - 94px);overflow:auto;}
body[data-view="vilna"] :is(#wagshal-a,#wagshal-b) {display:none;}
body[data-view="vilna"] .v-anchor {display:none;}
body[data-view="vilna"] .v-segment.line-active {background:#efe2a8;}
body[data-view="vilna"] .v-segment:focus-visible,body[data-view="vilna"] .v-comment:focus-visible {outline:2px solid #7d6939;}
@media(max-width:760px){body[data-view="vilna"] .vilna-columns.has-study{grid-template-columns:minmax(0,1fr);}body[data-view="vilna"] #wagshal-study{position:static;max-height:none;}body[data-view="vilna"] .daf-scroll{height:calc(100vh - 145px);padding:0 12px 16px;}}

@media(max-width:600px){
body[data-view="vilna"] #navigation > label {font-size:0;gap:0;}
body[data-view="vilna"] #navigation #tractate {width:136px;font-size:13px;}
body[data-view="vilna"] #navigation #number {width:48px;font-size:13px;}
body[data-view="vilna"] #wagshal-zoom {width:80px;}
body[data-view="vilna"] .legacy-controls {gap:5px;}
body[data-view="vilna"] .compact-daf-controls label:has(#wagshal-niqqud){font-size:0;}
body[data-view="vilna"] .compact-daf-controls label:has(#wagshal-niqqud)::after{content:'Niqqud';font-size:12px;}
body[data-view="vilna"] .daf-scroll {height:calc(100vh - 125px);}
}

@media(max-width:600px){body[data-view="vilna"] .active-mode-caption::after{content:" · Swipe sideways for commentary";}}

.living-book .smart-excerpt {font-size:19px;line-height:1.5;max-height:120px;overflow:auto;margin:12px 0;padding:10px 12px;}
.living-book .smart-hebrew-context {margin:15px 0;font-size:12px;}
.living-book .smart-hebrew-context summary {cursor:pointer;}

/* Holistic primary-daf repairs: identity, gutters, proportional wide-screen fit. */
body[data-view="vilna"] #daf-root {padding:20px;box-shadow:0 3px 9px #0002;}
body[data-view="vilna"] .vilna-masthead {box-sizing:border-box;margin:0 auto;padding:15px 20px 9px;background:#fffef8;text-align:center;border-bottom:1px solid #d8d1be;}
body[data-view="vilna"] .vilna-hebrew-title {font-family:serif;font-size:24px;line-height:1.2;}
body[data-view="vilna"] .vilna-page-ref {font-size:12px;color:#686252;margin-top:4px;}
body[data-view="vilna"] .vilna-layer-labels {box-sizing:border-box;margin:0 auto;padding:9px 20px 0;display:grid;grid-template-columns:29% 42% 29%;background:#fffef8;text-align:center;font-size:12px;color:#615b4c;}
#vilna-mobile-view {display:none;}
body[data-view="vilna"] .vilna-large-type [class*="styles_text"] {text-align:right;text-align-last:right;}
.living-book .smart-scope {font-size:12px;line-height:1.45;margin:10px 0;}
@media(max-width:600px){
body[data-view="vilna"] #vilna-mobile-view {display:inline-block;}
body[data-view="vilna"] #daf-root {padding:12px;}
body[data-view="vilna"] .vilna-masthead {padding:10px 12px 7px;}
body[data-view="vilna"] .vilna-hebrew-title {font-size:20px;}
body[data-view="vilna"] .vilna-layer-labels {padding:7px 12px 0;}
body[data-view="vilna"] .vilna-mobile-reading .vilna-layer-labels {display:block;}
body[data-view="vilna"] .vilna-mobile-reading .vilna-side-label {display:none;}
body[data-view="vilna"] .vilna-mobile-reading :is(.vilna-rashi-layer,.vilna-tosafot-layer) {display:none;}
body[data-view="vilna"] .vilna-mobile-reading .vilna-main-layer {position:relative;}
body[data-view="vilna"] .vilna-mobile-reading .vilna-main-layer [class*="styles_spacer"] {display:none;}
body[data-view="vilna"] .vilna-mobile-reading .vilna-main-layer [class*="styles_text"] {text-align:right;text-align-last:right;}
body[data-view="vilna"] .vilna-mobile-reading .v-segment {display:block;margin-bottom:14px;}
body[data-view="vilna"] .active-mode-caption::after {content:" · Gemara reading; commentary in study";}
body[data-view="vilna"]:has(.vilna-mobile-overview) .active-mode-caption::after {content:" · Daf overview; Read Gemara for continuous lines";}
body[data-view="vilna"] #navigation {gap:5px;}
body[data-view="vilna"] #wagshal-zoom {width:55px;}
body[data-view="vilna"] .compact-daf-controls {gap:5px;}
body[data-view="vilna"] .legacy-controls {gap:4px;}
body[data-view="vilna"] #navigation .legacy-controls button {padding:5px 7px;font-size:12px;}
}

body[data-view="vilna"] .daf-scroll {scrollbar-gutter:stable;}
body[data-view="vilna"] .vilna-masthead {display:grid;grid-template-columns:1fr auto;align-items:baseline;gap:12px;}
@media(max-width:600px){body[data-view="vilna"] .vilna-masthead{grid-template-columns:1fr;gap:2px;}}
