/* labs.css · the hands-on labs. Each face sets its labs in its own material:
   Ink as mounted album leaves, Ma on a tatami grid with gold, Form as Byrne plates, Light in the projection room. */
.lab { max-width: 1240px; margin: 0 auto; padding: 120px clamp(18px, 4vw, 56px) 0; }
.lh { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 clamp(18px, 3vw, 40px); align-items: start; margin-bottom: 38px; max-width: 980px; }
.lh-mark { line-height: 1; }
.lh-k { font-family: var(--f-ui); font-size: 13.5px; color: var(--dim); margin: 0 0 10px; }
.lh h2 { font-family: var(--f-disp); font-size: clamp(30px, 3.6vw, 48px); line-height: 1.1; margin: 0 0 14px; }
.lh-p { font-size: 17px; line-height: 1.62; max-width: 42rem; margin: 0; }
.lb-note { max-width: 46rem; font-size: 15px; line-height: 1.62; color: var(--dim); margin-top: 28px; }
.lb-note p { margin: 0 0 .8em; }
.lb-txt { font-size: 15.5px; line-height: 1.62; }
.lrange { display: grid; gap: 8px; font-family: var(--f-ui); font-size: 13.5px; color: var(--dim); }
.lab input[type=range] { width: 100%; accent-color: var(--acc); }
.lab dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 15.5px; line-height: 1.55; }
.lab dt { color: var(--dim); font-size: 13px; padding-top: 3px; }
.lab dd { margin: 0; }
.lab h3 { font-family: var(--f-disp); font-size: 24px; line-height: 1.2; margin: 0 0 10px; }

/* ================================================================ Ink: album leaves */
.lab-cn .lh-mark { font-family: "Ma Shan Zheng", serif; font-size: 58px; writing-mode: vertical-rl; letter-spacing: .08em; padding: 6px 12px; border-right: 1px solid var(--rule); color: var(--fg); }
.lab-cn .lh h2 { font-family: "Alegreya", "Ma Shan Zheng", serif; font-weight: 400; }
html[lang="zh-CN"] .lab-cn .lh h2 { font-family: "Ma Shan Zheng", serif; }
.lab-cn .lh-k { font-family: "Alegreya", "LXGW WenKai", serif; letter-spacing: .02em; }
/* the mounting: silk border, a pale inner rule, the picture */
.silk { padding: clamp(12px, 1.6vw, 20px); background: var(--silk, color-mix(in srgb, var(--acc) 9%, var(--card))); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 10%, transparent), 0 10px 30px -18px rgba(0, 0, 0, .35); }
.silk > .plate { box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 14%, transparent); }
.lb-cn { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(26px, 4vw, 60px); align-items: start; }
.lb-leaf .lb-bamboo { aspect-ratio: 3 / 4; }
.leaf-cap { font-size: 14px; color: var(--dim); margin-top: 12px; text-align: center; }
.laws ol { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--rule); direction: rtl; }
.laws li { border-left: 1px solid var(--rule); direction: ltr; }
.laws li:last-child { border-left: 0; }
.laws li button { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 12px; transition: background-color .3s; }
.laws li button:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.lw-n { font-family: "Ma Shan Zheng", serif; font-size: 15px; color: var(--dim); }
.lw-o { font-family: "Ma Shan Zheng", serif; font-size: 25px; writing-mode: vertical-rl; letter-spacing: .1em; line-height: 1.05; min-height: 4.6em; }
.lw-e { font-size: 11.5px; line-height: 1.25; color: var(--dim); text-align: center; min-height: 3.75em; }
.laws button.done .lw-o { color: var(--dim); }
.laws button.on { background: color-mix(in srgb, var(--acc) 12%, transparent); }
.laws button.on .lw-n { color: var(--seal); }
.law-out { margin-top: 24px; min-height: 12em; }
.law-out p { font-size: 16.5px; line-height: 1.66; }
.look { border-left: 2px solid var(--seal); padding-left: 14px; color: var(--dim); font-size: 15.5px !important; }
.look b { display: block; font-size: 15px; color: var(--seal); }
@media (max-width: 860px) { .lb-cn { grid-template-columns: 1fr; } .lb-leaf { max-width: 420px; } }

