:root {
  color-scheme: light;
  --bg: #FFF8F0;
  --beige: #F1E5D8;
  --rose: #EBCFD3;
  --pink: #C78F98;
  --sage: #BCCBB7;
  --taupe: #A28D82;
  --ink: #503D35;
  --muted: #6D574D;
  --accent: #874C57;
  --accent-deep: #70404A;
  --line: #E2D2C4;
  --control-line: #A28D82;
  --surface: #FFFBF7;
  --shadow: 0 7px 22px #6649380d, 0 2px 6px #66493808;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
button, input, textarea, select { font: inherit; }
button, input, select, textarea {
  border: 1px solid var(--control-line);
  border-radius: 10px;
  color: inherit;
  background: var(--surface);
}
button {
  cursor: pointer;
  min-height: 42px;
  padding: .6rem .9rem;
  transition: background .16s, border-color .16s, box-shadow .16s, transform .16s;
}
button:hover { background: var(--beige); border-color: var(--taupe); }
button:disabled { opacity: .58; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
}
input, select, textarea { width: 100%; min-width: 0; min-height: 44px; padding: .59rem .72rem; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--accent); }
textarea { min-height: 6rem; resize: vertical; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 10px; }
legend { font-weight: 650; }
a { color: var(--accent-deep); text-underline-offset: .15em; }
em { color: var(--accent); font-weight: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; }
h1 { font-size: clamp(2.6rem, 6vw, 5.3rem); letter-spacing: -.055em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -.035em; }
h3 { font-size: 1.27rem; }
small, .muted { color: var(--muted); }
p + p { margin-top: .65rem; }

