:root {
  color-scheme: light;
  --ink: #20241e;
  --muted: #62665b;
  --paper: #f7f5ee;
  --panel: #fffdf7;
  --border: #d8d7ca;
  --dark: #161a16;
  --dark-deep: #101410;
  --yellow: #edbe70;
  --accent-ink: #573b18;
  --shell: 1260px;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 310px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid #8c5a24;
  outline-offset: 4px;
}
h1, h2, h3, h4, p, figure { margin: 0; }
.shell { width: min(var(--shell), calc(100% - 7vw)); margin: 0 auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 1rem; left: 1rem; z-index: 3; background: var(--panel); padding: .6rem; }

.site-header { background: var(--dark-deep); color: #f4f1e6; border-bottom: 1px solid #343930; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.55rem; }
.header-inner { min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .62rem; font-size: 1rem; font-weight: 720; text-decoration: none; white-space: nowrap; }
.brand-mark {
  position: relative;
  display: inline-block;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: conic-gradient(from 29deg, #1b211b 0deg 52deg, var(--yellow) 53deg 120deg, #1b211b 121deg 172deg, var(--yellow) 173deg 240deg, #1b211b 241deg 292deg, var(--yellow) 293deg);
  border: 2px solid var(--yellow);
  flex: 0 0 auto;
}
.brand-mark::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--yellow); }
.main-nav, .user-nav { display: flex; align-items: center; gap: clamp(.65rem, 2vw, 1.7rem); }
.main-nav a, .user-nav a { text-decoration: none; white-space: nowrap; font-size: .88rem; color: #d4d8ca; padding-block: .5rem; }
.main-nav a:hover, .user-nav a:hover, .main-nav a[aria-current], .user-nav a[aria-current] { color: var(--yellow); }
.account-button { color: #fcf6e6; background: #20261d; border: 1px solid #525b4b; border-radius: 4px; padding: .56rem .8rem; font-size: .86rem; white-space: nowrap; }
.account-button:hover { border-color: var(--yellow); }

.hero { background: #20271f; color: #fff9eb; overflow: hidden; }
.hero-inner { position: relative; display: grid; grid-template-columns: 53% 47%; align-items: center; min-height: clamp(390px, 36vw, 530px); }
.hero-copy { position: relative; z-index: 1; padding: 2.6rem 0 3rem .3rem; max-width: 610px; }
.hero h1, .section-heading h1, .section-heading h2, dialog h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.hero h1 { font-size: clamp(5rem, 9.6vw, 8.7rem); line-height: .82; letter-spacing: -.072em; }
.hero h1 span { color: var(--yellow); }
.hero-copy p { color: #d5d9cb; line-height: 1.55; font-size: clamp(.98rem, 1.6vw, 1.14rem); max-width: 29rem; margin-top: 1.65rem; }
.hero-search { display: grid; grid-template-columns: 1rem 1fr auto; align-items: center; gap: .8rem; max-width: 35rem; margin-top: 1.45rem; border: 1px solid #60705e; background: #151b15; border-radius: 4px; padding: 4px 4px 4px 1rem; }
.hero-search input { width: 100%; min-width: 0; border: 0; background: transparent; color: #fffbef; padding: .6rem .1rem; outline-offset: 0; }
.hero-search input::placeholder { color: #b1bbad; }
.hero-search button { border: 0; color: #221a10; background: var(--yellow); border-radius: 2px; padding: .63rem .95rem; font-weight: 700; }
.hero-search button:hover { background: #ffd38c; }
.search-icon { width: 13px; height: 13px; border: 1.5px solid #aeb9aa; border-radius: 50%; position: relative; }
.search-icon::after { position: absolute; content: ""; width: 6px; height: 1.5px; background: #aeb9aa; bottom: -2px; right: -4px; transform: rotate(47deg); }
.hero-art { position: absolute; height: 100%; width: 60%; right: -2.8%; inset-block: 0; pointer-events: none; overflow: hidden; background: radial-gradient(ellipse at 75% 47%, #5f6a4c81, transparent 68%); }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #20271f 0, #20271f00 29%), linear-gradient(0deg, #20271f 0, transparent 15%, transparent 85%, #20271f 100%); }
.diagram-lines { position: absolute; inset: 5% 0; opacity: .21; background-image: repeating-linear-gradient(90deg,#aeba9a00 0 32px,#aeba9a 33px,#aeba9a00 34px), repeating-linear-gradient(0deg,#aeba9a00 0 32px,#aeba9a 33px,#aeba9a00 34px); mask-image: linear-gradient(90deg, transparent, #000 36%); }
.art-spool {
  position: absolute;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 66%, #1a1d15 66.6%, #f4d39b 67%, #3b3526 68.5%, #c0a475 69.4%, #302617 71%),
    repeating-radial-gradient(circle, #fff6cb30 0 1px, #15150934 1.5px 2.4px, transparent 2.5px 4.6px),
    conic-gradient(from 30deg, #debe80, #5d5138 35deg, #9a8055 65deg, #d2b176 96deg, #8e754e 145deg, #544631 173deg, #c0a574 218deg, #e2c48b 246deg, #796445 306deg, #debe80);
  box-shadow: 13px 22px 31px #12170fc9, inset 0 0 0 1px #ffecc4b5, inset 0 0 22px #201a1380;
}
.art-spool-front { width: 60%; left: 24%; top: 5%; transform: rotate(-14deg); }
.art-spool-back { width: 44%; left: 59%; top: 35%; transform: rotate(12deg); filter: brightness(.66) saturate(.7); }
.art-spool i { position: absolute; display: block; left: 32%; top: 32%; width: 36%; height: 36%; border-radius: 50%; transform-origin: 50% 50%; background: repeating-radial-gradient(circle at 50% 111%, #302a1a 0 2px, #1d1d15 3px 5px); box-shadow: inset 4px 6px 9px #080c08, 0 0 3px #ffe4a9; }
.art-spool i:nth-child(1) { transform: translateY(-72%); }
.art-spool i:nth-child(2) { transform: rotate(120deg) translateY(-72%); }
.art-spool i:nth-child(3) { transform: rotate(240deg) translateY(-72%); }
.art-spool b { position: absolute; inset: 37%; border-radius: 50%; border: 1px solid #c7ae7a; box-shadow: 0 0 0 3px #3e3223b0, inset 0 3px 12px #231e14; background: radial-gradient(circle, #1b1b13 0 23%, transparent 25%), conic-gradient(from 55deg, #c6ac77, #63523b, #b59d6e, #5f4c31, #c6ac77); }
.art-spool b::after { content: ""; position: absolute; inset: 35%; background: #191b12; clip-path: polygon(37% 0,63% 0,63% 34%,95% 56%,81% 80%,50% 62%,20% 80%,5% 56%,37% 34%); }

.main-shell { min-height: 55vh; padding-bottom: 3.5rem; }
.home-section { padding-top: 2rem; }
.home-section + .home-section { margin-top: .25rem; }
.browse-section { padding-top: 3rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding-bottom: .72rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.section-heading h1 { font-size: clamp(2.55rem, 6vw, 4.5rem); letter-spacing: -.06em; line-height: 1.03; }
.section-heading h2 { font-size: clamp(2rem, 3.9vw, 3.18rem); letter-spacing: -.055em; line-height: 1.04; }
.text-link { color: #65451d; text-underline-offset: .24em; font-size: .92rem; font-weight: 650; text-wrap: pretty; margin: 0 0 .25rem; }
.text-link:hover { color: #97652b; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.featured-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { min-width: 0; border: 1px solid #d9d8ca; border-radius: 5px; overflow: hidden; background: var(--panel); transition: transform .16s ease, box-shadow .16s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 15px #2f2c2013; }
.card-button { display: block; padding: 0; width: 100%; height: 100%; border: 0; background: transparent; color: inherit; text-align: left; }
.card-button:focus-visible { outline-offset: -4px; }
.card-copy { display: grid; align-content: start; gap: .22rem; padding: .84rem 1rem 1rem; }
.card-kicker { color: #5c6253; font-size: .88rem; }
.card-title { font-family: Georgia, serif; font-size: clamp(1.25rem, 2.5vw, 1.87rem); font-weight: 500; line-height: 1.13; letter-spacing: -.035em; overflow-wrap: anywhere; }
.card-meta { margin-top: .35rem; font-size: .88rem; color: var(--muted); }
.card-art { height: 130px; position: relative; overflow: hidden; display: grid; place-items: center; background: #dbd8ca; }
.card-art img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.featured-cards .card-button { display: grid; grid-template-columns: 42% 58%; min-height: 145px; }
.featured-cards .card-art { height: 100%; min-height: 145px; }
.featured-cards .card-copy { align-content: center; padding: 1.1rem 1.25rem; }
.reel-art { background: radial-gradient(ellipse at 39% 80%,#c1b18e,#e6dfcb 82%); }
.reel-art.green { background: radial-gradient(ellipse at 43% 82%,#8b8f70,#d3d3ba 79%); }
.reel-art.rose { background: radial-gradient(ellipse at 43% 82%,#ae8378,#dec0b4 79%); }
.cover { position: absolute; z-index: 1; width: 100px; height: 100px; left: 17%; top: calc(50% - 46px); background: #765c41; border-radius: 2px; transform: rotate(-7deg); box-shadow: 7px 12px 20px #17160d68, inset 0 0 0 2px #ffffff2b; overflow: hidden; }
.green .cover { background: #e8d1a0; }
.rose .cover { background: #531e23; }
.cover i, .cover b, .cover em { position: absolute; border-radius: 50%; opacity: .87; }
.cover i { background: #d99149; inset: 10% 10% 21% 16%; }
.cover b { background: #363f30; inset: 24% 22% 11% 21%; }
.cover em { background: #edc084; inset: 30% 25% 20% 44%; mix-blend-mode: screen; }
.green .cover i { background: #386147; }
.green .cover b { background: #bd552a; }
.rose .cover i { background: #db9a55; }
.rose .cover b { background: #8a3936; }
.small-spool { position: absolute; width: 96px; height: 96px; left: 45%; top: calc(50% - 50px); border-radius: 50%; border: 5px solid #6e6351; transform: rotate(15deg); box-shadow: 5px 6px 11px #31271c68; background: radial-gradient(circle,#201b17 0 13%,#c1ae8b 14% 24%,transparent 26%), conic-gradient(#3c3429 0 50deg,#baad93 52deg 120deg,#3c3429 122deg 172deg,#baad93 174deg 240deg,#3c3429 242deg 292deg,#baad93 294deg); }
.deck-art { background: radial-gradient(ellipse at 50% 82%,#9c917b,#ddd8c9 73%); }
.deck { width: 110px; height: 91px; position: relative; border-radius: 3px; background: linear-gradient(90deg,#735138 0 7%,#45423c 7% 93%,#735138 93%), #45423c; border: 1px solid #493d30; box-shadow: 13px 11px 16px #40331d59; transform: rotate(-4deg); }
.revox .deck { background: #777771; border: 3px solid #393a34; }
.deck i { position: absolute; width: 39%; aspect-ratio: 1; top: 7%; left: 10%; border-radius: 50%; border: 2px solid #b7b6a9; background: radial-gradient(circle,#211e19 0 14%,#d2cbb8 15% 24%,transparent 26%), conic-gradient(#302c24 0 54deg,#acaa9b 56deg 120deg,#302c24 122deg 175deg,#acaa9b 177deg 240deg,#302c24 242deg 295deg,#acaa9b 297deg); }
.deck i:nth-child(2) { left: 51%; transform: rotate(35deg); }
.deck b { position: absolute; top: 56%; left: 17%; right: 17%; height: 12%; border: 1px solid #5f5b4f; background: repeating-linear-gradient(90deg,#282420 0 7%,#abb0a5 8% 14%,#282420 15% 17%); }
.deck em { position: absolute; top: 74%; height: 17%; left: 15%; right: 15%; background: linear-gradient(90deg,#6f6e63 0 39%,#322d25 40% 57%,#6f6e63 58%); border-block: 1px solid #a9a18a; }

.button { display: inline-flex; justify-content: center; align-items: center; min-height: 40px; padding: .5rem .85rem; border-radius: 4px; border: 1px solid #b6b6a5; background: var(--panel); color: var(--ink); text-decoration: none; font-weight: 650; font-size: .88rem; }
.button:hover { border-color: #7c785a; background: #f4efe1; }
.button-primary { background: #eec57f; color: #281c0d; border-color: #be9757; }
.button-primary:hover { background: #f6d598; }
.filters { display: flex; flex-wrap: wrap; gap: .85rem; padding: 1rem; background: #efede2; border: 1px solid var(--border); border-radius: 5px; }
label, .filters label { display: grid; gap: .35rem; font-weight: 650; font-size: .88rem; }
.filter-search { min-width: min(300px, 100%); flex: 1 1 300px; }
input:not([type=checkbox]), select, textarea { min-width: 0; }
.filters input, .filters select, .dialog-form input:not([type=checkbox]), .dialog-form select, textarea {
  color: var(--ink); border: 1px solid #c3c1b2; background: #fffdf7; border-radius: 4px; padding: .56rem .64rem; font-weight: 400;
}
textarea { resize: vertical; }
select { min-height: 40px; }
.result-count { margin: 1.12rem 0 .75rem; color: var(--muted); font-size: .9rem; }
.empty { background: var(--panel); border: 1px solid var(--border); border-radius: 5px; padding: 2rem; margin-top: 1rem; }
.empty h2 { font-family: Georgia, serif; font-weight: 400; font-size: 1.75rem; letter-spacing: -.04em; }
.empty p { margin-top: .4rem; color: var(--muted); }
.empty .button { margin-top: 1rem; }
.shelf-nav { display: flex; gap: .5rem; margin-bottom: 1rem; }
.shelf-nav a { text-decoration: none; padding: .57rem .85rem; border: 1px solid var(--border); border-radius: 4px; }
.shelf-nav a[aria-current] { background: #e6e4d5; border-color: #a7a798; }
.site-footer { background: var(--dark-deep); color: #e2e5d9; }
.footer-inner { min-height: 78px; font-size: .9rem; }
.footer-inner > span { color: #b6bdaf; }

dialog { background: var(--panel); border: 1px solid #d1cebf; border-radius: 8px; color: var(--ink); width: min(760px, calc(100% - 1.5rem)); max-height: calc(100vh - 2rem); padding: 0; box-shadow: 0 20px 70px #171b1860; }
dialog::backdrop { background: #181f19a8; }
.dialog-inner { padding: clamp(1.15rem, 4vw, 2.25rem); position: relative; }
.close-button { position: absolute; top: .85rem; right: .85rem; background: #eeece1; border: 1px solid var(--border); border-radius: 50%; width: 36px; height: 36px; color: var(--ink); font-size: 1.45rem; line-height: 1; }
.close-button:hover { background: #e5dec8; }
dialog h2 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.055em; margin: 0 2.2rem .7rem 0; line-height: 1.03; }
dialog h2:focus { outline: none; }
dialog h3 { margin: 1.25rem 0 .55rem; font-size: 1.19rem; }
.dialog-form { display: grid; gap: .95rem; margin-top: 1rem; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: .54rem; align-items: center; }
.detail-actions { margin-block: 1.1rem; }
.dialog-form fieldset { border: 1px solid var(--border); border-radius: 4px; padding: .7rem .8rem; margin: 0; }
.dialog-form legend, summary { font-size: .94rem; font-weight: 700; }
.choices { display: flex; flex-wrap: wrap; gap: .45rem .9rem; }
.check { display: flex; align-items: center; gap: .45rem; min-height: 34px; }
.check input { accent-color: #75552d; width: 17px; height: 17px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.dialog-form details { background: #f3f0e6; border: 1px solid var(--border); border-radius: 4px; padding: .7rem .8rem; }
summary { cursor: pointer; }
details .field-grid { margin-top: .65rem; }
.photo-field { min-width: 0; }
.form-error:empty { display: none; }
.form-error { color: #8e2524; }
.detail-kicker { color: var(--muted); text-transform: capitalize; font-size: .91rem; margin-bottom: .25rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(135px,1fr)); margin: .65rem 0 0; border: 1px solid var(--border); border-radius: 4px; background: #f3f1e8; padding: .65rem; gap: .65rem; }
.facts div { padding: .3rem .4rem; }
.facts dt { color: var(--muted); font-size: .86rem; }
.facts dd { margin: .24rem 0 0; font-weight: 650; }
.detail-note { margin-top: .75rem; color: #55584a; line-height: 1.55; white-space: pre-wrap; }
.release-tracks { margin: .4rem 0 0; padding: 0; list-style: none; }
.release-tracks li { display: grid; grid-template-columns: 3rem 1fr auto; gap: .55rem; border-bottom: 1px solid var(--border); padding: .4rem 0; font-size: .92rem; }
.track-position, .track-duration, .track-credits { color: var(--muted); }
.track-duration { font-variant-numeric: tabular-nums; }
.track-credits { display: block; margin-top: .2rem; font-size: .83rem; }
.release-pairs { margin: 0; }
.release-pairs div { display: grid; grid-template-columns: minmax(8rem, 1fr) 1.6fr; gap: .6rem; padding: .38rem 0; border-bottom: 1px solid var(--border); }
.release-pairs dt { color: var(--muted); }
.release-pairs dd { margin: 0; overflow-wrap: anywhere; }
.related-versions { padding: 0; display: flex; flex-wrap: wrap; list-style: none; gap: .4rem; }
.track-editor-row, .document-editor-row { display: grid; gap: .55rem; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.track-editor-fields { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) 5.25rem; gap: .5rem; }
.track-editor-row details { background: var(--panel); }
.remove-track, .remove-document { justify-self: end; min-height: 32px; font-size: .8rem; }
.add-track, .add-document { margin-top: .65rem; }
.document-meta { color: var(--muted); font-size: .88rem; }
.references { margin: 0; padding-left: 1.2rem; color: #604523; }
.references li + li { margin-top: .25rem; }
.item-photos { display: grid; grid-template-columns: repeat(auto-fit,minmax(115px,1fr)); gap: .65rem; margin-bottom: .85rem; }
.item-photos img { width: 100%; height: 145px; object-fit: contain; background: #eae8dd; border-radius: 4px; }
.item-photos figcaption { font-size: .85rem; color: var(--muted); }
.admin-panel { width: min(100%, 35rem); margin: 1rem 0 2rem; }
.admin-panel .dialog-actions { margin-top: 1rem; }
.editor-link { font-size: .94rem; text-underline-offset: .18em; }
.upload-help { color: var(--muted); line-height: 1.5; }
.detail-actions { margin-bottom: 1rem; }
.notification:empty { display: none; }
.notification { position: fixed; bottom: 1rem; right: 1rem; color: #fffbef; background: #243123; border-radius: 4px; padding: .65rem .95rem; z-index: 5; max-width: calc(100% - 2rem); box-shadow: 0 3px 15px #171b1855; }

@media (max-width: 920px) {
  .header-inner { flex-wrap: wrap; column-gap: 1rem; row-gap: 0; padding: .68rem 0 .28rem; }
  .main-nav { order: 3; margin-top: .15rem; width: 100%; }
  .user-nav { margin-left: auto; }
  .hero-inner { min-height: 410px; }
  .hero-art { right: -5%; }
  .art-spool-front { top: 16%; }
  .cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .shell { width: calc(100% - 1.5rem); }
  .header-inner { min-height: 72px; }
  .brand { font-size: .92rem; gap: .44rem; }
  .brand-mark { width: 22px; height: 22px; }
  .brand-mark::after { inset: 6px; }
  .main-nav { gap: .55rem; flex-wrap: wrap; }
  .main-nav a, .user-nav a { font-size: .79rem; }
  .user-nav { gap: .48rem; }
  .account-button { font-size: .78rem; }
  .hero-inner { display: block; min-height: 0; }
  .hero-copy { padding: 2.35rem .15rem 2.4rem; }
  .hero h1 { font-size: clamp(4.3rem,17vw,6rem); }
  .hero-copy p { max-width: 17rem; }
  .hero-art { width: 85%; right: -15%; opacity: .56; }
  .art-spool-back { top: 30%; }
  .featured-cards { grid-template-columns: 1fr; }
  .card-copy, .featured-cards .card-copy { padding: .7rem .6rem; }
  .cards { gap: .65rem; }
  .card-art { height: 105px; }
  .featured-cards .card-art, .featured-cards .card-button { min-height: 122px; }
  .browse-section { padding-top: 1.8rem; }
  .field-grid { grid-template-columns: 1fr; }
  .track-editor-fields { grid-template-columns: 3.6rem minmax(0, 1fr) 4.5rem; }
  .filter-search { min-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
