/* 绮梦游戏 · 7moe.com */

:root {
  --ink: #16304b;
  --ink-2: #46617b;
  --ink-3: #70879e;
  --paper: #faf7f0;
  --paper-2: #f2ece0;
  --card: #fffdf9;
  --sea: #1684a7;
  --sea-deep: #0e4d6b;
  --sea-soft: #e3f1f6;
  --sun: #e3a43b;
  --sun-soft: #fff4dc;
  --rose: #d93678;
  --rose-soft: rgba(217, 54, 120, 0.1);
  --gold: #c9892b;
  --gold-soft: rgba(201, 137, 43, 0.13);
  --ok: #2d7a43;
  --ok-soft: #e2f2e6;
  --line: rgba(22, 48, 75, 0.11);
  --line-2: rgba(22, 48, 75, 0.2);
  --shadow-sm: 0 6px 20px rgba(18, 44, 72, 0.06);
  --shadow: 0 18px 42px rgba(18, 44, 72, 0.1);
  --shadow-lg: 0 28px 64px rgba(14, 34, 58, 0.16);
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; overflow-x: clip; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.75; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: var(--sea); }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
p { margin: 0; }
blockquote { margin: 0; }

.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.container-wide { width: min(1260px, 100% - 32px); }

/* ---------------- Header ---------------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; padding: 16px 0; border-bottom: 1px solid transparent; transition: background-color .35s var(--ease), padding .35s var(--ease), border-color .35s, box-shadow .35s; }
.site-header.is-scrolled { padding: 10px 0; background: rgba(250, 247, 240, .8); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: #fffdf8; text-decoration: none; transition: color .3s; }
.site-header.is-scrolled .brand { color: var(--ink); }
.brand-logo { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(217, 54, 120, .34)); transition: transform .5s var(--ease); }
.brand:hover .brand-logo { transform: rotate(22deg) scale(1.06); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-size: 1.12rem; font-weight: 700; letter-spacing: .06em; }
.brand-sub { font-size: .68rem; letter-spacing: .12em; opacity: .8; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 7px 15px; border-radius: 999px; font-size: .92rem; font-weight: 500; color: rgba(255, 253, 248, .9); text-decoration: none; transition: color .25s, background-color .25s; }
.nav-link:hover, .nav-link.is-active { color: #fff; background: rgba(255, 255, 255, .16); }
.site-header.is-scrolled .nav-link { color: var(--ink-2); }
.site-header.is-scrolled .nav-link:hover, .site-header.is-scrolled .nav-link.is-active { color: var(--sea); background: rgba(22, 132, 167, .1); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px 7px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(14, 34, 58, .36); color: #fffdf8; font-size: .82rem; font-weight: 600; letter-spacing: .06em; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: all .28s var(--ease); }
.header-pill:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .2); }
.site-header.is-scrolled .header-pill { border-color: var(--line-2); background: rgba(255, 255, 255, .88); color: var(--ink); }
.site-header.is-scrolled .header-pill:hover { border-color: var(--sea); color: var(--sea); background: rgba(22, 132, 167, .1); }
.header-pill svg, .g-icon-btn svg { width: 17px; height: 17px; }
.ico-off { display: none; }
.is-muted .ico-on { display: none; }
.is-muted .ico-off { display: block; }

.mobile-menu-btn { display: none; width: 38px; height: 38px; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(14, 34, 58, .36); color: #fffdf8; cursor: pointer; }
.mobile-menu-btn svg { width: 18px; height: 18px; }
.site-header.is-scrolled .mobile-menu-btn { border-color: var(--line-2); background: rgba(255, 255, 255, .88); color: var(--ink); }

/* ---------------- Hero ---------------- */
.hero { position: relative; min-height: 94vh; min-height: 94svh; display: flex; align-items: center; padding: 120px 0 104px; overflow: hidden; background: #0e243d; color: #fffdf8; }
.hero-bg { position: absolute; inset: 0; background: url("../img/hero-harbor.jpg") center 42% / cover no-repeat; transform: scale(1.04); animation: heroDrift 40s ease-in-out infinite alternate; }
.hero-scrim { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 75% 60% at 50% 46%, rgba(11, 28, 50, .42) 0%, rgba(11, 28, 50, .14) 70%), linear-gradient(180deg, rgba(10, 26, 46, .5) 0%, rgba(10, 26, 46, .22) 42%, rgba(10, 24, 42, .7) 100%); }
.hero-particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
@keyframes heroDrift { from { transform: scale(1.04); } to { transform: scale(1.1) translate(-1%, -1%); } }

