/* Onest variable: full Cyrillic, weights 100–900; bundled for file previews. */
@font-face {
  font-family: "Onest"; src: url("../fonts/Onest.ttf") format("truetype");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
:root {
  --canvas: #1e1e1e; --paper: #2c2c2c; --dot: #343434; --line: #444;
  --ink: #f5f5f5; --ink-2: #a0a0a0; --white: #fff;
  --chrome: #2c2c2c; --chrome-2: #383838; --chrome-line: #444;
  --chrome-ink: #f5f5f5; --chrome-dim: #a0a0a0;
  --signal: #C8FF2E; --on-signal: #141414; --select: #C8FF2E; --focus-dark: #C8FF2E;
  --c-type: #a259ff; --c-grid: #0acf83; --c-colour: #FF5FA2;
  --c-layout: #1abcfe; --c-motion: #ffc700; --c-copy: #7B61FF;
  --display: "Onest", "Arial Black", Arial, sans-serif;
  --text: "Onest", system-ui, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --bar: 52px; --ruler: 0px; --lw: 0px; --iw: 0px; --rhythm: 120px; --card-pad: 28px; --card-gap: 24px;
}
@media (min-width: 768px) { :root { --ruler: 20px; } }
@media (min-width: 1100px) { :root { --lw: 156px; } }
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + var(--ruler) + 24px); -webkit-text-size-adjust: 100%; scrollbar-color: var(--ink) var(--canvas); }
body {
  margin: 0; overflow: visible; min-height: 100%;
  background-color: var(--canvas);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 24px 24px;
  color: var(--ink); font: 400 1rem/1.5 var(--display); caret-color: var(--select);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--select); color: var(--on-signal); }
img { max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--select); outline-offset: 3px; }
.bar :focus-visible, .layers :focus-visible, .case-nav-link:focus-visible { outline-color: var(--focus-dark); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 8px; top: -60px; z-index: 300; background: var(--signal); color: var(--on-signal); font: 700 0.875rem var(--display); padding: 10px 14px; border-radius: 4px; text-decoration: none; }
.skip:focus { top: 8px; }

