:root {
  --bg: #f6f4ef;
  --bg-alt: #ece8df;
  --ink: #1d2433;
  --muted: #5b6472;
  --accent: #7a3b2e;
  --accent-ink: #fff;
  --line: #d8d2c4;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(29,36,51,0.06), 0 8px 24px rgba(29,36,51,0.06);
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); font-size: 0.95rem; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; gap: 0.75rem; align-items: center; }
.logo-dot {
  width: 36px; height: 36px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #b56547, var(--accent));
  box-shadow: inset 0 0 0 4px rgba(255,255,255,0.25);
}
.brand-title { font-weight: 700; font-size: 1.1rem; }
.brand-sub { color: var(--muted); font-size: 0.9rem; }
.topnav { display: flex; gap: 1rem; flex-wrap: wrap; }
.topnav a { font-size: 0.95rem; padding: 0.25rem 0.25rem; }
.topnav a.ext::after { content: " \2197"; font-size: 0.8rem; }

.shell {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(260px, 1fr);
  gap: 1.5rem;
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}
@media (max-width: 1100px) {
  .shell { grid-template-columns: 1fr 1fr; }
  .tips { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
}

.planner, .preview, .tips {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.planner-header h1 { margin: 0 0 0.25rem 0; font-size: 1.4rem; }
.presets { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; align-items: center; }
.presets-label { color: var(--muted); font-size: 0.9rem; }
.chip {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

.tabs { display: flex; gap: 0.5rem; margin: 1rem 0; flex-wrap: wrap; }
.tab {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
}
.tab.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tab-panel.hidden { display: none; }

.field { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.75rem; }
.field > span { font-size: 0.9rem; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.field textarea { resize: vertical; }
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end; }
.grow { flex: 1 1 200px; }

.setlist, .sponsor-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.setlist li, .sponsor-list li {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}
.setlist li.selected, .sponsor-list li.selected {
  outline: 2px solid var(--accent);
}
.setlist .title { font-weight: 600; }
.setlist .composer { color: var(--muted); font-size: 0.9rem; }
.setlist .x, .sponsor-list .x {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}
.setlist .x:hover, .sponsor-list .x:hover { background: #fbe9e5; color: var(--accent); }
.empty { color: var(--muted); font-style: italic; margin-top: 0.5rem; }

.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.btn {
  background: var(--bg-alt);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; }
.save-status { color: var(--accent); font-size: 0.9rem; margin-top: 0.75rem; min-height: 1.1em; }

.preview-head h2 { margin: 0 0 0.25rem 0; }
.program {
  background: #fffdf7;
  color: #1d2433;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
.program-head { text-align: center; border-bottom: 2px solid #1d2433; padding-bottom: 1rem; margin-bottom: 1rem; }
.program-title { font-size: 1.8rem; font-weight: 700; letter-spacing: 0.5px; }
.program-ensemble { font-size: 1.1rem; margin-top: 0.25rem; }
.program-meta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; color: #3a4254; margin-top: 0.5rem; font-size: 0.95rem; }
.program-block { margin: 1rem 0; }
.program-block h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid #1d2433;
  padding-bottom: 0.25rem;
  margin: 0 0 0.5rem 0;
}
.prog-setlist { padding-left: 1.25rem; margin: 0; }
.prog-setlist li { margin: 0.25rem 0; }
.intermission { font-style: italic; text-align: center; margin-top: 0.5rem; }
.prog-sponsors { list-style: none; padding: 0; margin: 0; columns: 2; gap: 1.5rem; }
.prog-sponsors li { break-inside: avoid; }
.program-foot { text-align: center; margin-top: 1.5rem; border-top: 1px solid #1d2433; padding-top: 0.75rem; font-size: 0.95rem; }

.tips h2 { margin-top: 0; font-size: 1.2rem; }
.tip-list { padding-left: 1.25rem; margin: 0 0 1rem 0; }
.tip-list li { margin: 0.35rem 0; }
.scenario { background: var(--bg-alt); border-radius: 10px; padding: 0.75rem 1rem; margin-bottom: 0.75rem; }
.scenario h3 { margin: 0 0 0.25rem 0; font-size: 1rem; }
.scenario p { margin: 0; }

.section-band { padding: 2rem 1.5rem; max-width: 1400px; margin: 0 auto; }
.section-band.alt { background: var(--bg-alt); border-radius: var(--radius); margin-bottom: 1.5rem; }
.section-inner { max-width: 1000px; margin: 0 auto; }
.mistakes { padding-left: 1.25rem; }
.mistakes li { margin-bottom: 0.5rem; }

.site-foot {
  border-top: 1px solid var(--line);
  padding: 1.5rem;
  background: var(--card);
  margin-top: 2rem;
}
.foot-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.foot-inner nav { display: flex; gap: 1rem; flex-wrap: wrap; }

@media print {
  body { background: #fff; }
  .topbar, .planner, .tips, .section-band, .site-foot, .actions, .presets, .tabs { display: none !important; }
  .shell { display: block; padding: 0; }
  .preview { box-shadow: none; border: none; padding: 0; }
  .program { box-shadow: none; border: none; max-width: 100%; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
