/* Listening library — single canonical theme. No legacy stylesheet dependencies.
   Sections: tokens / foundation / masthead / cards / library / guide / footer /
   motion / tablet / mobile / reduced-motion. */
:root {
  --paper: #faf3df;
  --page: #f1ebdd;
  --ink: #244c67;
  --muted: #586e78;
  --line: #7896a4;
  --red: #a34531;
  --pale: #e5ece8;
  --serif:
    "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif CJK SC", "Songti SC",
    SimSun, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--page);
  background-image:
    radial-gradient(ellipse at 90% 15%, #d4e1dd55, transparent 50%),
    repeating-linear-gradient(90deg, #24415f03 0 1px, transparent 1px 6px);
  color: var(--ink);
  font:
    15px/1.75 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  background: var(--red);
  transform: scaleX(var(--read-progress, 0));
  transform-origin: left;
  z-index: 20;
  pointer-events: none;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b34b3799;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
.brand,
.stats strong,
.bundle > strong,
.set h3 {
  font-family: var(--serif);
}
main {
  max-width: 1280px;
  margin: auto;
  padding: 0 40px;
}
.nav-label,
.side-note,
.side-footer,
nav b,
nav a span,
main > header {
  display: none;
}
/* Masthead and responsive illustration. */
.sidebar {
  max-width: 1280px;
  margin: auto;
  padding: 22px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 30px;
  letter-spacing: 5px;
  font-weight: 700;
}
.brand small {
  display: block;
  font:
    9px/1.7 system-ui,
    sans-serif;
  letter-spacing: 1.7px;
  color: var(--muted);
}
.logo {
  display: grid;
  place-items: center;
  width: 43px;
  height: 46px;
  background: #b34b37;
  color: var(--paper);
  outline: 1px solid #b34b37;
  outline-offset: 3px;
  border-radius: 3px;
  transform: rotate(-4deg);
  font-size: 29px;
  letter-spacing: 0;
}
nav {
  display: flex;
  gap: 24px;
}
nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  border-bottom: 2px solid transparent;
}
nav a:hover {
  border-color: var(--ink);
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 18px -20px 25px;
  padding: 30px 32px 36px;
  min-height: 400px;
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  align-items: center;
  gap: 20px;
  background: #f5efdf;
  border: 2px solid var(--ink);
  border-radius: 3px;
  box-shadow: 5px 5px 0 #97b3bc66;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      #f5efdf 0%,
      #f5efdfeb 20%,
      #f5efdf83 43%,
      transparent 62%
    ),
    url("/wave-desktop-v1.webp") center/cover;
  animation: sea-arrive 1.2s ease-out;
}
.hero-copy {
  min-width: 0;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--red);
  font-weight: 600;
}
.hero .eyebrow {
  color: #46677b;
  font-family: var(--serif);
  letter-spacing: 3px;
}
.eyebrow > span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--red);
  margin-right: 8px;
}
.hero h1 {
  font-size: clamp(40px, 4vw, 56px);
  line-height: 1.3;
  letter-spacing: 1px;
  margin: 18px 0 20px;
  text-shadow: 0 2px 0 #fff9;
  font-weight: 600;
}
.hero h1 > span {
  color: var(--red);
}
.hero-copy > p {
  font-size: 15px;
  line-height: 1.9;
  color: #465c66;
  margin: 14px 0;
  text-shadow: 0 1px 0 #fff8;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
}
.hero-button,
.hero-secondary,
.download-button,
.more {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  min-height: 46px;
  padding: 10px 20px;
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 14px;
  transition:
    transform 0.25s,
    box-shadow 0.25s,
    background 0.25s;
}
.hero-button {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 3px 3px 0 #123347;
}
.hero-button:hover {
  background: #376d87;
}
.hero-secondary:hover,
.download-button:hover,
.more:hover {
  background: #e0eaf0;
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}
.hero-button:active,
.hero-secondary:active,
.download-button:active,
.more:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
a > span {
  transition: transform 0.25s;
}
.download-button:hover > span,
.hero-button:hover > span {
  transform: translateY(3px);
}
.sound-art {
  align-self: end;
  min-width: 0;
  height: 75px;
  margin: 0 12px 8px 25%;
  padding: 14px 18px;
  background: #faf3dfed;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  box-shadow: 3px 3px 0 #244c6744;
  overflow: hidden;
}
.sun,
.japanese,
.vertical-note,
.landscape,
.seal {
  display: none;
}
.wave {
  height: 20px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.wave i {
  display: block;
  width: 2px;
  max-height: 21px;
  background: #315e78;
  animation: atelier-wave 1.7s ease-in-out infinite;
  animation-delay: calc(var(--i) * -77ms);
  transform-origin: center;
}
.wave.paused i {
  animation-play-state: paused;
}
.art-bottom {
  font-size: 7px;
  letter-spacing: 1px;
  color: #355268;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 2px;
  padding: 24px 0;
  box-shadow: 3px 3px 0 #7395a42b;
}
.stats > div {
  padding-left: 28px;
  border-right: 1px solid #64849555;
}
.stats > div:last-child {
  border: 0;
}
.stats strong {
  display: block;
  font-size: 36px;
  font-weight: 500;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.stats em {
  font: normal 9px system-ui;
  letter-spacing: 1px;
}
.stats span {
  font-size: 12px;
  color: var(--muted);
}
/* Content sections and client cards. */
.section {
  padding-top: 48px;
}
.section-heading {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 25px;
  margin-bottom: 26px;
}
.section-heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 9px;
  background: radial-gradient(
      ellipse at 50% 100%,
      transparent 55%,
      #557f9366 58% 65%,
      transparent 68%
    )
    0 0/24px 9px repeat-x;
}
h2 {
  font-size: 29px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: 9px;
}
.muted {
  font-size: 13px;
  color: var(--muted);
}
#updates {
  padding: 25px 0 4px;
}
#updates .section-heading {
  padding-bottom: 14px;
  margin-bottom: 14px;
}
#updates h2 {
  font-size: 24px;
}
#updates > p {
  font-size: 14px;
  line-height: 1.8;
  margin: 7px 0;
}
#updates + #apps {
  padding-top: 28px;
}
.apps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px;
}
.app {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 20px;
  padding: 28px 24px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 3px;
  box-shadow: 4px 4px 0 #87a8b147;
  overflow: hidden;
  transition:
    transform 0.4s var(--ease),
    box-shadow 0.4s;
}
.app::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: radial-gradient(
      ellipse at 50% 100%,
      transparent 48%,
      #96b9c34d 51% 64%,
      transparent 67%
    )
    0 0/26px 8px repeat-x;
}
.app:hover {
  transform: translateY(-4px);
  box-shadow: 6px 8px 0 #87a8b147;
}
.platform {
  display: grid;
  place-items: center;
  width: 54px;
  height: 58px;
  background: #d6e6e7;
  border: 2px solid var(--ink);
  border-radius: 9px 5px 11px 5px;
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 32px;
}
.app:nth-child(2) .platform {
  background: #f0ddbb;
}
.app h3 {
  font: 600 25px/1.5 var(--serif);
}
.tag {
  font: 11px/1.5 system-ui;
  margin-left: 8px;
  background: #e3e8d7;
  border: 1px solid #59758a66;
  border-radius: 2px;
  padding: 2px 6px;
  color: #597085;
}
.app p {
  font-size: 14px;
  color: var(--muted);
  margin: 8px 0 18px;
}
.app-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.download-button {
  padding: 9px 13px;
  font-size: 14px;
  gap: 12px;
  color: var(--red);
}
.guide-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  font-size: 14px;
}
.hash {
  font-size: 12px;
  margin-top: 16px;
  overflow-wrap: anywhere;
  color: var(--muted);
}
summary {
  cursor: pointer;
}
.hash summary {
  min-height: 32px;
  padding: 4px 0;
}
.hash code {
  display: block;
  padding-top: 8px;
  font-size: 11px;
}
/* Library: persistent filtering, collection summaries, interchangeable layouts. */
#library {
  margin: 54px -20px 0;
  padding: 34px;
  background: var(--pale);
  border: 1.5px solid #7193a5;
  border-radius: 3px;
  box-shadow: 4px 4px 0 #9cb4ba44;
  scroll-margin-top: 22px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 24px 0;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
  background: #b7ced6;
  border: 1.5px solid #527a8d;
  border-radius: 3px;
}
.tabs button {
  min-height: 44px;
  padding: 8px 15px;
  background: none;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 14px;
  color: #345a70;
}
.tabs button.selected {
  background: var(--paper);
  border-color: var(--ink);
  box-shadow: 2px 2px 0 #31566e55;
  color: var(--red);
}
.filters {
  display: flex;
  gap: 8px;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  min-height: 46px;
  background: #faf6e8;
  border: 1.5px solid #7c9baa;
  border-radius: 3px;
}
.search input {
  width: 166px;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 14px;
}
.search span {
  font-size: 21px;
  color: var(--muted);
}
select {
  min-height: 46px;
  padding: 8px;
  background: #faf6e8;
  border: 1.5px solid #7c9baa;
  border-radius: 3px;
  font-size: 14px;
}
.view-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
}
.view-toggle button {
  min-height: 44px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid #7799a8;
  border-radius: 3px;
  font-size: 13px;
}
.view-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}
.bundles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 25px 20px;
  margin: 33px 0 25px;
}
.bundle {
  --cover: #b9d1de;
  --cover-ink: #315a76;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  background: var(--cover);
  color: var(--cover-ink);
  border: 1.5px solid var(--cover-ink);
  border-radius: 3px;
  box-shadow:
    3px 3px 0 var(--paper),
    4px 4px 0 var(--cover-ink);
  transition: transform 0.4s var(--ease);
}
.bundle[data-bundle-level="N2"] {
  --cover: #ecdbb8;
  --cover-ink: #7c653e;
}
.bundle[data-bundle-level="N3"],
.bundle[data-bundle-level="N4"] {
  --cover: #c4d9d7;
  --cover-ink: #426d6e;
}
.bundle::before {
  content: "精聴 / COLLECTION";
  position: absolute;
  top: -18px;
  left: 16px;
  padding: 2px 8px;
  background: var(--cover);
  border: 1px solid var(--cover-ink);
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  font-size: 8px;
  letter-spacing: 1px;
}
.bundle::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 10px;
  right: 10px;
  height: 7px;
  background: radial-gradient(
      ellipse at 50% 100%,
      transparent 48%,
      currentColor 51% 64%,
      transparent 67%
    )
    0 0/22px 7px repeat-x;
  opacity: 0.14;
  pointer-events: none;
}
.bundle > strong {
  font-size: 36px;
  font-weight: 400;
}
.bundle > div {
  grid-column: 1/-1;
  grid-row: 2;
}
.bundle h3 {
  font-size: 14px;
}
.bundle p {
  font-size: 12px;
  margin-top: 4px;
}
.bundle a {
  grid-column: 2;
  grid-row: 1;
  flex: 0 0 44px;
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  line-height: 1;
  background: #faf3dfd9;
  border: 1px solid var(--cover-ink);
  border-radius: 50%;
  box-shadow: 1px 1px 0 var(--cover-ink);
  font-size: 20px;
}
.bundle:hover {
  transform: translateY(-4px);
}
.bundles.single-level {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 24px;
}
.single-level .bundle {
  display: flex;
  padding: 16px 22px;
  gap: 20px;
}
.single-level .bundle::before {
  display: none;
}
.single-level .bundle > strong {
  font-size: 30px;
}
.single-level .bundle > div {
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}
.single-level .bundle p {
  margin: 0;
}
.single-level .bundle a {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  border-radius: 3px;
  font-size: 14px;
  white-space: nowrap;
  padding: 9px 14px;
}
.results-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 25px 0 14px;
  font-size: 13px;
  color: var(--muted);
}
.sets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.set {
  position: relative;
  padding: 23px;
  background: var(--paper);
  border: 1.5px solid #648799;
  border-radius: 3px;
  box-shadow: 3px 3px 0 #9eb7bd55;
  animation: paper-arrive 0.5s var(--ease) backwards;
  animation-delay: calc(var(--order, 0) * 35ms);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}
