:root {
  color-scheme: light;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #eef4f3;
  --ink: #0a1718;
  --muted: #647172;
  --line: #d9e4e2;
  --line-strong: #b9c9c6;
  --dark: #071314;
  --teal: #0c8f87;
  --teal-dark: #06635f;
  --teal-soft: #dff5f2;
  --amber: #a96d0d;
  --amber-soft: #fff3d3;
  --coral: #b74848;
  --coral-soft: #fde9e7;
  --blue: #356aa0;
  --blue-soft: #e8f1fb;
  --shadow: 0 16px 40px rgba(7, 19, 20, .08);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: var(--font); letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(12, 143, 135, .24); outline-offset: 2px; }

.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr); align-items: center; gap: 18px; min-height: 72px; padding: 10px clamp(16px, 4vw, 46px); border-bottom: 1px solid rgba(217, 228, 226, .9); background: rgba(255, 255, 255, .94); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 12px; width: max-content; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: var(--radius); color: #fff; background: var(--dark); font-size: 13px; font-weight: 850; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; line-height: 1.1; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.main-nav { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.nav-tab { min-height: 36px; padding: 0 15px; border: 0; border-radius: 6px; color: #485657; background: transparent; font-size: 13px; font-weight: 750; }
.nav-tab.is-active { color: var(--ink); background: #fff; box-shadow: 0 5px 14px rgba(7, 19, 20, .08); }
.topbar-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.sync-state { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; color: #4b5a5a; font-size: 12px; font-weight: 750; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.sync-state.is-syncing .sync-dot { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); animation: pulse 1s infinite; }
.sync-state.is-error .sync-dot { background: var(--coral); box-shadow: 0 0 0 4px var(--coral-soft); }
main { padding: 28px clamp(16px, 4vw, 46px) 54px; }

.icon-button { display: inline-grid; flex: 0 0 auto; width: 38px; height: 38px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: #344344; background: #fff; }
.icon-button:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.icon-button svg, button svg { width: 17px; height: 17px; stroke-width: 2; }
.primary-button, .secondary-button, .ghost-button, .danger-ghost { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border-radius: 7px; font-size: 13px; font-weight: 800; text-decoration: none; }
.primary-button { border: 1px solid var(--teal); color: #fff; background: var(--teal); }
.primary-button:hover { background: var(--teal-dark); }
.secondary-button { border: 1px solid var(--line-strong); color: var(--ink); background: #fff; }
.secondary-button:hover, .ghost-button:hover { background: var(--surface-soft); }
.ghost-button { border: 1px solid transparent; color: #334344; background: transparent; }
.danger-ghost { border: 1px solid #efc6c2; color: var(--coral); background: #fff; }
.full-button { width: 100%; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--teal-dark); font-size: 11px; font-weight: 850; text-transform: uppercase; }

.setup-view { max-width: 1480px; margin: 0 auto; }
.setup-heading { max-width: 780px; margin-bottom: 26px; }
.setup-heading h1 { max-width: 720px; margin: 0; font-size: 38px; line-height: 1.08; }
.setup-heading p { max-width: 690px; margin: 13px 0 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.template-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr); gap: 22px; align-items: start; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.template-card { position: relative; overflow: hidden; min-height: 184px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); text-align: left; background: #fff; box-shadow: 0 8px 24px rgba(7, 19, 20, .04); }
.template-card:nth-child(4), .template-card:nth-child(5) { min-height: 166px; }
.template-card:hover { border-color: #91b8b4; transform: translateY(-1px); }
.template-card.is-selected { border: 2px solid var(--teal); box-shadow: 0 0 0 3px var(--teal-soft), var(--shadow); }
.template-photo { display: block; width: 100%; height: 102px; object-fit: cover; background: var(--surface-soft); }
.template-card-copy { display: block; padding: 13px 14px 14px; }
.template-card-copy strong { display: block; font-size: 16px; }
.template-card-copy small { display: block; min-height: 34px; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.template-check { position: absolute; top: 10px; right: 10px; display: none; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: #fff; background: var(--teal); }
.template-check svg { width: 15px; }
.template-card.is-selected .template-check { display: grid; }
.template-preview { position: sticky; top: 100px; overflow: hidden; min-height: 376px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.preview-empty { display: grid; min-height: 376px; padding: 34px; place-items: center; align-content: center; gap: 12px; color: var(--muted); text-align: center; }
.preview-empty svg { width: 34px; height: 34px; color: var(--teal); }
.preview-empty strong { color: var(--ink); }
.preview-head { padding: 21px 22px 18px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.preview-head h2 { margin: 0; font-size: 20px; }
.preview-head p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.preview-stats { display: flex; gap: 8px; margin-top: 13px; }
.preview-stats span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; color: #435253; background: #fff; font-size: 11px; font-weight: 800; }
.preview-sections { max-height: 420px; overflow: auto; padding: 10px 22px 18px; }
.preview-section { padding: 12px 0; border-bottom: 1px solid var(--line); }
.preview-section:last-child { border: 0; }
.preview-section strong { font-size: 13px; }
.preview-section ol { margin: 7px 0 0; padding-left: 21px; color: var(--muted); font-size: 12px; line-height: 1.7; }

.creation-panel { margin-top: 22px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.creation-title { display: flex; align-items: start; justify-content: space-between; margin-bottom: 20px; }
.creation-title h2 { margin: 0; font-size: 22px; }
.free-badge { padding: 6px 9px; border-radius: 5px; color: var(--teal-dark); background: var(--teal-soft); font-size: 12px; font-weight: 850; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 7px; color: #3f4e4f; font-size: 12px; font-weight: 800; }
.field-wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); background: #fff; font-size: 14px; font-weight: 500; }
.field textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.captcha-row { display: flex; align-items: end; gap: 8px; max-width: 340px; margin-top: 15px; }
.captcha-row .field { flex: 1; }
.form-footer { display: flex; min-height: 52px; align-items: end; justify-content: space-between; gap: 20px; margin-top: 15px; border-top: 1px solid var(--line); padding-top: 15px; }
.form-footer p { margin: 0; color: var(--coral); font-size: 13px; }
.form-submit-actions { display: flex; gap: 8px; }
.verification-panel { display: grid; max-width: 620px; margin: 60px auto; padding: 42px; justify-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); text-align: center; }
.verification-icon { display: grid; width: 58px; height: 58px; margin-bottom: 18px; place-items: center; border-radius: 50%; color: var(--teal-dark); background: var(--teal-soft); }
.verification-icon svg { width: 27px; height: 27px; }
.verification-panel h2 { margin: 0; font-size: 26px; }
.verification-panel p { max-width: 480px; margin: 12px 0 22px; color: var(--muted); line-height: 1.6; }

.workspace { max-width: 1540px; margin: 0 auto; }
.event-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 19px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 9px 30px rgba(7, 19, 20, .05); }
.event-heading { display: flex; min-width: 0; align-items: center; gap: 20px; }
.event-type-button { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; }
.event-type-button > span:nth-child(2) { min-width: 0; }
.event-type-button small, .event-type-button strong { display: block; }
.event-type-button small { color: var(--teal-dark); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.event-type-button strong { overflow: hidden; max-width: 480px; margin-top: 3px; font-size: 21px; text-overflow: ellipsis; white-space: nowrap; }
.event-type-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 7px; color: #fff; background: var(--dark); }
.event-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; color: #526061; background: var(--surface-soft); font-size: 11px; font-weight: 750; }
.meta-pill svg { width: 14px; height: 14px; }
.event-actions { display: flex; gap: 8px; }
.workspace-grid { display: grid; min-width: 0; grid-template-columns: 220px minmax(0, 1fr); gap: 26px; align-items: start; margin-top: 22px; }
.section-rail { position: sticky; top: 94px; min-width: 0; max-width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.rail-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 12px; border-bottom: 1px solid var(--line); font-size: 12px; }
.rail-heading span { color: var(--muted); font-weight: 750; }
.rail-heading strong { font-size: 11px; }
.section-rail nav { display: grid; min-width: 0; gap: 3px; padding: 10px 0; }
.section-link { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 8px; padding: 0 9px; border: 0; border-radius: 6px; color: #425151; background: transparent; font-size: 12px; font-weight: 750; text-align: left; }
.section-link:hover, .section-link.is-active { color: var(--teal-dark); background: var(--teal-soft); }
.section-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-link small { flex: 0 0 auto; }
.timeline-area { min-width: 0; }
.timeline-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 14px 52px; }
.timeline-heading h2 { margin: 0; font-size: 25px; }
.timeline-tools { display: flex; gap: 8px; }
.search-box { display: flex; width: 270px; height: 38px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.search-box svg { width: 15px; color: var(--muted); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; font-size: 13px; }
.timeline-list { display: grid; gap: 22px; }
.section-block { scroll-margin-top: 96px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 46px; margin: 0 0 8px 52px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.section-heading h3 { margin: 0; font-size: 15px; }
.section-heading span { color: var(--muted); font-size: 11px; }
.section-actions { display: flex; gap: 5px; }
.section-actions .icon-button { width: 32px; height: 32px; }
.stage-stack { display: grid; }
.stage-card { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; min-height: 78px; margin-left: 52px; border: 1px solid var(--line); border-bottom: 0; background: #fff; }
.stage-card:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.stage-card:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.stage-card:only-child { border-bottom: 1px solid var(--line); border-radius: var(--radius); }
.stage-card.is-open { z-index: 2; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.stage-card.is-dragging { opacity: .45; }
.stage-card.is-drop-target { box-shadow: inset 0 3px 0 var(--teal); }
.stage-connector { position: absolute; left: -38px; top: 0; bottom: -1px; width: 22px; }
.stage-connector::before { content: ""; position: absolute; left: 10px; top: -1px; bottom: -1px; width: 2px; background: #a9c9c5; }
.stage-card:last-child .stage-connector::before { bottom: 38px; }
.stage-connector span { position: absolute; top: 31px; left: 4px; width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 1px #85aaa6; }
.drag-handle { display: grid; width: 38px; height: 46px; padding: 0; place-items: center; border: 0; color: #8a9797; background: transparent; touch-action: none; }
.drag-handle svg { width: 16px; }
.stage-main { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto 22px; align-items: center; gap: 13px; min-width: 0; min-height: 76px; padding: 10px 12px 10px 2px; border: 0; color: inherit; background: transparent; text-align: left; }
.stage-time { display: grid; min-height: 34px; place-items: center; border-radius: 5px; color: var(--teal-dark); background: var(--teal-soft); font-size: 12px; font-weight: 850; }
.stage-time.is-empty { color: var(--muted); background: var(--surface-soft); }
.stage-copy { min-width: 0; }
.stage-copy small, .stage-copy strong, .stage-copy > span { display: block; }
.stage-section { margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.stage-title { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.stage-song { overflow: hidden; margin-top: 4px; color: #5c6a6b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.stage-song.is-empty { color: #9aa5a5; font-style: italic; }
.priority-chip { padding: 5px 8px; border-radius: 5px; font-size: 10px; font-weight: 850; text-transform: uppercase; white-space: nowrap; }
.priority-chip.required { color: #8f2929; background: var(--coral-soft); }
.priority-chip.preferred { color: var(--teal-dark); background: var(--teal-soft); }
.priority-chip.suggestion { color: #6e521d; background: var(--amber-soft); }
.stage-chevron { color: var(--muted); transition: transform .2s; }
.stage-card.is-open .stage-chevron { transform: rotate(180deg); }
.stage-quick-actions { display: flex; gap: 4px; padding-right: 10px; }
.stage-quick-actions .icon-button { width: 32px; height: 32px; border-color: transparent; color: var(--muted); }
.stage-quick-actions .delete-stage:hover { color: var(--coral); background: var(--coral-soft); }
.stage-editor { display: none; grid-column: 1 / -1; padding: 20px; border-top: 1px solid var(--line); background: #fbfcfc; }
.stage-card.is-open .stage-editor { display: block; }
.editor-grid { display: grid; grid-template-columns: 130px minmax(180px, 1fr) minmax(180px, 1fr); gap: 13px; }
.editor-grid .wide { grid-column: span 2; }
.song-editor { display: grid; grid-template-columns: minmax(160px, 1.3fr) minmax(130px, 1fr) minmax(170px, 1.2fr) 90px; gap: 10px; margin-top: 17px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.song-editor h4 { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; margin: 0 0 2px; font-size: 13px; }
.song-editor .remove-song { min-height: 30px; padding: 0 8px; }
.song-heading-actions { display: flex; align-items: center; gap: 7px; }
.song-editor .resolve-song { min-height: 30px; padding: 0 9px; font-size: 11px; }
.music-resolution { grid-column: 1 / -1; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 9px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--ink); }
.music-resolution > svg { width: 18px; color: var(--teal); }
.music-resolution strong, .music-resolution small { display: block; }
.music-resolution strong { font-size: 12px; }
.music-resolution small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.provider-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.provider-chip { padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: #f7faf9; font-size: 9px; font-weight: 800; }
.editor-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; }
.editor-section-title h4 { margin: 0; font-size: 13px; }
.comments { display: grid; gap: 8px; margin-top: 10px; }
.comment { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; padding: 10px 12px; border-left: 3px solid #8ebcb7; background: #fff; }
.comment strong { font-size: 11px; }
.comment time { color: var(--muted); font-size: 10px; }
.comment p { grid-column: 1 / -1; margin: 0; color: #485657; font-size: 12px; line-height: 1.5; }
.comment-form { display: flex; gap: 8px; margin-top: 9px; }
.comment-form input { min-width: 0; height: 38px; flex: 1; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; }
.empty-timeline { display: grid; min-height: 260px; place-items: center; align-content: center; gap: 11px; margin-left: 52px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); background: #fff; text-align: center; }

.modal { width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 30px); padding: 0; border: 0; border-radius: var(--radius); color: var(--ink); background: #fff; box-shadow: 0 30px 90px rgba(7, 19, 20, .28); }
.modal::backdrop { background: rgba(3, 12, 13, .58); backdrop-filter: blur(3px); }
.modal-wide { width: min(850px, calc(100vw - 28px)); }
.modal-frame { margin: 0; padding: 24px; }
.modal-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 23px; }
.modal-intro { margin: 17px 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.modal-actions .danger-ghost { margin-right: auto; }
.share-link-box { display: flex; align-items: end; gap: 8px; }
.share-link-box .field { min-width: 0; flex: 1; }
.share-status { min-height: 24px; margin-top: 9px; color: var(--muted); font-size: 12px; }
.compact-template-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.compact-template { min-height: 74px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; color: inherit; background: #fff; text-align: left; }
.compact-template strong, .compact-template small { display: block; }
.compact-template small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.compact-template.is-selected { border-color: var(--teal); color: var(--teal-dark); background: var(--teal-soft); }
.change-choice { margin-top: 20px; }
.change-choice h3 { margin: 0 0 10px; font-size: 14px; }
.choice-option { display: flex; align-items: start; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 7px; }
.choice-option + .choice-option { margin-top: 8px; }
.choice-option input { margin-top: 3px; accent-color: var(--teal); }
.choice-option strong, .choice-option small { display: block; }
.choice-option strong { font-size: 13px; }
.choice-option small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.danger-choice:has(input:checked) { border-color: #e3a5a0; background: #fff7f6; }
.summary-frame { max-height: 88vh; overflow: auto; }
.summary-section { padding: 14px 0; border-bottom: 1px solid var(--line); }
.summary-section h3 { margin: 0 0 9px; font-size: 14px; }
.summary-row { display: grid; grid-template-columns: 70px minmax(180px, .8fr) minmax(220px, 1.2fr); gap: 12px; padding: 7px 0; font-size: 12px; }
.summary-row time { color: var(--teal-dark); font-weight: 850; }
.toast-region { position: fixed; z-index: 80; right: 18px; bottom: 18px; display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); pointer-events: none; }
.toast { padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 7px; color: #fff; background: var(--dark); box-shadow: var(--shadow); font-size: 12px; line-height: 1.45; animation: toast-in .2s ease; }
.toast.is-error { border-left-color: #e3655d; }

@keyframes pulse { 50% { opacity: .35; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1100px) {
  .template-layout { grid-template-columns: 1fr; }
  .template-preview { position: static; min-height: 0; }
  .preview-empty { min-height: 200px; }
  .preview-sections { max-height: none; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .section-rail { position: static; padding: 10px; }
  .section-rail nav { display: flex; max-width: 100%; overflow-x: auto; padding-bottom: 5px; }
  .section-link { flex: 0 0 auto; }
  .section-rail .full-button { display: none; }
  .event-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .compact-template-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .topbar { grid-template-columns: 1fr auto; min-height: 64px; padding: 8px 14px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand small, .main-nav, .sync-state span:last-child { display: none; }
  .sync-state { padding: 0 4px; }
  main { padding: 20px 12px 42px; }
  .setup-heading h1 { font-size: 30px; }
  .setup-heading p { font-size: 14px; }
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-card { min-height: 170px; }
  .template-photo { height: 90px; }
  .template-card-copy { padding: 11px; }
  .template-card-copy small { min-height: 0; }
  .creation-panel { padding: 17px; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-footer .primary-button { width: 100%; }
  .form-submit-actions { display: grid; grid-template-columns: 1fr; }
  .event-band { align-items: stretch; flex-direction: column; padding: 14px; }
  .event-type-button strong { max-width: calc(100vw - 125px); font-size: 18px; }
  .event-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .timeline-heading { align-items: stretch; flex-direction: column; margin-left: 34px; }
  .timeline-tools { width: 100%; }
  .search-box { min-width: 0; width: auto; flex: 1; }
  .section-heading, .stage-card, .empty-timeline { margin-left: 34px; }
  .stage-connector { left: -29px; }
  .stage-card { grid-template-columns: 32px minmax(0, 1fr); }
  .drag-handle { width: 32px; }
  .stage-main { grid-template-columns: 50px minmax(0, 1fr) 18px; gap: 9px; padding-right: 9px; }
  .priority-chip { display: none; }
  .stage-quick-actions { grid-column: 1 / -1; justify-content: flex-end; padding: 0 8px 8px; }
  .editor-grid, .song-editor { grid-template-columns: 1fr; }
  .editor-grid .wide, .song-editor h4 { grid-column: auto; }
  .song-editor h4 { align-items: flex-start; gap: 8px; }
  .song-heading-actions { flex-wrap: wrap; justify-content: flex-end; }
  .music-resolution { grid-column: auto; }
  .comment-form { align-items: stretch; flex-direction: column; }
  .compact-template-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-frame { padding: 18px; }
  .summary-row { grid-template-columns: 55px minmax(0, 1fr); }
  .summary-row span:last-child { grid-column: 2; }
}

@media (max-width: 430px) {
  .template-grid { grid-template-columns: 1fr; }
  .template-card, .template-card:nth-child(4), .template-card:nth-child(5) { min-height: 0; }
  .template-card { display: grid; grid-template-columns: 108px minmax(0, 1fr); }
  .template-photo { height: 100%; min-height: 108px; }
  .template-check { top: 8px; right: 8px; }
  .event-actions .secondary-button span, .event-actions .primary-button span { display: none; }
}

@media print {
  .topbar, .setup-view, .event-actions, .section-rail, .timeline-tools, .stage-quick-actions, .drag-handle, .stage-editor, .modal-actions { display: none !important; }
  body, main { background: #fff; }
  .workspace, .summary-frame { display: block !important; }
  .workspace-grid { display: block; }
  .stage-card { break-inside: avoid; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
