:root {
  --paper: #f4efe5;
  --paper-2: #fbf8f1;
  --ink: #1f2825;
  --muted: #6f746e;
  --line: rgba(31, 40, 37, 0.14);
  --accent: #f05b3f;
  --accent-dark: #b93423;
  --green: #204c42;
  --shadow: 0 24px 70px rgba(36, 42, 38, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
button, input { font: inherit; }
button { color: inherit; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 14px clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--paper-2); background: var(--ink); font-family: Georgia, serif; font-size: 22px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .08em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.model-button { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.42); cursor: pointer; }
.model-button span { color: var(--muted); font-size: 12px; }
.model-button strong { padding: 8px 13px; border-radius: 999px; color: white; background: var(--accent); font-size: 12px; }
main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.intro { display: grid; grid-template-columns: 1.4fr .6fr; gap: 50px; align-items: end; min-height: 390px; padding: 76px 0 58px; border-bottom: 1px solid var(--line); }
.eyebrow, .kicker { margin: 0 0 16px; color: var(--accent-dark); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; font-family: "STSong", "SimSun", Georgia, serif; font-size: clamp(48px, 8vw, 94px); font-weight: 500; line-height: .98; letter-spacing: -.05em; }
h1 em { color: var(--accent); font-style: normal; }
.intro-copy { max-width: 360px; margin: 0 0 10px; color: var(--muted); font-size: 15px; line-height: 1.9; }
.library { padding: 54px 0 96px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h2 { margin: 0; font-family: "STSong", "SimSun", Georgia, serif; font-size: 42px; font-weight: 500; }
.section-heading .kicker { margin-bottom: 6px; }
.search { display: flex; align-items: center; gap: 9px; width: min(360px, 100%); padding: 11px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.45); }
.search > span { color: var(--accent-dark); font-family: Georgia, serif; font-size: 22px; line-height: 1; }
.search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.search input::placeholder { color: #8b8e88; }
kbd { padding: 2px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; color: var(--muted); background: var(--paper-2); font-size: 10px; }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.filter-row > p { margin: 0; color: var(--muted); font-size: 12px; }
.segmented { display: flex; gap: 5px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.35); }
.segmented button { padding: 9px 13px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-size: 12px; }
.segmented button.active { color: white; background: var(--green); }
.segmented span { margin-left: 4px; opacity: .68; }
.interval-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.interval-card { overflow: hidden; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper-2); box-shadow: var(--shadow); transition: transform .22s ease, box-shadow .22s ease; }
.interval-card:hover { transform: translateY(-3px); box-shadow: 0 28px 72px rgba(36, 42, 38, .14); }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.direction { padding: 6px 9px; border-radius: 999px; color: var(--green); background: #dce9df; font-size: 11px; font-weight: 800; }
.direction.down { color: #7e3027; background: #f4ded8; }
.semitones { color: var(--muted); font-size: 11px; }
.card-title { display: flex; align-items: center; gap: 13px; margin: 21px 0 17px; }
.code { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: white; background: var(--ink); font-family: Georgia, serif; font-size: 17px; }
.card-title h3, .card-title p { margin: 0; }
.card-title h3 { font-family: "STSong", "SimSun", Georgia, serif; font-size: 24px; font-weight: 600; }
.card-title p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.score { display: grid; place-items: center; min-height: 112px; margin: 0 0 13px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.score img { display: block; max-width: 100%; max-height: 95px; object-fit: contain; }
.memory { min-height: 34px; margin-bottom: 10px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.memory strong { color: var(--accent-dark); }
audio { width: 100%; height: 40px; }
.empty-state { padding: 70px 20px; text-align: center; border: 1px dashed var(--line); border-radius: 18px; }
.empty-state span { color: var(--accent); font-family: Georgia, serif; font-size: 38px; }
.empty-state h3 { margin: 10px 0 5px; font-family: "STSong", "SimSun", serif; font-size: 28px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 13px; }
.reference { display: grid; grid-template-columns: .42fr .58fr; gap: 48px; align-items: center; margin-bottom: 100px; padding: clamp(28px, 6vw, 70px); border-radius: 28px; color: #f7f3e9; background: var(--green); }
.reference h2 { margin: 0 0 18px; font-family: "STSong", "SimSun", serif; font-size: clamp(42px, 6vw, 70px); font-weight: 500; }
.reference-copy > p:not(.kicker) { color: rgba(255,255,255,.7); font-size: 14px; line-height: 1.9; }
.reference .kicker { color: #ffb19e; }
.reference-actions { display: flex; align-items: center; gap: 18px; margin-top: 28px; }
.reference-actions a { color: white; font-size: 12px; text-underline-offset: 4px; }
.primary-action { padding: 11px 18px; border: 0; border-radius: 999px; color: #fff; background: var(--accent); cursor: pointer; font-size: 12px; font-weight: 800; }
.model-preview { overflow: hidden; padding: 10px; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 28px 80px rgba(0,0,0,.22); cursor: zoom-in; transform: rotate(1deg); }
.model-preview img { display: block; width: 100%; max-height: 500px; object-fit: contain; }
.floating-model { position: fixed; right: 20px; bottom: 20px; z-index: 15; display: flex; align-items: center; gap: 9px; padding: 7px 14px 7px 7px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; color: white; background: var(--ink); box-shadow: 0 14px 45px rgba(0,0,0,.2); cursor: pointer; }
.floating-model span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; color: white; background: var(--accent); font-family: Georgia, serif; font-weight: 700; }
.floating-model strong { font-size: 11px; }
.model-dialog { width: min(1180px, calc(100% - 28px)); max-width: none; height: min(900px, calc(100dvh - 28px)); max-height: none; padding: 0; border: 0; border-radius: 24px; color: var(--ink); background: var(--paper); box-shadow: 0 40px 120px rgba(0,0,0,.35); }
.model-dialog::backdrop { background: rgba(20,27,24,.68); backdrop-filter: blur(8px); }
.dialog-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(14px); }
.dialog-bar p, .dialog-bar h2 { margin: 0; }
.dialog-bar p { color: var(--accent-dark); font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.dialog-bar h2 { margin-top: 2px; font-family: "STSong", "SimSun", serif; font-weight: 500; }
.dialog-actions { display: flex; align-items: center; gap: 9px; }
.dialog-actions a, .dialog-actions button { display: grid; place-items: center; height: 38px; border: 1px solid var(--line); border-radius: 999px; color: inherit; background: var(--paper-2); text-decoration: none; cursor: pointer; }
.dialog-actions a { padding: 0 14px; font-size: 11px; font-weight: 800; }
.dialog-actions button { width: 38px; font-size: 24px; }
.model-canvas { overflow: auto; height: calc(100% - 71px); padding: 18px; }
.model-canvas img { display: block; width: max(100%, 1120px); height: auto; border-radius: 12px; background: white; }
@media (max-width: 840px) { .intro { grid-template-columns: 1fr; min-height: auto; } .interval-grid { grid-template-columns: repeat(2, 1fr); } .reference { grid-template-columns: 1fr; } }
@media (max-width: 580px) { main { width: min(100% - 28px, 1180px); } .topbar { padding-inline: 14px; } .model-button span { display: none; } .intro { padding-top: 52px; gap: 30px; } .section-heading { align-items: stretch; flex-direction: column; } .filter-row { align-items: stretch; flex-direction: column; } .segmented { overflow-x: auto; } .filter-row > p { padding-left: 5px; } .interval-grid { grid-template-columns: 1fr; } .reference { gap: 28px; margin-bottom: 80px; } .floating-model strong { display: none; } .floating-model { right: 14px; bottom: 14px; padding: 6px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .interval-card { transition: none; } }
