/* Self-hosted (SIL Open Font License): no third-party request on page load. */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/hanken-grotesk-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/hanken-grotesk-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/hanken-grotesk-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/hanken-grotesk-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/hanken-grotesk-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/hanken-grotesk-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/instrument-serif-400i-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/instrument-serif-400i-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/vt323-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/vt323-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Pixelify Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/pixelify-sans-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Pixelify Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/pixelify-sans-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Pixelify Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/pixelify-sans-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Pixelify Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/pixelify-sans-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Shippori Mincho';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/shippori-mincho-400.woff2) format('woff2');
  unicode-range: U+20-7e, U+b7, U+2013-2014, U+2019, U+201c-201d, U+304d-304e, U+3059-305a, U+306a, U+3099, U+534a, U+7cf8, U+7d46;
}
@font-face {
  font-family: 'Shippori Mincho';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/shippori-mincho-600.woff2) format('woff2');
  unicode-range: U+20-7e, U+b7, U+2013-2014, U+2019, U+201c-201d, U+304d-304e, U+3059-305a, U+306a, U+3099, U+534a, U+7cf8, U+7d46;
}

/* World: his room at night, then his computer. The page opens on a young printmaker at a 1990s CRT;
   scrolling pushes the camera into his screen, it boots, and Kizuna Labs is the software installed on it.
   Each section is a program: click an icon, a window opens inside his old monitor. Vermillion only where something connects. */
:root {
  --sumi: #111110;
  --sumi-2: #181716;
  --ash: #2A2826;
  --ash-2: #3A3734;
  --future: #827D75;
  --stone: #8C877E;
  --stone-2: #B5B0A6;
  --paper: #F2EEE6;
  --vermillion: #FF4B3E;
  --bezel: #1F1E1C;
  --bezel-2: #2A2826;
  --scan: rgba(0,0,0,0.22);
  --flash: #E3DACB;
  --plate: 14,14,13;
  --display: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --voice: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --crt: "VT323", ui-monospace, Menlo, monospace;
  --pixel: "Pixelify Sans", "VT323", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}
