:root {
  --bg: #f6f1e7; --card: #fffdf8; --ink: #2b2118; --muted: #7b6d5f; --line: #e2d7c3;
  --brand: #7a2e1d; --brand-ink: #fff; --accent: #2f5d7c; --ok: #2e7d32; --warn: #b26a00; --danger: #b3261e;
  --radius: 10px; --gap: 1rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.45; font-size: 16px; }
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: 0 0 .75rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
small, .muted { color: var(--muted); }

/* Top bar */
.topbar { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; background: var(--brand); color: var(--brand-ink);
  padding: .6rem 1rem; padding-top: calc(.6rem + env(safe-area-inset-top, 0px)); position: sticky; top: 0; z-index: 10; }
.topbar a, .topbar .linklike { color: var(--brand-ink); text-decoration: none; }
.brand { font-weight: 700; font-size: 1.1rem; }
.brand-mark { background: var(--brand-ink); color: var(--brand); border-radius: 6px; padding: 0 .35rem; margin-right: .2rem; }
.mainnav { display: none; align-items: center; gap: .15rem; margin-left: 1rem; }
.mainnav > a, .mainnav summary { padding: .35rem .7rem; border-radius: 7px; opacity: .88; cursor: pointer; list-style: none; }
.mainnav summary::-webkit-details-marker { display: none; }
.mainnav > a:hover, .mainnav summary:hover { background: rgba(255,255,255,.12); opacity: 1; }
.mainnav [aria-current="page"] { background: rgba(255,255,255,.2); opacity: 1; font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.btn-top { background: #fff; color: var(--brand) !important; font-weight: 700; border-radius: 99px; padding: .3rem .85rem; font-size: .92rem; }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; top: calc(100% + .4rem); left: 0; min-width: 13rem; background: #fff; color: var(--ink); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: .35rem; z-index: 30; display: flex; flex-direction: column; }
.menu-right .menu-panel { left: auto; right: 0; }
.menu-panel a, .menu-panel .menu-item { color: var(--ink) !important; padding: .55rem .7rem; border-radius: 7px; text-decoration: none; text-align: left;
  background: none; border: 0; font: inherit; cursor: pointer; width: 100%; }
.menu-panel a:hover, .menu-panel .menu-item:hover { background: var(--bg); }
.menu-panel form { margin: 0; border-top: 1px solid var(--line); margin-top: .25rem; padding-top: .25rem; }
.menu-head { padding: .5rem .7rem .6rem; font-weight: 700; border-bottom: 1px solid var(--line); margin-bottom: .25rem; }
.menu-head small { display: block; font-weight: 400; color: var(--muted); }
.user-chip { width: 2rem; height: 2rem; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center;
  font-weight: 700; cursor: pointer; }
/* Phone: bottom tab bar instead of the top links */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .45rem 0 .4rem; font-size: .72rem; color: var(--muted); text-decoration: none; }
.tabbar svg { width: 1.45rem; height: 1.45rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar [aria-current="page"] { color: var(--brand); font-weight: 700; }
body:has(.tabbar) .page { padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }
.more-list { display: flex; flex-direction: column; padding: .3rem; }
.more-list a { padding: .85rem .8rem; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.more-list a:last-child { border-bottom: 0; }
@media (min-width: 900px) {
  .mainnav { display: flex; }
  .phone-only { display: none !important; }
}
@media (max-width: 899px) { .desktop-only { display: none !important; } }
.menu-group { border-bottom: 1px solid var(--line); margin-bottom: .3rem; padding-bottom: .3rem; }
.menu-right .menu-panel { max-height: calc(100vh - 4rem); overflow-y: auto; }
.linklike { background: none; border: 0; font: inherit; cursor: pointer; padding: 0; color: var(--accent); text-decoration: underline; }
form.inline { display: inline; }

/* Layout */
.page { max-width: 1100px; margin: 0 auto; padding: 1rem; padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: var(--gap); }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.grid { display: grid; gap: var(--gap); }
@media (min-width: 800px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-main { grid-template-columns: 2fr 1fr; } }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.page-head h1 { margin: 0; margin-right: auto; }
.stat { font-size: 2rem; font-weight: 700; }

/* Buttons */
.btn { display: inline-block; padding: .55rem .9rem; border-radius: 8px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; min-height: 44px; }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.small { padding: .25rem .55rem; min-height: 0; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

/* Forms */
.form p, .form > div { margin: 0 0 .85rem; }
label { display: block; font-weight: 600; margin-bottom: .25rem; }
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=password], input[type=number],
input[type=search], input[type=time], input[type=date], select, textarea {
  width: 100%; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; min-height: 44px; }
input[type=checkbox] { width: 1.2rem; height: 1.2rem; vertical-align: middle; }
label:has(input[type=checkbox]) { font-weight: 500; }
.helptext, .form .helptext { display: block; color: var(--muted); font-size: .85rem; }
.errorlist { color: var(--danger); margin: .25rem 0; padding-left: 1rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1rem; }
legend { font-weight: 700; padding: 0 .3rem; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: end; }
.filters > * { flex: 1 1 160px; }
.filters label:has(input[type=checkbox]) { flex: 0 0 auto; }

/* Lists & tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.badge { white-space: nowrap; display: inline-block; font-size: .75rem; padding: .05rem .45rem; border-radius: 99px; background: var(--line); color: var(--ink); vertical-align: middle; }
.badge.pin { background: #fde9c8; color: var(--warn); }
.badge.post { background: #dbe8f1; color: var(--accent); }
.countdown { white-space: nowrap; font-size: .75rem; color: var(--muted); }
.countdown.today { color: var(--accent); font-weight: 700; }
.badge.off { background: #eee; color: var(--muted); }
.badge.ok { background: #dcefdc; color: var(--ok); }
.badge.bad { background: #f7dcda; color: var(--danger); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }

/* Notes */
.note { padding: .75rem; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .6rem; background: #fff; }
.note.pinned { border-color: #f0c987; background: #fffaf0; }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.note-meta { font-size: .85rem; color: var(--muted); margin-top: .4rem; display: flex; flex-wrap: wrap; gap: .3rem .75rem; }

/* Messages */
.messages { margin-bottom: 1rem; }
.msg { padding: .6rem .8rem; border-radius: 8px; margin-bottom: .4rem; background: #e6f0e6; }
.msg-error { background: #f7dcda; }
.msg-warning { background: #fde9c8; }
.msg-info { background: #dbe8f1; }

/* Type-ahead */
.typeahead { position: relative; }
.ta-results { position: absolute; left: 0; right: 0; z-index: 5; background: #fff; border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 8px 8px; max-height: 18rem; overflow-y: auto; }
.ta-results:empty { display: none; }
.ta-option { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: .6rem; font: inherit; cursor: pointer; }
.ta-option:hover, .ta-option:focus { background: var(--bg); }
.ta-empty { padding: .6rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); font-weight: 500; }

/* Auth pages (allauth) */
.auth form p, .auth form > div { margin-bottom: .8rem; }
.auth button[type=submit] { background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: .6rem 1rem; font: inherit; min-height: 44px; cursor: pointer; }
.auth img, .auth svg { max-width: 220px; height: auto; background: #fff; padding: .5rem; }

@media print {
  .topbar, .no-print, .messages { display: none !important; }
  body { background: #fff; }
  .page { max-width: none; padding: 0; }
  .card { border: 0; padding: 0; }
}

/* Modal */
dialog#modal { border: 0; border-radius: var(--radius); padding: 1rem; width: min(520px, calc(100vw - 2rem)); max-height: 90vh; overflow-y: auto; }
dialog#modal::backdrop { background: rgba(0,0,0,.4); }
.ta-add { color: var(--brand); font-weight: 600; }

/* Shows */
.show-row { display: flex; gap: .8rem; align-items: flex-start; }
.date-block { display: flex; flex-direction: column; align-items: center; min-width: 3.4rem; padding: .2rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: .75rem; color: var(--muted); line-height: 1.2; }
.date-block strong { font-size: .95rem; color: var(--ink); }
.status-advancing { background: #fde9c8; color: var(--warn); }
.status-final { background: #dcefdc; color: var(--ok); }
.status-played { background: #dbe8f1; color: var(--accent); }
.status-archived { background: #eee; color: var(--muted); }
.warnings { border-color: #f0c987; background: #fffaf0; }
.warnings ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.rebook { border-color: var(--accent); }
form.suggest { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
form.suggest span { flex: 1 1 100%; }
form.suggest select { flex: 1; min-height: 36px; padding: .3rem; }

/* Calendar */
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-head { background: var(--card); text-align: center; font-size: .8rem; color: var(--muted); padding: .3rem 0; }
.cal-day { background: #fff; min-height: 4.5rem; padding: .2rem; font-size: .75rem; position: relative; overflow: hidden; }
.cal-day.other { background: var(--bg); color: var(--muted); }
.cal-day.today .cal-num { background: var(--brand); color: #fff; border-radius: 99px; display: inline-block; padding: 0 .35rem; }
.cal-item { display: block; border-radius: 4px; padding: .1rem .25rem; margin-top: .15rem; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-item.show { background: var(--brand); color: #fff; }
.cal-item.travel { background: #dbe8f1; color: var(--accent); }
.cal-add { position: absolute; right: .25rem; bottom: .1rem; text-decoration: none; color: var(--muted); }
@media (min-width: 800px) { .cal-day { min-height: 6.5rem; font-size: .85rem; } }

/* Schedule builder */
.schedule-table td { vertical-align: middle; }
.time-cell { white-space: nowrap; min-width: 8.5rem; }
.time-form { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.time-form input[type=time] { width: auto; min-height: 38px; padding: .3rem; }
.time-form input.time-text { width: 6.8rem; min-height: 40px; padding: .3rem .45rem; font-size: 1rem; font-weight: 600; }
.lock-btn { border: 1px solid var(--line); background: #fff; border-radius: 6px; min-width: 40px; min-height: 40px; font-size: 1.05rem; cursor: pointer; padding: 0 .4rem; }
.lock-btn.locked { background: #fff4d6; border-color: #e0b84a; }
.lock-btn[disabled] { cursor: default; opacity: .7; }
.time-error { display: block; white-space: normal; }
.nextday { font-weight: 400; font-size: .8rem; display: inline-flex; align-items: center; gap: .2rem; margin: 0; }
.actions-cell { white-space: nowrap; }
.pin-details { display: inline-block; }
.pin-details summary { list-style: none; display: inline-block; }
.pin-details[open] .time-form { margin-top: .3rem; }
.row-problem { background: #fff4f2; }
.row-hidden { opacity: .5; }
.danger-text { color: var(--danger); }
.firm-hard { color: var(--danger); font-weight: 700; }
.firm-soft { color: var(--muted); }
.inline-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; align-items: end; }
.inline-grid .wide { grid-column: 1 / -1; }
.inline-grid > div { margin: 0; }
.param-row { display: grid; grid-template-columns: 1fr 5.5rem; gap: .5rem; align-items: center; margin-bottom: .4rem !important; }
.param-row label { font-weight: 400; font-size: .9rem; margin: 0; }
.param-row input { min-height: 36px; padding: .3rem .5rem; }
.param-row .errorlist { grid-column: 1 / -1; }
.mono { font-family: ui-monospace, monospace; font-size: .85rem; }

/* Day sheet (screen + print) */
.daysheet { background: #fff; max-width: 760px; margin: 0 auto; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); }
.ds-header { text-align: center; margin-bottom: .5rem; }
.ds-logo { width: 100%; max-width: 560px; height: auto; border-radius: 6px; }
.ds-band-name { font-size: 2rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; text-align: center; }
.ds-day { margin: 1rem 0 1.25rem; }
.ds-day + .ds-day { border-top: 2px solid var(--ink); padding-top: 1rem; }
.ds-date { font-size: 1.35rem; margin: 0; text-align: center; }
.ds-venue { font-size: 1.2rem; margin: .2rem 0 0; text-align: center; }
.ds-address, .ds-opener, .ds-approx { text-align: center; }
.ds-approx { font-style: italic; margin-top: .3rem; }
.ds-opener { margin-top: .3rem; font-size: 1.05rem; }
.ds-times { margin-top: .75rem; font-size: 1.05rem; }
.ds-times td { padding: .35rem .5rem; }
.ds-time { white-space: nowrap; font-weight: 700; width: 8rem; }
.ds-notes { color: var(--muted); }
.ds-travel .ds-times { font-size: 1rem; }
.ds-block h3 { border-bottom: 1px solid var(--line); padding-bottom: .2rem; }
.ds-contacts { list-style: none; padding: 0; margin: 0; }
.ds-contacts li { padding: .3rem 0; }
.ds-contacts a { margin-left: .4rem; }
@media print {
  @page { margin: 12mm; }
  .daysheet { border: 0; padding: 0; max-width: none; }
  .ds-times { font-size: 12pt; }
  .ds-day { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* Let grid columns shrink so wide tables scroll inside .table-wrap instead of widening the page. */
.grid > * { min-width: 0; }

/* Advancing */
.progress { height: .6rem; background: var(--line); border-radius: 99px; overflow: hidden; margin: .4rem 0 .6rem; }
.progress-bar { height: 100%; background: var(--warn); border-radius: 99px; transition: width .2s; }
.progress-bar.full { background: var(--ok); }
.checklist li { display: flex; gap: .6rem; align-items: flex-start; }
.checklist .grow { flex: 1; }
.checklist .check { width: 1.8rem; height: 1.8rem; flex: 0 0 1.8rem; border: 2px solid var(--line); border-radius: 6px; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--ok); cursor: pointer; padding: 0; font-size: 1rem; }
.checklist .check.auto { cursor: default; border-style: dashed; }
.checklist .is-done > .grow, .checklist .is-done > span:not(.check) { color: var(--muted); }
.checklist .is-done .check { background: #dcefdc; border-color: #b8dcb8; }
.inline-note { min-height: 30px !important; padding: .2rem .4rem !important; font-size: .85rem; margin-top: .25rem; }
.add-row { display: flex; gap: .4rem; margin-top: .6rem; }
.add-row input { flex: 1; }

/* Rooming grid */
.rooming .c { text-align: center; }
.room-cell { display: inline-block; min-width: 3rem; min-height: 38px; border-radius: 6px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 600; cursor: pointer; padding: .3rem; }
span.room-cell { cursor: default; }
.room-yes { background: #dcefdc; color: var(--ok); border-color: #b8dcb8; }
.room-no { background: #eee; color: var(--muted); }
.room-unknown { background: #fde9c8; color: var(--warn); border-color: #f0c987; }
.rooming .totals td { border-top: 2px solid var(--ink); }

/* Set list editor */
.set-entries { list-style: none; counter-reset: set; padding: 0; margin: 0; }
.set-entries li[data-entry] { counter-increment: set; display: flex; gap: .5rem; align-items: center; padding: .5rem .3rem; border-bottom: 1px solid var(--line); background: #fff; }
.set-entries li[data-entry]::before { content: counter(set) "."; font-weight: 700; min-width: 1.6rem; text-align: right; }
.set-entries li.dragging { opacity: .5; background: var(--bg); }
.grip { cursor: grab; color: var(--muted); user-select: none; }
.entry-actions { white-space: nowrap; }
.set-entries .grow { flex: 1; min-width: 0; }
.ds-setlist { margin: 0; padding-left: 1.4rem; }  /* one column: two are confusing on a set list */

/* PWA / polish */
.offline-banner { background: var(--warn); color: #fff; text-align: center; padding: .4rem 1rem; padding-top: calc(.4rem + env(safe-area-inset-top, 0px)); font-size: .9rem; }
.settings-grid a.card { text-decoration: none; color: inherit; }
.settings-grid a.card strong { color: var(--accent); }
.next-show { border-color: var(--brand); }
.next-show .big { font-size: 1.4rem; font-weight: 700; margin: .1rem 0; }
.quick-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.quick-actions .btn { flex: 1 1 8rem; text-align: center; }
/* Offline: hide actions that need the network (saved pages are read-only). */
.is-offline .no-print, .is-offline form[method=post] { display: none !important; }
@media (max-width: 600px) {
  .daysheet { padding: .9rem .6rem; }
  .ds-times { font-size: 1rem; }
  .ds-times td { padding: .3rem .25rem; }
  .ds-time { width: 5.6rem; }
  .ds-notes { font-size: .85rem; }
}
.entry-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; margin-top: .25rem; }
.entry-fields .wide { grid-column: 1 / -1; }
.entry-fields .inline-note { margin-top: 0; }

/* Show timer */
.timer-clock { position: sticky; top: calc(3.2rem + env(safe-area-inset-top, 0px)); z-index: 4; }
.timer-main { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.clock { font-size: clamp(2.6rem, 12vw, 4rem); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.small-clock { font-size: clamp(1.4rem, 6vw, 2rem); text-align: right; }
.clock.over, .small-clock.over { color: var(--danger); }
.clock-inline { font-variant-numeric: tabular-nums; font-weight: 700; margin-left: .3rem; }
.now-playing { margin: .6rem 0 0; font-size: 1.1rem; }
.timer-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.big-btn { flex: 1 1 100%; font-size: 1.2rem; min-height: 60px; }
.timer-list { list-style: none; padding: 0; margin: 0; }
.timer-list li { margin-bottom: .35rem; }
.timer-row { display: flex; gap: .7rem; align-items: center; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: .6rem .7rem; font: inherit; color: inherit; min-height: 56px; }
button.timer-row { cursor: pointer; }
.timer-row .num { font-weight: 700; color: var(--muted); min-width: 1.6rem; text-align: right; }
.timer-row .grow { flex: 1; min-width: 0; }
.timer-row .t { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.timer-list .done .timer-row { background: #f3f7f3; }
.timer-list .running .timer-row { background: #fff4d6; border-color: var(--warn); box-shadow: 0 0 0 2px #f0c987; }
.timer-list .folded .timer-row { opacity: .6; }
.group-gap td { padding: 0; border-bottom: 2px solid var(--line); }
.all-slots { background: var(--bg); border-radius: 8px; padding: .6rem; margin-bottom: .6rem; }
.lookup { margin-bottom: .6rem; }
.lookup.htmx-request .ta-input { background-image: linear-gradient(90deg, transparent, #f6f1e7, transparent); }
a.ta-option { display: block; text-decoration: none; color: inherit; }
.usage-row { display: flex; justify-content: space-between; }
.tabs { display: flex; gap: .3rem; margin-bottom: 1rem; border-bottom: 2px solid var(--line); }
.tabs a { padding: .5rem .9rem; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; font-weight: 600; }
.tabs a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.day-travel { border-left: 3px solid var(--line); padding-left: .6rem; margin: .3rem 0 .8rem; }
.slack-extras { border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .4rem; }
.slack-preview { font-size: .85rem; background: var(--bg); padding: .4rem .6rem; border-radius: 6px; }
.limit-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .6rem 1rem; }
.limit-bar .checks { gap: .3rem .9rem; }
.limit-bar input[type=number] { min-height: 36px; padding: .3rem .5rem; }
.flight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .8rem; }
.invite-link { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; border-color: var(--accent); }
.invite-link input { flex: 1 1 20rem; font-family: ui-monospace, monospace; font-size: .85rem; }
.transcript { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: .92rem; margin: 0; line-height: 1.5; }

/* Messages */
.var-list { list-style: none; padding: 0; margin: 0; }
.var-list li { margin: .25rem 0; }
.var-chip { font-family: Menlo, Consolas, monospace; font-size: .85rem; border: 1px solid var(--line); background: #fff; border-radius: 5px; padding: .15rem .35rem; cursor: pointer; }
.msg-preview-body { white-space: pre-wrap; font-family: inherit; background: #f7f7f5; border: 1px solid var(--line); border-radius: 6px; padding: .7rem; margin: 0; }
textarea.mono { font-family: Menlo, Consolas, monospace; font-size: .9rem; }

.env-banner { background: #ffd23f; color: #000; text-align: center; font-weight: 700; padding: .35rem .6rem; font-size: .9rem; }
input.rooms-have { width: 3.6rem; min-height: 34px; text-align: center; padding: .2rem; }
.rooms-add { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .5rem; }
.badge.section-start { background: #e7eef4; color: var(--accent); font-weight: 700; }
.env-banner .view-as { display: inline-flex; flex-wrap: wrap; gap: .6rem; margin-left: .8rem; font-weight: 600; }
.env-banner .view-as select { width: auto; min-height: 30px; padding: .1rem .3rem; font-size: .85rem; }
.show-nav { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .4rem; }
.show-nav .disabled { opacity: .35; pointer-events: none; }
@media (max-width: 520px) { .show-nav-label { display: none; } }
.delivery { border-top: 1px solid var(--line); margin-top: .6rem; padding-top: .4rem; }
.delivery-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .25rem 0; font-size: .92rem; }
.delivery-label { font-weight: 700; min-width: 3.4rem; color: var(--muted); }
.delivery-row .grow { flex: 1; min-width: 12rem; }

/* Show page: compact pieces */
.dialog { border: 0; border-radius: 10px; padding: 1rem; width: min(560px, calc(100vw - 32px)); box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.dialog::backdrop { background: rgba(0,0,0,.4); }
.pick-list li { padding: 0; }
.pick-list form { margin: 0; }
.pick { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: .7rem .4rem; font: inherit; cursor: pointer; color: var(--ink); }
.pick:hover, .pick:focus { background: var(--line); }
.lineup-list li { padding: .3rem 0; }
.lineup-list li.group-gap { padding: 0; border-top: 1px dashed var(--line); margin: .2rem 0; }
.lineup-row { display: flex; align-items: center; gap: .4rem; }
.lineup-row .grow { flex: 1; min-width: 0; }
.row-menu { position: relative; }
.row-menu > summary { list-style: none; cursor: pointer; padding: .1rem .5rem; border: 1px solid var(--line); border-radius: 6px; font-weight: 700; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-panel { position: absolute; right: 0; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .4rem; display: flex; flex-direction: column; gap: .3rem; box-shadow: 0 4px 16px rgba(0,0,0,.15); min-width: 8rem; }
details.compact { margin-top: .5rem; }
details.compact > summary { cursor: pointer; color: var(--accent); font-size: .92rem; }

/* Lineup & rooms card */
table.lineup-rooms td { vertical-align: middle; padding-top: .35rem; padding-bottom: .35rem; }
table.lineup-rooms td.who { min-width: 9rem; }
table.lineup-rooms tr.kind-gap td { border-top: 2px solid var(--line); }
table.lineup-rooms tr.row-opener td.who strong::before { content: "🎸 "; }
table.lineup-rooms .actions-cell { width: 2.5rem; text-align: right; }
.hotel-line { margin: .2rem 0; }
.rooms-toggle { margin: .2rem 0 .4rem; }
/* Show page tabs (phones): a bottom bar, where the old tab bar was */
.show-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.show-tabs button { border: 0; background: none; font: inherit; font-size: .78rem; font-weight: 600; color: var(--muted); padding: .75rem 0 .7rem; cursor: pointer; }
.show-tabs button[aria-current="page"] { color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
body:has(.show-tabs) .page { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) { body:has(.show-tabs) .page { padding-bottom: 2rem; } }
.tab-hidden { display: none !important; }
.show-nav .btn { width: 2.5rem; height: 2.5rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; line-height: 1; border-radius: 6px; }
@media (min-width: 900px) { .show-nav { justify-content: flex-end; } }
table.lineup-rooms .actions-cell { width: auto; white-space: nowrap; text-align: right; }
table.lineup-rooms .actions-cell .btn { margin: .1rem 0 .1rem .2rem; }
.band-switch .current { font-weight: 700; }
.welcome-steps { list-style: none; padding: 0; margin: .5rem 0 0; }
.welcome-steps li { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.welcome-steps .grow { flex: 1; }
.welcome-check { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--line); font-weight: 700; flex: none; }
.welcome-steps li.done .welcome-check { background: var(--ok); color: #fff; }
.welcome-steps li.done strong { color: var(--muted); }
.file-edit { float: right; margin-left: .4rem; padding: .15rem .45rem; }
.length-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .3rem 1rem; }
.help-card ul { margin-bottom: 0; padding-left: 1.2rem; }
.welcome-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .6rem 1rem; background: #dbe8f1; border-bottom: 1px solid var(--line); }
.welcome-bar .grow { flex: 1; min-width: 14rem; }
.welcome-bar-actions { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; }
.setup-steps li { margin: .5rem 0; }
.manifest-box { position: relative; margin: .4rem 0; }
.manifest-box pre { background: #f7f7f5; border: 1px solid var(--line); border-radius: 6px; padding: .6rem; font-size: .78rem; max-height: 16rem; overflow: auto; white-space: pre; }
.manifest-box .btn { position: absolute; top: .4rem; right: .4rem; }
.band-card { text-decoration: none; color: var(--ink); } .band-card-logo { max-height: 60px; max-width: 100%; display: block; margin-bottom: .4rem; }
.print-row { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; border-top: 1px solid var(--line); }
.print-row .grow { flex: 1; }
.stepper { display: inline-flex; align-items: center; gap: .25rem; }
.stepper input[type=number] { width: 3.2rem; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .count-box { display: inline-flex; align-items: center; justify-content: center; width: 3.2rem; min-height: 44px; padding: 0 .3rem;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; cursor: text; }  /* looks like the number box it replaced */
.stepper .count-box:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.muted .count-box { opacity: .5; cursor: default; }
.stepper .btn { min-width: 2.2rem; font-size: 1.1rem; line-height: 1; }
.guest-add-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .4rem .8rem; align-items: end; }
.guest-add-form > div { margin: 0; }
.guest-add-button { align-self: end; }
.show-back { margin-bottom: .1rem; } .show-back a { font-weight: 600; }
.share-btn[hidden] { display: none; }

.slack-window { font-size: .82rem; white-space: nowrap; color: var(--brand-ink); padding: 0; }
@media (max-width: 599px) { .slack-window-text { display: none; } }

/* Links to a card (#contacts…) stop below the sticky top bar, not under it. */
html { scroll-padding-top: calc(4rem + env(safe-area-inset-top, 0px)); }