/* ---------- tool chrome ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; height: var(--bar); z-index: 100;
  display: flex; align-items: center; gap: 18px; padding-inline: 14px;
  background: var(--chrome); color: var(--chrome-ink); border-bottom: 1px solid var(--chrome-line);
  font: 600 0.75rem/1 var(--display);
}
.bar-file { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 32px; }
.bar-mark { display: block; flex: none; width: 28px; height: 28px; }
.bar-name { color: var(--chrome-ink); font: 400 12px/1 var(--mono); }
.bar-tools { display: flex; gap: 2px; margin-left: 12px; color: var(--chrome-dim); }
.bar-tools > span { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 4px; }
.bar-tools svg { width: 18px; height: 18px; }
.bar-tools small { position: absolute; right: 1px; bottom: 0; font: 7px/1 var(--mono); }
.bar-tools .is-active { background: var(--signal); color: var(--on-signal); }
.bar-nav { margin-left: auto; display: flex; gap: 4px; }
.bar-nav a { color: var(--chrome-dim); text-decoration: none; padding: 9px 10px; border-radius: 4px; }
.bar-nav a:hover { color: var(--white); background: var(--chrome-2); }
.bar-status { color: var(--chrome-dim); min-width: 11ch; text-align: right; }
.bar-zoom { display: none; color: var(--chrome-ink); background: var(--chrome-2); padding: 7px 10px; border-radius: 4px; }
@media (min-width: 900px) { .bar-tools { display: flex; } .bar-zoom { display: block; } }

.ruler { display: none; position: fixed; z-index: 80; background: var(--chrome-2); color: var(--chrome-dim); font: 400 9px/1 var(--mono); overflow: hidden; }
@media (min-width: 768px) { .ruler { display: block; } }
.ruler-x {
  top: var(--bar); left: var(--ruler); right: 0; height: var(--ruler); border-bottom: 1px solid var(--chrome-line);
  --ox: 0px;
  background-image: repeating-linear-gradient(90deg, var(--chrome-dim) 0 1px, transparent 1px 100px), repeating-linear-gradient(90deg, var(--chrome-line) 0 1px, transparent 1px 10px);
  background-size: 100% 9px, 100% 5px; background-repeat: repeat-x; background-position: var(--ox) 100%, var(--ox) 100%;
}
.ruler-y {
  top: calc(var(--bar) + var(--ruler)); left: 0; bottom: 0; width: var(--ruler); border-right: 1px solid var(--chrome-line);
}
.ruler-x::after { content: ""; position: fixed; top: var(--bar); left: 0; width: var(--ruler); height: var(--ruler); background: var(--chrome-2); border-right: 1px solid var(--chrome-line); border-bottom: 1px solid var(--chrome-line); }
.ruler-x .rl { position: absolute; top: 2px; padding-left: 3px; }
.ry-track {
  position: absolute; left: 0; right: 0; top: 0; height: calc(100% + 200px); will-change: transform;
  background-image: repeating-linear-gradient(180deg, var(--chrome-dim) 0 1px, transparent 1px 100px), repeating-linear-gradient(180deg, var(--chrome-line) 0 1px, transparent 1px 10px);
  background-size: 9px 100%, 5px 100%; background-repeat: repeat-y; background-position: 100% 0, 100% 0;
}
.ry-track .rl { position: absolute; left: 2px; writing-mode: vertical-rl; transform: rotate(180deg); padding-bottom: 3px; }
.rm { position: absolute; left: 0; top: 0; background: var(--select); will-change: transform; }
.ruler-x .rm { width: 1px; height: 100%; }
.ruler-y .rm { height: 1px; width: 100%; }

.panel-h { font: 500 0.6875rem/1 var(--mono); color: var(--chrome-dim); padding: 0 14px 10px; border-bottom: 1px solid var(--chrome-line); margin-bottom: 8px; }
.layers, .insp {
  display: none; position: fixed; z-index: 90; top: calc(var(--bar) + var(--ruler)); bottom: 0;
  background: var(--chrome); color: var(--chrome-ink); padding-top: 14px; overflow: auto; font: 500 0.75rem/1.2 var(--display);
}
@media (min-width: 1100px) { .layers, .insp { display: block; } }
.layers { left: var(--ruler); width: var(--lw); border-right: 1px solid var(--chrome-line); }
.insp { right: 0; width: var(--iw); border-left: 1px solid var(--chrome-line); }
.layer-group { padding: 6px 14px 8px; color: var(--chrome-dim); }
.layer { display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 6px 14px; color: var(--chrome-dim); text-decoration: none; }
.layer:hover { color: var(--white); background: var(--chrome-2); }
.layer[aria-current="true"] { color: var(--on-signal); background: var(--signal); }
.layer[aria-current="true"] .layer-no { color: inherit; }
.layer-ico { width: 10px; height: 10px; border: 1.5px solid currentColor; border-radius: 1px; flex: none; }
.layer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-no { color: var(--chrome-dim); }
.layer-sub { padding: 2px 0 6px; }
.layer-sub[hidden] { display: none; }
.layer-sub li { padding: 4px 14px 4px 33px; color: var(--chrome-dim); font-size: 0.6875rem; }
.layer-sub li.lg { color: var(--chrome-ink); padding-left: 27px; }
/* Compact read-only Design properties. Only swatches flash on context changes. */
.insp { padding-top: 0; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; font: 400 11px/1.45 var(--text); }
.insp [hidden] { display: none !important; }
.insp-tabs { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 17px; padding: 0 12px; height: 42px; background: var(--chrome); border-bottom: 1px solid var(--chrome-line); color: #b5b5b5; font-size: 12px; }
.insp-tabs > span { height: 100%; display: flex; align-items: center; }
.insp-tabs .is-active { color: #fff; border-bottom: 2px solid #0d99ff; font-weight: 600; }
.insp-dev { margin-left: auto; }
.insp-context { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 2px; color: #b5b5b5; }
.insp-live { width: 5px; height: 5px; border-radius: 50%; background: var(--signal); }
.insp-block { padding: 12px; border-bottom: 1px solid var(--chrome-line); min-width: 0; }
.insp-heading { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; color: #b5b5b5; }
.insp-heading h2 { margin: 0; color: #f5f5f5; font: 600 11px/1.4 var(--text); }
.insp-heading > :last-child:not(:first-child) { margin-left: auto; }
.insp-heading .insp-icon + h2 { margin-left: 0; }
.insp-icon { color: #6cc4ff; font-size: 16px; line-height: 16px; width: 16px; text-align: center; }
.insp-icon[data-type="Component"] { color: #c5a2ff; }
.insp-name { padding: 0 0 12px; color: #f5f5f5; font: 500 12px/1.45 var(--text); overflow-wrap: anywhere; }
.insp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 8px; margin: 0; background: none; border: 0; }
.insp-grid div { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 28px; padding: 4px 7px; background: #353535; border-radius: 4px; }
.insp-grid dt { flex: 0 0 14px; color: #b5b5b5; }
.insp-grid dd { color: #f5f5f5; min-width: 0; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insp-layout { display: flex; gap: 10px; align-items: center; color: #b5b5b5; flex-wrap: wrap; }
.insp-layout > :first-child { background: #0d99ff; color: white; padding: 2px 7px; border-radius: 3px; font-size: 14px; }
.insp-layout b { font-weight: 400; color: #f5f5f5; font-variant-numeric: tabular-nums; }
.insp-font { padding: 6px 8px; border: 1px solid var(--chrome-line); border-radius: 4px; margin-bottom: 7px; overflow-wrap: anywhere; font-size: 12px; }
.insp-palette { display: grid; gap: 7px; }
.insp-palette li { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.insp-palette i { width: 18px; height: 18px; flex: none; border-radius: 3px; background: var(--swatch); border: 1px solid #ffffff30; }
.insp-palette small { margin-left: auto; font-size: 11px; color: #b5b5b5; }
.insp-effect { display: flex; align-items: center; gap: 7px; }
.insp-effect i { width: 12px; height: 12px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 6px var(--glow); }
.insp-effect > :last-child { margin-left: auto; color: #b5b5b5; font-size: 10px; }
.insp-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.insp-chips span { padding: 3px 6px; background: #383838; border: 1px solid #505050; border-radius: 4px; }
.insp-caption { color: #b5b5b5; margin-top: 9px; overflow-wrap: anywhere; }
.insp-person { display: flex; align-items: center; gap: 7px; }
.insp-person > i { display: grid; place-items: center; flex: none; width: 23px; height: 23px; background: var(--signal); border-radius: 50%; color: var(--on-signal); font-style: normal; font-weight: 600; }
.insp-person small { display: block; color: #b5b5b5; font-size: 10px; }
.insp-owner { margin-left: auto; color: #b5b5b5; font-size: 10px; }
.insp-export { display: flex; gap: 8px; padding: 12px; color: #b5b5b5; }
.insp-export > :first-child { color: #f5f5f5; margin-right: auto; }


/* Dark file: the work gets the canvas, the controls stay compact. */
.insp { display: none; }
.canvas { position: relative; margin-left: calc(var(--ruler) + var(--lw)); padding-top: calc(var(--bar) + var(--ruler)); }
.sheet { max-width: 1680px; margin-inline: auto; padding-inline: clamp(20px, 3vw, 64px); }
.frame-label { display: flex; gap: 16px; align-items: center; min-height: 18px; color: var(--ink-2); font: 500 10px/1.3 var(--mono); }
.fl-state { margin-left: auto; display: inline-grid; }
.fl-state > span { grid-area: 1/1; text-align: right; }
.s-b { opacity: 0; }
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 0 22px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); font: 700 14px/1 var(--display); text-decoration: none; cursor: pointer; transition: background 180ms, border-color 180ms; }
.btn:hover { border-color: var(--signal); background: #ffffff09; }
.btn-primary { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.btn-primary:hover { background: var(--signal); color: var(--on-signal); box-shadow: inset 0 0 0 2px var(--on-signal); }
.hero { position: relative; padding-top: 28px; }
.hero-stage { position: relative; container-type: inline-size; padding: 58px 0 24px; }
.name { position: relative; z-index: 1; width: max-content; max-width: 100%; font: 900 var(--name-size, 17cqi)/.88 var(--display); letter-spacing: -.065em; text-transform: uppercase; }
.name .w { display: block; width: max-content; white-space: nowrap; }
.name .l { display: inline-block; will-change: transform; }
.hero-mark { position: absolute; right: 3%; top: 34px; display: block; width: 17cqi; height: 17cqi; }
.hero-mark .mark-draft { visibility: hidden; }
.hero-mark .mark-square { transform-origin: 8px 8px; }
.hero-mark .mark-segment { stroke-dasharray: 1; stroke-dashoffset: 1; }
/* File opening: the first frame exists before fonts and scene construction. */
html.intro-pending { overflow: hidden; }
.intro-pending:not(.intro-revealing) .canvas > * { opacity: 0; }
.intro-pending:not(.intro-revealing) :is(.bar, .layers, .insp, .ruler),
.intro-pending .motion-skip { visibility: hidden; }
.intro-pending .hero-mark { opacity: 0; }
.file-intro { --intro-size: clamp(300px, 26vw, 360px); display: none; position: fixed; inset: 0; z-index: 350; touch-action: none; }
.intro-pending .file-intro { display: block; }
.file-intro-skip { position: absolute; right: 24px; bottom: 24px; padding: 10px 16px; border: 1px solid #666; border-radius: 5px; background: #2c2c2c; color: #fff; font: 500 13px var(--display); cursor: pointer; }
.file-intro-world { position: absolute; left: calc(50% - var(--intro-size) / 2); top: calc(46% - var(--intro-size) / 2); width: var(--intro-size); height: var(--intro-size); pointer-events: none; transform-origin: 0 0; }
.file-intro-world::before { content: ''; position: absolute; inset: 6.6667%; border: 1px dashed #656565; border-radius: 23.08%; }
.file-intro-world.is-drawing::before { display: none; }
.file-intro-world > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.intro-square { transform-origin: 8px 8px; }
/* Hide phase-specific content before the first timeline update, including
   children: an explicitly visible child overrides a hidden parent. */
.intro-square, .intro-final, .intro-nib path, .intro-anchors rect,
.intro-size, .intro-name, .intro-name > * { visibility: hidden; }
.file-intro-tools { position: absolute; top: calc(46% - var(--intro-size) / 2 - 72px); left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 6px; border: 1px solid #555; border-radius: 8px; background: #2c2c2c; }
.file-intro-tools > span { display: flex; align-items: center; justify-content: center; gap: 6px; width: 62px; height: 40px; color: #aaa; border-radius: 4px; }
.file-intro-tools small { font: 500 12px/1 var(--mono); }
.file-intro-tools svg { width: 22px; height: 22px; }
.file-intro-tools .is-active { background: #0D99FF; color: white; }
.file-intro-loading { position: absolute; bottom: 84px; left: 50%; width: min(310px, 80vw); transform: translateX(-50%); text-align: center; color: #aaa; font: 400 12px/1.5 var(--mono); }
.file-intro-loading i { display: block; height: 2px; margin: 12px 0 0; background: #444; overflow: hidden; }
.file-intro-loading b { display: block; height: 100%; background: #C8FF2E; transform: scaleX(0); transform-origin: left; }
.intro-size { position: absolute; left: 0; top: 0; min-width: 82px; padding: 4px 8px; border-radius: 3px; background: #0D99FF; color: #fff; text-align: center; white-space: nowrap; font: 500 12px/1.4 var(--mono); }
.intro-name { position: absolute; top: calc(100% + 18px); left: 50%; transform: translateX(-50%); padding: 8px 12px; outline: 2px solid #0D99FF; font: 900 clamp(28px, 4.5vw, 64px)/1 var(--display); letter-spacing: -.045em; text-transform: uppercase; white-space: nowrap; }
.intro-name::before, .intro-name::after { content: ''; position: absolute; top: -4px; width: 7px; height: 7px; border: 1px solid #0D99FF; background: #fff; }
.intro-name::before { left: -4px; }
.intro-name::after { right: -4px; }
.intro-caret { position: absolute; left: 0; top: 8px; width: 2px; height: calc(100% - 16px); background: #0D99FF; }
.intro-pointer { position: absolute; top: 0; left: 0; width: 24px; height: 28px; pointer-events: none; }
@media (max-width: 767px) { .file-intro { --intro-size: 240px; } }
@media (max-height: 600px) { .file-intro { --intro-size: 220px; } .file-intro-loading { bottom: 70px; } }
@media (min-width: 1100px) {
  :root { --iw: 224px; }
  .insp { display: block; }
  .home .canvas { margin-right: var(--iw); }
}
@media (prefers-reduced-motion: reduce) {
  .file-intro, .file-intro-world { display: none !important; }
  html.intro-pending { overflow: auto; }
  .intro-pending:not(.intro-revealing) .canvas > *, .intro-pending:not(.intro-revealing) :is(.bar, .layers, .insp, .ruler) { visibility: visible; }
  .intro-pending:not(.intro-revealing) .canvas > * { opacity: 1; }
}
.sub { margin-top: 30px; font: 600 clamp(16px, 2.3cqi, 28px)/1.3 var(--display); color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.motion-skip { position: absolute; top: 25px; right: 0; z-index: 60; padding: 9px 14px; background: var(--chrome); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; font: 700 12px var(--display); cursor: pointer; }
.motion-skip[hidden] { display: none; }
.about { position: relative; padding-top: 40px; }
.contact { position: relative; padding-top: var(--rhythm); }
.artboard { position: relative; isolation: isolate; }
.artboard > * { position: relative; z-index: 1; }
.ab-bg { position: absolute !important; inset: 0; z-index: 0 !important; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
/* About: a natural portrait + compact introduction, then experience + tools. */
.about-board { display: grid; gap: 32px; padding: 32px; margin-top: 16px; }
.about-overview { display: grid; grid-template-columns: clamp(260px, 22vw, 320px) minmax(0, 1fr); gap: 32px; align-items: start; }
.about-photo { position: relative; isolation: isolate; min-width: 0; width: 100%; }
.photo-frame::before { content: ''; position: absolute; z-index: -1; left: 12%; top: 16%; width: 76%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(200, 255, 46, .16), rgba(200, 255, 46, 0) 100%); }
.photo-label { display: block; margin-bottom: 16px; font: 500 10px/1 var(--mono); color: var(--signal); }
/* The intrinsic 1090 × 1361 image sets the frame height; nothing is cropped. */
.photo-frame { position: relative; isolation: isolate; outline: 1px solid var(--signal); }
.photo-frame picture, .photo-frame img { display: block; width: 100%; height: auto; }
.photo-frame::after { content: ''; position: absolute; z-index: 5; inset: -3px; pointer-events: none; background: linear-gradient(#fff, #fff) 0 0 / 6px 6px no-repeat, linear-gradient(#fff, #fff) 100% 0 / 6px 6px no-repeat, linear-gradient(#fff, #fff) 0 100% / 6px 6px no-repeat, linear-gradient(#fff, #fff) 100% 100% / 6px 6px no-repeat; filter: drop-shadow(0 0 1px var(--signal)); }
.about-info { display: grid; gap: 24px; min-width: 0; }
.about-heading { display: grid; gap: 8px; min-width: 0; }
.about-info h2 { font: 900 clamp(36px, 3.7vw, 56px)/1 var(--display); letter-spacing: -.045em; text-transform: uppercase; hyphens: none; overflow-wrap: normal; text-wrap: balance; }
.about-role { color: var(--signal); font: 700 clamp(18px, 1.8vw, 26px)/1.2 var(--display); }
.about-line { color: var(--signal); font: 500 13px/1.5 var(--mono); }
.about-bio { font: 400 16px/1.5 var(--text); max-width: 60ch; }
.about-facts { position: relative; display: grid; gap: 16px; padding-top: 25px; }
.about-rule { position: absolute; top: 0; left: 0; width: 100%; height: 1px; background: var(--line); }
.about-sec { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; font: 500 15px/1.5 var(--text); min-width: 0; }
.about-details { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; padding-top: 33px; }
.about-details > .about-sec { grid-template-columns: minmax(0, 1fr); align-content: start; }
.about-details .timeline { gap: 24px; }
.about-details .timeline li { position: relative; grid-template-columns: minmax(0, 1fr); gap: 8px; padding-left: 17px; }
.about-details .tl-rule { position: absolute; top: 0; left: 0; width: 1px; height: 100%; background: var(--signal); }
.about-details .tool-groups { gap: 16px; }
.about-details .tool-group { grid-template-columns: 112px minmax(0, 1fr); gap: 16px; }
.about-details .chips { gap: 8px; }
.about-details .chip { max-width: 100%; overflow-wrap: anywhere; }
@media (min-width: 768px) and (max-width: 1023px) {
  .about-board { padding: 24px; gap: 24px; }
  .about-overview { grid-template-columns: minmax(0, min(220px, 34%)) minmax(0, 1fr); gap: 24px; }
  .about-info { gap: 16px; }
  .about-info h2 { font-size: clamp(32px, 4.2vw, 42px); }
  .about-details { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 24px; }
}
.sec-k { font: 500 10px/1.6 var(--mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.timeline { display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
.tl-y { font: 500 12px/1.6 var(--mono); color: var(--ink-2); }
.timeline b { font-weight: 700; }
.timeline p { color: var(--ink-2); font: 400 14px/1.45 var(--text); }
.tool-groups { display: grid; gap: 10px; }
.tool-group { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 12px; align-items: start; }
.tool-k { font: 500 12px/28px var(--display); color: var(--ink-2); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 11px; border: 1px solid #555; border-radius: 24px; background: var(--chrome-2); font-size: 13px; font-weight: 600; line-height: 1.3; }
.work-group { padding-top: var(--rhythm); }
.group-head { display: flex; align-items: flex-end; align-items: last baseline; justify-content: space-between; gap: 24px; padding-bottom: 56px; }
.group-head > div { min-width: 0; }
.group-head h2 { min-width: 0; overflow-wrap: anywhere; max-width: 14ch; font: 900 clamp(52px, 8vw, 136px)/.9 var(--display); letter-spacing: -.055em; text-transform: uppercase; }
.group-count { font: 500 11px/1 var(--mono); color: var(--ink-2); white-space: nowrap; }
.work-scene { position: relative; display: grid; gap: var(--rhythm); }
.work { min-width: 0; position: relative; scroll-margin-top: 90px; }
.work-state { position: absolute; right: 0; top: -24px; width: 100%; }
/* Card: two columns ~60/40, image side alternates; text column ends at the cover's bottom edge. */
.work .artboard { padding: var(--card-pad); display: grid; grid-template-columns: minmax(0, var(--cov, 60%)) minmax(0, 1fr); gap: calc(var(--card-gap) + 8px); align-items: stretch; container-type: inline-size; }
.work[data-side="right"] .artboard { grid-template-columns: minmax(0, 1fr) minmax(0, var(--cov, 60%)); }
.work[data-side="right"] .cover { grid-column: 2; grid-row: 1; justify-self: end; }
.work[data-side="right"] .info { grid-column: 1; grid-row: 1; }
.cover, .cover-media { position: relative; min-width: 0; }
.cover { align-self: start; width: min(100%, calc(62vh * var(--ar, 1.78))); }
.cover-media { border-radius: 6px; }
.cover-link { display: block; border-radius: 6px; }
.cover img { display: block; width: 100%; height: auto; border-radius: 6px; }
.cover-media::after { content: ''; position: absolute; z-index: 35; inset: -3px; pointer-events: none; opacity: 0; background: linear-gradient(#fff, #fff) 0 0 / 6px 6px no-repeat, linear-gradient(#fff, #fff) 100% 0 / 6px 6px no-repeat, linear-gradient(#fff, #fff) 0 100% / 6px 6px no-repeat, linear-gradient(#fff, #fff) 100% 100% / 6px 6px no-repeat; filter: drop-shadow(0 0 1px var(--glow, #0D99FF)); }
@media (hover: hover) {
  .cover-media:hover { outline: 1px solid var(--glow, #0D99FF); outline-offset: 0; }
  .cover-media:hover::after { opacity: 1; }
}
.info { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.info h3 { font: 900 calc(clamp(32px, 4.3vw, 66px) * var(--h-scale, 1))/.92 var(--display); letter-spacing: -.045em; text-transform: uppercase; hyphens: none; overflow-wrap: normal; word-break: keep-all; }
.info .kind { margin-top: -4px; color: var(--ink-2); font: 500 14px/1.4 var(--text); }
.blurb { font: 400 16px/1.5 var(--text); color: var(--ink); }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.thumb { display: block; aspect-ratio: 16 / 10; border-radius: 5px; overflow: hidden; background: var(--chrome-2); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 300ms var(--ease); }
.thumb:hover img { transform: scale(1.04); }
.info .case-open { flex: none; min-height: 56px; width: 100%; margin-top: auto; background: var(--signal); color: var(--on-signal); border-color: var(--signal); font: 800 16px/1.2 var(--display); }
/* Whole-card glow in the work colour: faint tint always, stronger in view / on hover. */
.work .ab-bg { transition: box-shadow 500ms var(--ease), border-color 500ms var(--ease), background-color 500ms var(--ease); }
.work.is-lit .ab-bg { box-shadow: 0 0 80px color-mix(in srgb, var(--glow, #0D99FF) 28%, transparent); border-color: color-mix(in srgb, var(--glow, #0D99FF) 40%, var(--line)); background-color: color-mix(in srgb, var(--glow, #0D99FF) 5%, var(--paper)); }
.work:hover .ab-bg { box-shadow: 0 0 110px color-mix(in srgb, var(--glow, #0D99FF) 42%, transparent); border-color: color-mix(in srgb, var(--glow, #0D99FF) 70%, var(--line)); background-color: color-mix(in srgb, var(--glow, #0D99FF) 8%, var(--paper)); }
.work-marker { position: absolute; z-index: 3; display: grid; place-items: center; width: 24px; height: 24px; margin: -12px 0 0 -12px; padding: 0; border: 1px solid #141414; border-radius: 50%; background: var(--signal); color: var(--on-signal); box-shadow: 0 1px 5px #0006; font: 700 11px/1 var(--mono); cursor: pointer; touch-action: manipulation; }
.work-marker::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; }
.work-marker[aria-expanded="true"], .work-marker:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; background: #fff; }
.contact-board { color: var(--on-signal); padding: clamp(24px, 4vw, 64px); margin-top: 16px; display: grid; gap: 28px; justify-items: start; }
.contact .ab-bg { background: var(--signal); border-color: var(--signal); }
.big { font: 900 clamp(64px, 10vw, 160px)/.9 var(--display); letter-spacing: -.055em; text-transform: uppercase; }
.contact .btn-primary { color: var(--ink); background: var(--canvas); border-color: var(--canvas); }
.contact .btn-ghost { color: var(--on-signal); background: transparent; border-color: currentColor; }
.contact .btn-ghost:hover { background: rgba(20,20,20,.08); }
.links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.links a { min-height: 44px; display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(20,20,20,.35); }
.contact-mark { display: block; width: 96px; height: 96px; padding: 5px; border-radius: 8px; background: var(--canvas); }
.links .val { color: inherit; }
.contact .links a { border-color: #14141460; }
.foot { padding-block: 56px 80px; color: var(--ink-2); font: 500 11px/1.4 var(--display); }
.assembly-layers { padding: 4px 12px 8px 30px; color: var(--ink-2); font: 400 10px/2 var(--mono); }
.assembly-layers[hidden] { display: none; }
.assembly-layers li::before { content: '◇'; margin-right: 7px; color: var(--signal); }
.layer.is-built .layer-no { color: var(--c-grid); }
.team-presence { display: flex; align-items: center; padding-left: 10px; }
.team-presence i, .team-presence > span { display: grid; place-items: center; width: 26px; height: 26px; margin-left: -7px; border: 2px solid var(--chrome); border-radius: 50%; background: #a259ff; color: white; font: 700 10px var(--display); }
.team-presence i:nth-child(2) { background: #0acf83; }
.team-presence i:nth-child(3) { background: #7B61FF; }
.team-presence > span { background: #555; }
.type-word { display: inline-block; }
.type-char { display: inline; }
/* Cases: a title, one line, then the complete image sequence. */
/* Reserve a gutter for the fixed return control so it never sits over artwork. */
.case-canvas { margin: 0; padding-top: var(--bar); padding-left: 180px; }
.case-back {
  position: fixed; z-index: 101; top: calc(var(--bar) + 16px); left: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 12px 16px; border-radius: 999px;
  background: var(--signal); color: var(--on-signal); text-decoration: none;
  font: 700 14px/1.2 var(--display);
}
.case-back:focus-visible { outline-color: var(--white); }
.case-pagination { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-block: 32px 48px; }
.case-nav-link { display: grid; align-content: start; gap: 8px; color: var(--ink); text-decoration: none; }
.case-nav-link[rel="next"] { text-align: right; }
.case-nav-caption { color: var(--signal); font: 700 14px/1.5 var(--display); }
.case-nav-title { font: 600 clamp(16px, 2vw, 24px)/1.3 var(--display); overflow-wrap: anywhere; }
.case-nav-link:hover .case-nav-title { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 767px) {
  .case-canvas { padding-left: 0; }
  .case-back { left: 12px; top: auto; bottom: 16px; }
  .case-back.is-compact { width: 44px; padding: 0; }
  .case-back.is-compact .case-back-label { display: none; }
  .case .case-head { padding-top: 84px; }
  .case-pagination { gap: 16px; }
  .case-nav-caption { font-size: 13px; }
}
.case-head { padding-top: 48px; padding-bottom: 32px; display: grid; gap: 24px; justify-items: start; }
.case-head h1 { max-width: 100%; font: 900 clamp(54px, 11vw, 176px)/.92 var(--display); letter-spacing: -.055em; text-transform: uppercase; overflow-wrap: anywhere; }
.case-head .kind { font-size: clamp(16px, 2vw, 24px); }
.back { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 600; text-underline-offset: 5px; }
.case-summary { padding-block: 8px 48px; }
.case-summary > .frame-label { margin-bottom: 10px; }
.case-summary-card { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #3a3a3a; border-radius: 10px; background: #2c2c2c; overflow: hidden; }
.case-summary-column { position: relative; min-width: 0; padding: clamp(22px, 2.4vw, 36px); }
.case-summary-column + .case-summary-column { border-left: 1px solid #3a3a3a; }
.case-summary-column:first-child::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: #c8ff2e; }
.case-summary-label { margin-bottom: 16px; color: #c8ff2e; font: 500 11px/1.4 var(--mono); }
.case-summary-text { color: #fff; font: 650 clamp(17px, 1.35vw, 19px)/1.4 var(--display); text-wrap: pretty; overflow-wrap: anywhere; }
@media (max-width: 767px) {
  .case-summary { padding-bottom: 36px; }
  .case-summary-card { grid-template-columns: minmax(0, 1fr); }
  .case-summary-column + .case-summary-column { border-left: 0; border-top: 1px solid #3a3a3a; }
  .case-summary-label { margin-bottom: 12px; }
}
.frames { max-width: 1680px; margin-inline: auto; padding: 0 clamp(12px, 3vw, 64px) 40px; display: grid; gap: 24px; }
.cf img { display: block; width: 100%; height: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.multiplayer { position: fixed; inset: 0; z-index: 95; overflow: hidden; pointer-events: none; contain: strict; }
.multiplayer-cursor { position: absolute; left: 0; top: 0; width: 20px; height: 24px; pointer-events: none; will-change: transform; }
.cursor-arrow { display: block; width: 20px; height: 24px; overflow: visible; fill: var(--cursor); stroke: white; stroke-width: 1.5; stroke-linejoin: round; filter: drop-shadow(0 1px 1px #0003); }
.cursor-name { position: absolute; left: 13px; top: 23px; padding: 6px 9px; background: var(--cursor); color: #fff; font: 700 13px/1 var(--display); border-radius: 0 4px 4px 4px; white-space: nowrap; box-shadow: 0 1px 3px #0002; }
.cursor-chat { position: absolute; bottom: 12px; left: 8px; min-width: max-content; max-width: 210px; padding: 9px 12px; border: 1px solid #dedee5; border-radius: 10px 10px 10px 0; background: #383838; color: #f5f5f5; font: 500 12px/1.3 var(--display); box-shadow: 0 4px 16px #19192714; }
.cursor-chat[hidden] { display: none; }
.cursor-beam { display: none; position: absolute; top: -2px; left: -6px; color: var(--cursor); font: 700 28px/1 var(--display); text-shadow: 1px 0 white; }
.is-typing .cursor-beam { display: block; }
.is-typing .cursor-arrow { visibility: hidden; }
.is-typing .cursor-name { left: 2px; top: 29px; }
.scene-overlay { position: absolute !important; z-index: 30 !important; inset: 0; pointer-events: none; overflow: visible; }
.selection-edge { position: absolute; left: 0; top: 0; width: 1px; height: 1px; background: #0D99FF; transform-origin: 0 0; }
.assembly-selection { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 8; pointer-events: none; box-sizing: border-box; }
.assembly-selection .handle { position: absolute; width: 6px; height: 6px; margin: -3px; box-sizing: border-box; background: #fff; border: 1px solid #0D99FF; }
.handle.h0 { left: 0; top: 0; } .handle.h1 { left: 50%; top: 0; } .handle.h2 { left: 100%; top: 0; }
.handle.h3 { left: 100%; top: 50%; } .handle.h4 { left: 100%; top: 100%; } .handle.h5 { left: 50%; top: 100%; }
.handle.h6 { left: 0; top: 100%; } .handle.h7 { left: 0; top: 50%; }
.scene-caption { position: absolute; left: -1px; top: -20px; color: #A0A0A0; font: 400 10px/1.2 var(--mono); white-space: nowrap; }
.size-readout { position: absolute; left: 0; top: 0; padding: 3px 6px; border-radius: 4px; background: #0D99FF; color: #fff; white-space: nowrap; font: 400 10px/1.2 var(--mono); }
.smart-guide { position: absolute; left: 0; top: 0; background: #F24822; }
.smart-guide.vertical { width: 1px; }
.smart-guide.horizontal { height: 1px; }
.smart-guide span { position: absolute; padding: 3px 5px; background: #F24822; color: #fff; font: 400 10px/1 var(--mono); border-radius: 4px; }
.smart-guide.vertical span { top: 50%; left: -12px; }
.smart-guide.horizontal span { top: -8px; left: 45%; }
.figma-text-box { position: absolute; left: 0; top: 0; }
.figma-caret { position: absolute; left: 0; top: 0; width: 1px; height: 1px; transform-origin: 0 0; background: #0D99FF; animation: caret-blink 1s steps(1, end) infinite; }
@keyframes caret-blink { 0%, 49% { background: #0D99FF; } 50%, 100% { background: transparent; } }
.image-drag-ghost { display: none; position: absolute; left: 20px; top: 8px; padding: 5px 8px; border: 1px solid #0D99FF; border-radius: 3px; background: #2c2c2c; color: white; white-space: nowrap; font: 10px/1.2 var(--mono); }
.has-image .image-drag-ghost { display: block; }
.is-pressed .cursor-arrow { fill: #0D99FF; stroke-width: 2; }
.multiplayer { z-index: 110; }
.cursor-chat { display: block; animation: chat-arrive 220ms ease-out; }
@keyframes chat-arrive { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.assembling .s-b, .assembling .s-d { opacity: 1; }
.assembling .cover-media { background: #383838; }
.assembling .work .artboard { transition: none; }
.assembling .work .artboard:hover, .assembling .work .artboard:focus-within { translate: none; }
@media (max-width: 899px) {
  .bar-tools, .play-hint, .shortcut-help { display: none !important; }
  .bar-tools-unused { position: fixed; left: 50%; bottom: 12px; margin: 0; padding: 4px; transform: translateX(-50%); border: 1px solid #555; border-radius: 7px; background: #2c2c2c; z-index: 102; }
}
html.static .assembly-ui, html.static .motion-skip { display: none !important; }
html.static .s-b { opacity: 0 !important; }
html.static .s-d { opacity: 1 !important; }
html.static { scroll-behavior: auto; }
@media (max-width: 1099px) { .team-presence { display: none; } }
@media (max-width: 767px) {
  .bar { gap: 6px; padding-inline: 12px; }
  .bar-name { max-width: 12ch; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .bar-status { display: none; }
  .bar-nav a { padding-inline: 7px; font-size: 11px; }
  .sheet { padding-inline: 16px; }
  .hero { padding-top: 22px; }
  .hero-stage { padding-top: 24px; padding-bottom: 16px; }
  .hero-mark { top: 26px; right: 0; width: 14cqi; height: 14cqi; }
  .name { font-size: var(--name-size, 17cqi); }
  .sub { margin-top: 24px; font-size: 15px; }
  .actions { gap: 8px; }
  .actions .btn { padding-inline: 16px; font-size: 12px; }
  .motion-skip { top: 20px; }
  .about, .contact { padding-top: 48px; }
  .contact-board { padding: 26px 20px; }
  .about-board { gap: 24px; padding: 24px 16px; }
  .about-overview, .about-details { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .about-photo { width: min(100%, 240px); justify-self: start; }
  .about-info { gap: 24px; }
  .about-info h2 { font-size: clamp(32px, 10vw, 48px); }
  .about-facts .about-sec { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .about-details { padding-top: 24px; }
  .about-details .tool-group { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .about-details .tool-k { line-height: 1.5; }
  :root { --rhythm: 72px; --card-pad: 12px; --card-gap: 16px; }
  .group-head { gap: 8px; padding-bottom: 40px; }
  .group-head h2 { font-size: clamp(40px, 11vw, 72px); }
  .group-count { font-size: 9px; }
  .work-state { top: -22px; }
  .work .artboard, .work[data-side="right"] .artboard { grid-template-columns: minmax(0, 1fr); }
  .work[data-side="right"] .cover, .work[data-side="right"] .info { grid-column: 1; grid-row: auto; }
  .cover { width: 100%; }
  .info h3 { font-size: calc(clamp(40px, 12vw, 56px) * var(--h-scale, 1)); }
  .work.is-lit .ab-bg { box-shadow: 0 0 36px color-mix(in srgb, var(--glow, #0D99FF) 22%, transparent); }
  .case-head .kind { font-size: 15px; }
  .big { font-size: clamp(40px, 15vw, 62px); overflow-wrap: anywhere; }
  .links { gap: 4px 20px; }
  .links a { font-size: 12px; }
  .case-head { padding-top: 28px; gap: 18px; }
  .case-head h1 { font-size: 15vw; }
  .frames { gap: 12px; }
  .foot { padding-block: 36px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .assembly-ui, .motion-skip { display: none !important; }
}

/* Comments are viewport UI, above the canvas and departing cursors. */
.marker-comment { position: fixed; z-index: 120; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; width: max-content; max-width: 260px; padding: 12px; border: 1px solid #626262; border-radius: 8px; background: #262626; color: #fff; box-shadow: 0 6px 24px #0005; animation: comment-open 150ms ease-out; overflow-wrap: anywhere; }
.marker-comment::before { content: ''; position: absolute; left: var(--tip-x); top: var(--tip-y); width: 12px; height: 12px; background: #262626; border: solid #626262; border-width: 1px 0 0 1px; transform: translate(-50%, -50%) rotate(var(--tip-angle)); }
.marker-comment[hidden] { display: none; }
.comment-avatar { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #a259ff; font: 700 12px/1 var(--display); }
.comment-label { color: var(--signal); font: 500 10px/1.4 var(--mono); letter-spacing: .02em; }
.comment-text { margin-top: 5px; font: 700 14px/1.4 var(--display); }
@keyframes comment-open { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .marker-comment { animation: none; } }

/* Visitor tools keep their selection independent of the assembly cursors. */
.bar-tools > button, .shortcut-help { position: relative; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: inherit; cursor: pointer; }
.bar-tools > button:disabled { opacity: .45; cursor: default; }
.bar-tools > button:not(:disabled):hover, .shortcut-help:hover { background: #444; color: #fff; }
.bar-tools > button.guest-active:not(:disabled) { background: #C8FF2E; color: #141414; }
html[data-playground-ready="true"] .bar-tools button[data-tool].is-active:not(.guest-active) { background: transparent; color: var(--chrome-dim); }
.play-hint { position: absolute; top: 60px; left: 230px; padding: 7px 10px; border: 1px solid #555; border-radius: 5px; background: #2c2c2c; color: #ddd; font: 10px/1.5 var(--mono); white-space: nowrap; z-index: 2; }
.play-layer { position: absolute; top: 0; left: 0; width: 100%; height: 0; z-index: 75; pointer-events: none; }
.play-object { position: absolute; box-sizing: border-box; pointer-events: auto; user-select: none; touch-action: none; cursor: move; color: #f5f5f5; }
.play-rect { background: #c8ff2e33; border: 1px solid #C8FF2E; }
.play-frame { border: 1px solid #aaa; background: #ffffff08; }
.play-frame::before { content: attr(data-name); position: absolute; bottom: calc(100% + 6px); left: 0; color: #aaa; font: 11px/1.4 var(--mono); white-space: nowrap; }
.play-selected { outline: 1px solid #0D99FF; outline-offset: 0; }
.play-handle { display: none; position: absolute; width: 6px; height: 6px; background: white; border: 1px solid #0D99FF; pointer-events: none; z-index: 2; }
.play-selected > .play-handle { display: block; }
.play-handle-0 { top: -3px; left: -3px; } .play-handle-1 { top: -3px; right: -3px; }
.play-handle-2 { bottom: -3px; right: -3px; } .play-handle-3 { bottom: -3px; left: -3px; }
.play-text, .play-sticky { width: min(240px, 80vw) !important; height: auto !important; min-height: 44px; padding: 8px; font: 500 20px/1.35 var(--display); overflow-wrap: anywhere; white-space: pre-wrap; }
.play-text { border: 1px solid #0D99FF; }
.play-sticky { min-height: 160px; padding: 16px; background: #FFC943; color: #25231c; box-shadow: 2px 5px 10px #0003; }
.play-object textarea { display: block; box-sizing: border-box; width: 100%; min-height: 60px; resize: none; overflow: hidden; padding: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; caret-color: currentColor; user-select: text; touch-action: auto; }
.play-pen { pointer-events: none; }
.play-pen svg { display: block; overflow: visible; pointer-events: none; }
.play-pen svg > path:first-child { pointer-events: stroke; cursor: move; }
html[data-play-tool="pen"] .play-pen { pointer-events: auto; }
.bar-tools button[data-tooltip]::after { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); padding: 6px 9px; background: #141414; border: 1px solid #555; border-radius: 4px; color: #fff; font: 11px/1.4 var(--mono); white-space: nowrap; pointer-events: none; opacity: 0; }
.bar-tools button[data-tooltip]:is(:hover, :focus-visible)::after { opacity: 1; }
.play-size { position: fixed; transform: translateX(-50%); z-index: 90; padding: 3px 7px; border-radius: 3px; background: #0D99FF; color: white; font: 10px/1.5 var(--mono); pointer-events: none; }
.visitor-cursor { position: fixed; left: 0; top: 0; z-index: 130; pointer-events: none; color: #62E8D5; }
.visitor-cursor svg { display: block; width: 20px; height: 24px; fill: currentColor; stroke: #17171a; stroke-width: 1; }
.visitor-cursor span { position: absolute; top: 22px; left: 15px; padding: 2px 7px; border-radius: 0 4px 4px; background: #62E8D5; color: #141414; font: 600 11px/1.5 var(--display); }
html:is([data-play-tool="rect"], [data-play-tool="frame"], [data-play-tool="pen"], [data-play-tool="sticky"]) .canvas { cursor: crosshair; }
html[data-playground-ready="true"]:is([data-play-tool="rect"], [data-play-tool="frame"], [data-play-tool="pen"]) .canvas { touch-action: pinch-zoom; }
html:not([data-play-tool="move"]) .visitor-cursor { display: none; }
html[data-play-tool="text"] .canvas { cursor: text; }
.portfolio-toast { position: fixed; z-index: 400; bottom: 80px; left: 50%; transform: translateX(-50%); padding: 12px 18px; max-width: calc(100vw - 32px); border: 1px solid #555; border-left: 3px solid #C8FF2E; border-radius: 5px; background: #2c2c2c; color: #fff; font: 12px/1.5 var(--mono); box-shadow: 0 8px 30px #0005; }
.shortcut-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 24px; overflow: auto; border: 1px solid #555; border-radius: 8px; background: #2c2c2c; color: #f5f5f5; box-shadow: 0 20px 90px #0008; }
.shortcut-dialog::backdrop { background: #0009; }
.shortcut-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.shortcut-dialog h2 { font: 800 24px/1.1 var(--display); }
.shortcut-dialog header button { border: 0; padding: 0 8px; background: transparent; font-size: 28px; cursor: pointer; }
.shortcut-dialog p { margin-top: 16px; color: #bbb; font-size: 12px; }
.shortcut-dialog dl { margin-top: 20px; }
.shortcut-dialog dl > div { display: grid; grid-template-columns: 135px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid #444; font-size: 13px; }
kbd { display: inline-block; min-width: 22px; padding: 2px 5px; border: 1px solid #666; border-radius: 3px; font: 11px/1.5 var(--mono); text-align: center; }
.cv-link { align-self: start; justify-self: start; }
[hidden] { display: none !important; }
@media (max-width: 767px) { .play-hint { position: fixed; top: auto; bottom: 58px; left: 50%; transform: translateX(-50%); font-size: 9px; } .bar-tools > button { width: 32px; height: 36px; } .shortcut-dialog { padding: 18px; } .shortcut-dialog dl > div { grid-template-columns: 112px 1fr; gap: 8px; } }

/* A single A4 artboard, with the same display font and file chrome. */
.cv-page { background-color: #1e1e1e; }
.cv-actions { width: min(210mm, calc(100% - 24px)); margin: 20px auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px; }
.cv-sheet { width: 210mm; min-height: 297mm; margin: 0 auto 30px; padding: 12mm 14mm; background: #2c2c2c; border: 1px solid #555; }
.cv-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; padding-bottom: 5mm; border-bottom: 1px solid #555; }
.cv-head h1 { margin: 3mm 0; font: 900 48px/.95 var(--display); letter-spacing: -2px; }
.cv-head p { color: #C8FF2E; font-size: 15px; }
.cv-photo { width: 31mm; height: 42mm; object-fit: cover; border: 1px solid #0D99FF; }
.cv-bio { margin: 5mm 0; font-size: 11px; line-height: 1.5; }
.cv-columns { display: grid; grid-template-columns: 1.12fr 1fr; gap: 7mm; }
.cv-sheet h2 { margin: 0 0 3mm; color: #C8FF2E; font: 700 13px/1.2 var(--display); }
.cv-sheet section { margin-bottom: 5mm; break-inside: avoid; }
.cv-sheet p, .cv-sheet .timeline { font-size: 10px; line-height: 1.45; }
.cv-sheet .timeline { display: grid; gap: 4mm; }
.cv-sheet .timeline li { grid-template-columns: 55px 1fr; gap: 8px; }
.cv-sheet .timeline b { font-size: 11px; line-height: 1.4; }
.cv-sheet .timeline .tl-y { font-size: 9px; }
.cv-sheet .timeline p { margin-top: 2px; }
.cv-sheet .tool-groups { gap: 3mm; }
.cv-sheet .tool-group { display: block; }
.cv-sheet .tool-k { display: block; font-size: 10px; line-height: 1.5; margin-bottom: 1mm; }
.cv-sheet .chips { gap: 3px; }
.cv-sheet .chip { padding: 2px 5px; font-size: 9px; line-height: 1.4; min-height: 0; }
.cv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; }
.cv-grid a { text-decoration: none; font-size: 10px; line-height: 1.3; }
.cv-grid img { display: block; width: 100%; height: 22mm; object-fit: cover; margin-bottom: 1mm; }
.cv-contact { display: flex; justify-content: space-between; gap: 12px; padding-top: 4mm; border-top: 1px solid #555; font-size: 11px; }
.cv-contact span { color: #C8FF2E; }
@media screen and (max-width: 800px) { .cv-sheet { width: calc(100% - 24px); min-height: 0; padding: 24px; } .cv-head h1 { font-size: clamp(32px, 7vw, 48px); } .cv-photo { width: 24%; height: auto; } .cv-columns { grid-template-columns: 1fr; gap: 0; } .cv-sheet p, .cv-sheet .timeline { font-size: 12px; } .cv-contact { flex-wrap: wrap; overflow-wrap: anywhere; } }
@page { size: A4; margin: 0; }
@media print { html:has(.cv-page) { scroll-behavior: auto; } .cv-page { background: #2c2c2c; print-color-adjust: exact; -webkit-print-color-adjust: exact; } .cv-actions { display: none; } .cv-sheet { width: 210mm; height: 297mm; min-height: 0; margin: 0; border: 0; } }

/* Share card: render at exactly 1200 × 630. */
.og-page { width: 1200px; height: 630px; overflow: hidden; }
.og-card { position: relative; width: 1200px; height: 630px; padding: 48px 60px; }
.og-card header { display: flex; align-items: center; gap: 24px; color: #a0a0a0; font: 15px var(--mono); }
.og-card h1 { margin-top: 32px; font: 900 128px/.9 var(--display); letter-spacing: -6px; }
.og-card > p { margin-top: 25px; font: 500 28px var(--display); color: #C8FF2E; }
.og-covers { position: absolute; right: 60px; top: 150px; display: grid; gap: 14px; transform: rotate(5deg); }
.og-covers img { width: 210px; height: 120px; object-fit: cover; border: 1px solid #666; box-shadow: 6px 6px 0 #0D99FF; }

@media (hover: none), (pointer: coarse) { .bar-tools button[data-tooltip]::after { display: none; } }

@media (min-width: 768px) and (max-width: 899px) { .play-hint { position: fixed; top: auto; bottom: 58px; left: 50%; transform: translateX(-50%); } }