/* Paper: his computer by day. The room stays at night (the scene does not read in daylight) */
:root[data-theme="paper"] .monitor {
  --sumi: #F7F5F0;
  --sumi-2: #EFECE5;
  --ash: #DDD8CE;
  --ash-2: #C9C3B8;
  --future: #6B665E;
  --stone: #6B665E;
  --stone-2: #4A4640;
  --paper: #111110;
  --bezel: #DDD8CE;
  --bezel-2: #C9C3B8;
  --scan: rgba(0,0,0,0.035);
  --flash: #FFFFFF;
  --plate: 247,245,240;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
:root { --px-corners: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px)); }
html { scroll-behavior: smooth; background: var(--sumi); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #0E0E0D; color: var(--paper); font-family: var(--display); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
::selection { background: var(--vermillion); color: #111110; }
* { scrollbar-color: var(--ash-2) transparent; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
:focus-visible { outline: 2px solid var(--vermillion); outline-offset: 3px; }
button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
input { caret-color: var(--vermillion); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.04em; line-height: 0.95; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.voice { font-family: var(--voice); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dot { position: relative; color: transparent !important; }
.dot::after { content: ""; position: absolute; left: 0.04em; bottom: 0.09em; width: 0.17em; height: 0.17em; background: var(--vermillion); }
.toggle, .follow button, .vote, .theme-btn, .skip { clip-path: var(--px-corners); }
.legend, .count small, .node .st, .live h3, .live a span, .live .pending span, .art .cap, .vote .tally, .vote-note, .follow label, .layers, .hint, .theme-btn, .nav a, .nav button { font-family: var(--pixel); }
.skip { position: absolute; left: var(--gutter); top: 12px; transform: translateY(-80px); z-index: 100; background: var(--paper); color: var(--sumi); padding: 10px 14px; font-weight: 600; text-decoration: none; transition: transform .2s var(--ease); }
.skip:focus-visible { transform: none; }
#mark-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- The room: the first image, the camera pushes into his screen as you scroll ---------- */
.room { height: 380vh; }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; background: #0E0E0D; }
.shots { position: absolute; inset: 0; container-type: size; }
.shot { position: absolute; inset: 0; opacity: 0; }
.frame { position: absolute; left: 50%; top: 50%; width: max(100cqw, 179.1cqh); aspect-ratio: 480 / 268; translate: -50% -50%; will-change: transform; }
.frame img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.pxmark { position: absolute; image-rendering: pixelated; }
/* the mascots, asleep, as inhabitants of the room rather than stickers (built with tools/mascot.swift, shadow.swift, occlude.swift):
   the cat curled up between the two floppy-disk boxes, which stand in front of it, lit a little warmer on the window side;
   the dog asleep at his feet under the desk, its back behind the desk's front edge and its hindquarters behind his leg,
   so only the head and front paws show. Positions in px1 pixels (480×268). Almost always still: now and then the tip of
   the cat's tail flicks and the dog's ear moves, one pixel each (frame 2 of a two-frame strip, tools/twitch.swift). */
.frame .pet { position: absolute; display: block; background: no-repeat 0 0 / 200% 100%; image-rendering: pixelated; animation: 11s steps(1) infinite; }
.frame .pet-cat { left: 62.5%; top: 61.94%; width: 10.417%; height: 12.313%; background-image: url(/assets/scene/cat-strip.6d716050c6.png); animation-name: tail-flick; animation-delay: -4s; }
.frame .pet-dog { left: 32.917%; top: 79.851%; width: 18.75%; height: 15.299%; background-image: url(/assets/scene/dog-strip.8b9245a1fa.png); animation-name: ear-lift; animation-duration: 15s; }
@keyframes tail-flick { 0%, 100% { background-position: 0 0; } 62% { background-position: 100% 0; } 63.5% { background-position: 0 0; } 66% { background-position: 100% 0; } 67.5% { background-position: 0 0; } }
@keyframes ear-lift { 0%, 100% { background-position: 0 0; } 31% { background-position: 100% 0; } 34% { background-position: 0 0; } }
.intro { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; padding: 0 var(--gutter) clamp(24px, 5vh, 48px); }
.intro::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(var(--plate), .94) 0%, rgba(var(--plate), .8) 30%, rgba(var(--plate), 0) 58%); }
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: 16px; letter-spacing: 0.02em; }
.brand svg { width: 26px; height: 26px; }
.nav-right { display: flex; align-items: center; gap: 4px; }
.nav button.link { font-size: 15px; color: var(--stone-2); background: none; border: 0; min-height: 44px; padding: 0 10px; cursor: pointer; transition: color .2s; }
.nav button.link:hover { color: var(--paper); }
.theme-btn { font: inherit; font-family: var(--pixel); font-size: 14px; color: var(--stone-2); background: none; border: 1px solid var(--ash-2); min-height: 34px; padding: 0 12px; margin-left: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: color .2s, border-color .2s; }
.theme-btn:hover { color: var(--paper); border-color: var(--stone); }
.theme-btn i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.intro h1 { font-size: clamp(44px, 6vw, 96px); max-width: 13ch; }
.intro .sub { margin-top: 22px; max-width: 34ch; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; color: var(--stone-2); }
.intro-foot { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.hint { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--stone-2); }
.hint i { width: 8px; height: 8px; background: var(--vermillion); animation: blink 1s steps(1) infinite; }

/* the monitor: his CRT filling the viewport */
.monitor { position: absolute; inset: 0; z-index: 3; opacity: 0; visibility: hidden; background: var(--bezel); padding: clamp(8px, 1.6vw, 22px) clamp(8px, 1.6vw, 22px) clamp(16px, 3.4vh, 36px); }
.monitor::after { content: ""; position: absolute; right: clamp(22px, 3vw, 46px); bottom: clamp(6px, 1.3vh, 14px); width: 8px; height: 4px; background: #FFC93C; }
.screen { position: relative; height: 100%; border-radius: 14px / 16px; overflow: hidden; background: var(--sumi); box-shadow: inset 0 0 0 2px var(--bezel-2); }
.screen::after, .desk::before, .menubar::after, .win:not(#app-kizuna)::after, .alert::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, var(--scan) 0 1px, transparent 1px 3px); }
.screen::after { z-index: 60; }
/* on the desktop the scanlines move onto each surface, so the 絆 program can stay clean paper */
.screen.desk-on::after { display: none; }
.desk::before { z-index: 5; }
.win::after, .alert::after { z-index: 20; }
.flash { position: absolute; inset: 0; z-index: 50; background: var(--flash); pointer-events: none; }
.boot { position: absolute; inset: 0; padding: clamp(20px, 4vw, 52px); font-family: var(--crt); font-size: clamp(19px, 2vw, 26px); line-height: 1.35; color: var(--stone-2); white-space: pre-wrap; }
.boot b { font-weight: 400; color: var(--paper); }
.boot em { font-style: normal; color: var(--vermillion); }

/* ---------- The desktop ---------- */
.desktop { position: absolute; inset: 0; z-index: 1; isolation: isolate; display: flex; flex-direction: column; opacity: 0; visibility: hidden; }
.menubar { flex: none; height: 36px; display: flex; align-items: center; gap: 12px; padding: 0 10px 0 14px; background: var(--sumi-2); border-bottom: 2px solid var(--ash-2); font-family: var(--pixel); font-size: 14px; position: relative; z-index: 30; }
.menubar .brand { font-family: var(--display); font-size: 14px; min-height: 0; gap: 8px; }
.menubar .brand svg { width: 18px; height: 18px; }
.menubar .sp { flex: 1; }
.menubar .mb { font: inherit; color: var(--stone-2); background: none; border: 0; min-height: 32px; padding: 0 8px; cursor: pointer; }
.menubar .mb:hover { color: var(--paper); }
.menubar .theme-btn { min-height: 26px; margin: 0; font-size: 13px; }
.clock { font-family: var(--crt); font-size: 21px; color: var(--paper); min-width: 4ch; text-align: right; }
.desk { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--sumi); }
#wallmark { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: min(48%, 62vh); image-rendering: pixelated; pointer-events: none; }
#drawmark { position: absolute; left: 50%; top: calc(50% + 18px); translate: -50% -50%; width: min(48%, 62vh); image-rendering: pixelated; pointer-events: none; opacity: 0; z-index: 2; }
.icons { list-style: none; margin: 0; padding: 18px 10px; display: grid; gap: 4px; width: 116px; position: relative; z-index: 1; }
.icon { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 96px; padding: 8px 2px; background: none; border: 0; color: var(--paper); font-family: var(--pixel); font-size: 13px; line-height: 1.2; text-align: center; cursor: pointer; }
.icon svg { width: 44px; height: 44px; shape-rendering: crispEdges; overflow: visible; }
.icon span { padding: 1px 5px; }
.icon:hover span { background: var(--ash-2); }
.icon:focus-visible { outline: none; }
.icon:focus-visible span { outline: 1px dotted var(--paper); outline-offset: 1px; }
.icon .led { fill: none; }
.icon.lit .led { fill: var(--vermillion); }
.status { position: absolute; right: 14px; bottom: 10px; z-index: 1; font-family: var(--pixel); font-size: 12px; color: var(--stone); }

/* windows */
.win { position: absolute; z-index: 10; display: flex; flex-direction: column; min-width: 280px; background: var(--sumi-2); border: 2px solid var(--stone); box-shadow: 6px 6px 0 rgba(0,0,0,.45); }
.win[hidden] { display: none; }
.win.active { border-color: var(--paper); }
.win-bar { flex: none; height: 30px; display: flex; align-items: center; gap: 10px; padding: 0 8px; border-bottom: 2px solid var(--stone); cursor: grab; touch-action: none; user-select: none; }
.win-bar:active { cursor: grabbing; }
.win.active .win-bar { border-bottom-color: var(--paper); background: repeating-linear-gradient(180deg, var(--ash-2) 0 2px, transparent 2px 4px); background-clip: content-box; padding-block: 7px; }
.win-close { position: relative; flex: none; width: 18px; height: 18px; padding: 0; border: 2px solid var(--paper); background: var(--sumi-2); cursor: pointer; }
.win-close::before { content: ""; position: absolute; inset: -12px; }
.win-close:hover { background: var(--vermillion); }
.win-title:focus { outline: none; }
.win-title { margin: 0 auto; padding: 2px 10px; background: var(--sumi-2); font-family: var(--pixel); font-size: 14px; font-weight: 500; letter-spacing: 0; line-height: 1; white-space: nowrap; outline-offset: 2px; }
.win-body { flex: 1; min-height: 0; overflow: auto; padding: clamp(18px, 2.6vw, 36px); container-type: inline-size; overscroll-behavior: contain; }
.display { font-size: clamp(30px, 6.4cqw, 66px); font-weight: 600; letter-spacing: -0.04em; line-height: 0.98; }
.fade { animation: rise .6s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* app: who can build software (the field) */
.field-body { position: relative; padding: 0; overflow: hidden; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.field-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 24px; padding: 14px 18px; background: var(--sumi-2); border-top: 2px solid var(--ash-2); }
.switch { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.toggle { display: inline-flex; border: 1px solid var(--ash-2); background: var(--sumi); }
.toggle button { font: inherit; font-size: 15px; font-weight: 500; color: var(--stone-2); background: none; border: 0; min-height: 44px; padding: 0 18px; cursor: pointer; transition: background-color .3s var(--ease), color .3s var(--ease); }
.toggle button:hover { color: var(--paper); }
.toggle button[aria-pressed="true"] { background: var(--paper); color: var(--sumi); }
.count { font-family: var(--crt); font-size: clamp(28px, 3vw, 38px); line-height: 1; font-variant-numeric: tabular-nums; min-width: 14ch; }
.count small { display: block; font-size: 13px; color: var(--stone); margin-top: 4px; }
.legend { display: grid; gap: 2px; color: var(--stone); font-size: 12px; text-align: right; }
.legend i { display: inline-block; width: 6px; height: 6px; background: var(--paper); margin: 0 6px 1px 0; vertical-align: middle; }

/* app: belief.txt */
.doc { max-width: 62ch; display: grid; gap: 22px; }
.doc .lede { font-size: clamp(20px, 3cqw, 28px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; }
.doc h3 { font-size: clamp(24px, 4cqw, 40px); margin-top: 24px; }
.doc p { color: var(--stone-2); font-size: clamp(16px, 2cqw, 19px); }
.doc .end { color: var(--paper); font-weight: 500; }
.layers { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 16px; color: var(--stone-2); }
.layers li { position: relative; transition: color .4s var(--ease); }
.layers li::after { content: ""; position: absolute; left: -2px; right: -2px; top: 54%; height: 2px; background: var(--vermillion); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.layers li.gone { color: var(--ash-2); }
.layers li.gone::after { transform: scaleX(1); }
.typed { font-family: var(--crt); font-size: 22px; color: var(--paper); }
.typed b { color: var(--vermillion); font-weight: 400; margin-right: .4em; }

/* app: experiments */
.exp-head p { margin-top: 22px; max-width: 54ch; color: var(--stone-2); font-size: clamp(16px, 2cqw, 19px); }
.live { margin-top: 44px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 32px; align-items: baseline; }
.live h3 { font-size: 14px; font-weight: 500; letter-spacing: 0; line-height: 1.5; color: var(--stone); padding-top: 16px; }
.live ul { list-style: none; margin: 0; padding: 0; }
.live li { border-top: 1px solid var(--ash-2); }
.live li:last-child { border-bottom: 1px solid var(--ash-2); }
.live a, .live .pending { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 16px 0; text-decoration: none; font-size: clamp(17px, 2.2cqw, 22px); letter-spacing: -0.01em; transition: color .2s; }
.live a:hover { color: var(--vermillion); }
.live a span, .live .pending span { flex: none; font-size: 13px; letter-spacing: 0; color: var(--stone); }
.thread { position: relative; margin-top: 64px; }
.thread-line { position: absolute; left: calc(100% / 24); right: calc(100% / 24); top: 22px; height: 1px; background: linear-gradient(90deg, var(--stone) 0%, var(--ash-2) 45%, var(--sumi-2) 100%); }
.thread-trail { position: absolute; left: calc(100% / 24); right: calc(100% / 24); top: 22px; height: 1px; background: var(--vermillion); transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease); }
.signal { position: absolute; top: 22px; left: calc(100% / 24); width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--vermillion); transition: transform .9s var(--ease); z-index: 2; }
.nodes { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.node { display: flex; flex-direction: column; align-items: center; gap: 12px; background: none; border: 0; color: inherit; font: inherit; padding: 0 0 6px; cursor: pointer; }
.node:disabled { cursor: default; }
.node .pin { width: 44px; height: 44px; display: grid; place-items: center; }
.node .pin span { width: 8px; height: 8px; background: var(--paper); transition: transform .3s var(--ease); }
.node:not(:disabled):hover .pin span { transform: scale(1.6); }
.node .no { font-size: clamp(18px, 3.2cqw, 32px); font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.node .st { font-size: 12px; color: var(--stone); white-space: nowrap; min-height: 1.5em; }
.node[aria-pressed="true"] .st { color: var(--paper); }
.node.future .pin span { width: 4px; height: 4px; background: var(--ash-2); }
.node.future .no { color: var(--future); }
.detail { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 4cqw, 56px); align-items: start; min-height: 360px; }
.detail h3 { margin: 0 0 18px; font-size: clamp(30px, 5cqw, 54px); }
.detail .q { font-size: clamp(18px, 2.2cqw, 22px); line-height: 1.35; color: var(--stone-2); max-width: 30ch; }
.detail .q em { font-style: normal; color: var(--paper); }
.detail .meta { margin: 24px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; max-width: 420px; padding-top: 16px; border-top: 1px solid var(--ash-2); }
.detail .meta dt { color: var(--stone); font-size: 14px; }
.detail .meta dd { margin: 0; font-size: 14px; text-align: right; }
.art { border: 1px solid var(--ash-2); background: var(--sumi); position: relative; overflow: hidden; }
.art svg { display: block; width: 100%; height: auto; }
.art .cap { padding: 0 16px 14px; font-size: 12px; color: var(--stone); }
.votes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; max-width: 560px; }
.vote { text-align: left; font: inherit; color: var(--paper); background: none; border: 1px solid var(--ash-2); padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .25s, background-color .25s; }
.vote:hover { border-color: var(--stone); }
.vote:active { transform: translateY(1px); }
.vote:disabled { cursor: default; opacity: .6; }
.vote[aria-pressed="true"] { border-color: var(--vermillion); background: rgba(255,75,62,.07); }
.vote b { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.vote .what { font-size: 14px; color: var(--stone-2); line-height: 1.4; }
.vote .tally { font-size: 13px; color: var(--stone); font-variant-numeric: tabular-nums; }
.vote-note { margin-top: 12px; font-size: 13px; color: var(--stone); max-width: 56ch; }
.report { margin-top: 64px; border-top: 1px solid var(--ash-2); padding-top: 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px 32px; }
.report h3 { font-size: clamp(20px, 2.6cqw, 26px); letter-spacing: -0.03em; line-height: 1.1; }
.report p { color: var(--stone-2); max-width: 60ch; }

/* app: 絆, the only thing on his computer that is not pixel art: washi, sumi ink, a mincho face, a vermillion seal */
.wa { --washi: #F4EFE4; --sumi-ink: #1C1A17; --usuzumi: #6E675C; --shu: #E0402F; --mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  background-color: var(--washi); color: var(--sumi-ink); font-family: var(--mincho);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' seed='8'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.4 0 0 0 0 0.32 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23f)'/%3E%3C/svg%3E");
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr); gap: clamp(28px, 5cqw, 64px); align-items: center; padding: clamp(24px, 4cqw, 56px); }
.wa ::selection { background: var(--shu); color: var(--washi); }
.wa-scroll { display: grid; justify-items: center; gap: 14px; }
.wa-paper { position: relative; width: 100%; max-width: 380px; padding: 30px 26px 54px; background: #FBF8F1; border-top: 10px solid #3B3128; border-bottom: 14px solid #3B3128; box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 18px 30px -18px rgba(40,30,20,.45); }
.wa-paper::before, .wa-paper::after { content: ""; position: absolute; top: -10px; bottom: -14px; width: 1px; background: rgba(59,49,40,.25); }
.wa-paper::before { left: 8px; } .wa-paper::after { right: 8px; }
.wa-yomi { position: absolute; right: 16px; top: 26px; writing-mode: vertical-rl; font-size: 13px; letter-spacing: .35em; color: var(--usuzumi); }
#kanji { width: 100%; aspect-ratio: 118 / 104; display: block; color: var(--sumi-ink); touch-action: pan-y; cursor: pointer; overflow: visible; }
#kanji .half { transition: transform .9s var(--ease); }
#kanji.apart #k-thread { transform: translateX(-11px); }
#kanji.apart #k-half { transform: translateX(11px); }
#kanji .bond { fill: var(--shu); }
.wa-parts { display: grid; grid-template-columns: 1fr 1fr; margin-top: 14px; font-size: 14px; color: var(--usuzumi); }
.wa-parts span { opacity: 0; transition: opacity .7s var(--ease); }
.wa-parts span:last-child { text-align: right; }
.wa-parts b { color: var(--sumi-ink); font-weight: 600; margin-right: 6px; }
.wa-paper.apart .wa-parts span { opacity: 1; }
.hanko { position: absolute; right: 22px; bottom: 16px; width: 26px; height: 26px; display: grid; place-items: center; background: var(--shu); color: #FBF8F1; font-size: 15px; font-weight: 600; border-radius: 3px; transform: rotate(-2deg); }
.wa-btn { font: inherit; font-family: var(--mincho); font-size: 15px; color: var(--sumi-ink); background: none; border: 0; border-bottom: 1px solid var(--usuzumi); padding: 10px 2px 4px; min-height: 44px; cursor: pointer; }
.wa-btn:hover { color: var(--shu); border-color: var(--shu); }
.wa-btn:focus-visible, #kanji:focus-visible { outline: 2px solid var(--shu); outline-offset: 4px; }
.wa-reading { font-size: 14px; color: var(--usuzumi); letter-spacing: .02em; }
.wa-reading b { color: var(--sumi-ink); font-weight: 600; margin-right: 10px; }
.wa-text h3 { margin-top: 18px; font-family: var(--mincho); font-size: clamp(24px, 3.6cqw, 36px); font-weight: 600; line-height: 1.32; letter-spacing: 0; max-width: 20ch; }
.wa-anatomy { margin: 30px 0 0; display: grid; max-width: 46ch; }
.wa-anatomy div { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid rgba(28,26,23,.18); }
.wa-anatomy div:last-child { border-bottom: 1px solid rgba(28,26,23,.18); }
.wa-anatomy dt { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.wa-anatomy dt span[lang] { font-size: 1.3em; }
.wa-anatomy dd { margin: 0; color: #4A443B; font-size: 15px; line-height: 1.6; }
.wa-anatomy .bond-row dt { color: var(--shu); }
.wa-anatomy .seal { width: 10px; height: 10px; background: var(--shu); border-radius: 2px; }
/* narrow windows (phones, or a small window): the scroll first, the words under it */
@media (max-width: 760px) {
  .wa { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 32px; padding: 28px 22px 40px; }
  .wa-paper { max-width: 300px; padding: 24px 20px 46px; }
  .wa-text h3 { font-size: 26px; max-width: none; }
  .wa-anatomy { margin-top: 24px; }
  .wa-anatomy div { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 0; }
}
/* app: follow */
.follow { display: grid; gap: 28px; max-width: 640px; }
.follow > p { color: var(--stone-2); max-width: 40ch; font-size: clamp(16px, 2cqw, 19px); }
.follow label { display: block; font-size: 14px; font-weight: 500; color: var(--stone-2); margin-bottom: 6px; }
.follow .field { display: flex; gap: 12px; border-bottom: 1px solid var(--paper); padding-bottom: 10px; }
.follow .field:focus-within { outline: 2px solid var(--vermillion); outline-offset: 6px; }
.follow input { flex: 1; min-width: 0; background: none; border: 0; color: var(--paper); font-family: var(--crt); font-size: 26px; line-height: 1; padding: 6px 0; outline: none; }
.follow input::placeholder { color: var(--stone); opacity: 1; }
.follow button { font: inherit; font-size: 15px; font-weight: 600; color: var(--sumi); background: var(--paper); border: 0; min-height: 44px; padding: 0 20px; cursor: pointer; white-space: nowrap; transition: background-color .2s, color .2s; }
.follow button:hover { background: var(--vermillion); color: #111110; }
.follow button[aria-busy="true"] { cursor: progress; background: var(--stone-2); }
.follow .status { position: static; margin-top: 12px; min-height: 1.5em; font-size: 15px; color: var(--stone-2); display: flex; gap: 8px; align-items: baseline; }
.follow .status.err { color: var(--paper); }
.follow .status.err::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--vermillion); transform: translateY(-1px); }
.follow .status.ok { color: var(--paper); font-weight: 500; }

.follow .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.follow .fine { margin-top: 10px; font-family: var(--pixel); font-size: 12px; color: var(--stone); }
.follow .fine a, .status a { color: inherit; }
.follow .fine a:hover, .status a:hover { color: var(--paper); }
.status a { pointer-events: auto; }

/* phones and tablets: one screen, a tap turns the computer on (matches tapMode in app.js) */
.power, .hint .by-tap { display: none; }
@media (max-width: 760px), (pointer: coarse) {
  .room { height: 100svh; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  .power { display: block; position: absolute; inset: 0; z-index: 1; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .power:focus-visible { outline-offset: -6px; }
  .hint { display: none; }
  /* the call to action sits on his screen (px1: x 189–235, y 125–164 of 480×268), where the tap belongs */
  .frame .crt-cta { display: flex; }
}
.crt-cta { display: none; position: absolute; left: 39.375%; top: 46.64%; width: 9.583%; height: 14.55%; margin: 0; container-type: size;
  align-items: flex-start; white-space: nowrap; pointer-events: none; font-family: var(--crt); color: #2A2826; text-transform: uppercase; }
/* margins are on the child so the cq units measure the screen, not the scene */
.crt-cta span { margin: 13cqh 0 0 8cqw; font-size: 15.5cqh; line-height: 1.05; }
.crt-cta b { font-weight: 400; color: var(--vermillion); margin-right: .35em; }
.crt-cta i { display: inline-block; width: .5em; height: .82em; margin-left: .2em; vertical-align: -0.08em; background: var(--vermillion); animation: blink 1s steps(1) infinite; }

/* system dialog */
.alert { position: absolute; z-index: 9000; left: 50%; top: 42%; translate: -50% -50%; width: min(420px, calc(100% - 32px)); background: var(--sumi-2); border: 2px solid var(--paper); box-shadow: 8px 8px 0 rgba(0,0,0,.5); font-family: var(--pixel); }
.alert[hidden] { display: none; }
.alert .win-bar { cursor: default; border-bottom-color: var(--paper); background: repeating-linear-gradient(180deg, var(--ash-2) 0 2px, transparent 2px 4px); background-clip: content-box; padding-block: 7px; }
.alert-body { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 20px; align-items: start; }
.alert-body svg { width: 40px; height: 40px; shape-rendering: crispEdges; }
.alert-body p { font-family: var(--display); font-size: 16px; color: var(--stone-2); }
.alert-body p b { display: block; color: var(--paper); font-weight: 600; font-size: 18px; margin-bottom: 4px; }
.alert-ok { grid-column: 2; justify-self: end; font: inherit; font-size: 15px; color: var(--sumi); background: var(--paper); border: 0; min-height: 40px; min-width: 88px; padding: 0 18px; cursor: pointer; clip-path: var(--px-corners); }
.alert-ok:hover { background: var(--vermillion); color: #111110; }

@container (max-width: 660px) {
  .detail, .live, .report { grid-template-columns: minmax(0, 1fr); }
  .nodes .node .st { display: none; }
  .nodes .node .no { font-size: 14px; }
  .node .pin { width: 26px; height: 26px; }
  .thread-line, .thread-trail, .signal { top: 13px; }
  .votes { grid-template-columns: 1fr; }
  .live h3 { padding-top: 0; }
}
@media (max-width: 760px) {
  .nav .link { display: none; }
  .intro::before { background: linear-gradient(0deg, rgba(var(--plate), .95) 0%, rgba(var(--plate), .85) 45%, rgba(var(--plate), 0) 75%); }
  .icons { grid-template-columns: repeat(3, minmax(0, 1fr)); width: auto; padding: 18px 12px; justify-items: center; }
  .win { inset: 0 !important; width: auto !important; height: auto !important; border-width: 0; box-shadow: none; }
  .win-bar { height: 44px; }
  .status, .menubar .mb-room { display: none; }
  .legend { text-align: left; }
}
/* phones held upright: frame him (not the middle of the room), push the camera onto his screen, and make the desktop a home screen */
@media (max-width: 760px) and (orientation: portrait) {
  /* the room sits in the lower 72% of the screen, framed on him, his screen, the 絆 print and the cat (focal point x = 41%) */
  #shot-1 .frame { top: auto; bottom: 0; translate: -50% 0; width: calc(72cqh * 1.791); left: calc(50% + 11.6cqh); }
  /* the desk's right half is out of this narrow frame: here the cat sleeps at the back of the desk against the window,
     behind the monitor and the mug, which both stand in front of it (px1 245,155; on top of the CRT it read as floating) */
  .frame .pet-cat { left: 51.042%; top: 57.836%; width: 9.167%; height: 11.194%; background-image: url(/assets/scene/cat-phone-strip.7888b1ceb2.png); }
  .intro { justify-content: flex-start; }
  .intro::before { background: linear-gradient(180deg, rgb(var(--plate)) 0%, rgb(var(--plate)) 27%, rgba(var(--plate), 0) 38%); }
  .intro h1 { font-size: clamp(30px, 9vw, 44px); }
  .intro .sub { margin-top: 14px; font-size: 17px; }
  .intro-foot { gap: 16px; }
}
@media (max-width: 760px) {
  .icons { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 6px; padding: 28px 14px 12px; }
  .icon { width: 100%; font-size: 14px; gap: 8px; }
  .icon svg { width: 56px; height: 56px; }
  .desk .tap-hint { display: flex; }
  #wallmark { top: 68%; width: min(72%, 40vh); }
  #drawmark { top: calc(68% + 18px); width: min(72%, 40vh); }
  .win-bar { gap: 6px; }
  .win-close { width: auto; height: 36px; padding: 0 8px; border: 0; background: none; display: inline-flex; align-items: center; }
  .win-close::after { content: "← Desktop"; font-family: var(--pixel); font-size: 14px; color: var(--paper); white-space: nowrap; }
  :lang(es) .win-close::after { content: "← Volver"; }
  .win-close:hover { background: none; }
  .win-close:hover::after { color: var(--vermillion); }
  .win-title { margin: 0 0 0 auto; }
  .alert { top: 50%; }
}
.tap-hint { display: none; position: relative; z-index: 1; justify-content: center; align-items: center; gap: 8px; margin: 6px 0 0; font-family: var(--pixel); font-size: 14px; color: var(--stone-2); }
.tap-hint i { width: 8px; height: 8px; background: var(--vermillion); animation: blink 1s steps(1) infinite; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; } html { scroll-behavior: auto; } }

/* Language switch: in the room (over the tap-to-turn-on area) and on his menu bar */
.nav { position: relative; z-index: 2; }
.nav a.lang { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 15px; color: var(--stone-2); text-decoration: none; transition: color .2s; }
.nav a.lang:hover { color: var(--paper); }
.menubar a.mb { display: inline-flex; align-items: center; text-decoration: none; }
