/* ==========================================================================
   黄子弘凡 · 海风应援站  主题样式
   主题色：黄色 + 紫色   主题元素：布丁狗（Pompompurin）
   ========================================================================== */

:root {
  /* 主色 —— 黄色 */
  --yellow: #ffd93d;
  --yellow-deep: #f5b301;
  --yellow-soft: #fff3b0;
  --yellow-pale: #fffbe6;

  /* 主色 —— 紫色 */
  --purple: #8b5cf6;
  --purple-deep: #6d28d9;
  --purple-soft: #ede4ff;
  --purple-pale: #f7f2ff;

  /* 暖棕色（布丁狗） */
  --brown: #c79a6b;
  --brown-deep: #a9784c;
  --brown-soft: #f0dcc4;

  /* 中性 */
  --ink: #3b2f4a;
  --ink-soft: #6b5b7d;
  --muted: #9b8fab;
  --line: #ece4f7;
  --bg: #fffbf2;
  --card: #ffffff;
  --white: #fff;

  --radius-s: 10px;
  --radius: 18px;
  --radius-l: 28px;

  --shadow-s: 0 2px 8px rgba(109, 40, 217, .08);
  --shadow: 0 10px 30px rgba(109, 40, 217, .12);
  --shadow-pop: 4px 5px 0 rgba(109, 40, 217, .9);
  --shadow-pop-y: 4px 5px 0 rgba(245, 179, 1, .95);

  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-round: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei Rounded", "Varela Round", "Segoe UI", system-ui, sans-serif;

  --nav-h: 66px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 217, 61, .22), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(139, 92, 246, .16), transparent 40%),
    radial-gradient(circle at 70% 92%, rgba(199, 154, 107, .14), transparent 44%);
  background-attachment: fixed;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--purple-deep); text-decoration: none; }
a:hover { color: var(--yellow-deep); }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-round); line-height: 1.3; margin: 0 0 .5em; }

::selection { background: var(--yellow); color: var(--purple-deep); }

/* 滚动条 */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--purple-pale); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--yellow), var(--purple)); border-radius: 99px; border: 3px solid var(--purple-pale); }

.container { width: min(1160px, 92vw); margin: 0 auto; }

/* ---------- 顶部导航 ---------- */
.navbar {
  position: sticky; top: 0; z-index: 90;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(255, 251, 242, .86);
  backdrop-filter: blur(14px);
  border-bottom: 2px dashed var(--yellow);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-round); font-weight: 800; color: var(--purple-deep); font-size: 18px; }
