:root {
  color-scheme: light;
  --paper: #faf6ef;
  --bg: var(--paper);
  --ink: #33231c;
  --muted: #6f5648;
  --accent: #78452d;
  --accent-hover: #673821;
  --action: var(--accent);
  --accent-soft: #f0e0d0;
  --rule: #e6d7ca;
  --page-width: 76rem;
  --edge: clamp(1.25rem, 5.2vw, 4rem);
  --display: "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
  --body: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.75 var(--body); }
button, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
p, h1, h2 { margin: 0; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid #914b28; outline-offset: 5px; }
[id] { scroll-margin-top: 1.25rem; }

.wrap { width: min(var(--page-width), 100% - 2 * var(--edge)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 5; left: max(var(--edge), (100% - var(--page-width)) / 2); top: .5rem; padding: .55rem 1rem; background: #fff; transform: translateY(-140%); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: absolute; z-index: 2; inset: 0 0 auto; border-bottom: 1px solid #ecdfd2; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 5rem; gap: 1rem; }
.brand { display: inline-flex; min-height: 44px; white-space: nowrap; align-items: center; gap: .7rem; font-size: 1.15rem; font-weight: 700; letter-spacing: -.025em; }
.brand img { border-radius: .62rem; object-fit: cover; }
nav { display: flex; align-items: center; gap: clamp(1rem, 3.3vw, 2.75rem); min-width: 0; }
nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .95rem; white-space: nowrap; }
nav a:hover, .text-link:hover { color: var(--accent); }
nav a, .text-link { text-decoration: underline; text-underline-offset: .32em; text-decoration-color: transparent; transition: text-decoration-color .2s ease, color .2s ease; }
nav a:hover, .text-link:hover { text-decoration-color: currentColor; }

.hero { position: relative; }
.hero-grid { display: grid; min-height: max(47rem, 100svh); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; column-gap: 1.5rem; padding-block: calc(5rem + clamp(2.5rem, 6vh, 4.75rem)) clamp(2.5rem, 6vh, 4.75rem); }
.hero-copy { padding-bottom: .75rem; }
.section-label { color: var(--accent); font-size: .95rem; font-weight: 650; letter-spacing: .08em; margin-bottom: 1.25rem; }
h1, h2 { font-family: var(--display); font-weight: 700; }
h1 { font-size: clamp(2.45rem, 4.4vw, 4.35rem); letter-spacing: -.07em; line-height: 1.18; }
h1 span { display: block; }
h1 span + span { margin-top: .14em; }
.hero-description { color: var(--muted); margin-top: 1.65rem; max-width: 28rem; font-size: clamp(1.02rem, 1.4vw, 1.19rem); line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.3rem; margin-top: 1.85rem; }
.primary-button { display: inline-flex; gap: .62rem; align-items: center; justify-content: center; min-height: 3.12rem; border: 1px solid transparent; border-radius: 99px; padding: .42rem 1.15rem; background: var(--accent); color: #fffaf5; font-weight: 650; white-space: nowrap; transition: transform .2s, background .2s; }
.primary-button:hover { background: var(--accent-hover); transform: translateY(-2px); }
.primary-button:active { transform: translateY(0); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: .95rem; white-space: nowrap; }
.play-glyph { display: inline-block; flex: none; position: relative; width: 1.1rem; height: 1.1rem; }
.play-glyph::before { content: ""; position: absolute; left: .28rem; top: .16rem; border: .38rem solid transparent; border-right: 0; border-left: .58rem solid currentColor; }
[data-playing="true"] .play-glyph::before { inset: .18rem .18rem .18rem .2rem; border: 0; border-left: .19rem solid currentColor; border-right: .19rem solid currentColor; }

.hero-visual { position: relative; isolation: isolate; aspect-ratio: 1.07; min-width: 0; overflow: hidden; border-radius: 1.55rem; background: #ead4bd; }
.hero-image { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: 52% 50%; }
.player { position: absolute; left: clamp(.75rem, 4%, 1.45rem); right: clamp(.75rem, 4%, 1.45rem); bottom: clamp(.75rem, 4%, 1.45rem); min-height: 4.5rem; display: flex; align-items: center; gap: .8rem; padding: .65rem .95rem; border: 1px solid #ffffffa0; border-radius: 1.05rem; background: #fffaf1f5; box-shadow: 0 6px 22px #44281720; }
.player-info { display: grid; flex: 1; min-width: 0; line-height: 1.5; }
.player-info strong { font-size: 1rem; }
.player-info > span { font-size: .83rem; color: var(--muted); }
.player-button { display: grid; place-items: center; flex: none; inline-size: 44px; block-size: 44px; border: 0; border-radius: 50%; background: var(--accent); color: #fffaf5; transition: background .2s; }
.player-button:hover { background: var(--accent-hover); }
.waveform { display: flex; flex: none; gap: .23rem; align-items: center; width: min(26%, 6.4rem); height: 2.15rem; justify-content: flex-end; color: #aa795d; }
.waveform i { width: .19rem; height: var(--bar-height, 42%); border-radius: 1rem; background: currentColor; transform-origin: center; }
.waveform i:nth-child(3n) { --bar-height: 71%; --delay: -.55s; }
.waveform i:nth-child(4n) { --bar-height: 36%; --delay: -.22s; }
.waveform i:nth-child(5n) { --bar-height: 94%; --delay: -.8s; }
.player:has([data-playing="true"]) .waveform i { animation: pulse 1.15s var(--delay, 0s) ease-in-out infinite alternate; }
@keyframes pulse { from { transform: scaleY(.55); } to { transform: scaleY(1); } }
#audio-feedback:not([hidden]) { position: fixed; z-index: 4; left: 50%; bottom: 1rem; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2rem); padding: .55rem 1rem; background: #fffaf2; border: 1px solid var(--rule); border-radius: .75rem; }

.sounds-section { background: #f0e5d8; }
.sounds-grid, .report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 1.5rem; min-height: min(100svh, 56.25rem); padding-block: clamp(4.25rem, 10vw, 8rem); }
.section-copy h2 { font-size: clamp(2.35rem, 4.25vw, 4rem); line-height: 1.17; text-wrap: balance; letter-spacing: -.065em; }
.section-copy > p { max-width: 27rem; margin-top: 1.25rem; color: var(--muted); font-size: 1.08rem; }
.section-copy > .section-note { margin-top: 1rem; font-size: .92rem; }
.sound-photo { width: min(100%, 27rem); aspect-ratio: 2; height: auto; object-fit: cover; margin-top: 1.45rem; border-radius: .9rem; }
.sound-list { display: grid; gap: .75rem; padding: 0; margin: 0; list-style: none; }
.sound-row { display: flex; align-items: center; width: 100%; gap: clamp(.55rem, 2vw, 1.15rem); padding: .85rem; border: 1px solid #e7d5c5; border-radius: 1rem; background: #fffaf4; text-align: left; transition: transform .2s, background .2s, border-color .2s; }
.sound-row:hover { transform: translateY(-2px); border-color: #bf987d; }
.sound-row:active { transform: translateY(0); }
.sound-row[data-playing="true"] { background: #fff5e5; border-color: #b88769; }
.sound-art { display: grid; place-items: center; flex: none; overflow: hidden; inline-size: clamp(3rem, 5vw, 4.1rem); aspect-ratio: 1; border-radius: .66rem; }
.rain-art { background: #d8dfd1; color: #536857; }
.piano-art { background: #ead2be; color: #884c38; }
.wind-art { background: #e9dec7; color: #7f6a3d; }
.sound-art span { display: block; width: 51%; aspect-ratio: 1; position: relative; }
.rain-art span::before, .rain-art span::after { position: absolute; content: ""; height: 64%; width: 29%; top: 11%; border-radius: 85% 0 85% 85%; background: currentColor; transform: rotate(-28deg); }
.rain-art span::before { left: 10%; }
.rain-art span::after { left: 60%; top: 31%; height: 53%; width: 25%; }
.piano-art span { background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 33%); border: 2px solid currentColor; border-left: 0; border-radius: .14rem; }
.piano-art span::before, .piano-art span::after { position: absolute; content: ""; width: 12%; height: 61%; top: 0; background: currentColor; border-radius: 0 0 .09rem .09rem; }
.piano-art span::before { left: 27%; }
.piano-art span::after { left: 61%; }
.wind-art span { height: 44%; width: 54%; background: repeating-linear-gradient(0deg, transparent 0 23%, currentColor 23% 33%, transparent 33% 48%); transform: rotate(-14deg); border-radius: 35%; }
.sound-copy { display: grid; min-width: 0; flex: 1; gap: .08rem; line-height: 1.5; }
.sound-copy strong { font-size: 1.12rem; font-weight: 650; white-space: nowrap; }
.sound-copy > span, .sound-length { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.sound-length { font-variant-numeric: tabular-nums; }
.sound-row-play { display: grid; place-items: center; flex: none; inline-size: 44px; block-size: 44px; border-radius: 50%; background: #f1e2d4; color: var(--accent); }
.sound-row[data-playing="true"] .sound-row-play { background: var(--accent); color: #fff; }

.report-section { background: var(--paper); }
.report-explanation.mo-wh .mo-w:not(.is-on) { color: var(--muted); }
.report-window { padding: clamp(1.05rem, 4vw, 2rem); border: 1px solid var(--rule); border-radius: 1.3rem; background: #fffaf6; box-shadow: 0 20px 70px #75492b12; }
.report-header, .report-summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.report-header { font-size: 1.04rem; font-weight: 680; padding-bottom: .85rem; border-bottom: 1px solid #eee2d6; }
.sample-tag { font-size: .81rem; color: var(--muted); font-weight: 500; background: #f3e7dc; border-radius: 9rem; white-space: nowrap; padding: .15rem .6rem; }
.report-summary { margin-block: 1.15rem .55rem; align-items: flex-end; }
.report-summary p { color: var(--muted); font-size: .88rem; line-height: 1.55; }
.report-summary > div > strong { display: block; font-size: clamp(1.7rem, 4vw, 3rem); font-variant-numeric: tabular-nums; line-height: 1.25; white-space: nowrap; letter-spacing: -.04em; }
.report-summary > div > strong span { margin-left: .15em; font-size: .43em; font-weight: 560; letter-spacing: 0; }
.selected-day { display: grid; text-align: right; white-space: nowrap; }
.selected-day strong { color: var(--accent); }
.report-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(.2rem, 1vw, .7rem); padding-top: .65rem; }
.chart-day { display: flex; flex-direction: column; height: 12rem; justify-content: flex-end; align-items: center; gap: .4rem; padding: 0; border: 0; border-radius: .3rem; background: transparent; color: var(--muted); font-size: .85rem; }
.chart-day .bar { display: block; width: min(66%, 2.25rem); height: var(--length); border-radius: .36rem .36rem .14rem .14rem; background: #e1c4a9; transition: background .2s; }
.chart-day[aria-pressed="true"] .bar, .chart-day:hover .bar { background: #9b6041; }
.day-mon { --length: 62.1%; } .day-tue { --length: 69.3%; } .day-wed { --length: 58.5%; }
.day-thu { --length: 71.7%; } .day-fri { --length: 65.6%; } .day-sat { --length: 74.4%; } .day-sun { --length: 67.2%; }

.questions-section { border-top: 1px solid var(--rule); padding-block: clamp(3.75rem, 9vw, 7.5rem); background: #f8f0e6; }
.questions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
.questions-action { margin-top: 1.3rem; }
.questions { border-top: 1px solid #dfcdbd; }
details { border-bottom: 1px solid #dfcdbd; }
details p { padding: 0 2.5rem 1.25rem 0; color: var(--muted); }
summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.8rem; padding-block: .65rem; font-weight: 650; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); flex: none; margin-right: .12rem; font-size: 1.4rem; font-weight: 400; }
details[open] summary::after { content: "−"; }
.site-footer { border-top: 1px solid var(--rule); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; min-height: 6rem; gap: 1rem; }
.footer-inner p { color: var(--muted); font-size: .88rem; white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  [data-enter] .hero-copy { animation: enter .7s .03s both; }
  [data-enter] .hero-visual { animation: enter .82s .12s both; }
  @keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 68rem) {
  .hero-grid { column-gap: 1.8rem; }
  h1 { font-size: clamp(2.2rem, 4.7vw, 3.35rem); }
}
@media (max-width: 48rem) {
  .header-inner { min-height: 4.35rem; }
  .hero-grid, .sounds-grid, .report-grid, .questions-grid { min-height: 0; grid-template-columns: 1fr; }
  .hero-grid { min-height: 100svh; padding-block: 6.6rem 2.5rem; row-gap: 1.45rem; align-content: center; }
  .hero-copy { padding: 0; }
  .section-label { margin-bottom: .7rem; font-size: .9rem; }
  h1 { font-size: clamp(2.35rem, 8vw, 3.25rem); }
  .hero-description { margin-top: .95rem; }
  .hero-actions { margin-top: 1.1rem; }
  .hero-visual { border-radius: 1.1rem; aspect-ratio: 1.2; }
  .player { min-height: 4.02rem; padding: .45rem .63rem; gap: .62rem; border-radius: .8rem; }
  .sounds-grid, .report-grid { row-gap: 1.75rem; padding-block: 3.4rem; }
  .section-copy h2 { font-size: clamp(1.9rem, 7vw, 2.7rem); }
  .section-copy > p { margin-top: .9rem; font-size: 1rem; }
  .section-copy > .section-note { margin-top: .65rem; font-size: .9rem; }
  .desktop-break { display: none; }
  .footer-inner { min-height: 5.2rem; }
}
@media (max-width: 29rem) {
  .header-inner nav { gap: .75rem; }
  nav a { font-size: .86rem; }
  nav a:last-child { display: none; }
  .brand { gap: .52rem; font-size: 1.05rem; }
  .brand img { width: 34px; height: 34px; }
  .hero-grid { padding-top: 6.2rem; }
  .waveform { width: 22%; gap: .16rem; }
  .sound-length { display: none; }
  .chart-day { height: 7.5rem; }
}
@media (max-width: 22rem) {
  .waveform { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
