@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+TC:wght@400;500;700;900&family=Playfair+Display:ital,wght@1,700&display=swap');

:root {
  color-scheme: light dark;
  --bg: #f5f1e8; --surface: #fffdf7; --surface-2: #ebe5d9; --ink: #1c2b27; --muted: #65706b;
  --line: #d7d0c3; --accent: #e96546; --accent-2: #1e6b57; --yellow: #edc766;
  --shadow: 0 18px 60px rgba(42, 49, 43, .09); --radius: 22px; --page: min(1400px, calc(100% - 48px));
  font-family: 'DM Sans', 'Noto Sans TC', sans-serif;
}

html[data-theme='dark'] { color-scheme: dark; --bg: #111816; --surface: #18221f; --surface-2: #202e2a; --ink: #f1eee5; --muted: #a8b2ad; --line: #34423e; --accent: #ff8062; --accent-2: #71c6a9; --yellow: #f3cf70; --shadow: 0 20px 70px rgba(0, 0, 0, .28); }
@media (prefers-color-scheme: dark) { html[data-theme='system'] { color-scheme: dark; --bg: #111816; --surface: #18221f; --surface-2: #202e2a; --ink: #f1eee5; --muted: #a8b2ad; --line: #34423e; --accent: #ff8062; --accent-2: #71c6a9; --yellow: #f3cf70; --shadow: 0 20px 70px rgba(0, 0, 0, .28); } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); min-width: 320px; }
button, input, select { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--bg); border-radius: 8px; }
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.site-header { width: var(--page); margin: 0 auto; min-height: 94px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 800; letter-spacing: -.03em; }
.brand-logo { width: 48px; height: 48px; padding: 3px; object-fit: contain; border-radius: 50%; background: linear-gradient(145deg, #f5ead2, #dcebdd); box-shadow: 0 0 0 1px var(--line); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.text-link { margin-right: 14px; font-size: .9rem; text-decoration: none; border-bottom: 1px solid transparent; }
.text-link:hover { border-color: currentColor; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--surface); cursor: pointer; }
.icon-button:hover { border-color: var(--accent); transform: translateY(-1px); }
.section-shell { width: var(--page); margin: 0 auto; }
.hero { min-height: 720px; padding: 100px 0 90px; display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; gap: 8vw; }
.eyebrow { margin: 0 0 18px; color: var(--accent); font-size: .75rem; font-weight: 800; letter-spacing: .18em; }
.hero h1 { max-width: 820px; margin: 0; font-size: clamp(3.3rem, 6.7vw, 7.4rem); line-height: .92; letter-spacing: -.07em; }
.hero h1 em { color: var(--accent); font-family: 'Playfair Display', serif; font-weight: 700; }
.hero-lede { max-width: 640px; margin: 34px 0; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.8; }
.button { display: inline-flex; gap: 16px; align-items: center; padding: 15px 22px; text-decoration: none; border-radius: 999px; font-weight: 700; }
.button.primary { background: var(--ink); color: var(--bg); }
.button:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.hero-orbit { position: relative; aspect-ratio: 1; max-width: 520px; width: 100%; margin: auto; }
.orbit-ring { position: absolute; inset: 15%; border: 1px dashed var(--line); border-radius: 50%; animation: spin 30s linear infinite; }
.orbit-ring::before, .orbit-ring::after { content: ''; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.orbit-ring::before { top: 8%; left: 15%; } .orbit-ring::after { bottom: 7%; right: 17%; background: var(--accent-2); }
.animal-card { position: absolute; width: 116px; aspect-ratio: 1; display: grid; place-content: center; text-align: center; overflow: hidden; border-radius: 30px; border: 1px solid rgba(76, 89, 79, .14); box-shadow: var(--shadow); transform: rotate(var(--tilt)); }
.animal-card img { width: 88px; height: 78px; margin: -8px auto -1px; object-fit: contain; filter: drop-shadow(0 7px 10px rgba(51, 61, 52, .13)); } .animal-card strong { margin-top: 4px; font-size: .8rem; }
.animal-frog { left: 0; top: 15%; --tilt: -8deg; background: radial-gradient(circle at 75% 18%, rgba(255,255,255,.75) 0 10%, transparent 11%), linear-gradient(150deg, #edf5d8, #cfe8df 58%, #bedde4); }
.animal-dog { right: 2%; top: 3%; --tilt: 7deg; background: radial-gradient(circle at 22% 20%, rgba(255,255,255,.78) 0 12%, transparent 13%), linear-gradient(145deg, #fff3db, #f2ddc8 58%, #e8cdb7); }
.animal-horse { right: 0; bottom: 10%; --tilt: -5deg; background: radial-gradient(circle at 78% 18%, rgba(255,244,171,.9) 0 11%, transparent 12%), linear-gradient(155deg, #f4edc7, #dce8ba 54%, #bbd49f); }
.animal-cat { left: 6%; bottom: 0; --tilt: 6deg; background: radial-gradient(circle at 24% 20%, rgba(255,255,255,.72) 0 11%, transparent 12%), linear-gradient(145deg, #faebdd, #eadfe7 55%, #dce8ec); }
.orbit-center { position: absolute; inset: 29%; display: grid; place-content: center; text-align: center; overflow: hidden; border: 7px solid var(--surface); border-radius: 50%; background: linear-gradient(145deg, #fbf1db, #dcecdf); box-shadow: var(--shadow); transform: rotate(-4deg); }
.orbit-center img { width: 100%; height: 100%; padding: 9%; object-fit: contain; filter: drop-shadow(0 8px 13px rgba(51, 61, 52, .14)); }
.orbit-badge { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 5px 9px; border-radius: 999px; background: var(--ink); color: var(--bg); white-space: nowrap; font-size: .55rem; font-weight: 800; letter-spacing: .12em; }
@keyframes spin { to { transform: rotate(360deg); } }
.story { padding: 110px 0; border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 1fr 2fr; align-items: end; margin-bottom: 72px; }
.section-heading h2 { margin: 0; font-size: clamp(2.2rem, 4.5vw, 4.8rem); line-height: 1.05; letter-spacing: -.055em; }
.timeline { list-style: none; padding: 0; margin: 0 0 0 33.333%; border-left: 1px solid var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 160px 1fr; gap: 28px; padding: 8px 0 60px 48px; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 13px; width: 11px; height: 11px; background: var(--bg); border: 2px solid var(--accent); border-radius: 50%; }
.timeline time { color: var(--accent); font-weight: 800; letter-spacing: .05em; }
.timeline h3 { margin: 0 0 8px; font-size: 1.5rem; } .timeline p { margin: 0; color: var(--muted); line-height: 1.7; }
.counters { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding-bottom: 110px; }
.counter-card { min-height: 270px; padding: 42px; display: grid; align-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.counter-card strong { font: italic 700 clamp(4rem, 8vw, 8rem)/1 'Playfair Display', serif; letter-spacing: -.07em; }
.counter-card small { color: var(--muted); }
.counter-card.accent { background: var(--accent-2); color: #fff; border: 0; transform: rotate(1deg); }
.counter-card.accent small { color: rgba(255,255,255,.75); }
.friends { padding: 110px 0; border-top: 1px solid var(--line); }
.friend-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.friend-card { position: relative; min-height: 380px; padding: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.friend-card:nth-child(even) { margin-top: 48px; }
.friend-card--frog { --friend-scene: radial-gradient(circle at 78% 20%, rgba(255,255,255,.78) 0 9%, transparent 10%), linear-gradient(150deg, #edf6d9 0%, #d4ebe0 52%, #bfdee5 100%); }
.friend-card--dog { --friend-scene: radial-gradient(circle at 20% 18%, rgba(255,255,255,.76) 0 12%, transparent 13%), linear-gradient(145deg, #fff4de 0%, #f4dfca 55%, #ebd0bb 100%); }
.friend-card--horse { --friend-scene: radial-gradient(circle at 80% 17%, rgba(255,244,164,.9) 0 10%, transparent 11%), linear-gradient(155deg, #f6efc9 0%, #e1e9bb 50%, #bad39d 100%); }
.friend-card--cat { --friend-scene: radial-gradient(circle at 22% 19%, rgba(255,255,255,.76) 0 11%, transparent 12%), linear-gradient(145deg, #faecde 0%, #eadfe8 52%, #dce8ed 100%); }
.friend-art { height: 205px; margin: -8px -8px 28px; overflow: hidden; border-radius: 16px; background: var(--friend-scene, var(--surface-2)); }
.friend-art img { width: 100%; height: 100%; padding: 12px; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(51, 61, 52, .15)); transition: transform .45s ease; }
.friend-card:hover .friend-art img { transform: scale(1.04); }
.friend-number { position: absolute; top: 18px; right: 24px; color: var(--muted); font-size: .75rem; }
.friend-card h3 { font-size: 1.7rem; margin: 0 0 10px; } .friend-card > p:last-child { color: var(--muted); line-height: 1.65; margin: 0; }
footer { width: var(--page); margin: 60px auto 0; min-height: 100px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .82rem; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; } .reveal.is-visible { opacity: 1; transform: none; }

/* Music archive */
.music-shell { width: var(--page); margin: 0 auto; }
.music-intro { padding: 68px 0 54px; display: flex; justify-content: space-between; gap: 30px; align-items: end; }
.music-intro h1 { margin: 0 0 14px; max-width: 820px; font-size: clamp(2.8rem, 6vw, 6.4rem); line-height: .98; letter-spacing: -.065em; }
.music-intro > div > p:last-child { margin: 0; color: var(--muted); font-size: 1.08rem; }
.live-stamp { flex: 0 0 auto; display: grid; grid-template-columns: auto 1fr; column-gap: 9px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.live-stamp > span { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-2) 16%, transparent); }
.live-stamp strong, .live-stamp small { grid-column: 2; } .live-stamp strong { font-size: .8rem; } .live-stamp small { color: var(--muted); }
.music-workspace { display: grid; grid-template-columns: 220px minmax(420px, 1fr) 290px; gap: 26px; align-items: start; border-top: 1px solid var(--line); padding-top: 28px; }
.filter-panel, .music-sidebar { position: sticky; top: 20px; }
.filter-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.filter-head button { border: 0; padding: 0; background: none; color: var(--accent); cursor: pointer; font-size: .78rem; }
.search-field { display: flex; gap: 8px; align-items: center; margin: 18px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: .86rem; }
.filter-panel fieldset { margin: 0; padding: 21px 0; border: 0; border-top: 1px solid var(--line); }
.filter-panel legend { padding: 0 0 14px; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.choice-list { display: grid; gap: 10px; }
.choice-list label { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 8px; cursor: pointer; font-size: .87rem; }
.choice-list input, .period-options input { accent-color: var(--accent); }
.choice-list small { color: var(--muted); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud label { display: block; }
.tag-cloud input { position: absolute; opacity: 0; pointer-events: none; }
.tag-cloud label span { display: block; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: .75rem; }
.tag-cloud label:has(input:checked) span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tag-cloud small { display: none; }
.period-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.period-options label { font-size: .78rem; }
.results-toolbar { display: flex; min-height: 48px; justify-content: space-between; align-items: start; border-bottom: 1px solid var(--line); }
.results-toolbar p { margin: 0; font-size: .82rem; color: var(--muted); } .results-toolbar p strong { color: var(--ink); }
.results-toolbar label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .75rem; }
.results-toolbar select { border: 0; color: var(--ink); background: transparent; font-weight: 700; outline: 0; }
.track-card { --track-color: var(--accent); display: grid; grid-template-columns: 180px 1fr; gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.track-thumb { position: relative; align-self: start; overflow: hidden; aspect-ratio: 16/10; border-radius: 13px; background: var(--track-color); }
.track-thumb img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: luminosity; opacity: .82; transition: transform .35s, opacity .35s; }
.track-thumb span { position: absolute; inset: 0; margin: auto; display: grid; place-content: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.9); color: #17221f; padding-left: 3px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.track-thumb:hover img { transform: scale(1.05); opacity: 1; }
.track-copy { min-width: 0; }
.track-topline { display: flex; justify-content: space-between; color: var(--muted); font-size: .68rem; letter-spacing: .08em; }
.track-topline p { margin: 0; }
.track-copy h2 { margin: 16px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.45rem; letter-spacing: -.025em; }
.track-channel { margin: 0 0 15px; color: var(--muted); font-size: .86rem; }
.track-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.track-tags span { color: var(--accent-2); font-size: .72rem; font-weight: 700; }
.track-shared { margin: 13px 0 0; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .7rem; }
.track-shared img { width: 21px; height: 21px; padding: 2px; object-fit: contain; border-radius: 50%; background: #e8efe7; border: 1px solid var(--line); }
.empty-state { padding: 80px 20px; text-align: center; } .empty-state span { font-size: 3rem; color: var(--accent); } .empty-state h2 { margin-bottom: 5px; } .empty-state p { color: var(--muted); }
.music-sidebar { display: grid; gap: 16px; }
.side-card { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.side-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.side-title h2 { margin: 0; font-size: .9rem; } .side-title > span { color: var(--muted); font-size: .58rem; letter-spacing: .1em; }
.now-playing { background: var(--ink); color: var(--bg); }
.now-playing .eyebrow { color: var(--yellow); }
.now-playing a { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; border-radius: 10px; }
.now-playing img { width: 100%; height: 100%; object-fit: cover; opacity: .76; }
.now-playing a span { position: absolute; inset: 0; display: grid; place-content: center; font-size: 1.4rem; color: white; }
.now-playing h3 { margin: 15px 0 2px; } .now-playing p { margin: 0 0 12px; opacity: .72; font-size: .78rem; } .now-playing small { opacity: .58; }
.ranking-list { list-style: none; margin: 0; padding: 0; }
.ranking-list li { display: grid; grid-template-columns: 22px 28px 1fr auto; gap: 7px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: .78rem; }
.ranking-list li > span { color: var(--muted); font-size: .62rem; } .ranking-list img { width: 26px; height: 26px; padding: 2px; object-fit: contain; border-radius: 50%; background: #e8efe7; border: 1px solid var(--line); } .ranking-list small { color: var(--muted); }
.playlist-list > div { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.playlist-list > div > img { width: 28px; height: 28px; padding: 2px; object-fit: contain; border-radius: 7px; background: #edf0e8; border: 1px solid var(--line); }
.playlist-list p { display: grid; margin: 0; font-size: .76rem; } .playlist-list small { color: var(--muted); font-size: .63rem; } .playlist-list b { color: var(--muted); font-size: .68rem; }

@media (max-width: 1100px) {
  .music-workspace { grid-template-columns: 200px 1fr; }
  .music-sidebar { position: static; grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .friend-grid { grid-template-columns: 1fr 1fr; } .friend-card:nth-child(even) { margin-top: 0; }
}
@media (max-width: 760px) {
  :root { --page: min(100% - 28px, 680px); }
  .site-header { min-height: 74px; } .brand-logo { width: 38px; height: 38px; } .text-link { display: none; }
  .hero { min-height: auto; padding: 72px 0; grid-template-columns: 1fr; } .hero-orbit { max-width: 390px; margin-top: 30px; }
  .animal-card { width: 88px; border-radius: 23px; } .animal-card img { width: 67px; height: 59px; }
  .section-heading { grid-template-columns: 1fr; gap: 8px; margin-bottom: 50px; }
  .timeline { margin-left: 8px; } .timeline li { grid-template-columns: 1fr; gap: 8px; padding-left: 30px; }
  .counters { grid-template-columns: 1fr; } .counter-card { min-height: 220px; }
  .friend-grid { grid-template-columns: 1fr; } .friend-card { min-height: 280px; } .friend-art { height: 230px; }
  .music-intro { align-items: start; flex-direction: column; padding-top: 48px; }
  .music-workspace { display: block; } .filter-panel { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin-bottom: 30px; }
  .filter-head, .search-field { grid-column: 1 / -1; } .filter-panel fieldset { min-width: 0; }
  .music-sidebar { display: grid; grid-template-columns: 1fr; margin-top: 35px; }
}
@media (max-width: 500px) {
  .hero h1 { font-size: 3.1rem; } .hero-orbit { max-width: 330px; } .animal-card { width: 76px; }
  .counters { padding-bottom: 80px; } .friends, .story { padding: 80px 0; }
  .filter-panel { grid-template-columns: 1fr; } .filter-head, .search-field { grid-column: auto; }
  .track-card { grid-template-columns: 118px 1fr; gap: 14px; } .track-copy h2 { margin-top: 9px; font-size: 1.05rem; }
  .track-channel { margin-bottom: 8px; } .track-shared { display: none; } .track-time { display: none; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }
