@font-face {
  font-family: "DM Sans";
  src: url("assets/dm-sans.ttf") format("truetype");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Serif Display";
  src: url("assets/dm-serif.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f1ea;
  --surface: #fbf9f4;
  --surface-2: #efeae0;
  --text: #1f1e1a;
  --text-soft: #5a574f;
  --accent: #b8542f;
  --accent-soft: #f0dfcf;
  --border: #d9d3c5;
  --focus: #2b5cff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(31,30,26,.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171613;
    --surface: #201f1b;
    --surface-2: #2a2924;
    --text: #f1ede3;
    --text-soft: #b8b3a6;
    --accent: #e07a4f;
    --accent-soft: #3a2a22;
    --border: #3a3830;
    --focus: #7aa2ff;
    --shadow: 0 10px 30px rgba(0,0,0,.4);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 8px 12px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.site-header { padding: 18px 0; border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); display: inline-block; }
.brand-name { font-family: "DM Serif Display", serif; font-size: 22px; letter-spacing: .2px; }
.header-tag { margin: 0; color: var(--text-soft); font-size: 13px; font-family: "IBM Plex Mono", monospace; }

.intro { padding: 40px 0 24px; }
.intro h1 { font-family: "DM Serif Display", serif; font-size: clamp(32px, 5vw, 52px); margin: 0 0 10px; line-height: 1.05; }
.intro-lede { margin: 0; color: var(--text-soft); max-width: 52ch; font-size: 17px; }

.controls { display: grid; grid-template-columns: 2fr 1fr auto; gap: 14px; align-items: end; padding: 16px 0 24px; }
@media (max-width: 700px) { .controls { grid-template-columns: 1fr; } }
.control label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 6px; font-weight: 600; }
.control input, .control select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px;
}
.control input:focus, .control select:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.control-toggle { display: flex; align-items: end; }
.control-toggle button {
  padding: 11px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px; cursor: pointer; white-space: nowrap;
}
.control-toggle button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }

.list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding-bottom: 60px; }
@media (max-width: 760px) { .list { grid-template-columns: 1fr; } }

.item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
@media (prefers-reduced-motion: no-preference) {
  .item:hover { transform: translateY(-2px); }
}
.item-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--text-soft); font-family: "IBM Plex Mono", monospace; }
.chip { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 12px; }
.item h2 { margin: 0; font-size: 19px; line-height: 1.2; font-family: "DM Serif Display", serif; }
.item p { margin: 0; color: var(--text-soft); font-size: 14px; }
.item-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.price { font-weight: 700; font-size: 15px; }
.open-item {
  padding: 8px 14px; border: none; border-radius: var(--radius-sm); background: var(--accent); color: #fff;
  font: inherit; font-size: 14px; cursor: pointer; font-weight: 600;
}
.open-item:focus { outline: 2px solid var(--focus); outline-offset: 2px; }

.empty-state { padding: 40px 20px; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); }
.empty-state p { color: var(--text-soft); margin: 0 0 14px; }
.empty-state button { padding: 9px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); cursor: pointer; }

.detail { position: fixed; inset: 0; z-index: 50; }
.detail[hidden] { display: none; }
.detail-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.detail-panel {
  position: relative; max-width: 640px; margin: 6vh auto; background: var(--surface); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); max-height: 88vh; overflow: auto; border: 1px solid var(--border);
}
@media (max-width: 640px) { .detail-panel { margin: 0; max-width: 100%; height: 100vh; max-height: 100vh; border-radius: 0; } }
.close-detail { position: absolute; top: 14px; right: 14px; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.close-detail:focus { outline: 2px solid var(--focus); outline-offset: 2px; }

.detail-content h2 { font-family: "DM Serif Display", serif; font-size: 28px; margin: 0 0 8px; line-height: 1.1; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--text-soft); font-family: "IBM Plex Mono", monospace; margin-bottom: 14px; }
.detail-body { white-space: pre-line; color: var(--text); font-size: 16px; line-height: 1.6; margin-bottom: 18px; }
.detail-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.save-item {
  padding: 10px 16px; border: none; border-radius: var(--radius-sm); background: var(--accent); color: #fff;
  font: inherit; font-size: 14px; cursor: pointer; font-weight: 600;
}
.save-item[aria-pressed="true"] { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.save-item:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.detail-venue { font-size: 14px; color: var(--text-soft); }
