:root {
  color-scheme: dark;
  --paper: #0c1018;
  --panel: #141a25;
  --line: #293243;
  --text: #f2f4f7;
  --muted: #a5b0c3;
  --accent: #aff8cf;
  font-family: "Segoe UI", Inter, system-ui, sans-serif;
  background: var(--paper);
  color: var(--text);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { margin-inline: auto; width: min(100% - 56px, 1200px); }
.topbar { border-bottom: 1px solid var(--line); background: #101520; }
.topbar-inner { min-height: 73px; display: flex; gap: 34px; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.brand-light { color: var(--muted); font-weight: 500; }
nav { display: flex; gap: 27px; margin-inline-start: auto; color: var(--muted); font-size: 15px; }
nav a:hover, footer a:hover { color: var(--accent); }
.bag-button, .secondary { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 9px; padding: 10px 13px; }
.bag-button span { display: inline-grid; place-items: center; min-width: 23px; min-height: 23px; border-radius: 5px; margin-inline-start: 5px; background: #263a36; color: var(--accent); font-size: 12px; }
.hero { position: relative; min-height: 535px; display: flex; align-items: center; background: #132538 url("/assets/hero.jpg") center 54% / cover no-repeat; isolation: isolate; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #0c1018f5 1%, #0c1018e3 25%, #0c101873 62%, #171d300a), linear-gradient(0deg, #0c1018b8, transparent 42%); }
.hero-inner { padding-block: 62px 72px; }
.eyebrow { color: var(--accent); font-size: 12px; letter-spacing: .18em; font-weight: 750; margin: 0 0 15px; }
.eyebrow span { display: inline-block; width: 7px; height: 7px; margin-inline-end: 7px; border-radius: 50%; background: var(--accent); }
h1 { font-size: clamp(59px, 8.8vw, 123px); line-height: .91; letter-spacing: -.075em; margin: 0; }
.lede { margin: 24px 0 29px; color: #d1dbe9; font-size: 18px; line-height: 1.55; max-width: 390px; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 17px; border: 1px solid transparent; border-radius: 9px; background: var(--accent); color: #10241b; font-size: 15px; font-weight: 700; padding: 12px 17px; }
.primary:hover { background: #d0ffe2; }
.hero-credit { position: absolute; right: max(28px, (100% - 1200px) / 2); bottom: 13px; color: #d1dbe9; font-size: 11px; letter-spacing: .1em; }
.library { padding-block: 63px 75px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 22px; margin-bottom: 26px; }
h2 { font-size: clamp(32px, 5vw, 47px); line-height: 1.06; letter-spacing: -.045em; margin: 0; }
.search { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; min-width: min(100%, 290px); padding-inline: 14px; }
.search:focus-within { border-color: var(--accent); }
.search input { color: var(--text); min-width: 0; width: 100%; border: 0; background: transparent; padding: 12px 1px; outline: 0; }
.search input::placeholder { color: var(--muted); }
.search-icon { flex: 0 0 12px; height: 12px; border: 1.5px solid var(--muted); border-radius: 50%; position: relative; }
.search-icon::after { content: ""; width: 5px; height: 1.5px; background: var(--muted); position: absolute; right: -4px; bottom: -2px; transform: rotate(45deg); }
.filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.categories { display: flex; flex-wrap: wrap; gap: 8px; }
.category, .sort select { padding: 8px 13px; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 7px; font-size: 14px; }
.sort select { background: var(--panel); }
.category:hover, .category.active { background: #253b36; border-color: #345548; color: var(--accent); }
.results { color: var(--muted); font-size: 14px; margin: 18px 0 12px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.card { overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; }
.card:hover { border-color: #5b8274; }
.card-image { display: block; position: relative; width: 100%; padding: 0; border: 0; background: #1c293d; }
.card-image img { display: block; width: 100%; height: auto; aspect-ratio: 1.61; object-fit: cover; }
.badge { position: absolute; top: 11px; left: 11px; border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #e6f0f8; padding: 6px 8px; background: #111b29e9; }
.card-body { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px; }
.asset-link { display: block; padding: 0; border: 0; text-align: left; font-size: 17px; font-weight: 700; color: var(--text); background: transparent; }
.asset-link:hover { color: var(--accent); }
.asset-meta { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.save { border: 1px solid var(--line); background: #1c2635; width: 37px; height: 37px; border-radius: 8px; color: var(--accent); font-size: 22px; }
.save[aria-pressed="true"] { background: #253b36; }
.empty { grid-column: 1 / -1; min-height: 130px; display: grid; place-items: center; border: 1px dashed var(--line); color: var(--muted); border-radius: 12px; text-align: center; padding: 20px; }
footer { background: #101520; border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 35px; padding-block: 38px; }
footer .brand { color: var(--text); } footer p, footer a { font-size: 14px; }
dialog { color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 15px; padding: 0; max-width: min(700px, 100% - 32px); max-height: 90dvh; }
dialog::backdrop { background: #02040bbd; backdrop-filter: blur(4px); }
.asset-modal, .bag-modal { position: relative; }
.asset-modal > img, .asset-modal video { width: 100%; max-height: 49vh; display: block; object-fit: contain; background: #080d16; }
.asset-modal audio { display: block; width: calc(100% - 48px); margin: 18px auto 0; }
.detail-body, .bag-modal { padding: 24px; }
.detail-body > p:not(.eyebrow), #bag-summary { color: var(--muted); line-height: 1.55; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 19px; }
.close { position: absolute; z-index: 1; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 9px; font-size: 23px; color: var(--text); background: #0c1018ed; border: 1px solid var(--line); }
.bag-modal { min-width: min(450px, 100vw - 36px); padding-top: 33px; }
.bag-list { display: grid; gap: 8px; }
.bag-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-block: 10px; }
.bag-row a { color: var(--accent); }
.toast { position: fixed; z-index: 3; right: 22px; bottom: 18px; margin: 0; padding: 12px 15px; color: var(--accent); background: #20332e; border: 1px solid #3d6759; border-radius: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 850px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero { min-height: 460px; } }
@media (max-width: 550px) {
  .shell { width: calc(100% - 32px); }
  .topbar-inner { gap: 12px; min-height: 61px; justify-content: space-between; }
  .topbar nav { display: none; }
  .hero { min-height: 445px; background-position: 60% center; }
  .hero-inner { padding-block: 53px 63px; }
  .hero-credit { right: 16px; }
  .library { padding-block: 40px 50px; }
  .section-head { display: grid; gap: 15px; }
  .grid { gap: 10px; }
  .card-body { padding: 10px; }
  .asset-link { font-size: 15px; }
  .asset-meta { font-size: 12px; }
  .save { flex: 0 0 30px; width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
