/* Bandroom components. Every rectangle is an arch: rounded at the top, square at the bottom. */

.grow { flex: 1; min-width: 0; }

/* Buttons: ink for the main action, panel grey for the rest, brass only on dark or brass surfaces. */
.btn {
  --b-bg: var(--panel);
  --b-fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5);
  border: 0; border-radius: var(--arch-sm);
  background: var(--b-bg); color: var(--b-fg);
  font-weight: 800; font-size: var(--text); line-height: 1.1; text-decoration: none; white-space: nowrap;
  transition: background var(--fast) var(--ease), transform var(--fast) var(--ease), color var(--fast) var(--ease);
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { --b-bg: var(--panel-2); text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.45; pointer-events: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-main, .btn-dark { --b-bg: var(--ink); --b-fg: var(--on-ink); }
.btn-main:hover, .btn-dark:hover { --b-bg: var(--ink-2); }
.btn-brass { --b-bg: var(--brass); --b-fg: var(--on-bright); }
.btn-brass:hover { --b-bg: var(--brass-2); }
.btn-white { --b-bg: #ffffff; --b-fg: #111311; }
.btn-white:hover { --b-bg: #f3f3ef; }
.btn-line { --b-bg: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
.btn-line:hover { --b-bg: var(--panel); }
.btn-quiet { --b-bg: transparent; padding: 0 var(--s3); }
.btn-quiet:hover { --b-bg: var(--panel); }
.btn-danger { --b-bg: var(--no); --b-fg: var(--on-bright); }
.btn-danger:hover { --b-bg: #ff4436; }
.btn-sm { min-height: 40px; padding: 0 var(--s4); font-size: var(--text-sm); border-radius: 10px 10px 0 0; }
.btn-sm svg { width: 18px; height: 18px; }
.btn-lg { min-height: 56px; padding: 0 var(--s6); font-size: var(--text-md); border-radius: 14px 14px 0 0; }
.btn-block { width: 100%; }
.btn-icon { width: 48px; padding: 0; }
.btn-icon.btn-sm { width: 40px; }
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy > * { visibility: hidden; }
.btn.is-busy::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--b-fg); border-right-color: transparent; animation: spin 0.7s linear infinite; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.btn-row.end { justify-content: flex-end; }
.btn-row.between { justify-content: space-between; }
.btn-row.stretch > .btn { flex: 1; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 0.2em; }
.link-btn:disabled { opacity: 0.45; cursor: default; text-decoration: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Forms: 2px borders, clear labels, big targets. */
.form { display: grid; gap: var(--s5); }
.form-row { display: grid; gap: var(--s4); }
@media (min-width: 640px) { .form-row.two { grid-template-columns: 1fr 1fr; } .form-row.three { grid-template-columns: 1fr 1fr 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > label, .field > .label, legend.label { font-weight: 800; font-size: var(--text-sm); color: var(--ink); padding: 0; }
.field .hint { font-size: var(--text-sm); color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 12px var(--s4);
  border: 2px solid var(--rule-strong); border-radius: var(--arch-sm);
  background: var(--card); color: var(--ink); font-size: var(--text);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%235b5f5c' d='M216.49 104.49l-80 80a12 12 0 0 1-17 0l-80-80a12 12 0 0 1 17-17L128 159l71.51-71.52a12 12 0 0 1 17 17Z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-2); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--brass); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: var(--no-ink); }
.field-error { color: var(--no-ink); font-size: var(--text-sm); font-weight: 800; }
.form-error { padding: var(--s3) var(--s4); background: var(--no); color: var(--on-bright); border-radius: var(--arch-sm); font-weight: 800; }
.input-group { display: flex; gap: var(--s2); }
.input-group .input { flex: 1; }
.code-input { font-family: var(--font-display); font-stretch: var(--wide); font-weight: 800; font-size: var(--text-2xl); letter-spacing: 0.25em; text-align: center; font-variant-numeric: tabular-nums; padding-left: 0.25em; min-height: 64px; }

.switch { display: flex; align-items: flex-start; gap: var(--s3); cursor: pointer; padding: var(--s2) 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--rule-strong); position: relative; transition: background var(--fast) var(--ease); }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform var(--mid) var(--spring); }
.switch input:checked + .track { background: var(--ink); }
.switch input:checked + .track::after { transform: translateX(18px); background: var(--brass); }
.switch input:focus-visible + .track { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch .switch-text { display: grid; gap: 2px; padding-top: 2px; }
.switch .switch-text .strong { font-weight: 800; }
.switch .switch-text small { color: var(--muted); font-size: var(--text-sm); }

/* Choices you can tick */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 var(--s4);
  border-radius: var(--arch-sm); background: var(--panel); font-weight: 800; font-size: var(--text-sm);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.chip:hover span { background: var(--panel-2); }
.chip input:checked + span { background: var(--ink); color: var(--on-ink); }
.chip input:checked + span::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--brass); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip input:active + span { transform: scale(0.96); }

/* One of a few */
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; max-width: 100%; background: var(--panel); border-radius: var(--arch); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 4px var(--s3); border-radius: var(--arch-sm); font-weight: 800; font-size: var(--text-sm); line-height: 1.15; color: var(--muted); transition: background var(--fast) var(--ease), color var(--fast) var(--ease); text-align: center; }
@media (max-width: 419px) { .seg span { padding: 4px var(--s2); } }
.seg span svg { width: 18px; height: 18px; }
.seg input:checked + span { background: var(--ink); color: var(--on-ink); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.seg.block { display: grid; width: 100%; }

/* Can you make it? Three big buttons. The chosen one turns ink, with its colour in the icon. */
.answer { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.answer button {
  display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 54px; padding: 0 6px;
  border: 0; border-radius: var(--arch-sm); background: var(--panel); color: var(--ink);
  font-weight: 800; font-size: var(--text); transition: background var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.answer button svg { width: 22px; height: 22px; }
.answer button:hover { background: var(--panel-2); }
.answer button:active { transform: scale(0.96); }
.answer button[aria-pressed='true'] { background: var(--ink); color: var(--on-ink); animation: chosen var(--mid) var(--spring); }
.answer button[aria-pressed='true'].yes svg { color: var(--yes); }
.answer button[aria-pressed='true'].maybe svg { color: var(--maybe); }
.answer button[aria-pressed='true'].no svg { color: var(--no); }
.on-brass .answer button { background: #ffffff; color: #111311; }
.on-brass .answer button:hover { background: #fff8e1; }
.on-brass .answer button[aria-pressed='true'] { background: #111311; color: #ffffff; }
.answer.compact button { min-height: 44px; font-size: var(--text-sm); }
.answer.compact button svg { width: 18px; height: 18px; }
@keyframes chosen { 0% { transform: scale(0.94); } 100% { transform: none; } }

/* Quick answers in a list */
.quick { display: flex; gap: 6px; flex: none; }
.quick button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 11px 11px 0 0; background: var(--panel); color: var(--ink); transition: background var(--fast) var(--ease), transform var(--fast) var(--ease); }
.quick button svg { width: 20px; height: 20px; }
.quick button:hover { background: var(--panel-2); }
.quick button:active { transform: scale(0.92); }
.quick button[aria-pressed='true'].yes { background: var(--yes); color: var(--on-bright); }
.quick button[aria-pressed='true'].maybe { background: var(--maybe); color: var(--on-bright); }
.quick button[aria-pressed='true'].no { background: var(--no); color: var(--on-bright); }

/* Surfaces */
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--arch-lg); padding: var(--s5); }
.card.flush { padding: 0; overflow: hidden; }
.card.link { display: block; text-decoration: none; color: inherit; transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease); }
.card.link:hover { border-color: var(--rule-strong); }
.card.link:active { transform: scale(0.99); }
.panel { background: var(--panel); border-radius: var(--arch-lg); padding: var(--s5); }
.panel.tight { padding: var(--s4); }
.brass-block { background: var(--brass); color: #111311; border-radius: var(--arch-xl); padding: var(--s6) var(--s5) var(--s5); }
.brass-block .muted { color: #3d3a2c; }
.ink-block { background: var(--ink-block); color: #ffffff; border-radius: var(--arch-xl); padding: var(--s6) var(--s5) var(--s5); }
.ink-block .muted { color: #c9ccc7; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.card-head h2, .card-head h3 { margin: 0; }
.note { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s4); border-radius: var(--arch); background: var(--panel); font-size: var(--text-sm); line-height: 1.45; }
.note > svg { flex: none; width: 22px; height: 22px; margin-top: -1px; }
.note.brass { background: var(--brass-tint); }
.note.danger { background: var(--no); color: var(--on-bright); font-weight: 700; }
.note.good { background: var(--yes); color: var(--on-bright); font-weight: 700; }
.note.info { background: var(--dep); color: var(--on-bright); font-weight: 700; }

/* Rows */
.rows { display: grid; grid-template-columns: minmax(0, 1fr); }
.row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--rule); min-height: 64px; }
.row:first-child { border-top: 0; }
.row .title { font-weight: 800; line-height: 1.3; }
.row .sub { color: var(--muted); font-size: var(--text-sm); line-height: 1.35; margin-top: 2px; }
.row > .grow { min-width: 0; }
.row .title, .row .sub, .event-row .title, .event-row .sub { overflow-wrap: anywhere; }
a.row, .row.link { text-decoration: none; color: inherit; }
a.row:hover .title { text-decoration: underline; text-underline-offset: 0.2em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: var(--faint); width: 20px; height: 20px; flex: none; }

/* Tags: bright fills, ink text */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: var(--arch-xs); background: var(--panel); color: var(--ink); font-size: var(--text-xs); font-weight: 800; white-space: nowrap; line-height: 1; }
.tag svg { width: 15px; height: 15px; }
.tag.yes { background: var(--yes); color: var(--on-bright); }
.tag.no { background: var(--no); color: var(--on-bright); }
.tag.maybe { background: var(--maybe); color: var(--on-bright); }
.tag.dep { background: var(--dep); color: var(--on-bright); }
.tag.unknown { background: var(--unknown); color: var(--on-bright); }
.tag.brass { background: var(--brass); color: var(--on-bright); }
.tag.ink { background: var(--ink); color: var(--on-ink); }
.tag.line { background: transparent; box-shadow: inset 0 0 0 2px var(--rule-mid); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--no); color: var(--on-bright); font-size: 12px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--no); animation: pulse 1.6s infinite; vertical-align: middle; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 78, 0.55); } 70% { box-shadow: 0 0 0 10px rgba(255, 90, 78, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 78, 0); } }