.brand:hover { color: var(--purple-deep); }
.brand .brand-mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--yellow), var(--purple));
  display: grid; place-items: center; box-shadow: var(--shadow-s);
  border: 2px solid #fff;
}
.brand small { display: block; font-size: 10px; letter-spacing: .22em; color: var(--muted); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 700;
  color: var(--ink-soft); transition: .18s;
  white-space: nowrap;
}
.nav-links a:hover { background: var(--yellow-soft); color: var(--purple-deep); }
.nav-links a.active { background: var(--purple); color: #fff; box-shadow: var(--shadow-pop-y); }

.nav-toggle { display: none; background: none; border: 0; width: 42px; height: 42px; border-radius: 12px; }
.nav-toggle span { display: block; height: 3px; margin: 5px auto; width: 22px; border-radius: 3px; background: var(--purple-deep); transition: .2s; }

/* ---------- 通用区块 ---------- */
.section { padding: 60px 0; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 { font-size: clamp(22px, 3.4vw, 32px); color: var(--purple-deep); margin-bottom: 6px; }
.section-head h2 .hl { color: var(--yellow-deep); }
.section-head p { color: var(--muted); margin: 0; font-size: 14px; }

.card {
  background: var(--card); border-radius: var(--radius);
  border: 2px solid var(--line); box-shadow: var(--shadow-s);
  padding: 22px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; border: 2px solid var(--purple-deep);
  background: var(--purple); color: #fff; font-weight: 800; font-size: 14px;
  box-shadow: var(--shadow-pop-y); transition: .16s; text-decoration: none;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 7px 0 rgba(245, 179, 1, .95); color: #fff; }
.btn:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 rgba(245, 179, 1, .95); }
.btn.yellow { background: var(--yellow); color: var(--purple-deep); border-color: var(--yellow-deep); box-shadow: var(--shadow-pop); }
.btn.yellow:hover { box-shadow: 6px 7px 0 rgba(109, 40, 217, .9); color: var(--purple-deep); }
.btn.ghost { background: #fff; color: var(--purple-deep); border-color: var(--purple-soft); box-shadow: none; }
.btn.ghost:hover { background: var(--purple-pale); box-shadow: none; transform: none; }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn.tiny { padding: 4px 10px; font-size: 12px; box-shadow: none; border-width: 1.5px; }
.btn.tiny:hover { transform: none; box-shadow: none; }
.btn.danger { background: #fff; color: #d64545; border-color: #ffd0d0; box-shadow: none; }
.btn.danger:hover { background: #fff5f5; box-shadow: none; transform: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.input, .textarea, .select {
  width: 100%; padding: 11px 14px; border-radius: 14px;
  border: 2px solid var(--line); background: #fff; color: var(--ink);
  font-family: inherit; font-size: 14px; transition: .16s;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px var(--purple-soft); }
.textarea { resize: vertical; min-height: 92px; line-height: 1.6; }
.hint { font-size: 12px; color: var(--muted); }

/* ---------- 首屏 Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 54px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--yellow-soft); color: var(--brown-deep); font-size: 13px; font-weight: 800;
  border: 2px dashed var(--yellow-deep); margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 62px); line-height: 1.05; margin-bottom: 14px; color: var(--purple-deep);
  letter-spacing: -.5px;
}
.hero h1 .name-y { color: var(--yellow-deep); text-shadow: 2px 2px 0 #fff, 4px 4px 0 var(--yellow-soft); }
.hero .lead { font-size: clamp(14px, 1.6vw, 16px); color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.hero-photo {
  position: relative; justify-self: center; width: min(340px, 78vw);
}
.hero-photo .photo-frame {
  border-radius: 34px; overflow: hidden; border: 4px solid #fff;
  box-shadow: 0 18px 44px rgba(109, 40, 217, .28), 0 0 0 3px var(--yellow) inset;
  background: linear-gradient(160deg, var(--yellow-soft), var(--purple-soft));
  aspect-ratio: 3 / 4;
}
.hero-photo .photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo .photo-fallback { width: 100%; height: 100%; display: grid; place-items: center; padding: 20px; }
.hero-photo .ring {
  position: absolute; inset: -14px; border-radius: 44px; z-index: -1;
  background: conic-gradient(from 0deg, var(--yellow), var(--purple), var(--brown), var(--yellow));
  filter: blur(18px); opacity: .5;
}
.hero-photo .floaty { position: absolute; filter: drop-shadow(0 8px 14px rgba(109, 40, 217, .25)); animation: bob 4s ease-in-out infinite; }
.hero-photo .floaty.a { width: 82px; left: -30px; top: 8%; }
.hero-photo .floaty.b { width: 76px; right: -26px; bottom: 12%; animation-delay: -2s; }

@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(3deg); } }

/* 飘落的小元素 */
.sakura { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.sakura i {
  position: absolute; top: -8vh; font-size: 16px; opacity: .5;
  animation: fall linear infinite;
}
@keyframes fall {
  0% { transform: translateY(-10vh) rotate(0); }
  100% { transform: translateY(110vh) rotate(360deg); }
}

/* ---------- 倒计时 ---------- */
.countdown-card {
  margin-top: 34px; border-radius: var(--radius-l); padding: 26px;
  background: linear-gradient(135deg, #fff7d1 0%, #f3e8ff 55%, #efe2ff 100%);
  border: 3px solid #fff; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.countdown-card::after {
  content: "🎂"; position: absolute; right: -10px; bottom: -18px; font-size: 120px; opacity: .12;
}
.countdown-title { font-family: var(--font-round); font-weight: 800; color: var(--purple-deep); font-size: 18px; display: flex; align-items: center; gap: 8px; }
.countdown-sub { color: var(--brown-deep); font-size: 13px; font-weight: 700; margin-top: 2px; }
.countdown-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; max-width: 520px; }
.cd-box {
  background: #fff; border-radius: 16px; padding: 14px 6px; text-align: center;
  border: 2px solid var(--purple-soft); box-shadow: 0 4px 0 var(--purple-soft);
}
.cd-box b { display: block; font-size: clamp(24px, 4.4vw, 38px); color: var(--purple-deep); font-family: var(--font-round); line-height: 1.1; }
.cd-box span { font-size: 12px; color: var(--muted); font-weight: 700; }
.cd-party { font-size: 15px; font-weight: 800; color: var(--purple-deep); margin-top: 14px; }

/* ---------- 资料 / 信息 ---------- */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.fact-list { list-style: none; margin: 0; padding: 0; }
.fact-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.fact-list li:last-child { border-bottom: 0; }
.fact-list .k { flex: 0 0 92px; color: var(--muted); font-weight: 700; }
.fact-list .v { color: var(--ink); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.tag { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--purple-pale); color: var(--purple-deep); border: 1.5px solid var(--purple-soft); }
.tag.y { background: var(--yellow-pale); color: var(--brown-deep); border-color: var(--yellow-soft); }
.tag.b { background: var(--brown-soft); color: var(--brown-deep); border-color: #e6cfae; }

.works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.work {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px;
  background: var(--purple-pale); border: 1.5px solid var(--line); font-size: 13px;
}
.work .dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow-deep); margin-top: 8px; }
.work b { display: block; color: var(--purple-deep); font-size: 13.5px; }
.work span { color: var(--muted); font-size: 12px; }

/* 应援词 */
.cheer-wall { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.cheer {
  border-radius: 18px; padding: 20px; background: #fff; border: 2px dashed var(--purple-soft);
  font-family: var(--font-round); color: var(--purple-deep); font-weight: 700; font-size: 15px;
  position: relative; overflow: hidden;
}
.cheer::before { content: "“"; position: absolute; left: 8px; top: -14px; font-size: 60px; color: var(--yellow); opacity: .55; font-family: Georgia, serif; }
.cheer .by { display: block; margin-top: 12px; font-size: 12px; color: var(--muted); font-weight: 600; }

/* 数据统计 */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat {
  text-align: center; padding: 20px 14px; border-radius: 18px; background: #fff;
  border: 2px solid var(--line); box-shadow: var(--shadow-s);
}
.stat b { display: block; font-size: 30px; font-family: var(--font-round); color: var(--purple-deep); }
.stat span { font-size: 13px; color: var(--muted); font-weight: 700; }

/* ---------- 图集 ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.toolbar .grow { flex: 1 1 220px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px; border-radius: 999px; border: 2px solid var(--line); background: #fff;
  font-size: 13px; font-weight: 700; color: var(--ink-soft); transition: .15s;
}
.chip:hover { border-color: var(--yellow); }
.chip.on { background: var(--purple); border-color: var(--purple); color: #fff; }

.dropzone {
  border: 3px dashed var(--purple-soft); border-radius: var(--radius-l); background: #fff;
  padding: 34px 22px; text-align: center; transition: .18s; cursor: pointer;
}
.dropzone:hover, .dropzone.over { border-color: var(--yellow-deep); background: var(--yellow-pale); transform: translateY(-2px); }
.dropzone .dz-emoji { font-size: 40px; }
.dropzone b { display: block; font-size: 16px; color: var(--purple-deep); margin: 8px 0 4px; }
.dropzone span { font-size: 13px; color: var(--muted); }

.upload-progress { margin-top: 14px; }
.progress-bar { height: 12px; border-radius: 999px; background: var(--purple-pale); overflow: hidden; border: 1px solid var(--line); }
.progress-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--yellow), var(--purple)); transition: width .2s; }

.gallery-grid { columns: 4 220px; column-gap: 14px; }
.gallery-item {
  break-inside: avoid; margin-bottom: 14px; border-radius: 16px; overflow: hidden;
  position: relative; border: 2px solid #fff; box-shadow: var(--shadow-s); background: #fff;
  cursor: zoom-in; transition: .18s;
}
.gallery-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.gallery-item img { width: 100%; display: block; }
.gallery-item .gi-info {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px;
  background: linear-gradient(transparent, rgba(59, 47, 74, .82)); color: #fff;
  font-size: 12px; opacity: 0; transition: .2s;
}
.gallery-item:hover .gi-info { opacity: 1; }
.gallery-item .gi-info b { display: block; font-size: 13px; }
.gallery-item .gi-tag { position: absolute; top: 8px; left: 8px; background: var(--yellow); color: var(--purple-deep); font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.gallery-item .gi-del {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .92); color: #d64545; font-size: 15px; opacity: 0; transition: .2s;
}
.gallery-item:hover .gi-del { opacity: 1; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { font-size: 52px; }

/* 灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(40, 30, 55, .9);
  display: none; align-items: center; justify-content: center; padding: 3vh 3vw;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 80vh; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox .lb-cap { position: absolute; bottom: 3vh; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; }
.lightbox .lb-btn {
  position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 0; font-size: 20px;
  background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(6px);
}
.lightbox .lb-btn:hover { background: var(--yellow); color: var(--purple-deep); }
.lightbox .lb-prev { left: 2vw; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 2vw; top: 50%; transform: translateY(-50%); }
.lightbox .lb-close { top: 2vh; right: 2vw; }

/* ---------- 留言板 ---------- */
.msg-form { display: grid; gap: 12px; }
.msg-list { display: grid; gap: 14px; }
.msg {
  display: flex; gap: 14px; padding: 16px; border-radius: 18px; background: #fff;
  border: 2px solid var(--line); box-shadow: var(--shadow-s); position: relative;
}
.msg .avatar { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; border: 2px solid #fff; box-shadow: var(--shadow-s); }
.msg .msg-body { flex: 1; min-width: 0; }
.msg .msg-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.msg .msg-name { font-weight: 800; color: var(--purple-deep); font-size: 14px; }
.msg .msg-time { font-size: 11.5px; color: var(--muted); }
.msg .msg-text { font-size: 14.5px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.msg .msg-actions { display: flex; gap: 8px; margin-top: 10px; }
.msg .mood { font-size: 18px; }

/* ---------- 音乐播放器 ---------- */
.music-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 22px; align-items: start; }
.player-card {
  border-radius: var(--radius-l); padding: 24px; color: #fff;
  background: linear-gradient(150deg, var(--purple-deep), #4c1d95 55%, #7c3aed);
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.player-card::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,217,61,.5), transparent 70%); top: -70px; right: -60px; }
.player-now { display: flex; gap: 16px; align-items: center; position: relative; }
.player-cover {
  flex: 0 0 96px; width: 96px; height: 96px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, var(--yellow), var(--purple)); display: grid; place-items: center;
  border: 3px solid rgba(255,255,255,.7); box-shadow: 0 8px 20px rgba(0,0,0,.3);
}
.player-cover img { width: 100%; height: 100%; object-fit: cover; }
.player-cover .disc { font-size: 34px; animation: spin 6s linear infinite; }
.player-cover.paused .disc { animation-play-state: paused; }
@keyframes spin { to { transform: rotate(360deg); } }
.player-meta { min-width: 0; }
.player-meta h3 { color: #fff; font-size: 18px; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-meta p { margin: 0; font-size: 12.5px; color: rgba(255,255,255,.72); }
.player-meta .album { margin-top: 4px; }

.player-controls { display: flex; align-items: center; gap: 10px; margin-top: 20px; position: relative; }
.pc-btn { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 18px; display: grid; place-items: center; transition: .16s; }
.pc-btn:hover { background: rgba(255,255,255,.3); }
.pc-btn.main { width: 58px; height: 58px; background: var(--yellow); color: var(--purple-deep); font-size: 22px; box-shadow: 0 6px 16px rgba(255,217,61,.5); }
.pc-btn.main:hover { background: #fff; }

.progress-wrap { margin-top: 18px; position: relative; }
.pbar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.22); overflow: hidden; cursor: pointer; }
.pbar i { display: block; height: 100%; width: 0; background: var(--yellow); }
.ptime { display: flex; justify-content: space-between; font-size: 11.5px; color: rgba(255,255,255,.75); margin-top: 6px; }
.volume { display: flex; align-items: center; gap: 8px; margin-top: 14px; position: relative; }
.volume input { flex: 1; accent-color: var(--yellow); }

.playlist { max-height: 520px; overflow: auto; display: grid; gap: 8px; padding-right: 4px; }
.track {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
  border: 2px solid var(--line); background: #fff; transition: .15s; cursor: pointer; text-align: left; width: 100%;
}
.track:hover { border-color: var(--yellow); background: var(--yellow-pale); }
.track.on { border-color: var(--purple); background: var(--purple-pale); }
.track .idx { flex: 0 0 26px; height: 26px; border-radius: 8px; background: var(--purple-soft); color: var(--purple-deep); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.track.on .idx { background: var(--purple); color: #fff; }
.track .tinfo { flex: 1; min-width: 0; }
.track .tinfo b { display: block; font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .tinfo span { font-size: 11.5px; color: var(--muted); }
.track .tdur { font-size: 11.5px; color: var(--muted); }
.track .playing { color: var(--purple); }

/* ---------- 拼豆 ---------- */
.perler-layout { display: grid; grid-template-columns: 340px 1fr; gap: 22px; align-items: start; }
.panel { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-s); padding: 20px; }
.panel h3 { color: var(--purple-deep); font-size: 16px; display: flex; align-items: center; gap: 8px; }
.panel + .panel { margin-top: 16px; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input[type=range] { flex: 1; accent-color: var(--purple); }
.range-row output { min-width: 44px; text-align: right; font-weight: 800; color: var(--purple-deep); font-size: 13px; }

.palette { display: flex; flex-wrap: wrap; gap: 7px; }
.swatch {
  width: 30px; height: 30px; border-radius: 9px; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--line);
  position: relative; transition: .12s;
}
.swatch:hover { transform: scale(1.12); }
.swatch.on { box-shadow: 0 0 0 3px var(--purple); transform: scale(1.12); }
.swatch .cnt { position: absolute; right: -4px; top: -6px; font-size: 9px; background: var(--purple); color: #fff; border-radius: 99px; padding: 0 4px; }

.perler-stage { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-s); padding: 20px; }
.perler-canvas-wrap { overflow: auto; max-width: 100%; border-radius: 16px; background: var(--purple-pale); padding: 14px; border: 2px solid var(--line); }
canvas#perlerCanvas { display: block; margin: 0 auto; image-rendering: pixelated; cursor: crosshair; border-radius: 10px; background: #fff; box-shadow: var(--shadow-s); touch-action: none; }
.perler-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.perler-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 13px; color: var(--ink-soft); }
.perler-stats b { color: var(--purple-deep); }
.progress-ring { display: flex; align-items: center; gap: 10px; }
.pbar2 { flex: 1; height: 12px; border-radius: 99px; background: var(--purple-pale); overflow: hidden; border: 1px solid var(--line); }
.pbar2 i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--yellow), var(--purple)); transition: width .2s; }

.bead-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; margin-top: 12px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 6px 8px; border-radius: 10px; background: var(--purple-pale); }
.legend-item i { width: 16px; height: 16px; border-radius: 5px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }

/* ---------- 记录 / 时间线 ---------- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 12px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: repeating-linear-gradient(var(--yellow) 0 8px, transparent 8px 16px), var(--purple-soft); }
.tl-item { position: relative; margin-bottom: 18px; }
.tl-item::before {
  content: ""; position: absolute; left: -28px; top: 20px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--yellow); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--purple-soft);
}
.tl-card { background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow-s); }
.tl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.tl-date { font-size: 12px; font-weight: 800; color: var(--purple-deep); background: var(--purple-pale); padding: 3px 10px; border-radius: 999px; }
.tl-title { font-weight: 800; color: var(--ink); font-size: 15.5px; }
.tl-text { font-size: 14px; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; }
.tl-photo { margin-top: 10px; border-radius: 14px; overflow: hidden; max-width: 420px; border: 2px solid var(--line); }
.tl-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- 弹窗 / 提示 ---------- */
.modal { position: fixed; inset: 0; z-index: 210; background: rgba(40, 30, 55, .55); display: none; align-items: center; justify-content: center; padding: 4vh 4vw; }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--radius-l); padding: 26px; width: min(560px, 92vw); max-height: 90vh; overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.3); border: 3px solid var(--yellow); }
.modal-box h3 { color: var(--purple-deep); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

.toast-wrap { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; }
.toast {
  background: var(--purple-deep); color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow); animation: toastIn .25s ease; white-space: nowrap;
}
.toast.y { background: var(--yellow-deep); color: #fff; }
.toast.err { background: #d64545; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- 页脚 ---------- */
.footer { margin-top: 60px; padding: 34px 0; border-top: 2px dashed var(--yellow); background: rgba(255,255,255,.6); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.footer p { margin: 0; font-size: 13px; color: var(--muted); }
.footer .heart { color: var(--purple); }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }

/* ---------- 工具类 ---------- */
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.wrap { flex-wrap: wrap; }
.gap { gap: 10px; }
.gap-lg { gap: 20px; }
.mt { margin-top: 14px; }
.mt-lg { margin-top: 28px; }
.mb { margin-bottom: 14px; }
.tc { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.bold { font-weight: 800; }
.hidden { display: none !important; }
.divider { height: 2px; background: repeating-linear-gradient(90deg, var(--purple-soft) 0 10px, transparent 10px 20px); margin: 22px 0; }
.scroll-x { overflow-x: auto; }

/* 加载 */
.loader { display: inline-block; width: 16px; height: 16px; border: 2.5px solid var(--purple-soft); border-top-color: var(--purple); border-radius: 50%; animation: spin .7s linear infinite; }

/* 移动端 */
@media (max-width: 900px) {
  .hero-grid, .profile-grid, .music-layout, .perler-layout { grid-template-columns: 1fr; }
  .hero-photo { order: -1; width: min(280px, 72vw); }
  .gallery-grid { columns: 2 150px; }
  .perler-layout .side { order: 2; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: rgba(255,251,242,.98); padding: 12px; gap: 4px; border-bottom: 2px dashed var(--yellow);
    box-shadow: var(--shadow); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { text-align: center; }
}
@media (max-width: 560px) {
  .countdown-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { columns: 1; }
  .section { padding: 40px 0; }
  .player-cover { flex-basis: 72px; width: 72px; height: 72px; }
}

/* ---------- 布丁狗吉祥物（形象来自网络） ---------- */
.brand-mark { overflow: hidden; }
.brand-purin { width: 30px; height: 30px; object-fit: contain; }

.purin-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 85;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
}
.purin-bubble {
  width: 92px; height: 92px; border-radius: 50%;
  background: #fff; border: 3px solid var(--yellow);
  box-shadow: 0 10px 26px rgba(109, 40, 217, .25);
  display: grid; place-items: center; overflow: hidden;
  animation: purinBob 3.4s ease-in-out infinite;
}
.purin-bubble img { width: 84%; height: 84%; object-fit: contain; }
.purin-speech {
  background: #fff; color: var(--purple-deep); font-size: 12.5px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; border: 2px solid var(--purple-soft);
  box-shadow: var(--shadow-s); white-space: nowrap;
  opacity: 0; transform: translateY(6px); transition: .25s;
}
.purin-speech.show { opacity: 1; transform: none; }
@keyframes purinBob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-10px) rotate(4deg); }
}

