/* The Art of Writing: opening film, drawn as a manuscript under edit on a paper desk.
   A 1280x800 sheet scaled to the stage; everything is scoped under .pbc-film. */
.pbc-film {
  --c-pub: #9A9389;
  --c-plain: #93A9CC;
  --c-skill: #2A4E8F;
  --c-ai: #C4553F;
  --c-as: #D9A43A;
  --c-hu: #5B8C6A;
  --hl-a: rgba(158, 210, 128, 0.62);
  --hl-b: rgba(246, 212, 82, 0.66);
  --hl-c: rgba(240, 146, 122, 0.55);
  --hl-d: rgba(190, 162, 234, 0.6);
  --p-ink: #26221C;
  --p-ink2: #5A5247;
  --p-ink3: #8F8576;
  --p-rule: #E2D8C6;
  --p-edge: #E1D7C6;
  --p-paper: #FFFDF7;
  --p-slip: #FCF8EF;
  --p-red: #B8322A;
  --p-blue: #2A4E8F;
  container: pbcfilm / inline-size;
  margin: 28px 0 36px;
  color: var(--ink);
  font-family: var(--font-sans);
}
.pbc-film *, .pbc-film *::before, .pbc-film *::after { box-sizing: border-box; }
.pbc-film__sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.pbc-film__nb { white-space: nowrap; }

/* ---- stage, desk and sheet ---- */
.pbc-film__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid #E3E3E0;
  border-radius: 6px;
  background: #FFFFFF;
}
.pbc-film__world {
  position: absolute; left: 0; top: 0; width: 1280px; height: 800px;
  transform-origin: 0 0;
  font-family: var(--font-sans);
  color: var(--p-ink);
}
.pbc-film__world > * { position: absolute; left: 0; top: 0; }
.pbc-film__desk {
  width: 1280px; height: 800px;
  background-color: #FFFFFF;
}
.pbc-film__colophon {
  width: 600px; text-align: center;
  font-family: var(--font-display); font-size: 14px; letter-spacing: 0.08em; font-variant: small-caps;
  color: var(--p-ink3);
}

/* ---- shared paper pieces ---- */
.pbc-film__slip {
  padding: 18px 22px 20px;
  background: var(--p-slip);
  border: 1px solid var(--p-edge);
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(60, 45, 25, 0.05), 0 12px 20px -16px rgba(60, 45, 25, 0.45);
}
.pbc-film__stitle { font-family: var(--font-display); font-weight: 600; font-size: 21px; line-height: 1.25; color: var(--p-ink); }
.pbc-film__ssub { margin-top: 3px; font-family: var(--font-sans); font-style: italic; font-size: 14px; line-height: 1.35; color: var(--p-ink3); }
.pbc-film__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--font-mono); font-size: 13px; line-height: 1.3; color: var(--p-ink2); }
.pbc-film__legend > span { display: inline-flex; align-items: center; gap: 6px; }
.pbc-film__legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.pbc-film__legend i.is-pub { background: var(--c-pub); }
.pbc-film__legend i.is-plain { background: var(--c-plain); }
.pbc-film__legend i.is-skill { background: var(--c-skill); }
.pbc-film__legend.is-gltr i { width: 18px; height: 10px; border-radius: 2px 5px 3px 6px; transform: skewX(-12deg); }
.pbc-film__legend i.is-a { background: var(--hl-a); }
.pbc-film__legend i.is-b { background: var(--hl-b); }
.pbc-film__legend i.is-c { background: var(--hl-c); }
.pbc-film__legend i.is-d { background: var(--hl-d); }
.pbc-film__arrow { flex: none; width: 22px; height: 10px; color: var(--p-ink3); }
/* highlighter strokes */
.pbc-film__tok { position: relative; z-index: 0; }
.pbc-film__tok::before {
  content: ""; position: absolute; left: -2px; right: -2px; top: 0.3em; bottom: 0.02em; z-index: -1;
  border-radius: 3px 6px 4px 7px; transform: skewX(-8deg); opacity: var(--p, 0);
}
.pbc-film__tok.is-a::before { background: var(--hl-a); }
.pbc-film__tok.is-b::before { background: var(--hl-b); }
.pbc-film__tok.is-c::before { background: var(--hl-c); }
.pbc-film__tok.is-d::before { background: var(--hl-d); }

