/* =========================================================
   nova — holo card edition
   palette comes straight from her: cardigan pink, blonde
   butter, headband cobalt, gem ruby, midnight skirt navy
   ========================================================= */

:root {
  --pink: #ff8cba;
  --pink-d: #e8528f;
  --butter: #ffd873;
  --cobalt: #3f6bff;
  --ruby: #e8264a;
  --ice: #bcd4ff;

  --display: 'Dela Gothic One', 'Arial Black', sans-serif;
  --body: 'Zen Maru Gothic', ui-rounded, 'Segoe UI', system-ui, sans-serif;
  --pixel: 'DotGothic16', ui-monospace, monospace;

  --spring: linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, .991, .977 51%, .974 53.8%, .975 57.1%, .997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
  --out: cubic-bezier(.16, 1, .3, 1);

  --pad: clamp(18px, 4vw, 56px);
  --navh: 76px;
  --r: 22px;
}

html[data-sky="night"] {
  color-scheme: dark;
  --bg: #0b0c2a;
  --bg-2: #14164a;
  --bg-3: #1d1f5e;
  --ink: #fff6ea;
  --dim: #b3b2dc;
  --line: rgba(255, 246, 234, .14);
  --surface: #14163f;
  --surface-2: #1c1e52;
  --word: #fff6ea;
  --shadow: #000;
  --word-shadow: var(--cobalt);
  --em: var(--butter);
}
html[data-sky="dawn"] {
  color-scheme: light;
  --bg: #ffe9e4;
  --bg-2: #ffd9dc;
  --bg-3: #ffc7d6;
  --ink: #1a1450;
  --dim: #574f8f;
  --line: rgba(26, 20, 80, .16);
  --surface: #fff8f3;
  --surface-2: #ffeee9;
  --word: #1a1450;
  --shadow: #d9809f;
  --word-shadow: var(--pink);
  --em: #c7247a;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  font-family: var(--body);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg-3) 100%) fixed;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  transition: color .5s;
}
html.lock, html.lock body { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
:focus-visible { outline: 3px solid var(--butter); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: -60px; left: 12px; z-index: 200; background: var(--butter); color: #1a1450; padding: 8px 14px; border-radius: 10px; transition: top .2s; }
.skip:focus { top: 12px; }
.dim { color: var(--dim); }
.wrap { width: min(1240px, 100%); margin-inline: auto; padding-inline: var(--pad); }

#sky, #spark { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#sky { z-index: 0; }
#spark { z-index: 120; }
main, .foot { position: relative; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #8d8cae; flex: none; transition: background .3s; }
.dot[data-s="online"] { background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: ping 2.2s infinite; }
.dot[data-s="idle"] { background: var(--butter); }
.dot[data-s="dnd"] { background: var(--ruby); }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }

.eyebrow { font-family: var(--pixel); font-size: 16px; letter-spacing: .08em; color: var(--pink); margin-bottom: 18px; }
.eyebrow::before { content: '✦ '; }
html[data-sky="dawn"] .eyebrow { color: #c7247a; }
.h2 { font-family: var(--display); font-weight: 400; font-size: clamp(38px, 7vw, 92px); line-height: 1.04; letter-spacing: -.01em; }
.h2 em { font-style: normal; color: var(--em); }

/* ---------- reveal (CSS driven, safe in background tabs) ---------- */
.js [data-rise] { opacity: 0; transform: translateY(44px) rotate(var(--r, 0deg)) scale(.97); transition: opacity .7s var(--out), transform 1s var(--spring); transition-delay: var(--d, 0s); }
.js [data-rise].in { opacity: 1; transform: rotate(var(--r, 0deg)); }

/* ---------- intro ---------- */
.intro { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; background: #ff8cba; pointer-events: none; animation: curtain .9s 1.05s var(--out) forwards; }
.no-intro .intro { display: none; }
.intro-word { display: flex; font-family: var(--display); font-size: clamp(64px, 16vw, 170px); color: #1a1450; line-height: 1; animation: introOut .5s 1s forwards; }
.intro-word span { display: inline-block; transform: translateY(70%) scale(.3) rotate(-14deg); opacity: 0; animation: letter .7s var(--spring) forwards; }
.intro-word span:nth-child(2) { animation-delay: .1s; }
.intro-word span:nth-child(3) { animation-delay: .2s; }
.intro-word span:nth-child(4) { animation-delay: .3s; }
@keyframes letter { to { transform: none; opacity: 1; } }
@keyframes introOut { to { transform: scale(1.3); opacity: 0; } }
@keyframes curtain { to { clip-path: ellipse(120% 0% at 50% 0%); visibility: hidden; } from { clip-path: ellipse(150% 150% at 50% 0%); } }

/* ---------- nav ---------- */
.nav { position: fixed; z-index: 100; top: 14px; left: 0; right: 0; padding-inline: var(--pad); display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.nav > * { pointer-events: auto; }
.nav-brand { width: 58px; height: 46px; display: grid; place-items: center; color: var(--ink); transition: transform .5s var(--spring); }
.nav-brand svg { width: 56px; height: 38px; }
.nav-brand:hover { transform: rotate(-8deg) scale(1.12); }
.nav-links { position: relative; display: flex; gap: 2px; padding: 5px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border: 1.5px solid var(--line); }
.nav-links a { position: relative; z-index: 1; padding: 8px 18px; border-radius: 99px; font-weight: 700; font-size: 15px; color: var(--dim); transition: color .25s; display: flex; gap: 6px; align-items: center; }
.nav-links a.is-on, .nav-links a:hover { color: var(--ink); }
.nav-links a.is-on { color: #1a1450; }
.nav-ink { position: absolute; top: 5px; bottom: 5px; left: 0; width: 60px; border-radius: 99px; background: var(--butter); opacity: 0; transition: transform .55s var(--spring), width .4s var(--out), opacity .3s; }
.nav-ink.on { opacity: 1; }
.sky-btn { position: relative; width: 46px; height: 46px; border-radius: 50%; background: color-mix(in srgb, var(--surface) 78%, transparent); border: 1.5px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: hidden; transition: transform .4s var(--spring); }
.sky-btn:hover { transform: scale(1.1) rotate(14deg); }
.sky-btn svg { position: absolute; inset: 11px; width: 21px; height: 21px; transition: transform .6s var(--spring), opacity .3s; }
html[data-sky="night"] .sb-sun { transform: translateY(34px) rotate(90deg); opacity: 0; }
html[data-sky="dawn"] .sb-moon { transform: translateY(-34px) rotate(-90deg); opacity: 0; }
.unread { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ruby); color: #fff; font-size: 12px; line-height: 18px; text-align: center; font-weight: 700; animation: pop .5s var(--spring); }
@keyframes pop { from { transform: scale(0); } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; border-radius: 99px; background: var(--butter); color: #1a1450; font-weight: 900; font-size: 18px; box-shadow: 0 6px 0 #c79a2b; transition: box-shadow .15s, translate .15s; will-change: transform; }
.btn svg { width: 20px; height: 20px; transition: transform .4s var(--spring); }
.btn:hover svg { transform: rotate(45deg) scale(1.15); }
.btn:active { translate: 0 5px; box-shadow: 0 1px 0 #c79a2b; }

/* ---------- hero ---------- */
.hero { --p: 0; position: relative; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; padding: calc(var(--navh) + 8px) var(--pad) 32px; }
.hero-stage { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 1.4vw, 24px); min-height: 0; }
.hero-w { display: flex; font-family: var(--display); font-size: clamp(90px, min(17.5vw, 40vh), 320px); line-height: 1; color: var(--word); user-select: none; transition: none; }
.hero-w--l { transform: translateX(calc(var(--p) * -22vw)); }
.hero-w--r { transform: translateX(calc(var(--p) * 22vw)); }
.hl { display: inline-block; text-shadow: .035em .05em 0 var(--word-shadow); translate: calc(var(--mx, 0) * var(--k, 8px)) calc(var(--my, 0) * var(--k, 8px)); transition: translate .5s var(--out); }
.hl:nth-child(2) { --k: -12px; }
.js .hl { animation: heroLetter 1.1s var(--spring) backwards; animation-delay: calc(var(--intro, 1.15s) + var(--i, 0) * 70ms); }
.no-intro .hl, .no-intro .hero-card { --intro: .05s; }
.hero-w--l .hl:nth-child(1) { --i: 0; } .hero-w--l .hl:nth-child(2) { --i: 1; }
.hero-w--r .hl:nth-child(1) { --i: 2; } .hero-w--r .hl:nth-child(2) { --i: 3; }
@keyframes heroLetter { from { opacity: 0; transform: translateY(.5em) rotate(12deg) scale(.6); } }
.hero-card { position: relative; flex: none; width: clamp(230px, min(26vw, 48vh), 420px); transform: translateY(calc(var(--p) * -60px)) scale(calc(1 + var(--p) * .12)) rotate(calc(var(--p) * 4deg)); }
.js .hero-card { animation: cardDrop 1.3s var(--spring) backwards; animation-delay: calc(var(--intro, 1.15s) + .15s); }
@keyframes cardDrop { from { opacity: 0; transform: translateY(70vh) rotate(-28deg) scale(.6); } }
.hero-hint { position: absolute; display: block; top: calc(100% + 14px); left: 0; right: 0; text-align: center; font-family: var(--pixel); font-size: 14px; color: var(--dim); }

.hero-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 20px; padding-top: 36px; }
.hero-line { font-size: clamp(17px, 1.6vw, 21px); font-weight: 700; line-height: 1.35; }
.hero-now { justify-self: end; text-align: right; font-size: 15px; font-family: var(--pixel); line-height: 1.5; padding-right: 84px; }
.hero-now .dot { margin-right: 8px; vertical-align: 0; }

/* ---------- holo card ---------- */
.tc { --mx: .5; --my: .5; --rx: 0deg; --ry: 0deg; --flip: 0deg; --a: 0; --c1: #ffc8dc; --c2: #bcd4ff; --c3: #ffe9a8; --frame: var(--butter); position: relative; display: block; width: 100%; aspect-ratio: 5 / 7; perspective: 1100px; cursor: pointer; touch-action: pan-y; outline-offset: 8px; border-radius: 26px; -webkit-tap-highlight-color: transparent; }
.tc-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(calc(var(--ry) + var(--flip))); will-change: transform; }
.tc-face { position: absolute; inset: 0; border-radius: 26px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; border: 7px solid var(--frame); box-shadow: 0 26px 50px -18px var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, .5); isolation: isolate; background: #fff; }
.tc-front { display: flex; flex-direction: column; }
.tc-sky { position: absolute; inset: 0; z-index: -1; background:
  repeating-conic-gradient(from 0deg at 50% 46%, rgba(255, 255, 255, .34) 0 8deg, transparent 8deg 18deg),
  radial-gradient(circle at 50% 46%, #fff 0, var(--c1) 34%, var(--c2) 100%); }
.tc-top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 9px 13px 4px; font-family: var(--display); color: #1a1450; font-size: clamp(14px, 1.45vw, 19px); line-height: 1.1; }
.tc-stars { font-family: var(--body); color: var(--pink-d); letter-spacing: .05em; font-size: .8em; }
.tc-art { flex: 1; min-height: 0; position: relative; display: grid; place-items: end center; }
.tc-art img { position: absolute; bottom: 0; left: 50%; height: 104%; width: auto; max-width: none; object-fit: contain; transform: translate(calc(-50% + (var(--mx) - .5) * -16px), calc((var(--my) - .5) * -10px)); filter: drop-shadow(0 8px 0 rgba(26, 20, 80, .13)); user-select: none; pointer-events: none; }
.tc-plate { position: relative; margin: 0 10px 10px; padding: 8px 12px; border-radius: 13px; background: #1a1450; color: #fff6ea; }
.tc-plate strong { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(14px, 1.5vw, 19px); line-height: 1.2; }
.tc-plate small { display: block; font-size: clamp(11.5px, 1vw, 13px); color: #c8c6ee; line-height: 1.3; }

.tc-foil, .tc-glare { position: absolute; inset: 0; pointer-events: none; }
.tc-foil { z-index: 3; opacity: calc(.28 + var(--a) * .5); mix-blend-mode: color-dodge; background:
  repeating-linear-gradient(calc(110deg + var(--mx) * 50deg),
    hsl(330 100% 72%) calc(var(--my) * 40%), hsl(45 100% 70%) calc(var(--my) * 40% + 8%), hsl(160 90% 68%) calc(var(--my) * 40% + 16%),
    hsl(205 100% 72%) calc(var(--my) * 40% + 24%), hsl(270 90% 74%) calc(var(--my) * 40% + 32%), hsl(330 100% 72%) calc(var(--my) * 40% + 40%));
  background-size: 180% 180%;
  -webkit-mask: linear-gradient(115deg, transparent 10%, #000 calc(var(--mx) * 100%), transparent 90%);
  mask: linear-gradient(115deg, transparent 10%, #000 calc(var(--mx) * 100%), transparent 90%); }
.tc-glare { z-index: 4; opacity: var(--a); mix-blend-mode: soft-light; background: radial-gradient(circle at calc(var(--mx) * 100%) calc(var(--my) * 100%), rgba(255, 255, 255, .95), rgba(255, 255, 255, .15) 38%, transparent 62%); }
.tc:not(.is-live) .tc-foil { animation: foilIdle 7s ease-in-out infinite alternate; }
@keyframes foilIdle { from { --mx: .2; --my: .3; } to { --mx: .85; --my: .75; } }
@property --mx { syntax: '<number>'; inherits: true; initial-value: .5; }
@property --my { syntax: '<number>'; inherits: true; initial-value: .5; }

.tc-back { transform: rotateY(180deg); background: #1a1450; color: #fff6ea; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; padding: 18px; }
.tc-back::before { content: ''; position: absolute; inset: 8px; border: 2px dashed rgba(255, 216, 115, .55); border-radius: 15px; }
.tc-wing { width: 56%; color: var(--butter); }
.tc-back dl { width: 100%; display: grid; gap: 8px; }
.tc-back dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 8px 5px; border-bottom: 1px dashed rgba(255, 246, 234, .25); }
.tc-back dt { font-family: var(--pixel); font-size: 13px; color: #c8c6ee; }
.tc-back dd { font-weight: 900; text-align: right; font-size: clamp(13px, 1.2vw, 15px); }
.tc-serial { font-family: var(--pixel); font-size: 12.5px; color: var(--butter); }

.tc--pink { --c1: #ffd3e4; --c2: #ff9fc6; --frame: var(--pink); }
.tc--night { --c1: #b9a8ff; --c2: #2b2570; --frame: #a58bff; }
.tc--night .tc-top { color: #fff; }
.tc--night .tc-stars { color: var(--ice); }
.tc--gold { --c1: #fff0bd; --c2: #ffc65c; --frame: #ffb338; }
.tc--day .tc-art img { height: auto; width: 100%; bottom: -6%; }
.tc--night .tc-art img { height: 100%; }
.tc--pink .tc-art img { height: 100%; }
.tc--gold .tc-art img { height: 88%; bottom: 8px; }

/* ---------- ribbons ---------- */
.ribbons { position: relative; height: clamp(120px, 15vw, 190px); margin-block: 30px 60px; overflow-x: clip; overflow-y: visible; z-index: 2; }
.ribbon { position: absolute; left: -5vw; width: 110vw; padding: 11px 0; overflow: hidden; font-family: var(--display); font-size: clamp(17px, 2.2vw, 26px); color: #1a1450; white-space: nowrap; }
.ribbon--a { top: 28%; background: var(--butter); transform: rotate(-2.6deg); z-index: 2; box-shadow: 0 6px 0 #c79a2b; }
.ribbon--b { top: 30%; background: var(--pink); transform: rotate(2.2deg); box-shadow: 0 6px 0 var(--pink-d); }
.ribbon-t { display: inline-flex; gap: 26px; will-change: transform; }
.ribbon-t b { font-weight: 400; color: var(--pink-d); }
.ribbon--b b { color: #fff; }

/* ---------- about ---------- */
.about { padding-block: clamp(50px, 9vw, 120px); }
.about-big { font-family: var(--display); font-size: clamp(25px, 4.5vw, 60px); line-height: 1.26; }
.about-big .w { color: color-mix(in srgb, var(--ink) 20%, transparent); transition: color .35s; }
.about-big .w.lit { color: var(--ink); }
.about-big .w.hot.lit { color: var(--em); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 26px); margin-top: clamp(50px, 7vw, 90px); }
.stat { padding: 24px 26px 26px; background: var(--pink); color: #1a1450; border-radius: var(--r); box-shadow: 0 8px 0 var(--pink-d); }
.stat--b { background: var(--butter); box-shadow: 0 8px 0 #c79a2b; }
.stat--c { background: var(--ice); box-shadow: 0 8px 0 #7f9fe0; }
.stat b { font-family: var(--display); font-weight: 400; font-size: clamp(56px, 7.5vw, 96px); line-height: 1; }
.stat sup { font-family: var(--pixel); font-size: 20px; vertical-align: super; margin-left: 4px; }
.stat span { display: block; font-weight: 700; margin-top: 6px; line-height: 1.35; }

/* ---------- deck ---------- */
.deck-sec { padding-block: clamp(60px, 9vw, 120px) 40px; overflow-x: clip; }
.deck { display: flex; justify-content: center; gap: 0; margin-top: 54px; padding-inline: var(--pad); perspective: 1400px; }
.deck-slot { --w: clamp(230px, 26vw, 340px); width: var(--w); flex: none; margin-inline: calc(var(--w) * -.04); transition: translate .7s var(--spring); }
.js .deck-slot[data-rise].in, .deck-slot { transform: rotate(var(--fan)) translateY(var(--drop)); }
.js .deck-slot[data-rise]:not(.in) { transform: translateY(120px) rotate(0); }
.deck-slot:nth-child(1) { --fan: -7deg; --drop: 22px; z-index: 1; }
.deck-slot:nth-child(2) { --fan: 0deg; --drop: 0px; z-index: 2; --d: .08s; }
.deck-slot:nth-child(3) { --fan: 7deg; --drop: 22px; z-index: 1; --d: .16s; }
.deck:hover .deck-slot:nth-child(1) { translate: -34px 0; }
.deck:hover .deck-slot:nth-child(3) { translate: 34px 0; }
.deck-slot:hover { z-index: 3; }
.deck-slot .tc-top { font-size: clamp(14px, 1.3vw, 18px); }

/* ---------- rules ---------- */
.rules { padding-block: clamp(70px, 10vw, 130px) 40px; }
.rule { --s: 1; position: sticky; top: 104px; display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 4vw, 56px); align-items: center; min-height: clamp(240px, 42vh, 380px); padding: clamp(26px, 5vw, 60px); margin-bottom: 26px; border-radius: 32px; color: #1a1450; transform: scale(var(--s)); transform-origin: 50% 0; box-shadow: 0 -10px 40px -24px rgba(0, 0, 0, .6); }
.rule--1 { background: var(--pink); }
.rule--2 { background: var(--butter); top: 124px; }
.rule--3 { background: var(--ice); top: 144px; }
.rule-n { font-family: var(--display); font-size: clamp(64px, 13vw, 170px); line-height: 1; color: rgba(26, 20, 80, .22); }
.rule h3 { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 4.4vw, 58px); line-height: 1.1; margin-bottom: 12px; }
.rule p { font-size: clamp(17px, 1.7vw, 22px); font-weight: 700; max-width: 34em; line-height: 1.4; }

/* ---------- live bento ---------- */
.live { padding-block: clamp(70px, 10vw, 130px) 40px; }
.bento { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 20px; margin-top: 48px; }
.dc { grid-row: span 2; position: relative; background: var(--surface); border-radius: var(--r); border: 1.5px solid var(--line); overflow: hidden; }
.dc-banner { height: 128px; background: linear-gradient(120deg, var(--cobalt), var(--pink)); display: grid; place-items: center end; padding-right: 26px; color: rgba(255, 255, 255, .55); }
.dc-banner svg { width: 120px; height: 80px; animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-9px) rotate(-3deg); } }
.dc-av { position: absolute; top: 76px; left: 22px; width: 104px; height: 104px; border-radius: 50%; background: #fbe6d2; border: 7px solid var(--surface); }
.dc-av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; border-radius: 50%; }
.dc-av .dot { position: absolute; right: -1px; bottom: 1px; width: 24px; height: 24px; border: 5px solid var(--surface); box-sizing: border-box; }
.dc-badges { position: absolute; top: 140px; right: 18px; display: flex; gap: 4px; padding: 3px 8px; background: var(--surface-2); border-radius: 9px; font-size: 15px; color: var(--pink); }
.dc-body { padding: 62px 24px 24px; }
.dc-body h3 { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.15; }
.dc-tag { color: var(--dim); font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px; }
.dc-body hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.dc-body h4 { font-family: var(--pixel); font-weight: 400; font-size: 13.5px; color: var(--dim); letter-spacing: .05em; margin: 14px 0 3px; }
.dc-body h4:first-of-type { margin-top: 0; }
.dc-btn { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; padding: 13px; border-radius: 12px; background: #5865f2; color: #fff; font-weight: 700; transition: background .2s, transform .35s var(--spring); }
.dc-btn svg { width: 22px; height: 22px; }
.dc-btn:hover { background: #4752c4; transform: translateY(-3px); }
.dc-activity { display: flex; gap: 12px; align-items: center; padding: 10px; margin-bottom: 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; line-height: 1.35; }
.dc-activity img { width: 52px; height: 52px; border-radius: 9px; flex: none; }
.dc-activity b { display: block; }

.sp { display: flex; align-items: center; gap: 20px; padding: 20px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); min-height: 150px; overflow: hidden; }
.sp-disc { position: relative; width: 108px; height: 108px; flex: none; border-radius: 50%; background: repeating-radial-gradient(circle, #16172f 0 2px, #26284d 2px 4px); display: grid; place-items: center; overflow: hidden; }
.sp-disc img { width: 100%; height: 100%; object-fit: cover; }
.sp-disc i { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.sp.is-play .sp-disc { animation: spin 7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sp-meta { min-width: 0; }
.sp-state { display: flex; gap: 8px; align-items: center; font-family: var(--pixel); font-size: 14px; color: var(--pink); }
html[data-sky="dawn"] .sp-state { color: #c7247a; }
.sp-title { display: block; font-family: var(--display); font-size: clamp(18px, 2.2vw, 25px); line-height: 1.2; margin: 3px 0; overflow-wrap: anywhere; }
.sp-title[href]:hover { color: var(--em); }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
.eq i { width: 3px; height: 4px; background: currentColor; border-radius: 1px; }
.sp.is-play .eq i { animation: eq .8s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.3s !important; } .eq i:nth-child(3) { animation-delay: -.55s !important; } .eq i:nth-child(4) { animation-delay: -.15s !important; }
@keyframes eq { to { height: 13px; } }

.dial { padding: 22px 24px 24px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); text-align: center; color: var(--dim); display: flex; flex-direction: column; justify-content: center; align-items: center; }
.dial-arc { width: min(280px, 100%); height: auto; overflow: visible; }
.dial-time { font-family: var(--display); font-size: clamp(40px, 5vw, 62px); line-height: 1; color: var(--ink); margin-top: -46px; }
.dial-sub { margin-top: 12px; font-size: 16px; }
#diffPhrase .v, .dial-sub .v { color: var(--ink); font-weight: 700; }

/* ---------- say hi ---------- */
.hi { padding-block: clamp(70px, 10vw, 130px) clamp(70px, 9vw, 120px); }
.hi-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 26px; margin-top: 48px; align-items: stretch; }
.channels { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ch { --c: #2aabee; position: relative; display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line); overflow: hidden; isolation: isolate; transition: color .25s, transform .45s var(--spring); }
.ch--dc { --c: #5865f2; }
.ch::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--c); clip-path: circle(0 at var(--ex, 90%) var(--ey, 50%)); transition: clip-path .6s var(--out); }
.ch:hover { color: #fff; transform: translateY(-4px) rotate(-.6deg); }
.ch:hover::before { clip-path: circle(150% at var(--ex, 90%) var(--ey, 50%)); }
.ch:hover .dim, .ch:hover small { color: rgba(255, 255, 255, .85); }
.ch-ic { width: 44px; height: 44px; flex: none; color: var(--c); transition: color .25s, transform .5s var(--spring); }
.ch:hover .ch-ic { color: #fff; transform: scale(1.15) rotate(-8deg); }
.ch-t { min-width: 0; flex: 1; display: block; }
.ch-t small { display: block; font-family: var(--pixel); font-size: 14px; color: var(--dim); }
.ch-t b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3vw, 34px); line-height: 1.2; }
.ch-t .dim { display: block; font-size: 15px; }
.ch-go { width: 26px; height: 26px; flex: none; transition: transform .45s var(--spring); }
.ch:hover .ch-go { transform: translate(4px, -4px) scale(1.2); }
.anon-note { position: relative; flex: 1; display: flex; align-items: center; gap: 12px; padding: 14px 20px 14px 8px; border-radius: var(--r); border: 2px dashed var(--line); min-height: 130px; }
.anon-chibi { width: 96px; height: auto; flex: none; animation: float 4s ease-in-out infinite; }
.anon-note p { font-size: 16px; line-height: 1.4; }
.anon-note b { display: block; font-family: var(--display); font-weight: 400; font-size: 19px; margin-bottom: 2px; }

/* ---------- chat ---------- */
.chat-slot { height: 640px; min-width: 0; }
.chat { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1.5px solid var(--line); flex: none; }
.chat-hash { font-size: 28px; font-weight: 500; color: var(--dim); line-height: 1; }
.chat-id { flex: 1; min-width: 0; line-height: 1.2; }
.chat-id b { display: block; font-weight: 900; }
.chat-id small { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); white-space: nowrap; overflow: hidden; }
.chat-id .dot { width: 8px; height: 8px; }
.ic-btn { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 11px; color: var(--dim); transition: color .2s, background .2s, transform .35s var(--spring); }
.ic-btn:hover { color: var(--ink); background: var(--surface-2); transform: scale(1.08); }
.ic-btn:active { transform: scale(.9); }
.ic-btn svg { width: 22px; height: 22px; }
.ic-emoji { font-size: 20px; color: var(--pink); }
#chatSound[aria-pressed="false"] { opacity: .55; }
#chatSound svg { overflow: visible; }
#chatClose { display: none; }
.chat.is-float #chatClose { display: grid; }

.chat-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.chat-log > :first-child { margin-top: auto; }
.m { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 3px 6px; border-radius: 10px; transition: background .2s; }
.m:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.m.is-new { animation: msgIn .55s var(--spring); }
@keyframes msgIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.m + .m:not(.m--cont) { margin-top: 12px; }
.m-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; background: #fbe6d2; }
.m-av--you { display: grid; place-items: center; background: var(--cobalt); color: #fff; font-family: var(--display); font-size: 16px; }
.m--cont .m-av, .m--cont .m-who { display: none; }
.m--cont .m-body { grid-column: 2; }
.m-who { display: flex; align-items: baseline; gap: 8px; line-height: 1.3; }
.m-who b { font-weight: 900; }
.m--nova .m-who b { color: var(--pink); }
html[data-sky="dawn"] .m--nova .m-who b { color: #c7247a; }
.m-who time { font-size: 12.5px; color: var(--dim); }
.m-bot { padding: 0 5px; border-radius: 4px; background: #5865f2; color: #fff; font-size: 11.5px; font-weight: 700; }
.m-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.42; }
.m-text a { color: #6db7ff; text-decoration: underline; text-underline-offset: 2px; }
html[data-sky="dawn"] .m-text a { color: #1f4fd8; }
.m-img { display: block; width: fit-content; max-width: min(320px, 100%); margin-top: 6px; border-radius: 12px; overflow: hidden; }
.m-img img { max-height: 280px; width: auto; }
.m-state { font-size: 12.5px; color: var(--dim); }
.m.is-pending .m-text { opacity: .55; }

.embed { --bar: var(--pink); position: relative; margin-top: 5px; padding: 11px 14px 13px 16px; border-radius: 6px 10px 10px 6px; background: var(--surface-2); border-left: 4px solid var(--bar); max-width: 440px; overflow: hidden; display: block; }
.embed-title { font-weight: 900; color: var(--ink); line-height: 1.3; }
a.embed:hover .embed-title { text-decoration: underline; }
.embed-site { font-size: 12.5px; color: var(--dim); }
.embed-desc { font-size: 15px; line-height: 1.4; margin-top: 3px; }
.embed-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px 12px; margin-top: 10px; font-size: 14px; }
.embed-fields b { display: block; font-size: 13px; font-weight: 900; }
.embed-fields span { color: var(--dim); }
.embed-thumb { display: block; width: 100%; margin-top: 8px; border-radius: 8px; }

.chat-day { display: flex; align-items: center; gap: 12px; margin: 14px 6px 6px; font-size: 13px; color: var(--dim); }
.chat-day::before, .chat-day::after { content: ''; flex: 1; border-top: 1px solid var(--line); }

.chat-typing { height: 0; opacity: 0; overflow: hidden; padding-inline: 20px; font-size: 13.5px; color: var(--dim); transition: height .25s, opacity .25s; flex: none; }
.chat-typing.on { height: 24px; opacity: 1; }
.chat-typing span { display: inline-flex; gap: 3px; margin-right: 4px; }
.chat-typing i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: dots 1s infinite; }
.chat-typing i:nth-child(2) { animation-delay: .15s; } .chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 30% { transform: translateY(-5px); opacity: 1; } 0%, 60%, 100% { opacity: .5; } }

.chat-form { position: relative; flex: none; padding: 6px 12px calc(12px + var(--kb-safe, 0px)); }
.chat-bar { display: flex; align-items: flex-end; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid transparent; transition: border-color .2s; }
.chat-bar:focus-within { border-color: var(--pink); }
.chat-bar textarea { flex: 1; min-width: 0; min-height: 38px; max-height: 150px; padding: 8px 4px; background: none; border: 0; outline: 0; resize: none; line-height: 22px; font-size: 16px; }
.chat-bar textarea::placeholder { color: var(--dim); }
.chat-send { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--pink); color: #1a1450; transition: transform .4s var(--spring), opacity .2s; }
.chat-send svg { width: 20px; height: 20px; }
.chat-send:disabled { opacity: .35; cursor: default; }
.chat-send:not(:disabled):hover { transform: scale(1.1) rotate(-10deg); }
.chat-send.fly svg { animation: fly .5s var(--out); }
@keyframes fly { 50% { transform: translate(24px, -20px) scale(.5); opacity: 0; } 51% { transform: translate(-20px, 16px) scale(.5); opacity: 0; } }
.chat-count { text-align: right; font-size: 12.5px; color: var(--dim); padding: 2px 4px 0; }
.chat-prev { position: relative; display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; margin-bottom: 8px; padding: 6px 8px 6px 6px; background: var(--surface-2); border-radius: 12px; font-size: 13.5px; color: var(--dim); }
.chat-prev img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.chat-prev.done span { display: none; }
.chat-prev button { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--ruby); color: #fff; }
.chat-prev button svg { width: 14px; height: 14px; }
.emoji { position: absolute; right: 12px; bottom: calc(100% - 2px); display: grid; grid-template-columns: repeat(6, 40px); gap: 2px; padding: 6px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid var(--line); box-shadow: 0 16px 34px -16px #000; animation: msgIn .4s var(--spring); z-index: 3; }
.emoji button { height: 40px; border-radius: 9px; font-size: 21px; transition: background .15s, transform .3s var(--spring); }
.emoji button:hover { background: var(--line); transform: scale(1.2); }
.chat-toast { position: absolute; left: 50%; bottom: 84px; z-index: 4; max-width: calc(100% - 28px); padding: 8px 14px; border-radius: 12px; background: var(--ruby); color: #fff; font-size: 14.5px; font-weight: 700; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .25s, transform .4s var(--spring); }
.chat-toast.on { opacity: 1; transform: translate(-50%, 0); }
.chat.is-drop::after { content: 'drop the photo here'; position: absolute; inset: 8px; z-index: 5; display: grid; place-items: center; font-weight: 900; font-size: 20px; color: #1a1450; background: color-mix(in srgb, var(--butter) 92%, transparent); border: 3px dashed #1a1450; border-radius: 16px; }

.chat.is-float { position: fixed; z-index: 110; right: 22px; bottom: 22px; width: min(420px, calc(100vw - 32px)); height: min(640px, calc(100dvh - 110px)); box-shadow: 0 30px 70px -22px #000; animation: floatIn .55s var(--spring); }
@keyframes floatIn { from { opacity: 0; transform: translateY(40px) scale(.9); transform-origin: 100% 100%; } }

.fab { position: fixed; z-index: 105; right: 24px; bottom: 24px; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; background: var(--pink); color: #1a1450; box-shadow: 0 6px 0 var(--pink-d), 0 18px 30px -12px #000; transition: transform .5s var(--spring), opacity .25s, box-shadow .15s; }
.fab svg { width: 28px; height: 28px; }
.fab:hover { transform: scale(1.1) rotate(-8deg); }
.fab:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--pink-d); }
.fab.off { opacity: 0; pointer-events: none; transform: scale(.4); }
.fab .unread { position: absolute; top: -2px; right: -2px; }

/* ---------- rail walker ---------- */
.walker { display: block; width: 52px; height: 91px; background: url('../img/nova-walk.webp') 0 0 / 500% 100% no-repeat; }
.walker.go { animation: walk .5s steps(1) infinite, hop .25s ease-in-out infinite alternate; }
@keyframes walk { 0% { background-position-x: 0; } 20% { background-position-x: 25%; } 40% { background-position-x: 50%; } 60% { background-position-x: 75%; } 80% { background-position-x: 100%; } }
@keyframes hop { to { translate: 0 -5px; } }
.rail { position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; height: 4px; pointer-events: none; }
.rail-line { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; transform-origin: 0 0; transform: scaleX(var(--sp, 0)); background: linear-gradient(90deg, var(--cobalt), var(--pink), var(--butter)); }
#walker { position: absolute; bottom: 3px; left: 0; opacity: var(--wo, 0); transition: opacity .3s; transform: translateX(var(--wx, 0px)) scaleX(var(--dir, 1)); }

/* ---------- footer ---------- */
.foot { overflow: hidden; padding-top: 30px; }
.foot-track { height: 96px; position: relative; z-index: 1; overflow: hidden; }
.walker--foot { position: absolute; bottom: 0; left: 0; animation: walk .5s steps(1) infinite, hop .25s ease-in-out infinite alternate, footRun 22s linear infinite; }
@keyframes footRun { from { transform: translateX(-70px); } to { transform: translateX(100vw); } }
.foot-big { font-family: var(--display); font-size: 31vw; line-height: .78; text-align: center; color: var(--pink); user-select: none; margin-top: -8.6vw; padding-bottom: .05em; }
.foot-row { position: relative; display: flex; justify-content: space-between; gap: 14px 30px; flex-wrap: wrap; padding-block: 22px calc(30px + env(safe-area-inset-bottom)); font-size: 15px; font-weight: 700; }
.foot-links { display: flex; gap: 20px; }
.foot-links a:hover { color: var(--em); }
.heart { display: inline-block; color: var(--ruby); animation: beat 1.3s infinite; }
@keyframes beat { 14%, 42% { transform: scale(1.3); } 28%, 70% { transform: scale(1); } }

/* view transition for the sky switch */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .dc { grid-row: auto; grid-column: 1 / -1; }
  .hi-grid { grid-template-columns: 1fr; }
  .channels { display: grid; grid-template-columns: 1fr 1fr; }
  .anon-note { grid-column: 1 / -1; }
}

@media (max-width: 1040px) and (orientation: portrait), (max-width: 760px) {
  .hero-stage { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: start; gap: 0 2vw; }
  .hero-w { font-size: min(27vw, 21vh); order: 0; line-height: .95; }
  .hero-w--l, .hero-w--r { transform: none; }
  .hero-card { order: 1; grid-column: 1 / -1; justify-self: center; width: min(66vw, 42vh, 440px); margin-top: 10px; }
  .hero-hint { position: static; margin-top: 10px; }
  .hero-foot { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 16px; padding-top: 18px; }
  .hero-now { justify-self: center; text-align: center; padding-right: 0; }
}

@media (max-width: 760px) {
  :root { --navh: 64px; }
  body { font-size: 16px; }
  html { scroll-padding-top: 20px; }

  .hero { padding-top: calc(var(--navh) + 4px); padding-bottom: 96px; }

  /* nav splits: brand + sky stay on top, links go to a bottom tab bar */
  .nav-brand { width: 46px; height: 46px; border-radius: 50%; background: color-mix(in srgb, var(--surface) 78%, transparent); border: 1.5px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .nav-brand svg { width: 34px; height: 24px; }
  .nav { top: 10px; }
  .nav-links { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 20px); box-shadow: 0 14px 30px -12px #000; background: color-mix(in srgb, var(--surface) 92%, transparent); }
  .nav-links a { padding: 9px 13px; font-size: 14.5px; }

  .ribbons { margin-block: 0 20px; }
  .stats { grid-template-columns: 1fr; }
  .stat { padding: 18px 22px 20px; }
  .deck { justify-content: flex-start; gap: 16px; margin-top: 36px; padding-block: 12px 26px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .deck::-webkit-scrollbar { display: none; }
  .deck-slot { --w: 72vw; --fan: 0deg !important; --drop: 0px !important; margin-inline: 0; scroll-snap-align: center; }
  .deck-slot:first-child { margin-left: 6vw; }
  .deck-slot:last-child { margin-right: 6vw; }
  .deck:hover .deck-slot { translate: none !important; }

  .rule { top: 16px; grid-template-columns: 1fr; gap: 4px; align-content: center; min-height: 320px; }
  .rule--2 { top: 30px; } .rule--3 { top: 44px; }
  .bento { grid-template-columns: 1fr; }
  .channels { grid-template-columns: 1fr; }
  .chat-slot { height: min(560px, 76svh); }

  /* phone: chat opens as a full sheet that follows the keyboard */
  .chat.is-float { left: 0; right: 0; top: 0; bottom: auto; width: 100%; height: var(--vvh, 100dvh); border-radius: 0; border: 0; padding-top: env(safe-area-inset-top); }
  .chat.is-float .chat-form { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .chat-toast { bottom: 76px; }
  .fab, .rail #walker { display: none; }
  .rail { bottom: auto; top: 0; height: 3px; }
  .rail-line { height: 3px; }
  .foot-row { padding-bottom: calc(92px + env(safe-area-inset-bottom)); justify-content: center; text-align: center; }
  .emoji { grid-template-columns: repeat(6, 1fr); left: 12px; right: 12px; }
}

@media (max-height: 520px) {
  .hero { min-height: 0; padding-bottom: 28px; }
  .hero-w { font-size: min(15vw, 36vh); }
  .hero-card { width: min(44vh, 190px); }
  .tc-plate small, .hero-card .tc-top, .hero-now { display: none; }
  .hero-card .tc-plate { padding: 5px 10px; }
  .hero-foot { grid-template-columns: 1fr auto; padding-right: 84px; }
  .nav-links a { padding: 7px 13px; font-size: 14px; }
  .chat-slot { height: 88vh; }
  .chat.is-float { height: calc(100dvh - 20px); bottom: 10px; }
  .fab { width: 54px; height: 54px; right: 16px; bottom: 14px; }
}

@media (max-height: 700px) and (max-width: 760px) {
  .hero-hint { display: none; }
}

@media (max-height: 640px) and (min-width: 761px) {
  .hero-hint { display: none; }
  .hero-card { width: clamp(170px, 42vh, 260px); }
  .hero-foot { padding-top: 14px; }
}

@media (hover: none) {
  .deck:hover .deck-slot { translate: none; }
  .hl { translate: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .intro { display: none; }
  .js [data-rise] { opacity: 1; transform: none; }
  .walker--foot { display: none; }
}