/* People are round; bands are arches. */
.avatar { --size: 40px; flex: none; width: var(--size); height: var(--size); border-radius: 50%; background: var(--av, var(--brass)); color: #111311; display: grid; place-items: center; font-weight: 800; font-size: calc(var(--size) * 0.36); overflow: hidden; letter-spacing: 0.01em; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { --size: 32px; }
.avatar.xs { --size: 26px; font-size: 11px; }
.avatar.lg { --size: 64px; }
.avatar.xl { --size: 104px; }
.badge { --size: 44px; flex: none; width: var(--size); height: var(--size); border-radius: calc(var(--size) * 0.27) calc(var(--size) * 0.27) 0 0; background: var(--band, #111311); color: var(--band-fg, #ffffff); display: grid; place-items: center; overflow: hidden; font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: calc(var(--size) * 0.44); line-height: 1; }
/* A logo shows whole inside the arch, however wide or round it is, on white with a little room. */
.badge:has(img) { background: #ffffff; box-shadow: inset 0 0 0 1px var(--rule); }
.badge:has(img) { position: relative; }
.badge img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12%; }
.badge.sm { --size: 32px; }
.badge.xs { --size: 26px; }
.badge.lg { --size: 72px; }
.badge.xl { --size: 112px; }
.stack { display: flex; }
.stack .avatar { box-shadow: 0 0 0 3px var(--bg); margin-left: -8px; }
.stack .avatar:first-child { margin-left: 0; }

/* Date blocks: the fill says what kind of date it is. */
.date { flex: none; width: 56px; height: 60px; display: grid; place-content: center; text-align: center; border-radius: 13px 13px 0 0; background: var(--type, var(--t-other)); color: var(--on-bright); line-height: 1; }
.date .d { display: block; font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: 24px; letter-spacing: -0.03em; }
.date .w { display: block; font-size: 12px; font-weight: 800; margin-top: 4px; }
.date.lg { width: 76px; height: 84px; border-radius: 18px 18px 0 0; }
.date.lg .d { font-size: 34px; }
.date.lg .w { font-size: 13px; }
.t-rehearsal { --type: var(--t-rehearsal); }
.t-concert { --type: var(--t-concert); }
.t-contest { --type: var(--t-contest); }
.t-engagement { --type: var(--t-engagement); }
.t-social { --type: var(--t-social); }
.t-other { --type: var(--t-other); }
.date.t-rehearsal, .date.t-other, .type-tag.t-rehearsal, .type-tag.t-other { color: var(--ink); }
.type-tag { background: var(--type); color: var(--on-bright); }
.cancelled .title, .cancelled .t { text-decoration: line-through; color: var(--muted); }
.cancelled .date { opacity: 0.45; }

/* A date in a list */
.event-row { display: flex; gap: var(--s3); align-items: center; padding: var(--s3) 0; border-top: 1px solid var(--rule); text-decoration: none; color: inherit; min-height: 84px; }
.event-row:first-child { border-top: 0; }
.event-row .grow { flex: 1; min-width: 0; }
.event-row .title { font-weight: 800; font-size: var(--text); line-height: 1.25; }
.event-row .sub { color: var(--muted); font-size: var(--text-sm); margin-top: 3px; line-height: 1.35; }
a.event-row:hover .title, .event-row a:hover .title { text-decoration: underline; text-underline-offset: 0.2em; }
.event-row .said { margin-top: 6px; }
.event-row > a { display: flex; gap: var(--s3); align-items: center; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
/* Where a row is too narrow for the date, a word and the answer buttons (the chosen day beside the
   diary, on a small phone), the buttons go under it instead of breaking the word. */
.event-row { flex-wrap: wrap; }
.event-row > a { flex: 1 1 172px; }
.event-row > .quick { margin-left: auto; }

/* Tabs inside a page: arches you can tap */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--s4) * -1) var(--s5); padding: 0 var(--s4); -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 var(--s4);
  border: 0; border-radius: var(--arch-sm); background: var(--panel); color: var(--ink);
  text-decoration: none; font-weight: 800; font-size: var(--text-sm); white-space: nowrap;
}
.tabs a:hover, .tabs button:hover { background: var(--panel-2); }
.tabs [aria-current='page'], .tabs [aria-selected='true'] { background: var(--ink); color: var(--on-ink); }
.tabs svg { width: 18px; height: 18px; }
.tabs .count { margin-left: 2px; }
@media (min-width: 640px) { .tabs { margin-left: 0; margin-right: 0; padding: 0; flex-wrap: wrap; overflow: visible; } }
/* On a phone, a band's tabs share the width, so every one of them is in view. */
@media (max-width: 639px) {
  .band-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin-left: 0; margin-right: 0; padding: 0; overflow: visible; }
  .band-tabs a { position: relative; justify-content: center; padding: 0 4px; }
  .band-tabs .count { position: absolute; top: -7px; right: -3px; margin: 0; box-shadow: 0 0 0 2px var(--bg); }
}
@media (max-width: 359px) { .band-tabs a { font-size: 13px; } }

