/* ───────────────────────── Tokens ───────────────────────── */
:root {
  --bg: #F6F8FB;
  --surface: #EEF2F7;
  --paper: #FFFFFF;
  --grid: rgba(64, 110, 200, .075);
  --card-rule: #E1E7EF;
  --ink: #1A2238;
  --muted: #586178;
  --rule: #C9D0DA;
  --focus: #3B6FF5;
  --pen: #2F4FC4;

  /* 每个项目自带的颜色 */
  --tf: #0A5F6B;
  --tf-hi: #42BCCE;
  --qp: #0084CA;
  --wd: #262264;
  --wd-sun: #F6BE45;
  --hd: #7C6CF2;

  --mark: var(--ink);

  --sans: "Bricolage Grotesque", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1320;
    --surface: #161C2C;
    --ink: #E5EAF3;
    --muted: #9AA4BA;
    --rule: #283048;
    --focus: #8FB0FF;
    --pen: #9DB4FF;
    --paper: #161C2C;
    --grid: rgba(150, 180, 255, .06);
    --card-rule: #263049;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --pen: #9DB4FF;
  --paper: #161C2C;
  --grid: rgba(150, 180, 255, .06);
  --card-rule: #263049;
  --bg: #0E1320;
  --surface: #161C2C;
  --ink: #E5EAF3;
  --muted: #9AA4BA;
  --rule: #283048;
  --focus: #8FB0FF;
  color-scheme: dark;
}

/* 中英切换 */
:root[data-lang="zh"] .en,
:root[data-lang="en"] .zh { display: none !important; }

/* ───────────────────────── Base ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
:root[data-lang="zh"] body { line-height: 1.8; letter-spacing: .01em; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ───────────────────────── Top bar ───────────────────────── */
.top {
  display: flex; align-items: center; gap: 28px;
  max-width: var(--max); margin: 0 auto;
  padding: 22px var(--gutter);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; color: var(--ink); }
.nav { display: flex; gap: 24px; margin-left: auto; }
.top .theme { margin-left: 4px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--ink); }
.lang {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px;
  background: transparent; border: 1px solid var(--rule); cursor: pointer;
}
.lang span { padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
:root[data-lang="zh"] .lang [data-k="zh"],
:root[data-lang="en"] .lang [data-k="en"] { background: var(--ink); color: var(--bg); }

/* ───────────────────────── Hero ───────────────────────── */
/* 方格纸：铺到页头下面，往下渐隐 */
.hero { position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -96px 0 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center top;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}
.hero-inner {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(88px, 8.5vw, 124px) var(--gutter) clamp(80px, 10vw, 136px);
  text-align: center;
}

.mark-wrap { position: relative; display: inline-block; }
.mark {
  font-weight: 800;
  font-size: clamp(64px, 13.4vw, 196px);
  line-height: .9;
  letter-spacing: -.045em;
  color: var(--ink);
  font-variation-settings: "wdth" 100, "opsz" 96;
  white-space: nowrap;
}

/* 手写：蓝色圆珠笔 */
.note, .measure, .aside { color: var(--pen); font-family: "Caveat", "Long Cang", cursive; font-weight: 600; }
:root[data-lang="zh"] .note, :root[data-lang="zh"] .measure, :root[data-lang="zh"] .aside { font-family: "Long Cang", "Caveat", cursive; font-weight: 400; }
.note {
  position: absolute; display: flex; gap: 4px; align-items: flex-end; text-align: left; pointer-events: none;
  font-size: clamp(20px, 1.8vw, 26px); line-height: 1.05; white-space: nowrap;
}
:root[data-lang="zh"] .note { line-height: 1.3; }
.note svg { flex: none; width: 60px; height: 42px; }
.note-a { left: 2%; bottom: 88%; transform: rotate(-8deg); }
.note-a span { font-family: "Caveat", cursive; font-weight: 600; line-height: .95; }
.note-a svg { margin: 0 0 -26px -6px; }
.note-b { left: 88%; bottom: 82%; transform: rotate(-6deg); }
.note-b svg { margin-bottom: -22px; }

.measure { position: absolute; right: 100%; top: 8%; bottom: 6%; margin-right: clamp(14px, 2vw, 28px); pointer-events: none; }
.measure-line { position: absolute; right: 0; top: 0; bottom: 0; width: 1.5px; background: currentColor; opacity: .7; }
.measure-line::before, .measure-line::after { content: ""; position: absolute; left: -6px; width: 14px; height: 1.5px; background: currentColor; }
.measure-line::before { top: 0; } .measure-line::after { bottom: 0; }
.measure-text {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%) rotate(-6deg);
  display: grid; justify-items: end; white-space: nowrap; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.15;
}
.measure-text b { font-weight: inherit; }

