@font-face{font-family:"Slate Study";src:url("./Manrope.ttf") format("truetype");font-weight:100 900;font-display:swap;}
:root {
  --paper: #f3f2ee;
  --ink: #292b27;
  --muted: #656b61;
  --line: #d5d6cd;
  --slate: #101112;
  --code: #eaeae3;
  --accent: #e9b35d;
  --font: "Slate Study", Arial, sans-serif;
  --frame-width: min(610px, calc(100vw - 100px), calc(100svh - 210px));
  --header-height: 44px;
  --viewer-width: calc(var(--frame-width) + 58px);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible, #work-dial:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
header { width: var(--viewer-width); height: var(--header-height); margin: auto; display: flex; align-items: center; }
.social-links { margin-left: auto; display: flex; gap: 0; }
.social-links a { width: 32px; height: 44px; display: grid; place-items: center; border-radius: 0; }
.social-links a:hover { opacity: .55; }
.social-links svg { width: 18px; height: 18px; stroke-width: 1.5; }
.social-links .icon-dot { fill: currentColor; stroke: none; }
#gallery { min-height: calc(100svh - var(--header-height)); display: grid; place-items: center; padding: 24px 0; touch-action: pinch-zoom; }
#brand { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; font-weight: 400; line-height: 1; white-space: nowrap; }
#brand svg { display: block; width: 40px; height: auto; flex: none; }
#back { font-size: 14px; display: inline-flex; min-height: 44px; align-items: center; }
.viewer { width: var(--viewer-width); margin: 0 auto; }
.work-area { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 14px; align-items: center; }
.frame-wrap { position: relative; min-width: 0; }
.slate { width: 100%; aspect-ratio: 1; position: relative; display: flex; align-items: center; justify-content: center; background: var(--slate); border-radius: 0; overflow: hidden; }
.visual-link { position: absolute; inset: 0; display: block; }
#open-work { touch-action: pinch-zoom; user-select: none; }
#scene-swipe { touch-action: pan-y pinch-zoom; user-select: none; }
.slate img { display: block; width: 100%; height: 100%; padding: 26px; object-fit: contain; -webkit-user-drag: none; }
.status-dot { position: absolute; width: 6px; height: 6px; left: 15px; top: 15px; background: var(--accent); border-radius: 0; }
.work-info { width: var(--frame-width); display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding-top: 16px; }
.work-info > div { min-width: 0; }
h1 { font-size: 24px; font-weight: 500; letter-spacing: -.8px; line-height: 1.3; margin: 0; }
#work-title { font-size: 16px; letter-spacing: -.3px; line-height: 1.5; }
#work-models { font-size: 11px; line-height: 1.8; color: var(--muted); margin: 5px 0 0; overflow-wrap: anywhere; }
#work-meta, #detail-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.work-rail { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.work-rail button, #fallback-controls button, .cut-pager button { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; border-radius: 0; display: grid; place-items: center; flex: none; }
.work-rail button:hover:not(:disabled), #fallback-controls button:hover:not(:disabled) { opacity: .55; }
button:disabled { opacity: .24; cursor: default; }
nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
#work-count { position: absolute; bottom: -22px; left: 0; width: 100%; text-align: center; font-size: 10px; line-height: 16px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
#work-dial { width: 44px; height: clamp(88px, calc(var(--frame-width) - 132px), 160px); position: relative; cursor: grab; touch-action: pinch-zoom; user-select: none; }
#work-dial:active { cursor: grabbing; }
.dial-scale { position: absolute; inset: 8px 0; }
.dial-tick { position: absolute; left: 16px; top: var(--tick-position); width: 12px; height: var(--weight); background: #b8bbb1; border-radius: 0; transform: translateY(-50%); }
.dial-head { position: absolute; z-index: 1; left: 8px; top: var(--position, 0%); width: 28px; height: var(--head-weight, 1.5px); background: var(--ink); border-radius: 0; transform: translateY(-50%); transition: top .16s ease; }
#fallback-controls { display: flex; width: var(--frame-width); justify-content: space-between; margin-top: 20px; }
.cut-pager { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 9px; pointer-events: none; }
.cut-pager button { pointer-events: auto; color: #e5e7de; background: transparent; }
.cut-pager button:hover:not(:disabled) { opacity: .55; }
.cut-pager > span { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: #101112b8; padding: 3px 7px; border-radius: 0; font-size: 10px; line-height: 16px; color: #d6d9cd; white-space: nowrap; }
#detail { width: min(610px, calc(100% - 40px)); margin: 8px auto 70px; }
body.in-detail header { width: min(610px, calc(100% - 40px)); }
.detail-heading { display: flex; justify-content: space-between; gap: 15px; align-items: baseline; margin-bottom: 22px; }
.production { padding-top: 24px; }
.production h2 { font-size: 16px; letter-spacing: -.3px; margin-bottom: 18px; }
#published-links { display: flex; gap: 24px; }
#published-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
details { border-top: 1px solid var(--line); }
summary { min-height: 54px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; font-size: 15px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 18px; color: var(--muted); }
details[open] > summary::after { content: "−"; }
dl { display: grid; grid-template-columns: 100px 1fr; gap: 10px; font-size: 13px; margin: 8px 0 23px; line-height: 1.6; }
dt { color: var(--muted); }
dd { margin: 0; }
.guide-nav { display: flex; gap: 25px; border-bottom: 1px solid var(--line); margin: 24px 0 0; }
.guide-nav button { min-height: 46px; border: 0; background: transparent; padding: 0 0 11px; font-size: 13px; color: var(--muted); }
.guide-nav button[aria-pressed="true"] { color: var(--ink); border-bottom: 2px solid var(--ink); }
#scenes { margin: 24px 0 30px; }
h2 { font-size: 20px; font-weight: 500; margin: 0; letter-spacing: -.5px; }
.scene-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
h3 { font-size: 22px; font-weight: 500; letter-spacing: -.6px; margin: 0 0 10px; }
#scene-content > p, details p { color: var(--muted); font-size: 14px; line-height: 1.9; margin: 0 0 20px; }
.settings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px 16px; margin: 20px 0; }
.settings > div { min-width: 0; }
.settings dt { font-size: 11px; margin-bottom: 4px; }
.settings dd { font-size: 13px; overflow-wrap: anywhere; }
.prompt { position: relative; padding: 46px 17px 18px; background: var(--code); margin: 0 0 18px; border-radius: 0; }
.prompt pre { margin: 0; font: 13px/1.9 var(--font); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 280px; overflow: auto; }
.copy { position: absolute; top: 5px; right: 7px; background: transparent; border: 0; min-height: 38px; padding: 0 10px; font-size: 12px; }
.keyframe { display: flex; gap: 12px; align-items: center; margin: 3px 0 14px; font-size: 12px; color: var(--muted); }
.keyframe img { width: 34px; height: 60px; object-fit: contain; background: var(--slate); }
.source-note { font-size: 11px; line-height: 1.7; color: var(--muted); margin-top: 26px; }
@media (min-width: 1000px) {
  body.in-detail header, #detail { width: min(850px, calc(100% - 80px)); }
  #detail > .film { max-width: 610px; margin: 0 auto; }
  #detail > .detail-heading, #detail > .production { max-width: 610px; margin-left: auto; margin-right: auto; }
  .scene-grid { grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
}
@media (max-width: 600px) {
  .slate img { padding: 20px; }
  #work-dial { height: 76px; }
  .dial-scale { inset: 8px 0; }
  .dial-tick { display: none; }
  .dial-scale::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 2px; border-radius: 0; background: var(--line); }
  .dial-head { left: 15px; width: 14px; height: 3px; }
  .work-rail { gap: 4px; }
  .work-rail button { border-color: transparent; }
  #work-count { position: absolute; bottom: -22px; left: 0; width: 100%; text-align: center; font-size: 9px; }
}
@media (prefers-reduced-motion: no-preference) {
  .changing[data-axis="vertical"] img { animation: vertical-arrive .2s ease-out; }
  .changing[data-axis="horizontal"] img { animation: horizontal-arrive .18s ease-out; }
  @keyframes vertical-arrive { from { opacity: .3; transform: translateY(var(--shift)); } to { opacity: 1; transform: translateY(0); } }
  @keyframes horizontal-arrive { from { opacity: .3; transform: translateX(var(--shift)); } to { opacity: 1; transform: translateX(0); } }
}

.outgoing-cover { position: absolute; inset: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .dial-head { transition: none; } }

.cut-pager a { pointer-events:auto; width:44px; height:44px; display:grid; place-items:center; color:#e5e7de; }
.cut-pager a:hover { opacity:.55; }
.cut-pager a[aria-disabled="true"] { opacity:.24; pointer-events:none; }
.scene-index { display:flex; flex-wrap:wrap; gap:6px 20px; margin:18px 0; }
.scene-index a { min-height:32px; display:inline-flex; align-items:center; font-size:12px; color:var(--muted); }
.scene-index a[aria-current="page"] { color:var(--ink); text-decoration:underline; text-underline-offset:4px; }
.source-note a { text-decoration:underline; text-underline-offset:3px; }
.guide-nav a { min-height:46px; display:inline-flex; align-items:center; font-size:13px; }
#scenes > h2 { font-size:16px; }
noscript .work-list { max-width:610px; margin:24px auto; padding:20px; }
.not-found { max-width:610px; margin:100px auto; padding:20px; }
