@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/plus-jakarta-sans-latin-400-73b42916.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/plus-jakarta-sans-latin-500-5879bd2b.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/plus-jakarta-sans-latin-600-2083110d.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/plus-jakarta-sans-latin-700-62297489.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/plus-jakarta-sans-latin-800-2808406c.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --elevation-floating: 0 2px 8px rgba(35, 31, 32, 0.1);
  /* Legacy surface aliases stay flat. Floating chrome opts in explicitly. */
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: none;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --motion-fast: 140ms;
  --motion: 220ms;
}

:root[data-theme="light"] {
  color-scheme: light;
  --ink: #231f20;
  --muted: #534e4b;
  --line: #e6dfd6;
  --line-strong: #cfc6bb;
  --paper: #ffffff;
  --surface: #f6f3ee;
  --surface-strong: #ebe4db;
  --accent: #231f20;
  --accent-strong: #0e0c0d;
  --accent-soft: #efeae3;
  --on-accent: #ffffff;
  --danger: #9f1239;
  --danger-bg: #fff1f2;
  --danger-border: #fecdd3;
  --warning: #9a3412;
  --warning-bg: #fff7ed;
  --warning-border: #fed7aa;
  --success: #146c43;
  --success-bg: #eef6f1;
  --success-border: #b7dfc9;
  --success-ink: #145c3a;
  --focus: #231f20;
  --chrome: #231f20;
  --chrome-ink: #f6f3ee;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f6f3ee;
  --muted: #c8bfb6;
  --line: #3a342f;
  --line-strong: #524a44;
  --paper: #1c1917;
  --surface: #121110;
  --surface-strong: #2a2623;
  --accent: #f6f3ee;
  --accent-strong: #ffffff;
  --accent-soft: #2a2623;
  --on-accent: #231f20;
  --danger: #fecdd3;
  --danger-bg: #3f1d24;
  --danger-border: #9f1239;
  --warning: #fed7aa;
  --warning-bg: #3b2414;
  --warning-border: #9a3412;
  --success: #b7dfc9;
  --success-bg: #14261e;
  --success-border: #1f6b4a;
  --success-ink: #b7dfc9;
  --focus: #f6f3ee;
  --chrome: #0e0c0d;
  --chrome-ink: #f6f3ee;
  --elevation-floating: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --elevation-floating: 0 2px 8px rgba(0, 0, 0, 0.2); }
}

:is(a, button, input, select, textarea, summary, [tabindex]) { -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
}

.content h2,
.auth-panel h2,
.content h3,
.card h3,
.auth-panel h3,
.install-guide-title {
  font-family: var(--font-sans);
}

.content h2,
.auth-panel h2 {
  font-weight: 800;
  letter-spacing: -0.04em;
}

.eyebrow,
.nav-caption {
  letter-spacing: -0.01em;
  text-transform: none;
  font-size: 0.82rem;
  font-weight: 600;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
}

.mobile-bar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  gap: 0.15rem;
  padding-bottom: 0.7rem;
}

.mobile-bar-top,
.mobile-tools {
  align-items: center;
  display: flex;
  gap: 0.35rem;
  min-width: 0;
}

.mobile-tools {
  flex: 0 0 auto;
}

.mobile-bar .brand-lockup {
  flex: 1 1 auto;
}

.mobile-bar .button_to button {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
  min-height: 44px;
  padding-inline: 0.7rem;
}
@media (hover: hover) and (pointer: fine) {
  .mobile-bar .button_to button:hover {
    background: var(--surface-strong);
    color: var(--ink);
  }
}

.hello-date {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0;
}

.hello-name {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0;
}

.hello-desktop {
  display: none;
}

.icon-button,
.avatar-link {
  align-items: center;
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  height: 44px;
  justify-content: center;
  min-width: 44px;
  width: 44px;
}

.icon-button svg,
.tab-plus svg {
  display: block;
  height: 22px;
  width: 22px;
}