/* ---- headline and section mark ---- */
.pbc-film__hl { width: 960px; z-index: 2; }
.pbc-film__over {
  display: inline-block; padding-bottom: 8px; border-bottom: 1px solid #D8CDBA;
  font-family: var(--font-mono); font-size: 13.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--p-ink3);
}
.pbc-film__headline {
  margin: 16px 0 0;
  font-family: var(--font-display); font-weight: 600; font-size: 44px; line-height: 1.2; letter-spacing: -0.012em;
  color: var(--p-ink);
}
.pbc-film__headline .zh { line-height: 1.24; }
.pbc-film__hw { display: inline-block; }
.pbc-film__headline .en .pbc-film__hw { margin-right: 0.22em; }
.pbc-film__hw.is-em { position: relative; color: var(--p-blue); }
.pbc-film__replay {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 9px;
  border: 1.5px solid rgba(184, 50, 42, 0.75); border-radius: 999px 999px 999px 4px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--p-red); white-space: nowrap;
}
.pbc-film__replay svg { width: 20px; height: 20px; transform-origin: 50% 50%; }
.pbc-film__replay path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pbc-film__kick { display: flex; align-items: baseline; gap: 10px; font-family: var(--font-display); font-size: 19px; color: var(--p-ink2); white-space: nowrap; }
.pbc-film__kick b { font-weight: 600; font-size: 21px; color: var(--p-red); }