/* three distances */
.dist-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--rule); margin-bottom: 30px; flex-wrap: wrap; }
.dist-tabs button { display: grid; gap: 2px; padding: 10px 26px 14px 0; margin-right: 26px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dist-tabs button[aria-pressed="true"] { border-bottom-color: var(--fg); }
.dt-o { font-family: "Ma Shan Zheng", serif; font-size: 34px; line-height: 1.1; }
.dt-e { font-size: 13.5px; color: var(--dim); }
.dist-stage { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(26px, 4vw, 60px); align-items: center; }
.dist-fmt { margin: 0 auto; transition: width .7s var(--ease), aspect-ratio .7s var(--ease); padding: clamp(10px, 1.4vw, 18px); background: var(--silk, color-mix(in srgb, var(--acc) 9%, var(--card))); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 10%, transparent); }
.dist-fmt .plate { width: 100%; height: 100%; }
.dist-fmt[data-fmt="high"] { width: min(360px, 100%); aspect-ratio: 9 / 16; }
.dist-fmt[data-fmt="all"] { width: min(330px, 100%); aspect-ratio: 9 / 19; }
.dist-fmt[data-fmt="deep"] { width: min(560px, 100%); aspect-ratio: 1 / 1; }
.dist-fmt[data-fmt="level"] { width: 100%; aspect-ratio: 3 / 1; }
.dist-txt .guo { font-family: "Ma Shan Zheng", serif; font-size: 28px; line-height: 1.5; letter-spacing: .06em; }
.dist-txt .tr { font-size: 17px; line-height: 1.6; }
.dist-txt .mood { font-size: 15px; line-height: 1.6; color: var(--dim); }
@media (max-width: 860px) { .dist-stage { grid-template-columns: 1fr; } }

/* the twenty-four moods: an album */
.leaves { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.lv { display: grid; gap: 2px; text-align: left; padding: 8px 8px 10px; background: color-mix(in srgb, var(--silk, var(--card)) 55%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 9%, transparent); transition: transform .4s var(--ease), box-shadow .3s; }
.lv:hover { transform: translateY(-3px); }
.lv.on { box-shadow: inset 0 0 0 2px var(--fg); }
.lv-p { display: block; aspect-ratio: 1 / 1; margin-bottom: 8px; }
.lv-o { font-family: "Ma Shan Zheng", serif; font-size: 24px; line-height: 1.1; }
.lv-e { font-size: 12.5px; color: var(--dim); line-height: 1.3; }
.lv-open { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(26px, 4vw, 60px); margin-top: 34px; padding: 30px; background: var(--card); border: 1px solid var(--rule); position: relative; }
.lv-open[hidden] { display: none; }
.lv-big { padding: 16px; background: var(--silk, color-mix(in srgb, var(--acc) 9%, var(--card))); }
.lvb-p { aspect-ratio: 1 / 1; }
.lv-no { font-size: 13px; color: var(--dim); margin-bottom: 8px; }
.lv-txt h3 span { font-family: "Ma Shan Zheng", serif; font-size: 44px; margin-right: 16px; vertical-align: -6px; }
.lv-line { font-family: "Ma Shan Zheng", serif; font-size: 27px; line-height: 1.5; letter-spacing: .06em; margin: 18px 0 10px; }
.lv-mood { color: var(--dim); font-size: 15.5px; }
.lv-x { position: absolute; top: 14px; right: 16px; font-size: 13px; color: var(--dim); padding: 4px 12px; border: 1px solid var(--rule); border-radius: 999px; }
.lv-x:hover { color: var(--fg); border-color: var(--fg); }
@media (max-width: 760px) { .lv-open { grid-template-columns: 1fr; padding: 22px; } }

/* three realms */
.realms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 40px); }
.rm-p { aspect-ratio: 4 / 5; margin-bottom: 18px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 12%, transparent); }
.rm-n { font-size: 13px; letter-spacing: .08em; color: var(--seal); margin-bottom: 6px; }
.rm-l, .pm-l { font-family: "Ma Shan Zheng", serif; font-size: 23px; line-height: 1.55; letter-spacing: .04em; margin-bottom: 6px; }
.pm-p { font-size: 13.5px; color: var(--dim); margin-bottom: 8px; }
.pm-t { font-size: 15.5px; line-height: 1.6; }
.rm-s { font-size: 15px; line-height: 1.6; color: var(--dim); border-top: 1px solid var(--rule); padding-top: 10px; }
.self { margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--rule); }
.self-sw { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; margin-bottom: 26px; }
.self-sw button { padding: 6px 18px 7px; border-radius: 999px; font-family: "Ma Shan Zheng", "Alegreya", serif; font-size: 18px; color: var(--dim); }
.self-sw button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.self-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 3vw, 40px); }
.self-out .pm { padding: 22px 24px; background: var(--card); border: 1px solid var(--rule); }
@media (max-width: 860px) { .realms, .self-out { grid-template-columns: 1fr; } }