/* Numbers */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: var(--s2); }
.stat { background: var(--panel); border-radius: var(--arch-lg); padding: var(--s4) var(--s4) var(--s3); text-decoration: none; color: inherit; display: block; }
a.stat:hover { background: var(--panel-2); }
.stat .v { font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: var(--text-2xl); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .k { color: var(--muted); font-size: var(--text-sm); font-weight: 700; margin-top: 6px; }
.stat.brass { background: var(--brass); color: #111311; }
.stat.brass .k { color: #3d3a2c; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--arch-lg); border: 1px solid var(--rule); }
.table { font-size: var(--text-sm); }
.table th { text-align: left; font-weight: 800; color: var(--ink); padding: var(--s3) var(--s4); background: var(--panel); white-space: nowrap; }
.table td { padding: var(--s3) var(--s4); border-top: 1px solid var(--rule); vertical-align: middle; }
.table .r { text-align: right; }
.table tbody tr:hover td { background: var(--panel); }

/* Empty, loading and wrong */
.empty { text-align: center; padding: var(--s9) var(--s4); }
.empty .art { width: 88px; height: 104px; margin: 0 auto var(--s5); }
.empty .empty-title { font-family: var(--font-display); font-stretch: 115%; font-weight: 800; font-size: var(--text-lg); margin-bottom: var(--s2); }
.empty p { max-width: 40ch; margin: 0 auto; color: var(--muted); }
.empty .btn-row { justify-content: center; margin-top: var(--s5); }
.loading { display: grid; place-items: center; min-height: 40vh; }
.loader { display: flex; gap: 7px; align-items: flex-end; height: 26px; }
.loader i { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); animation: seat 0.9s var(--ease) infinite; }
.loader i:nth-child(2) { animation-delay: 0.1s; background: var(--brass); }
.loader i:nth-child(3) { animation-delay: 0.2s; }
@keyframes seat { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } }

/* Sheets rise from the bottom on a phone and sit in the middle on a computer. */
dialog.sheet { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; color: var(--ink); }
dialog.sheet::backdrop { background: rgba(17, 19, 17, 0.55); }
dialog.sheet[open] { display: flex; align-items: flex-end; justify-content: center; }
.sheet-box { position: relative; width: 100%; max-height: 92dvh; overflow: auto; background: var(--card); border-radius: var(--arch-xl); padding: var(--s5) var(--s5) calc(var(--s6) + env(safe-area-inset-bottom)); box-shadow: var(--shadow-pop); animation: rise var(--slow) var(--ease); overscroll-behavior: contain; }
.sheet-box::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--rule-mid); margin: -6px auto var(--s4); }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s5); }
.sheet-head h2 { font-size: var(--text-xl); padding-top: 6px; }
.sheet-head .btn { margin: 0 -8px 0 0; }
@media (min-width: 720px) {
  dialog.sheet[open] { align-items: center; }
  .sheet-box { width: min(560px, calc(100% - 48px)); padding: var(--s7); animation: pop var(--slow) var(--ease); }
  .sheet-box.wide { width: min(780px, calc(100% - 48px)); }
  .sheet-box::before { display: none; }
}
@keyframes rise { from { transform: translateY(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: translateY(14px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }

/* Toasts */
.toasts { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--s5) + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: var(--s2); width: min(460px, calc(100% - 24px)); pointer-events: none; }
.toast { display: flex; gap: var(--s3); align-items: center; min-height: 52px; padding: var(--s3) var(--s4); background: #111311; color: #ffffff; border-radius: var(--arch); box-shadow: var(--shadow-pop); font-weight: 800; font-size: var(--text-sm); animation: rise var(--mid) var(--spring); pointer-events: auto; }
.toast svg { width: 22px; height: 22px; flex: none; color: var(--yes); }
.toast.bad svg { color: var(--no); }
.toast .act { margin-left: auto; color: var(--brass); background: none; border: 0; font-weight: 800; padding: 6px 0; }
@media (max-width: 959px) { .in-app .toasts { bottom: calc(var(--tabbar) + var(--s3) + env(safe-area-inset-bottom)); } }

/* Steps */
.steps { display: flex; gap: 6px; }
.steps i { width: 28px; height: 6px; border-radius: 3px; background: var(--rule-mid); transition: background var(--mid) var(--ease); }
.steps i.done { background: var(--ink); }
.steps i.now { background: var(--brass); }

/* Sections inside pages */
.section { margin-top: var(--s8); }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.section-head h2 { font-size: var(--text-lg); }
.section-head .more { font-weight: 800; font-size: var(--text-sm); text-decoration: none; white-space: nowrap; padding: 6px 0; }
.section-head .more:hover { text-decoration: underline; }

/* Grids and spacing */
.grid { display: grid; gap: var(--s3); }
@media (min-width: 640px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.four { grid-template-columns: repeat(4, 1fr); } }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.vstack { display: grid; gap: var(--s4); }
.vstack > * { min-width: 0; }
.vstack.tight { gap: var(--s2); }
.vstack.end { align-items: flex-end; }
.mt-1 { margin-top: var(--s1); } .mt-2 { margin-top: var(--s2); } .mt-3 { margin-top: var(--s3); } .mt-4 { margin-top: var(--s4); } .mt-5 { margin-top: var(--s5); } .mt-6 { margin-top: var(--s6); } .mt-7 { margin-top: var(--s7); } .mt-8 { margin-top: var(--s8); }
.mb-2 { margin-bottom: var(--s2); } .mb-3 { margin-bottom: var(--s3); } .mb-4 { margin-bottom: var(--s4); } .mb-6 { margin-bottom: var(--s6); }

/* Menus */
.menu { display: grid; gap: 2px; }
.menu button, .menu a { display: flex; align-items: center; gap: var(--s3); min-height: 54px; padding: 0 var(--s3); border: 0; border-radius: var(--arch-sm); background: none; text-align: left; text-decoration: none; font-weight: 800; color: var(--ink); width: 100%; }
.menu button:hover, .menu a:hover { background: var(--panel); }
.menu svg { width: 22px; height: 22px; }
.menu .chev { margin-left: auto; }
.menu .danger { color: var(--no-ink); }

/* The seat chart: the band in its horseshoe, each seat coloured by who's coming. */
.seatchart { position: relative; width: 100%; }
.seatchart svg { width: 100%; height: auto; overflow: visible; }
.seatchart .seat circle { transition: transform var(--mid) var(--spring); transform-box: fill-box; transform-origin: center; }
.seatchart .seat text { font-family: var(--font); font-weight: 800; font-size: 11px; text-anchor: middle; dominant-baseline: central; pointer-events: none; fill: #111311; }
.seatchart .seat.clickable { cursor: pointer; }
.seatchart .seat.clickable:hover circle, .seatchart .seat:focus-visible circle { transform: scale(1.15); }
.seatchart .seat:focus { outline: none; }
.seatchart .seat:focus-visible circle { stroke: var(--focus); stroke-width: 4; }
.seatchart .s-yes circle { fill: var(--yes); }
.seatchart .s-maybe circle { fill: var(--maybe); }
.seatchart .s-no circle { fill: var(--no); }
.seatchart .s-dep circle { fill: var(--dep); }
.seatchart .s-unknown circle { fill: var(--unknown); }
.seatchart .s-empty circle { fill: transparent; stroke: var(--empty); stroke-width: 2.5; stroke-dasharray: 4 4; }
.seatchart .s-empty text { fill: var(--faint); }
.seatchart .s-filled circle { fill: var(--ink); }
.seatchart .s-filled text { fill: var(--on-ink); }
.seatchart .s-wanted circle { fill: var(--brass); stroke: var(--ink); stroke-width: 3; }
.seatchart .s-off circle { fill: var(--rule-strong); }
.seatchart .stand { fill: var(--ink); }
.on-brass .seatchart .s-unknown circle { fill: #ffffff; }
.on-brass .seatchart .s-empty circle { stroke: #6e5a1a; }
.on-brass .seatchart .stand { fill: #111311; }
.on-brass .seatchart .s-off circle { fill: rgba(17, 19, 17, 0.3); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--text-sm); font-weight: 800; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.legend .l-yes { background: var(--yes); }
.legend .l-maybe { background: var(--maybe); }
.legend .l-no { background: var(--no); }
.legend .l-dep { background: var(--dep); }
.legend .l-unknown { background: var(--unknown); }
.legend .l-empty { border: 2px dashed var(--empty); }
.legend .l-off { width: 6px; height: 6px; margin: 0 3px; background: var(--rule-strong); }
.on-brass .legend .l-off { background: rgba(17, 19, 17, 0.3); }
.on-brass .legend .l-unknown { background: #ffffff; }

/* The calendar: a month with the chosen day beside it, and the year at a glance */
.cal { display: grid; gap: var(--s6); }
.cal-main, .cal-side { min-width: 0; }
.cal-foot { margin-top: calc(var(--s2) * -1); }
@media (min-width: 1360px) {
  .cal { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: 'main side' 'foot side'; align-items: start; row-gap: var(--s4); }
  .cal-main { grid-area: main; }
  .cal-side { grid-area: side; position: sticky; top: var(--s6); }
  .cal-foot { grid-area: foot; margin-top: 0; }
}
@media (min-width: 1440px) { .cal { grid-template-columns: minmax(0, 1fr) 340px; column-gap: var(--s7); } }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.cal-title { margin: 0; font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: var(--text-2xl); letter-spacing: -0.025em; line-height: 1.05; }
.cal-title span { color: var(--muted); font-weight: 800; }
.cal-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 26px; margin-bottom: var(--s4); }
.cal-sum p { margin: 0; }
.tag.to-answer { border: 0; font-family: inherit; cursor: pointer; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule-strong); }
.tag.to-answer:hover { background: var(--panel-2); }
.tag.to-answer:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { margin-bottom: 4px; }
.cal-dow span { padding: 2px 0; text-align: center; font-size: var(--text-xs); font-weight: 800; color: var(--muted); }
.cal-day { -webkit-appearance: none; appearance: none; position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 5px; min-width: 0; min-height: 112px; margin: 0; padding: 6px; border: 0; border-radius: 10px 10px 0 0; background: var(--panel); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background var(--fast) var(--ease); }
.cal-day:hover { background: var(--panel-2); }
.cal-day.other { background: transparent; }
.cal-day.other .cal-marks { opacity: 0.5; }
.cal-day.other .cal-ev { height: 7px; padding: 0; border-radius: 3px 3px 0 0; }
.cal-day.other .cal-ev .t, .cal-day.other .cal-ev .w, .cal-day.other .cal-fill { display: none; }
.cal-day[aria-pressed='true'] { box-shadow: inset 0 0 0 3px var(--ink); }
.cal-day:focus-visible { z-index: 1; outline: 3px solid var(--focus); outline-offset: 2px; }
.cal-n { align-self: flex-start; padding: 4px 6px 3px; border-radius: 7px 7px 0 0; font-family: var(--font-display); font-stretch: var(--wide); font-weight: 800; font-size: var(--text); line-height: 1; }
.cal-day.past .cal-n, .cal-day.other .cal-n { color: var(--muted); }
.cal-day.today .cal-n { background: var(--brass); color: var(--on-bright); }
.cal-marks { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-more { padding: 0 2px; font-size: 11px; font-weight: 800; line-height: 1.2; color: var(--muted); }

/* A date in the month, and the same marks in the key. The fill says the kind of date; the way it is
   drawn says where you stand: solid going, hollow to answer, striped maybe, faded not going. */
.cal-ev, .sw { --edge: var(--type); position: relative; display: block; border-radius: 6px 6px 0 0; background: var(--type); }
.cal-ev.t-rehearsal, .cal-ev.t-other, .sw.t-rehearsal, .sw.t-other { --edge: var(--t-mark); }
.cal-ev { min-width: 0; padding: 4px 7px 5px; color: var(--on-bright); font-size: 12px; line-height: 1.2; }
.cal-ev .t, .cal-ev .w { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-ev .t { font-weight: 800; }
.cal-ev .w { margin-top: 1px; font-size: 11px; font-weight: 700; }
.cal-ev.t-rehearsal, .cal-ev.t-other { color: var(--ink); }
/* Past dates sit back: a paler tint behind the same ink. */
:where(.cal-day.past) .cal-ev { color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
:where(.cal-day.past) .cal-ev.t-rehearsal, :where(.cal-day.past) .cal-ev.t-other { --type: var(--panel-2); }
:where(.cal-day.past) .cal-ev.t-concert { --type: color-mix(in srgb, var(--t-concert) 40%, var(--card)); }
:where(.cal-day.past) .cal-ev.t-contest { --type: color-mix(in srgb, var(--t-contest) 40%, var(--card)); }
:where(.cal-day.past) .cal-ev.t-engagement { --type: color-mix(in srgb, var(--t-engagement) 40%, var(--card)); }
:where(.cal-day.past) .cal-ev.t-social { --type: color-mix(in srgb, var(--t-social) 40%, var(--card)); }
.cal-ev.s-open, .sw.s-open { background: var(--card); color: var(--ink); box-shadow: inset 4px 0 0 var(--edge), inset 0 0 0 1.5px var(--rule-strong); }
.cal-ev.s-maybe, .sw.s-maybe { background: var(--stripes) var(--type); box-shadow: inset 4px 0 0 var(--edge); }
.cal-ev.s-maybe.t-rehearsal, .cal-ev.s-maybe.t-other { background-image: var(--stripes-grey); }
.cal-ev.s-no, .cal-ev.s-cancelled, .sw.s-no { background: color-mix(in srgb, var(--type) 35%, var(--card)); color: var(--muted); box-shadow: inset 0 0 0 1px var(--rule); }
.cal-ev.s-cancelled { text-decoration: line-through; }
.cal-ev.s-dep, .sw.s-dep { box-shadow: inset 4px 0 0 var(--dep); }
/* A sectional for other players: an outline in the day, nothing to answer. */
.cal-ev.s-off, .sw.s-off { background: transparent; color: var(--muted); box-shadow: none; outline: 1.5px dashed var(--rule-strong); outline-offset: -1.5px; }
.cal-ev.s-open, .cal-ev.s-maybe, .cal-ev.s-dep { padding-left: 10px; }
.cal-ev.clash, .sw.clash { outline: 2.5px solid var(--no-ink); outline-offset: -2.5px; }
.clash-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cal-fill { position: absolute; left: 0; bottom: 0; width: calc(var(--share) * 100%); height: 3px; background: var(--yes); }
.cal-fill.l-maybe { background: var(--maybe); }
.cal-fill.l-no { background: var(--no); }

@media (max-width: 639px) {
  .cal-head { flex-wrap: wrap; row-gap: var(--s3); }
  .cal-head .btn-row { flex-wrap: nowrap; }
  .cal-title { font-size: var(--text-xl); }
  .cal-title span { display: block; margin-top: 3px; font-size: var(--text-md); }
  .cal-dow, .cal-grid { gap: 3px; }
  .cal-day { min-height: 62px; gap: 4px; padding: 4px 3px 5px; border-radius: 8px 8px 0 0; }
  .cal-n { padding: 3px 4px 2px; font-size: 13px; }
  .cal-ev { height: 7px; padding: 0; border-radius: 3px 3px 0 0; font-size: 0; }
  .cal-ev .t, .cal-ev .w { display: none; }
  .cal-ev.s-open, .cal-ev.s-maybe, .cal-ev.s-dep { padding: 0; }
  .cal-ev.t-rehearsal, .cal-ev.t-other { --type: var(--t-mark); }
  :where(.cal-day.past) .cal-ev.t-rehearsal, :where(.cal-day.past) .cal-ev.t-other { --type: color-mix(in srgb, var(--t-mark) 45%, var(--card)); }
  .cal-ev.s-open { box-shadow: inset 0 0 0 1.5px var(--edge); }
  .cal-fill { display: none; }
  .cal-more { font-size: 10px; line-height: 1; }
}

/* The chosen day */
.cal-day-title { margin: 0 0 var(--s2); font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: var(--text-lg); letter-spacing: -0.02em; line-height: 1.15; }
.cal-day-title span { display: block; margin-bottom: 4px; font-family: var(--font); font-stretch: normal; font-size: var(--text-xs); font-weight: 800; letter-spacing: 0; color: var(--brass-ink); }
.cal-side > p { margin: var(--s2) 0 0; }
.cal-next { margin: var(--s6) 0 0; font-size: var(--text-xs); font-weight: 800; color: var(--muted); }
.event-row .note { margin-top: 6px; }
.event-row .for-line { display: flex; align-items: flex-start; gap: 5px; }
.event-row .for-line svg { flex: none; width: 15px; height: 15px; margin-top: 0.2em; }

/* The key */
.cal-key { display: grid; gap: var(--s2); margin-top: var(--s4); font-size: var(--text-xs); font-weight: 700; color: var(--muted); }
.cal-key > div { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.cal-key span { display: inline-flex; align-items: center; gap: 6px; }
.cal-key .sw { flex: none; width: 24px; height: 13px; }
.cal-key.year .sw.t-rehearsal, .cal-key.year .sw.t-other { background: var(--t-mark); }

/* The year */
.cal-year { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (min-width: 640px) { .cal-year { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); } }
@media (min-width: 1100px) { .cal-year { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .cal-year { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cal-mini { min-width: 0; padding: var(--s3) var(--s3) var(--s4); border-radius: var(--arch); background: var(--panel); }
.cal-mini.now { box-shadow: inset 0 0 0 3px var(--brass); }
.cal-mini-head { display: inline-block; margin-bottom: var(--s2); font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: var(--text-md); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.cal-mini-head:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.cal-mini-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-mini-grid i { aspect-ratio: 1; border-radius: 3px 3px 0 0; background: var(--card); cursor: pointer; }
.cal-mini-grid i.blank { background: none; cursor: default; }
.cal-mini-grid i.has { background: var(--type); }
.cal-mini-grid i.has.t-rehearsal, .cal-mini-grid i.has.t-other { background: var(--t-mark); }
.cal-mini-grid i.past.has { opacity: 0.45; }
.cal-mini-grid i.today { box-shadow: 0 0 0 2px var(--ink); }
.cal-mini p { margin: var(--s2) 0 0; font-size: var(--text-xs); line-height: 1.4; color: var(--muted); }

/* Meters */
.meter { height: 10px; border-radius: 5px; background: var(--panel); overflow: hidden; display: flex; }
.meter i { display: block; height: 100%; background: var(--yes); }
.meter i.maybe { background: var(--maybe); }
.meter i.no { background: var(--no); }

/* QR codes */
.qr { background: #fff; padding: 12px; border-radius: var(--arch); display: inline-block; }
.qr svg { width: 172px; height: 172px; }

/* Home */
.hero { position: relative; }
.hero-band { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: var(--text-sm); text-decoration: none; margin-bottom: var(--s4); }
.hero-band:hover span { text-decoration: underline; }
.hero-title a { text-decoration: none; }
.hero-title a:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.ink-block .hero-date, .ink-block .hero-title { color: var(--brass); }
a.formation { display: grid; text-decoration: none; color: inherit; transition: background var(--fast) var(--ease); }
a.formation:hover { background: rgba(255, 255, 255, 0.75); }
.jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2); }
.job { display: grid; gap: 4px; align-content: start; padding: var(--s4); border-radius: var(--arch-lg); background: var(--ink-block); color: #ffffff; text-decoration: none; transition: transform var(--fast) var(--ease); }
.job:active { transform: scale(0.98); }
.job .n { font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: var(--text-3xl); line-height: 1; color: var(--brass); letter-spacing: -0.03em; }
.job .what { font-weight: 800; line-height: 1.25; }
.job .band-line { color: #c9ccc7; }
.band-line { display: flex; align-items: center; gap: 6px; font-size: var(--text-xs); font-weight: 700; margin-top: 4px; min-width: 0; }
.band-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.band-line .badge { --size: 20px; font-size: 10px; }
.dep-ask { padding: var(--s5); position: relative; }
.dep-ask .h3 { color: var(--brass); }
.dep-seat { font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: var(--text-2xl); line-height: 1.05; letter-spacing: -0.03em; margin-top: var(--s2); }
.dep-band { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-top: var(--s2); }
.dep-more { position: absolute; right: var(--s5); bottom: calc(100% - 52px); font-size: var(--text-sm); font-weight: 800; color: inherit; }
.dep-ask .dep-more { position: static; display: inline-block; margin-top: var(--s3); }
.month-head { font-size: var(--text-md); margin: var(--s6) 0 var(--s1); padding-top: var(--s2); }
.rows > .month-head:first-child { margin-top: 0; }
.post { padding: var(--s4) 0; border-top: 1px solid var(--rule); }
.panel .post:first-of-type, .section-head + .post { border-top: 0; padding-top: var(--s1); }
.post-head { display: flex; gap: 10px; align-items: center; margin-bottom: var(--s2); }
.post-head a { text-decoration: none; }
.post-head a:hover { text-decoration: underline; }
.post-head .sub { color: var(--muted); font-size: var(--text-xs); font-weight: 700; }
.post p { line-height: 1.5; }
.post img { width: 100%; max-height: 380px; object-fit: cover; border-radius: var(--arch); margin-top: var(--s3); }
.band-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 var(--s3) 0 6px; border-radius: var(--arch-sm); background: var(--panel); font-weight: 800; font-size: var(--text-sm); text-decoration: none; }
.band-chip:hover { background: var(--panel-2); }
.home .main-col { min-width: 0; }

/* Band pages */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s5); }
.select-sm { min-height: 44px; width: auto; padding-top: 8px; padding-bottom: 8px; font-weight: 700; font-size: var(--text-sm); }
.subtabs { margin: calc(var(--s2) * -1) 0 var(--s5); padding: 0; flex-wrap: wrap; overflow: visible; }
.subtabs a { background: transparent; box-shadow: inset 0 0 0 2px var(--rule-mid); }
.subtabs a:hover { background: var(--panel); }
.subtabs [aria-current='page'] { box-shadow: none; }
.actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--s2); }
.actions-grid a { display: grid; gap: var(--s2); justify-items: start; padding: var(--s4); border-radius: var(--arch-lg); background: var(--panel); text-decoration: none; font-weight: 800; line-height: 1.2; transition: background var(--fast) var(--ease), transform var(--fast) var(--ease); }
.actions-grid a:hover { background: var(--panel-2); }
.actions-grid a:active { transform: scale(0.98); }
.actions-grid svg { width: 28px; height: 28px; }
.seats-panel .seatchart { max-width: 520px; margin: 0 auto; }
.seats-panel .seatchart .seat text { font-size: 11px; }
button.row { width: 100%; border: 0; border-top: 1px solid var(--rule); background: none; text-align: left; cursor: pointer; padding-left: var(--s2); padding-right: var(--s2); border-radius: 0; }
.rows > button.row:first-child { border-top: 0; }
button.row:hover { background: var(--panel); }
.pick-list { max-height: 50vh; overflow: auto; }
.pick-list .muted { font-weight: 700; }
.qr-wrap { display: grid; place-items: center; }
.swatches { display: flex; flex-wrap: wrap; gap: var(--s2); }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch span { display: block; width: 40px; height: 40px; border-radius: 12px 12px 0 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--ink); }
.swatch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 6px; }
.upload-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.cover-thumb { width: 96px; height: 56px; object-fit: cover; border-radius: 10px 10px 0 0; }
.narrow-form { max-width: 680px; }
/* The seat editor: the chart beside a list of parts, each with a count to raise or lower. */
.seat-edit .seats-panel { align-self: start; }
/* On a phone the chart stays in view under the top bar while the parts scroll, so each change shows. */
@media (max-width: 1099px) {
  .seat-edit .seats-panel { position: sticky; top: calc(var(--topbar) + env(safe-area-inset-top)); z-index: 5; padding: var(--s2) var(--s3); box-shadow: 0 1px 0 var(--rule); }
  .seat-edit .seats-panel .seatchart svg { max-height: 34vh; margin-inline: auto; display: block; }
  .seat-edit .seats-panel p { margin-top: var(--s1); }
}
@media (min-width: 1100px) { .seat-edit .seats-panel { position: sticky; top: var(--s6); } }
.part-group { display: grid; }
.part-group h2 { margin-bottom: var(--s1); }
.part-row { display: flex; align-items: center; gap: var(--s2); min-height: 52px; border-bottom: 1px solid var(--rule); }
.part-row .grow { font-weight: 700; }
.part-n { min-width: 2.2ch; text-align: center; font-family: var(--font-display); font-stretch: var(--wide); font-weight: 800; font-size: var(--text-md); }
.seating-opt { position: relative; display: block; cursor: pointer; }
.seating-opt input { position: absolute; opacity: 0; }
.seating-opt .panel { display: grid; gap: 6px; padding: var(--s4); box-shadow: inset 0 0 0 2px transparent; transition: box-shadow var(--fast) var(--ease); }
.seating-opt input:checked + .panel { box-shadow: inset 0 0 0 3px var(--ink); background: var(--brass-tint); }
.seating-opt input:focus-visible + .panel { outline: 3px solid var(--focus); outline-offset: 2px; }
.seating-opt .seatchart .s-filled circle { fill: var(--ink); }
.menu .sub { display: block; font-weight: 400; color: var(--muted); font-size: var(--text-sm); }
.menu a .grow, .menu button .grow { display: grid; }
.join .brass-block .badge { box-shadow: 0 0 0 4px #ffffff; }
.danger { color: var(--no-ink); }

/* One date: a block in the colour of its kind, with the answer buttons inside. */
.type-block { background: var(--type, var(--t-other)); color: #111311; border-radius: var(--arch-xl); padding: var(--s6) var(--s5) var(--s5); }
.type-block.on-ink { background: var(--ink-block); color: #ffffff; }
.type-block.on-ink .hero-date { color: var(--brass); }
.type-block.on-brass .type-tag { background: #ffffff; color: #111311; }
.type-block.on-brass .tag.line { box-shadow: inset 0 0 0 2px rgba(17, 19, 17, 0.4); }
.type-block.on-ink .tag.line { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45); }
.type-block.on-ink .type-tag { background: #ffffff; color: #111311; }
.type-block.is-cancelled .hero-title, .type-block.is-cancelled .hero-date { text-decoration: line-through; text-decoration-thickness: 4px; }
.event-hero .hero-title { font-size: clamp(1.7rem, 7.4vw, 2.6rem); }
.answer-box { margin-top: var(--s5); }
.answer-q { font-family: var(--font); font-stretch: 100%; font-size: var(--text); font-weight: 800; letter-spacing: 0; margin-bottom: var(--s2); }
.on-ink .answer button { background: #2b2f2c; color: #ffffff; }
.on-ink .answer button:hover { background: #3a3f3a; }
.on-ink .answer button[aria-pressed='true'] { color: #111311; }
.on-ink .answer button[aria-pressed='true'] svg { color: #111311; }
.on-ink .answer button[aria-pressed='true'].yes { background: var(--yes); }
.on-ink .answer button[aria-pressed='true'].maybe { background: var(--maybe); }
.on-ink .answer button[aria-pressed='true'].no { background: var(--no); }
.note-toggle { margin-top: var(--s3); }
.note-toggle summary { display: inline-flex; align-items: center; min-height: 40px; font-weight: 800; font-size: var(--text-sm); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; list-style: none; }
.note-toggle summary::-webkit-details-marker { display: none; }
.note-toggle[open] summary { text-decoration: none; }
.note-form { display: flex; gap: var(--s2); }
.note-form .input { flex: 1; min-width: 0; background: #ffffff; color: #111311; border-color: rgba(17, 19, 17, 0.35); }
.note-form .input::placeholder { color: #6f7470; }
.on-ink .note-form .input { border-color: transparent; }
.manage-row { margin-top: calc(var(--s1) * -1); }
.chart-panel { display: grid; gap: var(--s4); }
.chart-panel .section-head { margin-bottom: 0; }
.chart-panel .seatchart { max-width: 560px; margin: 0 auto; }
.who { display: grid; gap: var(--s5); }
.who-group h3 { margin-bottom: var(--s2); }
.people { display: flex; flex-wrap: wrap; gap: 6px; }
.person-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 4px var(--s3) 4px 6px; border-radius: var(--arch-sm); background: var(--panel); font-weight: 800; font-size: var(--text-sm); line-height: 1.2; text-decoration: none; }
.person-chip:hover { background: var(--panel-2); }
.person-chip > span:last-child { display: grid; }
.note-text { font-weight: 400; color: var(--muted); font-size: var(--text-xs); }
.programme { display: grid; gap: var(--s3); counter-reset: piece; }
.programme li { display: grid; grid-template-columns: 30px 1fr; column-gap: var(--s2); counter-increment: piece; }
.programme li::before { content: counter(piece); grid-row: span 2; font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: var(--text-lg); line-height: 1.1; }
.stat-line { display: flex; align-items: baseline; gap: var(--s2); font-weight: 800; }
.stat-line .display { font-size: var(--text-3xl); }
.mb-1 { margin-bottom: var(--s1); }

/* Adding a date: big tiles for what kind it is */
.type-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
@media (min-width: 640px) { .type-pick { grid-template-columns: repeat(6, 1fr); } }
.type-opt { position: relative; }
.type-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.type-opt span { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 84px; padding: var(--s3) var(--s2); border-radius: var(--arch); background: var(--panel); font-weight: 800; font-size: var(--text-sm); line-height: 1.15; text-align: center; transition: background var(--fast) var(--ease), transform var(--fast) var(--ease); }
.type-opt span svg { width: 28px; height: 28px; }
.type-opt:hover span { background: var(--panel-2); }
.type-opt input:active + span { transform: scale(0.97); }
.type-opt input:checked + span { background: var(--type); color: #111311; box-shadow: inset 0 0 0 3px #111311; }
.type-opt.t-rehearsal input:checked + span, .type-opt.t-other input:checked + span { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.type-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* The register */
.reg { display: flex; gap: 6px; flex: none; }
.reg button { min-height: 44px; padding: 0 var(--s3); border: 0; border-radius: var(--arch-sm); background: var(--panel); color: var(--ink); font-weight: 800; font-size: var(--text-sm); transition: background var(--fast) var(--ease), transform var(--fast) var(--ease); }
.reg button:hover { background: var(--panel-2); }
.reg button:active { transform: scale(0.95); }
.reg .here[aria-pressed='true'] { background: var(--yes); color: #111311; }
.reg .away[aria-pressed='true'] { background: var(--no); color: #111311; }
.reg-row .avatar { --size: 36px; }
.sticky-save { position: sticky; bottom: calc(var(--tabbar) + var(--s2) + env(safe-area-inset-bottom)); z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s7); padding: var(--s3) var(--s3) var(--s3) var(--s5); background: var(--card); border: 1px solid var(--rule); border-radius: var(--arch-lg); box-shadow: var(--shadow-pop); }
@media (min-width: 960px) { .sticky-save { bottom: var(--s4); } }

/* Attendance */
.att-row { align-items: center; }
.dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.dots i { width: 10px; height: 12px; border-radius: 4px 4px 0 0; background: var(--panel-2); }
.dots i.h { background: var(--yes); }
.dots i.a { background: var(--no); }
.att-pct { display: grid; justify-items: end; text-align: right; flex: none; }
.att-pct .display { font-size: var(--text-xl); }
.pick-pieces { display: grid; gap: 2px; max-height: 55vh; overflow: auto; margin-top: var(--s3); }

/* Deps */
.busy { display: flex; flex-wrap: wrap; gap: 6px; }
.busy .tag { height: 38px; padding: 0 4px 0 12px; font-size: var(--text-sm); }
.busy .tag button { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px 8px 0 0; background: none; color: inherit; }
.busy .tag button:hover { background: var(--panel-2); }
.dep-msg { font-style: italic; }
.dep-req { display: grid; align-content: start; }
.dep-req .dep-seat { font-size: var(--text-xl); margin-top: 0; }

/* Buttons and menus sitting on a grey panel get a white face so they still read as buttons. */
.panel .btn:where(:not(.btn-main, .btn-dark, .btn-brass, .btn-danger, .btn-white, .btn-quiet, .btn-line)) { --b-bg: var(--card); }
.panel .btn:where(:not(.btn-main, .btn-dark, .btn-brass, .btn-danger, .btn-white, .btn-quiet, .btn-line)):hover { --b-bg: var(--panel-2); }
.panel .menu button:hover, .panel .menu a:hover, .panel button.row:hover { background: var(--panel-2); }
.panel .chip span, .panel .seg { background: var(--card); }

/* Four big tiles for running a date */
.tool-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: var(--s2); }
.tool-tiles a, .tool-tiles button { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 72px; padding: var(--s2); border: 0; border-radius: var(--arch); background: var(--panel); color: var(--ink); font-weight: 800; font-size: var(--text-sm); line-height: 1.15; text-align: center; text-decoration: none; transition: background var(--fast) var(--ease), transform var(--fast) var(--ease); }
.tool-tiles svg { width: 26px; height: 26px; }
.tool-tiles a:hover, .tool-tiles button:hover { background: var(--panel-2); }
.tool-tiles a:active, .tool-tiles button:active { transform: scale(0.97); }
.tool-tiles .hot { background: var(--ink); color: var(--on-ink); }
.tool-tiles .hot:hover { background: var(--ink-2); }
@media (min-width: 640px) { .tool-tiles { grid-template-columns: repeat(4, minmax(0, 132px)); } }

/* A short explanation with the page's main button under it */
.intro { display: grid; gap: var(--s4); justify-items: start; margin-bottom: var(--s7); max-width: 62ch; }
.event-hero .hero-date { margin-top: var(--s4); }

/* Finding things */
.find-bar { display: grid; gap: var(--s3); align-items: end; }
.find-bar .btn { min-height: 52px; }
@media (min-width: 720px) { .find-bar { grid-template-columns: minmax(160px, 1.2fr) repeat(auto-fit, minmax(140px, 1fr)); } .find-bar .btn { align-self: end; } }
.filter-row { margin-top: var(--s4); overflow-x: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
a.type-block { display: block; text-decoration: none; transition: transform var(--fast) var(--ease); }
a.type-block:active { transform: scale(0.99); }
.feature { margin-top: var(--s6); }
.feature .hero-date { margin-top: var(--s4); }
.feature:hover .hero-title { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.12em; }
.feature-band { display: flex; align-items: center; gap: 10px; margin-top: var(--s4); font-weight: 800; }
.sponsor { display: grid; gap: var(--s2); justify-items: start; padding: var(--s4); border-radius: var(--arch-lg); border: 1px solid var(--rule); text-decoration: none; }
.sponsor img { max-height: 48px; width: auto; }
.sponsor:hover { border-color: var(--rule-strong); }
.band-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
@media (min-width: 720px) { .band-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.band-card { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border-radius: var(--arch-lg); background: var(--panel); }
.band-card-link { display: flex; align-items: center; gap: var(--s4); flex: 1; min-width: 0; text-decoration: none; }
.band-card-link .badge { --size: 60px; }
.band-card-link h2 { overflow-wrap: anywhere; }
@media (max-width: 379px) { .band-card { padding: var(--s3); } .band-card-link { gap: var(--s3); } .band-card-link .badge { --size: 48px; } }
.band-card-link:hover h2 { text-decoration: underline; }
.band-card .btn[aria-pressed='true'] { --b-bg: var(--card); }
.block { display: block; }
.contest-grid { display: grid; gap: var(--s3); }
@media (min-width: 720px) { .contest-grid { grid-template-columns: 1fr 1fr; } }
.contest-card { display: flex; align-items: center; gap: var(--s4); padding: var(--s4); border-radius: var(--arch-lg); background: var(--panel); text-decoration: none; transition: background var(--fast) var(--ease); }
.contest-card:hover { background: var(--panel-2); }
.contest-date { flex: none; display: grid; place-content: center; text-align: center; width: 72px; height: 80px; border-radius: 18px 18px 0 0; background: var(--t-contest); color: #111311; line-height: 1; }
.contest-date .d { font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: 32px; letter-spacing: -0.03em; }
.contest-date .m { font-weight: 800; font-size: 13px; margin-top: 4px; }
.vacancy { display: grid; align-content: start; }
.vacancy-seat { font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: var(--text-xl); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: var(--s2); }
.vacancy .dep-band { text-decoration: none; }
.vacancy .dep-band:hover span { text-decoration: underline; }

/* A band's public page */
.band-cover .formation-art { position: absolute; right: -4%; top: 50%; width: min(72%, 560px); transform: translateY(-46%); }
.formation-art circle, .formation-art path { fill: var(--band-fg, #ffffff); opacity: 0.2; }
.band-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
.band-actions .btn[aria-pressed='true'] { --b-bg: var(--panel); }
.org-line { color: var(--muted); }
.org-line a { color: var(--ink); font-weight: 800; }
.public-main > section + section { margin-top: var(--s6); }
.band-id .meta .tag { height: 28px; }
.radio-list { display: grid; gap: 2px; }
.radio { display: flex; align-items: center; gap: var(--s3); min-height: 48px; padding: 0 var(--s3); border-radius: var(--arch-sm); cursor: pointer; font-weight: 700; }
.radio:hover { background: var(--panel); }
.radio input { width: 22px; height: 22px; accent-color: var(--ink); margin: 0; flex: none; }
.donation-amount { justify-items: end; flex: none; }
.radio.two-line { padding-top: var(--s2); padding-bottom: var(--s2); }
.radio .sub { color: var(--muted); font-size: var(--text-sm); font-weight: 400; line-height: 1.35; margin-top: 2px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.amount-chips .chip span { min-width: 64px; justify-content: center; font-size: var(--text); }

/* Buying tickets */
.ticket-types { display: grid; gap: var(--s2); }
.ticket-type { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s3) var(--s3) var(--s4); background: var(--card); border-radius: var(--arch); }
.ticket-type .stepper { background: var(--panel); }
.stepper button:disabled { opacity: 0.35; cursor: default; }
.total-line { display: flex; align-items: baseline; justify-content: space-between; padding-top: var(--s3); border-top: 2px solid var(--ink); font-weight: 800; }
.total-line strong { font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: var(--text-2xl); letter-spacing: -0.02em; }
.public-event .band-card { text-decoration: none; }
.public-event .band-card:hover .h3 { text-decoration: underline; }
a.note { text-decoration: none; color: inherit; }
a.note:hover strong { text-decoration: underline; }

/* Notices */
.post-list { display: grid; gap: var(--s3); max-width: 720px; }
.post-card { padding: var(--s4) var(--s5) var(--s5); border-radius: var(--arch-lg); background: var(--panel); }
.post-card .post-head { align-items: flex-start; }
.post-card .sub { color: var(--muted); font-size: var(--text-xs); font-weight: 700; }
.post-card img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--arch); margin-top: var(--s3); }
.post-card.is-hidden { opacity: 0.6; }
.enquiry { display: grid; align-content: start; }

/* Contests */
.contest-hero .tags .tag.ink { background: #111311; color: #ffffff; }
.contest-section { display: grid; gap: var(--s3); }
.contest-section + .contest-section { margin-top: var(--s6); padding-top: var(--s6); border-top: 1px solid var(--rule); }
.section-top { display: flex; align-items: flex-start; gap: var(--s3); }
.section-top h2 { font-size: var(--text-xl); }
.results-list { display: grid; gap: var(--s2); }
.result-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--arch-sm); background: var(--panel); }
.result-row .title { font-weight: 800; }
.result-row .sub { color: var(--muted); font-size: var(--text-sm); }
.result-row.winner { background: var(--brass); color: #111311; }
.result-row.winner .sub { color: #3d3a2c; }
.result-row.winner .placing { background: #111311; color: var(--brass); }
.result-row .placing { width: 60px; height: 44px; font-size: var(--text-md); }
.points { font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: var(--text-lg); font-variant-numeric: tabular-nums; }
.draw-row a { color: inherit; }
.run-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; counter-reset: step; }
.run-steps li { counter-increment: step; display: grid; gap: 6px; font-size: var(--text-xs); font-weight: 800; color: var(--muted); }
.run-steps li::before { content: ''; height: 6px; border-radius: 3px; background: var(--rule-mid); }
.run-steps li.done { color: var(--ink); }
.run-steps li.done::before { background: var(--ink); }
.run-steps li.now { color: var(--ink); }
.run-steps li.now::before { background: var(--brass); }
.stage-panel { padding: var(--s5); border-radius: var(--arch-xl); background: var(--ink-block); color: #ffffff; }
.stage-panel .small { color: #c9ccc7; }
.stage-now { font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: clamp(1.6rem, 7vw, 2.4rem); line-height: 1.02; letter-spacing: -0.02em; color: var(--brass); margin-top: var(--s1); }
.stage-panel .btn-lg { white-space: normal; text-align: left; height: auto; min-height: 60px; padding-top: 10px; padding-bottom: 10px; }
.stage-panel .link-btn { color: #ffffff; }
.pos-tile { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px 11px 0 0; background: var(--card); font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-variant-numeric: tabular-nums; }
.place-input { width: 76px; min-height: 44px; padding: 6px 10px; text-align: center; font-weight: 800; font-size: var(--text-md); }

/* Tickets */
.ticket-list { display: grid; gap: var(--s3); }
.ticket .qr { padding: 8px; }
.ticket .qr svg { width: 128px; height: 128px; }
.type-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); align-items: end; padding: var(--s3); background: var(--card); border-radius: var(--arch); position: relative; }
.type-row .field:first-child { grid-column: 1 / -1; padding-right: 44px; }
.type-row .input { min-height: 44px; padding: 8px 12px; }
.type-row label { font-size: var(--text-xs); }
.type-row [data-remove-type] { position: absolute; top: 6px; right: 6px; width: 40px; min-height: 40px; }
.door-count { font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: var(--text-xl); }
.scan-start { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.small-code { font-size: var(--text-lg); min-height: 52px; letter-spacing: 0.15em; }
.scan-result .display { font-size: var(--text-2xl); }

/* Band Plus */
.plan-hero .hero-date { font-size: clamp(2rem, 9vw, 3rem); }
.plan-ended .hero-date { font-size: clamp(1.6rem, 7vw, 2.4rem); }
.plan-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s5); }
.plan-card { display: flex; flex-direction: column; }
.plan-card .s-list { margin-top: var(--s5); }
.plan-card .btn-row { margin-top: auto; padding-top: var(--s6); }
.plan-per { margin-top: 6px; font-weight: 700; }
.bill { display: grid; margin: 0; }
.bill > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); padding: var(--s3) 0; border-top: 1px solid var(--rule); }
.bill dt { font-weight: 800; }
.bill dd { margin: 0; font-weight: 800; white-space: nowrap; text-align: right; }
.plan-notes { display: grid; gap: var(--s2); padding-left: 1.1em; list-style: disc; }
.plan-note { margin: var(--s4) 0; }
.plan-note a { font-weight: 800; }
.fee-note { align-items: center; flex-wrap: wrap; }
.fee-note .btn { flex: none; }
.piece-row { align-items: flex-start; }
button.row:disabled { cursor: default; color: inherit; }
button.row:disabled:hover { background: none; }
.ref-tile { flex: none; display: grid; place-items: center; min-width: 52px; height: 40px; padding: 0 6px; border-radius: 11px 11px 0 0; background: var(--panel); font-family: var(--font-display); font-stretch: 110%; font-weight: 800; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.piece-tags { justify-items: end; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: var(--text-sm); }
.seg-link { display: grid; place-items: center; width: 44px; min-height: 44px; border-radius: var(--arch-sm); color: var(--ink); }
.seg-link:hover { background: var(--panel-2); }
.seg-now { display: grid; place-items: center; min-height: 44px; padding: 0 var(--s3); font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-variant-numeric: tabular-nums; }

/* You */
.me-head { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.me-head .grow { flex: 1 1 220px; }
.me-head .lead { margin-top: var(--s2); }
.avatar-edit { position: relative; cursor: pointer; border-radius: 50%; }
.avatar-edit:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.avatar-cam { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--on-ink); box-shadow: 0 0 0 3px var(--bg); }
.avatar-cam svg { width: 18px; height: 18px; }
.pref-table { width: 100%; table-layout: fixed; }
.pref-table td, .pref-table th { padding: var(--s3) var(--s2); background: none; }
.pref-table td:first-child { overflow-wrap: anywhere; }
.pref-table th { color: var(--muted); font-size: var(--text-xs); }
.pref-table tbody tr:hover td { background: none; }
.pref-table .c { text-align: center; width: 64px; }
.tick { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.tick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tick span { width: 26px; height: 26px; border-radius: 8px 8px 0 0; border: 2px solid var(--rule-strong); background: var(--card); display: grid; place-items: center; transition: background var(--fast) var(--ease); }
.tick input:checked + span { background: var(--ink); border-color: var(--ink); }
.tick input:checked + span::after { content: ''; width: 11px; height: 6px; border-left: 3px solid var(--brass); border-bottom: 3px solid var(--brass); transform: translateY(-2px) rotate(-45deg); }
.tick input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.note-row { align-items: flex-start; }
.note-row .dot { flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: transparent; }
.note-row.unread .dot { background: var(--no); }
.note-row:not(.unread) .title { font-weight: 700; color: var(--ink-2); }
.note-row .when { font-size: var(--text-xs); margin-top: 4px; }
.small-v { font-size: var(--text-lg) !important; letter-spacing: -0.01em; }
.mail-body { white-space: pre-wrap; font-family: var(--font); font-size: var(--text-sm); line-height: 1.5; margin: 0; }
.quote { padding: var(--s3) var(--s4); border-radius: var(--arch-sm); background: var(--panel); font-size: var(--text-sm); }
.sponsor-logo { width: 72px; height: 40px; object-fit: contain; flex: none; }
.legend .l-wanted { background: var(--brass); box-shadow: inset 0 0 0 2px var(--ink); }
.feature .hero-date { white-space: normal; font-size: clamp(2.1rem, 10vw, 3.3rem); }

/* Small fixes found in the phone pass */
.split > * { min-width: 0; }
.search-form { flex: 1 1 260px; }
.section-head { flex-wrap: wrap; }
.code-input::placeholder { letter-spacing: 0; font-family: var(--font); font-stretch: 100%; font-weight: 400; font-size: var(--text); }
.mb-1 { margin-bottom: var(--s1); } .mb-5 { margin-bottom: var(--s5); } .mb-7 { margin-bottom: var(--s7); } .mb-8 { margin-bottom: var(--s8); }
@media (max-width: 639px) { .stats > :last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* Coloured surfaces bring their own colours, so anything placed on them reads in light and dark mode. */
.brass-block, .on-brass, .s-brass, .s-pink, .result-row.winner, .stat.brass {
  --ink: #111311; --ink-2: #2b2f2c; --muted: #4a4636; --faint: #5b5f5c; --on-ink: #ffffff;
  --card: #ffffff; --panel: #ffffff; --panel-2: #f3f3ef; --rule: rgba(17, 19, 17, 0.16); --rule-mid: rgba(17, 19, 17, 0.32); --rule-strong: #5b5f5c;
}
.ink-block, .on-ink, .s-ink, .stage-panel, .price-card.ink, .job {
  --ink: #ffffff; --ink-2: #e7e8e4; --muted: #c9ccc7; --faint: #a9ada9; --on-ink: #111311;
  --card: #1b1e1b; --panel: #2b2f2c; --panel-2: #3a3f3a; --rule: #2e332e; --rule-mid: #444944; --rule-strong: #8d918d;
}
.dep-hero { font-size: clamp(2rem, 10vw, 3rem); }
.report-pic { display: block; max-width: 100%; max-height: 260px; border-radius: var(--arch-sm); }
.report-thread { display: grid; gap: var(--s2); padding: 0; list-style: none; }
.report-thread li { display: grid; gap: 2px; padding: var(--s2) var(--s3); border-radius: 10px 10px 0 0; background: var(--panel); }
.report-thread li.reported { background: var(--brass-tint); box-shadow: inset 3px 0 0 var(--brass); }

/* Chat: the list of chats */
.narrow-col { max-width: 720px; }
.chat-list { display: grid; }
.chat-row { display: flex; align-items: center; gap: var(--s3); min-height: 74px; padding: var(--s3) 0; border-top: 1px solid var(--rule); color: inherit; text-decoration: none; }
.chat-row:first-child { border-top: 0; }
.chat-row > .grow { display: grid; gap: 3px; min-width: 0; }
.chat-row-line { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.chat-row .name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 800; }
.chat-row:hover .name { text-decoration: underline; text-underline-offset: 0.2em; }
.chat-row .when { flex: none; font-size: var(--text-xs); font-weight: 700; color: var(--muted); }
.chat-row .band-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--text-xs); font-weight: 700; color: var(--muted); }
.chat-row .preview { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--text-sm); color: var(--muted); }
.chat-row.unread .preview { color: var(--ink); font-weight: 700; }
.chat-row.unread .when { color: var(--brass-ink); }
.chat-row .muted-mark { display: inline-grid; color: var(--muted); }
.chat-row .muted-mark svg { width: 16px; height: 16px; }
.count.quiet { background: var(--panel-2); color: var(--ink); }
.chat-badge { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px 9px 0 0; background: var(--brass-tint); color: var(--brass-ink); font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: 12px; letter-spacing: -0.02em; }
.chat-badge.admins { background: var(--ink); color: var(--on-ink); }
.chat-badge svg { width: 17px; height: 17px; }

/* Chat: a conversation. On a phone it takes the whole screen: its own bar at the top, the box to type
   in at the bottom, and no tab bar. */
body.in-room .tabbar { display: none; }
body.in-room .main { padding-bottom: 0; }
@media (max-width: 959px) {
  body.in-room .topbar { display: none; }
  body.in-room .main { padding-top: 0; }
}
.chat-room { display: flex; flex-direction: column; max-width: 820px; min-height: 100dvh; margin: 0 auto; }
@media (min-width: 960px) { .chat-room { min-height: calc(100dvh - var(--s8)); } }
.room-head { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: var(--s2); padding: calc(env(safe-area-inset-top) + var(--s2)) 0 var(--s2); border-bottom: 1px solid var(--rule); background: var(--bg); }
.room-head > .grow { min-width: 0; }
.room-title { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: var(--text-md); letter-spacing: -0.02em; line-height: 1.2; }
.room-sub { margin: 2px 0 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--text-xs); font-weight: 700; color: var(--muted); }
.room-sub a, .room-sub .link-btn { color: inherit; }
.room-back { margin-left: calc(var(--s2) * -1); }
.room-people { gap: 6px; padding: 0 10px; min-width: 44px; font-weight: 800; }
.room-people svg { width: 20px; height: 20px; }
.room-log { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: var(--s3) 0 var(--s4); }
.room-empty { display: grid; justify-items: center; gap: var(--s2); margin: auto 0; padding: var(--s8) var(--s4); text-align: center; color: var(--muted); }
.room-empty svg { width: 40px; height: 40px; }
.earlier { display: flex; justify-content: center; padding: var(--s2) 0 var(--s4); }
.day-divider { display: flex; justify-content: center; margin: var(--s5) 0 var(--s2); }
.day-divider span { padding: 4px 10px; border-radius: var(--arch-xs); background: var(--panel); font-size: var(--text-xs); font-weight: 800; color: var(--muted); }

.msg { display: flex; align-items: flex-end; gap: var(--s2); min-width: 0; }
.msg.first { margin-top: var(--s3); }
.msg.mine { flex-direction: row-reverse; }
.msg .av { flex: none; width: 26px; }
.pick-row { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pick-row .sub { display: block; }
.pick-row .chev { width: 18px; height: 18px; color: var(--muted); }
.msg .stack-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: min(78%, 34rem); }
.msg.mine .stack-col { align-items: flex-end; }
.bubble { position: relative; max-width: 100%; padding: 7px 11px 6px; border-radius: 14px 14px 0 0; background: var(--panel); color: var(--ink); cursor: pointer; overflow-wrap: anywhere; }
.msg.mine .bubble { background: var(--brass); color: var(--on-bright); }
.bubble .who { display: block; margin-bottom: 2px; font-size: var(--text-xs); font-weight: 800; color: var(--brass-ink); }
.bubble .text { white-space: pre-wrap; line-height: 1.42; }
.bubble .text a { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; }
.bubble .meta { display: block; margin-top: 2px; text-align: right; font-size: 11px; font-weight: 700; color: var(--muted); }
.msg.mine .bubble .meta { color: #5c4a00; }
.msg.removed .bubble { cursor: default; background: transparent; box-shadow: inset 0 0 0 1px var(--rule-mid); }
.msg.removed .text { font-style: italic; color: var(--muted); }
.msg.removed .bubble .meta { color: var(--muted); }
.msg.pending .bubble { opacity: 0.75; }
.msg.failed .bubble { box-shadow: inset 0 0 0 2px var(--no); }
.msg .retry { margin-top: 4px; color: var(--no-ink); }
.msg.flash .bubble { box-shadow: 0 0 0 3px var(--focus); }
.bubble .quote { display: grid; gap: 1px; margin: 2px 0 6px; padding: 5px 9px; border-left: 3px solid var(--brass-2); border-radius: 6px 6px 0 0; background: var(--card); color: inherit; text-decoration: none; font-size: var(--text-sm); }
.msg.mine .bubble .quote { border-left-color: var(--on-bright); background: #ffe28f; }
.bubble .quote b { font-weight: 800; }
.bubble .quote span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bubble .pic { display: block; margin: 2px 0 4px; }
.bubble .pic img { display: block; max-width: min(100%, 480px); max-height: 320px; height: auto; border-radius: 10px 10px 0 0; object-fit: cover; }
.bubble .pic img[style] { max-height: none; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.react { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 8px; border: 0; border-radius: var(--arch-xs); background: var(--card); box-shadow: inset 0 0 0 1px var(--rule-mid); font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.react span { font-size: var(--text-xs); font-weight: 800; }
.react[aria-pressed='true'] { background: var(--brass-tint); box-shadow: inset 0 0 0 1.5px var(--brass-2); }
.msg-more { flex: none; display: grid; place-items: center; width: 32px; height: 32px; align-self: center; border: 0; border-radius: var(--arch-xs); background: none; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity var(--fast) var(--ease); }
.msg-more svg { width: 20px; height: 20px; }
.msg:hover .msg-more, .msg-more:focus-visible { opacity: 1; }
.msg-more:hover { background: var(--panel); color: var(--ink); }
@media (hover: none) { .msg-more { width: 0; overflow: hidden; } .msg-more:focus-visible { width: 32px; } }
.new-pill { position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 6; display: inline-flex; align-items: center; gap: 6px; align-self: center; height: 38px; padding: 0 14px; border: 0; border-radius: var(--arch-sm); background: var(--ink); color: var(--on-ink); font: inherit; font-size: var(--text-sm); font-weight: 800; box-shadow: var(--shadow-pop); cursor: pointer; }
.new-pill[hidden] { display: none; }
.new-pill svg { width: 16px; height: 16px; }

/* The box to type in */
.composer { position: sticky; bottom: 0; z-index: 6; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: var(--s2); padding: var(--s2) 0 calc(var(--s2) + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); background: var(--bg); }
.composer-extra { grid-column: 1 / -1; display: grid; gap: var(--s2); }
.composer-extra[hidden] { display: none; }
.composer-chip { display: flex; align-items: center; gap: var(--s2); min-width: 0; padding: 6px 6px 6px 10px; border-radius: var(--arch-sm); background: var(--panel); }
.composer-chip > svg { flex: none; width: 18px; height: 18px; color: var(--muted); }
.composer-chip .grow { display: grid; min-width: 0; font-size: var(--text-sm); }
.composer-chip .grow span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
.composer-chip img { flex: none; width: 44px; height: 44px; border-radius: 8px 8px 0 0; object-fit: cover; }
.composer textarea { display: block; width: 100%; min-height: 46px; max-height: 160px; padding: 11px 12px; border: 2px solid var(--rule-mid); border-radius: 14px 14px 0 0; background: var(--card); color: var(--ink); font: inherit; line-height: 1.35; resize: none; }
.composer textarea:focus { border-color: var(--ink); outline: none; }
.composer textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.composer .send { display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 12px 12px 0 0; background: var(--ink); color: var(--on-ink); cursor: pointer; }
.composer .send svg { width: 22px; height: 22px; }
.composer .send:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.composer-note { position: sticky; bottom: 0; margin: 0; padding: var(--s3) 0 calc(var(--s3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); background: var(--bg); text-align: center; font-size: var(--text-sm); color: var(--muted); }
.react-pick { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); }
.react-pick button { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: var(--arch-sm); background: var(--panel); font-size: 24px; cursor: pointer; }
.react-pick button[aria-pressed='true'] { background: var(--brass-tint); box-shadow: inset 0 0 0 2px var(--brass-2); }
.person-row { min-height: 56px; }
.spinner { flex: none; width: 22px; height: 22px; border: 3px solid var(--rule-mid); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* Notices from the Bandroom staff, at the top of the app or the website */
.app-body { min-width: 0; }
/* Something shared from another app, waiting for a chat to be chosen. */
.share-what { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: flex-start; margin-top: var(--s5); }
.share-what img { width: 88px; height: 88px; object-fit: cover; border-radius: var(--arch-sm); background: var(--panel); }
.share-words { flex: 1 1 100%; padding: var(--s3) var(--s4); border-left: 3px solid var(--brass); background: var(--panel); white-space: pre-line; overflow-wrap: anywhere; font-size: var(--text-sm); }

/* With no signal: the app shows what the phone saved, and says when. */
.saved-bar { display: flex; align-items: center; gap: 10px; padding: 9px var(--s4); background: var(--ink); color: var(--bg); font-weight: 700; font-size: var(--text-sm); line-height: 1.4; }
.saved-bar > svg { flex: none; width: 18px; height: 18px; }
.saved-bar p { flex: 1; min-width: 0; }
@media (min-width: 640px) { .saved-bar { padding-left: var(--s6); padding-right: var(--s6); } }
@media (min-width: 960px) { .saved-bar { padding-left: var(--s8); padding-right: var(--s8); } }
.notices { display: grid; gap: 1px; }
.notice-bar { display: flex; align-items: flex-start; gap: 10px; padding: 11px var(--s4); background: var(--brass-tint); color: var(--ink); font-weight: 700; font-size: var(--text-sm); line-height: 1.45; }
.notice-bar > svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.notice-bar p { flex: 1; min-width: 0; }
.notice-bar a { font-weight: 800; }
.notice-bar.warning { background: color-mix(in srgb, var(--no) 20%, var(--bg)); }
.notice-x { flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin: -7px -8px -7px 0; border: 0; border-radius: 9px 9px 0 0; background: none; color: inherit; }
.notice-x:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.notice-x svg { width: 18px; height: 18px; }
@media (min-width: 640px) { .notice-bar { padding-left: var(--s6); padding-right: var(--s6); } }
@media (min-width: 960px) { .app .notice-bar { padding-left: var(--s8); padding-right: var(--s8); } }
body.in-room .notices { display: none; }

/* The staff area: its own menu beside the page on a wide screen, a row of tabs above it on a phone */
.staff-grid { display: grid; gap: var(--s5); }
.staff-main { min-width: 0; }
.staff-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--s4) * -1); padding: 0 var(--s4) 2px; }
.staff-nav::-webkit-scrollbar { display: none; }
.staff-nav ul { display: contents; }
.staff-nav a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 10px 10px 0 0; background: var(--panel); color: var(--ink); font-weight: 800; font-size: var(--text-sm); text-decoration: none; white-space: nowrap; }
.staff-nav a:hover { background: var(--panel-2); }
.staff-nav a[aria-current='page'] { background: var(--ink); color: var(--on-ink); }
.staff-nav svg { width: 18px; height: 18px; flex: none; }
@media (min-width: 640px) { .staff-nav { margin: 0 calc(var(--s6) * -1); padding: 0 var(--s6) 2px; } }
@media (min-width: 960px) { .staff-nav { margin: 0; padding: 0 0 2px; } }
@media (min-width: 1180px) {
  .staff-grid { grid-template-columns: 188px minmax(0, 1fr); gap: var(--s8); align-items: start; }
  .staff-nav { position: sticky; top: var(--s8); display: grid; gap: var(--s3); overflow: visible; }
  .staff-nav ul { display: grid; gap: 2px; padding-bottom: var(--s3); border-bottom: 1px solid var(--rule); }
  .staff-nav ul:last-child { padding-bottom: 0; border-bottom: 0; }
  .staff-nav a { display: flex; height: 40px; padding: 0 12px; background: none; border-radius: var(--arch-sm); }
  .staff-nav a:hover { background: var(--panel); }
}
.staff .page-head .context { display: inline-flex; align-items: center; gap: 6px; }
.staff .page-head .context svg { width: 16px; height: 16px; }
.staff .page-head .lead .row-tags { justify-content: flex-start; }
.staff .split { grid-template-columns: minmax(0, 1fr); }
.staff .split .side { position: static; }
.review-signin { display: grid; margin: 0; }
.review-signin > div { padding: var(--s3) 0; border-top: 1px solid var(--rule); }
.review-signin dt { color: var(--muted); font-size: var(--text-sm); }
.review-signin dd { margin: 4px 0 0; font-weight: 800; overflow-wrap: anywhere; }
.review-signin .review-code { font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: var(--text-xl); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 1440px) { .staff .split { grid-template-columns: minmax(0, 1fr) 320px; } .staff .split .side { position: sticky; top: var(--s8); } }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s5); }
.filters a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 9px 9px 0 0; box-shadow: inset 0 0 0 1.5px var(--rule-mid); color: var(--ink); font-weight: 800; font-size: var(--text-sm); text-decoration: none; white-space: nowrap; }
.filters a:hover { background: var(--panel); }
.filters a[aria-current='page'] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.filters .n { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.filters a[aria-current='page'] .n { color: var(--on-ink); }
.search-row { max-width: 520px; margin-bottom: var(--s4); }

.needs { display: grid; gap: var(--s2); margin-bottom: var(--s7); }
.need { display: flex; align-items: center; gap: var(--s4); min-height: 72px; padding: var(--s3) var(--s5); border-radius: var(--arch-lg); background: var(--ink-block); color: #ffffff; text-decoration: none; transition: transform var(--fast) var(--ease); }
.need:active { transform: scale(0.99); }
.need .n { min-width: 1.4em; font-family: var(--font-display); font-stretch: var(--wide); font-weight: 900; font-size: var(--text-2xl); line-height: 1; letter-spacing: -0.03em; color: var(--brass); }
.need .what { flex: 1; min-width: 0; font-weight: 800; font-size: var(--text-md); line-height: 1.3; }
.need:hover .what { text-decoration: underline; text-underline-offset: 0.2em; }
.need .chev { width: 20px; height: 20px; flex: none; }
.need.urgent { box-shadow: inset 6px 0 0 var(--no); }
@media (max-width: 520px) { .need .tag { display: none; } }

.staff-stats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.staff-stats .stat .v { font-variant-numeric: normal; }
.stat .d { margin-top: 4px; color: var(--muted); font-size: var(--text-xs); font-weight: 700; line-height: 1.35; }
.stat.link { transition: background var(--fast) var(--ease); }
.stat.link:hover { background: var(--panel-2); }

.staff-rows .row { padding-left: var(--s2); padding-right: var(--s2); border-radius: 0; }
.staff-rows button.row { width: 100%; border: 0; border-top: 1px solid var(--rule); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.staff-rows button.row:first-child { border-top: 0; }
.staff-rows .row.link:hover, .staff-rows button.row:hover { background: var(--panel); }
.row-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.row-tags:empty { display: none; }
@media (max-width: 640px) {
  .staff-rows .row { flex-wrap: wrap; }
  .staff-rows .row > .row-tags { order: 5; flex-basis: 100%; justify-content: flex-start; margin-top: -4px; }
}
.row-icon { width: 24px; height: 24px; flex: none; color: var(--muted); }
.title.block, .sub.block, .flag-line.block { display: block; }
.badge-stack { display: flex; flex: none; }
.badge-stack .badge + .badge { margin-left: -12px; box-shadow: 0 0 0 2px var(--bg); }
.flag-line { display: flex !important; align-items: center; gap: 5px; margin-top: 4px; color: var(--maybe-ink); font-size: var(--text-xs); font-weight: 800; }
.flag-line svg { width: 15px; height: 15px; flex: none; }
.flag-list { display: grid; gap: 6px; }
.flag-list li { display: flex; align-items: flex-start; gap: 8px; color: var(--maybe-ink); font-weight: 800; font-size: var(--text-sm); }
.flag-list svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.log-list { display: grid; gap: 8px; font-size: var(--text-sm); }
.log-detail { overflow-wrap: anywhere; }
.plain-list { display: grid; gap: 4px; font-weight: 700; }

.kv > div { display: grid; grid-template-columns: minmax(0, 12em) minmax(0, 1fr); gap: var(--s3); padding: 10px 0; border-top: 1px solid var(--rule-mid); }
.kv > div:first-child { border-top: 0; padding-top: 0; }
.kv > div:last-child { padding-bottom: 0; }
.kv dt { color: var(--muted); font-weight: 700; font-size: var(--text-sm); }
.kv dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 520px) { .kv > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

.price-form { max-width: 560px; }
.price-field .affix { display: flex; align-items: center; gap: 8px; max-width: 240px; }
.price-field .affix .unit { flex: none; width: 1.1em; font-weight: 800; font-size: var(--text-md); text-align: center; }
.price-field .affix.wide-unit .unit:last-child { width: auto; font-size: var(--text); }
.price-field .affix .input { flex: 1; font-variant-numeric: tabular-nums; }

.table td.wrap { white-space: normal; overflow-wrap: anywhere; min-width: 150px; }
.no-ink { color: var(--no-ink); }
.mail-body { max-height: 60vh; overflow: auto; margin: 0; padding: var(--s4); border-radius: var(--arch); background: var(--panel); font-family: var(--font); font-size: var(--text-sm); white-space: pre-wrap; overflow-wrap: anywhere; }
.notice-item .notice-bar { border-radius: var(--arch); }

/* Charts: thin brass columns from one baseline, a value on the latest, and a table with the same numbers */
.chart-grid { display: grid; gap: var(--s4); }
@media (min-width: 900px) { .chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .chart-grid.one { grid-template-columns: minmax(0, 1fr); } }
.chart { padding: var(--s5) var(--s5) var(--s4); }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s2); }
.chart-head .btn { flex: none; margin: -6px -10px 0 0; }
.chart-plot { position: relative; border-radius: 6px; touch-action: pan-y; }
.chart-plot:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.chart-svg svg { display: block; overflow: visible; }
.chart .bar { fill: var(--chart); transition: fill var(--fast) var(--ease); }
.chart .bar.on { fill: var(--ink); }
.chart .grid { stroke: var(--rule-mid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .base { stroke: var(--rule-strong); stroke-width: 1; shape-rendering: crispEdges; }
.chart .ytick { fill: var(--muted); font-size: 12px; font-weight: 700; text-anchor: end; dominant-baseline: middle; font-variant-numeric: tabular-nums; }
.chart .xtick { fill: var(--muted); font-size: 12px; font-weight: 700; text-anchor: middle; }
.chart .end { fill: var(--ink); font-size: 13px; font-weight: 800; text-anchor: middle; }
.chart .none { fill: var(--muted); font-size: var(--text-sm); font-weight: 700; text-anchor: middle; dominant-baseline: middle; }
.chart-tip { position: absolute; z-index: 2; display: grid; gap: 1px; min-width: 120px; max-width: 230px; padding: 8px 12px 9px; border-radius: 10px 10px 0 0; background: var(--card); box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--rule-mid); pointer-events: none; font-size: var(--text-sm); line-height: 1.3; }
.chart-tip strong { font-size: var(--text-md); font-weight: 800; }
.chart-tip span { color: var(--muted); font-weight: 700; }
.chart-table { margin-top: var(--s2); }

/* Bandroom's own map: the land as a grid of dots, places in brass, the postcode searched from as a ring.
   Wide screens show it beside the list; narrower ones keep a Map button at the foot of the screen. */
.explore { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); grid-template-areas: 'list' 'side'; }
.explore-map { grid-area: map; display: none; }
.explore-list { grid-area: list; min-width: 0; }
.explore-side { grid-area: side; min-width: 0; }
.map-fab { position: sticky; z-index: 5; bottom: calc(var(--s4) + env(safe-area-inset-bottom)); display: flex; justify-content: center; margin-top: var(--s5); pointer-events: none; }
.map-fab .btn { pointer-events: auto; box-shadow: var(--shadow-pop); }
@media (max-width: 959px) { :root:has(.tabbar) .map-fab { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + var(--s3)); } }
@media (min-width: 1100px) {
  .explore { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: 'list map' 'list side'; align-items: start; column-gap: var(--s6); }
  .explore-map { display: block; }
  .map-fab { display: none; }
}
.map-panel { padding: 0; overflow: hidden; }
.map-panel > h2 { padding: var(--s5) var(--s5) var(--s3); }
.map-box { --map-bg: var(--panel); position: relative; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; background: var(--map-bg); }
.explore-map .map-box { aspect-ratio: 4 / 5; }
.map-box.near { aspect-ratio: 4 / 3; }
.map-box.tall { aspect-ratio: 4 / 5; max-height: 52dvh; border-radius: var(--arch); }
.map-box.venue { aspect-ratio: 16 / 10; max-width: 560px; margin-top: var(--s3); border-radius: var(--arch-sm); }
.panel .map-box.venue { --map-bg: var(--bg); }
.directions { display: flex; width: max-content; align-items: center; gap: 4px; margin-top: var(--s2); font-weight: 700; }
.directions svg { width: 16px; height: 16px; }
/* A map that moves: one finger and the plain wheel are the page's, unless it has the screen to itself. */
.map-live { cursor: grab; touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.map-live.free { touch-action: none; }
.map-live.dragging { cursor: grabbing; }
.map-live:focus-visible { outline: none; }
.map-live:focus-visible::after { content: ''; position: absolute; inset: 0; z-index: 3; border-radius: inherit; box-shadow: inset 0 0 0 3px var(--focus); pointer-events: none; }
.map-layer { position: absolute; transform-origin: 50% 50%; }
.map-layer.gliding { transition: transform var(--mid) var(--ease); }
.map-layer svg { display: block; width: 100%; height: 100%; }
/* Zoom, and back to the start once it has moved: arches standing on the map's bottom edge. */
.map-tools { position: absolute; z-index: 1; right: var(--s3); bottom: 0; display: flex; align-items: flex-end; gap: var(--s2); }
.map-zoom { display: flex; }
.map-tool { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--arch-sm); background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-mid); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background var(--fast) var(--ease); }
.map-tool[hidden] { display: none; }
.map-tool svg { width: 20px; height: 20px; }
.map-zoom .map-tool:first-child { border-radius: 12px 0 0 0; }
.map-zoom .map-tool:last-child { border-radius: 0 12px 0 0; margin-left: -1px; }
@media (hover: hover) { .map-tool:hover { background: var(--panel-2); } }
.map-tool:active { background: var(--panel-2); }
.map-tool[aria-disabled='true'] { color: var(--faint); background: var(--card); cursor: default; }
.map-tool:focus-visible { position: relative; z-index: 1; outline: 3px solid var(--focus); outline-offset: -3px; }
.map-hint { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; margin: 0; padding: var(--s5); background: rgba(17, 19, 17, 0.62); color: #ffffff; font-weight: 800; font-size: var(--text-md); line-height: 1.3; text-align: center; opacity: 0; transition: opacity var(--mid) var(--ease); pointer-events: none; }
.map-hint.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .map-layer.gliding, .map-hint { transition: none; } }
.map-land { fill: none; stroke: var(--map-land); stroke-linecap: round; }
/* Roads, once the map is closer than the whole country: motorways in ink, other main roads in grey, smaller
   roads fainter, each the same width at any zoom. Their numbers sit in small arches. */
.map-roads path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.road.motorway { stroke: var(--ink); stroke-width: 2.4px; }
.road.main { stroke: var(--muted); stroke-width: 1.4px; }
.road.minor { stroke: var(--rule-strong); stroke-width: 0.9px; stroke-opacity: 0.8; }
.map-shield text { font-weight: 800; text-anchor: middle; dominant-baseline: central; letter-spacing: 0.01em; }
.map-shield.motorway path { fill: var(--ink); }
.map-shield.motorway text { fill: var(--bg); }
.map-shield.main path { fill: var(--card); stroke: var(--muted); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.map-shield.main text { fill: var(--ink); }
.map-radius { fill: var(--ink); fill-opacity: 0.05; stroke: var(--ink); stroke-opacity: 0.32; stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.map-towns circle { fill: var(--muted); }
.map-towns text { fill: var(--muted); font-weight: 700; dominant-baseline: central; paint-order: stroke; stroke: var(--map-bg); stroke-linejoin: round; }
.map-you circle { fill: none; stroke: var(--ink); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.map-you .centre { fill: var(--ink); stroke: none; }
.map-pin { outline: none; }
.map-pin .pin { fill: var(--brass); stroke: var(--on-bright); stroke-width: 1.5px; vector-effect: non-scaling-stroke; transition: fill var(--fast) var(--ease); }
.map-count { fill: var(--on-bright); font-weight: 800; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.pickable .map-pin { cursor: pointer; }
.map-pin.on .pin { fill: var(--ink); stroke: var(--ink); }
.map-pin.on .map-count { fill: var(--bg); }
@media (hover: hover) {
  .pickable .map-pin:hover .pin { fill: var(--ink); stroke: var(--ink); }
  .pickable .map-pin:hover .map-count { fill: var(--bg); }
}
.map-pin:focus-visible .pin { stroke: var(--focus); stroke-width: 3px; }
.map-label { fill: var(--ink); font-weight: 800; dominant-baseline: central; paint-order: stroke; stroke: var(--map-bg); stroke-linejoin: round; }
.map-key { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); padding: var(--s3) var(--s5) var(--s4); font-size: var(--text-xs); font-weight: 700; color: var(--muted); }
.map-key span { display: inline-flex; align-items: center; gap: 6px; }
.map-key i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; }
.map-key .k-pin { background: var(--brass); box-shadow: inset 0 0 0 1.5px var(--on-bright); }
.map-key .k-you { box-shadow: inset 0 0 0 2px var(--ink); }
.map-picked { margin-top: var(--s4); }
.map-picked h3 { margin-bottom: var(--s1); }