.lede {
  margin: clamp(24px, 2.6vw, 36px) auto 0; max-width: 40em;
  font-size: clamp(18px, 1.9vw, 26px); line-height: 1.6; font-weight: 500; color: var(--ink); text-wrap: balance;
}
:root[data-lang="zh"] .lede { letter-spacing: .06em; }
.scribble {
  padding-bottom: .28em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 7c30-5 60-4 98-2s72 2 98-3M14 10c40-3 90-3 170-1' fill='none' stroke='%234263EB' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") left bottom / 100% .45em no-repeat;
}

/* 四页草图本 */
.sketches {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px);
  margin-top: clamp(48px, 5vw, 72px); text-align: left;
}
/* 只有两个已上线项目时：两列，收窄居中 */
.sketches:has(> li:nth-child(2):last-of-type) { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 860px; margin-inline: auto; gap: clamp(24px, 4vw, 56px); }
.sketch {
  display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: center;
  text-decoration: none; color: inherit;
}
.page {
  grid-column: 1 / -1; position: relative; display: block;
  background: #fff; border: 1px solid #E2E7EE; border-radius: 6px 14px 14px 6px;
  padding: 10px 10px 10px 26px;
  box-shadow: 0 1px 0 rgba(20, 40, 80, .05), 0 14px 30px -20px rgba(20, 40, 80, .35);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
}
/* 线圈 */
.page::before {
  content: ""; position: absolute; left: -7px; top: 10px; bottom: 10px; width: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='18'%3E%3Ccircle cx='15' cy='9' r='2.6' fill='%23DCE2EA'/%3E%3Cpath d='M15 9C8 9 3 8 3 4.5' stroke='%235A667A' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 22px 18px repeat-y;
}
.page img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; mix-blend-mode: multiply; }
.sketches li:nth-child(1) { --tilt: -1.4deg; }
.sketches li:nth-child(2) { --tilt: .9deg; }
.sketches li:nth-child(3) { --tilt: -.7deg; }
.sketches li:nth-child(4) { --tilt: 1.2deg; }
.sketch:hover .page, .sketch:focus-visible .page { transform: rotate(0deg) translateY(-6px); box-shadow: 0 1px 0 rgba(20, 40, 80, .05), 0 24px 40px -22px rgba(20, 40, 80, .4); }