.purin-floaty { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(109, 40, 217, .25)); }
.purin-photo { width: 78%; max-height: 78%; object-fit: contain; }
.purin-empty img { width: 120px; height: 120px; object-fit: contain; margin: 0 auto 6px; }
.msg .avatar { color: #3b2f4a; font-weight: 800; font-size: 17px; }

/* ---------- 结尾献词 ---------- */
.dedication {
  text-align: center; border-radius: var(--radius-l); padding: 44px 24px;
  background: linear-gradient(135deg, #fff7d1, #f3e8ff 60%, #efe2ff);
  border: 3px solid #fff; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.dedication-purin img {
  width: 110px; height: 110px; object-fit: contain; margin: 0 auto 8px;
  animation: purinBob 3.8s ease-in-out infinite;
}
.dedication-small { letter-spacing: .3em; font-size: 11px; color: var(--muted); font-weight: 700; margin: 0; }
.dedication-name { font-size: clamp(30px, 6vw, 46px); color: var(--purple-deep); margin: 6px 0 10px; letter-spacing: .08em; }
.dedication-name::after { content: " 💛"; }
.dedication-text { color: var(--brown-deep); font-weight: 700; margin: 0 0 16px; }
.dedication-line { width: 70px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--yellow), var(--purple)); margin: 0 auto 12px; }
.dedication-foot { margin: 0; font-size: 13px; color: var(--muted); font-weight: 700; }

.footer-note { font-size: 12px !important; }
.footer-dedication { color: var(--purple-deep); font-weight: 800; }
.footer-dedication b { color: var(--yellow-deep); }

@media (max-width: 560px) {
  .purin-float { right: 12px; bottom: 12px; }
  .purin-bubble { width: 70px; height: 70px; }
  .purin-speech { font-size: 11px; }
  .dedication-purin img { width: 88px; height: 88px; }
}