.card,
.auth-panel,
.install-guide-card,
.audio-player {
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.card {
  border: 0;
}

.audio-player,
.install-guide-card { box-shadow: var(--elevation-floating); }

button,
input[type="submit"],
.button {
  border-radius: 999px;
  font-weight: 700;
}

input,
textarea,
select {
  border-radius: var(--radius-sm);
}

/* Keep the native select interaction, but let CSS paint its single rounded
   surface. WebKit's native bevel otherwise draws a second, squarer fill. */
select:not([multiple]):not([size]) {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--paper);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) center, calc(100% - 0.75rem) center;
  background-repeat: no-repeat;
  background-size: 0.35rem 0.35rem;
  padding-inline-end: 2.5rem;
}

select:not([multiple]):not([size]):dir(rtl) {
  background-position: 0.75rem center, 1.1rem center;
}

@media (forced-colors: active) {
  select:not([multiple]):not([size]) {
    appearance: auto;
    -webkit-appearance: auto;
    background-image: none;
  }
}

.tab-bar {
  backdrop-filter: none;
  background: var(--paper);
  border: 0;
  border-radius: 28px;
  bottom: max(10px, env(safe-area-inset-bottom));
  box-shadow: var(--elevation-floating);
  left: max(12px, env(safe-area-inset-left));
  padding: 0.35rem 0.35rem 0.45rem;
  right: max(12px, env(safe-area-inset-right));
  width: auto;
}

.tab-plus-slot {
  flex: 0 0 56px;
  width: 56px;
}

.tab-link {
  border-radius: 18px;
  min-height: 44px;
  position: relative;
}

.tab-link-active {
  background: var(--surface-strong);
  color: var(--ink);
}

.tab-link-active::after {
  background: currentColor;
  border-radius: 999px;
  bottom: 5px;
  content: "";
  height: 3px;
  left: 50%;
  position: absolute;
  translate: -50% 0;
  width: 1.1rem;
}

.tab-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-plus {
  align-items: center;
  background: #231f20;
  border: 3px solid var(--paper);
  border-radius: 999px;
  bottom: calc(1.7rem + env(safe-area-inset-bottom));
  box-shadow: var(--elevation-floating);
  color: #f6f3ee;
  display: inline-flex;
  height: 56px;
  justify-content: center;
  left: 50%;
  min-height: 56px;
  min-width: 56px;
  padding: 0;
  position: fixed;
  translate: -50% 0;
  width: 56px;
  z-index: 22;
}
@media (hover: hover) and (pointer: fine) {
  .tab-plus:hover {
    background: var(--accent-strong);
    color: var(--paper);
  }
}

.content {
  gap: var(--space-6);
  padding-bottom: calc(9rem + env(safe-area-inset-bottom));
}

.content a:not(.button) {
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.next-concert {
  margin: 0;
}

.content > *,
.mobile-bar,
.mobile-bar-top,
.date-strip,
.table-wrap,
.admin-shortcuts {
  max-width: 100%;
  min-width: 0;
}

.hero-card {
  background: #231f20;
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: none;
  color: #f6f3ee;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 1.25rem;
}

.hero-card .hero-title,
.hero-card .status-badge {
  color: #f6f3ee;
}

.hero-kicker,
.hero-meta {
  color: rgba(246, 243, 238, 0.82);
  margin: 0;
}

.hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0.15rem 0;
}

.hero-card .status-badge {
  background: rgba(246, 243, 238, 0.16);
  color: #f6f3ee;
}

.progress-ring {
  height: 72px;
  position: relative;
  width: 72px;
}

.progress-ring svg {
  display: block;
  height: 72px;
  width: 72px;
}

.progress-ring-track,
.progress-ring-value {
  fill: none;
  stroke-width: 6;
}

.progress-ring-track {
  stroke: var(--surface-strong);
}

.progress-ring-value {
  stroke: currentColor;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 36px 36px;
  stroke-dasharray: calc(var(--value) * 1.885px) 188.5px;
}

