:root {
  color-scheme: light;
  --ink: #172a24;
  --green: #194b3b;
  --dark: #11392d;
  --accent: #8c3429;
  --gold: #e5ad56;
  --paper: #f7f5ee;
  --surface: #fffefa;
  --muted: #586860;
  --line: #dbe1d7;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 86px; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 system-ui, "Noto Sans SC", sans-serif; }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; }
button, input, select { color: inherit; font: inherit; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #9a5140; outline-offset: 3px; }
.wrap { width: min(1220px, calc(100% - 56px)); margin-inline: auto; }
header { position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); }
nav { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; gap: 8px; align-items: center; text-decoration: none; }
.brand img { height: 39px; width: auto; display: block; object-fit: contain; }
.brand span { color: #65756d; font-size: .8rem; }
.nav-tools { display: flex; align-items: center; gap: 18px; }
.navlink { text-decoration: none; font-size: .9rem; font-weight: 700; }
.navlink:hover { color: var(--accent); }
.icon, .clip, .action {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px;
  border: 1px solid var(--line); border-radius: 11px; padding: 8px 12px;
  background: var(--surface); text-decoration: none; line-height: 1;
}
.icon { position: relative; font-size: 1.22rem; }
.icon-open::before { content: ''; width: 11px; height: 11px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translate(-2px, 2px); }
.icon-open::after { content: ''; position: absolute; width: 8px; height: 8px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: translate(2px, -2px); }
.icon:hover, .clip:hover { background: #edf2e9; }
.hero { border-bottom: 1px solid #d9dfd4; background: radial-gradient(ellipse at 84% 50%, #f4e2b4, transparent 42%), #e8efe4; }
.hero-inner { display: grid; grid-template-columns: 1fr .88fr; align-items: center; gap: 28px; padding-block: clamp(32px, 6vw, 80px); }
.hero h1 { font-size: clamp(2rem, 5.4vw, 4.6rem); line-height: 1.01; letter-spacing: -.045em; margin: 0; color: var(--dark); text-wrap: balance; }
.hero-brand { display: flex; align-items: center; justify-content: center; gap: clamp(9px, 3vw, 28px); }
.hero-brand img { height: clamp(110px, 17vw, 220px); width: auto; max-width: 44%; object-fit: contain; }
.hero-brand span { color: var(--green); font-size: 1.1rem; opacity: .66; }
.festivals { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(17px, 3vw, 29px); }
.festival { display: inline-flex; align-items: center; gap: 6px; background: #fffefa; border: 1px solid #cddacc; border-radius: 999px; padding: 5px 11px; font-size: .83rem; white-space: nowrap; font-weight: 650; }
.catalog { padding-block: 33px 55px; }
.catalog h2 { margin: 0; line-height: 1.12; font-size: clamp(1.55rem, 3vw, 2.35rem); letter-spacing: -.035em; }
.catalog-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.count { margin: 0; color: var(--muted); font-size: .88rem; text-align: right; }
.filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; margin-bottom: 20px; }
.filters label { min-width: 0; display: grid; gap: 4px; font-size: .83rem; font-weight: 700; }
.filters input,.filters select { min-width: 0; width: 100%; min-height: 46px; border: 1px solid #cbd5ca; border-radius: 11px; padding: 8px 11px; background: var(--surface); font-weight: 450; font-size: 1rem; }
.filters input::placeholder { color: #65746b; }
.grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 17px; }
.card { display: grid; grid-template-rows: auto 1fr; padding: 0; min-width: 0; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: box-shadow .16s, transform .16s; }
@media (hover: hover) { .card:hover { transform: translateY(-2px); box-shadow: 0 9px 26px #19372b18; } }
.media,.photo { display: grid; place-items: center; position: relative; aspect-ratio: 1; overflow: hidden; background: #efeee6; }
.media img,.photo img { width: 100%; height: 100%; min-height: 0; object-fit: contain; grid-area: 1/1; }
.placeholder { grid-area: 1/1; color: var(--muted); font-size: .8rem; padding: 12px; text-align: center; }
.body { min-width: 0; padding: 11px 13px 14px; display: grid; gap: 4px; align-content: start; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.code { font-size: .83rem; color: var(--accent); font-weight: 800; letter-spacing: .07em; }
.name { font-size: .96rem; font-weight: 740; line-height: 1.38; overflow-wrap: anywhere; }
.flag { color: var(--green); font-size: .67rem; }
.action { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 23px auto 0; padding-inline: 17px; background: var(--green); color: #fff; }
footer { border-top: 1px solid var(--line); background: #eff1e9; padding: 25px 0; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: var(--muted); font-size: .9rem; }
dialog { color: var(--ink); border: 1px solid var(--line); border-radius: 22px; padding: 0; max-width: none; background: var(--surface); box-shadow: 0 20px 80px #0d261f50; }
dialog::backdrop { background: #0b211dc4; }
#detail { width: min(730px,calc(100% - 28px)); max-height: min(90dvh, 860px); overflow: hidden; }
#detail[open] { display: flex; flex-direction: column; }
.dialogbar { display: flex; align-items: center; justify-content: space-between; flex: none; padding: 9px 20px; border-bottom: 1px solid var(--line); background: #edf3ec; }
.dialogbar form { margin: 0; }
.dialogbody { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 23px 28px; overflow-wrap: anywhere; }
.dialogbody h2 { font-size: clamp(1.35rem, 4.3vw, 2rem); margin: 0; line-height: 1.2; }
.dialogbody h3 { margin: 19px 0 11px; font-size: 1.04rem; }
.dialogbody p { margin: 7px 0; }
.dialogbody p:empty { display: none; }
.muted { color: var(--muted); font-size: .87rem; }
.spec { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #f3f5ef; }
.intro { white-space: pre-line; line-height: 1.65; }
.player { display: block; width: 100%; max-height: 48dvh; aspect-ratio: 16/9; background: #14201c; border-radius: 12px; }
.clips,.media-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 9px 0; }
.clip[aria-pressed="true"] { color: #fff; background: var(--green); border-color: var(--green); }
.photos { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.photos figure { margin: 0; min-width: 0; background: #f7f6ef; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.photos .media-actions { margin: 7px; justify-content: flex-end; }
#choose { width: min(410px,calc(100% - 34px)); padding: 27px; text-align: center; max-height: 90dvh; }
#choose h2 { font-size: 1.45rem; line-height: 1.15; margin: 12px 0 18px; }
#choose h2 span { display: block; color: var(--muted); font-size: 1rem; font-weight: 550; margin-top: 5px; }
#choose .brand { justify-content: center; }
#choose .brand img { height: 54px; }
#choose .clips { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; }
#choose .clip { min-height: 49px; color: var(--green); border-color: #9bb4a4; font-weight: 750; }
@media(max-width: 850px) { .grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width: 590px) {
  .wrap { width: calc(100% - 30px); }
  nav { min-height: 61px; }
  .brand { gap: 5px; }
  .brand img { height: 33px; }
  .nav-tools { gap: 9px; }
  .navlink { font-size: .82rem; }
  .hero-inner { grid-template-columns: minmax(0,1fr); text-align: center; gap: 15px; padding-block: 20px 23px; }
  .hero-brand { grid-row: 1; }
  .hero-brand img { height: 88px; }
  .hero h1 { font-size: clamp(1.62rem, 8vw, 2.35rem); }
  .festivals { margin-top: 13px; justify-content: center; gap: 4px; }
  .festival { padding: 4px 7px; gap: 4px; font-size: .7rem; }
  .catalog { padding-block: 24px 40px; }
  .catalog-head { margin-bottom: 12px; }
  .filters { grid-template-columns: minmax(0, 1.35fr) minmax(0,1fr); gap: 8px; margin-bottom: 14px; }
  .filters input,.filters select { font-size: .87rem; padding-inline: 8px; }
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .card { border-radius: 13px; }
  .name { font-size: .86rem; }
  .body { padding: 8px 9px 12px; }
  .dialogbar { padding: 7px 13px; }
  .dialogbody { padding: 15px 14px 21px; }
}
@media(prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }


.catalog-banners { position: relative; width: min(1000px, calc(100% - 56px)); margin-top: 23px; }
.banner-stage { aspect-ratio: 2; border-radius: var(--radius); overflow: hidden; background: #e8efe4; }
.banner-stage img { display: block; width: 100%; height: 100%; object-fit: contain; }
.banner-controls { display: flex; justify-content: flex-end; align-items: center; gap: 6px; padding-top: 6px; }
.banner-count { color: var(--muted); font-size: .8rem; min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
.download-action { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--line); border-radius: 11px; padding: 7px 12px; background: var(--surface); color: var(--green); text-decoration: none; font-size: .85rem; font-weight: 700; }
.download-action:hover { background: #edf2e9; }
@media(max-width: 590px) {
  .catalog-banners { width: calc(100% - 30px); margin-top: 13px; }
  .banner-stage { border-radius: 13px; }
  .catalog-banners + .catalog { padding-top: 13px; }
}