/* ================================================================ Form: Byrne's plates */
.lab-west .lh-mark { font-family: "Cinzel", serif; font-size: 30px; min-width: 64px; height: 64px; display: grid; place-items: center; background: var(--red); color: #fff; padding: 0 10px; }
.lab-west .lh h2 { font-family: "Cinzel", "Noto Serif SC", serif; letter-spacing: .02em; }
html[lang="zh-CN"] .lab-west .lh h2 { font-family: "Noto Serif SC", serif; font-weight: 900; letter-spacing: 0; }
.lab-west .lh-k { font-family: "Cinzel", "Noto Serif SC", serif; font-size: 12.5px; letter-spacing: .12em; color: var(--red); }
.plate-frame { position: relative; border: 1px solid var(--fg); padding: 8px; background: var(--card); }
.plate-frame > .plate { aspect-ratio: 4 / 3; }
.pf-wide > .plate { aspect-ratio: 16 / 9; }
.pf-tall > .plate { aspect-ratio: 4 / 5; }
.lb-west { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(26px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .lb-west { grid-template-columns: 1fr; } }
.c-red { --c: var(--red); --on: #fff; } .c-yellow { --c: var(--yel); --on: #111; } .c-blue { --c: var(--blu); --on: #fff; } .c-ink { --c: var(--fg); --on: var(--bg); }
/* monochord */
.mono .plate-frame > .plate { aspect-ratio: 2 / 1; }
.ratios { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-bottom: 22px; }
.ratios button { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--fg); text-align: left; transition: background-color .2s, color .2s; }
.ratios b { font-family: "Cinzel", serif; font-size: 20px; font-weight: 400; }
.ratios span { font-size: 12.5px; color: var(--dim); }
.ratios button[aria-pressed="true"], .ratios button:hover { background: var(--c); color: var(--on); }
.ratios button[aria-pressed="true"] span, .ratios button:hover span { color: inherit; opacity: .85; }
.mono-read { margin: 20px 0 16px; font-size: 16px; line-height: 1.55; min-height: 4.8em; }
.mono-read b { font-family: "Cinzel", serif; font-size: 34px; font-weight: 400; margin-right: 8px; }
.mono-read span { display: block; color: var(--dim); font-size: 14.5px; }
/* perspective */
.persp { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.vp { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 25%, transparent); cursor: grab; touch-action: none; transition: box-shadow .2s; }
.vp:hover, .vp.drag { box-shadow: 0 0 0 9px color-mix(in srgb, var(--red) 22%, transparent); }
.vp.drag { cursor: grabbing; }
.persp-side { display: grid; gap: 22px; }
@media (max-width: 860px) { .persp { grid-template-columns: 1fr; } }
/* ladder */
.lad { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.rungs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 2px solid var(--fg); }
.rungs button { display: grid; grid-template-columns: 44px 1fr; gap: 14px; width: 100%; padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: baseline; transition: background-color .3s; }
.rg-n { font-family: "Cinzel", "Noto Serif SC", serif; font-size: 22px; text-align: center; color: var(--dim); }
.rb { display: grid; gap: 4px; }
.rb b { font-size: 17.5px; }
.rb > span { font-size: 14.5px; line-height: 1.55; color: var(--dim); max-height: 0; overflow: hidden; transition: max-height .5s var(--ease); }
.rungs button.on { background: color-mix(in srgb, var(--yel) 22%, transparent); }
.rungs button.on .rg-n { color: var(--red); }
.rungs button.on .rb > span { max-height: 12em; }
.rungs button.below .rg-n { color: var(--fg); }
/* kant */
.kant { grid-template-columns: 1fr; }
.kj { border: 1px solid var(--fg); padding: clamp(20px, 3vw, 34px); background: var(--card); }
.kj-n { font-family: "Cinzel", serif; font-size: 12.5px; letter-spacing: .12em; color: var(--dim); }
.kj-s { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.35; margin: 4px 0 24px; }
.kj-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kj-opts button { display: grid; grid-template-rows: auto auto 1fr; gap: 6px; padding: 14px 14px 16px; border: 1px solid var(--rule); text-align: left; transition: border-color .2s, transform .3s var(--ease); }
.kj-opts button:hover { border-color: var(--fg); transform: translateY(-2px); }
.kj-opts i { width: 22px; height: 22px; background: var(--c); }
.kj-opts b { font-size: 16.5px; }
.kj-opts span { font-size: 13.5px; line-height: 1.5; color: var(--dim); }
.kj-opts button.right { border-color: var(--fg); box-shadow: inset 0 0 0 2px var(--fg); }
.kj-opts button.right b::after { content: "  \2713"; }
.kj-opts button.wrong { opacity: .55; }
.kj-opts button.wrong b::after { content: "  \2715"; }
.kj-why { margin-top: 18px; font-size: 16px; line-height: 1.6; min-height: 3.2em; }
.kj-foot { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--dim); }
@media (max-width: 860px) { .kj-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.moments { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 46px; border-top: 2px solid var(--fg); }
.mo { padding: 20px 18px 6px 0; border-right: 1px solid var(--rule); padding-left: 18px; }
.mo:first-child { padding-left: 0; } .mo:last-child { border-right: 0; }
.mo-n { display: inline-block; font-family: "Cinzel", serif; font-size: 12px; letter-spacing: .1em; padding: 3px 8px; background: var(--c); color: var(--on); margin-bottom: 12px; }
.mo h3 { font-family: "Libre Caslon Text", "Noto Serif SC", serif; font-size: 18px; font-weight: 700; }
.mo-c { font-size: 15px; line-height: 1.55; }
.mo p:last-child { font-size: 14px; color: var(--dim); line-height: 1.55; }
@media (max-width: 860px) { .moments { grid-template-columns: 1fr 1fr; } .mo { padding-left: 0 !important; border-right: 0; } }
/* burke */
.brk { grid-template-columns: 1fr; }
.brk-bar { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; font-family: "Cinzel", "Noto Serif SC", serif; font-size: 15px; letter-spacing: .06em; }
.brk-table { --k: 0; border-top: 2px solid var(--fg); }
.br-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 4fr); gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 15px; line-height: 1.5; }
.br-row .q { font-family: "Cinzel", "Noto Serif SC", serif; font-size: 13px; letter-spacing: .08em; color: var(--dim); padding-top: 2px; }
.br-row .bv { opacity: calc(1 - var(--k) * .75); transition: opacity .2s; }
.br-row .sv { opacity: calc(.25 + var(--k) * .75); transition: opacity .2s; }
.brk-table.sub .sv { font-weight: 700; }
.brk-table:not(.sub) .bv { font-weight: 700; }
.ks { margin-top: 40px; }
.ks h3 { font-family: "Cinzel", "Noto Serif SC", serif; font-size: 20px; }
.ks-row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.ks h4 { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
.ks p { font-size: 15px; line-height: 1.6; }
.ks-ex { color: var(--dim); }
.lb-real { margin: 30px 0 0; display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: end; }
.lr-img { display: block; border: 1px solid var(--fg); padding: 6px; background: var(--card); }
.lb-real figcaption { font-size: 13.5px; color: var(--dim); }
@media (max-width: 760px) { .br-row { grid-template-columns: 1fr 1fr; } .br-row .q { grid-column: 1 / -1; } .ks-row { grid-template-columns: 1fr; } }

/* ================================================================ Light: the projection room */
.lab-film .lh-mark { font-family: "Courier Prime", monospace; font-size: 30px; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--fg); position: relative; }
.lab-film .lh-mark::before, .lab-film .lh-mark::after { content: ""; position: absolute; background: var(--fg); opacity: .5; }
.lab-film .lh-mark::before { left: 50%; top: -10px; bottom: -10px; width: 1px; }
.lab-film .lh-mark::after { top: 50%; left: -10px; right: -10px; height: 1px; }
.lab-film .lh h2 { font-family: "Jost", var(--sys-zh); font-weight: 300; letter-spacing: .01em; }
.lab-film .lh-k { font-family: "Courier Prime", monospace; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--acc); }
.gate { position: relative; background: #000; border-radius: 6px / 8px; overflow: hidden; box-shadow: 0 0 0 10px #050505, 0 0 0 11px var(--rule); }
[data-theme="light"] .gate { box-shadow: 0 0 0 10px #1a1a1a, 0 0 0 11px var(--rule); }
.gate > .plate { position: absolute !important; inset: 0; }
.gate.g43 { aspect-ratio: 4 / 3; } .gate.g169 { aspect-ratio: 16 / 9; }
.slate { position: absolute; left: 14px; bottom: 10px; font-family: "Courier Prime", monospace; font-size: 12.5px; color: rgba(255, 255, 255, .7); letter-spacing: .08em; white-space: pre; }
/* shot scale */
.lb-film.scl { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); grid-template-rows: auto auto; gap: 30px clamp(26px, 4vw, 56px); }
.scl .gate { aspect-ratio: 1.85 / 1; grid-row: 1; }
.sc-bar { grid-column: 1; }
.sc-out { grid-column: 2; grid-row: 1 / span 2; }
.sc-ticks { display: flex; justify-content: space-between; margin-top: 6px; }
.sc-ticks button { font-family: "Courier Prime", monospace; font-size: 12.5px; color: var(--dim); padding: 2px 4px; }
.sc-ticks button[aria-pressed="true"] { color: var(--acc); }
@media (max-width: 860px) { .lb-film.scl { grid-template-columns: 1fr; } .sc-out { grid-column: 1; grid-row: auto; } }
/* kuleshov */
.ku-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 22px; align-items: center; }
.ku-pair figure { margin: 0; }
.ku-pair figcaption { font-family: "Courier Prime", monospace; font-size: 12.5px; color: var(--dim); margin-top: 18px; letter-spacing: .04em; }
.ku-cut { font-family: "Courier Prime", monospace; font-size: 34px; color: var(--acc); }
.ku-pair.run figure:first-child .gate { animation: kuA 2.4s var(--ease) both; }
.ku-pair.run figure:last-child .gate { animation: kuB 2.4s var(--ease) both; }
@keyframes kuA { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 1; } }
@keyframes kuB { 0%, 46% { opacity: .15; } 50% { opacity: 1; } 100% { opacity: 1; } }
.ku-pick { display: flex; gap: 8px; flex-wrap: wrap; margin: 30px 0 18px; }
.ku-pick button { padding: 8px 16px 9px; border: 1px solid var(--rule); border-radius: 999px; font-size: 15px; }
.ku-pick button[aria-pressed="true"] { border-color: var(--acc); color: var(--acc); }
.ku-out { display: grid; gap: 4px; min-height: 4em; }
.ku-k { font-family: "Courier Prime", monospace; font-size: 12.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.ku-r { font-size: clamp(20px, 2.2vw, 26px); font-weight: 300; line-height: 1.35; }
@media (max-width: 700px) { .ku-pair { grid-template-columns: 1fr; } .ku-cut { display: none; } }
/* montage */
.lb-film.mt { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(26px, 4vw, 56px); align-items: start; }
.mt-row { margin-bottom: 18px; }
.mt-name { font-size: 16px; margin-bottom: 8px; color: var(--dim); }
.mt-row.cur .mt-name, .mt-name:hover { color: var(--acc); }
.mt-strip { position: relative; display: flex; gap: 2px; height: 48px; padding: 10px 0; background: #121212; border-radius: 2px;
  background-image: radial-gradient(ellipse 3px 2.4px at 50% 50%, var(--bg) 95%, transparent 100%), radial-gradient(ellipse 3px 2.4px at 50% 50%, var(--bg) 95%, transparent 100%);
  background-size: 12px 8px, 12px 8px; background-position: 0 1px, 0 calc(100% - 1px); background-repeat: repeat-x; }
[data-theme="light"] .mt-strip { background-color: #C8692A; }
.mt-strip i { position: relative; background: #3a3a38; transition: background-color .15s; min-width: 2px; }
.mt-strip i:first-child { margin-left: 4px; } .mt-strip i:last-of-type { margin-right: 4px; }
.mt-strip i span { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); font-family: "Courier Prime", monospace; font-size: 10px; color: rgba(255, 255, 255, .45); }
.mt-strip i.on { background: #f3eee2; }
.mt-strip i.on span { color: #111; }
.mt-head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--acc2); left: 0; pointer-events: none; }
.mt-screen { position: relative; aspect-ratio: 1.37 / 1; background: #0b0b0b; border-radius: 6px / 8px; display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 1px var(--rule); }
.mt-shot { font-family: "Jost", sans-serif; font-weight: 300; font-size: 84px; color: #e9e5da; line-height: 1; }
.mt-tc { position: absolute; left: 12px; bottom: 9px; font-family: "Courier Prime", monospace; font-size: 12px; color: rgba(255, 255, 255, .55); }
.mt-screen.cut { animation: cut .32s ease-out; }
@keyframes cut { 0% { background: #f6f1e4; } 100% { background: #0b0b0b; } }
.mt-out { margin-top: 22px; font-size: 15.5px; line-height: 1.6; }
.mt-ex { color: var(--dim); }
@media (max-width: 860px) { .lb-film.mt { grid-template-columns: 1fr; } }
/* take vs cut */
.lb-film.tvc { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px, 4vw, 56px); }
.tvc figure { margin: 0; }
.tvc canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tvc figcaption { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 0 8px; }
.tvc figcaption b { font-weight: 400; font-size: 19px; }
.tv-tc { font-family: "Courier Prime", monospace; font-size: 12.5px; color: var(--dim); }
.tvc figure p { font-size: 15px; line-height: 1.6; }
.tv-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 2; }
.tv-flash.on { animation: flash .25s ease-out; }
@keyframes flash { 0% { opacity: .5; } 100% { opacity: 0; } }
.tv-ctl { margin-top: 10px; }
@media (max-width: 760px) { .lb-film.tvc { grid-template-columns: 1fr; } }
/* ratios */
.rt-stage { height: clamp(220px, 34vw, 430px); display: grid; place-items: center; background: #050505; border-radius: 4px; overflow: hidden; }
[data-theme="light"] .rt-stage { background: #1a1a1a; }
.rt-gate { --r: 1.37; height: 86%; aspect-ratio: var(--r); max-width: 96%; position: relative; transition: aspect-ratio .6s var(--ease); background: #000; }
.rt-gate .plate { position: absolute !important; inset: 0; }
.rt-pick { display: flex; gap: 6px; flex-wrap: wrap; margin: 22px 0 14px; }
.rt-pick button { display: grid; justify-items: center; gap: 6px; padding: 10px 12px; border: 1px solid var(--rule); min-width: 74px; }
.rt-pick i { display: block; height: 20px; border: 1px solid var(--dim); }
.rt-pick span { font-family: "Courier Prime", monospace; font-size: 12px; color: var(--dim); }
.rt-pick button[aria-pressed="true"] { border-color: var(--acc); }
.rt-pick button[aria-pressed="true"] i { background: var(--acc); border-color: var(--acc); }
.rt-y { font-family: "Courier Prime", monospace; font-size: 13px; color: var(--dim); }
.rt-out { max-width: 42rem; font-size: 15.5px; line-height: 1.6; }
/* average shot length */
.lb-film.asl { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(26px, 4vw, 56px); align-items: start; }
.asl-row { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; width: 100%; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.asl-p { font-family: "Courier Prime", monospace; font-size: 13px; color: var(--dim); }
.asl-tr { position: relative; height: 26px; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), var(--rule) calc(10% - 1px) 10%); }
.asl-band { position: absolute; top: 3px; bottom: 3px; background: color-mix(in srgb, var(--acc) 70%, transparent); display: flex; align-items: center; min-width: 2px; transition: background-color .2s; }
.asl-band span { position: absolute; left: calc(100% + 8px); white-space: nowrap; font-family: "Courier Prime", monospace; font-size: 12px; color: var(--fg); }
.asl-row:hover .asl-band, .asl-row.cur .asl-band { background: var(--acc); }
.asl-row.cur .asl-p { color: var(--acc); }
.asl-scale { display: flex; justify-content: space-between; margin-left: 124px; font-family: "Courier Prime", monospace; font-size: 12px; color: var(--dim); padding-top: 6px; }
.asl-screen { aspect-ratio: 1.85 / 1; background: #0b0b0b; border-radius: 6px / 8px; display: grid; place-items: center; align-content: center; gap: 4px; box-shadow: 0 0 0 1px var(--rule); }
.asl-screen.cut { animation: cut .3s ease-out; }
.asl-n { font-family: "Jost", sans-serif; font-weight: 300; font-size: 64px; color: #e9e5da; line-height: 1; }
.asl-l { font-family: "Courier Prime", monospace; font-size: 12px; color: rgba(255, 255, 255, .55); }
.asl-out { margin-top: 20px; font-size: 15.5px; line-height: 1.6; }
@media (max-width: 860px) { .lb-film.asl { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .mt-screen.cut, .asl-screen.cut, .tv-flash.on, .ku-pair.run .gate { animation: none !important; } }

/* ================================================================ Ma: tatami, gold leaf and the interval */
.lab-jp .lh { grid-template-columns: 1fr; max-width: 860px; margin-left: clamp(0px, 8vw, 120px); }
.lab-jp .lh-mark { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-weight: 900; font-size: 30px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--fg); margin-bottom: 22px; }
.lab-jp .lh h2 { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-weight: 700; }
.lab-jp .lh-k { letter-spacing: .04em; }
.lab-jp .lh-k::before { content: ""; display: inline-block; width: 26px; height: 2px; background: var(--gold); vertical-align: middle; margin-right: 12px; }
.lb-jp { position: relative; }
/* the print lab */
.lb-jp.wb { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(26px, 5vw, 80px); align-items: start; }
.wb-sheet { position: relative; background: var(--card); padding: clamp(14px, 2vw, 26px); box-shadow: 0 1px 0 var(--rule), 0 20px 50px rgba(0, 0, 0, .08); }
.wb-p { aspect-ratio: 2 / 3; }
.wb-kento { position: absolute; left: clamp(14px, 2vw, 26px); bottom: 6px; width: 34px; height: 6px; border-left: 2px solid var(--dim); border-bottom: 2px solid var(--dim); opacity: .5; }
.blocks { list-style: none; margin: 0 0 20px; padding: 0; border-top: 2px solid var(--fg); }
.blocks li { border-bottom: 1px solid var(--rule); }
.blocks button { width: 100%; display: grid; grid-template-columns: 30px 64px 1fr; gap: 10px; align-items: baseline; padding: 9px 8px; transition: background-color .3s; }
.wbk-k { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-size: 14px; color: var(--dim); }
.wbk-o { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-weight: 700; font-size: 18px; }
.wbk-n { font-size: 14.5px; line-height: 1.3; }
.blocks button:hover { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.blocks button.done .wbk-o, .blocks button.done .wbk-n { color: var(--dim); }
.blocks button.on { background: color-mix(in srgb, var(--gold) 22%, transparent); }
.blocks button.on .wbk-k { color: var(--acc2); }
.wb-step { font-size: 13px; color: var(--dim); margin: 0 0 4px; }
.wb-orig { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-size: 14.5px; color: var(--acc); margin: -4px 0 10px; }
.wb-out { margin-top: 22px; font-size: 16px; line-height: 1.7; }
.wb-out h3 span, .shd-out h3 span { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-weight: 900; margin-right: 12px; }
@media (max-width: 860px) { .lb-jp.wb { grid-template-columns: 1fr; } .wb-sheet { max-width: 440px; } }
/* Ryōan-ji */
.ry-view { background: var(--card); padding: 10px; box-shadow: 0 1px 0 var(--rule); }
.ry-p { aspect-ratio: 9 / 4; }
.ry-ctl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 18px 0; }
.ry-count { margin: 0; font-size: 15px; color: var(--dim); white-space: nowrap; }
.ry-count b { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-weight: 900; font-size: 34px; color: var(--fg); margin-right: 4px; }
.ry-plan { position: relative; max-width: 760px; margin-left: auto; }
.ry-pp { aspect-ratio: 25 / 11.6; }
.ry-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ry-svg line { stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.ry-svg line.see { stroke: var(--acc); stroke-opacity: .55; }
.ry-svg line.hid { stroke: var(--acc2); stroke-dasharray: 3 4; stroke-opacity: .9; }
.ry-svg .hidc { fill: none; stroke: var(--acc2); stroke-width: 2; vector-effect: non-scaling-stroke; }
.ry-svg .eye { fill: var(--acc2); }
.ry-txt { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px clamp(26px, 4vw, 56px); margin-top: 34px; font-size: 15.5px; line-height: 1.7; }
/* Kuki's prism */
.lb-jp.ik { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(26px, 5vw, 70px); align-items: center; }
.ik-stage { position: relative; aspect-ratio: 1 / 1; max-width: 560px; background: radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 64%); }
.ik-svg { width: 100%; height: 100%; cursor: grab; touch-action: none; user-select: none; }
.ik-svg line.fr { stroke: var(--fg); stroke-width: 1.4; }
.ik-svg line.bk { stroke: var(--fg); stroke-width: 1; stroke-opacity: .3; stroke-dasharray: 3 4; }
.vx { cursor: pointer; outline: none; }
.vx circle { fill: var(--bg); stroke: var(--fg); stroke-width: 1.5; }
.vx text { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-weight: 700; font-size: 17px; fill: var(--fg); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
.vx.on circle, .vx:hover circle, .vx:focus-visible circle { fill: var(--acc2); stroke: var(--acc2); }
.vx.on text { fill: var(--acc2); }
.ik-hint { position: absolute; bottom: 4px; left: 0; font-size: 12.5px; color: var(--faint); margin: 0; }
.ik-out .io { font-size: 15px; color: var(--dim); margin-bottom: 4px; }
.ik-out .io span { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-weight: 900; font-size: 52px; color: var(--fg); margin-right: 14px; vertical-align: -10px; }
.ik-out p, .ik-axes p { font-size: 15.5px; line-height: 1.7; }
.ik-axes { border-top: 1px solid var(--rule); padding-top: 14px; margin-top: 16px; color: var(--dim); }
.ik-mo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 40px; border-top: 2px solid var(--fg); }
.ik-mo article { padding: 20px 20px 4px 0; border-right: 1px solid var(--rule); margin-right: 20px; }
.ik-mo article:last-child { border-right: 0; margin-right: 0; }
.im-o { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-weight: 900; font-size: 30px; margin-right: 10px; }
.im-r { font-size: 13px; color: var(--dim); }
.ik-mo h3 { font-size: 18px; margin: 6px 0; }
.ik-mo p { font-size: 14.5px; line-height: 1.65; }
.ik-in { margin-top: 34px; font-size: 15px; line-height: 1.65; }
.ik-in ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 30px; }
.ik-in li b { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-weight: 900; font-size: 19px; }
.ik-in li span { display: block; color: var(--dim); font-size: 14px; }
@media (max-width: 860px) { .lb-jp.ik { grid-template-columns: 1fr; } .ik-mo { grid-template-columns: 1fr; } .ik-mo article { border-right: 0; margin-right: 0; } }
/* Tanizaki */
.sh-lab { --lv: 1; }
.shd-stage { background: #0b0908; padding: 10px; }
.shd-p { aspect-ratio: 16 / 7; }
.shd-bar { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; margin: 18px 0; font-size: 14px; color: var(--dim); }
.shd-bar input { accent-color: var(--gold); }
.shd-things { display: flex; flex-wrap: wrap; gap: 6px; }
.shd-things button { padding: 6px 15px 7px; border: 1px solid var(--rule); border-radius: 2px; font-size: 14.5px; }
.shd-things button[aria-pressed="true"] { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, transparent); }
.shd-out { max-width: 44rem; margin-top: 18px; font-size: 16px; line-height: 1.75; }
/* the haiku cut */
.lb-jp.hk { --gap: .35; }
.hk-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; }
.hk-pick button { padding: 5px 14px 6px; border: 1px solid var(--rule); font-size: 14px; }
.hk-pick button[aria-pressed="true"] { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.hk-stage { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(30px, 6vw, 100px); align-items: start; padding: 40px clamp(10px, 4vw, 60px); background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); min-height: 420px; }
.hk-poem { writing-mode: vertical-rl; font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-weight: 700; font-size: clamp(26px, 2.7vw, 36px); line-height: 1.5; letter-spacing: .12em; display: block; height: max-content; justify-self: center; white-space: nowrap; }
.hk-ma { display: inline-block; inline-size: calc(var(--gap) * 6em); block-size: 1em; transition: inline-size .25s var(--ease); position: relative; vertical-align: top; }
.hk-ma::after { content: ""; position: absolute; left: 50%; top: 22%; bottom: 22%; width: 1px; background: var(--gold); opacity: calc(var(--gap) * 1.4); }
.hk-poem .hk-kj { color: var(--acc2); font-weight: 900; }
.hk-read { max-width: 30rem; }
.hk-ro { font-size: 15px; color: var(--dim); letter-spacing: .02em; }
.hk-tr { font-size: 19px; line-height: 1.6; }
.hk-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; color: var(--dim); }
.hk-meta b { font-weight: 400; color: var(--faint); margin-right: 8px; }
.hk-note { font-size: 15px; line-height: 1.7; border-top: 1px solid var(--rule); padding-top: 14px; margin-top: 8px; }
.hk-gap { max-width: 420px; margin-top: 18px; }
@media (max-width: 760px) { .hk-stage { grid-template-columns: 1fr; } }
/* Ma, details wired to the delivered data */
.wb-wave { margin-top: 46px; max-width: 46rem; padding: 22px 26px; border-left: 3px solid var(--acc); background: color-mix(in srgb, var(--acc) 6%, transparent); font-size: 15.5px; line-height: 1.7; }
.wb-wave h3 { font-size: 20px; }
.wb-wave h3 span { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-weight: 900; margin-left: 12px; color: var(--acc); }
.ry-ctl .lrange { min-width: 0; }
.ry-lower { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(26px, 4vw, 56px); align-items: start; margin-top: 10px; }
.ry-plan { max-width: none; margin: 0; }
.ry-plan .ry-pp { aspect-ratio: 25 / 11.2; }
.ry-plan .ry-svg { height: auto; aspect-ratio: 25 / 11.2; bottom: auto; }
.ry-pnote { font-size: 13px; color: var(--faint); margin-top: 8px; }
.ry-facts details { border-top: 1px solid var(--rule); padding: 10px 0; }
.ry-facts summary { cursor: pointer; list-style: none; font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-weight: 700; font-size: 17px; }
.ry-facts summary::-webkit-details-marker { display: none; }
.ry-facts summary::before { content: "+"; display: inline-block; width: 18px; color: var(--acc2); }
.ry-facts details[open] summary::before { content: "\2212"; }
.ry-facts p { font-size: 15px; line-height: 1.7; margin: 8px 0 4px 18px; }
.ry-reading { max-width: 46rem; margin: 40px 0 0 auto; font-size: 16px; line-height: 1.8; }
@media (max-width: 900px) { .ry-lower { grid-template-columns: 1fr; } }
.ik-svg line.dg { stroke: var(--acc); stroke-width: .8; stroke-opacity: .35; }
.ik-svg line.op { stroke: var(--gold); stroke-width: 2; }
.ik-svg .ctr { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-size: 13px; fill: var(--dim); }
.vx.in circle { fill: var(--gold); stroke: var(--gold); }
.vx.in text { font-size: 14px; fill: color-mix(in srgb, var(--gold) 70%, var(--fg)); }
.ik-where { font-size: 14.5px !important; color: var(--dim); }
.ik-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13.5px; color: var(--dim); }
.ik-meta button { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-weight: 900; color: var(--acc2); }
.ik-def { margin-top: 46px; padding: 26px 0; border-top: 2px solid var(--fg); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 6px clamp(26px, 4vw, 56px); }
.ik-do { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-weight: 700; font-size: clamp(20px, 2.2vw, 27px); line-height: 1.6; grid-row: span 3; }
.ik-dr { font-size: 13.5px; color: var(--dim); margin: 0; }
.ik-dt { font-size: 17px; line-height: 1.6; }
.ik-dn { font-size: 14.5px; color: var(--dim); line-height: 1.65; }
.ik-axes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 36px; border-top: 1px solid var(--rule); margin-top: 30px; padding-top: 18px; color: inherit; }
.ik-axes h4, .ik-ex h4 { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-weight: 700; font-size: 16px; margin: 0 0 6px; }
.ik-axes p { font-size: 14.5px; line-height: 1.65; color: var(--dim); }
.ik-ex { margin-top: 26px; }
.ik-ex ul { margin: 0; padding-left: 1.1em; columns: 2 300px; column-gap: 36px; font-size: 14.5px; line-height: 1.6; color: var(--dim); }
.shd-stage { position: relative; }
.shd-cap { position: absolute; left: 22px; right: 22px; bottom: 14px; margin: 0; font-size: 14px; color: rgba(232, 225, 208, .82); text-shadow: 0 1px 6px rgba(0, 0, 0, .8); max-width: 40rem; }
.shd-things { margin-bottom: 14px; }
.hk-pick button { display: grid; gap: 1px; text-align: left; padding: 7px 14px 8px; }
.hk-pick button b { font-family: "Zen Old Mincho", "Noto Serif SC", serif; font-weight: 700; font-size: 17px; }
.hk-pick button span { font-size: 12px; color: var(--dim); }
.hk-pick button[aria-pressed="true"] span { color: inherit; opacity: .75; }
.hk-meta span { display: block; }

/* phones: the six laws keep their vertical names; the English gloss moves to the reading below */
@media (max-width: 560px) {
  .laws li button { padding: 12px 2px 10px; }
  .laws .lw-e { display: none; }
}

/* phones and narrow tablets: every two-column lab stacks (wins over the per-lab column rules above) */
@media (max-width: 860px) {
  .lab .lb-west, .lab .lb-cn, .lab .lb-film.scl, .lab .lb-film.mt, .lab .lb-film.tvc, .lab .lb-film.asl, .lab .lb-jp.wb, .lab .lb-jp.ik { grid-template-columns: minmax(0, 1fr); }
}