.progress-ring-label {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.hero-card .progress-ring,
.hero-card .progress-ring-label {
  color: #f6f3ee;
}

.hero-card .progress-ring-value {
  stroke: #f6f3ee;
}

.hero-card .progress-ring-track {
  stroke: rgba(246, 243, 238, 0.35);
}

.date-strip {
  display: flex;
  gap: 0.5rem;
  margin: 0;
  overflow-x: auto;
  padding: 0.15rem 0.15rem 0.35rem;
  scroll-snap-type: x mandatory;
}

.date-pill {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  display: grid;
  flex: 0 0 auto;
  gap: 0.1rem;
  justify-items: center;
  min-height: 64px;
  min-width: 58px;
  padding: 0.45rem 0.7rem;
  scroll-snap-align: start;
}

.date-pill strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.date-pill[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.date-pill[aria-pressed="true"] strong {
  color: var(--paper);
}

.status-badge[data-status="active"],
.status-badge[data-status="confirmed"],
.status-badge[data-status="present"],
.status-badge[data-status="available"],
.status-badge[data-status="attended"],
.status-badge[data-status="open"] {
  background: var(--success-bg);
  color: var(--success-ink);
}

.status-badge[data-status="pending"],
.status-badge[data-status="assigned"],
.status-badge[data-status="not-provided"],
.status-badge[data-status="pending-invite"] {
  background: var(--surface-strong);
  color: var(--ink);
}

.status-badge[data-status="justified-absence"],
.status-badge[data-status="excused"],
.status-badge[data-status="unavailable"] {
  background: var(--warning-bg);
  color: var(--warning);
}

.status-badge[data-status="absent"],
.status-badge[data-status="missed"] {
  background: var(--danger-bg);
  color: var(--danger);
}

.prepare-list,
.setlist {
  display: grid;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.prepare-list a,
.checklist-row {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  min-height: 52px;
  padding: 0.7rem 0.9rem;
}

.meter {
  background: var(--surface-strong);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.meter > span {
  background: var(--ink);
  display: block;
  height: 100%;
  transform: scaleX(calc(var(--value, 0) / 100));
  transform-origin: left center;
  width: 100%;
}

.avatar-stack {
  display: flex;
  padding-left: 0.2rem;
}

.avatar-stack .avatar {
  border: 2px solid var(--paper);
  margin-left: -0.45rem;
}

.avatar-more {
  background: var(--ink);
  color: var(--paper);
  font-size: 0.75rem;
}

.sheet[hidden] {
  display: none;
}

.sheet {
  inset: 0;
  position: fixed;
  z-index: 40;
}

.sheet-backdrop {
  background: rgba(35, 31, 32, 0.4);
  border: 0;
  border-radius: 0;
  height: 100%;
  inset: 0;
  min-height: 100%;
  padding: 0;
  position: absolute;
  width: 100%;
}
@media (hover: hover) and (pointer: fine) {
  .sheet-backdrop:hover {
    background: rgba(35, 31, 32, 0.4);
  }
}

.sheet-card {
  background: var(--paper);
  border-radius: 28px 28px 0 0;
  bottom: 0;
  box-shadow: var(--elevation-floating);
  display: grid;
  gap: 0.75rem;
  left: 0;
  max-height: min(80dvh, 34rem);
  overflow: auto;
  padding: 1rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
  position: absolute;
  right: 0;
}

.sheet-card h2 {
  font-size: 1.25rem;
  margin: 0.25rem 0 0;
}

.segmented {
  background: var(--surface-strong);
  border-radius: 999px;
  display: grid;
  gap: 0.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0.25rem;
}

.segmented button {
  background: transparent;
  border-radius: 999px;
  color: var(--ink);
  min-height: 44px;
  width: 100%;
}

.segmented button[aria-checked="true"] {
  background: var(--paper);
  box-shadow: none;
}

.table-wrap {
  overflow-x: auto;
}

table {
  background: var(--paper);
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
}

.empty-state {
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.1rem;
  text-align: start;
}

.empty-state-title {
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.notice {
  border-radius: 18px;
}

.audio-player {
  border: 1px solid var(--line);
  border-radius: 22px;
  bottom: calc(6.4rem + env(safe-area-inset-bottom));
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
}

.install-guide {
  bottom: calc(6.6rem + var(--mini-player-offset, 0px) + env(safe-area-inset-bottom));
}

.is-hidden {
  display: none;
}

turbo-frame[aria-busy="true"] {
  position: relative;
}

@media (prefers-reduced-motion: no-preference) {
  .button,
  button,
  .tab-link,
  .date-pill,
  .tab-plus {
    transition: transform var(--motion-fast) var(--ease-out), background-color var(--motion) var(--ease-out);
  }

  .button:active,
  button:active,
  .date-pill:active,
  .tab-link:active {
    transform: scale(0.98);
  }

  turbo-frame[aria-busy="true"]::after {
    animation: gc-shimmer 1.1s linear infinite;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--paper) 70%, transparent), transparent);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
  }
}

@keyframes gc-shimmer {
  from { transform: translateX(-40%); }
  to { transform: translateX(40%); }
}

@media (min-width: 1024px) {
  .mobile-bar {
    display: none;
  }

  .hello-desktop {
    display: grid;
    gap: 0.15rem;
  }

  .tab-plus,
  .sheet {
    display: none;
  }

  .audio-player {
    bottom: 0;
    border-radius: 22px 22px 0 0;
    left: 250px;
  }

  .hero-card {
    padding: 1.75rem;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: var(--ink);
    --line: var(--ink);
    --line-strong: var(--ink);
  }

  .card,
  button,
  input,
  select,
  textarea,
  .tab-bar,
  .date-pill {
    border-width: 2px;
    border-color: var(--ink);
  }
}

@media (forced-colors: active) {
  .hero-card,
  .card,
  .button,
  button,
  .tab-bar,
  .tab-plus,
  .progress-ring-value {
    border: 1px solid CanvasText;
    forced-color-adjust: none;
  }
}

/* Page titles stay in document flow, like the Songs and Agenda headings.
   No sticky paint, negative margins or scroll-dependent title resizing: cards
   pass cleanly beneath the viewport-wide identity bar on every page. */

.record-person {
  align-items: center;
  display: flex;
  gap: 0.7rem;
  min-width: 0;
}

.record-person .avatar {
  flex: 0 0 auto;
}

.attendance-list {
  display: grid;
  gap: 0.75rem;
}

.attendance-row {
  display: grid;
  gap: 0.8rem;
}

.attendance-save {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  bottom: calc(6.4rem + env(safe-area-inset-bottom));
  box-shadow: var(--elevation-floating);
  padding: 0.65rem;
  position: sticky;
  z-index: 14;
}

.attendance-save input[type="submit"] {
  width: 100%;
}

.segmented-choice {
  min-height: 44px;
  position: relative;
}

.segmented-choice input {
  cursor: pointer;
  height: 100%;
  inset: 0;
  margin: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
}

.segmented-choice span {
  align-items: center;
  border-radius: 999px;
  display: flex;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 0.35rem 0.4rem;
}

.segmented-choice input:checked + span {
  background: var(--paper);
  box-shadow: none;
}

.segmented-choice input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.sheet-preview {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: none;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 1rem;
}

.sheet-preview .button {
  grid-column: 1 / -1;
  justify-self: start;
}

.sheet-preview-mark {
  align-items: center;
  background: #231f20;
  border-radius: 18px;
  color: #f6f3ee;
  display: grid;
  font-size: 0.78rem;
  font-weight: 800;
  height: 64px;
  letter-spacing: 0.04em;
  place-items: center;
  width: 52px;
}

.sheet-preview-title {
  font-weight: 800;
  margin: 0;
}

.audio-track > .track-main {
  align-items: start;
  display: grid;
  flex-direction: row;
  gap: 0.75rem;
  grid-template-columns: 44px minmax(0, 1fr);
}

.track-main .audio-fallback {
  grid-column: 1 / -1;
}

.track-toggle {
  align-items: center;
  background: #231f20;
  border-radius: 999px;
  color: #f6f3ee;
  display: inline-flex;
  font-size: 0;
  height: 44px;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
  width: 44px;
}

.track-toggle::before {
  border-color: transparent transparent transparent #f6f3ee;
  border-style: solid;
  border-width: 7px 0 7px 11px;
  content: "";
  margin-left: 3px;
}

.track-toggle[aria-pressed="true"]::before {
  background:
    linear-gradient(#f6f3ee, #f6f3ee) left center / 3px 12px no-repeat,
    linear-gradient(#f6f3ee, #f6f3ee) right center / 3px 12px no-repeat;
  border: 0;
  height: 12px;
  margin-left: 0;
  width: 10px;
}

.track-copy {
  display: grid;
  gap: 0;
  min-width: 0;
}

.track-filename {
  /* Use the title line's lower whitespace, keeping metadata close without
     moving the 44px play target or overlapping any neighbouring row. */
  margin-block-start: calc(-1 * var(--space-2));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-title-line {
  align-items: center;
  display: flex;
  gap: var(--space-3);
  justify-content: space-between;
  min-height: 44px;
  min-width: 0;
}
.track-title-line strong { min-width: 0; overflow-wrap: anywhere; }
.track-duration { flex-shrink: 0; white-space: nowrap; }

.track-duration {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.vote-share {
  font-variant-numeric: tabular-nums;
}

.readiness {
  display: grid;
  gap: 0.45rem;
}

.readiness-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.poll-status {
  margin: 0;
}

.hero-card .status-badge {
  background: rgba(246, 243, 238, 0.16);
  color: #f6f3ee;
}

@media (max-width: 1023px) {
  .responsive-table {
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .responsive-table thead {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: auto;
  }

  .responsive-table tr {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: none;
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    padding: 0.9rem 1rem;
  }

  .responsive-table td {
    align-items: center;
    border: 0;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 0.15rem 0;
    text-align: end;
  }

  .responsive-table td::before {
    color: var(--muted);
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: start;
  }

  .responsive-table td:first-child {
    font-weight: 800;
  }

  .responsive-table a,
  .responsive-table .record-person {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

@media (min-width: 1024px) {
  .attendance-save {
    bottom: 1rem;
  }

  .sheet-preview {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .sheet-preview .button {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .meter > span {
    animation: gc-meter 480ms var(--ease-out) both;
  }

  turbo-frame[aria-busy="true"] {
    min-height: 7.5rem;
  }

  turbo-frame[aria-busy="true"]::before {
    animation: gc-shimmer 1.1s linear infinite;
    background:
      linear-gradient(var(--surface-strong), var(--surface-strong)) 0 0 / 100% 4.25rem no-repeat,
      linear-gradient(90deg, transparent, color-mix(in srgb, var(--paper) 80%, transparent), transparent);
    border-radius: 22px;
    content: "";
    inset: 0 0 auto 0;
    pointer-events: none;
    position: absolute;
  }
}

@keyframes gc-meter {
  from { transform: scaleX(0); }
  to { transform: scaleX(calc(var(--value, 0) / 100)); }
}

fieldset {
  background: transparent;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
}

legend {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  padding: 0;
}

label,
.definition-list div {
  min-width: 0;
}

.definition-list dt {
  letter-spacing: 0;
  text-transform: none;
}

.definition-list dd {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  max-width: 100%;
  min-height: 2.75rem;
  min-width: 0;
  text-align: left;
  width: 100%;
}

input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value {
  margin: 0;
  min-width: 0;
  text-align: left;
}

.hero-card form:not(.button_to),
.rsvp form:not(.button_to) {
  background: transparent;
  border: 0;
  box-shadow: none;
  max-width: none;
  padding: 0;
}

.page-section {
  display: grid;
  gap: var(--space-5);
}

.section-heading {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
}

.status-badge {
  flex: 0 0 auto;
  white-space: nowrap;
}

.prepare-list {
  gap: var(--space-3);
}

.prepare-row,
.card-row {
  align-items: center;
  color: inherit;
  display: grid;
  gap: var(--space-3);
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 44px;
  text-decoration: none;
}

.card-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.prepare-title,
.card-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-chevron {
  display: block;
  height: 18px;
  width: 18px;
}

.repertoire-card,
.grid > .card {
  position: relative;
}

.repertoire-card .card-row::after,
.grid > .card .card-row::after {
  content: "";
  inset: 0;
  position: absolute;
}

.next-event {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  grid-template-columns: minmax(0, 1fr);
  padding: var(--space-6);
}

.hero-card summary,
.hero-card .hero-kicker,
.hero-card .hero-meta {
  color: #f6f3ee;
}

.hero-card .prepare-list a {
  background: transparent;
  border-color: rgba(246, 243, 238, 0.28);
  color: #f6f3ee;
}

.hero-card .status-badge {
  background: #3a342f;
  color: #f6f3ee;
}

.next-concert.prepare-row {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
}

.rsvp {
  display: grid;
  gap: var(--space-3);
}

.rsvp-settled {
  align-items: center;
  display: flex;
  gap: var(--space-3);
  justify-content: space-between;
}

button.text-action {
  background: transparent;
  border-color: transparent;
  color: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0.4rem 0.2rem;
  width: auto;
}
@media (hover: hover) and (pointer: fine) {
  button.text-action:hover {
    background: transparent;
    color: inherit;
  }
}

.hero-card button.text-action {
  background: transparent;
  color: #f6f3ee;
}
@media (hover: hover) and (pointer: fine) {
  .hero-card button.text-action:hover {
    background: transparent;
    color: #f6f3ee;
  }
}

.hero-card button.button,
.hero-card input[type="submit"]:not(.secondary) {
  background: #f6f3ee;
  border-color: #f6f3ee;
  color: #231f20;
}
@media (hover: hover) and (pointer: fine) {
  .hero-card button.button:hover,
  .hero-card input[type="submit"]:not(.secondary):hover {
    background: #ffffff;
    color: #231f20;
  }
}

.hero-card button.secondary,
.hero-card input.secondary {
  background: transparent;
  border-color: rgba(246, 243, 238, 0.55);
  color: #f6f3ee;
}
@media (hover: hover) and (pointer: fine) {
  .hero-card button.secondary:hover,
  .hero-card input.secondary:hover {
    background: transparent;
    border-color: rgba(246, 243, 238, 0.55);
    color: #f6f3ee;
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-ring-value,
  .meter > span,
  turbo-frame[aria-busy="true"]::after,
  turbo-frame[aria-busy="true"]::before {
    animation: none;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation-duration: 0s;
  }
}

/* Flat section surfaces and controls; selection fills communicate real state. */
.auth-panel, .hero-card, table, .responsive-table tr, .empty-state,
form:not(.button_to), .sheet-preview, .audio-track, .settings-install-row,
.audio-player, .install-guide-card, .attendance-save, .next-concert.prepare-row,
button, .button, input[type="submit"], .date-pill, .admin-shortcuts a {
  border: 0;
}
.prepare-row, .card-row { background: transparent; }
@media (hover: hover) and (pointer: fine) {
  .song-row:hover .row-chevron,
  .prepare-row:hover .row-chevron,
  .card-row:hover .row-chevron { color: currentColor; }
}
/* State feedback is immediate; no parent surface moves when its child is used. */
:focus:not(:focus-visible) { outline: none; }
@media (forced-colors: active) {
  button, .button, input[type="submit"], .tab-bar, .tab-plus { border: 1px solid ButtonText; }
}
