:root {
  --wine: #5b1426;
  --wine-deep: #3a0c18;
  --gold: #c39a4a;
  --gold-soft: #f2e6c9;
  --paper: #faf6ef;
  --card: #fffdf9;
  --ink: #2a1b1c;
  --muted: #6f5f5c;
  --line: #e6dccb;
  --danger: #a3261f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.55 var(--sans); min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; padding-bottom: 48px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 600; margin: 0 0 8px; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 12px; }
a { color: var(--wine); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 620px; padding-top: 32px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 600; color: var(--gold); margin-bottom: 8px; }
.lede { font-size: 1.1rem; max-width: 60ch; }

/* Header */
.site-header { background: var(--wine-deep); color: var(--paper); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--gold-soft); text-decoration: none; }
.site-header nav { display: flex; gap: 4px 14px; flex-wrap: wrap; order: 3; width: 100%; }
.site-header nav a, .account > a:not(.btn) { color: var(--paper); text-decoration: none; font-size: .95rem; padding: 4px 0; }
.site-header nav a:hover, .account > a:not(.btn):hover { text-decoration: underline; }
.site-header nav a.current { color: var(--gold); border-bottom: 2px solid var(--gold); }
.account { margin-left: auto; display: flex; align-items: center; gap: 12px; }
@media (min-width: 760px) {
  .site-header nav { order: 0; width: auto; }
}

/* Buttons */
.btn {
  display: inline-block; background: var(--wine); color: #fff; border: 1px solid var(--wine);
  border-radius: 6px; padding: 9px 16px; font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--wine-deep); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--wine-deep); padding: 6px 12px; }
.btn-gold:hover { background: var(--gold-soft); }
.btn-ghost { background: transparent; border-color: var(--gold); color: var(--gold-soft); }
.btn-ghost:hover { background: var(--wine); }
.btn-quiet { background: transparent; color: var(--wine); }
.btn-quiet:hover { background: var(--gold-soft); }
.link-btn { background: none; border: 0; padding: 4px 0; font: inherit; color: var(--wine); text-decoration: underline; cursor: pointer; }
.danger { color: var(--danger); }