header { border-bottom: 1px solid var(--line); background: var(--surface); }
main, footer, .top { max-width: 1450px; margin: auto; padding-inline: clamp(15px, 4vw, 60px); }
main { min-height: 75vh; padding-block: 27px 62px; }
footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-block: 23px max(23px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: .83rem;
}
.top { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; white-space: nowrap; font: 1.33rem var(--serif); }
.brand:hover { background: transparent; }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
.top nav { display: flex; gap: 3px; overflow-x: auto; padding: 4px; scrollbar-width: thin; scrollbar-color: var(--taupe) transparent; }
.top nav button { white-space: nowrap; padding: .46rem .68rem; border: 0; background: none; color: var(--muted); font-size: .87rem; }
.top nav button:hover { background: var(--beige); color: var(--ink); }
.top nav button[aria-current=page] { color: var(--ink); background: var(--sage); font-weight: 680; }
.primary { background: var(--pink); color: #382820; font-weight: 720; border-color: transparent; }
.primary:hover { color: #382820; background: #D7A6AE; border-color: var(--pink); box-shadow: var(--shadow); }
.skip { position: absolute; left: 8px; top: -100px; z-index: 4; background: var(--surface); }
.skip:focus { top: 8px; }
#update { white-space: nowrap; font-size: .85rem; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 362px;
  border: 1px solid #DCC6B8;
  border-radius: 24px;
  background: radial-gradient(ellipse at 87% 47%, #EBCFD3 0%, #F1E5D8 42%, #FFF8F0 75%);
  box-shadow: 0 14px 36px #66493813;
}
.hero-content { position: relative; z-index: 1; width: min(660px, 71%); padding: clamp(24px, 4.5vw, 62px); }
.kicker { margin-bottom: 14px; color: var(--accent-deep); font-size: .73rem; letter-spacing: .19em; text-transform: uppercase; font-weight: 760; }
.hero p:not(.kicker) { color: var(--muted); margin: 15px 0 23px; }
.hero-search { display: flex; gap: 8px; max-width: 550px; }
.hero-search input { background: var(--surface); border-color: var(--taupe); min-height: 49px; }
.art { position: absolute; inset: 0 0 0 48%; pointer-events: none; overflow: hidden; }
.art::before {
  content: '';
  position: absolute;
  inset: 6% 3% 6% 1%;
  border: 1px solid #A28D8252;
  border-radius: 45% 45% 18% 18%;
  transform: rotate(-12deg);
  opacity: .58;
}
.reel {
  position: absolute;
  right: 12%;
  top: 4%;
  width: min(28vw, 350px);
  aspect-ratio: 1;
  border: 6px double #A28D82;
  border-radius: 50%;
  transform: rotate(-16deg);
  background:
    repeating-radial-gradient(circle, #A28D8230 0 1px, transparent 2px 6px),
    radial-gradient(circle, #FFF8F0, #EBCFD3 70%, #C78F98);
  box-shadow: 0 0 0 9px #C78F982e, 0 18px 34px #503D3525, inset 0 0 28px #A28D8250;
}
.reel b {
  position: absolute;
  width: 24%;
  height: 24%;
  left: 38%;
  top: 38%;
  border-radius: 50%;
  border: 1px solid #8B7163;
  background: radial-gradient(ellipse at 60% 75%, #F1E5D8, #A28D82);
  transform: rotate(var(--r)) translateY(-113%);
  box-shadow: inset 0 5px 13px #503D3538, 0 1px 2px #FFF8F0;
}
.reel::after { content: ''; position: absolute; inset: 44%; border: 2px solid #A28D82; border-radius: 50%; background: var(--sage); }
.film {
  position: absolute;
  right: -17%;
  bottom: 10%;
  width: 110%;
  height: 17%;
  transform: rotate(-16deg);
  border: 1px solid #A28D82;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, #F1E5D8d9 0 62px, #A28D8290 63px 65px);
  box-shadow: 0 5px 14px #503D3521;
}
.film::before, .film::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, #A28D82 0 6px, #FFF8F0 6px 13px, #A28D82 13px 18px);
}
.film::before { top: 1px; }
.film::after { bottom: 1px; }

.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 23px 0 33px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.metric { padding: 14px 17px; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric strong { display: block; color: var(--accent); font: 2.05rem var(--serif); }
.metric span { color: var(--muted); font-size: .82rem; }
.section { margin-top: 33px; }
.section-title, .page-head, .toolbar, .actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.section-title, .page-head { margin-bottom: 16px; }
.page-head h1 { font-size: clamp(2.5rem, 5vw, 4.2rem); }
.actions { justify-content: flex-start; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { min-height: 36px; padding: .35rem .75rem; border-color: transparent; border-radius: 999px; background: var(--beige); color: var(--ink); font-size: .85rem; }
.chip:hover { background: var(--rose); }
.chip.active, [data-action=view][aria-pressed=true] { border-color: #839780; background: var(--sage); color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }
.grid.home { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border-color: var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
}
.card:hover { transform: translateY(-3px); border-color: var(--pink); background: var(--surface); box-shadow: 0 12px 24px #6649381c; }
.cover {
  --paper: #EBCFD3;
  display: grid;
  position: relative;
  place-items: center;
  overflow: hidden;
  width: 100%;
  flex: none;
  aspect-ratio: 2 / 2.42;
  color: var(--ink);
  background: radial-gradient(ellipse at 50% 43%, #FFF8F0bf, transparent 74%), var(--paper);
  border-bottom: 1px solid #A28D8252;
}
.card:nth-child(3n + 2) .cover { --paper: #D6E0D0; }
.card:nth-child(3n) .cover { --paper: #F1E5D8; }
.cover::before, .cover::after { content: ''; position: absolute; border: 1px solid #A28D82a6; border-radius: 48% 48% 10% 10%; }
.cover::before { inset: 9%; }
.cover::after { inset: 13%; border-color: #A28D826b; }
.cover-symbol { z-index: 1; font-size: 1.8rem; line-height: 1.2; text-align: center; }
.cover-symbol small { display: block; margin-top: 5px; font: 650 10px var(--sans); letter-spacing: .14em; color: var(--ink); }
.cover img { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; }
.cover img[hidden] { display: none; }
.heart { position: absolute; z-index: 3; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--bg); color: var(--accent-deep); text-align: center; line-height: 28px; }
.card-text { display: block; padding: 11px 12px 13px; }
.card-text strong { display: block; font-family: var(--serif); font-size: 1.11rem; overflow-wrap: anywhere; line-height: 1.24; }
.card-text small { display: block; margin-top: 5px; }
.grid.list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.list .card { flex-direction: row; align-items: center; }
.list .cover { width: 54px; flex: none; border-bottom: 0; }
.list .cover-symbol { font-size: 1rem; }
.list .cover-symbol small { display: none; }

.panel { min-width: 0; padding: clamp(14px, 2.4vw, 24px); border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.panel h3 { margin-bottom: 10px; }
.panel > * + * { margin-top: 12px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; margin-top: 13px; }
.filters label, label.field { display: grid; gap: 4px; align-content: start; color: var(--muted); font-size: .87rem; }
.filter-box { margin-block: 14px; }
.filter-box > label { display: block; margin-top: 12px; }
.toolbar { margin: 13px 0; }
.spotlight { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; background: linear-gradient(110deg, #FFF8F0, #EBCFD3); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bar { display: grid; grid-template-columns: minmax(85px, 1fr) 1.2fr 28px; align-items: center; gap: 9px; margin-top: 9px; font-size: .85rem; }
.bar span { overflow-wrap: anywhere; }
.bar meter { width: 100%; height: .85rem; accent-color: var(--sage); }
meter::-webkit-meter-optimum-value { background: var(--sage); border-radius: 6px; }
meter::-webkit-meter-bar { background: var(--beige); border: 0; }
meter::-moz-meter-bar { background: var(--sage); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .87rem; }
th, td { padding: 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink); background: var(--beige); }
.review-buttons { margin-top: 12px; }
.empty { padding: 18px; border: 1px dashed var(--taupe); border-radius: 10px; color: var(--muted); }

dialog {
  width: min(840px, calc(100% - 24px));
  max-height: 88vh;
  max-height: 88dvh;
  overflow: auto;
  border: 1px solid var(--taupe);
  border-radius: 19px;
  background: var(--bg);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 24px 70px #503D3545;
}
dialog::backdrop { background: #503D3565; }
.modal-top { position: sticky; top: 0; z-index: 6; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--beige); }
.modal-top h2 { overflow-wrap: anywhere; }
.icon { min-width: 44px; min-height: 44px; padding: 0 9px; font-size: 1.45rem; }
#modal-body { padding: 18px 20px 24px; }
.detail-lead { display: grid; grid-template-columns: minmax(100px, 165px) minmax(0, 1fr); gap: 17px; }
.detail-lead .cover { align-self: start; border: 1px solid var(--line); border-radius: 12px; }
.detail-lead dl { margin: 0; }
.detail-lead dd { margin-bottom: 8px; }
.detail-lead h3 { margin: 5px 0; }
.stack { display: grid; gap: 12px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wide { grid-column: 1 / -1; }
dt { color: var(--accent-deep); font-size: .86rem; font-weight: 750; }
dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.detail-banner { display: block; width: 100%; max-height: 240px; margin-bottom: 12px; border-radius: 12px; object-fit: cover; }
details summary { cursor: pointer; }
details.panel > summary, .filter-box summary { color: var(--accent-deep); font-weight: 650; }
.credits img { display: block; width: 90px; margin: 10px 0; }
.check { display: flex; gap: 8px; align-items: start; }
.candidate { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 9px; border-bottom: 1px solid var(--line); }
#toast { position: fixed; bottom: max(15px, env(safe-area-inset-bottom)); left: 50%; z-index: 10; width: max-content; max-width: calc(100vw - 24px); padding: 10px 14px; transform: translateX(-50%); border: 1px solid var(--taupe); border-radius: 11px; background: var(--sage); color: var(--ink); box-shadow: var(--shadow); }
#toast:empty { display: none; }
.message { color: var(--accent-deep); white-space: pre-wrap; overflow-wrap: anywhere; }
.review-list { max-height: 250px; overflow: auto; }
.danger { color: var(--accent-deep); }
.digital-file + .digital-file { border-top: 1px solid var(--line); padding-top: 12px; }
.digital-file .actions { margin-top: 8px; }
.digital-path { overflow-wrap: anywhere; white-space: normal; }
.digital-preview { display: grid; gap: 10px; max-height: 52vh; overflow: auto; padding: 3px; }
.digital-player { width: 100%; max-height: 55dvh; background: var(--ink); }
#public-progress progress { width: 100%; height: 1rem; accent-color: var(--sage); }

@media (max-width: 930px) {
  .top { flex-wrap: wrap; padding-block: 10px 6px; }
  .top nav { order: 3; width: 100%; }
  .grid.home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .metric:nth-child(4) { border-left: 0; }
}
@media (max-width: 560px) {
  main { padding-top: 16px; }
  .hero { min-height: 300px; border-radius: 18px; }
  .hero-content { width: 100%; }
  .hero h1 { font-size: clamp(2.4rem, 10.1vw, 3.8rem); max-width: 9em; }
  .art { inset-inline-start: 39%; opacity: .26; }
  .reel { width: 52vw; right: 4%; top: 12%; }
  .film { bottom: 15%; }
  .hero-search { flex-wrap: wrap; }
  .hero-search input { flex: 1 1 165px; }
  .metrics { margin-block: 14px 22px; }
  .metric { padding: 11px; }
  .metric strong { font-size: 1.63rem; }
  .metric span { font-size: .79rem; }
  .grid, .grid.home { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .two, .spotlight, .fields { grid-template-columns: minmax(0, 1fr); }
  .detail-lead { grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
  #modal-body { padding: 13px; }
  .modal-top { padding: 11px 13px; }
  .brand { gap: 7px; font-size: 1.11rem; }
  .brand img { width: 35px; height: 35px; }
  #update { padding: .48rem .59rem; }
  input, select, textarea, .filters label input, label.field select { font-size: 16px; }
  .chip { min-height: 40px; }
}
@media (max-width: 360px) {
  .top { column-gap: 6px; }
  #update { padding-inline: .43rem; font-size: .76rem; }
  .hero-search input { flex-basis: 140px; }
}
@media (max-width: 460px) {
  .top nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; overflow: visible; padding: 2px 0 0; }
  .top nav button { min-height: 44px; padding: .35rem .2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