.sk-meta { display: grid; gap: 2px; padding: 18px 2px 0; }
.sk-meta b { white-space: nowrap; font-size: 20px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.sk-meta b em { font-style: normal; font-weight: 500; color: var(--muted); }
.sk-meta .kind { font-size: 14px; color: var(--muted); }
.pill { justify-self: start; margin-top: 10px; font-size: 12.5px; font-weight: 600; padding: 3px 11px; border-radius: 999px; }
.pill.live { background: #DDF4E7; color: #167A49; }
.pill.soon { background: #FFF0C7; color: #8A5A00; }
.pill.beta { background: #E8EEFF; color: #2F4FC4; }
.aside { align-self: start; padding-top: 22px; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.2; text-align: right; transform: rotate(-5deg); white-space: nowrap; }

/* 唯一的入场：四页依次放上桌 */
@media (prefers-reduced-motion: no-preference) {
  .sketches li { animation: land .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(200ms + var(--d) * 110ms); }
  @keyframes land { from { opacity: 0; transform: translateY(18px) rotate(2deg); } }
}

/* 主题切换按钮 */
.theme {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: transparent; border: 1px solid var(--rule); cursor: pointer; color: var(--ink);
}
.theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme .i-sun { display: none; }
:root[data-theme="dark"] .theme .i-sun { display: block; }
:root[data-theme="dark"] .theme .i-moon { display: none; }

.status { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; }
.status.live { color: #18915A; }
.status.live::before, .status.beta::before { background: currentColor; }
.status.beta { color: var(--room-accent, #2F4FC4); }

/* ───────────────────────── Rooms ───────────────────────── */
.room { position: relative; overflow: hidden; padding: clamp(80px, 11vw, 150px) 0; }
.room-inner {
  position: relative;
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: center;
}
.room-inner.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.room-inner.flip .copy { order: 2; }

.copy { max-width: 34em; }
.name {
  font-weight: 800;
  font-size: clamp(48px, 6.4vw, 88px);
  line-height: .95; letter-spacing: -.035em;
  font-variation-settings: "wdth" 88, "opsz" 96;
  margin: 14px 0 12px;
}
:root[data-lang="zh"] .name .zh { font-weight: 900; letter-spacing: -.02em; }
.kind-line { font-size: clamp(19px, 1.8vw, 23px); font-weight: 600; letter-spacing: -.01em; margin-bottom: 20px; }
.desc { color: var(--room-muted); max-width: 32em; }
.points { margin-top: 24px; display: grid; gap: 10px; }
.points li { position: relative; padding-left: 22px; font-size: 16px; }
.points li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: var(--room-accent); }
.stack { margin-top: 28px; font-size: 14px; color: var(--room-muted); }
.stack::before { content: ""; display: block; width: 32px; height: 1px; background: currentColor; opacity: .5; margin-bottom: 12px; }

.cta {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 32px;
  padding: 14px 22px; border-radius: 999px; text-decoration: none; font-weight: 600;
  background: var(--room-accent); color: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cta svg { width: 14px; height: 14px; }
.cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px var(--room-accent); }

/* ── ThreeFold ── */
.room-tf { --room-muted: #B5DDE2; --room-accent: var(--tf-hi); background: var(--tf); color: #F1FAFB; }
.room-tf .status.live { color: #8EF0BE; }
.tf-stage { position: relative; height: clamp(520px, 52vw, 680px); }
.phone {
  position: absolute; width: clamp(220px, 23vw, 300px);
  border-radius: 40px; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 7px #0D2E33, 0 40px 80px -30px rgba(0, 20, 24, .7);
}
.phone-front { left: 12%; top: 0; z-index: 2; }
.phone-back { right: 4%; top: 8%; transform: rotate(5deg); }
.qr {
  position: absolute; z-index: 3; left: 0; bottom: 0;
  display: flex; align-items: center; gap: 14px;
  background: #fff; color: #10373D; padding: 12px 18px 12px 12px; border-radius: 18px;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5);
  font-size: 14px; font-weight: 600; line-height: 1.45;
}
.qr img { width: 92px; height: 92px; }

/* ── QuelPad ── */
.room-qp { --room-muted: #4D5B70; --room-accent: var(--qp); background: #FFFFFF; color: #0B1626; }
.room-qp .status.live { color: #138A55; }
.qp-logo { width: clamp(220px, 24vw, 320px); height: auto; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .room-qp { --room-muted: #9DB0C8; background: #0A1522; color: #E7EEF7; }
  :root:not([data-theme="light"]) .qp-logo { filter: brightness(0) invert(1); }
  :root:not([data-theme="light"]) .room-qp .status.live { color: #4BD38E; }
}
:root[data-theme="dark"] .room-qp { --room-muted: #9DB0C8; background: #0A1522; color: #E7EEF7; }
:root[data-theme="dark"] .qp-logo { filter: brightness(0) invert(1); }

.win {
  background: #0F1726; color: #DCE6F2; border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(10, 30, 60, .12), 0 50px 100px -40px rgba(0, 60, 120, .55);
  font-family: var(--mono); font-size: 13.5px;
}
.win-bar { display: flex; align-items: center; gap: 14px; padding: 10px 12px; background: #172133; border-bottom: 1px solid #22304A; }
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #3A475E; }
.dots i:nth-child(1) { background: #FF5F57; } .dots i:nth-child(2) { background: #FEBC2E; } .dots i:nth-child(3) { background: #28C840; }
.win-tab { color: #EAF1FA; padding: 3px 10px; background: #0F1726; border-radius: 6px; }
.win-db { color: #7F8EA8; font-size: 12px; }
.run {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 7px; padding: 5px 12px; cursor: pointer;
  background: var(--qp); color: #fff; font-family: var(--sans); font-weight: 600; font-size: 13px;
}
.run svg { width: 11px; height: 11px; }
.run:hover { background: #0A95E3; }
.code { margin: 0; padding: 22px 22px 18px; min-height: 182px; line-height: 1.75; white-space: pre; overflow-x: auto; }
.code .k { color: #C792EA; } .code .v { color: #EEFFFF; } .code .f { color: #82AAFF; }
.code .p { color: #89DDFF; } .code .s { color: #C3E88D; } .code .n { color: #F78C6C; } .code .c { color: #5F6F8A; }
.caret { display: inline-block; width: 8px; height: 1.15em; vertical-align: -.2em; background: #82AAFF; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.result { border-top: 1px solid #22304A; background: #0B1220; padding: 14px 18px 18px; opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease; }
.result.show { opacity: 1; transform: none; }
.result-title { font-family: var(--sans); font-weight: 600; font-size: 13px; color: #EAF1FA; margin-bottom: 8px; }
.result-title span { color: #6F7F9A; font-weight: 400; margin-left: 8px; }
.result table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.result th { text-align: left; font-weight: 500; color: #7F8EA8; padding: 6px 8px; border-bottom: 1px solid #22304A; }
.result td { padding: 6px 8px; border-bottom: 1px solid #172133; white-space: nowrap; }
.result td:nth-child(2) { color: #F78C6C; }
.result td:nth-child(3) { position: relative; text-align: right; }
.result th:nth-child(3) { text-align: right; }
.bar { position: absolute; right: 8px; top: 50%; height: 16px; transform: translateY(-50%); width: calc(var(--w) * .9); max-width: 90%; background: rgba(0, 132, 202, .22); border-radius: 3px; z-index: 0; }
.result td:nth-child(3) { isolation: isolate; }

/* ── Word Dance ── */
.room-wd { --room-muted: #C9C5F2; --room-accent: var(--wd-sun); background: var(--wd); color: #FFF7E6; }
.wd-sky {
  position: absolute; inset: 0; pointer-events: none; opacity: 1;
  background:
    radial-gradient(3.2px 3.2px at 12% 18%, #FFE7A3 50%, transparent 51%),
    radial-gradient(2.7px 2.7px at 28% 72%, #FFE7A3 50%, transparent 51%),
    radial-gradient(3.2px 3.2px at 46% 12%, #fff 50%, transparent 51%),
    radial-gradient(2.7px 2.7px at 63% 40%, #FFE7A3 50%, transparent 51%),
    radial-gradient(3.7px 3.7px at 82% 16%, #FFE7A3 50%, transparent 51%),
    radial-gradient(2.7px 2.7px at 92% 64%, #fff 50%, transparent 51%),
    radial-gradient(3.2px 3.2px at 6% 88%, #fff 50%, transparent 51%),
    radial-gradient(2.7px 2.7px at 52% 92%, #FFE7A3 50%, transparent 51%);
}
.room-wd .status { color: var(--wd-sun); }
.room-wd .name { font-variation-settings: "wdth" 100, "opsz" 96; color: #FFF3D6; }
.try { margin-top: 28px; font-weight: 600; color: var(--wd-sun); }

.room-wd .stage { display: grid; gap: 28px; justify-items: center; }
.mat {
  width: min(100%, 440px); padding: 22px 22px 26px; border-radius: 28px;
  background: #3A3591;
  box-shadow: inset 0 0 0 10px #3A3591, inset 0 0 0 12px rgba(255, 255, 255, .28), 0 30px 60px -30px rgba(0, 0, 0, .6);
  outline-offset: 6px;
}
.mat-word { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 6px 0 18px; min-height: 64px; }
.mat-word strong { font-size: clamp(40px, 5vw, 56px); font-weight: 800; letter-spacing: -.02em; color: #FFF3D6; font-variation-settings: "wdth" 100, "opsz" 96; }
.say { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--wd-sun); color: #3A2A00; display: grid; place-items: center; cursor: pointer; }
.say svg { width: 20px; height: 20px; }
.score { font-size: 14px; font-weight: 700; color: var(--wd-sun); min-width: 3ch; }

.pads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; aspect-ratio: 1; }
.pad[data-dir="up"] { grid-column: 2; grid-row: 1; }
.pad[data-dir="left"] { grid-column: 1; grid-row: 2; }
.pad-hub { grid-column: 2; grid-row: 2; border-radius: 50%; margin: 22%; background: rgba(255, 255, 255, .1); }
.pad[data-dir="right"] { grid-column: 3; grid-row: 2; }
.pad[data-dir="down"] { grid-column: 2; grid-row: 3; }
.pad {
  position: relative; border: 0; padding: 10%; cursor: pointer;
  border-radius: 20px; background: #FFF6E4;
  box-shadow: 0 0 0 5px #fff, 0 10px 18px -8px rgba(0, 0, 0, .5);
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.pad svg { width: 100%; height: 100%; display: block; }
.pad::after {
  content: ""; position: absolute; width: 14px; height: 14px; opacity: .45;
  background: #3A3591; clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.pad[data-dir="up"]::after { top: 6px; left: calc(50% - 7px); }
.pad[data-dir="down"]::after { bottom: 6px; left: calc(50% - 7px); transform: rotate(180deg); }
.pad[data-dir="left"]::after { left: 6px; top: calc(50% - 7px); transform: rotate(-90deg); }
.pad[data-dir="right"]::after { right: 6px; top: calc(50% - 7px); transform: rotate(90deg); }
.pad:hover { transform: translateY(-2px); }
.pad:active { transform: scale(.96); }
.pad.right { background: #D8F7C4; box-shadow: 0 0 0 5px #7ED957, 0 0 0 12px rgba(126, 217, 87, .25); transform: scale(1.05); }
.pad.wrong { animation: shake .35s ease; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.lineup { width: min(100%, 460px); transform: rotate(-2.5deg); }
.lineup img { border-radius: 18px; box-shadow: 0 0 0 7px #FFF6E4, 0 30px 50px -24px rgba(0, 0, 0, .7); }
.lineup figcaption { margin-top: 16px; font-size: 13px; color: var(--room-muted); text-align: center; }

/* ── Handydeck ── */
.room-hd { --room-muted: var(--muted); --room-accent: var(--hd); background: var(--surface); }
.desk {
  position: relative; aspect-ratio: 16 / 11; border-radius: 16px; overflow: hidden;
  background:
    radial-gradient(60% 70% at 18% 90%, #F59E7B 0%, transparent 70%),
    radial-gradient(55% 60% at 85% 20%, #8C7CF7 0%, transparent 70%),
    radial-gradient(60% 60% at 60% 80%, #F4C7E1 0%, transparent 70%),
    #C9C2F2;
  box-shadow: 0 0 0 1px rgba(30, 20, 80, .08), 0 40px 80px -40px rgba(50, 30, 120, .5);
  user-select: none;
}
.menubar {
  display: flex; justify-content: space-between; align-items: center; height: 30px; padding: 0 14px;
  background: rgba(255, 255, 255, .42); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  font-size: 13px; color: #1D1B2A;
}
.mb-left { display: flex; gap: 16px; } .mb-left b { font-weight: 700; }
.mb-right { display: flex; align-items: center; gap: 14px; }
.mb-icon { cursor: pointer; display: grid; place-items: center; width: 26px; height: 22px; border-radius: 5px; }
.mb-icon svg { width: 18px; height: 14px; }
.desk.open .mb-icon { background: rgba(0, 0, 0, .14); }

.file {
  position: absolute; left: 9%; bottom: 14%; display: grid; justify-items: center; gap: 6px;
  border: 0; background: none; cursor: pointer; padding: 8px; border-radius: 10px;
  transition: transform .6s cubic-bezier(.5, 0, .2, 1), opacity .6s ease;
}
.file svg { width: 54px; height: 68px; filter: drop-shadow(0 6px 10px rgba(40, 20, 90, .35)); }
.file span { font-size: 12.5px; font-weight: 600; color: #fff; background: rgba(30, 20, 70, .45); padding: 1px 8px; border-radius: 5px; }
.file:hover { background: rgba(255, 255, 255, .18); }
.desk.open .file { opacity: 0; pointer-events: none; }
.desk-hint { position: absolute; left: 9%; bottom: 5%; font-size: 13px; color: rgba(255, 255, 255, .95); font-weight: 600; text-shadow: 0 1px 6px rgba(40, 20, 90, .4); }
.desk.open .desk-hint { opacity: 0; }

.deck {
  position: absolute; top: 38px; right: 12px; width: min(300px, 74%);
  padding: 12px; border-radius: 14px;
  background: rgba(246, 245, 252, .78); backdrop-filter: blur(26px) saturate(1.6); -webkit-backdrop-filter: blur(26px) saturate(1.6);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .18), 0 24px 50px -16px rgba(30, 20, 80, .45);
  color: #1D1B2A; font-size: 13.5px;
  opacity: 0; transform: translateY(-8px) scale(.97); transform-origin: 88% 0; pointer-events: none;
  transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
}
.desk.open .deck { opacity: 1; transform: none; pointer-events: auto; }
.deck-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .7); }
.deck-item svg { width: 28px; height: 35px; flex: none; }
.deck-item b { display: block; font-weight: 600; }
.deck-item small { color: #6B6880; font-size: 12px; }
.actions { margin: 10px 0 8px; display: grid; gap: 2px; }
.actions button {
  width: 100%; display: flex; align-items: center; gap: 8px; text-align: left;
  border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px;
}
.actions li:first-child button { background: var(--hd); color: #fff; }
.actions button:hover { background: rgba(124, 108, 242, .16); }
.actions li:first-child button:hover { background: #6B5AE8; }
.actions kbd { margin-left: auto; font-family: var(--sans); font-size: 12px; opacity: .65; }
.ask { padding: 8px 10px; border-radius: 8px; border: 1px dashed rgba(29, 27, 42, .25); color: #6B6880; font-size: 12.5px; }
.deck-done { margin-top: 8px; font-size: 12.5px; color: #1E7C4A; font-weight: 600; min-height: 1.2em; }
.deck-done:empty { display: none; }
.actions button.busy { background: linear-gradient(90deg, rgba(124, 108, 242, .3) var(--p, 0%), rgba(124, 108, 242, .1) var(--p, 0%)); color: #1D1B2A; }

/* ───────────────────────── About ───────────────────────── */
.profile-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
.profile-page :is(.top, .foot) { width: 100%; }
.profile-page .theme { margin-left: auto; }
.profile-page main { flex: 1; }
.profile-bio {
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 18px);
}

.about {
  max-width: var(--max); margin: 0 auto; padding: clamp(80px, 11vw, 150px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px);
}
.about h1 { font-size: clamp(32px, 3.6vw, 48px); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.about-lede { font-size: clamp(20px, 2vw, 26px); line-height: 1.5; font-weight: 500; letter-spacing: -.01em; max-width: 30em; }
:root[data-lang="zh"] .about-lede { line-height: 1.75; }
.stacks { margin-top: 48px; border-top: 1px solid var(--rule); }
.stacks div { display: grid; grid-template-columns: 8em 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.stacks dt { color: var(--muted); font-size: 15px; }
.stacks dd { font-size: 16px; }

/* ───────────────────────── Contact ───────────────────────── */
.contact {
  max-width: var(--max); margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(80px, 10vw, 140px);
  border-top: 1px solid var(--rule);
}
.contact h2 {
  font-size: clamp(42px, 7.6vw, 116px); font-weight: 800; line-height: .98; letter-spacing: -.03em;
  font-variation-settings: "wdth" 92, "opsz" 96; margin-top: clamp(24px, 4vw, 48px);
}
:root[data-lang="zh"] .contact h2 { letter-spacing: -.02em; line-height: 1.12; font-weight: 900; }
.contact-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px 32px; margin-top: 40px; }
.contact-links a { font-size: 17px; color: var(--muted); text-decoration: none; }
.contact-links a:hover { color: var(--ink); }
.contact-links .mail {
  font-size: clamp(22px, 2.6vw, 32px); font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--rule);
  transition: text-decoration-color .2s ease;
}
.contact-links .mail:hover { text-decoration-color: var(--ink); }

.foot {
  max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 40px;
  display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 14px;
}

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 900px) {
  .room-inner, .room-inner.flip, .about { grid-template-columns: 1fr; }
  .sketches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .note, .measure { display: none; }
  .room-inner.flip .copy { order: 0; }
  .tf-stage { height: auto; aspect-ratio: 1 / 1.08; max-width: 520px; width: 100%; margin: 0 auto; }
  .phone { width: 52%; border-radius: 32px; }
  .phone-front { left: 6%; }
  .phone-back { right: 2%; width: 48%; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .mark-wrap { padding-left: 0; }
  .mark { font-size: 21.5vw; }
  .note, .measure { display: none; }
  .hero-inner { padding-top: 72px; }
  .nav { display: none; }
  .top { gap: 10px; }
  .top .theme { margin-left: auto; }
  .aside { display: none; }
  .sk-meta b { font-size: 17px; }
  .index a { grid-template-columns: 10px 1fr auto; padding: 13px 4px; }
  .index .kind { display: none; }
  .qr { padding: 8px 12px 8px 8px; gap: 10px; font-size: 12.5px; }
  .qr img { width: 68px; height: 68px; }
  .code { font-size: 12px; padding: 16px; }
  .result td:first-child { max-width: 9.5em; overflow: hidden; text-overflow: ellipsis; }
  .win-db { display: none; }
  .desk { aspect-ratio: 4 / 4.2; }
  .mb-left span { display: none; }
  .stacks div { grid-template-columns: 1fr; gap: 2px; }
  .foot { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