/* Hero and page heads */
.hero { background: linear-gradient(160deg, var(--wine-deep), var(--wine)); color: var(--paper); padding: 56px 0 48px; }
.hero h1 { max-width: 20em; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.page-head { background: var(--wine-deep); color: var(--paper); padding: 32px 0; margin-bottom: 24px; }
.page-head a { color: var(--gold-soft); }
.page-head .lede { margin-bottom: 0; }

/* Seasonal band */
.season-band { background: var(--gold-soft); padding: 32px 0; border-bottom: 1px solid var(--line); }
.season-band .eyebrow { color: var(--wine); }
.coming-up { margin: 20px 0 0; color: var(--muted); }
.home-section { margin-top: 36px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head p { margin-bottom: 0; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 16px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgb(58 12 24 / .12); }
.card-photo { position: relative; aspect-ratio: 3 / 4; background: #f3ecdf; display: flex; align-items: center; justify-content: center; }
.card-photo img { width: 100%; height: 100%; object-fit: contain; }
.card-venue .card-photo { aspect-ratio: 4 / 3; }
.card-venue .card-photo img { object-fit: cover; }
.placeholder { width: 60%; height: 80%; }
.chip {
  position: absolute; top: 8px; left: 8px; background: rgb(58 12 24 / .88); color: var(--paper);
  font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 99px;
}
.chip-inline { position: static; display: inline-block; margin-bottom: 8px; }
.card-body { padding: 12px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: 4px; overflow-wrap: anywhere; }
.card-body .muted { font-size: .85rem; margin-bottom: 8px; overflow-wrap: anywhere; }
.card-foot { margin: auto 0 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.score { color: var(--wine); white-space: nowrap; }
.score strong { font-size: 1.15rem; font-family: var(--serif); }
.score-empty { color: var(--muted); font-size: .85rem; }

/* Filters */
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pill {
  display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px;
  background: var(--card); color: var(--ink); text-decoration: none; font-size: .9rem;
}
.pill:hover { border-color: var(--wine); }
.pill-on { background: var(--wine); border-color: var(--wine); color: #fff; }
.pill-season { background: var(--gold-soft); border-color: var(--gold); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; align-items: end; margin-bottom: 16px; }
.results-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; margin-top: 16px; }

/* Forms */
label { display: block; font-size: .9rem; font-weight: 600; }
input:not([type=radio], [type=checkbox]), select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 9px 10px; font: 400 1rem var(--sans); color: var(--ink);
  background: #fff; border: 1px solid #cbbfae; border-radius: 6px;
}
.stack > * + * { margin-top: 14px; }
.stack .btn { margin-top: 18px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 14px; }
fieldset { border: 0; padding: 0; margin: 0 0 12px; }
legend { font-size: .9rem; font-weight: 600; padding: 0; margin-bottom: 6px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks legend { width: 100%; }
.checks label { font-weight: 400; display: flex; gap: 6px; align-items: center; font-size: 1rem; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 20px 0; }
.score-options { display: flex; flex-wrap: wrap; gap: 6px; }
.score-options label { position: relative; font-weight: 600; }
.score-options input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.score-options span {
  display: block; min-width: 44px; padding: 9px 6px; text-align: center; border: 1px solid #cbbfae; border-radius: 6px; background: #fff;
}
.score-options input:checked + span { background: var(--wine); border-color: var(--wine); color: #fff; }
.score-options input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.preview[hidden] { display: none; }
.preview img { width: 72px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.alert, .notice { border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.alert { background: #fbe9e7; border: 1px solid #e7b6b1; color: #7a1c16; }
.notice { background: var(--gold-soft); border: 1px solid var(--gold); }
.alert p:last-child, .notice p:last-child { margin-bottom: 0; }

.rusan-fetch { margin-top: 10px; }

/* Item page */
.item { padding-top: 20px; }
.crumbs { font-size: .9rem; }
.item-grid { display: grid; gap: 24px; }
@media (min-width: 820px) { .item-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 40px; } .item-media { position: sticky; top: 76px; align-self: start; } }
.item-cover { background: #f3ecdf; border-radius: 10px; overflow: hidden; display: flex; justify-content: center; align-items: center; min-height: 280px; }
.item-cover img { max-height: 70vh; width: auto; }
.item-cover .placeholder { width: 50%; height: 320px; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.item-info h1 { overflow-wrap: anywhere; }
.big-score { font-size: 1rem; color: var(--wine); margin: 8px 0 12px; }
.big-score strong { font: 600 2.4rem var(--serif); }
.season-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; margin: 0 0 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.description { white-space: pre-line; }
.item-info h2 { margin-top: 24px; }
.ratings { list-style: none; padding: 0; margin: 0; }
.ratings li { border-top: 1px solid var(--line); padding: 12px 0; }
.ratings li p { margin-bottom: 4px; white-space: pre-line; overflow-wrap: anywhere; }
.rating-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.item-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.manage-photos { list-style: none; padding: 0; margin: 12px 0 0; display: flex; gap: 12px; flex-wrap: wrap; }
.manage-photos img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; }
summary { cursor: pointer; font-weight: 600; }

/* Seasons */
.season-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.season-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; text-decoration: none; color: inherit; }
.season-card:hover { border-color: var(--wine); }
.season-card-on { background: var(--gold-soft); border-color: var(--gold); }

/* Admin */
.rows { list-style: none; padding: 0; margin: 0 0 16px; }
.rows li { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.row-actions { display: flex; gap: 14px; }
.copy { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; }

.site-footer { background: var(--wine-deep); color: var(--gold-soft); padding: 20px 0; font-size: .875rem; }
.site-footer p { margin: 0; }
