@charset "UTF-8";
:root {
  --bg:#14111b; --surface:#251e30; --surface-2:#30263c; --ink:#efebf2; --muted:#b6a8bd;
  --accent:#d8a0c8; --accent-2:#a9c6e8; --line:#e9cfe52e;
  --serif:"Songti SC","STSong","SimSun","Noto Serif CJK SC","Source Han Serif SC","MS Mincho",serif;
  --sans:"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans CJK SC",system-ui,"Segoe UI",sans-serif;
  --live-color:#a9c6e8; --live-next:#fbd9e2; --live-third:#c7b9f0;
  --unfold-time:.44s; --unfold-ease:cubic-bezier(.22,.8,.25,1);
}
html { overflow-anchor:none; }
body { min-height:100dvh; background:#14111b; text-rendering:optimizeLegibility; overflow-x:hidden; }
#scene { position:fixed; inset:0; z-index:-3; background:radial-gradient(ellipse at 78% 22%,#d8a0c81c,transparent 60%),linear-gradient(178deg,#171420,#100d16); }
.scene-veil { position:fixed; inset:0; z-index:-2; pointer-events:none; background:linear-gradient(to bottom,#100d1694 0%,#100d1647 30%,#100d1657 68%,#100d169e 100%); }
#home { position:relative; display:flex; flex-direction:column; align-items:center; text-align:center; min-height:100dvh; padding:clamp(28px,7vh,72px) 20px 26px; }
.home-stack { margin-block:auto; width:100%; display:flex; flex-direction:column; align-items:center; padding-block:6px 20px; }
.title-kicker { font-size:clamp(11px,2.4vw,13px); letter-spacing:.5em; text-indent:.5em; color:#efebf28c; font-weight:500; margin:0; }
.main-title { margin:.1em 0 .02em; width:min(92vw,700px); filter:drop-shadow(0 3px 18px #d8a0c852) drop-shadow(0 2px 8px #0a08105c); }
.main-title svg { display:block; width:100%; height:auto; overflow:visible; }
.tagline { font:400 clamp(.95rem,3.2vw,1.2rem)/1.65 var(--serif); letter-spacing:.15em; text-indent:.15em; color:#efebf28c; margin:8px 0 clamp(30px,6.5vh,54px); text-shadow:0 2px 16px #0a0810bf; }

/* A single continuous ring: no bright inset highlights at the four corners.
   Blur stays on its own layer; expansion changes only the raised surface. */
.home-surface { position:relative; isolation:isolate; overflow:hidden; min-width:0; border:0; border-radius:20px; background:linear-gradient(165deg,#fff4fa1b,#26152270 60%); box-shadow:0 8px 24px #06040a42; }
.home-surface::before { content:""; position:absolute; inset:0; border-radius:inherit; z-index:-2; pointer-events:none; -webkit-backdrop-filter:blur(13px) saturate(1.18); backdrop-filter:blur(13px) saturate(1.18); }

.home-island { position:relative; container-type:inline-size; --entry-height:clamp(88px,7.2vw,92px); --entry-gap:clamp(12px,1.7vw,22px); width:min(1240px,100%); scroll-margin-top:20px; }
.home-entries { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); column-gap:var(--entry-gap); align-items:start; width:100%; margin:0 auto; }
.home-entry { position:relative; height:var(--entry-height); display:flex; align-items:center; min-width:0; gap:clamp(10px,1.1vw,14px); padding:clamp(17px,2vw,21px) clamp(14px,1.7vw,24px); text-align:left; color:var(--ink); }
.entry-icon { flex:0 0 auto; width:clamp(34px,3.5vw,46px); height:clamp(34px,3.5vw,46px); border-radius:14px; display:grid; place-items:center; color:#d8a0c8; background:linear-gradient(140deg,#d8a0c838,#d8a0c81a); border:1px solid #d8a0c838; transition:color .25s,background .25s; }
.entry-icon svg { width:22px; height:22px; }
.entry-text { display:flex; flex-direction:column; gap:4px; flex:1; min-width:0; }
.entry-text strong { font-size:clamp(1rem,1.25vw,1.16rem); font-weight:600; letter-spacing:.04em; color:#efebf2d6; white-space:nowrap; }
.entry-text small { font-size:clamp(.7rem,1vw,.8rem); color:#efebf28c; letter-spacing:.03em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.home-entry:hover .entry-icon,.home-entry:focus-visible .entry-icon { color:var(--live-color); }
.site-footer a:hover,.site-footer a:focus-visible { color:var(--ink); }

.entry-ring { position:absolute; inset:0; display:block; width:100%; height:100%; pointer-events:none; }
.entry-ring-base { color:#d8a0c85c; z-index:0; }
.home-entry>.entry-icon,.home-entry>.entry-text,.home-entry>.entry-art { position:relative; z-index:2; }

.entry-art { position:relative; z-index:2; }
.entry-text strong { position:relative; }

.entry-art { display:block; flex:0 0 auto; pointer-events:none; color:#d8a0c8c7; }
.entry-art svg { display:block; width:100%; height:100%; overflow:visible; }
.entry-download { width:29px; height:36px; }
.download-glint { opacity:.25; }
.download-fall { opacity:1; transform:translateY(0); transition:transform .6s cubic-bezier(.22,.8,.25,1); }
.download-tray { transform:translateY(0); transition:transform .6s cubic-bezier(.22,.8,.25,1); }
.home-entry:is(:hover,:focus-visible) .download-fall { transform:translateY(3px); }
.home-entry:is(:hover,:focus-visible) .download-tray { transform:translateY(1px); }
.entry-book { width:54px; height:44px; }
.book-cover { opacity:.5; }
.book-pages { transform:translateY(0); transition:transform .65s cubic-bezier(.22,.8,.25,1); }
.book-lines { opacity:.48; }
.book-ribbon { color:#c4d4e5; opacity:.85; }
.home-entry:is(:hover,:focus-visible) .book-pages { transform:translateY(-2px); }
.entry-conversation { width:44px; height:44px; }
.conversation-far { color:#adcbe8; opacity:.57; transform:translate(0,0); transition:transform .65s cubic-bezier(.22,.8,.25,1); }
.conversation-near { transform:translate(0,0); transition:transform .65s cubic-bezier(.22,.8,.25,1); }
.conversation-detail { opacity:.55; }
.conversation-accent { opacity:.2; }
.home-entry:is(:hover,:focus-visible) .conversation-far { transform:translate(1px,1px); }
.home-entry:is(:hover,:focus-visible) .conversation-near { transform:translate(-1px,-2px); }
.entry-sticker-icon svg { width:25px; height:25px; }
.sticker-back { opacity:.42; }
.sticker-fold { opacity:.65; }
.sticker-spark { color:#c5d6e8; opacity:.9; }
.entry-stickers { position:relative; display:block; width:100px; height:60px; }
.entry-stickers { opacity:1; transition:opacity .22s ease,translate .22s ease; }
.entry-stickers.is-changing { opacity:0; translate:0 4px; }
.entry-stickers img { position:absolute; left:0; top:0; width:47px; height:60px; object-fit:contain; background:transparent; border:0; border-radius:0; filter:drop-shadow(0 3px 4px #0b051b38); transform:translateX(var(--preview-x,0px)); }
.entry-stickers img:nth-child(1) { --preview-x:0px; z-index:1; }
.entry-stickers img:nth-child(2) { --preview-x:27px; z-index:2; }
.entry-stickers img:nth-child(3) { --preview-x:54px; z-index:3; }

/* Grid cells never move. A raised absolute surface grows across them,
   while its fixed-width inner content is revealed by the outer clipping. */
.home-island { --resource-column:calc((var(--resource-full-width,min(1240px,100vw - 40px)) - 3 * var(--entry-gap)) / 4); }
.resource-slot { height:var(--entry-height); min-width:0; }
.resource-island { position:absolute; top:0; left:0; z-index:10; width:var(--resource-column); display:grid; grid-template-columns:var(--resource-column) minmax(0,1fr); transition:width var(--unfold-time) var(--unfold-ease); }
.resource-trigger { grid-column:1; grid-row:1; z-index:2; overflow:hidden; align-self:start; height:var(--entry-height); }
.island-expander { grid-column:2; grid-row:1; width:calc(var(--resource-full-width,min(1240px,100vw - 40px)) - var(--resource-column)); min-width:0; height:0; overflow:hidden; transition:height var(--unfold-time) var(--unfold-ease); }
.island-clip { min-height:0; min-width:0; overflow:hidden; }
.home-island.is-open .resource-island { width:var(--resource-full-width,min(1240px,100vw - 40px)); }
.home-island.is-open .island-expander { height:var(--inline-height,var(--entry-height)); }
.home-island::after { content:""; display:block; height:0; transition:height var(--unfold-time) var(--unfold-ease); pointer-events:none; }
.home-island.is-open::after { height:max(0px,calc(var(--inline-height,var(--entry-height)) - var(--entry-height))); }
.island-heading { display:flex; align-items:center; justify-content:space-between; padding:6px 14px 0 22px; gap:12px; }
#island-label { font-size:11px; color:#c9b8ce9e; letter-spacing:.06em; }
#view.content-scroll { width:100%; min-height:0; max-height:min(56dvh,580px); margin:0; padding:0 22px 22px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#d8a0c85c transparent; outline:none; scroll-padding-top:14px; text-align:left; border-radius:0; }
#view.content-scroll .cv-title { font-size:23px; }
#view.content-scroll .cv-head { margin-bottom:14px; }

/* First stop: exactly the original row's outer bounds. A detail or format
   opens vertically only after the user chooses it. */
.home-island[data-stage="choices"] .island-heading { display:none; }
.home-island[data-stage="choices"] #island-label { display:none; }
.home-island[data-stage="choices"] #view.content-scroll { padding:0 12px 0 6px; max-height:min(64dvh,640px); }
.home-island[data-stage="choices"] #view>.cv-head { display:none; }
.home-island[data-stage="choices"] #view .cv-resource-list { grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; }
.home-island[data-stage="choices"] #view .cv-resource-option { flex-direction:column; justify-content:center; gap:5px; min-height:var(--entry-height); padding:10px 7px; border:0; border-radius:12px; background:none; text-align:center; }
.home-island[data-stage="choices"] #view .cv-resource-option>.icon { width:19px; height:19px; }
.home-island[data-stage="choices"] #view .cv-resource-copy { flex:initial; gap:1px; }
.home-island[data-stage="choices"] #view .cv-resource-copy strong { font-size:14px; line-height:1.35; }
.home-island[data-stage="choices"] #view .cv-resource-copy>span { font-size:9px; line-height:1.4; }
.home-island[data-stage="choices"] #view .cv-resource-option:hover { background:#e5bace0b; }
.home-island[data-stage="choices"] #view .cv-novel-block { border:0; background:none; }
.home-island[data-stage="choices"] #view .cv-novel-toggle { position:relative; }
.home-island[data-stage="choices"] #view .cv-expand-mark { position:absolute; right:5px; top:calc(var(--entry-height)/2 - 6px); }
.home-island[data-stage="choices"] #view .cv-format-links { padding:0 4px 12px; gap:4px; }
.home-island[data-stage="choices"] #view .cv-format-link { padding:9px 5px; }

/* Page routes use the document's scroll surface, with the homepage out of
   the accessibility tree. The backdrop and sticky bar never scale or fade. */
#page-shell { position:relative; isolation:isolate; min-height:100dvh; outline:none; }
#page-shell::before { content:""; position:fixed; inset:0; z-index:-1; background:linear-gradient(to bottom,#100d1629 0%,#100d1647 30%,#100d166b 66%,#100d1694 100%); pointer-events:none; }
body[data-route="emotes"] #page-shell::before { opacity:.6; }
.page-topbar { position:sticky; top:0; z-index:20; background:#201a2bec; border-bottom:1px solid #e9cfe51f; -webkit-backdrop-filter:blur(16px) saturate(1.12); backdrop-filter:blur(16px) saturate(1.12); }
.page-topbar-inner { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:16px; width:min(1120px,calc(100% - 64px)); min-height:72px; margin:auto; }
.page-back { display:inline-flex; justify-self:start; align-items:center; gap:9px; min-height:44px; padding:8px 8px 8px 0; font-size:12px; color:var(--muted); }
.page-back svg { width:19px; height:19px; }
.page-back:hover { color:var(--live-color); }
#page-label { margin:0; font-size:15px; font-weight:500; letter-spacing:.09em; }
.page-home { justify-self:end; display:flex; align-items:center; min-height:44px; font:14px var(--serif); letter-spacing:.1em; color:var(--muted); }
.page-home:hover { color:var(--live-color); }
#view:not(.content-scroll) { position:relative; width:min(1120px,calc(100% - 64px)); min-height:75svh; margin:0 auto; padding:30px 0 120px; max-height:none; overflow:visible; outline:none; text-align:left; animation:content-arrive .34s ease both; }
@keyframes content-arrive { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

.home-quote { width:min(92vw,680px); margin-top:clamp(30px,5.5vh,52px); }
.quote-card { position:relative; isolation:isolate; overflow:hidden; width:100%; border:1px solid #d8a0c833; border-radius:4px; background:linear-gradient(165deg,#fff4fa1f,#26152270 60%); padding:clamp(15px,2.6vw,24px) clamp(18px,3.6vw,32px); box-shadow:0 3px 18px #0c081273,inset 0 1px 0 #efe5ec1f; color:#f4edee; text-shadow:0 2px 14px #0c0812d9; text-align:left; }
.quote-card::before { content:""; position:absolute; inset:0; z-index:-1; border-radius:inherit; -webkit-backdrop-filter:blur(13px) saturate(1.18); backdrop-filter:blur(13px) saturate(1.18); }
#quote-text { display:inline; font:400 clamp(1.02rem,4vw,1.34rem)/1.8 var(--serif); letter-spacing:.05em; }
#quote-source { display:inline; font:400 clamp(.6rem,2.2vw,.7rem)/1.8 var(--sans); letter-spacing:.09em; color:#f4edee80; white-space:normal; }
#quote-source::before { content:""; display:inline-block; width:2.2em; height:1px; margin:0 .5em .28em .7em; vertical-align:middle; background:currentColor; }
.quote-card[data-length="medium"] #quote-text { line-height:1.66; }
.quote-card[data-length="long"] #quote-text { line-height:1.5; letter-spacing:.02em; }
.site-footer { margin-top:auto; padding-top:clamp(16px,2.6vh,26px); display:flex; flex-wrap:wrap; justify-content:center; gap:9px clamp(14px,3vw,22px); align-items:center; font-size:.78rem; letter-spacing:.08em; color:#efebf28c; }
.site-footer a { min-height:32px; display:inline-flex; align-items:center; }
.community-panel { padding:60px 0; text-align:center; }
.community-panel h2 { font:500 28px var(--serif); margin:0 0 12px; }
.community-panel p { font-size:13px; color:var(--muted); margin:0 0 24px; }
.button:hover,.icon-button:hover,.back-link:hover,.text-link:hover,.gallery-credit a:hover { color:var(--live-color); }
.button.primary:hover { color:var(--bg); }
.chip:hover:not(.active) { color:var(--live-color); border-color:var(--live-next); }
.fic-disclaimer { border-left:none; padding-left:0; }
.dialog-head { border-bottom:0; }
#dialog { background:linear-gradient(145deg,#2c2336,#1a1624); border:1px solid #d8a0c83d; }
@media(min-width:769px) and (max-width:1100px) {
  .resource-trigger>.entry-icon,.home-entry[href="#fanfic"]>.entry-icon,.home-entry[href="#emotes"]>.entry-icon,.home-entry[href="http://qq.adachi.love/"]>.entry-icon { display:none; }
  .entry-book { width:43px; }
  .entry-conversation { width:38px; }
  .entry-stickers { width:83px; height:53px; }
  .entry-stickers img { width:41px; height:53px; }
  .entry-stickers img:nth-child(2) { --preview-x:21px; }
  .entry-stickers img:nth-child(3) { --preview-x:42px; }
}
@media(min-width:1101px) and (max-width:1120px) { .home-entry[href="#emotes"]>.entry-icon { display:none; } }
@media(max-width:768px) {
  .home-island[data-stage="choices"] #view .cv-novel-block.is-open { grid-column:1/-1; }
  .home-island[data-stage="choices"] #view .cv-format-links { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:0 4px 14px; }
  .home-island[data-stage="choices"] #view .cv-format-link { min-height:76px; padding:14px; border-radius:13px; gap:5px 10px; background:#ffffff09; }
  .home-island[data-stage="choices"] #view .cv-format-link strong { font-size:16px; }
  .home-island[data-stage="choices"] #view .cv-format-link>span:not(.icon) { font-size:12px; }
  .home-island[data-stage="choices"] #view .cv-format-link .icon { width:20px; height:20px; }
  #home { padding:clamp(20px,4.5vh,40px) 18px 94px; }
  .home-stack { padding-block:0 14px; }
  .home-entries { grid-template-columns:minmax(0,1fr); gap:10px; max-width:440px; }
  .home-entry { padding:16px 20px; gap:14px; }
  .entry-icon { width:44px; height:44px; }
  .entry-text strong { font-size:1.08rem; }
  .entry-text small { font-size:.76rem; }
  .home-island { --entry-height:88px; }
  .resource-slot { position:relative; }
  .resource-island,.home-island.is-open .resource-island { width:min(440px,100%); grid-template-columns:minmax(0,1fr); }
  .island-expander { width:100%; grid-column:1; grid-row:2; }
  .home-island.is-open::after { height:max(0px,calc(var(--inline-height,0px) - 3 * var(--entry-height) - 30px)); }

  .island-heading { padding:0 10px 0 20px; }
  #view.content-scroll { padding:0 16px 18px; max-height:58dvh; }
  .home-island[data-stage="choices"] #view.content-scroll { padding:0 16px 18px; max-height:58dvh; }
  .home-island[data-stage="choices"] #view .cv-resource-list { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .home-island[data-stage="choices"] #view .cv-resource-option { padding:10px 8px; }
  .home-island[data-stage="choices"] #view .cv-resource-option>.icon { width:22px; height:22px; }
  .tagline { margin-bottom:clamp(24px,5vh,40px); }
  .home-quote { max-width:440px; }
  .quote-card { padding:13px 17px; }
  #quote-text { font-size:clamp(.92rem,3.9vw,1.06rem); line-height:1.74; }
  .quote-card[data-length="medium"] #quote-text { font-size:clamp(.86rem,3.5vw,.98rem); line-height:1.62; }
  .quote-card[data-length="long"] #quote-text { font-size:clamp(.8rem,3.2vw,.92rem); line-height:1.52; }
  .site-footer { font-size:10px; }
  .page-topbar-inner { width:calc(100% - 32px); min-height:60px; gap:8px; }
  .page-home { font-size:11px; letter-spacing:.02em; }
  #page-label { font-size:14px; }
  #view:not(.content-scroll) { width:calc(100% - 32px); padding-top:22px; }
}
@media(forced-colors:active) {
  .home-surface,.quote-card { border:2px solid CanvasText; }
  .entry-ring-base { display:none; }
}
@media(prefers-reduced-motion:reduce) { .home-entries,.resource-island,.island-expander,.island-clip { transition:none; } }
/* Resource and format selection refinements. */
@media(hover:hover) {
  .home-entries>.home-entry { top:0; left:0; transition:top .3s cubic-bezier(.22,.8,.25,1),left .3s cubic-bezier(.22,.8,.25,1),box-shadow .3s; }
  .home-entries>.home-entry:hover { top:-3px; left:-2px; box-shadow:0 12px 28px #06040a55; }
  .home-entries>.home-entry:active { top:0; left:0; }
  .resource-island { transition:width var(--unfold-time) var(--unfold-ease),top .3s cubic-bezier(.22,.8,.25,1),left .3s cubic-bezier(.22,.8,.25,1),box-shadow .3s; }
  .home-island:not(.is-open):not(.is-closing) .resource-island:hover { top:-3px; left:-2px; box-shadow:0 12px 28px #06040a55; }
  .home-island:not(.is-open):not(.is-closing) .resource-island:active { top:0; left:0; }
  .home-island:is(.is-open,.is-closing) .resource-island { top:0; left:0; }
}
.home-island[data-stage="detail"] #view.content-scroll { max-height:none; }
.home-island[data-stage="detail"] #view .music-library { width:100%; max-width:none; margin:0; }
.home-island[data-stage="detail"] #view .cv-head { margin-bottom:10px; }
.home-island[data-stage="detail"] .music-scroll { height:min(42dvh,340px); max-height:min(42dvh,340px); }
/* The download pane owns the column count. The queue and phone keep their
   existing single-column list and scroll behavior. */
@media(min-width:769px) {
  .home-island[data-stage="detail"] #view .music-library.is-compact { container-type:inline-size; }
  .home-island[data-stage="detail"] #view .music-library.is-compact .track-list { display:grid; grid-template-columns:minmax(0,1fr); gap:8px 12px; }
  .home-island[data-stage="detail"] #view .music-library.is-compact .track-row { min-width:0; }
  @container (min-width:520px) {
    .home-island[data-stage="detail"] #view .music-library.is-compact .track-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  }
  @container (min-width:750px) {
    .home-island[data-stage="detail"] #view .music-library.is-compact .track-list { grid-template-columns:repeat(3,minmax(0,1fr)); }
  }
  @container (min-width:900px) {
    .home-island[data-stage="detail"] #view .music-library.is-compact .track-list { grid-template-columns:repeat(4,minmax(0,1fr)); }
    .home-island[data-stage="detail"] #view .music-library.is-compact .track-row { gap:3px; padding-inline:4px; }
    .home-island[data-stage="detail"] #view .music-library.is-compact .track-select { gap:6px; }
    .home-island[data-stage="detail"] #view .music-library.is-compact .track-index { width:20px; flex-basis:20px; }
    .home-island[data-stage="detail"] #view .music-library.is-compact .track-cover { width:36px; height:36px; flex-basis:36px; }
    .home-island[data-stage="detail"] #view .music-library.is-compact .track-copy strong { font-size:12px; }
    .home-island[data-stage="detail"] #view .music-library.is-compact .track-download { width:38px; flex-basis:38px; padding:11px; }
  }
}
@media(prefers-reduced-motion:reduce) {
  .entry-stickers,.home-entries>.home-entry,.resource-island,.download-fall,.download-tray,.book-pages,.conversation-far,.conversation-near { transition:none; }
}