.hero-content { position: relative; z-index: 3; max-width: 780px; text-align: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; padding: 7px 17px; border-radius: 999px; background: rgba(14, 34, 58, .46); border: 1px solid rgba(255, 250, 240, .28); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: .82rem; letter-spacing: .14em; color: #fff6e4; }
.hero-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: #f472a8; box-shadow: 0 0 10px rgba(244, 114, 168, .9); animation: dotPulse 2.4s ease-in-out infinite; }
@keyframes dotPulse { 50% { opacity: .45; } }
.hero-title { font-family: var(--serif); font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 700; line-height: 1.2; letter-spacing: .14em; margin: 0 0 26px; text-shadow: 0 8px 34px rgba(8, 22, 40, .55); }
.hero-title em { display: block; margin-top: 10px; font-style: normal; font-size: clamp(1.02rem, 2vw, 1.36rem); font-weight: 400; letter-spacing: .16em; color: #ffe8c2; }
.hero-quote { margin: 0 auto 34px; max-width: 630px; padding: 18px 28px; border-radius: 20px; background: rgba(11, 28, 48, .48); border: 1px solid rgba(255, 248, 236, .22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 14px 36px rgba(6, 18, 34, .34); font-family: var(--serif); font-size: clamp(1rem, 1.8vw, 1.2rem); line-height: 1.85; letter-spacing: .04em; color: #fffaf0; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 26px; border-radius: 999px; border: 1px solid transparent; font-size: .95rem; font-weight: 600; letter-spacing: .04em; text-decoration: none; cursor: pointer; transition: transform .28s var(--ease), box-shadow .28s var(--ease), background-color .25s, border-color .25s; }
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-hero-primary { background: linear-gradient(135deg, #f3e4c3 0%, #fffaf0 52%, #e0f5fc 100%); color: #132d48; box-shadow: 0 12px 30px rgba(8, 24, 44, .34), inset 0 1px 0 #fff; }
.btn-hero-primary:hover { box-shadow: 0 16px 38px rgba(8, 24, 44, .44); }
.btn-hero-ghost { background: rgba(14, 34, 58, .44); color: #fffdf8; border-color: rgba(255, 250, 240, .34); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn-hero-ghost:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 250, 240, .62); }

.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 4; line-height: 0; pointer-events: none; }
.hero-wave svg { width: 100%; height: clamp(54px, 7vw, 104px); }
.wave-back { fill: var(--paper); opacity: .45; }
.wave-front { fill: var(--paper); }

/* ---------------- Sections ---------------- */
.section { position: relative; padding: clamp(68px, 7.5vw, 108px) 0; }
.section-header { max-width: 680px; margin: 0 auto 50px; text-align: center; }
.section-kicker { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 12px; font-size: .76rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--sea); }
.section-kicker::before, .section-kicker::after { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .45; }
.section-title { font-family: var(--serif); font-size: clamp(1.85rem, 3.4vw, 2.6rem); font-weight: 700; letter-spacing: .05em; margin-bottom: 12px; }
.section-lead { color: var(--ink-2); line-height: 1.85; }

.reveal { transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js-reveal .reveal { opacity: 0; transform: translateY(22px); }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 64px; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 26px 18px 22px; border-radius: 20px; background: rgba(255, 255, 255, .88); border: 1px solid var(--line); box-shadow: var(--shadow-sm); text-align: center; transition: transform .3s var(--ease), border-color .3s; }
.stat:hover { transform: translateY(-4px); border-color: var(--sea); }
.stat-num { font-family: var(--serif); font-size: clamp(2rem, 3.2vw, 2.7rem); font-weight: 700; line-height: 1.15; color: var(--sea-deep); font-variant-numeric: tabular-nums; }
.stat-label { margin-top: 4px; font-size: .92rem; font-weight: 600; color: var(--ink); }
.stat-note { font-size: .78rem; color: var(--ink-3); }

/* timeline */
.timeline { position: relative; max-width: 940px; margin: 0 auto; padding: 0; list-style: none; display: grid; gap: 26px; }
.timeline::before { content: ""; position: absolute; top: 14px; bottom: 14px; left: 112px; width: 2px; background: linear-gradient(180deg, var(--rose), var(--sea), var(--gold)); opacity: .35; }
.tl-item { display: grid; grid-template-columns: 96px 32px minmax(0, 1fr); gap: 10px; align-items: start; }
.tl-year { padding-top: 17px; text-align: right; font-family: var(--serif); font-size: 1.36rem; font-weight: 700; color: var(--sea); letter-spacing: .04em; }
.tl-node { position: relative; z-index: 1; justify-self: center; width: 14px; height: 14px; margin-top: 26px; border-radius: 50%; background: var(--paper); border: 3px solid var(--sea); box-shadow: 0 0 0 5px rgba(22, 132, 167, .11); transition: transform .3s, border-color .3s; }
.tl-item:hover .tl-node { transform: scale(1.22); border-color: var(--rose); }
.tl-card { padding: 22px 28px; border-radius: 20px; background: rgba(255, 255, 255, .88); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.tl-item:hover .tl-card { transform: translateX(4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.tl-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; font-family: var(--serif); font-size: 1.22rem; font-weight: 700; }
.tl-badge { padding: 2px 10px; border-radius: 999px; background: var(--rose-soft); color: var(--rose); font-family: var(--sans); font-size: .74rem; font-weight: 600; }
.tl-card p { color: var(--ink-2); font-size: .95rem; line-height: 1.85; }
.tl-card blockquote { position: relative; padding: 4px 0 4px 18px; border-left: 3px solid var(--gold); font-family: var(--serif); font-size: 1.02rem; line-height: 1.9; color: var(--ink); }
.tl-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tl-tags span { padding: 2px 11px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2); font-size: .76rem; }

/* ---------------- 海风留声厅 ---------------- */
.soundtrack-section { background: radial-gradient(ellipse 90% 80% at 20% 10%, #173459 0%, #0d1d34 48%, #081323 100%); color: #f6f1e7; overflow: hidden; }
.soundtrack-section .section-kicker { color: #79d2ec; }
.soundtrack-section .section-lead { color: rgba(214, 229, 245, .84); }

.sound-hall { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .95fr); gap: 28px; padding: 32px; border-radius: 28px; background: rgba(16, 35, 62, .62); border: 1px solid rgba(160, 212, 240, .18); box-shadow: 0 28px 70px rgba(0, 8, 20, .48); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.sound-stage { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.sound-tag { display: inline-flex; margin-bottom: 14px; padding: 4px 14px; border-radius: 999px; background: rgba(121, 210, 236, .12); border: 1px solid rgba(121, 210, 236, .3); color: #a4e4f7; font-size: .76rem; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.sound-now-title { margin-bottom: 2px; font-family: var(--serif); font-size: clamp(1.6rem, 2.8vw, 2.15rem); font-weight: 700; letter-spacing: .06em; color: #fffaf0; }
.sound-now-sub { margin-bottom: 8px; font-family: Georgia, "Times New Roman", var(--serif); font-size: 1.02rem; font-style: italic; letter-spacing: .06em; color: #f0bf68; }
.sound-now-note { font-size: .84rem; color: rgba(186, 210, 234, .8); }

.visualizer-wrap { position: relative; flex: 1; min-height: 120px; border-radius: 20px; background: linear-gradient(180deg, rgba(7, 17, 32, .65) 0%, rgba(16, 39, 68, .42) 100%); border: 1px solid rgba(160, 212, 240, .14); overflow: hidden; }
.visualizer-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.sound-controls { display: grid; gap: 18px; }
.progress-row { display: flex; align-items: center; gap: 12px; }
.time-code { min-width: 42px; font-size: .78rem; font-variant-numeric: tabular-nums; color: rgba(208, 224, 242, .82); }
.time-code:last-child { text-align: right; }
.progress-track { position: relative; flex: 1; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .14); cursor: pointer; touch-action: none; }
.progress-track::before { content: ""; position: absolute; inset: -8px 0; } /* 加大点击区域 */
.progress-track:focus-visible { outline: 2px solid #79d2ec; outline-offset: 4px; }
.progress-fill { position: relative; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #64d2ef 0%, #f48bb6 62%, #f5cb78 100%); pointer-events: none; }
.progress-fill::after { content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #fffaf0; box-shadow: 0 0 0 4px rgba(245, 203, 120, .25); opacity: 0; transition: opacity .2s; }
.progress-track:hover .progress-fill::after, .progress-track:focus-visible .progress-fill::after { opacity: 1; }

.controls-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.transport-group { display: flex; align-items: center; gap: 10px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: #fffdf8; cursor: pointer; transition: background-color .24s, transform .24s var(--ease); }
.icon-btn:hover { background: rgba(255, 255, 255, .18); transform: scale(1.05); }
.icon-btn-play { width: 56px; height: 56px; border: 0; background: linear-gradient(135deg, #f3e0b8 0%, #fffaf0 100%); color: #10253f; box-shadow: 0 10px 26px rgba(0, 0, 0, .34); }
.icon-btn-play:hover { background: linear-gradient(135deg, #ffffff 0%, #f6e7c7 100%); }
.svg-pause { display: none; }
.is-playing .svg-play { display: none; }
.is-playing .svg-pause { display: block; }

.sound-options { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.chip-group { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, .2); border: 1px solid rgba(255, 255, 255, .12); }
.chip-group .option-chip { border-color: transparent; background: transparent; }
.option-chip { padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: #dce9f7; font-size: .78rem; cursor: pointer; transition: background-color .22s, border-color .22s, color .22s; }
.option-chip:hover, .option-chip.is-on, .chip-group .option-chip.is-on { background: rgba(100, 210, 239, .2); border-color: rgba(100, 210, 239, .5); color: #fff; }
.option-chip:disabled { opacity: .4; cursor: not-allowed; }
.volume-wrap { display: inline-flex; align-items: center; gap: 7px; color: rgba(214, 229, 245, .82); }
.volume-slider { width: 84px; accent-color: #74d3ee; cursor: pointer; }

.track-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-left: 26px; border-left: 1px solid rgba(255, 255, 255, .12); }
.track-panel-label { font-size: .76rem; letter-spacing: .16em; color: rgba(186, 212, 238, .72); }
.track-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.track-item { width: 100%; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .04); color: #edf4fc; text-align: left; cursor: pointer; transition: background-color .26s, border-color .26s; }
.track-item:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); }
.track-item.is-active { background: linear-gradient(135deg, rgba(88, 197, 227, .2), rgba(244, 114, 168, .14)); border-color: rgba(121, 210, 236, .45); }
.track-num { display: flex; align-items: center; height: 100%; font-family: Georgia, var(--serif); font-size: 1rem; font-weight: 700; color: #f0bf68; font-variant-numeric: tabular-nums; }
.track-num .eq-bars { display: none; }
.track-item.is-playing .track-no { display: none; }
.track-item.is-playing .track-num .eq-bars { display: inline-flex; }
.track-info { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.track-name { flex: none; font-family: var(--serif); font-size: .98rem; font-weight: 600; }
.track-desc { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .76rem; color: rgba(202, 220, 240, .7); }
.track-dur { font-size: .76rem; font-variant-numeric: tabular-nums; color: rgba(202, 220, 240, .72); }

.eq-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.eq-bars span { width: 2.5px; height: 4px; border-radius: 2px; background: #78d6f0; }
.is-playing .eq-bars span { animation: eqPulse .9s ease-in-out infinite alternate; }
.is-playing .eq-bars span:nth-child(2) { animation-delay: .22s; }
.is-playing .eq-bars span:nth-child(3) { animation-delay: .44s; }
@keyframes eqPulse { from { height: 3px; } to { height: 11px; } }

/* 悬浮小播放器 */
.mini-dock { position: fixed; right: 22px; bottom: 22px; z-index: 45; display: flex; align-items: center; gap: 12px; max-width: min(350px, calc(100vw - 32px)); padding: 9px 14px 9px 10px; border-radius: 999px; overflow: hidden; background: rgba(14, 31, 54, .86); color: #fffdf8; border: 1px solid rgba(154, 214, 240, .28); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 16px 38px rgba(4, 14, 28, .36); transition: opacity .35s var(--ease), transform .35s var(--ease), border-color .3s, visibility 0s; }
.mini-dock:hover { border-color: rgba(154, 214, 240, .54); }
.mini-dock.is-hidden { opacity: 0; visibility: hidden; transform: translateY(18px); pointer-events: none; transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s .35s; }
.mini-play-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: linear-gradient(135deg, #f3e0b8 0%, #fffaf0 100%); color: #10253f; cursor: pointer; }
.mini-info { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.45; }
.mini-title-row { display: flex; align-items: center; gap: 7px; min-width: 0; }
.mini-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .84rem; font-weight: 600; }
.mini-meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .71rem; color: rgba(202, 222, 242, .76); font-variant-numeric: tabular-nums; }
.mini-next-btn, .mini-jump-link { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #edf5fc; cursor: pointer; }
.mini-next-btn:hover, .mini-jump-link:hover { background: rgba(255, 255, 255, .2); }
.mini-progress-track { position: absolute; left: 0; right: 0; bottom: 0; height: 2.5px; background: rgba(255, 255, 255, .1); }
.mini-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, #64d2ef, #f48bb6, #f5cb78); }

.btn-hero-primary.is-playing svg { animation: notePulse 1.6s ease-in-out infinite; }
@keyframes notePulse { 50% { transform: translateY(-2px) rotate(-6deg); } }


/* portals */
.portals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 30px; }
.portal { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 28px 26px 24px; border-radius: 20px; background: rgba(255, 255, 255, .88); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; transition: transform .32s var(--ease), border-color .3s, box-shadow .32s; }
.portal:hover { transform: translateY(-5px); border-color: var(--sea); box-shadow: var(--shadow); }
.portal-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 6px; border-radius: 14px; background: rgba(22, 132, 167, .1); color: var(--sea); }
.portal-icon svg { width: 24px; height: 24px; }
.portal-icon-rose { background: var(--rose-soft); color: var(--rose); }
.portal-icon-gold { background: var(--gold-soft); color: var(--gold); }
.portal-badge { padding: 2px 10px; border-radius: 999px; background: rgba(22, 132, 167, .1); color: var(--sea); font-size: .72rem; font-weight: 600; }
.portal h3 { margin-top: 2px; font-family: var(--serif); font-size: 1.24rem; }
.portal p { flex: 1; color: var(--ink-2); font-size: .9rem; line-height: 1.75; }
.portal-cue { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--sea); font-size: .85rem; font-weight: 600; }
.portal-cue i { font-style: normal; transition: transform .3s var(--ease); }
.portal:hover .portal-cue i { transform: translateX(4px); }

.more-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 22px; padding: 18px 24px; border-radius: 20px; background: var(--paper-2); border: 1px solid var(--line); font-size: .88rem; color: var(--ink-2); }
.more-links span { color: var(--ink-3); letter-spacing: .1em; }
.more-links a { color: var(--sea-deep); font-weight: 500; text-decoration: none; border-bottom: 1px dashed transparent; transition: color .2s, border-color .2s; }
.more-links a:hover { color: var(--rose); border-bottom-color: var(--rose); }

/* footer */
.site-footer { padding: 56px 0 64px; border-top: 1px solid var(--line); text-align: center; }
.footer-logo { width: 44px; height: 44px; margin: 0 auto 14px; filter: drop-shadow(0 4px 12px rgba(217, 54, 120, .28)); }
.footer-name { font-family: var(--serif); font-size: 1.12rem; font-weight: 700; letter-spacing: .08em; }
.footer-meta { margin-top: 2px; font-size: .82rem; color: var(--ink-3); letter-spacing: .12em; }
.footer-credits { margin: 18px auto 0; max-width: 720px; text-wrap: pretty; font-size: .78rem; line-height: 1.9; color: var(--ink-3); }

/* ---------------- 北岛漂流记 ---------------- */
.section-game { background: linear-gradient(180deg, var(--paper) 0%, #eaf2f3 55%, var(--paper) 100%); }
.section-game .section-header { margin-bottom: 40px; }

.game { position: relative; background: var(--card); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; isolation: isolate; }

/* 顶栏 */
.g-top { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 10px 14px; background: linear-gradient(180deg, #17445f, #113449); color: #fff; }
.g-place { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1; }
.g-place-name { font-family: var(--serif); font-weight: 700; font-size: 1.08rem; letter-spacing: .06em; }
.g-place-region { font-size: .78rem; opacity: .7; }
.g-hand { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 5px; border: 0; border-radius: 999px; background: var(--sun); color: #3a2a10; font-size: .8rem; font-weight: 600; cursor: pointer; }
.g-hand[hidden] { display: none; }
.g-hand svg { width: 20px; height: 20px; }
.g-hand b { margin-left: 2px; opacity: .6; }
.g-tools { display: flex; align-items: center; gap: 6px; }
.g-tool { padding: 5px 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; font-size: .84rem; }
.g-tool:hover:not(:disabled) { background: rgba(255, 255, 255, .18); }
.g-tool:disabled { opacity: .45; cursor: default; }
.g-icon-btn { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(0, 0, 0, .15); color: #fff; cursor: pointer; }
.g-icon-btn svg { width: 17px; height: 17px; }

/* 主体 */
.g-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; }
.g-stage { position: relative; min-width: 0; border-right: 1px solid var(--line); background: #10202e; }
.g-art { position: relative; aspect-ratio: 1280 / 731; overflow: hidden; background: #10202e; }
.g-art::before { content: ""; position: absolute; inset: 0; background: var(--img) center / cover no-repeat; }
.g-art.is-cg::before { animation: artDrift 26s ease-in-out infinite alternate; }
.g-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 58%, rgba(10, 24, 36, .38) 100%); pointer-events: none; }
.g-art.is-enter::before { animation: artIn .7s var(--ease); }
.g-art.is-cg.is-enter::before { animation: artIn .7s var(--ease), artDrift 26s ease-in-out .7s infinite alternate; }
@keyframes artDrift { from { transform: scale(1.01); } to { transform: scale(1.06) translate(-.8%, -.5%); } }
@keyframes artIn { from { opacity: .3; } to { opacity: 1; } }

/* 画面里的热点 */
.g-spots { position: absolute; inset: 0; z-index: 2; }
.g-spot { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px; border: 0; background: none; transform: translate(-50%, -50%); cursor: pointer; }
/* 靠边的热点：标签往画面里面伸 */
.g-spot.is-l { align-items: flex-start; transform: translate(-16px, -50%); }
.g-spot.is-r { align-items: flex-end; transform: translate(calc(-100% + 16px), -50%); }
.g-spot.is-exit.is-l { transform: translate(-26px, -50%); }
.g-spot.is-exit.is-r { transform: translate(calc(-100% + 26px), -50%); }
.g-spot-dot { position: relative; width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 249, 232, .96); box-shadow: 0 0 0 4px rgba(255, 249, 232, .25), 0 0 16px 2px rgba(255, 228, 160, .85); animation: spotPulse 2.6s ease-in-out infinite; transition: transform .2s var(--ease); }
.g-spot.is-npc .g-spot-dot { background: #ffe1ec; box-shadow: 0 0 0 4px rgba(255, 196, 220, .28), 0 0 16px 2px rgba(255, 170, 205, .85); }
.g-spot.is-gather .g-spot-dot { width: 13px; height: 13px; background: #e6f7d6; box-shadow: 0 0 0 4px rgba(190, 236, 160, .26), 0 0 12px 1px rgba(170, 230, 130, .8); }
.g-spot.is-exit .g-spot-dot { width: 44px; height: 44px; border-radius: 0; background: url(../img/ui/arrow.webp) center / contain no-repeat; box-shadow: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .55)) drop-shadow(0 0 8px rgba(255, 230, 170, .55)); animation: exitNudge 1.6s ease-in-out infinite; }
.g-spot.is-exit.is-dir-l .g-spot-dot { scale: -1 1; }
.g-spot.is-exit.is-dir-u .g-spot-dot { rotate: -90deg; }
.g-spot.is-exit.is-dir-d .g-spot-dot { rotate: 90deg; }
.g-spot.is-exit:hover .g-spot-dot, .g-spot.is-exit:focus-visible .g-spot-dot { animation-duration: .7s; }
@keyframes exitNudge { 50% { transform: translateX(5px); } }
.g-spot-label { padding: 2px 10px; border-radius: 999px; background: rgba(12, 30, 44, .8); color: #fff; font-size: .76rem; line-height: 1.6; white-space: nowrap; opacity: 0; transform: translateY(-3px); transition: opacity .2s, transform .2s; pointer-events: none; }
.g-spot.is-exit .g-spot-label { opacity: .9; transform: none; background: rgba(12, 30, 44, .62); }
.g-spot:hover .g-spot-dot, .g-spot:focus-visible .g-spot-dot { transform: scale(1.25); }
.g-spot:hover .g-spot-label, .g-spot:focus-visible .g-spot-label { opacity: 1; transform: none; }
.g-spot:focus-visible { outline: none; }
.g-spot:focus-visible .g-spot-dot { outline: 2px solid var(--sun); outline-offset: 3px; }
.g-spot.is-working .g-spot-dot { animation: gatherPop .6s ease; }
@keyframes spotPulse { 50% { box-shadow: 0 0 0 7px rgba(255, 249, 232, .08), 0 0 22px 4px rgba(255, 228, 160, .6); } }
@keyframes gatherPop { 40% { transform: scale(1.7); } }
.is-holding .g-spot, .is-holding .g-ava { cursor: copy; }
.is-holding .g-spot:not(.is-exit) .g-spot-dot { background: var(--sun); }
.g-cue { position: absolute; left: 50%; bottom: 14px; z-index: 3; transform: translateX(-50%); padding: 5px 14px; border-radius: 999px; background: rgba(12, 30, 44, .72); color: #fff; font-size: .8rem; white-space: nowrap; pointer-events: none; }
.g-art.is-busy .g-cue { display: none; }

.g-party-row { position: absolute; left: 12px; top: 12px; z-index: 4; display: flex; gap: 8px; }
.g-ava { position: relative; width: 46px; height: 46px; padding: 0; border-radius: 50%; overflow: hidden; border: 2px solid #fff; background: #f3e6d4; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); cursor: pointer; transition: transform .2s var(--ease); }
.g-ava:hover { transform: translateY(-2px); }
.g-ava img { width: 100%; height: 100%; object-fit: cover; }
.g-ava svg { width: 100%; height: 100%; }
.g-ava span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.is-talking .g-party-row { opacity: .5; }

/* 对话：深色木框 + 金色内线，四角是生成的金色卷纹（ui/corner*.webp），名字挂在框的上沿 */
.g-dialog { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 6; display: flex; align-items: flex-end; gap: 16px; padding: 18px 22px 14px; border-radius: 14px; border: 3px solid #5e3c1f;
  background:
    url(../img/ui/corner.webp) left 4px top 4px / 44px 44px no-repeat,
    url(../img/ui/corner-tr.webp) right 4px top 4px / 44px 44px no-repeat,
    url(../img/ui/corner-bl.webp) left 4px bottom 4px / 44px 44px no-repeat,
    url(../img/ui/corner-br.webp) right 4px bottom 4px / 44px 44px no-repeat,
    linear-gradient(180deg, rgba(255, 251, 242, .98), rgba(246, 236, 214, .98));
  box-shadow: inset 0 0 0 2px #f8eed8, inset 0 0 0 3.5px rgba(196, 150, 58, .85), 0 16px 36px rgba(8, 24, 40, .38); animation: dlgIn .25s var(--ease); }
.g-dialog[hidden] { display: none; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(8px); } }
.g-dlg-face { flex: none; width: 132px; height: 132px; margin: -56px 0 0 -6px; border-radius: 14px; overflow: hidden; border: 3px solid #5e3c1f; background: #efe6d4; box-shadow: 0 0 0 2px #d9b15a, 0 10px 24px rgba(8, 24, 40, .32); }
.g-dlg-face[hidden] { display: none; }
.g-dlg-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-dlg-face.is-swap img { animation: faceIn .28s var(--ease); }
@keyframes faceIn { from { opacity: .4; transform: scale(1.04); } }
.g-dlg-main { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; }
.g-who { position: absolute; top: -15px; left: 26px; padding: 2px 16px 3px; border-radius: 7px; border: 2px solid #d9b15a; background: linear-gradient(180deg, #1f5878, #123f5a); color: #fff8e6; font-family: var(--serif); font-size: .84rem; font-weight: 700; letter-spacing: .12em; box-shadow: 0 4px 10px rgba(8, 24, 40, .35); }
.g-dialog.has-face .g-who { left: 170px; }
.g-who[hidden] { display: none; }
.g-text { flex: 1; min-height: 3.4em; font-size: 1rem; line-height: 1.85; color: #2b2116; }
.g-dialog.is-narration .g-text { color: #4a3d2c; font-family: var(--serif); }
.g-dialog .g-btn { border-color: #c9a25a; }
.g-dialog .g-btn-primary { border-color: #d9b15a; background: linear-gradient(180deg, #1f5878, #123f5a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); }
.g-dialog .g-btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #2a6c91, #17506f); }
.g-text-rest { visibility: hidden; }
/* 打字时按钮行里有一个看不见的「继续」占位（holdBtnRow），按钮出现时对话框不会跳一下 */
.g-dlg-btns { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.g-btn.is-placeholder { visibility: hidden; pointer-events: none; }
.g-btn-next::after { content: " ▾"; font-size: .8em; }
.g-ask { display: flex; gap: 8px; }
.g-ask input { width: 120px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line-2); font: inherit; }

/* 妮丝的话 */
.g-glyph { font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "Noto Sans Symbols", "Noto Sans Math", sans-serif; color: #6a4bc4; font-weight: 700; letter-spacing: .14em; text-shadow: 0 0 10px rgba(150, 120, 255, .35); }
ruby.g-glyph rt { font-family: var(--sans); font-size: .58em; font-weight: 500; letter-spacing: .04em; color: #8a7bb8; text-shadow: none; }

/* 侧栏 */
.g-side { display: flex; flex-direction: column; min-width: 0; background: #faf7f1; }
@media (min-width: 981px) {
  /* 侧栏跟画面一样高，内容多了就在里面滚动 */
  .g-side { height: 0; min-height: 100%; }
  .g-panel { max-height: none; }
}
.g-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-bottom: 1px solid var(--line); }
.g-tabs button { padding: 11px 0 9px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ink-3); font-weight: 600; font-size: .88rem; cursor: pointer; }
.g-tabs button[hidden] { display: none; }
.g-tabs button.is-on { color: var(--sea-deep); border-bottom-color: var(--sea); }
.g-panel { flex: 1; padding: 14px; overflow: auto; max-height: 560px; }
.g-empty { color: var(--ink-3); font-size: .86rem; }

.g-bag { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.g-slot { position: relative; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 3px 4px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.g-slot:hover, .g-slot.is-on { border-color: var(--sea); background: var(--sea-soft); }
.g-slot.is-held { box-shadow: inset 0 0 0 2px var(--sun); }
.g-slot svg { width: 30px; height: 30px; }
/* 生成的道具图比线条小图标细，放大一些 */
.g-slot svg.is-art { width: 40px; height: 40px; margin-top: -2px; }
.g-item-card > svg.is-art { width: 60px; height: 60px; }
.g-recipe-out svg.is-art { width: 28px; height: 28px; }
.g-hand svg.is-art { width: 24px; height: 24px; }
.g-toast-item svg.is-art { width: 28px; height: 28px; border-radius: 0; }
.g-slot-n { position: absolute; top: 3px; right: 6px; font-size: .72rem; font-weight: 700; color: var(--ink-2); }
.g-slot-name { max-width: 100%; font-size: .66rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-item-info { margin-top: 12px; }
.g-item-card { display: flex; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.g-item-card > svg { width: 42px; height: 42px; flex: none; }
.g-item-name { font-weight: 700; }
.g-item-name span { margin-left: 6px; font-size: .72rem; font-weight: 500; color: var(--ink-3); }
.g-item-desc { font-size: .84rem; color: var(--ink-2); }
.g-item-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.g-out-badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9px; border: 1px solid var(--sun); background: #fff6df; color: #7a5410; font-size: .88rem; font-weight: 700; line-height: 1.4; }
.g-out-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 3px rgba(240, 180, 60, .25); }
.g-diary { display: grid; gap: 6px; margin-top: 10px; max-height: 280px; overflow: auto; }
.g-diary p { padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line); background: #fffdf8; font-family: var(--serif); font-size: .86rem; line-height: 1.7; }
.g-diary span { display: block; font-family: var(--sans); font-size: .68rem; color: var(--ink-3); }

.g-craft-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; font-size: .86rem; }
.g-craft-head b { color: var(--sea-deep); }
.g-chip { padding: 2px 8px; border-radius: 999px; background: var(--paper-2); color: var(--ink-3); font-size: .72rem; white-space: nowrap; }
.g-chip.is-ok { background: var(--ok-soft); color: var(--ok); }
.g-station { margin-bottom: 14px; }
.g-station-name { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.g-station-name span { font-weight: 500; color: var(--ink-3); }
.g-station:not(.is-off) .g-station-name span { color: var(--ok); }
.g-recipe { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "out btn" "in btn"; gap: 4px 10px; margin-top: 6px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.g-recipe-out { grid-area: out; display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.g-recipe-out svg { width: 22px; height: 22px; }
.g-recipe.is-known .g-recipe-out b::after { content: " ✓"; color: var(--ok); font-size: .8rem; }
.g-recipe-in { grid-area: in; display: flex; flex-wrap: wrap; gap: 4px; }
.g-need { padding: 1px 7px; border-radius: 999px; background: #f1ece4; color: var(--ink-3); font-size: .7rem; }
.g-need.is-ok { background: var(--ok-soft); color: var(--ok); }
.g-recipe .g-btn { grid-area: btn; align-self: center; }

.g-party { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.g-pcard { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; text-align: center; }
.g-pcard:hover { border-color: var(--sea); }
.g-pcard img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.g-pcard svg { width: 100%; aspect-ratio: 1; padding: 18%; border-radius: 8px; background: #f3e6d4; }
.g-pcard-name { margin-top: 4px; font-weight: 700; }
.g-pcard-sub { font-size: .7rem; color: var(--ink-3); }
.g-me { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.g-me > img, .g-me > svg { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: #f3e6d4; }
.g-stat-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: .72rem; color: var(--ink-2); }
.g-exp { display: block; height: 4px; margin-top: 5px; border-radius: 99px; background: #eee6d8; overflow: hidden; }
.g-exp span { display: block; height: 100%; background: var(--sun); }
.g-pcard { position: relative; }
.g-pcard.is-out { border-color: var(--sun); box-shadow: inset 0 0 0 1px var(--sun); }
.g-pcard-name small { font-weight: 500; color: var(--ink-3); }
.g-out-tag { position: absolute; top: 6px; left: 6px; padding: 0 7px; border-radius: 99px; background: var(--sun); color: #3a2a10; font-size: .66rem; font-style: normal; font-weight: 700; }
.g-ava.is-out { border-color: var(--sun); box-shadow: 0 0 0 2px rgba(240, 180, 60, .6), 0 4px 12px rgba(0, 0, 0, .25); }
.g-skill-list { margin: 0; padding-left: 1.1em; font-size: .82rem; color: var(--ink-2); }
.g-skill-list li.is-locked { color: var(--ink-3); }
.g-portrait-body .g-exp { width: 100%; }
.g-words { width: 100%; padding: 10px 12px; border-radius: 12px; background: rgba(106, 75, 196, .06); border: 1px solid rgba(106, 75, 196, .16); }
.g-words-title { margin-bottom: 4px; font-size: .74rem; letter-spacing: .1em; color: var(--ink-3); }
.g-word-chip { display: inline-block; margin: 2px 10px 2px 0; font-size: 1.05rem; }

/* 星座盘 */
.g-chart { max-width: 290px; margin: 0 auto 12px; }
.g-chart-svg { display: block; width: 100%; filter: drop-shadow(0 8px 18px rgba(20, 35, 63, .25)); }
.g-chart-rim { fill: #b8873a; stroke: #8a6024; stroke-width: .5; }
.g-chart-sky { fill: #14233f; }
.g-con { cursor: pointer; }
.g-con-hit { fill: transparent; transition: fill .2s; }
.g-con:hover .g-con-hit, .g-con.is-sel .g-con-hit { fill: rgba(255, 240, 200, .07); stroke: rgba(255, 240, 200, .35); stroke-width: .3; }
.g-con line { stroke: rgba(255, 236, 190, .6); stroke-width: .38; transition: opacity .6s; }
.g-con circle:not(.g-con-hit) { fill: #fff3c4; transition: opacity .6s; }
.g-con.is-gone line, .g-con.is-gone circle:not(.g-con-hit) { opacity: .14; }
.g-con-info { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: .84rem; line-height: 1.75; color: var(--ink-2); }
.g-con-info img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; filter: grayscale(.5); }
.g-con-info.is-gone img { filter: none; }
.g-con-info p + p { margin-top: 4px; }
.g-con-name { font-family: var(--serif); font-size: 1rem; font-weight: 700; color: var(--ink); }
.g-con-name span { margin-left: 8px; font-family: var(--sans); font-size: .74rem; font-weight: 500; color: var(--ink-3); }
.g-con-gone { color: var(--ok); }

/* 按钮 */
.g-btn { padding: 7px 16px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-weight: 600; font-size: .88rem; cursor: pointer; transition: transform .15s var(--ease), background-color .15s, border-color .15s; }
.g-btn:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--sea); }
.g-btn:disabled { opacity: .45; cursor: default; }
.g-btn-primary { background: var(--sea-deep); border-color: var(--sea-deep); color: #fff; }
.g-btn-primary:hover:not(:disabled) { background: var(--sea); border-color: var(--sea); }
.g-btn-ghost { background: transparent; }
.g-btn-sm { padding: 4px 11px; font-size: .8rem; }
.g-btn .g-glyph { color: inherit; text-shadow: none; }
.g-btn:focus-visible, .g-slot:focus-visible, .g-tabs button:focus-visible, .g-word:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }

/* 浮层 */
.g-overlay { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 24, 36, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .25s ease; }
.g-overlay[hidden] { display: none; }
.g-overlay-box { width: 100%; max-width: 520px; max-height: 100%; overflow: auto; padding: 22px; border-radius: 16px; background: #fffdf8; box-shadow: var(--shadow-lg); animation: pop .3s var(--ease); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }

.game.is-title .g-top { position: relative; z-index: 36; }
.g-overlay.is-title { align-items: flex-end; background: linear-gradient(180deg, rgba(8, 18, 36, 0) 30%, rgba(8, 18, 36, .5) 70%, rgba(8, 18, 36, .85) 100%), var(--title-img) center 40% / cover no-repeat; backdrop-filter: none; -webkit-backdrop-filter: none; }
.g-overlay.is-title .g-overlay-box { max-width: 640px; padding-bottom: 40px; background: transparent; box-shadow: none; color: #fff; text-align: center; }
.g-title-kicker { font-size: .8rem; letter-spacing: .25em; opacity: .85; }
.g-title-name { margin: 6px 0 8px; font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: .14em; text-shadow: 0 4px 20px rgba(0, 0, 0, .35); }
.g-title-sub { font-family: var(--serif); opacity: .92; letter-spacing: .08em; }
.g-title-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.g-overlay.is-title .g-btn { padding: 10px 26px; font-size: 1rem; }
.g-overlay.is-title .g-btn:not(.g-btn-primary) { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .5); }
.g-overlay.is-title .g-btn-primary { background: #fff; color: var(--sea-deep); border-color: #fff; }
.g-title-note { margin-top: 14px; font-size: .78rem; opacity: .7; }

/* 回忆 */
.g-overlay.is-memory { background: #0b1424; backdrop-filter: none; -webkit-backdrop-filter: none; animation: fade .6s ease; }
.g-overlay.is-memory::before { content: ""; position: absolute; inset: -10px; background: var(--mem) center / cover no-repeat; filter: grayscale(.55) sepia(.3) brightness(.45) blur(1.5px); animation: memDrift 30s ease-in-out infinite alternate; }
.g-overlay.is-memory::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(10, 18, 36, 0) 30%, rgba(10, 18, 36, .75) 100%); pointer-events: none; }
.g-overlay.is-memory .g-overlay-box { position: relative; z-index: 1; max-width: 640px; background: transparent; box-shadow: none; color: #f4ecd8; text-align: center; animation: none; cursor: pointer; }
.g-memory-text { font-family: var(--serif); font-size: clamp(1.05rem, 2.1vw, 1.32rem); line-height: 2; letter-spacing: .06em; text-shadow: 0 2px 14px rgba(0, 0, 0, .7); animation: memIn 1s var(--ease); }
.g-memory-text .g-glyph { color: #c9b8ff; }
.g-memory-next { display: block; margin-top: 6px; opacity: .55; }
.g-memory-btn { margin-top: 14px; color: #f4ecd8; border-color: rgba(244, 236, 216, .35); }
.g-memory-btn:hover:not(:disabled) { border-color: #f4ecd8; }
@keyframes memIn { from { opacity: 0; letter-spacing: .14em; filter: blur(2px); } }
@keyframes memDrift { from { transform: scale(1.02); } to { transform: scale(1.08) translate(-1%, -1%); } }

/* 拼一句话 / 挑东西 */
.g-compose-line { min-height: 2.6em; margin: 4px 0 14px; text-align: center; font-size: 1.7rem; }
.g-compose-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.g-word { padding: 6px 14px 2px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; font-size: 1.25rem; cursor: pointer; }
.g-word.is-on { border-color: #6a4bc4; background: rgba(106, 75, 196, .08); }
.g-pick .g-bag { margin-bottom: 14px; }
.g-pick > .g-btn { display: block; margin: 0 auto; }

/* 浮层标题 */
.g-ov-title, .g-battle-title { margin-bottom: 12px; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; text-align: center; }
.g-bar { display: block; height: 8px; border-radius: 99px; background: rgba(0, 0, 0, .25); overflow: hidden; }
.g-bar span { display: block; height: 100%; border-radius: inherit; transition: width .35s var(--ease); }
.g-face { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; overflow: hidden; border: 2px solid #fff; background: #f3e6d4; font-size: .78rem; font-weight: 700; }
.g-face img { width: 100%; height: 100%; object-fit: cover; }
.g-face svg { width: 100%; height: 100%; }
.is-hit { animation: shake .35s; }
@keyframes shake { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }

/* 属性 */
.g-el { display: inline-block; min-width: 1.5em; padding: 0 4px; border-radius: 4px; background: #8a8f98; color: #fff; font-size: .66rem; font-weight: 700; line-height: 1.5; text-align: center; vertical-align: 1px; }
.g-el.is-earth { background: #9a6a34; }
.g-el.is-water { background: #2f7fd0; }
.g-el.is-fire { background: #d4452b; }
.g-el.is-wind { background: #3a9a5c; }

/* 战斗 */
.g-overlay.is-battle { padding: 0; align-items: stretch; background: #0b1722; backdrop-filter: none; -webkit-backdrop-filter: none; overflow: hidden; }
.g-overlay.is-battle::before { content: ""; position: absolute; inset: -12px; background: var(--bt-bg) center / cover no-repeat; filter: brightness(.42) saturate(.85) blur(2px); }
.g-overlay.is-battle::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 55%, rgba(11, 23, 34, 0) 35%, rgba(11, 23, 34, .7) 100%); pointer-events: none; }
.g-overlay.is-battle .g-overlay-box { position: relative; z-index: 1; display: flex; width: 100%; max-width: none; max-height: none; padding: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.g-bt { display: flex; flex-direction: column; width: 100%; min-height: 100%; color: #fff; }
.g-bt-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: linear-gradient(180deg, rgba(6, 16, 26, .9), rgba(6, 16, 26, 0)); }
.g-bt-title { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; letter-spacing: .1em; white-space: nowrap; }
.g-bt-round { font-size: .78rem; opacity: .75; white-space: nowrap; }
.g-bt-order { flex: 1; display: flex; gap: 4px; min-width: 0; overflow: hidden; }
.g-bt-order i { flex: none; padding: 1px 8px; border-radius: 99px; background: rgba(120, 190, 255, .22); font-size: .68rem; font-style: normal; white-space: nowrap; }
.g-bt-order i.is-foe { background: rgba(230, 90, 76, .35); }
.g-bt-order i + i::before { content: "› "; opacity: .5; }
.g-bt-toggle { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 5px 14px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .08); color: #fff; font-size: .82rem; font-weight: 600; cursor: pointer; transition: background-color .2s, border-color .2s; }
.g-bt-toggle:hover { background: rgba(255, 255, 255, .18); }
.g-bt-toggle.is-on { background: var(--sun); border-color: var(--sun); color: #3a2a10; }
.g-bt-auto i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.g-bt-auto.is-on i { background: #3a2a10; animation: autoBlink 1.2s ease-in-out infinite; }
@keyframes autoBlink { 50% { opacity: .25; } }

.g-bt-field { flex: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: center; padding: 4px 22px; }
.g-bt-side { display: flex; gap: 10px; }
.g-bt-side.is-foes { flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 4px 14px; }
.g-bt-side.is-party { flex-direction: column; align-items: flex-end; }

.g-bu { position: relative; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: default; transition: opacity .4s, filter .4s; }
.g-bu-info { display: grid; gap: 3px; min-width: 0; }
.g-bu-name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-bu-name em { padding: 0 5px; border-radius: 4px; background: rgba(255, 255, 255, .2); font-size: .64rem; font-style: normal; font-weight: 600; }
.g-bu-meta { display: flex; align-items: center; gap: 5px; font-size: .68rem; opacity: .9; }
.g-bu-st i { margin-left: 2px; padding: 0 5px; border-radius: 4px; background: rgba(255, 210, 120, .3); font-size: .62rem; font-style: normal; }
.g-bu-num { font-size: .68rem; font-variant-numeric: tabular-nums; opacity: .85; line-height: 1.2; }
.g-bu .g-bar { height: 7px; }
.g-bar.is-hp span { background: linear-gradient(90deg, #6ed37d, #2f9b56); }
.g-bar.is-sp span { background: linear-gradient(90deg, #79b8ff, #3a78d8); }
.g-bu.is-foe .g-bar.is-hp span { background: linear-gradient(90deg, #f07462, #c8392c); }
.g-bu.is-low .g-bar.is-hp span { background: linear-gradient(90deg, #ffb36b, #e2603c); animation: lowPulse 1s ease-in-out infinite; }
@keyframes lowPulse { 50% { opacity: .55; } }

.g-bu.is-foe { display: flex; flex-direction: column; align-items: center; width: 150px; }
.g-bu.is-foe .g-bu-art { display: grid; place-items: end center; width: 150px; height: 160px; }
.g-bu.is-foe .g-bu-art img { max-width: 100%; max-height: 100%; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .55)); }
.g-bu.is-foe .g-bu-info { width: 100%; margin-top: -4px; padding: 5px 8px 6px; border-radius: 10px; background: rgba(6, 16, 26, .72); }
.g-bu-ph { display: grid; place-items: center; width: 90px; height: 90px; border-radius: 50%; background: rgba(255, 255, 255, .15); font-family: var(--serif); font-size: 2rem; }

.g-bu.is-party { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; max-width: 290px; padding: 8px 12px 8px 8px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(6, 16, 26, .74); }
.g-bu.is-party .g-bu-art { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; border: 2px solid #f1e2c4; background: #f3e6d4; }
.g-bu.is-party .g-bu-art img, .g-bu.is-party .g-bu-art svg { width: 100%; height: 100%; object-fit: cover; }
.g-bu.is-ally { opacity: .92; }

.g-bu.is-turn { box-shadow: 0 0 0 2px var(--sun), 0 0 18px rgba(255, 200, 90, .45); }
.g-bu.is-foe.is-turn { box-shadow: none; }
.g-bu.is-target { cursor: pointer; }
.g-bu.is-target.is-foe .g-bu-art img { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 10px rgba(255, 220, 120, .95)); animation: targetBob 1s ease-in-out infinite; }
.g-bu.is-target.is-party { box-shadow: 0 0 0 2px #8fe3a0, 0 0 16px rgba(143, 227, 160, .5); }
.g-bu.is-target:hover .g-bu-info { background: rgba(255, 200, 90, .3); }
@keyframes targetBob { 50% { transform: translateY(-5px); } }
.g-bu.is-acting.is-foe .g-bu-art { animation: lungeR .45s var(--ease); }
.g-bu.is-acting.is-party { animation: lungeL .45s var(--ease); }
@keyframes lungeR { 40% { transform: translateX(22px) scale(1.05); } }
@keyframes lungeL { 40% { transform: translateX(-18px); } }
.g-bu.is-hit .g-bu-art { animation: hitFlash .4s; }
@keyframes hitFlash { 0%, 60% { filter: brightness(2.2) saturate(.4); } }
.g-bu.is-down { opacity: .35; filter: grayscale(1); }
.g-bu.is-down .g-bu-art img { transform: translateY(8px) rotate(-4deg); transition: transform .5s; }

.g-bu-pop { position: absolute; left: 50%; top: 18%; z-index: 2; font-weight: 800; font-size: 1.5rem; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 2px 0 #7a1a10, 0 0 10px rgba(0, 0, 0, .6); white-space: nowrap; opacity: 0; transform: translateX(-50%); pointer-events: none; }
.g-bu.is-party .g-bu-pop { top: -6px; left: 40px; }
.g-bu-pop.is-on { animation: popUp 1s var(--ease) forwards; }
.g-bu-pop.is-crit { color: #ffe066; font-size: 1.85rem; }
.g-bu-pop.is-adv { color: #ffb347; }
.g-bu-pop.is-weak { color: #c8d0da; font-size: 1.2rem; }
.g-bu-pop.is-heal { color: #8ff0a4; text-shadow: 0 2px 0 #145a2a, 0 0 10px rgba(0, 0, 0, .5); }
@keyframes popUp { 0% { opacity: 0; transform: translate(-50%, 8px) scale(.7); } 20% { opacity: 1; transform: translate(-50%, -6px) scale(1.15); } 70% { opacity: 1; transform: translate(-50%, -16px); } 100% { opacity: 0; transform: translate(-50%, -26px); } }

.g-bt-panel { flex: none; height: 262px; padding: 6px 16px 16px; background: linear-gradient(180deg, rgba(6, 16, 26, 0), rgba(6, 16, 26, .88) 40%); }
.g-bt-log { min-height: 1.7em; margin-bottom: 8px; text-align: center; font-size: .92rem; text-shadow: 0 1px 4px #000; }
.g-bt-cmd { max-width: 660px; max-height: 204px; overflow-y: auto; margin: 0 auto; padding: 12px 16px; border-radius: 14px; border: 3px solid #5e3c1f; background: linear-gradient(180deg, #fffaf0, #f4e8cf); color: var(--ink); box-shadow: inset 0 0 0 2px #f8eed8, inset 0 0 0 3.5px rgba(196, 150, 58, .85), 0 10px 26px rgba(0, 0, 0, .35); }
.g-bt-cmd:empty { display: none; }
.g-bt-who { margin-bottom: 8px; font-size: .86rem; }
.g-bt-who span { margin-left: 6px; color: var(--ink-3); font-size: .76rem; }
.g-bt-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.g-bt-acts .g-btn { min-width: 68px; }
.g-bt-acts .g-bt-auto-cmd { margin-left: auto; }
.g-bt-autoinfo { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.g-bt-autoinfo p { font-size: .86rem; color: var(--ink-2); line-height: 1.6; }
.g-bt-autoinfo b { margin-right: 8px; color: #b77a12; }
.g-bt-autoinfo .g-btn { flex: none; }
.g-bt-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 8px; }
.g-bt-skill { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.g-bt-skill:hover:not(:disabled) { border-color: var(--sea); background: var(--sea-soft); }
.g-bt-skill:disabled { opacity: .45; cursor: default; }
.g-bt-skill b { font-size: .9rem; }
.g-bt-skill img, .g-bt-skill svg { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.g-bt-cost { margin-left: auto; font-size: .72rem; color: var(--sea-deep); font-weight: 700; }
.g-bt-skill small { flex-basis: 100%; color: var(--ink-3); font-size: .72rem; line-height: 1.4; }
.g-bt-hint { margin-bottom: 8px; font-size: .88rem; color: var(--sea-deep); font-weight: 600; }
.g-bt-result { text-align: center; }
.g-bt-result-title { margin-bottom: 4px; font-family: var(--serif); font-size: 1.3rem; font-weight: 700; letter-spacing: .2em; }
.g-bt-result.is-win .g-bt-result-title { color: #b77a12; }
.g-bt-result p { font-size: .86rem; color: var(--ink-2); }
.g-bt-result .g-btn { margin-top: 10px; }

.g-wolf-tip { text-align: center; font-size: .86rem; color: var(--ink-2); }
.g-wolf-stats { display: flex; justify-content: center; gap: 20px; margin: 10px 0; font-size: .9rem; }
.g-pens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 330px; margin: 0 auto; }
.g-pen { position: relative; aspect-ratio: 1; border-radius: 12px; border: 2px solid #c9ab7a; background: repeating-linear-gradient(135deg, #ecdcbc 0 8px, #e6d3ae 8px 16px); cursor: pointer; overflow: hidden; }
.g-pen svg { width: 62%; height: 62%; }
.g-pig, .g-wolf { position: absolute; inset: 0; display: grid; place-items: center; transition: transform .18s var(--ease), opacity .18s; }
.g-wolf { transform: translateY(70%); opacity: 0; }
.g-pen.is-wolf .g-wolf { transform: none; opacity: 1; }
.g-pen.is-wolf .g-pig { opacity: .25; }
.g-pen.is-chased { background: #d7f0dc; }

.g-overlay.is-portrait .g-overlay-box { max-width: 700px; padding: 0; overflow: hidden; }
.g-portrait { display: grid; grid-template-columns: 290px 1fr; }
.g-portrait-img { position: relative; min-height: 320px; background: #efe6d4; }
.g-portrait-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.g-portrait-svg { height: 100%; min-height: 290px; display: grid; place-items: center; background: #f3e6d4; }
.g-portrait-svg svg { width: 60%; }
.g-portrait-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px; }
.g-portrait-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; }
.g-portrait-meta { font-size: .82rem; color: var(--ink-3); }
.g-portrait-bio { flex: 1; color: var(--ink-2); }

.g-menu { display: grid; gap: 10px; max-width: 260px; margin: 0 auto; }

.g-overlay.is-ending .g-overlay-box { max-width: 760px; padding: 0; }
.g-ending-art { height: 240px; background: center 55% / cover no-repeat; }
.g-ending-body { padding: 22px 26px 26px; }
.g-ending-title { margin: 4px 0 8px; font-family: var(--serif); font-size: 1.7rem; letter-spacing: .08em; }
.g-ending .g-title-kicker { color: var(--ink-3); }
.g-end-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 14px; }
.g-end-stats div { padding: 10px; border-radius: 12px; background: var(--paper-2); text-align: center; }
.g-end-stats b { display: block; font-family: var(--serif); font-size: 1.4rem; color: var(--sea-deep); }
.g-end-stats span { font-size: .78rem; color: var(--ink-3); }
.g-end-faces { display: flex; flex-wrap: wrap; gap: 12px; }
.g-end-face { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .78rem; }
.g-end-face img, .g-end-face svg { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .15); background: #f3e6d4; }
.g-end-face em { font-style: normal; }
.g-end-sub { margin: 18px 0 8px; font-size: .8rem; color: var(--ink-3); letter-spacing: .1em; }
.g-ending .g-title-btns { justify-content: flex-start; }


.g-toast { position: absolute; top: 64px; right: 344px; z-index: 35; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
.g-toast-item { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 10px; background: rgba(15, 44, 64, .92); color: #fff; font-size: .82rem; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); animation: toastIn .25s var(--ease); transition: opacity .4s, transform .4s; }
.g-toast-item svg, .g-toast-item img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
.g-toast-item.is-out { opacity: 0; transform: translateX(10px); }
@keyframes toastIn { from { opacity: 0; transform: translateX(14px); } }

@media (hover: none) {
  .g-spot-label { opacity: .9; transform: none; font-size: .7rem; }
}
@media (max-width: 980px) {
  .g-body { grid-template-columns: 1fr; }
  .g-stage { border-right: 0; border-bottom: 1px solid var(--line); }
  .g-panel { max-height: 440px; }
  .g-toast { right: 14px; }
}
@media (max-width: 720px) {
  .g-top { gap: 8px; padding: 9px 10px; }
  .g-place-region { display: none; }
  .g-spot { padding: 5px; }
  .g-spot-dot { width: 13px; height: 13px; }
  .g-spot-label { padding: 1px 7px; font-size: .66rem; }
  .g-cue { font-size: .72rem; bottom: 8px; }
  .g-party-row { left: 8px; top: 8px; gap: 5px; }
  .g-ava { width: 36px; height: 36px; }
  .g-dialog { position: relative; left: auto; right: auto; bottom: auto; align-items: flex-start; gap: 12px; padding: 12px 12px 10px; border-radius: 0; border-width: 1px 0 0; box-shadow: none; animation: none; }
  .g-dlg-face { width: 82px; height: 82px; margin: -30px 0 0; border-radius: 12px; }
  .g-text { font-size: .95rem; min-height: 4.2em; }
  .g-dialog { padding: 16px 12px 10px; border-width: 2px 0 0; border-radius: 0; background-size: 30px 30px, 30px 30px, 30px 30px, 30px 30px, auto; box-shadow: inset 0 2px 0 #f8eed8, inset 0 3.5px 0 rgba(196, 150, 58, .85); }
  .g-dlg-face { margin: -34px 0 0; }
  .g-who { top: -13px; left: 14px; font-size: .78rem; }
  .g-dialog.has-face .g-who { left: 106px; }
  .g-spot.is-exit .g-spot-dot { width: 30px; height: 30px; }
  .g-overlay.is-battle { align-items: flex-start; }
  .g-bt { min-height: 0; }
  .g-bt-top { flex-wrap: wrap; gap: 6px 10px; padding: 8px 10px; }
  .g-bt-order { order: 5; flex-basis: 100%; }
  .g-bt-field { grid-template-columns: 1fr; gap: 10px; padding: 4px 10px; }
  .g-bt-side.is-foes { gap: 2px 8px; }
  .g-bu.is-foe { width: 110px; }
  .g-bu.is-foe .g-bu-art { width: 110px; height: 112px; }
  .g-bt-side.is-party { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: stretch; }
  .g-bu.is-party { grid-template-columns: 40px minmax(0, 1fr); max-width: none; flex: 1 1 150px; padding: 6px 8px 6px 6px; gap: 7px; }
  .g-bu.is-party .g-bu-art { width: 40px; height: 40px; }
  .g-bt-panel { height: auto; padding: 4px 8px 10px; }
  .g-bt-cmd { max-height: none; padding: 10px 10px; }
  .g-bt-toggle { padding: 4px 10px; font-size: .76rem; }
  .g-bt-acts .g-bt-auto-cmd { margin-left: 0; }
  .g-bt-list { grid-template-columns: 1fr; }
  .g-portrait { grid-template-columns: 1fr; }
  .g-portrait-img { min-height: 0; height: 300px; }
  .g-end-stats b { font-size: 1.15rem; }
  .g-overlay { padding: 10px; }
  .g-toast { top: auto; bottom: 12px; right: 10px; }
}

/* ---------------- CG 图鉴（单独的一节，跟游戏分开） ---------------- */
.section-cg { background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); }
.cg-gallery[hidden] { display: none; }
.cg-head { display: flex; align-items: center; justify-content: center; gap: 14px; max-width: 420px; margin: -22px auto 34px; }
.cg-count { flex: none; color: var(--ink-2); font-size: .9rem; font-variant-numeric: tabular-nums; }
.cg-count b { font-family: var(--serif); font-size: 1.3rem; color: var(--sea-deep); }
.cg-bar { flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.cg-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), #f0d08a); transition: width 1s var(--ease); }
.cg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 24px 18px; }
.cg-card { display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; }
button.cg-card { cursor: pointer; }
.cg-pic { position: relative; display: block; aspect-ratio: 1280 / 731; border-radius: 12px; perspective: 900px; transition: transform .35s var(--ease); }
.cg-flip { position: absolute; inset: 0; transform-style: preserve-3d; }
.cg-face { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 0 0 1px var(--line), 0 8px 20px rgba(18, 44, 72, .12); transition: box-shadow .3s; }
.cg-face.is-back { background: #0b1726 var(--cg-empty) center / cover no-repeat; transform: rotateY(180deg); }
.cg-blank { position: absolute; inset: 0; border-radius: 12px; background: #0b1726 var(--cg-empty) center / cover no-repeat; box-shadow: 0 6px 16px rgba(18, 44, 72, .1); }
button.cg-card:hover .cg-pic { transform: translateY(-4px); }
button.cg-card:hover .cg-face:not(.is-back) { box-shadow: 0 0 0 2px var(--gold), 0 14px 28px rgba(18, 44, 72, .18); }
button.cg-card:focus-visible { outline: none; }
button.cg-card:focus-visible .cg-face { box-shadow: 0 0 0 3px var(--sun); }
.cg-cap { display: flex; align-items: baseline; gap: 7px; overflow: hidden; font-size: .86rem; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
.cg-cap em { flex: none; font-family: Georgia, var(--serif); font-size: .8rem; font-style: normal; color: var(--gold); }
.cg-card.is-locked .cg-cap { color: var(--ink-3); }
.cg-card.is-locked .cg-cap em { opacity: .55; }
.cg-card.is-new .cg-pic::after { content: "新"; position: absolute; top: 8px; right: 8px; z-index: 3; padding: 0 7px; border-radius: 6px; background: var(--sun); color: #2a1c06; font: 700 .72rem/1.6 var(--sans); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); transition: opacity .4s; }
.cg-card.is-fresh .cg-pic::after { opacity: 0; }

/* 新收进来的一格：金线描边 → 空白的卡片翻过来 → 显影、星光、一道反光 */
.cg-card.is-fresh .cg-flip { transform: rotateY(180deg); }
.cg-card.is-revealing .cg-flip { animation: cgFlip 1.2s .55s cubic-bezier(.35, .05, .2, 1) forwards; }
@keyframes cgFlip { 0% { transform: rotateY(180deg); } 50% { transform: rotateY(90deg) scale(1.1); } 100% { transform: rotateY(0) scale(1); } }
.cg-card.is-revealing .cg-face:not(.is-back) { animation: cgDevelop 1.5s 1.05s ease-out backwards; }
@keyframes cgDevelop { from { filter: brightness(2.3) saturate(0) blur(2px); } }
.cg-card.is-revealing .cg-pic { animation: cgRing 1.6s 1.4s ease-out; }
@keyframes cgRing { from { box-shadow: 0 0 0 0 rgba(240, 200, 120, .8); } to { box-shadow: 0 0 0 18px rgba(240, 200, 120, 0); } }
.cg-fx { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cg-trace { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); overflow: visible; }
.cg-trace rect { fill: none; stroke: var(--gold); stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 3px rgba(240, 190, 100, .8)); animation: cgTrace 2.6s var(--ease) forwards; }
@keyframes cgTrace { 0% { stroke-dashoffset: 1; opacity: 1; } 35% { stroke-dashoffset: 0; opacity: 1; } 75% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.cg-shine { position: absolute; inset: 0; overflow: hidden; border-radius: 12px; }
.cg-shine::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 240, 205, .85) 50%, transparent 65%); transform: translateX(-120%); animation: cgShine 1s 1.5s var(--ease) forwards; }
@keyframes cgShine { to { transform: translateX(120%); } }
.cg-fx i { position: absolute; left: 50%; top: 50%; width: calc(22px * var(--s)); aspect-ratio: 1; background: radial-gradient(circle, #fff 0 14%, #ffeab6 32%, #f0c264 70%); clip-path: polygon(50% 0, 57% 43%, 100% 50%, 57% 57%, 50% 100%, 43% 57%, 0 50%, 43% 43%); opacity: 0; transform: translate(-50%, -50%) scale(0); animation: cgBurst 1.1s var(--d) cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes cgBurst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(0); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(120deg); } }

/* 看大图 */
html.is-viewing { overflow: hidden; }
.cg-viewer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 56px 76px 36px; background: rgba(5, 13, 24, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade .25s ease; }
.cg-viewer.is-closing { animation: viewerOut .22s ease forwards; }
@keyframes viewerOut { to { opacity: 0; } }
.cg-viewer-fig { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 0; }
.cg-viewer-frame { width: min(calc(100vw - 152px), calc((100vh - 150px) * 1280 / 731), 1280px); aspect-ratio: 1280 / 731; border-radius: 6px; overflow: hidden; background: #0b1726; box-shadow: 0 0 0 1px rgba(240, 208, 138, .35), 0 30px 80px rgba(0, 0, 0, .55); transform-origin: 0 0; }
.cg-viewer-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cg-viewer-frame.is-from-r .cg-viewer-img { animation: vSwapR .4s var(--ease); }
.cg-viewer-frame.is-from-l .cg-viewer-img { animation: vSwapL .4s var(--ease); }
@keyframes vSwapR { from { opacity: 0; transform: translateX(28px); } }
@keyframes vSwapL { from { opacity: 0; transform: translateX(-28px); } }
.cg-viewer-cap { display: flex; align-items: baseline; gap: 10px; color: #f4ecd8; }
.cg-viewer-cap em { font-family: Georgia, var(--serif); font-style: normal; color: #f0bf68; }
.cg-viewer-cap b { font-family: var(--serif); font-size: 1.1rem; letter-spacing: .08em; }
.cg-viewer-cap span { font-size: .8rem; color: rgba(244, 236, 216, .55); font-variant-numeric: tabular-nums; }
.cg-viewer-btn, .cg-viewer-close { position: absolute; display: grid; place-items: center; padding: 0 0 3px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; line-height: 1; cursor: pointer; transition: background-color .2s; }
.cg-viewer-btn { top: 50%; width: 48px; height: 48px; margin-top: -24px; font-size: 1.7rem; }
.cg-viewer-btn.is-prev { left: 16px; }
.cg-viewer-btn.is-next { right: 16px; }
.cg-viewer-btn[hidden] { display: none; }
.cg-viewer-close { top: 14px; right: 16px; width: 40px; height: 40px; font-size: 1.5rem; }
.cg-viewer-btn:hover, .cg-viewer-close:hover { background: rgba(255, 255, 255, .2); }
.cg-viewer-btn:focus-visible, .cg-viewer-close:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }

@media (max-width: 720px) {
  .cg-head { margin: -14px auto 24px; }
  .cg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
  .cg-pic, .cg-face, .cg-blank, .cg-shine { border-radius: 8px; }
  .cg-cap { gap: 5px; font-size: .72rem; }
  .cg-cap em { font-size: .7rem; }
  .cg-card.is-new .cg-pic::after { top: 5px; right: 5px; padding: 0 5px; font-size: .64rem; }
  .cg-viewer { padding: 60px 10px 84px; }
  .cg-viewer-frame { width: min(calc(100vw - 20px), calc((100vh - 190px) * 1280 / 731)); }
  .cg-viewer-btn { top: auto; bottom: 18px; margin-top: 0; }
  .cg-viewer-btn.is-prev { left: calc(50% - 64px); }
  .cg-viewer-btn.is-next { right: calc(50% - 64px); }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .portals { grid-template-columns: 1fr; }
  .sound-hall { grid-template-columns: 1fr; }
  .track-panel { padding: 22px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
  .visualizer-wrap { flex: none; height: 120px; }
}
@media (max-width: 720px) {
  .container { width: min(1160px, 100% - 28px); }
  .brand-sub { display: none; }
  .mobile-menu-btn { display: grid; }
  .header-pill { padding: 7px 12px 7px 10px; }
  .nav-links { position: fixed; top: 64px; left: 14px; right: 14px; flex-direction: column; align-items: stretch; padding: 10px; border-radius: 20px; background: #fffdf9; border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transform: translateY(-10px); transition: opacity .25s, transform .25s; }
  .nav-links.is-open { opacity: 1; pointer-events: auto; transform: none; }
  .nav-links .nav-link, .site-header.is-scrolled .nav-links .nav-link { color: var(--ink); padding: 11px 14px; }
  .hero { min-height: 88svh; padding: 100px 0 88px; }
  .hero-badge { font-size: .74rem; letter-spacing: .08em; padding: 6px 14px; }
  .hero-quote { padding: 15px 18px; font-size: .96rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 300px; }
  .section-header { margin-bottom: 36px; }
  .stats { gap: 12px; margin-bottom: 48px; }
  .stat { padding: 20px 10px 16px; }
  .timeline { gap: 18px; }
  .timeline::before { left: 15px; }
  .tl-item { grid-template-columns: 32px minmax(0, 1fr); gap: 4px 10px; }
  .tl-year { grid-column: 2; padding-top: 0; text-align: left; font-size: 1.1rem; }
  .tl-node { grid-column: 1; grid-row: 1; margin-top: 7px; }
  .tl-card { grid-column: 2; padding: 18px 18px; }
  .portal { padding: 22px 20px 20px; }
  .sound-hall { padding: 22px 18px; border-radius: 22px; }
  .controls-row { justify-content: center; }
  .sound-options { justify-content: center; }
  .track-item { padding: 9px 12px; gap: 10px; }
  .mini-dock { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