/* ---- the manuscript page ---- */
.pbc-film__page {
  width: 600px;
  background: var(--p-paper);
  border: 1px solid var(--p-edge);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(60, 45, 25, 0.05), 0 12px 22px -16px rgba(60, 45, 25, 0.45);
}
.pbc-film__phead { display: flex; justify-content: space-between; align-items: baseline; margin: 0 26px; padding: 18px 0 10px; border-bottom: 1px solid var(--p-rule); }
.pbc-film__psec { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: 0.03em; font-variant: small-caps; color: var(--p-ink); }
.pbc-film__pmeta { font-family: var(--font-sans); font-style: italic; font-size: 14px; color: var(--p-ink3); }
.pbc-film__pmeta em { font-style: italic; font-weight: 500; color: var(--p-blue); opacity: 0; }
.pbc-film__pbody { display: flex; gap: 14px; padding: 16px 26px 10px 12px; }
.pbc-film__lnum { flex: none; width: 24px; font-family: var(--font-mono); font-size: 11px; line-height: 34.02px; text-align: right; color: #BDB2A0; }
.pbc-film__para { flex: 1 1 auto; min-width: 0; margin: 0; font-family: var(--font-display); font-size: 21px; line-height: 1.62; color: var(--p-ink); }
.pbc-film__para .pbc-film__w { opacity: 0; }
.pbc-film__ed s { text-decoration: line-through; text-decoration-thickness: 2.5px; text-decoration-color: transparent; }
.pbc-film__ed b {
  display: none; font-weight: 500; color: var(--p-blue);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: transparent;
}
.pbc-film__caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -0.16em; background: var(--p-blue); }
.pbc-film__w.is-caret { position: relative; }
.pbc-film__w.is-caret::after { content: ""; position: absolute; right: -5px; top: 0.12em; bottom: 0.06em; width: 2px; background: var(--p-blue); }
.pbc-film__tally {
  display: none; align-items: center; gap: 12px; margin: 4px 26px 0; padding: 12px 0 16px;
  border-top: 1px dashed var(--p-rule); font-family: var(--font-mono); font-size: 14px; color: var(--p-ink2); opacity: 0;
}
.pbc-film__tally code { padding: 2px 8px; border: 1px solid var(--p-rule); border-radius: 3px; background: var(--p-slip); color: var(--p-ink); }
.pbc-film__marks { display: inline-flex; gap: 6px; }
.pbc-film__marks i { display: block; width: 3px; height: 18px; border-radius: 1.5px; background: var(--p-red); transform: rotate(9deg); }
.pbc-film__marks i.is-done { background: #DCD2C2; }
.pbc-film__tally [data-hcount] { font-weight: 500; color: var(--p-red); }
.pbc-film__tally [data-hcount].is-ok { color: var(--p-blue); }

/* ---- the detector's report slip ---- */
.pbc-film__report { width: 460px; transform-origin: 0 0; }
.pbc-film__shead {
  display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 10px; border-bottom: 1px solid var(--p-rule);
  font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: 0.03em; font-variant: small-caps; color: var(--p-ink);
}
.pbc-film__shead > span + span { font-family: var(--font-sans); font-size: 14px; font-weight: 400; font-style: italic; font-variant: normal; letter-spacing: 0; color: var(--p-ink3); }
.pbc-film__rbody { display: grid; grid-template-columns: 172px minmax(0, 1fr); column-gap: 24px; align-items: center; padding-top: 16px; }
.pbc-film__ring { grid-row: 1 / 3; width: 172px; height: 172px; }
.pbc-film__ring circle { fill: none; stroke-width: 18; }
.pbc-film__ring .is-track { stroke: #EFE7D8; }
.pbc-film__ring .is-ai { stroke: var(--c-ai); }
.pbc-film__ring .is-as { stroke: var(--c-as); }
.pbc-film__ring .is-hu { stroke: var(--c-hu); }
.pbc-film__rnum { display: flex; flex-direction: column; align-items: flex-start; }
.pbc-film__rnum s {
  height: 28px; margin-bottom: 14px; font-family: var(--font-display); font-size: 22px; line-height: 28px; color: var(--p-red);
  text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: transparent; opacity: 0;
}
.pbc-film__rnum b { font-family: var(--font-display); font-weight: 600; font-size: 60px; line-height: 1; color: var(--p-ink); font-variant-numeric: tabular-nums; }
.pbc-film__rnum span { margin-top: 8px; font-family: var(--font-sans); font-size: 14px; font-style: italic; color: var(--p-ink3); }
.pbc-film__rlg { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; font-family: var(--font-mono); font-size: 13px; color: var(--p-ink2); }
.pbc-film__rlg i { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 2px; vertical-align: -1px; }
.pbc-film__rlg i.is-ai { background: var(--c-ai); }
.pbc-film__rlg i.is-as { background: var(--c-as); }
.pbc-film__rlg i.is-hu { background: var(--c-hu); }

/* ---- what a likelihood detector reads ---- */
.pbc-film__gltr { width: 460px; }
.pbc-film__grow { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; padding-bottom: 6px; border-bottom: 1px dotted #D8CDBA; font-size: 14.5px; color: var(--p-ink2); }
.pbc-film__grow b { font-family: var(--font-mono); font-size: 13.5px; font-weight: 500; color: var(--p-blue); }
.pbc-film__gsent { margin: 12px 0 10px; font-family: var(--font-display); font-size: 19px; line-height: 1.72; color: var(--p-ink); }
.pbc-film__gnote { margin-top: 12px; font-style: italic; font-size: 14.5px; line-height: 1.4; color: var(--p-ink2); }

/* ---- the style sheet: index cards ---- */
.pbc-film__icard {
  width: 256px; padding: 14px 18px 16px;
  background-color: var(--p-paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 25px, rgba(120, 148, 196, 0.16) 25px, rgba(120, 148, 196, 0.16) 26px);
  border: 1px solid var(--p-edge); border-radius: 3px;
  box-shadow: 0 1px 0 rgba(60, 45, 25, 0.05), 0 10px 16px -12px rgba(60, 45, 25, 0.4);
}
.pbc-film__icard::before { content: ""; position: absolute; left: 0; right: 0; top: 64px; height: 1.5px; background: rgba(190, 70, 58, 0.5); }
.pbc-film__icard.is-lit { outline: 2px solid rgba(184, 50, 42, 0.7); outline-offset: 5px; border-radius: 6px; }
.pbc-film__itab {
  position: absolute; right: 14px; top: -12px; padding: 1px 10px 2px;
  border: 1px solid var(--p-edge); border-bottom: 0; border-radius: 5px 5px 0 0; background: #F6EEDF;
  font-family: var(--font-mono); font-size: 12px; color: var(--p-ink3);
}
.pbc-film__pname { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1.2; color: var(--p-ink); }
.pbc-film__pstat { margin-top: 3px; font-family: var(--font-sans); font-style: italic; font-size: 13.5px; line-height: 1.3; color: var(--p-red); }
.pbc-film__pvis { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.pbc-film__deck { width: 380px; }
.pbc-film__deck .pbc-film__pstat { font-family: var(--font-mono); font-style: normal; color: var(--p-blue); }
.pbc-film__deck .pbc-film__frow2:first-of-type { margin-top: 20px; }
.pbc-film__frow2 { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14px; }
.pbc-film__frow2 code { font-family: var(--font-mono); color: var(--p-blue); }
.pbc-film__frow2 span { font-style: italic; color: var(--p-ink3); }
.pbc-film__chain { position: relative; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pbc-film__chain::before { content: ""; position: absolute; left: 5px; top: 0.7em; bottom: 0.7em; width: 1.5px; background: var(--p-rule); }
.pbc-film__chain li { position: relative; padding-left: 20px; font-size: 15px; line-height: 1.35; color: var(--p-ink2); white-space: nowrap; }
.pbc-film__chain li::before {
  content: ""; position: absolute; left: 0; top: 0.42em; width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--p-ink3); background: var(--p-paper);
}
.pbc-film__chain li:last-child { color: var(--p-blue); font-weight: 500; }
.pbc-film__chain li:last-child::before { border-color: var(--p-blue); background: var(--p-blue); }
.pbc-film__stack { display: flex; width: 100%; overflow: hidden; border-radius: 2px; background: #EFE7D8; }
.pbc-film__stack > i { display: block; flex: none; height: 100%; width: 0; }
.pbc-film__tiers { height: 14px; }
.pbc-film__stack > .is-core, .pbc-film__tierlg i.is-core { background: var(--c-skill); }
.pbc-film__stack > .is-occ, .pbc-film__tierlg i.is-occ { background: var(--c-plain); }
.pbc-film__stack > .is-ret, .pbc-film__tierlg i.is-ret { background: #BDB4A6; }
.pbc-film__stack > .is-ref, .pbc-film__tierlg i.is-ref { background: #DDD4C5; }
.pbc-film__stack > .is-ban, .pbc-film__tierlg i.is-ban { background: var(--c-ai); }
.pbc-film__tierlg { display: flex; flex-wrap: wrap; gap: 2px 10px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.35; color: var(--p-ink3); }
.pbc-film__tierlg > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pbc-film__tierlg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.pbc-film__tierlg b { font-weight: 500; color: var(--p-ink2); }
.pbc-film__freq { display: flex; flex-direction: column; gap: 5px; }
.pbc-film__frow {
  display: grid; grid-template-columns: 7.3em minmax(0, 1fr) 1.8em; gap: 8px; align-items: center;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.3; color: var(--p-ink2);
}
.pbc-film__frow.is-cited > span:first-child { color: var(--p-red); box-shadow: inset 0 -2px 0 rgba(184, 50, 42, 0.6); }
.pbc-film__ftrack { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pbc-film__ftrack i { display: block; flex: none; height: 10px; width: 0; border-radius: 1px; background: var(--c-skill); }
.pbc-film__ftrack em { font-style: normal; font-size: 12px; color: var(--p-red); white-space: nowrap; opacity: 0; }
.pbc-film__frow b { font-weight: 500; text-align: right; color: var(--p-ink); opacity: 0; }
.pbc-film__frow.is-ban > span:first-child { color: var(--p-red); text-decoration: line-through; }
.pbc-film__frow.is-ban i { background: var(--c-ai); }
.pbc-film__hab { display: flex; flex-direction: column; gap: 6px; }
.pbc-film__hab > div { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13px; line-height: 1.35; white-space: nowrap; }
.pbc-film__hab > div.is-cited { box-shadow: inset 0 -2px 0 rgba(184, 50, 42, 0.6); }
.pbc-film__hab s { color: var(--p-red); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: transparent; }
.pbc-film__hab .pbc-film__arrow { opacity: 0; }
.pbc-film__hab > div > span { color: var(--p-blue); font-weight: 500; opacity: 0; }
.pbc-film__shape { display: flex; gap: 3px; height: 28px; font-family: var(--font-mono); font-size: 12.5px; }
.pbc-film__shape > span { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; white-space: nowrap; border-radius: 2px; opacity: 0; }
.pbc-film__shape .is-front { flex: 22 1 0; background: #EFE7D8; color: var(--p-ink3); }
.pbc-film__shape .is-sv { flex: 22 1 0; background: var(--p-blue); color: #FFFDF7; font-weight: 500; }
.pbc-film__shape .is-rest { flex: 34 1 0; background: #E6ECF6; color: var(--p-ink3); }
.pbc-film__shape .is-point { flex: 22 1 0; background: var(--p-ink); color: #FFFDF7; font-weight: 500; }
.pbc-film__shapecap { font-family: var(--font-sans); font-style: italic; font-size: 13px; line-height: 1.35; color: var(--p-ink3); opacity: 0; }
.pbc-film__term { display: flex; flex-direction: column; gap: 8px; }
.pbc-film__term > div { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.pbc-film__term code {
  max-width: 100%; overflow: hidden; white-space: nowrap;
  padding: 1px 8px; border: 1px solid var(--p-rule); border-radius: 3px; background: var(--p-slip);
  font-family: var(--font-mono); font-size: 13px; line-height: 1.4; color: var(--p-ink);
}
.pbc-film__term > div > span { font-family: var(--font-mono); font-size: 13px; line-height: 1.3; font-weight: 500; color: var(--p-blue); opacity: 0; }

/* ---- pencil leads ---- */
.pbc-film__leads { width: 1280px; height: 800px; overflow: visible; pointer-events: none; }
.pbc-film__leads path, .pbc-film__leads ellipse {
  fill: none; stroke: var(--p-red); stroke-width: 1.7; stroke-linecap: round;
  stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: 0;
}

/* ---- the lab notebook ---- */
.pbc-film__nbook {
  width: 540px; padding: 22px 26px 20px;
  background-color: var(--p-paper);
  background-image: linear-gradient(rgba(120, 148, 196, 0.13) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 148, 196, 0.13) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid var(--p-edge); border-radius: 3px;
  box-shadow: 0 1px 0 rgba(60, 45, 25, 0.05), 0 12px 22px -16px rgba(60, 45, 25, 0.45);
}
.pbc-film__nbook > .pbc-film__ssub { margin-bottom: 8px; }
.pbc-film__nbook > .pbc-film__legend { margin-top: 14px; }
.pbc-film__nrow { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(214, 202, 182, 0.8); }
.pbc-film__nlab { font-family: var(--font-display); font-size: 17px; line-height: 1.25; color: var(--p-ink); }
.pbc-film__nlab small { display: block; margin-top: 2px; font-family: var(--font-sans); font-size: 13px; font-style: italic; color: var(--p-ink3); }
.pbc-film__strack { position: relative; height: 56px; margin: 0 16px; }
.pbc-film__strack::before { content: ""; position: absolute; left: -10px; right: -10px; top: 50%; height: 1.5px; background: #C9BFAE; }
.pbc-film__sdot { position: absolute; top: 50%; left: 0; width: 0; height: 0; }
.pbc-film__sdot i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 3px var(--p-paper); }
.pbc-film__sdot b { position: absolute; left: 0; transform: translateX(-50%); font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; line-height: 1; white-space: nowrap; }
.pbc-film__sdot.is-pub i { background: var(--c-pub); }
.pbc-film__sdot.is-plain i { background: var(--c-plain); }
.pbc-film__sdot.is-skill i { background: var(--c-skill); }
.pbc-film__sdot.is-pub b, .pbc-film__sdot.is-plain b { top: 13px; color: var(--p-ink3); }
.pbc-film__sdot.is-skill b { bottom: 13px; color: var(--p-blue); font-weight: 600; }
.pbc-film__sdot.is-up b { top: auto; bottom: 13px; }
.pbc-film__sdot.is-skill { opacity: 0; }

/* ---- advanced usage: one prompt, one run, one typeset paper ---- */
.pbc-film__prompt, .pbc-film__runlog { width: 560px; }
.pbc-film__ptext { min-height: 3.2em; margin: 14px 0 2px; font-family: var(--font-mono); font-size: 15px; line-height: 1.6; color: var(--p-ink); }
.pbc-film__pcaret { display: inline-block; width: 8px; height: 1.05em; margin-left: 2px; vertical-align: -0.18em; background: var(--p-blue); }
.pbc-film__steps { margin: 8px 0 0; padding: 0; list-style: none; }
.pbc-film__steps li {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 5px 0;
  border-bottom: 1px dotted #DCD1BF; font-size: 16px; line-height: 1.3; color: var(--p-ink3);
}
.pbc-film__steps li.is-now { color: var(--p-blue); }
.pbc-film__steps li.is-done { color: var(--p-ink); }
.pbc-film__steps code { font-family: var(--font-mono); font-size: 12.5px; color: var(--p-ink3); }
.pbc-film__tick { width: 18px; height: 18px; overflow: visible; }
.pbc-film__tick rect { fill: var(--p-paper); stroke: #C9BFAE; stroke-width: 1.4; }
.pbc-film__tick path { fill: none; stroke: var(--p-red); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.pbc-film__runbar { position: relative; height: 6px; margin-top: 14px; overflow: hidden; border-radius: 3px; background: #EFE7D8; }
.pbc-film__runbar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--p-blue); }
.pbc-film__pg, .pbc-film__pgbig { overflow: hidden; background: #FFFFFF; border: 1px solid var(--p-edge); }
.pbc-film__pg { width: 100px; height: 129.43px; box-shadow: 0 6px 12px -10px rgba(60, 45, 25, 0.45); }
.pbc-film__pgbig { width: 300px; height: 388.3px; transform-origin: 0 0; box-shadow: 0 2px 0 rgba(60, 45, 25, 0.04), 0 22px 34px -18px rgba(60, 45, 25, 0.55); }
.pbc-film__pg img, .pbc-film__pgbig img { display: block; width: 100%; height: 100%; }
.pbc-film__stamp {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 14px 8px;
  border: 2.5px solid rgba(184, 50, 42, 0.85); border-radius: 4px; box-shadow: inset 0 0 0 2px var(--p-paper), inset 0 0 0 3px rgba(184, 50, 42, 0.5);
  background: rgba(255, 253, 247, 0.86); color: var(--p-red);
  font-family: var(--font-mono); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; transform-origin: 50% 50%;
}
.pbc-film__stamp b { font-size: 19px; font-weight: 700; }
.pbc-film__stamp span { font-size: 13px; }
.pbc-film__runsum { font-family: var(--font-mono); font-size: 15px; color: var(--p-ink2); white-space: nowrap; }

/* ---- controls ---- */
.pbc-film__bar { display: flex; align-items: flex-start; gap: 14px; margin-top: 12px; }
.pbc-film__play {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 13px 0 11px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.pbc-film__play:hover { border-color: var(--ink-3); }
.pbc-film__play.is-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pbc-film__play svg { width: 10px; height: 10px; flex: none; fill: currentColor; }
.pbc-film__segs { flex: 1 1 auto; min-width: 0; display: flex; gap: 4px; touch-action: none; user-select: none; -webkit-user-select: none; }
.pbc-film__seg {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px 0 4px;
  margin: 0;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.pbc-film__track { position: relative; display: block; height: 3px; border-radius: 2px; background: var(--rule); overflow: hidden; }
.pbc-film__fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ink-3); }
.pbc-film__seg.is-current .pbc-film__fill { background: var(--accent); }
.pbc-film__seglabel {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--ink-3);
}
.pbc-film__seg.is-current .pbc-film__seglabel { color: var(--accent-ink); font-weight: 500; }
.pbc-film__seg:hover .pbc-film__seglabel { color: var(--ink); }
.pbc-film__seg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.pbc-film__time { flex: none; padding-top: 7px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pbc-film__now { display: none; }

/* narrow films: a 4:5 window on half of the sheet (film.js pans it), and the chapter name replaces the segment labels */
@container pbcfilm (max-width: 700px) {
  .pbc-film__stage { aspect-ratio: 4 / 5; }
  .pbc-film__hl { width: 560px; }
  .pbc-film__headline { font-size: 42px; line-height: 1.26; }
  .pbc-film__bar { flex-wrap: wrap; gap: 8px 12px; }
  .pbc-film__segs { order: 3; flex-basis: 100%; }
  .pbc-film__seg { padding: 6px 0; }
  .pbc-film__seglabel { display: none; }
  .pbc-film__now { display: block; flex: 1 1 0; min-width: 0; padding-top: 7px; font-family: var(--font-mono); font-size: 12px; color: var(--accent-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