.set::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: 22px;
  background: linear-gradient(
    45deg,
    #dae5df 0,
    #dae5df 48%,
    #6f91a1 49% 53%,
    var(--pale) 54%
  );
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.set:hover {
  transform: translateY(-4px);
  box-shadow: 5px 7px 0 #8babb44d;
}
.set-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  padding-right: 8px;
}
.badge {
  display: inline-block;
  border: 1px solid #315a76;
  padding: 2px 7px;
  font:
    13px/1.5 Georgia,
    serif;
  color: #315a76;
}
.badge.N2 {
  color: #7c653e;
  border-color: #7c653e;
}
.badge.N3,
.badge.N4 {
  color: #426d6e;
  border-color: #426d6e;
}
.set h3 {
  font-size: 24px;
  font-weight: 500;
  margin: 18px 0 8px;
}
.set p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 17px;
}
.set .set-note {
  font-size: 13px;
  margin-top: 8px;
  line-height: 1.65;
}
.set-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px dashed #7e99a777;
  padding-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
.set-bottom a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 96px;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--red);
  background: #b34b3708;
  border: 1px solid #b34b3722;
  border-radius: 3px;
}
.more {
  display: flex;
  margin: 27px auto 0;
  min-height: 46px;
}
.library-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
  margin-top: 22px;
}
.empty {
  grid-column: 1/-1;
  padding: 35px;
  text-align: center;
  background: #f3ebdc;
  color: var(--muted);
  border: 1px dashed #c5b596;
  border-radius: 3px;
}
.sort-toggle {
  flex-shrink: 0;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #8ba5b0;
  background: #faf3df;
  border-radius: 3px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.sort-toggle:hover {
  background: #d6e6e7;
  border-color: #527a8d;
}
.sort-toggle:disabled {
  opacity: 0.6;
  cursor: wait;
}
/* Compact rows are explicit, not a separate content renderer. */
#library[data-view="list"] .sets {
  grid-template-columns: 1fr;
  gap: 10px;
}
#library[data-view="list"] .set {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 13px;
  padding: 13px 17px;
  box-shadow: 2px 2px 0 #9eb7bd33;
}
#library[data-view="list"] .set::after {
  display: none;
}
#library[data-view="list"] .set-top {
  grid-column: 1;
  grid-row: 1/3;
  padding: 0;
}
#library[data-view="list"] .set-top > span:last-child {
  display: none;
}
#library[data-view="list"] .set h3 {
  grid-column: 2;
  grid-row: 1;
  font-size: 19px;
  margin: 0;
}
#library[data-view="list"] .set > p {
  grid-column: 2;
  font-size: 13px;
  margin: 0;
}
#library[data-view="list"] .set .set-note {
  margin-top: 3px;
}
#library[data-view="list"] .set-bottom {
  grid-column: 3;
  grid-row: 1/5;
  display: flex;
  gap: 15px;
  border: 0;
  padding: 0;
}
#library[data-view="list"] .set:hover {
  transform: translateY(-2px);
}
/* Guide, legal note, modal and footer. */
.guide {
  padding-bottom: 30px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 35px;
  padding: 30px 35px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  box-shadow: 4px 4px 0 #8aa9b03d;
}
.steps article > span {
  font: 30px var(--serif);
  color: var(--red);
  border-bottom: 2px solid #b34b3760;
}
.steps h3 {
  font: 600 20px/1.5 var(--serif);
  margin: 10px 0;
}
.steps p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
}
.usage-notice {
  position: relative;
  margin: 8px 0 30px;
  padding: 26px 30px 26px 78px;
  background: #f2ead6;
  border: 1.5px solid #8f9c9366;
  border-radius: 3px;
  box-shadow: 3px 3px 0 #8aa9b025;
}
.notice-stamp {
  position: absolute;
  left: 24px;
  top: 28px;
  writing-mode: vertical-rl;
  border: 2px solid var(--red);
  color: var(--red);
  border-radius: 2px;
  padding: 8px 4px;
  font: 16px var(--serif);
  transform: rotate(-5deg);
}
.usage-notice h2 {
  font-size: 22px;
  margin: 0 0 8px;
}
.usage-notice p {
  font-size: 14px;
  color: #75674f;
  line-height: 1.9;
  margin: 6px 0;
}
.usage-notice strong {
  color: #8d3929;
}
.usage-notice .notice-en {
  font-size: 10px;
  letter-spacing: 1.5px;
  margin-top: 13px;
  color: #827153;
}
.guide-dialog {
  padding: 0;
  width: min(680px, calc(100% - 32px));
  max-height: 85dvh;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow:
    5px 5px 0 #f2ead6,
    7px 7px 0 var(--ink),
    0 30px 75px #19384966;
}
.guide-dialog::backdrop {
  background: #183a5677;
  backdrop-filter: blur(4px);
}
.guide-dialog[open] {
  animation: open-notebook 0.35s var(--ease);
}
.dialog-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 25px;
  background: #dbe8e7;
  border-bottom: 2px solid var(--line);
}
.dialog-heading h2 {
  font-size: 23px;
  margin: 0;
}
.dialog-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 2px 2px 0 #244c6744;
  font-size: 25px;
  line-height: 1;
}
.dialog-body {
  padding: 25px;
}
.dialog-caption {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.guide-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    15px/1.95 system-ui,
    "Microsoft YaHei",
    sans-serif;
  margin: 0;
  color: #304b5c;
}
.guide-error {
  color: var(--red);
}
body.modal-open {
  overflow: hidden;
}
footer.site-footer {
  padding: 24px 22px;
  margin: 20px 0 0;
  background: var(--paper);
  border-top: 1.5px solid #527a8d;
}
.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.footer-identity > strong {
  font: 600 18px var(--serif);
}
.footer-identity p {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 10px;
}
.footer-identity a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
.footer-metrics {
  flex-shrink: 0;
}
.visit-stats {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}
.visit-stats > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.visit-stats span {
  font-size: 13px;
  color: var(--muted);
}
.visit-stats strong {
  font: 500 26px var(--serif);
  font-variant-numeric: tabular-nums;
}
.visit-caption {
  font-size: 12px;
  line-height: 1.7;
  margin-top: 10px;
  text-align: right;
  color: var(--muted);
}
/* Compact latest release and chronological history. */
#updates.update-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 22px;
  margin: 24px 0 0;
  padding: 15px 18px;
  background: #faf3df99;
  border: 1px solid #8ba5b066;
  border-radius: 3px;
}
.update-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.update-heading .update-mark {
  border: 1px solid var(--red);
  color: var(--red);
  font: 18px var(--serif);
  padding: 2px 4px;
  transform: rotate(-5deg);
}
#updates .update-heading h2 {
  font: 600 16px var(--serif);
  margin: 0;
  letter-spacing: 1px;
}
.update-heading time {
  font-size: 12px;
  color: var(--muted);
}
#updates.update-strip > p {
  font-size: 14px;
  margin: 0;
  line-height: 1.7;
}
#open-changelog {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  background: var(--paper);
  white-space: nowrap;
  font-size: 14px;
}
#open-changelog:hover {
  background: #dbe8e7;
}
#open-changelog span {
  transition: transform 0.2s;
}
#open-changelog:hover span {
  transform: translate(2px, -2px);
}
.changelog-dialog {
  width: min(760px, calc(100% - 32px));
}
.changelog-dialog .dialog-heading h2 {
  margin-top: 5px;
}
.changelog-body {
  padding: 24px 30px 30px;
}
.changelog-intro,
.changelog-status {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 22px;
}
.changelog-status {
  color: var(--red);
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 24px;
  border-left: 1px solid #6e91a4;
}
.timeline-entry {
  position: relative;
  margin: 0 0 27px;
}
.timeline-entry:last-child {
  margin-bottom: 0;
}
.timeline-entry::before {
  content: "";
  position: absolute;
  top: 8px;
  left: -30px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}
