:root {
  --navy: #0a1d52;
  --navy-deep: #050c26;
  --cyan: #34c6ff;
  --ice: #9fe9ff;
  --red: #e5191c;
  --yellow: #ffe330;
  --paper: #f3f0e9;
  --ink: #111111;
  --display: "Bahnschrift", "DIN Condensed", "DIN Alternate", "Arial Narrow", "Helvetica Neue", Impact, sans-serif;
  --zh: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --jp: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", var(--serif);
  --mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, monospace;
  --pad: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ───── Atlus palettes ─────
   --k1 dark ink of the theme, --k2 light, --k3 signature accent */
[data-theme="p3d"] {
  --bg: linear-gradient(165deg, #06102e 0%, #0a1d52 48%, #0f3384 100%);
  --bg-flat: #0a1d52;
  --fg: #eaf6ff; --fg-2: rgba(234, 246, 255, 0.72); --mute: #86a8d6;
  --acc: #34c6ff; --acc-2: #ffffff;
  --panel: #ffffff; --panel-fg: #0a1d52;
  --line: rgba(160, 210, 255, 0.18);
  --k1: #0a1d52; --k2: #ffffff; --k3: #34c6ff;
  --edge: #34c6ff; --cover: #081638;
}
[data-theme="p3l"] {
  --bg: #e9f1fa; --bg-flat: #e9f1fa;
  --fg: #0a1a46; --fg-2: #3a4f78; --mute: #7488ad;
  --acc: #1466ff; --acc-2: #34c6ff;
  --panel: #0a1d52; --panel-fg: #eaf6ff;
  --line: rgba(10, 26, 70, 0.14);
  --k1: #0a1d52; --k2: #ffffff; --k3: #1466ff;
  --edge: #34c6ff; --cover: #0a1d52;
}
[data-theme="p4"] {
  --bg: #ffe330; --bg-flat: #ffe330;
  --fg: #141414; --fg-2: #3b3510; --mute: #6e6413;
  --acc: #141414; --acc-2: #ff7a00;
  --panel: #141414; --panel-fg: #ffe330;
  --line: rgba(20, 20, 20, 0.2);
  --k1: #141414; --k2: #ffe330; --k3: #ff7a00;
  --edge: #ffe330; --cover: #141414;
}
[data-theme="p5"] {
  --bg: #f3f0e9; --bg-flat: #f3f0e9;
  --fg: #111111; --fg-2: #3d3b38; --mute: #8c8880;
  --acc: #e5191c; --acc-2: #111111;
  --panel: #111111; --panel-fg: #ffffff;
  --line: rgba(17, 17, 17, 0.14);
  --k1: #111111; --k2: #ffffff; --k3: #e5191c;
  --edge: #e5191c; --cover: #111111;
}
[data-theme="p5d"] {
  --bg: radial-gradient(ellipse at 15% 0%, #3a0a0e 0%, transparent 55%), #0d0d0d;
  --bg-flat: #0d0d0d;
  --fg: #f3f0e9; --fg-2: rgba(243, 240, 233, 0.7); --mute: #8c8880;
  --acc: #ff2a3c; --acc-2: #ffffff;
  --panel: #ff2a3c; --panel-fg: #0d0d0d;
  --line: rgba(243, 240, 233, 0.14);
  --k1: #0d0d0d; --k2: #ffffff; --k3: #ff2a3c;
  --edge: #ff2a3c; --cover: #0d0d0d;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 0; scroll-snap-type: y proximity; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font-family: var(--zh);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.booting { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
[lang="ja"] { font-family: var(--jp); }
::selection { background: var(--cyan); color: var(--navy); }

.skip { position: absolute; left: -999px; top: 8px; z-index: 900; background: var(--ink); color: #fff; padding: 6px 12px; }
.skip:focus { left: 8px; }

#pixels { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 800; pointer-events: none; }
body.booting #pixels, #pixels.busy { pointer-events: auto; }

/* ───── ransom letters (palette-aware) ───── */
.rn {
  display: inline-block; line-height: 1; padding: 0.06em 0.12em 0.02em;
  font-family: var(--display); font-weight: 700; font-stretch: condensed;
}
.r1 { background: var(--k2); color: var(--k1); transform: rotate(-6deg); }
.r2 { background: var(--k1); color: var(--k2); box-shadow: inset 0 0 0 0.05em var(--k2); transform: rotate(4deg) translateY(0.04em); font-family: var(--serif); font-weight: 900; }
.r3 { background: var(--k3); color: #fff; transform: rotate(-3deg) translateY(-0.05em); }
.r4 { color: var(--fg); transform: rotate(6deg) scale(1.08); font-family: var(--serif); font-style: italic; font-weight: 900; }
.r5 { background: var(--k1); color: var(--k3); transform: rotate(-4deg) translateY(0.06em); box-shadow: inset 0 0 0 0.04em var(--k3); }
.r6 { background: var(--k2); color: var(--k1); transform: rotate(3deg) translateY(-0.03em); box-shadow: 0.06em 0.06em 0 var(--k3); }
.r7 { background: var(--k3); color: var(--k1); transform: rotate(-7deg) translateY(0.04em); }
[data-theme="p5"] .r1, [data-theme="p4"] .r1 { background: var(--k1); color: #fff; }
[data-theme="p4"] .r6 { background: #fff; }
[data-theme="p5"] .r2 { background: #fff; color: var(--k1); box-shadow: inset 0 0 0 0.05em var(--k1); }

/* ───── top bar ───── */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 60px; padding: 0 var(--pad);
  display: flex; align-items: center; gap: 36px;
  color: var(--fg);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.bar.solid { background: color-mix(in srgb, var(--bg-flat) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-color: var(--line); }
.bar-logo { font-size: 20px; display: flex; gap: 1px; }
.bar-logo .rn { padding: 0.08em 0.14em 0.02em; }
.bar-nav { display: flex; gap: 4px; margin-left: auto; font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.bar-nav a { position: relative; padding: 6px 12px; transition: color 0.2s; z-index: 0; }
.bar-nav a i { font-style: normal; font-size: 10px; color: var(--acc); margin-right: 5px; vertical-align: 2px; }
[data-theme="p4"] .bar-nav a i { color: var(--acc-2); }
.bar-nav a::before {
  content: ""; position: absolute; inset: 2px 0; z-index: -1; background: var(--panel);
  transform: skewX(-14deg) scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease);
}
.bar-nav a:hover, .bar-nav a.active { color: var(--panel-fg); }
.bar-nav a:hover i, .bar-nav a.active i { color: var(--acc); }
[data-theme="p3d"] .bar-nav a:hover i, [data-theme="p3d"] .bar-nav a.active i { color: var(--k3); }
.bar-nav a:hover::before, .bar-nav a.active::before { transform: skewX(-14deg) scaleX(1); }
.bar-cal {
  opacity: 0; transition: opacity 0.3s;
  display: flex; align-items: center; gap: 8px; padding-left: 20px; border-left: 1px solid var(--line);
  font-family: var(--display); font-weight: 700; transform: skewX(-8deg);
}
.bar.solid .bar-cal { opacity: 1; }
.cal-date { font-size: 22px; letter-spacing: 0.02em; }
.cal-day { font-size: 12px; background: var(--acc); color: var(--bg-flat); padding: 1px 6px; }
[data-theme="p4"] .cal-day { background: var(--k1); color: var(--k2); }
.moon-mini { width: 20px; height: 20px; }
.moon-dark { fill: rgba(127, 160, 210, 0.25); }
.moon-lit { fill: #f4f8ff; }
[data-theme="p3l"] .moon-lit, [data-theme="p4"] .moon-lit, [data-theme="p5"] .moon-lit { fill: var(--fg); }
[data-theme="p3l"] .moon-dark, [data-theme="p4"] .moon-dark, [data-theme="p5"] .moon-dark { fill: none; stroke: var(--fg); stroke-width: 1.5; }

/* ───── HUD ───── */
.hud {
  position: fixed; right: var(--pad); bottom: 22px; z-index: 90;
  display: flex; align-items: baseline; gap: 6px;
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  color: var(--fg); pointer-events: none; transition: color 0.3s, opacity 0.3s;
}
.hud.gone { opacity: 0; }
.hud-game { align-self: center; margin-right: 8px; padding: 1px 7px; font-size: 11px; letter-spacing: 0.12em; background: var(--acc); color: var(--bg-flat); transform: skewX(-12deg); }
[data-theme="p4"] .hud-game { background: var(--k1); color: var(--k2); }
.hud-idx { font-size: 34px; line-height: 1; }
.hud-sep, .hud-total { font-size: 14px; opacity: 0.7; }
.hud-name { font-size: 13px; letter-spacing: 0.16em; margin-left: 10px; min-width: 80px; }
.hud-prog { position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; background: var(--line); }
.hud-prog span { display: block; height: 100%; width: 0; background: currentColor; }

/* ───── sections base ───── */
.hero, .sec, .foot { background: var(--bg); color: var(--fg); }

/* ───── hero · P3R ───── */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center;
  padding: 96px var(--pad) 72px;
}
.hero-sky { position: absolute; inset: 0; pointer-events: none; }
.hero-sky::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(115deg, transparent 0 46px, rgba(52, 198, 255, 0.05) 46px 48px),
    radial-gradient(ellipse at 78% 18%, rgba(159, 233, 255, 0.22), transparent 46%);
}
.moon-big {
  position: absolute; right: 7%; top: 7%; width: clamp(180px, 22vw, 340px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #ffffff 0%, #e6f6ff 40%, #9fd8ff 72%, #5aa9e6 100%);
  box-shadow: 0 0 60px 10px rgba(159, 233, 255, 0.45), 0 0 180px 40px rgba(52, 198, 255, 0.2);
}
.moon-big::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 60%, rgba(90, 150, 210, 0.28) 0 9%, transparent 10%),
    radial-gradient(circle at 62% 30%, rgba(90, 150, 210, 0.22) 0 6%, transparent 7%),
    radial-gradient(circle at 70% 68%, rgba(90, 150, 210, 0.2) 0 12%, transparent 13%);
}
.hero-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 56%;
  background: linear-gradient(180deg, rgba(20, 102, 255, 0.0) 0%, rgba(20, 102, 255, 0.55) 55%, #1466ff 100%);
  clip-path: polygon(34% 0, 100% 0, 100% 100%, 8% 100%);
}
.hero-shard { position: absolute; top: 0; right: 0; bottom: 0; width: 56%; }
.hero-shard.s1 { background: #fff; clip-path: polygon(30.5% 0, 31.8% 0, 5.8% 100%, 4.5% 100%); opacity: 0.9; }
.hero-shard.s2 { background: var(--cyan); clip-path: polygon(88% 0, 100% 0, 100% 34%, 76% 100%, 70% 100%); opacity: 0.35; }
.hero-tone {
  position: absolute; top: 0; right: 0; bottom: 0; width: 56%;
  background: radial-gradient(circle, rgba(159, 233, 255, 0.35) 1.2px, transparent 1.7px) 0 0 / 9px 9px;
  clip-path: polygon(34% 0, 100% 0, 100% 100%, 8% 100%);
  -webkit-mask: linear-gradient(0deg, #000 0%, transparent 55%);
  mask: linear-gradient(0deg, #000 0%, transparent 55%);
}

.hero-figure { position: absolute; right: 3%; bottom: 0; z-index: 1; margin: 0; height: min(94vh, 920px); pointer-events: none; }
.hero-figure img { display: block; height: 100%; width: auto; filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 34px rgba(52, 198, 255, 0.45)); }
.hero-tag { position: absolute; left: -12%; bottom: 22%; padding: 2px 10px; font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 0.24em; color: var(--navy); background: var(--cyan); transform: rotate(-8deg) skewX(-12deg); }

.hero-left { position: relative; z-index: 3; max-width: 680px; }

/* P3-style calendar */
.calendar { display: inline-grid; grid-template-columns: auto auto; gap: 0 14px; align-items: end; margin-bottom: 34px; font-family: var(--display); font-weight: 700; transform: skewX(-10deg); }
.c-date { font-size: 66px; line-height: 0.85; letter-spacing: -0.01em; color: #fff; text-shadow: 3px 3px 0 var(--k3); }
.c-date i { font-style: normal; color: var(--k3); font-size: 0.7em; margin: 0 2px; text-shadow: none; }
.c-side { display: grid; justify-items: start; gap: 6px; padding-bottom: 4px; }
.c-week { font-size: 18px; background: var(--k3); color: var(--k1); padding: 1px 10px; }
.moon { width: 36px; height: 36px; filter: drop-shadow(0 0 6px rgba(159, 233, 255, 0.7)); }
.c-foot { grid-column: 1 / -1; display: flex; gap: 14px; margin-top: 10px; font-family: var(--jp); font-size: 13px; font-weight: 600; letter-spacing: 0.12em; color: var(--ice); }
.c-moon { color: var(--fg-2); }
.calendar.dark-hour .c-date { text-shadow: 3px 3px 0 #3cff8f; }
.calendar.dark-hour .c-foot { color: #7dffb4; }

.hero-kicker { font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); }
.ransom { margin: 22px 0 0 -4px; font-size: clamp(52px, 6.6vw, 124px); letter-spacing: 0.01em; display: flex; flex-wrap: nowrap; gap: 0.04em; }
.ransom .rn { transition: transform 0.3s var(--ease); }
.ransom:hover .rn:nth-child(odd) { transform: rotate(0deg) translateY(-0.06em); }
.hero-alias { margin-top: 18px; font-size: 14px; letter-spacing: 0.14em; color: var(--mute); }
.hero-line { margin-top: 34px; font-family: var(--serif); font-weight: 700; font-size: clamp(22px, 2.3vw, 32px); line-height: 1.4; }
.hero-line em { font-style: normal; background: linear-gradient(transparent 64%, rgba(52, 198, 255, 0.45) 64%); }
.hero-sub { margin-top: 16px; max-width: 540px; font-size: 15px; color: var(--fg-2); }
.hero-row { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.hero-status { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 12px; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; background: #fff; color: var(--navy); transform: skewX(-12deg); }
.blink { width: 8px; height: 8px; background: var(--acc); animation: blink 1.1s steps(1) infinite; }
.hero-status .blink { background: #1466ff; }
@keyframes blink { 50% { opacity: 0; } }
.np { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.14em; }
.np-k { color: var(--acc); }
.np-v { color: var(--fg); text-transform: uppercase; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; background: var(--acc); animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -0.3s; }
.eq i:nth-child(3) { animation-delay: -0.6s; }
.eq i:nth-child(4) { animation-delay: -0.15s; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }

/* P3R / P5R-style menu */
.menu { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding-left: 4vw; }
.menu a {
  position: relative; display: flex; align-items: baseline; gap: 14px;
  padding: 0 18px; color: #fff;
  font-family: var(--display); font-weight: 700; font-stretch: condensed; text-transform: uppercase;
  font-size: clamp(40px, 4.6vw, 78px); line-height: 1.02;
  text-shadow: 0 2px 18px rgba(5, 12, 38, 0.6);
  transform: rotate(-7deg) translateX(calc(var(--i) * -14px));
  transition: transform 0.3s var(--ease), color 0.2s;
}
.menu a::before, .menu a::after { content: ""; position: absolute; z-index: -1; transition: transform 0.28s var(--ease); }
.menu a::before { inset: 6% -4% 4% -6%; background: #fff; clip-path: polygon(4% 10%, 100% 0, 96% 92%, 0 100%); transform: scaleX(0); transform-origin: right; }
.menu a::after { inset: 18% -8% 0 -2%; background: var(--cyan); clip-path: polygon(0 20%, 100% 0, 98% 100%, 3% 84%); transform: scaleX(0); transform-origin: right; z-index: -2; }
.m-zh { font-family: var(--zh); font-size: 0.22em; font-weight: 700; letter-spacing: 0.2em; opacity: 0; transform: translateX(-8px); transition: opacity 0.2s, transform 0.25s var(--ease); }
.menu a:hover, .menu a:focus-visible { color: var(--navy); text-shadow: none; transform: rotate(-7deg) translateX(calc(var(--i) * -14px + 16px)) scale(1.06); outline: none; }
.menu a:hover::before, .menu a:focus-visible::before { transform: scaleX(1); }
.menu a:hover::after, .menu a:focus-visible::after { transform: scaleX(1) rotate(3deg); }
.menu a:hover .m-zh, .menu a:focus-visible .m-zh { opacity: 1; transform: none; }

.hero .menu a, .hero .ransom .rn, .hero-panel, .hero-shard, .hero-figure, .moon-big { visibility: hidden; }
.hero.in .menu a, .hero.in .ransom .rn, .hero.in .hero-panel, .hero.in .hero-shard, .hero.in .hero-figure, .hero.in .moon-big { visibility: visible; }
.hero.in .hero-panel { animation: slashIn 0.6s var(--ease) both; }
.hero.in .hero-shard { animation: slashIn 0.6s 0.08s var(--ease) both; }
.hero.in .moon-big { animation: moonIn 1.4s var(--ease) both; }
.hero.in .hero-figure { animation: figIn 0.9s 0.2s var(--ease) both; }
.hero.in .menu a { animation: menuIn 0.5s var(--ease) both; animation-delay: calc(0.35s + var(--i) * 0.06s); }
.hero.in .ransom .rn { animation: stamp 0.36s var(--ease) both; }
.hero.in .ransom .rn:nth-child(2) { animation-delay: 0.05s; }
.hero.in .ransom .rn:nth-child(3) { animation-delay: 0.1s; }
.hero.in .ransom .rn:nth-child(4) { animation-delay: 0.15s; }
.hero.in .ransom .rn:nth-child(5) { animation-delay: 0.2s; }
.hero.in .ransom .rn:nth-child(6) { animation-delay: 0.25s; }
.hero.in .ransom .rn:nth-child(7) { animation-delay: 0.3s; }
@keyframes slashIn { from { transform: translateX(60%); } }
@keyframes moonIn { from { opacity: 0; scale: 0.6; } }
@keyframes figIn { from { opacity: 0; translate: 0 40px; } }
@keyframes menuIn { from { opacity: 0; translate: 120px 0; } }
@keyframes stamp { from { opacity: 0; scale: 1.8; } 60% { opacity: 1; scale: 0.94; } }

.hero-scroll { position: absolute; left: var(--pad); bottom: 26px; z-index: 3; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; }
.hero-scroll span { display: inline-block; color: var(--acc); animation: bob 1.4s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

/* ───── sections ───── */
.hero, .sec { scroll-snap-align: start; }
.sec {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: clip;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--pad) 100px;
}
.sec-head { position: relative; margin-bottom: 56px; max-width: 1280px; }
.sec-num {
  position: absolute; left: -0.06em; top: -0.42em; z-index: 0;
  font-family: var(--display); font-weight: 700; font-size: clamp(120px, 16vw, 240px); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--line); pointer-events: none;
}
.sec-title {
  position: relative; z-index: 1;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 22px;
  font-family: var(--display); font-weight: 700; font-stretch: condensed; text-transform: uppercase;
  font-size: clamp(56px, 7vw, 112px); line-height: 0.95; letter-spacing: -0.005em;
}
.sec-tag {
  display: inline-flex; align-items: baseline; gap: 10px;
  padding: 6px 16px; background: var(--panel); color: var(--panel-fg); transform: skewX(-12deg) rotate(-2deg);
  font-family: var(--zh); font-size: 18px; letter-spacing: 0.24em; font-weight: 700;
}
.sec-tag i { font-style: normal; font-size: 12px; color: var(--acc); letter-spacing: 0.16em; font-weight: 500; }
[data-theme="p3d"] .sec-tag i { color: #1466ff; }
[data-theme="p3l"] .sec-tag i { color: var(--acc-2); }
[data-theme="p4"] .sec-tag i { color: var(--acc-2); }
.sec-lead { position: relative; z-index: 1; margin-top: 26px; max-width: 640px; font-family: var(--serif); font-size: 18px; line-height: 1.85; color: var(--fg-2); }

/* reveal */
.rv { opacity: 0; transform: translateX(-28px) skewX(-4deg); transition: opacity 0.7s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
.rv.shown { opacity: 1; transform: none; }

/* ───── about · P3R light ───── */
#about::before {
  content: ""; position: absolute; top: 0; right: 0; width: 38%; height: 100%;
  background: linear-gradient(180deg, rgba(52, 198, 255, 0.16), transparent 70%);
  clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%); pointer-events: none;
}
.about-grid { position: relative; display: grid; grid-template-columns: 380px 1fr; gap: 56px; max-width: 1280px; }
.status-card {
  position: relative; padding: 26px 26px 20px; color: #fff;
  background: linear-gradient(160deg, #0f3384 0%, #0a1d52 55%, #06102e 100%);
  clip-path: polygon(0 0, 100% 2%, 97% 100%, 3% 98%);
  transform: rotate(-1.5deg);
}
.status-card::after { content: ""; position: absolute; top: 0; right: 0; width: 46%; height: 6px; background: var(--cyan); }
.st-top { display: flex; justify-content: space-between; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.24em; color: var(--cyan); }
.st-name { margin-top: 10px; font-family: var(--display); font-weight: 700; font-size: 48px; line-height: 1; text-transform: uppercase; }
.st-alias { font-size: 12.5px; letter-spacing: 0.12em; color: rgba(234, 246, 255, 0.6); }
.st-alias b { color: var(--cyan); font-family: var(--display); letter-spacing: 0.14em; }
.radar { display: block; width: 100%; margin: 14px 0 6px; overflow: visible; }
.radar .grid { fill: none; stroke: rgba(159, 233, 255, 0.18); stroke-width: 1; }
.radar .grid.outer { stroke: rgba(159, 233, 255, 0.4); }
.radar .axis { stroke: rgba(159, 233, 255, 0.14); }
.radar .shape { fill: rgba(52, 198, 255, 0.55); stroke: #fff; stroke-width: 2; stroke-linejoin: round; transform-origin: 150px 140px; transform: scale(0); transition: transform 1s var(--ease) 0.3s; }
.status.shown .radar .shape { transform: scale(1); }
.radar .pt { fill: #fff; }
.radar text { font-family: var(--zh); font-size: 12px; font-weight: 700; fill: #fff; }
.radar text.en { font-family: var(--display); font-size: 9px; letter-spacing: 0.12em; fill: rgba(159, 233, 255, 0.7); font-weight: 600; }
.st-ranks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.st-ranks li { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 10px; font-size: 12.5px; }
.st-ranks li span:first-child { color: rgba(234, 246, 255, 0.62); }
.st-ranks .pips { display: flex; gap: 3px; }
.st-ranks .pips i { width: 14px; height: 5px; background: rgba(159, 233, 255, 0.16); transform: skewX(-20deg); }
.st-ranks .pips i.on { background: var(--cyan); }
.st-ranks li.max .pips i.on { background: #fff; box-shadow: 0 0 6px var(--cyan); }
.st-ranks b { font-family: var(--display); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.st-ranks li.max b { color: var(--cyan); }
.st-note { margin-top: 12px; font-size: 11px; color: rgba(234, 246, 255, 0.4); }

.profile { display: grid; gap: 40px; align-content: start; }
.spec { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--fg); }
.spec > div { padding: 16px 18px 18px 0; border-bottom: 1px solid var(--line); }
.spec .wide { grid-column: 1 / -1; }
.spec dt { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--acc); }
.spec dd { margin: 4px 0 0; font-size: 17px; font-weight: 600; }
.spec small { font-size: 12px; font-weight: 400; color: var(--mute); margin-left: 6px; }
.spec .hl { color: var(--acc); }

/* ───── journey · P4G ───── */
.journey-sec { overflow: hidden; }
.tv-stripe {
  position: absolute; left: 0; right: 0; top: 0; height: 28px;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 18px, transparent 18px 36px);
}
.journey-sec::after {
  content: ""; position: absolute; right: -14%; bottom: -46%; width: 44%; aspect-ratio: 1;
  background:
    repeating-linear-gradient(0deg, rgba(20, 20, 20, 0.08) 0 2px, transparent 2px 6px),
    radial-gradient(circle, rgba(20, 20, 20, 0.12) 0 45%, transparent 46%);
  border-radius: 50%; pointer-events: none;
}
.timeline { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; max-width: 1280px; display: grid; grid-template-columns: repeat(5, 1fr); }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 98px; height: 3px; background: var(--ink); }
.timeline li { position: relative; padding-right: 24px; }
.tl-year { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(56px, 6vw, 88px); line-height: 1; color: transparent; -webkit-text-stroke: 2px var(--ink); transition: color 0.3s; }
.timeline li:hover .tl-year { color: var(--ink); }
.timeline li::after { content: ""; position: absolute; left: 0; top: 92px; width: 15px; height: 15px; background: var(--yellow); border: 3px solid var(--ink); transform: rotate(45deg); }
.timeline li.next::after { background: var(--ink); }
.timeline li.next .tl-year { color: var(--ink); text-shadow: 4px 4px 0 var(--acc-2); }
.timeline h4 { margin: 34px 0 10px; font-size: 18px; display: inline-block; background: var(--ink); color: var(--yellow); padding: 2px 10px; transform: skewX(-10deg); }
.timeline p { font-size: 14px; color: var(--fg-2); }

/* ───── works · P5R ───── */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 32px; }
.tab { position: relative; padding: 8px 18px; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; border: 2px solid var(--ink); transform: skewX(-12deg); transition: background 0.2s, color 0.2s; }
.tab i { font-style: normal; font-size: 11px; color: var(--red); margin-left: 4px; }
.tab:hover { background: rgba(17, 17, 17, 0.06); }
.tab.on { background: var(--ink); color: #fff; }

.works { max-width: 1280px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.work {
  position: relative; display: flex; flex-direction: column; cursor: pointer;
  background: #fff; border: 2px solid var(--ink);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), opacity 0.3s;
  outline: none;
}
.work:hover, .work:focus-visible { transform: translate(-6px, -6px); box-shadow: 6px 6px 0 var(--red), 6px 6px 0 2px var(--ink); }
.work.featured { grid-column: span 2; grid-row: span 2; }
.work.hidden { display: none; }
.w-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 2px solid var(--ink); font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.w-no { background: var(--ink); color: #fff; padding: 2px 8px; transform: skewX(-12deg); }
.w-state { margin-left: auto; color: var(--red); font-family: var(--zh); letter-spacing: 0.08em; white-space: nowrap; }
.w-fig {
  flex: 1; display: grid; place-items: center; padding: 18px 16px;
  background:
    linear-gradient(rgba(17, 17, 17, 0.05) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, rgba(17, 17, 17, 0.05) 1px, transparent 1px) 0 0 / 20px 20px,
    #fbfaf6;
  border-bottom: 2px solid var(--ink);
}
.w-fig.pixel-bg { background: #111; }
.work.featured .w-fig { padding: 30px 26px; }
.work.featured .fig { max-height: 470px; }
.fig { display: block; width: 100%; height: auto; max-height: 380px; overflow: visible; }
.fig .part { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.fig .part.accent { fill: var(--red); stroke: var(--ink); }
.fig .wire { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.fig .wire.thin, .fig .wire.thin path { stroke-width: 1; stroke: rgba(17, 17, 17, 0.35); fill: none; }
.fig .sw rect { fill: #fff; stroke: var(--ink); stroke-width: 1.6; }
.fig .sw rect:nth-child(odd) { fill: var(--ink); }
.fig .flow path { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-dasharray: 7 5; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
.fig .feedback { fill: none; stroke: var(--red); stroke-width: 2.6; stroke-dasharray: 10 6; animation: flow 1s linear infinite reverse; }
.fig .arrow { fill: var(--red); }
.fig .node { fill: var(--ink); }
.fig .coil { fill: none; stroke: #fff; stroke-width: 2.4; }
.fig .pill { fill: var(--red); }
.fig .pill.alt { fill: #fff; stroke: var(--ink); stroke-width: 1.6; }
.fig .tb rect { fill: #fff; stroke: var(--ink); stroke-width: 1.4; }
.fig .tb line { stroke: var(--ink); stroke-width: 1; }
.fig .lbl { font-family: var(--mono); font-size: 10px; fill: #3d3b38; }
.fig .lbl.strong { fill: var(--ink); font-size: 11px; font-weight: 700; font-family: var(--zh), var(--mono); }
.fig .lbl.inv { fill: #fff; font-size: 11px; font-weight: 700; font-family: var(--zh), var(--mono); }
.fig .lbl.accent-t { fill: var(--red); font-weight: 700; font-size: 11px; font-family: var(--zh), var(--mono); }
.fig .bars rect { fill: #fff; stroke: var(--ink); stroke-width: 1.6; }
.fig .bars rect.hot { fill: var(--red); }
.fig .breath path { fill: rgba(17, 17, 17, 0.08); stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; }
.fig .breath.b2 path { fill: rgba(229, 25, 28, 0.12); stroke: var(--red); }
.fig .curve { fill: none; stroke: var(--ink); stroke-width: 2.4; }
.fig .area-pos { fill: rgba(17, 17, 17, 0.14); }
.fig .area-neg { fill: rgba(229, 25, 28, 0.3); }
.fig .fi rect { fill: var(--ink); }
.fig .fi rect:first-of-type { fill: var(--red); }
.fig .contact path { fill: none; stroke: var(--ink); stroke-width: 2.4; }
.fig .dot-accent { fill: var(--red); }
.fig .px-text { font-family: var(--mono); font-size: 12px; font-weight: 700; fill: #fff; letter-spacing: 0.08em; }
.fig .px-text.dim { font-size: 9px; fill: #8c8880; font-weight: 400; }
.w-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.w-meta { font-size: 12px; color: var(--mute); letter-spacing: 0.04em; }
.w-body h3 { font-size: 19px; line-height: 1.4; }
.w-body h3 small { display: block; font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.featured .w-body h3 { font-size: 28px; }
.w-body p { font-size: 14px; color: var(--fg-2); }
.w-body p b { color: var(--red); }
.w-more { margin-top: 6px; align-self: flex-start; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; border-bottom: 2px solid var(--red); }

/* modal */
.modal { padding: 0; border: 0; background: transparent; max-width: min(860px, 92vw); width: 100%; overflow: visible; color: var(--ink); }
.modal::backdrop { background: rgba(17, 17, 17, 0.72); }
.modal[open] .modal-panel { animation: slam 0.45s var(--ease); }
@keyframes slam { from { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); transform: skewX(-6deg) translateX(-40px); } to { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transform: none; } }
.modal-panel { position: relative; background: #fbfaf6; border: 3px solid var(--ink); box-shadow: 12px 12px 0 var(--red); padding: 0 0 26px; max-height: 86vh; overflow: auto; }
.modal-head { display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: var(--ink); color: #fff; font-family: var(--display); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 13px; position: sticky; top: 0; z-index: 1; }
.modal-no { background: var(--red); padding: 2px 10px; transform: skewX(-12deg); }
.modal-x { margin-left: auto; width: 32px; height: 32px; display: grid; place-items: center; font-size: 16px; transition: background 0.2s, transform 0.2s; }
.modal-x:hover { background: var(--red); transform: rotate(90deg); }
.modal-title { padding: 24px 26px 0; font-size: 28px; }
.modal-body { padding: 14px 26px 0; }
.modal-body p, .modal-body li { font-size: 15px; color: #3d3b38; }
.modal-body p + p { margin-top: 10px; }
.modal-body h4 { margin: 22px 0 8px; display: inline-block; padding: 2px 12px; background: var(--ink); color: #fff; font-size: 14px; letter-spacing: 0.1em; transform: skewX(-10deg); }
.modal-body ul { margin: 8px 0 0; padding-left: 20px; }
.modal-body li + li { margin-top: 6px; }
.modal-body li::marker { color: var(--red); }
.modal-body code { font-family: var(--mono); font-size: 13px; background: rgba(17, 17, 17, 0.06); padding: 0 4px; }
.spec-t { width: 100%; margin: 16px 0 4px; border-collapse: collapse; font-size: 14px; }
.spec-t th { text-align: left; padding: 7px 10px; background: var(--ink); color: #fff; font-weight: 700; font-size: 13px; }
.spec-t td { padding: 7px 10px; border-bottom: 1px solid rgba(17, 17, 17, 0.14); color: #3d3b38; }
.spec-t td b { color: var(--red); }
.modal-body .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 16px; }
.modal-body .tags span { font-family: var(--mono); font-size: 11.5px; padding: 3px 10px; border: 1.5px solid var(--ink); }
.modal-body pre { margin: 0; padding: 16px 18px; overflow-x: auto; background: var(--ink); color: #e9e6df; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; }
.modal-body .c { color: #8c8880; }
.modal-body .k { color: #ff5a5d; font-weight: 600; }
.modal-body .f { color: #f3f0e9; text-decoration: underline; text-decoration-color: var(--red); }
.modal-body .n { color: #ffb3b4; }
.modal-mail { display: inline-block; margin: 20px 26px 0; padding: 8px 18px; background: var(--red); color: #fff; font-family: var(--display); font-weight: 700; letter-spacing: 0.12em; transform: skewX(-12deg); cursor: pointer; transition: background 0.2s; }
.modal-mail:hover { background: var(--ink); }

/* ───── travel · P3R light ───── */
.travel { max-width: 1280px; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.globe-wrap { position: sticky; top: 100px; }
#globe { position: relative; filter: drop-shadow(0 26px 40px rgba(10, 29, 82, 0.25)); width: 100%; aspect-ratio: 1; display: block; cursor: grab; touch-action: none; }
#globe:active { cursor: grabbing; }
.globe-tip { position: absolute; pointer-events: none; padding: 4px 10px; background: var(--panel); color: var(--panel-fg); font-size: 12px; white-space: nowrap; opacity: 0; transform: translate(-50%, -150%) skewX(-10deg); transition: opacity 0.15s; }
.globe-tip.on { opacity: 1; }
.globe-cap { position: relative; display: block; margin-top: 8px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 0.3em; color: var(--mute); }

.trips { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--fg); }
.trips li { position: relative; display: grid; grid-template-columns: 78px 92px 1fr; gap: 16px; padding: 22px 12px 22px 0; border-bottom: 1px solid var(--line); cursor: default; isolation: isolate; }
.trips li::before { content: ""; position: absolute; inset: 0 0 0 -12px; z-index: -1; background: var(--panel); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); clip-path: polygon(0 0, 100% 0, 98% 100%, 0 100%); }
.trips li:hover::before { transform: scaleX(1); }
.trips li:hover { color: var(--panel-fg); }
.trips li:hover p { color: rgba(234, 246, 255, 0.72); }
.tp-year { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1; }
.tp-code { align-self: start; margin-top: 4px; justify-self: start; padding: 2px 8px; background: var(--acc); color: #fff; font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 0.14em; transform: skewX(-12deg); }
.trips li:hover .tp-code { background: var(--acc-2); color: var(--panel); }
.trips h4 { font-size: 18px; }
.trips p { margin-top: 4px; font-size: 14px; color: var(--fg-2); transition: color 0.2s; }

/* ───── words · P4G dialogue ───── */
.words::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(20, 20, 20, 0.05) 0 2px, transparent 2px 5px),
    radial-gradient(circle at 88% 78%, rgba(20, 20, 20, 0.12) 0 18%, transparent 18.2%),
    radial-gradient(circle at 88% 78%, transparent 0 24%, rgba(20, 20, 20, 0.08) 24.2% 25%, transparent 25.2%);
}
.dialog { position: relative; z-index: 1; max-width: 900px; margin: 34px 0 0; cursor: pointer; outline: none; }
.dl-name {
  position: absolute; left: 28px; top: -26px; z-index: 2;
  padding: 4px 30px 2px 20px; background: var(--k2); color: var(--k1); border: 3px solid var(--k1);
  font-family: var(--display); font-weight: 700; font-size: 24px; text-transform: uppercase; letter-spacing: 0.04em;
  transform: skewX(-12deg);
}
.dl-box {
  position: relative; min-height: 230px; padding: 46px 54px 40px;
  background: rgba(20, 20, 20, 0.94); color: #fff;
  border: 3px solid var(--k1); outline: 3px solid var(--k2); outline-offset: -9px;
  box-shadow: 12px 12px 0 var(--k3);
}
.dl-text { font-family: var(--serif); font-weight: 700; font-size: clamp(22px, 2.5vw, 34px); line-height: 1.7; white-space: pre-line; min-height: 2.2em; }
.dl-text .caret { display: inline-block; width: 0.5em; height: 0.12em; background: var(--k2); margin-left: 4px; animation: blink 0.7s steps(1) infinite; }
.dl-src { display: block; margin-top: 18px; font-size: 13px; letter-spacing: 0.14em; color: var(--k2); opacity: 0.75; }
.dl-next { position: absolute; right: 40px; bottom: 24px; color: var(--k3); font-size: 18px; animation: bob 0.9s steps(2) infinite; }
.dl-count { position: absolute; right: 20px; top: -30px; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.2em; color: var(--k1); }
.dl-hint { position: relative; z-index: 1; margin: 22px 0 0; font-size: 12px; letter-spacing: 0.2em; color: var(--mute); }
.essays { margin-top: 44px; max-width: 900px; display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
.es-k { padding: 3px 12px; background: var(--k1); color: var(--k2); font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; transform: skewX(-12deg); white-space: nowrap; }
.essays ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; border-left: 3px solid var(--k1); padding-left: 18px; }
.essays li { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; font-size: 14px; }
.essays b { font-family: var(--serif); font-size: 16px; }
.essays span { color: var(--fg-2); font-size: 13px; }

/* ───── contact · P5R calling card ───── */
.calling { max-width: 1280px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.cc-card {
  position: relative; padding: 40px 44px 36px; background: var(--red); color: var(--ink);
  transform: rotate(-2.5deg); box-shadow: 14px 14px 0 var(--ink);
  clip-path: polygon(0 2%, 100% 0, 99% 100%, 1% 97%);
}
.cc-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(17, 17, 17, 0.28) 1.4px, transparent 1.9px) 0 0 / 10px 10px; -webkit-mask: linear-gradient(135deg, transparent 50%, #000); mask: linear-gradient(135deg, transparent 50%, #000); pointer-events: none; }
.cc-k { position: relative; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.3em; color: #fff; }
.cc-title { position: relative; margin: 18px 0 24px; font-size: clamp(36px, 4.4vw, 78px); display: flex; flex-wrap: nowrap; gap: 0.03em; }
.cc-title .gap { width: 0.3em; }
.cc-title .r3, .cc-title .r7 { background: #fff; color: var(--red); }
.cc-body { position: relative; font-family: var(--serif); font-weight: 700; font-size: 16px; line-height: 1.9; max-width: 520px; }
.cc-sign { position: relative; display: block; margin-top: 18px; text-align: right; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: 0.06em; }
.cc-links { display: grid; border-top: 2px solid var(--ink); }
.cc-link { position: relative; display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 14px; padding: 20px 4px; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; isolation: isolate; transition: color 0.2s, padding 0.3s var(--ease); }
.cc-link::before { content: ""; position: absolute; inset: 0 -8px; z-index: -1; background: var(--ink); transform: scaleY(0); transform-origin: bottom; transition: transform 0.3s var(--ease); }
.cc-link:not(.static):hover { color: #fff; padding-left: 16px; }
.cc-link:not(.static):hover::before { transform: scaleY(1); }
.cc-link.static { cursor: default; }
.cc-link span { font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--red); }
.cc-link b { font-size: 17px; word-break: break-all; }
.cc-link i { font-style: normal; font-size: 18px; color: var(--red); }

/* ───── footer / toast ───── */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 26px var(--pad); color: var(--fg-2); font-size: 13px; }
.foot-jp { font-size: 12px; letter-spacing: 0.1em; }
.foot-note { font-size: 11px; color: var(--mute); }
.foot-btn { margin-left: auto; font-family: var(--display); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg); padding: 4px 12px; border: 1.5px solid currentColor; transform: skewX(-12deg); transition: background 0.2s, color 0.2s; }
.foot-btn:hover { background: var(--cyan); border-color: var(--cyan); color: var(--navy); }

.toast { position: fixed; left: 50%; bottom: 30px; z-index: 700; padding: 10px 22px; background: var(--navy); color: #fff; font-size: 13px; box-shadow: 5px 5px 0 var(--cyan); opacity: 0; transform: translate(-50%, 16px) skewX(-10deg); pointer-events: none; transition: opacity 0.25s, transform 0.25s var(--ease); }
.toast.on { opacity: 1; transform: translate(-50%, 0) skewX(-10deg); }

/* ───── responsive ───── */
@media (max-width: 1180px) {
  .bar-nav a i { display: none; }
  .about-grid { grid-template-columns: 340px 1fr; gap: 40px; }
  .hero-figure { right: 1%; height: min(62vh, 600px); opacity: 0.75; }
}
@media (max-width: 900px) {
  .bar-nav, .hud { display: none; }
  .bar-cal { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding: 90px var(--pad) 0; min-height: 0; }
  .hero-panel, .hero-shard, .hero-tone { top: auto; height: 440px; width: 100%; }
  .hero-panel, .hero-tone { clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 100%); }
  .hero-shard.s1 { clip-path: polygon(0 16%, 100% -2%, 100% 0.5%, 0 18.5%); }
  .hero-shard.s2 { display: none; }
  .moon-big { right: 6%; top: 70px; width: 120px; }
  .hero-figure { right: -4%; height: 400px; opacity: 0.9; }
  .hero-tag { display: none; }
  .menu { align-items: flex-start; height: 440px; justify-content: center; padding: 80px 0 20px; }
  .menu a { font-size: 40px; transform: rotate(-6deg) translateX(calc(var(--i) * 10px)); }
  .menu a:hover { transform: rotate(-6deg) translateX(calc(var(--i) * 10px + 10px)); }
  .hero-scroll { display: none; }
  .sec { padding: 96px var(--pad) 84px; }
  .about-grid { grid-template-columns: 1fr; }
  .status { max-width: 420px; }
  .spec { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: 1fr; gap: 34px; padding-left: 34px; }
  .timeline::before { left: 6px; top: 0; bottom: 0; width: 3px; height: auto; right: auto; }
  .timeline li::after { left: -34px; top: 26px; }
  .timeline h4 { margin-top: 8px; }
  .works { grid-template-columns: 1fr 1fr; }
  .travel, .calling { grid-template-columns: 1fr; gap: 48px; }
  .globe-wrap { position: relative; top: 0; max-width: 480px; margin: 0 auto; width: 100%; }
}
@media (max-width: 620px) {
  .bar { gap: 14px; }
  .c-date { font-size: 52px; }
  .spec { grid-template-columns: 1fr 1fr; }
  .works { grid-template-columns: 1fr; }
  .work.featured { grid-column: auto; grid-row: auto; }
  .work.featured .w-fig { padding: 18px 10px; }
  .trips li { grid-template-columns: 64px 1fr; }
  .trips li > div { grid-column: 1 / -1; }
  .dialog { margin-left: 0; }
  .dl-box { padding: 40px 26px 44px; }
  .cc-card { padding: 30px 26px; }
  .cc-link { grid-template-columns: 70px 1fr auto; }
  .foot-btn { margin-left: 0; }
  .spec-t { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
  .radar .shape { transform: none; }
}

/* ═════════ v5 · full-page sections, characters, new blocks ═════════ */
.sec { --chw: clamp(240px, 25vw, 400px); }
.sec-inner { position: relative; z-index: 2; width: 100%; max-width: 1280px; }
.sec:has(> .chara.right:not(.top):not(.small)) > .sec-inner { padding-right: var(--chw); max-width: calc(1280px + var(--chw)); }
.sec:has(> .chara.left) > .sec-inner { padding-left: var(--chw); max-width: calc(1280px + var(--chw)); }
.sec:has(> .chara.small) > .sec-inner { padding-right: clamp(160px, 18vw, 300px); }
#works .sec-head, #works .loadout { padding-right: clamp(240px, 26vw, 420px); }

.chara {
  position: absolute; bottom: 0; z-index: 1; margin: 0; height: min(90vh, 880px);
  pointer-events: none; opacity: 0; transition: opacity 0.8s var(--ease), translate 0.9s var(--ease);
}
.chara.right { right: max(0px, calc(var(--pad) - 40px)); translate: 80px 0; }
.chara.left { left: max(0px, calc(var(--pad) - 40px)); translate: -80px 0; }
.chara.top { top: 56px; bottom: auto; height: min(62vh, 560px); z-index: 1; }
.chara.low { height: min(80vh, 760px); }
.chara.small { height: min(54vh, 480px); }
.chara.shown { opacity: 1; translate: 0 0; }
.chara img {
  display: block; height: 100%; width: auto;
  filter: drop-shadow(0 0 1.5px var(--k2)) drop-shadow(14px 8px 0 color-mix(in srgb, var(--k3) 50%, transparent));
}
[data-theme="p3d"] .chara img, [data-theme="p3l"] .chara img { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 28px rgba(52, 198, 255, 0.45)); }
.chara figcaption {
  position: absolute; left: 4%; bottom: 14%; padding: 2px 12px;
  font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 0.24em; white-space: nowrap;
  background: var(--panel); color: var(--panel-fg); transform: rotate(-8deg) skewX(-12deg);
}
.chara.left figcaption { left: auto; right: 4%; }
.chara figcaption.bubble {
  left: -46%; top: 4%; bottom: auto; padding: 14px 20px; white-space: normal; width: max-content;
  font-family: var(--zh); font-size: 15px; letter-spacing: 0.04em; line-height: 1.5;
  background: #fff; color: var(--ink); border: 3px solid var(--ink); transform: rotate(-4deg);
  box-shadow: 6px 6px 0 var(--red);
}
.chara figcaption.bubble::after { content: ""; position: absolute; right: 24px; bottom: -16px; width: 22px; height: 16px; background: var(--ink); clip-path: polygon(0 0, 100% 0, 80% 100%); }

/* hero song request */
.hero .np { padding: 8px 18px 8px 14px; border: 1.5px solid var(--acc); transform: skewX(-12deg); transition: background 0.2s, color 0.2s; }
.hero .np:hover { background: var(--acc); }
.hero .np:hover .np-k, .hero .np:hover .np-v { color: var(--navy); }
.hero .np:hover .eq i { background: var(--navy); }

/* profile */
.keys { display: grid; gap: 0; border-top: 2px solid var(--fg); }
.key { display: grid; grid-template-columns: 54px 1fr; column-gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.key-no { grid-row: span 2; font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--acc); }
.key h3 { font-size: 20px; display: flex; align-items: baseline; gap: 12px; }
.key h3 small { font-family: var(--display); font-size: 11px; letter-spacing: 0.24em; color: var(--acc); }
.key p { margin-top: 4px; font-size: 14.5px; color: var(--fg-2); }
.profile { gap: 30px; }
.spec { grid-template-columns: repeat(3, 1fr); }

/* journey */
.counts { position: relative; z-index: 1; margin-top: 64px; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 3px solid var(--ink); max-width: 1280px; }
.count { padding: 18px 16px 6px 0; }
.count + .count { padding-left: 18px; border-left: 1px solid var(--line); }
.count b { display: block; font-family: var(--display); font-size: clamp(40px, 4.4vw, 64px); line-height: 1; }
.count sup { font-size: 0.42em; color: var(--acc-2); vertical-align: 0.9em; margin-left: 2px; }
.count span { font-size: 13px; color: var(--fg-2); letter-spacing: 0.06em; }
.roles { position: relative; z-index: 1; list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.roles li { padding: 4px 14px; background: var(--ink); color: var(--yellow); font-size: 13.5px; font-weight: 700; transform: skewX(-12deg); }
.roles li:nth-child(3n+2) { background: var(--acc-2); color: var(--ink); }

/* works loadout */
.loadout { list-style: none; margin: -24px 0 30px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 2; }
.loadout li { display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; background: #fff; border: 2px solid var(--ink); font-size: 13px; }
.loadout code { padding: 1px 8px; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 11.5px; }
.loadout li:nth-child(odd) code { background: var(--red); }
.works { position: relative; z-index: 2; }
.m-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 0; }
.m-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 2px solid var(--ink); display: block; }

/* compendium · tarot cards */
.compendium::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 100%, rgba(52, 198, 255, 0.22), transparent 55%),
    repeating-linear-gradient(115deg, transparent 0 60px, rgba(159, 233, 255, 0.04) 60px 62px);
}
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.arcana {
  position: relative; container-type: inline-size; aspect-ratio: 560 / 789; perspective: 1200px; cursor: pointer; color: #eaf6ff;
  transition: transform 0.3s var(--ease), translate 0.3s var(--ease);
}
.arcana:hover { translate: 0 -8px; }
.arcana:focus-visible { outline: 2px solid var(--c); outline-offset: 4px; }
.ar-flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.7s cubic-bezier(0.3, 1.3, 0.5, 1); }
.arcana[aria-pressed="true"] .ar-flip { transform: rotateY(180deg); }
.ar-face, .ar-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 8px; overflow: hidden; box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35); }
.arcana:hover .ar-face, .arcana:hover .ar-back { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4), 0 0 0 2px var(--c); }
.ar-face img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ar-face::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.28) 48%, transparent 60%) -160% 0 / 250% 100% no-repeat;
  transition: background-position 0.8s var(--ease);
}
.arcana:hover .ar-face::after { background-position: 160% 0; }
.ar-back {
  transform: rotateY(180deg); display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 16px;
  background: linear-gradient(170deg, rgba(15, 51, 132, 0.96), rgba(5, 12, 38, 0.98));
  border: 1.5px solid color-mix(in srgb, var(--c) 70%, transparent);
  outline: 1px solid color-mix(in srgb, var(--c) 30%, transparent); outline-offset: -7px;
}
.ar-jp { font-size: 12px; letter-spacing: 0.3em; color: color-mix(in srgb, var(--c) 80%, #fff); }
.ar-credit { margin-top: 18px; font-family: var(--display); font-size: 10.5px; letter-spacing: 0.16em; color: rgba(234, 246, 255, 0.45); }
.ar-num { font-family: var(--serif); font-weight: 900; font-size: 34px; line-height: 1; color: var(--c); }
.ar-name { position: absolute; right: 18px; top: 22px; font-family: var(--display); font-weight: 700; font-size: 10.5px; letter-spacing: 0.24em; color: rgba(234, 246, 255, 0.55); }
.arcana h3 { margin-top: 4px; font-size: 21px; }
.arcana p { flex: 1; font-size: 13.5px; line-height: 1.75; color: rgba(234, 246, 255, 0.72); }
.arcana em { font-style: normal; color: var(--c); font-family: var(--display); font-weight: 700; letter-spacing: 0.04em; }
.ar-rank { display: flex; align-items: center; gap: 4px; font-family: var(--display); font-weight: 700; font-size: 10.5px; letter-spacing: 0.2em; color: var(--c); }
.ar-rank i { width: 12px; height: 5px; background: rgba(159, 233, 255, 0.16); transform: skewX(-20deg); }
.ar-rank i:first-of-type { margin-left: 6px; }
.ar-rank i.on { background: var(--c); }

/* memories · polaroid wall */
.memories::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(-45deg, transparent 0 22px, rgba(255, 42, 60, 0.04) 22px 24px);
}
.memories .sec-title { color: #fff; }
.wall { columns: 4 200px; column-gap: 24px; }
.polaroid {
  display: block; width: 100%; margin: 0 0 26px; break-inside: avoid;
  padding: 10px 10px 12px; background: #f3f0e9; color: var(--ink); text-align: left;
  box-shadow: 6px 8px 0 rgba(0, 0, 0, 0.5);
  rotate: var(--r, 0deg); transition: rotate 0.3s var(--ease), scale 0.3s var(--ease), box-shadow 0.3s, opacity 0.7s var(--ease), transform 0.8s var(--ease);
  position: relative;
}
.polaroid::before { content: ""; position: absolute; left: 50%; top: -9px; width: 70px; height: 18px; translate: -50% 0; rotate: -3deg; background: rgba(255, 42, 60, 0.82); }
.polaroid:nth-child(3n)::before { background: rgba(243, 240, 233, 0.6); }
.polaroid img { display: block; width: 100%; height: auto; filter: saturate(0.92) contrast(1.04); }
.polaroid span { display: block; margin-top: 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; }
.polaroid:hover, .polaroid:focus-visible { rotate: 0deg; scale: 1.04; z-index: 3; box-shadow: 10px 12px 0 var(--red); outline: none; }

.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; overflow: hidden; }
.lightbox::backdrop { background: rgba(8, 8, 8, 0.9); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 14px; }
.lightbox[open] figure { animation: slam 0.4s var(--ease); }
.lightbox img { max-width: min(1200px, 86vw); max-height: 78vh; display: block; border: 8px solid #f3f0e9; box-shadow: 14px 14px 0 var(--red); }
.lightbox figcaption { display: flex; gap: 16px; align-items: baseline; color: #f3f0e9; font-size: 15px; }
.lightbox figcaption span { font-family: var(--display); font-weight: 700; letter-spacing: 0.2em; color: var(--red); }
.lb-btn { position: fixed; width: 52px; height: 52px; display: grid; place-items: center; font-size: 28px; color: #fff; background: var(--red); transform: skewX(-10deg); transition: background 0.2s; }
.lb-btn:hover { background: #fff; color: var(--ink); }
.lb-btn.prev { left: 3vw; top: 50%; }
.lb-btn.next { right: 3vw; top: 50%; }
.lb-btn.close { right: 3vw; top: 3vh; font-size: 18px; }

/* travel */
.travel-sec .travel { gap: 48px; }

/* ───── song request player ───── */
.player { --pc: #34c6ff; --pb: #0a1d52; --pt: #eaf6ff; position: fixed; left: 22px; bottom: 20px; z-index: 95; font-family: var(--zh); }
.player[data-game="P4G"] { --pc: #ffe330; --pb: #141414; --pt: #fff; }
.player[data-game="P5R"] { --pc: #e5191c; --pb: #111; --pt: #fff; }
.pl-mini {
  display: flex; align-items: center; gap: 12px; padding: 7px 16px 7px 8px; max-width: 320px;
  background: var(--pb); color: var(--pt); border: 2px solid var(--pc);
  transform: skewX(-10deg); box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.35); transition: translate 0.2s var(--ease);
}
.pl-mini:hover { translate: 0 -3px; }
.pl-disc { width: 30px; height: 30px; flex: none; border-radius: 50%; transform: skewX(10deg); background: radial-gradient(circle, var(--pb) 0 18%, var(--pc) 19% 26%, #222 27% 100%); box-shadow: inset 0 0 0 2px var(--pc); }
.player.playing .pl-disc { animation: spin 2.4s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.pl-mini-t { display: grid; text-align: left; line-height: 1.25; min-width: 0; }
.pl-mini-t i { font-style: normal; font-family: var(--display); font-weight: 700; font-size: 10px; letter-spacing: 0.2em; color: var(--pc); }
.pl-mini-t b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-mini .eq i { background: var(--pc); animation-play-state: paused; }
.player.playing .pl-mini .eq i { animation-play-state: running; }
.pl-panel {
  position: absolute; left: 0; bottom: calc(100% + 12px); width: 360px; max-height: min(620px, calc(100vh - 120px)); overflow: auto;
  background: var(--pb); color: var(--pt); border: 2px solid var(--pc); box-shadow: 10px 10px 0 color-mix(in srgb, var(--pc) 60%, transparent);
  clip-path: polygon(0 0, 100% 0, 100% 96%, 94% 100%, 0 100%);
}
.player.open .pl-panel { animation: slam 0.35s var(--ease); }
.pl-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--pc); color: var(--pb); font-family: var(--display); font-weight: 700; letter-spacing: 0.18em; font-size: 13px; }
.pl-head i { font-style: normal; margin-left: 6px; letter-spacing: 0.06em; }
.pl-x { width: 26px; height: 26px; font-weight: 700; }
.pl-now { padding: 16px 18px 12px; }
.pl-game { display: inline-block; padding: 1px 8px; background: var(--pc); color: var(--pb); font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 0.16em; transform: skewX(-12deg); }
.pl-title { display: block; margin-top: 8px; font-family: var(--display); font-size: 22px; line-height: 1.2; }
.pl-artist { font-size: 12.5px; opacity: 0.65; }
.pl-bar { margin-top: 14px; height: 6px; background: rgba(255, 255, 255, 0.14); cursor: pointer; }
.pl-bar span { display: block; height: 100%; width: 0; background: var(--pc); }
.pl-time { display: flex; justify-content: space-between; margin-top: 4px; font-family: var(--mono); font-size: 11px; opacity: 0.6; }
.pl-ctrl { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.pl-ctrl button { width: 34px; height: 34px; display: grid; place-items: center; font-size: 14px; border: 1.5px solid rgba(255, 255, 255, 0.3); transform: skewX(-10deg); transition: background 0.2s, color 0.2s; }
.pl-ctrl button:hover { background: var(--pt); color: var(--pb); }
.pl-ctrl .pl-play { width: 46px; height: 40px; background: var(--pc); color: var(--pb); border-color: var(--pc); font-size: 15px; }
.pl-ctrl input { flex: 1; accent-color: var(--pc); min-width: 0; }
.pl-tabs { display: flex; border-top: 1px solid rgba(255, 255, 255, 0.14); border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.pl-tabs button { flex: 1; padding: 8px 0; font-family: var(--display); font-weight: 700; letter-spacing: 0.16em; font-size: 13px; opacity: 0.55; transition: opacity 0.2s, background 0.2s; }
.pl-tabs button.on { opacity: 1; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 -3px 0 var(--pc); }
.pl-list { list-style: none; margin: 0; padding: 6px 0; }
.pl-list button { width: 100%; display: grid; grid-template-columns: 26px 1fr auto; grid-template-areas: "n t d" "n a d"; column-gap: 10px; padding: 7px 18px; text-align: left; transition: background 0.15s; }
.pl-list button:hover { background: rgba(255, 255, 255, 0.07); }
.pl-list button.on { background: color-mix(in srgb, var(--pc) 22%, transparent); }
.pl-list i { grid-area: n; align-self: center; font-style: normal; font-family: var(--display); font-weight: 700; font-size: 12px; color: var(--pc); }
.pl-list b { grid-area: t; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-list span { grid-area: a; font-size: 11.5px; opacity: 0.55; }
.pl-list em { grid-area: d; align-self: center; font-style: normal; font-family: var(--mono); font-size: 11px; opacity: 0.55; }
.pl-note { padding: 8px 18px 12px; font-size: 11px; opacity: 0.45; }

@media (max-width: 1180px) {
  .cards { gap: 12px; }
  .counts { grid-template-columns: repeat(3, 1fr); }
  .count:nth-child(4) { padding-left: 0; border-left: 0; }
  .spec { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .sec { min-height: 0; }
  .sec > .sec-inner { padding-left: 0 !important; padding-right: 0 !important; }
  #works .sec-head, #works .loadout { padding-right: 0; }
  .chara, .chara.top, .chara.low, .chara.small {
    position: relative; inset: auto; order: 3; align-self: center; height: 360px; margin-top: 40px; translate: 0 40px;
  }
  .chara.top { order: 3; }
  .chara.shown { translate: 0 0; }
  .chara figcaption.bubble { left: -60%; top: 0; }
  .sec { padding-bottom: 0; }
  .hero-figure { height: 420px; right: -2%; }
  .counts { grid-template-columns: repeat(2, 1fr); }
  .count:nth-child(odd) { padding-left: 0; border-left: 0; }
  .count:nth-child(4) { padding-left: 18px; border-left: 1px solid var(--line); }
  .wall { columns: 2 140px; column-gap: 16px; }
  .essays { grid-template-columns: 1fr; }
  .player { left: 12px; bottom: 12px; }
  .pl-panel { width: min(360px, calc(100vw - 24px)); }
}
@media (max-width: 620px) {
  .key { grid-template-columns: 40px 1fr; }
  .key-no { font-size: 30px; }
  .lb-btn.prev, .lb-btn.next { top: auto; bottom: 4vh; }
}
@media (prefers-reduced-motion: reduce) {
  .chara { opacity: 1; translate: none; }
}

/* ═════════ v6 · title screen, works selector, contact, pager ═════════ */
.hero.title { display: block; padding: 0; background: #dfe8f6; }
.ts-bg { position: absolute; inset: 0; }
.ts-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero.in .ts-bg img { animation: tsPan 18s ease-out both; }
@keyframes tsPan { from { scale: 1.08; translate: -1.5% 0; } }
.ts-tint { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 29, 82, 0.55) 0%, rgba(10, 29, 82, 0.1) 42%, rgba(10, 29, 82, 0) 60%, rgba(10, 29, 82, 0.35) 100%), linear-gradient(0deg, rgba(10, 29, 82, 0.45), transparent 40%); }
.hero.title .hero-figure { left: 31%; right: auto; bottom: 0; height: min(86vh, 860px); z-index: 2; }
.hero.title .hero-figure img { filter: drop-shadow(10px 6px 0 rgba(52, 198, 255, 0.55)); }

.ts-logo { position: absolute; right: var(--pad); top: 13vh; z-index: 3; text-align: right; }
.ts-word { display: flex; justify-content: flex-end; gap: 0.02em; font-family: var(--display); font-weight: 700; font-stretch: condensed; font-size: clamp(64px, 8.6vw, 150px); line-height: 0.9; letter-spacing: 0.02em; color: #fff; text-shadow: 0 0 0 transparent; }
.ts-word span { display: inline-block; color: transparent; -webkit-text-stroke: 3px #fff; filter: drop-shadow(0 3px 10px rgba(10, 29, 82, 0.45)); }
.ts-word span:nth-child(-n+5) { color: #fff; -webkit-text-stroke: 0; }
.ts-sub { display: inline-flex; align-items: center; gap: 0; margin-top: 10px; font-family: var(--display); font-weight: 700; font-size: clamp(22px, 2.6vw, 44px); line-height: 1; color: #fff; letter-spacing: 0.04em; }
.ts-sub-k { padding: 2px 12px 0; margin-right: 10px; background: linear-gradient(90deg, #34c6ff, #1466ff); color: #fff; }
.ts-sub i { font-style: normal; font-family: var(--zh); font-size: 0.36em; letter-spacing: 0.24em; margin-left: 16px; opacity: 0.85; }

.ts-info { position: absolute; left: var(--pad); top: 13vh; z-index: 3; max-width: 400px; color: #fff; }
.ts-info .calendar { margin-bottom: 26px; }
.ts-info .hero-line { margin-top: 0; font-size: clamp(20px, 1.9vw, 28px); text-shadow: 0 2px 14px rgba(5, 12, 38, 0.6); }
.ts-info .hero-sub { margin-top: 12px; font-size: 14px; color: rgba(255, 255, 255, 0.86); text-shadow: 0 1px 8px rgba(5, 12, 38, 0.7); }
.ts-info .np { margin-top: 24px; background: rgba(10, 29, 82, 0.55); }

.ts-menu { position: absolute; right: 0; bottom: 9vh; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; }
.ts-menu a {
  position: relative; display: flex; align-items: baseline; gap: 14px; padding: 0 var(--pad) 0 60px;
  font-family: var(--display); font-weight: 700; font-stretch: condensed; text-transform: uppercase;
  font-size: clamp(34px, 3.9vw, 62px); line-height: 1.02; color: #fff; isolation: isolate;
  text-shadow: 0 2px 12px rgba(5, 12, 38, 0.45); transition: color 0.15s;
}
.ts-menu a::before { content: ""; position: absolute; inset: 8% 0 4% 0; z-index: -1; background: #1a2fd8; transform: scaleX(0); transform-origin: right; transition: transform 0.22s var(--ease); }
.ts-menu a small { font-family: var(--zh); font-size: 0.26em; letter-spacing: 0.2em; opacity: 0; transition: opacity 0.2s; }
.ts-menu a:hover, .ts-menu a:focus-visible { color: #fff; text-shadow: none; outline: none; }
.ts-menu a:hover span, .ts-menu a:focus-visible span { color: transparent; -webkit-text-stroke: 2px #fff; }
.ts-menu a:hover::before, .ts-menu a:focus-visible::before { transform: scaleX(1); }
.ts-menu a:hover small, .ts-menu a:focus-visible small { opacity: 1; }
.ts-press { position: absolute; left: 50%; transform: translateX(-50%); bottom: 22px; white-space: nowrap; z-index: 3; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.3em; color: #fff; animation: blink 1.6s steps(1) infinite; }

.hero .ts-menu a, .hero .ts-logo, .hero .ts-info { visibility: hidden; }
.hero.in .ts-menu a, .hero.in .ts-logo, .hero.in .ts-info { visibility: visible; }
.hero.in .ts-logo { animation: tsLogo 0.9s 0.15s var(--ease) both; }
.hero.in .ts-info { animation: figIn 0.8s 0.35s var(--ease) both; }
.hero.in .ts-menu a { animation: menuIn 0.5s var(--ease) both; animation-delay: calc(0.45s + var(--i) * 0.06s); }
@keyframes tsLogo { from { opacity: 0; translate: 0 -30px; filter: blur(6px); } }

/* works selector */
.works[hidden] { display: none; }
#works .sec-head, #works .loadout { padding-right: 0; }
.wk-top { display: grid; grid-template-columns: auto 1fr; gap: 20px 48px; align-items: end; margin-bottom: 28px; }
.wk-top .sec-head { margin-bottom: 0; }
.wk-top .sec-lead { max-width: 520px; font-size: 16px; margin-top: 16px; }
.wk-top .loadout { margin: 0; justify-content: flex-end; align-self: end; }
.wk { position: relative; display: grid; grid-template-columns: minmax(300px, 380px) 1fr clamp(180px, 15vw, 250px); gap: 26px; align-items: stretch; min-height: min(62vh, 600px); }
.wk-list { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; gap: 8px; }
.wk-list button {
  width: 100%; display: grid; grid-template-columns: 44px 1fr; grid-template-areas: "n t" "n c"; column-gap: 12px; text-align: left;
  padding: 10px 14px 10px 10px; background: #fff; border: 2px solid var(--ink); transform: skewX(-8deg);
  transition: background 0.15s, color 0.15s, translate 0.2s var(--ease), box-shadow 0.2s;
}
.wk-list button > * { transform: skewX(8deg); }
.wk-list i { grid-area: n; align-self: center; font-style: normal; font-family: var(--display); font-weight: 700; font-size: 26px; color: var(--red); }
.wk-list b { grid-area: t; font-size: 15px; line-height: 1.35; }
.wk-list span { grid-area: c; font-family: var(--display); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.wk-list em { display: none; }
.wk-list button.on { background: var(--ink); color: #fff; translate: 14px 0; box-shadow: -8px 0 0 var(--red); }
.wk-list button.on i { color: #fff; }
.wk-list button.on span { color: #ff8f91; }
.wk-stage { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #fff; border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--red); overflow: hidden; cursor: pointer; }
.wk-stage.swap { animation: stageIn 0.35s var(--ease); }
@keyframes stageIn { from { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); } to { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); } }
.wk-stage .w-fig { min-height: 0; padding: 14px 18px; }
.wk-stage .fig { max-height: min(26vh, 280px); width: auto; max-width: 100%; }
#works { padding-top: 96px; padding-bottom: 60px; }
#works .sec-title { font-size: clamp(48px, 5.4vw, 88px); }
.wk-stage .w-body { padding: 14px 20px 18px; }
.wk-stage .w-body h3 { font-size: 22px; }
.wk-stage .w-more { cursor: pointer; }
.wk-chara { position: relative; margin: 0; align-self: end; }
.wk-chara img { display: block; width: 100%; height: auto; max-height: min(66vh, 620px); object-fit: contain; object-position: bottom; filter: drop-shadow(10px 6px 0 rgba(229, 25, 28, 0.45)); }
.wk-chara figcaption { position: absolute; left: 0; bottom: 18%; padding: 2px 10px; background: var(--red); color: #fff; font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 0.24em; transform: rotate(-8deg) skewX(-12deg); }

/* memories captions */
.polaroid span { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.polaroid span i { font-style: normal; font-family: var(--display); font-size: 11px; letter-spacing: 0.12em; color: var(--red); order: 2; white-space: nowrap; }

/* contact */
.ct { display: grid; grid-template-columns: 1fr minmax(300px, 360px) 1fr; gap: 40px; align-items: stretch; }
.ct .cc-card { align-self: center; }
.phone { display: flex; flex-direction: column; background: var(--ink); color: #fff; border: 3px solid var(--ink); box-shadow: 10px 10px 0 var(--red); transform: rotate(1.5deg); min-height: 440px; }
.ph-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--red); font-family: var(--display); }
.ph-head b { font-size: 18px; letter-spacing: 0.06em; }
.ph-head i { margin-left: auto; font-style: normal; font-size: 11px; letter-spacing: 0.16em; }
.ph-dot { width: 10px; height: 10px; border-radius: 50%; background: #7dffb4; box-shadow: 0 0 8px #7dffb4; }
.ph-chat { flex: 1; list-style: none; margin: 0; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.ph-chat li { max-width: 86%; padding: 8px 14px; font-size: 13.5px; line-height: 1.6; clip-path: polygon(0 0, 100% 4%, 97% 100%, 3% 96%); }
.ph-chat li b { display: block; font-size: 10.5px; letter-spacing: 0.16em; opacity: 0.6; }
.ph-chat .in { align-self: flex-start; background: #fff; color: var(--ink); }
.ph-chat .out { align-self: flex-end; background: var(--red); color: #fff; }
.phone.shown .ph-chat li { animation: bubble 0.4s var(--ease) both; }
.phone.shown .ph-chat li:nth-child(2) { animation-delay: 0.25s; } .phone.shown .ph-chat li:nth-child(3) { animation-delay: 0.5s; }
.phone.shown .ph-chat li:nth-child(4) { animation-delay: 0.75s; } .phone.shown .ph-chat li:nth-child(5) { animation-delay: 1s; } .phone.shown .ph-chat li:nth-child(6) { animation-delay: 1.25s; }
@keyframes bubble { from { opacity: 0; scale: 0.7; } }
.ph-input { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid rgba(255, 255, 255, 0.15); font-family: var(--mono); font-size: 12.5px; }
.ph-input span { flex: 1; padding: 6px 10px; background: rgba(255, 255, 255, 0.08); }
.ph-input a { padding: 6px 12px; background: var(--red); font-family: var(--display); font-weight: 700; letter-spacing: 0.1em; cursor: pointer; }
.ct-side { position: relative; display: flex; flex-direction: column; gap: 22px; }
.topics { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.topics li { padding: 4px 12px; border: 2px solid var(--ink); font-size: 13px; font-weight: 700; transform: skewX(-10deg); }
.topics li:nth-child(3n+1) { background: var(--ink); color: #fff; }
.ct-cat { position: relative; margin: auto 0 0 auto; width: clamp(150px, 13vw, 210px); }
.ct-cat img { display: block; width: 100%; height: auto; }
.ct-cat .bubble { position: absolute; right: 92%; top: -6%; padding: 10px 16px; width: max-content; background: #fff; color: var(--ink); border: 3px solid var(--ink); font-size: 14px; line-height: 1.5; transform: rotate(-4deg); box-shadow: 5px 5px 0 var(--red); }

/* pager */
.pager { position: fixed; right: calc(var(--pad) - 10px); top: 50%; z-index: 92; display: grid; gap: 6px; translate: 0 -50%; }
.pager button { width: 34px; height: 34px; display: grid; place-items: center; font-size: 12px; color: #fff; background: rgba(17, 17, 17, 0.55); border: 1.5px solid rgba(255, 255, 255, 0.6); transform: skewX(-10deg); transition: background 0.2s; }
.pager button:hover { background: var(--red); }
body.booting .pager { opacity: 0; }
main .sec { cursor: default; }

@media (max-width: 1180px) {
  .wk { grid-template-columns: 300px 1fr; }
  .wk-chara { display: none; }
  .ct { grid-template-columns: 1fr 1fr; }
  .ct-side { grid-column: 1 / -1; }
  .ts-logo .ts-word { font-size: 76px; }
}
@media (max-width: 900px) {
  .hero.title { min-height: 100svh; }
  .hero.title .hero-figure { left: auto; right: -6%; height: 58vh; opacity: 0.9; }
  .ts-logo { top: 84px; }
  .ts-info { top: auto; bottom: 30vh; max-width: 62%; }
  .ts-info .calendar { display: none; }
  .ts-menu { bottom: 4vh; }
  .ts-menu a { font-size: 30px; }
  .ts-press { display: none; }
  .wk-top { grid-template-columns: 1fr; }
  .wk-top .loadout { justify-content: flex-start; }
  .wk { grid-template-columns: 1fr; min-height: 0; }
  .wk-list button.on { translate: 0 0; }
  .ct { grid-template-columns: 1fr; }
  .phone { transform: none; min-height: 0; }
  .pager { display: none; }
}

/* ═════════ v7 · multi-page blog ═════════ */
a.inline { color: var(--acc); border-bottom: 1px solid currentColor; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot-links a { cursor: pointer; }
.foot-links a:hover { color: var(--acc); }

/* title screen scenes */
.hero.title { background: var(--navy); }
.ts-bg img { object-position: var(--op, 50% 50%); animation: sceneIn 0.6s var(--ease); }
.hero[data-scene="day"] { --op: 64% 50%; }
.hero[data-scene="dusk"] { --op: 26% 50%; }
.hero[data-scene="night"] { --op: 36% 50%; }
.hero.title .ts-tint {
  background:
    linear-gradient(90deg, rgba(10, 29, 82, 0.66) 0%, rgba(10, 29, 82, 0.16) 36%, transparent 52%),
    linear-gradient(270deg, rgba(10, 29, 82, 0.6) 0%, rgba(10, 29, 82, 0.1) 34%, transparent 46%);
}
.hero[data-scene="day"] .ts-tint, .hero[data-scene="dusk"] .ts-tint {
  background:
    radial-gradient(ellipse 46% 62% at 12% 26%, rgba(10, 29, 82, 0.78), rgba(10, 29, 82, 0.35) 60%, transparent 100%),
    linear-gradient(270deg, rgba(10, 29, 82, 0.62) 0%, rgba(10, 29, 82, 0.12) 34%, transparent 46%),
    linear-gradient(0deg, rgba(10, 29, 82, 0.45), transparent 22%);
}
.hero[data-scene="night"] .ts-tint { background: linear-gradient(90deg, rgba(5, 12, 38, 0.7), rgba(5, 12, 38, 0.2) 40%, rgba(5, 12, 38, 0.2) 60%, rgba(5, 12, 38, 0.72)); }
@keyframes sceneIn { from { opacity: 0.4; } }
.hero .calendar { cursor: pointer; }
.ts-scene { margin: -14px 0 20px; font-family: var(--jp); font-size: 12.5px; font-weight: 600; letter-spacing: 0.2em; color: var(--ice); text-shadow: 0 1px 6px rgba(5, 12, 38, 0.8); }
.ts-scene i { margin-left: 12px; font-style: normal; font-family: var(--zh); letter-spacing: 0.1em; opacity: 0.6; }

/* sub pages */
.page { position: relative; min-height: 100vh; min-height: 100svh; padding: 130px var(--pad) 110px; background: var(--bg); color: var(--fg); overflow: clip; }
.page-inner { position: relative; z-index: 2; max-width: 980px; }
.page.memories .page-inner { max-width: 1120px; }
.page-chara { position: absolute; right: max(0px, calc(var(--pad) - 30px)); top: 96px; z-index: 1; margin: 0; height: min(80vh, 760px); pointer-events: none; }
.page-chara img { display: block; height: 100%; width: auto; filter: drop-shadow(12px 8px 0 color-mix(in srgb, var(--k3) 40%, transparent)); }
.page-chara .bubble {
  position: absolute; left: -40%; top: 6%; padding: 12px 18px; font-size: 15px; line-height: 1.5;
  background: #fff; color: var(--ink); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--acc); transform: rotate(-4deg);
}

/* post lists */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 36px; }
.tag-cloud a { padding: 2px 12px; font-size: 13px; font-weight: 700; border: 1.5px solid currentColor; transform: skewX(-12deg); transition: background 0.2s, color 0.2s; }
.tag-cloud a i { margin-left: 6px; font-style: normal; font-family: var(--display); color: var(--acc); }
.tag-cloud a:hover { background: var(--fg); color: var(--bg-flat); }
.tag-cloud a:hover i { color: inherit; }
.tag-on { margin-bottom: 18px; font-size: 14px; color: var(--fg-2); }
.tag-on a { color: var(--acc); }
.year { display: grid; grid-template-columns: 130px 1fr; gap: 24px; padding: 22px 0; border-top: 2px solid var(--fg); }
.year h2 { font-family: var(--display); font-weight: 700; font-size: 58px; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--fg); }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-row { position: relative; z-index: 0; display: grid; grid-template-columns: 96px 1fr auto; column-gap: 18px; align-items: baseline; padding: 11px 16px; transition: color 0.2s; }
.post-row time { font-family: var(--display); font-weight: 700; letter-spacing: 0.06em; color: var(--acc); }
.post-row b { font-size: 18px; }
.post-row span { grid-column: 2; font-size: 14px; color: var(--fg-2); }
.post-row em { grid-column: 3; grid-row: 1; font-style: normal; font-size: 12px; color: var(--mute); white-space: nowrap; }
.post-row::before { content: ""; position: absolute; inset: 3px 0; z-index: -1; background: var(--panel); transform: skewX(-12deg) scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease); }
.post-row:hover, .post-row:focus-visible { color: var(--panel-fg); outline: none; }
.post-row:hover::before, .post-row:focus-visible::before { transform: skewX(-12deg) scaleX(1); }
.post-row:hover time, .post-row:hover span, .post-row:hover em { color: inherit; opacity: 0.85; }

/* reading */
.post { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.post-head { margin-bottom: 40px; padding-bottom: 26px; border-bottom: 3px solid var(--fg); }
.back { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; color: var(--acc); }
.post-meta { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 0.06em; }
.post-meta time { padding: 0 10px; background: var(--panel); color: var(--panel-fg); transform: skewX(-12deg); }
.post-meta a { color: var(--fg-2); }
.post-meta a:hover { color: var(--acc); }
.post-head h1 { margin-top: 14px; font-family: var(--serif); font-weight: 900; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.25; }
.prose { font-family: var(--serif); font-size: 17.5px; line-height: 2; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; display: flex; align-items: center; gap: 12px; font-family: var(--zh); font-size: 21px; }
.prose h2::before { content: ""; width: 12px; height: 12px; background: var(--acc); transform: rotate(45deg); }
.prose code { padding: 1px 6px; font-family: var(--mono); font-size: 0.84em; background: color-mix(in srgb, var(--fg) 10%, transparent); }
.prose pre { overflow: auto; padding: 16px 18px; font-family: var(--mono); font-size: 13.5px; line-height: 1.7; background: #111; color: #f3f0e9; border-left: 4px solid var(--acc); }
.prose pre .k { color: #ff6b6b; }
.prose pre .n { color: #ffd166; }
.prose pre .c { color: #8a8f98; }
.prose pre .f { color: #7dd3fc; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--zh); font-size: 14.5px; line-height: 1.6; }
.prose th, .prose td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.prose th { border-bottom: 2px solid var(--fg); }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 0.3em; }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 14px 22px; font-size: 20px; border-left: 4px solid var(--acc); background: color-mix(in srgb, var(--fg) 6%, transparent); }
.prose figure { margin: 1.6em 0 0; }
.prose .polaroid.flat { margin: 0; padding: 8px; rotate: 0deg; box-shadow: 8px 8px 0 color-mix(in srgb, var(--acc) 55%, transparent); }
.prose .polaroid.flat::before { display: none; }
.prose figcaption { margin-top: 10px; font-family: var(--zh); font-size: 13px; text-align: center; color: var(--mute); }
.prose .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tracks { list-style: none; padding: 0; counter-reset: t; font-family: var(--zh); }
.tracks li { display: flex; align-items: baseline; gap: 14px; padding: 7px 0; border-bottom: 1px dashed var(--line); counter-increment: t; }
.tracks li::before { content: counter(t, decimal-leading-zero); font-family: var(--display); font-weight: 700; color: var(--acc); }
.tracks li + li { margin-top: 0; }
.tracks button { font-weight: 700; text-align: left; }
.tracks button:hover { color: var(--acc); }
.tracks span { margin-left: auto; font-size: 13px; color: var(--mute); }
.prose .note { font-family: var(--zh); font-size: 13px; color: var(--mute); }
.post-foot { margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--fg-2); }
.post-foot [data-mail] { color: var(--acc); border-bottom: 1px solid currentColor; cursor: pointer; }
.post-nav { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-nav a { display: grid; gap: 2px; padding: 14px 18px; border: 2px solid var(--fg); color: var(--fg); transition: background 0.2s, color 0.2s; }
.post-nav a.r { text-align: right; }
.post-nav i { font-style: normal; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.14em; color: var(--acc); }
.post-nav a:hover { background: var(--panel); color: var(--panel-fg); }

/* home · recent */
.recent-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 44px; align-items: start; }
.box-k { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; padding-bottom: 8px; font-size: 18px; border-bottom: 3px solid currentColor; }
.box-k a, .box-k span { font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.18em; color: var(--acc); }
.recent-posts .post-row { grid-template-columns: 104px 1fr auto; }
.recent-posts .tag-cloud { margin: 24px 0 0; }
.now { padding: 22px 26px 24px; background: var(--panel); color: var(--panel-fg); transform: rotate(-1deg); box-shadow: 10px 10px 0 var(--acc-2); }
.now .box-k span { color: var(--acc-2); }
.now dl { margin: 6px 0 0; display: grid; gap: 12px; }
.now dl div { display: grid; grid-template-columns: 70px 1fr; }
.now dt { font-size: 12.5px; font-weight: 700; letter-spacing: 0.16em; color: var(--acc-2); }
.now dd { margin: 0; font-size: 15px; }
.now-play { font-weight: 700; text-align: left; }
.now-play:hover { color: var(--acc-2); }
.now-q { margin-top: 18px; padding-top: 14px; font-family: var(--serif); font-size: 15px; border-top: 1px dashed color-mix(in srgb, currentColor 35%, transparent); }

/* home · rooms */
.branches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.branch {
  position: relative; display: flex; flex-direction: column; height: clamp(270px, 40vh, 380px); padding: 16px 16px 0; overflow: hidden;
  background: var(--ink); color: #fff; clip-path: polygon(0 0, 100% 3%, 100% 100%, 0 97%);
  transition: transform 0.3s var(--ease), background 0.3s, color 0.3s, opacity 0.7s var(--ease);
}
.branch i { font-style: normal; font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1; color: var(--c); }
.branch b { margin-top: 6px; font-size: 22px; }
.branch span { font-size: 13px; opacity: 0.7; }
.branch img { position: absolute; left: 50%; bottom: -6%; height: 70%; width: auto; translate: -50% 0; transition: translate 0.4s var(--ease), scale 0.4s var(--ease); }
.branch:hover, .branch:focus-visible { background: var(--c); color: var(--ink); transform: translateY(-8px) rotate(-1.5deg); outline: none; }
.branch:hover i, .branch:focus-visible i { color: var(--ink); }
.branch:hover img, .branch:focus-visible img { translate: -50% -6%; scale: 1.05; }
.fr-strip { margin-top: 36px; }

/* friends */
.fr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.fr-card {
  display: grid; grid-template-columns: 64px 1fr auto; column-gap: 16px; align-items: center; padding: 18px 20px;
  background: #fff; color: var(--ink); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--fc, var(--acc));
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.fr-av { grid-row: span 2; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--fc, var(--ink)); color: #fff; font-family: var(--display); font-weight: 700; font-size: 24px; }
.fr-card b { font-size: 18px; line-height: 1.3; }
.fr-card span:not(.fr-av) { grid-column: 2; font-size: 13px; color: #555; }
.fr-card i { grid-column: 3; grid-row: 1 / span 2; font-style: normal; font-size: 18px; }
.fr-card:hover, .fr-card:focus-visible { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 10px 10px 0 var(--fc, var(--acc)); outline: none; }
.fr-card.more { border-style: dashed; box-shadow: none; }
.fr-card.more .fr-av { background: var(--ink); }
.fr-grid.small { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.fr-grid.small .fr-card { grid-template-columns: 44px 1fr auto; padding: 11px 16px; }
.fr-grid.small .fr-av { width: 44px; height: 44px; font-size: 17px; }
.friends-page { padding-top: 0; }
body[data-page="friends"] .bar:not(.solid) { --fg: #fff; --panel: #fff; --panel-fg: #0a1d52; color: #fff; text-shadow: 0 1px 6px rgba(5, 12, 38, 0.7); }
.fr-banner { position: relative; height: 48vh; min-height: 300px; margin: 0 calc(var(--pad) * -1); overflow: hidden; }
.fr-banner img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.fr-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 29, 82, 0.4), transparent 38%, var(--bg-flat) 100%); }
.friends-page .page-inner { margin-top: -110px; }
.friends-page .page-chara { top: auto; bottom: 0; height: min(54vh, 500px); }
.fr-apply { margin-top: 56px; padding: 26px 28px; background: color-mix(in srgb, #fff 60%, transparent); border: 2px solid var(--fg); }
.fr-apply h2 { font-size: 22px; }
.fr-apply p { margin-top: 10px; color: var(--fg-2); }
.fr-apply [data-mail] { color: var(--acc); cursor: pointer; }
.fr-me { margin: 16px 0 0; padding: 14px 18px; overflow: auto; font-family: var(--mono); font-size: 14px; line-height: 1.9; background: var(--panel); color: var(--panel-fg); }
.fr-me .k { margin-right: 10px; color: var(--acc-2); }
.fr-copy { margin-top: 16px; padding: 6px 18px; font-weight: 700; color: #fff; background: var(--acc); transform: skewX(-12deg); }
.fr-copy:hover { background: var(--fg); }

/* log */
.log { list-style: none; margin: 0; padding: 0; border-left: 4px solid var(--ink); }
.log li { position: relative; display: grid; grid-template-columns: 170px 56px 1fr; gap: 18px; align-items: baseline; padding: 16px 0 16px 28px; border-bottom: 1px solid var(--line); }
.log li::before { content: ""; position: absolute; left: -12px; top: 22px; width: 20px; height: 20px; background: var(--ink); transform: rotate(45deg); }
.log li:first-child::before { background: var(--acc-2); }
.log time { font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 0.06em; }
.log b { font-family: var(--display); font-size: 26px; line-height: 1; }
.log p { font-size: 15px; }

/* album */
.g-group + .g-group { margin-top: 30px; }
.g-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; margin-bottom: 28px; padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.g-head b { font-family: var(--display); font-size: 44px; line-height: 1; color: #fff; }
.g-head span { padding: 0 12px; font-size: 19px; background: var(--acc); color: #0d0d0d; transform: skewX(-12deg); }
.g-head i { font-style: normal; font-size: 14px; color: var(--fg-2); }

@media (max-width: 1180px) {
  .branches { grid-template-columns: repeat(3, 1fr); }
  .page-chara { display: none; }
}
@media (max-width: 900px) {
  .recent-grid { grid-template-columns: 1fr; }
  .year { grid-template-columns: 1fr; gap: 6px; }
  .post-row, .recent-posts .post-row { grid-template-columns: 82px 1fr; }
  .post-row em { display: none; }
  .log li { grid-template-columns: 1fr; gap: 4px; }
  .ts-scene i { display: none; }
}
@media (max-width: 620px) {
  .branches { grid-template-columns: repeat(2, 1fr); }
  .prose .pair { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
}

/* floating, draggable player */
.pl-mini, .pl-head { touch-action: none; }
.pl-mini { cursor: grab; }
.pl-head { cursor: grab; user-select: none; }
.pl-grip { margin-right: 8px; font-size: 15px; letter-spacing: 0; opacity: 0.7; }
.player.dragging, .player.dragging .pl-mini, .player.dragging .pl-head { cursor: grabbing; }
.player.dragging .pl-mini { translate: 0 0; box-shadow: 9px 9px 0 rgba(0, 0, 0, 0.35); }
.player.below .pl-panel { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
@media (max-width: 860px) {
  .cards { grid-template-columns: repeat(2, 1fr); max-width: 520px; margin-inline: auto; }
}
@container (max-width: 250px) {
  .ar-back { padding: 12px 11px 10px; gap: 5px; }
  .ar-back .ar-name { display: none; }
  .ar-num { font-size: 24px; }
  .arcana h3 { margin-top: 0; font-size: 15px; }
  .arcana p { font-size: 11.5px; line-height: 1.55; }
  .ar-rank { font-size: 9px; letter-spacing: 0.12em; }
  .ar-rank i { width: 9px; }
}
.guestbook-page .page-inner { max-width: 760px; }
.gb-box { margin-top: 34px; padding: 26px 28px; min-height: 220px; background: rgba(5, 12, 38, 0.55); border: 1.5px solid rgba(159, 233, 255, 0.35); outline: 1px solid rgba(159, 233, 255, 0.14); outline-offset: -7px; }
.gb-wait { font-size: 15px; line-height: 1.8; color: rgba(234, 246, 255, 0.72); }
.gb-wait a { color: var(--ice); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.gb-box:has(iframe.giscus-frame) .gb-wait { display: none; }