.timeline-date {
  display: block;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 10px;
}
.timeline-card {
  border: 1px solid #7594a3;
  background: #fffbf0;
  box-shadow: 2px 2px 0 #a0b8bf33;
  border-radius: 3px;
}
.timeline-summary {
  position: relative;
  display: block;
  list-style: none;
  padding: 17px 42px 17px 18px;
  min-height: 68px;
}
.timeline-summary::-webkit-details-marker {
  display: none;
}
.timeline-summary::after {
  content: "＋";
  position: absolute;
  right: 15px;
  top: 22px;
  font-size: 20px;
  color: var(--ink);
}
.timeline-card[open] > .timeline-summary::after {
  content: "−";
}
.timeline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
}
.release-category,
.release-version,
.release-latest {
  padding: 1px 6px;
  border: 1px solid #8ba6ad77;
  border-radius: 2px;
  color: var(--muted);
}
.release-category {
  background: #e0eae8;
}
.release-latest {
  color: var(--red);
  border-color: #b34b3755;
}
.release-title {
  display: block;
  font: 600 20px/1.6 var(--serif);
}
.release-changes {
  list-style: none;
  margin: 0 18px;
  padding: 14px 0 17px;
  border-top: 1px dashed #a0b8bf88;
}
.release-changes li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.85;
}
.release-changes li:last-child {
  margin-bottom: 0;
}
.change-tag {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1.8;
  padding: 2px 6px;
  margin-top: 2px;
  border: 1px solid #7896a466;
  color: #456a7c;
  background: #e9eeea;
}
.change-text {
  color: #435c69;
}
.changelog-retry {
  margin-top: 10px;
}
@media (max-width: 1100px) {
  #updates.update-strip {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  #updates.update-strip > p {
    grid-column: 1;
    grid-row: 2;
  }
  #open-changelog {
    grid-column: 2;
    grid-row: 1/3;
  }
}
@media (max-width: 760px) {
  #updates.update-strip {
    margin-top: 18px;
    padding: 13px;
    gap: 9px 12px;
  }
  .update-heading {
    gap: 8px;
  }
  #updates .update-heading h2 {
    font-size: 16px;
  }
  .update-heading time {
    font-size: 11px;
  }
  #updates.update-strip > p {
    grid-column: 1/-1;
    grid-row: 2;
    font-size: 13px;
  }
  #open-changelog {
    grid-row: 1;
    align-self: center;
    font-size: 12px;
    padding: 8px;
    gap: 6px;
  }
  .changelog-dialog {
    width: calc(100% - 20px);
    max-height: 92dvh;
  }
  .changelog-body {
    padding: 20px 18px;
  }
  .changelog-intro {
    font-size: 12px;
  }
  .timeline {
    padding-left: 18px;
  }
  .timeline-entry::before {
    left: -24px;
  }
  .timeline-summary {
    padding: 15px 34px 15px 13px;
  }
  .release-title {
    font-size: 18px;
  }
  .timeline-summary::after {
    right: 10px;
  }
  .release-changes {
    margin: 0 13px;
  }
  .release-changes li {
    font-size: 14px;
    gap: 8px;
  }
  .changelog-dialog .dialog-heading h2 {
    font-size: 22px;
  }
  .changelog-dialog .eyebrow {
    font-size: 9px;
  }
}
/* Download initiation feedback. */
.feedback-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  width: max-content;
  max-width: min(580px, calc(100% - 32px));
  padding: 14px 20px;
  background: #244c67;
  color: #faf3df;
  border: 1px solid #93abb6;
  border-radius: 5px;
  box-shadow: 0 8px 22px #193a5033;
  font-size: 14px;
  line-height: 1.8;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 25;
}
.feedback-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 760px) {
  .feedback-toast {
    bottom: max(16px, env(safe-area-inset-bottom));
    font-size: 13px;
    padding: 12px 16px;
  }
}
/* Motion: compositor-friendly; all can be disabled by the OS preference. */
.reveal-ready {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.65s var(--ease),
    transform 0.65s var(--ease);
}
.reveal-ready.in-view {
  opacity: 1;
  transform: none;
}
.app.paper-enter {
  animation: paper-arrive 0.65s var(--ease) backwards;
  animation-delay: var(--delay, 0ms);
}
@keyframes atelier-wave {
  0%,
  100% {
    transform: scaleY(0.35);
    opacity: 0.4;
  }
  50% {
    transform: scaleY(1.1);
    opacity: 0.9;
  }
}
@keyframes sea-arrive {
  from {
    opacity: 0;
    transform: scale(1.025);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes paper-arrive {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes open-notebook {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 1199px) {
  .bundles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  main {
    padding: 0 28px;
  }
  .sidebar {
    padding: 22px 28px;
  }
  .hero {
    margin-left: -8px;
    margin-right: -8px;
    padding: 28px 24px 32px;
    min-height: 390px;
  }
  .hero h1 {
    font-size: 44px;
  }
  .app {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 15px;
    padding: 23px 19px;
  }
  .platform {
    width: 44px;
    height: 48px;
    font-size: 28px;
  }
  .sets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #library {
    margin-left: -8px;
    margin-right: -8px;
    padding: 28px 24px;
  }
  .footer-main {
    flex-wrap: wrap;
  }
}
/* Mobile: short opening, sticky controls, accessible touch targets. */
@media (max-width: 760px) {
  html {
    scroll-padding-top: 164px;
  }
  main {
    padding: 0 20px;
  }
  .sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px 20px;
  }
  .brand {
    font-size: 25px;
    gap: 12px;
    letter-spacing: 4px;
  }
  .brand small {
    font-size: 8px;
  }
  .logo {
    width: 34px;
    height: 38px;
    font-size: 25px;
  }
  nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  nav a {
    font-size: 13px;
    min-height: 44px;
  }
  .hero {
    margin: 13px -8px 19px;
    padding: 22px 20px;
    min-height: 335px;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: start;
  }
  .hero::before {
    background-image:
      linear-gradient(
        90deg,
        #f5efdfef 0%,
        #f5efdfc9 35%,
        #f5efdf6b 65%,
        #f5efdf0a 100%
      ),
      url("/wave-mobile-v1.webp");
    background-size:
      auto,
      auto 390px;
    background-position:
      center,
      66% bottom;
    background-repeat: no-repeat;
  }
  .hero h1 {
    font-size: 36px;
    line-height: 1.3;
    margin: 12px 0 15px;
  }
  .hero .eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
  }
  .hero-copy > p {
    font-size: 14px;
    line-height: 1.8;
    margin: 10px 0;
  }
  .hero-actions {
    gap: 12px;
    margin-top: 19px;
  }
  .hero-button,
  .hero-secondary {
    padding: 10px 14px;
    gap: 12px;
    font-size: 14px;
  }
  .sound-art {
    display: none;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 15px 0;
    row-gap: 13px;
  }
  .stats > div {
    padding-left: 18px;
  }
  .stats > div:nth-child(2) {
    border: 0;
  }
  .stats strong {
    font-size: 28px;
  }
  .stats span {
    font-size: 11px;
  }
  .stats em {
    font-size: 8px;
  }
  .section {
    padding-top: 32px;
  }
  .section-heading {
    margin-bottom: 20px;
    padding-bottom: 20px;
  }
  .section-heading h2 {
    font-size: 23px;
  }
  .section-heading .muted {
    display: none;
  }
  .eyebrow {
    font-size: 10px;
    letter-spacing: 1.6px;
  }
  #updates {
    padding-top: 20px;
  }
  #updates h2 {
    font-size: 21px;
  }
  #updates > p {
    font-size: 14px;
  }
  #updates + #apps {
    padding-top: 22px;
  }
  .apps {
    grid-template-columns: 1fr;
    gap: 19px;
  }
  .app {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 20px 16px;
    gap: 13px;
  }
  .platform {
    width: 40px;
    height: 44px;
    font-size: 25px;
  }
  .app h3 {
    font-size: 23px;
  }
  .app p {
    font-size: 14px;
    margin: 5px 0 12px;
  }
  .app-actions {
    gap: 10px;
  }
  .download-button {
    font-size: 14px;
    padding: 8px 10px;
    gap: 8px;
  }
  .guide-button {
    font-size: 14px;
    padding: 7px 6px;
  }
  .hash {
    margin-top: 11px;
    font-size: 12px;
  }
  #library {
    margin: 33px -8px 0;
    padding: 24px 14px;
    scroll-margin-top: 12px;
  }
  .toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin: 0 -6px 24px;
    padding: 10px 6px;
    background: var(--pale);
    border-bottom: 1px solid #a1b8bd;
    box-shadow: 0 5px 8px #244c670b;
  }
  .tabs {
    grid-column: 1/-1;
    justify-content: space-between;
    gap: 2px;
    padding: 3px;
  }
  .tabs button {
    font-size: 13px;
    padding: 8px 9px;
    flex: 1;
    white-space: nowrap;
  }
  .filters {
    grid-column: 1;
    gap: 6px;
    min-width: 0;
  }
  .search {
    flex: 1;
    min-width: 0;
    padding: 0 7px;
  }
  .search input {
    width: 100%;
    font-size: 14px;
  }
  .search span {
    display: none;
  }
  select {
    font-size: 13px;
    padding: 8px 4px;
    max-width: 99px;
  }
  .view-toggle {
    grid-column: 2;
    gap: 2px;
  }
  .view-toggle button {
    font-size: 12px;
    padding: 7px 6px;
  }
  .bundles {
    grid-template-columns: 1fr;
    gap: 22px;
    margin: 30px 0 20px;
  }
  .bundle {
    padding: 17px 14px;
    gap: 14px;
  }
  .bundle > strong {
    font-size: 31px;
  }
  .bundle h3 {
    font-size: 14px;
  }
  .bundle p {
    font-size: 12px;
    line-height: 1.6;
  }
  .bundle a {
    min-height: 44px;
    min-width: 44px;
  }
  .single-level .bundle {
    padding: 15px;
    gap: 13px;
    flex-wrap: wrap;
  }
  .single-level .bundle > div {
    display: block;
    flex: 1;
    min-width: 130px;
  }
  .single-level .bundle p {
    margin-top: 3px;
  }
  .single-level .bundle a {
    margin-left: auto;
  }
  .results-meta {
    font-size: 12px;
    margin: 20px 0 12px;
    align-items: center;
  }
  .results-meta > span:last-child {
    font-size: 11px;
    white-space: nowrap;
  }
  .sets {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .set {
    padding: 20px;
  }
  .set h3 {
    font-size: 24px;
  }
  .set-top {
    font-size: 11px;
  }
  .set p {
    font-size: 14px;
  }
  .set-bottom {
    font-size: 13px;
  }
  .set-bottom a {
    font-size: 14px;
    min-height: 44px;
  }
  .library-note {
    font-size: 13px;
  }
  .more {
    font-size: 14px;
  }
  #library[data-view="list"] .set {
    grid-template-columns: 33px minmax(0, 1fr) 76px;
    gap: 2px 9px;
    padding: 12px 10px;
  }
  #library[data-view="list"] .set h3 {
    font-size: 18px;
    line-height: 1.5;
  }
  #library[data-view="list"] .set > p {
    font-size: 12px;
    line-height: 1.7;
  }
  #library[data-view="list"] .set-bottom {
    flex-direction: column;
    gap: 2px;
    align-items: stretch;
    font-size: 11px;
    text-align: center;
  }
  #library[data-view="list"] .set-bottom a {
    min-width: 0;
    min-height: 44px;
    font-size: 13px;
    padding: 7px 3px;
  }
  #library[data-view="list"] .badge {
    font-size: 12px;
    padding: 2px 5px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 23px;
    padding: 25px;
  }
  .steps article {
    padding-left: 42px;
    position: relative;
  }
  .steps article > span {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 27px;
  }
  .steps h3 {
    font-size: 19px;
    margin: 0 0 7px;
  }
  .steps p {
    font-size: 14px;
  }
  .usage-notice {
    padding: 23px 18px 23px 59px;
    margin-bottom: 24px;
  }
  .notice-stamp {
    left: 17px;
    top: 25px;
    font-size: 14px;
  }
  .usage-notice h2 {
    font-size: 21px;
  }
  .usage-notice p {
    font-size: 13px;
  }
  .usage-notice .notice-en {
    font-size: 9px;
    letter-spacing: 1px;
  }
  .dialog-heading {
    padding: 16px;
  }
  .dialog-heading h2 {
    font-size: 21px;
  }
  .dialog-body {
    padding: 20px;
  }
  .guide-text {
    font-size: 15px;
  }
  .dialog-caption {
    font-size: 13px;
  }
  footer.site-footer {
    padding: 20px 16px;
  }
  .footer-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .footer-identity > strong {
    font-size: 17px;
  }
  .footer-metrics {
    width: 100%;
    flex-shrink: 1;
  }
  .visit-stats {
    gap: 23px;
  }
  .visit-stats > div {
    gap: 8px;
  }
  .visit-stats span {
    font-size: 12px;
  }
  .visit-caption {
    text-align: left;
    font-size: 11px;
  }
}
@media (max-width: 760px) {
  .bundle {
    display: flex;
    gap: 14px;
  }
  .bundle > div {
    flex: 1;
    min-width: 0;
  }
  .bundle p {
    overflow-wrap: anywhere;
  }
  .sort-toggle {
    font-size: 12px;
    padding: 8px 6px;
  }
  .results-meta {
    gap: 8px;
  }
  .results-meta > span:first-child {
    font-size: 11px;
  }
}
@media (max-width: 360px) {
  .hero {
    padding: 20px 16px;
    min-height: 323px;
  }
  .hero h1 {
    font-size: 32px;
  }
  .hero-actions {
    gap: 9px;
  }
  .hero-button,
  .hero-secondary {
    padding: 10px 10px;
    font-size: 13px;
    gap: 8px;
  }
  .tabs button {
    padding: 8px 6px;
    font-size: 12px;
  }
  .filters {
    flex-wrap: wrap;
  }
  .search {
    flex-basis: 100%;
  }
  .view-toggle {
    align-self: start;
  }
  select {
    max-width: none;
    width: 100%;
  }
  html {
    scroll-padding-top: 212px;
  }
  #library[data-view="list"] .set {
    grid-template-columns: 30px minmax(0, 1fr) 69px;
    column-gap: 7px;
  }
  #library[data-view="list"] .set h3 {
    font-size: 16px;
  }
  .visit-stats {
    gap: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal-ready {
    opacity: 1;
    transform: none;
  }
  .app:hover,
  .set:hover,
  .bundle:hover {
    transform: none;
  }
}

/* Keep the ukiyo-e background still. */
.hero::before {
  animation: none;
}
