:root {
  --brand: #0b70ad;
  --accent: #d49a3a;
  --page: #f6f3ed;
  --ink: #1d2624;
  --muted: #62716d;
  --line: #d9ddd6;
  --panel: #ffffff;
  --soft: #e7f0ee;
  --yes: #376849;
  --no: #aa3f39;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 18rem),
    var(--page);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--brand);
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) auto minmax(10rem, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid rgba(39, 90, 83, 0.14);
  background: rgba(246, 243, 237, 0.88);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.55rem;
  background: var(--brand);
  color: white;
  font-weight: 800;
  letter-spacing: 0;
  flex: 0 0 auto;
}

.brand-logo {
  display: block;
  width: clamp(10.5rem, 23vw, 18.5rem);
  max-height: 3.15rem;
  object-fit: contain;
  flex: 0 1 auto;
}

.brand-title {
  color: var(--brand);
  font-size: 1.08rem;
  font-weight: 760;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  justify-self: end;
}

.container {
  width: min(1520px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 1rem;
  align-items: start;
}

.panel {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(39, 90, 83, 0.16);
  border-radius: 0.5rem;
  box-shadow: 0 20px 55px rgba(32, 45, 41, 0.08);
}

.panel-header {
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.schedule-title-row {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(24rem, 34rem);
  align-items: start;
  gap: clamp(1.25rem, 4vw, 3.5rem);
}

.schedule-title-row > div:first-child {
  min-width: 0;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.45rem, 2vw, 2.1rem);
  line-height: 1.16;
}

h2 {
  font-size: 1.15rem;
}

h3 {
  font-size: 1rem;
}

.muted {
  color: var(--muted);
}

.description {
  margin: 0.55rem 0 0;
  max-width: 68rem;
  color: var(--muted);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 1.8rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 680;
}

.pill.full {
  background: #e3efe4;
  color: var(--yes);
}

.pill.partial {
  background: #fff2d9;
  color: #805300;
}

.pill.empty {
  background: #fff0ee;
  color: var(--no);
}

.button,
.icon-button {
  border: 1px solid rgba(39, 90, 83, 0.24);
  border-radius: 0.45rem;
  min-height: 2.45rem;
  padding: 0.55rem 0.85rem;
  background: white;
  color: var(--brand);
  font-weight: 720;
}

.button.primary {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.button.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #21190d;
}

.button.danger {
  border-color: rgba(170, 63, 57, 0.3);
  color: var(--no);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.disabled-link {
  opacity: 0.55;
  cursor: not-allowed;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.view-control {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.topbar-view-control {
  justify-self: center;
}

.view-control > span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.view-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 12.5rem;
  padding: 0.25rem;
  border: 1px solid rgba(39, 90, 83, 0.2);
  border-radius: 999px;
  background: #eaf1ef;
  box-shadow: inset 0 1px 2px rgba(32, 45, 41, 0.08);
}

.view-switch-thumb {
  position: absolute;
  inset: 0.25rem auto 0.25rem 0.25rem;
  width: calc(50% - 0.25rem);
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0.25rem 0.75rem rgba(32, 45, 41, 0.16);
  transition: transform 160ms ease;
}

.view-switch.is-list .view-switch-thumb {
  transform: translateX(100%);
}

.view-switch button {
  position: relative;
  z-index: 1;
  min-height: 2.25rem;
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  background: transparent;
  color: var(--muted);
  font-weight: 820;
}

.view-switch button:hover {
  color: var(--brand);
}

.view-switch button.active {
  background: transparent;
  color: white;
}

.table-wrap {
  overflow: auto;
  max-width: 100%;
  scrollbar-gutter: stable;
}

.needs-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #f7f4ea;
}

.needs-strip.complete {
  background: #edf7ef;
}

.needs-summary {
  display: grid;
  gap: 0.12rem;
  flex: 0 0 auto;
}

.needs-summary strong {
  line-height: 1.1;
}

.needs-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.needs-list span,
.needs-list button {
  display: inline-flex;
  border-radius: 0.4rem;
  padding: 0.2rem 0.45rem;
  border: 0;
  background: rgba(255, 255, 255, 0.62);
  color: #66542d;
  font-weight: 720;
  font-size: 0.84rem;
}

.needs-list button.more {
  background: rgba(255, 255, 255, 0.86);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(39, 90, 83, 0.12);
}

.needs-list button.more:hover,
.needs-list button.more:focus-visible {
  background: white;
  box-shadow: inset 0 0 0 1px var(--brand);
  outline: none;
}

.schedule-table {
  width: max(100%, calc(10.5rem + (var(--service-count, 1) * 11rem)));
  min-width: max(780px, calc(10.5rem + (var(--service-count, 1) * 11rem)));
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.schedule-table .name-col {
  width: 10.5rem;
}

.schedule-table .service-col {
  width: 11rem;
}

.schedule-table th,
.schedule-table td {
  border-right: 1px solid white;
  border-bottom: 1px solid white;
  background: #d9edf2;
  padding: 0.7rem 0.65rem;
  text-align: center;
  vertical-align: middle;
}

.schedule-table thead th {
  background: #cbe5ec;
  color: #1f2c2a;
}

.schedule-table tbody th,
.schedule-table tbody td {
  height: 3.45rem;
}

.schedule-table .name-cell,
.schedule-table .name-head {
  position: sticky;
  left: 0;
  z-index: 6;
  width: 10.5rem;
  text-align: left;
  background: #cfe8ee;
}

.schedule-table .name-head {
  z-index: 8;
}

.service-head {
  min-width: 11rem;
  border-top: 0.28rem solid transparent;
}

.schedule-table thead th.service-status-full {
  background: #d9ebdd;
  border-top-color: var(--yes);
}

.schedule-table thead th.service-status-partial {
  background: #fff0c9;
  border-top-color: var(--accent);
}

.schedule-table thead th.service-status-empty {
  background: #f8dedb;
  border-top-color: var(--no);
}

.service-title {
  min-width: 0;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.service-role {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 1.35rem;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  background: rgba(39, 90, 83, 0.1);
  font-size: 0.84rem;
  color: var(--brand);
  font-weight: 800;
}

.service-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.18rem 0.45rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.2;
}

.service-date,
.service-hours {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.service-hours {
  font-weight: 720;
}

.service-card .service-meta {
  font-size: 0.96rem;
  color: var(--muted);
}

.vote-entry .service-meta {
  justify-content: center;
  margin-top: 0;
  font-size: 0.96rem;
  color: var(--muted);
}

.vote-badge {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  min-height: 2rem;
  border-radius: 999px;
  font-weight: 900;
}

.vote-badge.yes {
  color: white;
  background: var(--yes);
}

.vote-badge.no {
  color: white;
  background: var(--no);
}

.vote-badge.empty {
  color: transparent;
  background: transparent;
}

.service-cards {
  display: none;
  gap: 0.75rem;
  padding: 0.85rem;
  background: #eef6f7;
  grid-template-columns: minmax(0, 1fr);
}

.schedule-panel.view-cards .table-wrap {
  display: none;
}

.schedule-panel.view-cards .service-cards {
  display: grid;
}

.service-group {
  display: grid;
  gap: 0.65rem;
}

.service-group + .service-group {
  padding-top: 0.85rem;
  border-top: 1px solid rgba(39, 90, 83, 0.16);
}

.service-group-head {
  display: block;
  align-items: center;
  min-height: 2.05rem;
}

.service-group-head h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 840;
}

.date-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.55rem;
  padding: 0.16rem 0.55rem;
  border: 1px solid rgba(39, 90, 83, 0.16);
  border-radius: 999px;
  background: white;
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 840;
  white-space: nowrap;
}

.service-group-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.75rem;
}

.service-card {
  border: 1px solid var(--line);
  border-left: 0.35rem solid var(--accent);
  border-radius: 0.5rem;
  padding: 0.85rem;
  background: white;
  min-height: 5.75rem;
}

.service-card.full {
  border-left-color: var(--yes);
}

.service-card.empty {
  border-left-color: var(--no);
}

.service-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title occupancy"
    "role occupancy"
    "meta occupancy";
  align-items: start;
  gap: 0.32rem 0.75rem;
}

.service-head .service-layout {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "title"
    "role"
    "meta"
    "occupancy";
  justify-items: center;
  min-height: 8.5rem;
  gap: 0.36rem;
}

.service-occupancy {
  grid-area: occupancy;
  justify-self: end;
}

.service-head .service-occupancy {
  justify-self: center;
  margin-top: auto;
}

.service-card-title {
  grid-area: title;
  min-width: 0;
  font-size: 1.05rem;
  line-height: 1.18;
  margin: 0;
  overflow-wrap: anywhere;
}

.service-card-role {
  grid-area: role;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.55rem;
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand);
  font-weight: 820;
}

.service-layout .service-meta {
  grid-area: meta;
}

.service-list-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.service-card-main {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.service-list-layout .service-card-title {
  grid-area: auto;
  font-size: 1rem;
  font-weight: 840;
  line-height: 1.22;
  color: var(--ink);
}

.service-list-layout .service-meta {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.2;
}

.people-group {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.75rem;
}

.people-group > span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 740;
}

.people-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.person-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-weight: 720;
  background: var(--soft);
  color: var(--brand);
}

.person-chip.yes {
  background: #e3efe4;
  color: var(--yes);
}

.person-chip.no {
  background: #fff0ee;
  color: var(--no);
}

.side-panel {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 5.75rem;
  max-height: calc(100vh - 6.75rem);
  min-height: 0;
  overflow: visible;
  padding-right: 0.25rem;
  overscroll-behavior: contain;
}

.form-panel {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 6.75rem);
  min-height: 0;
  overflow: hidden;
}

.lookup-form {
  display: grid;
  gap: 0.75rem;
}

.entry-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
  justify-self: end;
  align-self: start;
  width: 100%;
  max-width: 34rem;
  margin-top: 0.1rem;
}

.entry-control-panel {
  display: grid;
  grid-template-columns: minmax(13rem, 1fr) auto;
  align-items: end;
  gap: 0.6rem;
  padding: 0.65rem;
  border: 1px solid rgba(11, 112, 173, 0.16);
  border-radius: 0.5rem;
  background: rgba(244, 249, 251, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.entry-control-panel strong,
.bottom-lookup-form h2 {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.15;
}

.entry-control-panel label {
  display: grid;
  gap: 0.18rem;
}

.entry-control-panel label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.entry-control-panel .input {
  min-height: 2.25rem;
  padding: 0.42rem 0.6rem;
  background: white;
}

.entry-control-panel .button {
  min-height: 2.25rem;
  padding: 0.42rem 0.85rem;
  font-size: 0.92rem;
  white-space: nowrap;
}

.entry-control-panel #participant-message {
  grid-column: 1 / -1;
}

.lookup-results {
  display: grid;
  gap: 0.55rem;
  max-height: 10rem;
  overflow-y: auto;
  padding: 0.75rem;
  border-radius: 0.55rem;
  background: #f4f9fb;
}

.lookup-result {
  display: grid;
  gap: 0.18rem;
  padding: 0.65rem;
  border: 1px solid rgba(39, 90, 83, 0.18);
  border-radius: 0.5rem;
  background: white;
  color: inherit;
  text-decoration: none;
}

.lookup-result:hover,
.lookup-result:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 112, 173, 0.12);
  outline: none;
}

.lookup-result span {
  color: var(--brand);
  font-weight: 820;
}

.lookup-result small {
  color: var(--muted);
  font-weight: 650;
  line-height: 1.3;
}

.lookup-panel {
  margin-top: 1rem;
  padding: 1rem;
}

.bottom-lookup-form {
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 20rem) auto;
  align-items: end;
}

.bottom-lookup-form h2,
.bottom-lookup-form p {
  margin: 0;
}

.bottom-lookup-form .muted {
  margin-top: 0.25rem;
  line-height: 1.35;
}

.bottom-lookup-form #lookup-message {
  grid-column: 1 / -1;
}

.form-grid {
  display: grid;
  gap: 0.8rem;
  min-height: 0;
}

.side-panel .form-grid {
  grid-template-rows: auto minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field > span {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 720;
}

.name-field {
  padding: 0.75rem;
  border: 1px solid rgba(11, 112, 173, 0.18);
  border-radius: 0.55rem;
  background: #f4f9fb;
}

.name-field > span {
  color: var(--brand);
  font-size: 1rem;
  font-weight: 860;
}

.name-field small {
  color: var(--muted);
  font-weight: 650;
}

.participant-actions {
  display: grid;
  gap: 0.65rem;
  padding: 0 0 0.75rem;
  border-bottom: 1px solid rgba(39, 90, 83, 0.14);
  background: white;
}

.participant-actions .button {
  width: 100%;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 2.55rem;
  border: 1px solid var(--line);
  border-radius: 0.42rem;
  padding: 0.55rem 0.7rem;
  background: white;
  color: var(--ink);
}

.textarea {
  min-height: 5rem;
  resize: vertical;
}

.vote-list {
  display: grid;
  gap: 0.65rem;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
  overscroll-behavior: contain;
}

.vote-entry {
  display: grid;
  gap: 0.55rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.66);
  text-align: center;
}

.vote-entry.is-full {
  border-color: #cfd8d3;
  background: #f3f5f2;
  color: #5e6b67;
}

.entry-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.25;
}

.vote-entry.is-full .vote-entry-head span {
  background: #e3e8e5;
  color: #51605b;
}

.vote-entry-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
}

.vote-entry-head strong {
  line-height: 1.2;
}

.vote-entry-head span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand);
  font-weight: 820;
}

.vote-picker {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

.vote-picker button {
  min-height: 2.55rem;
  border: 1px solid #9bc7a7;
  border-radius: 0.48rem;
  background: linear-gradient(180deg, #f0faf2, #dff1e4);
  color: #21482f;
  font-weight: 880;
  box-shadow: 0 0.18rem 0.45rem rgba(32, 45, 41, 0.08);
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.vote-picker button::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.35rem;
  border-radius: 999px;
  background: rgba(55, 104, 73, 0.14);
  color: #21482f;
  font-weight: 900;
}

.vote-picker button:hover {
  transform: translateY(-1px);
  border-color: var(--yes);
  background: linear-gradient(180deg, #e7f7eb, #cfe8d7);
  box-shadow: 0 0.35rem 0.85rem rgba(32, 45, 41, 0.13);
}

.vote-picker button:disabled {
  cursor: not-allowed;
  transform: none;
  border-color: #cbd5cf;
  background: #e7ebe8;
  color: #596763;
  box-shadow: none;
}

.vote-picker button:disabled::before {
  content: "✓";
  background: rgba(89, 103, 99, 0.12);
  color: #596763;
}

.vote-picker button[aria-pressed="true"][data-value="yes"] {
  background: var(--yes);
  border-color: var(--yes);
  color: white;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.vote-picker button[aria-pressed="true"][data-value="yes"]::before {
  content: "✓";
  background: rgba(255, 255, 255, 0.18);
  color: white;
}

.vote-picker button[aria-pressed="true"][data-value="no"] {
  background: var(--no);
  border-color: var(--no);
  color: white;
}

.notice {
  padding: 0.75rem;
  border-radius: 0.45rem;
  background: #eef5ef;
  color: var(--yes);
  border: 1px solid #cfe3d2;
  overflow-wrap: anywhere;
}

.notice.error {
  background: #fff0ee;
  color: var(--no);
  border-color: #edcac6;
}

.notice.warning {
  background: #fff7df;
  color: #805300;
  border-color: #ead49a;
}

.success-message {
  display: grid;
  gap: 0.45rem;
}

.success-message span {
  color: var(--ink);
}

.button.copied {
  background: var(--yes);
  border-color: var(--yes);
  color: white;
}

.admin-layout {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  gap: 1rem;
}

.admin-sidebar {
  padding: 0.75rem;
  display: grid;
  gap: 0.5rem;
  align-content: start;
}

.schedule-nav-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 0.45rem;
  padding: 0.7rem;
  color: var(--ink);
}

.schedule-nav-item.active {
  border-color: rgba(39, 90, 83, 0.28);
  background: var(--soft);
}

.admin-main {
  display: grid;
  gap: 1rem;
}

.admin-section {
  padding: 1rem;
}

.admin-section > .muted {
  margin-top: -0.25rem;
  line-height: 1.35;
}

.share-box {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid rgba(11, 112, 173, 0.16);
  border-radius: 0.55rem;
  background: #f4f9fb;
}

.share-box h2,
.share-box p {
  margin: 0;
}

.share-box .muted {
  margin-top: 0.25rem;
  line-height: 1.35;
}

.share-controls {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.share-controls .input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
}

.admin-title-section {
  display: grid;
  gap: 1rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  border-bottom: 0.2rem solid transparent;
  background: transparent;
  color: var(--muted);
  min-height: 2.5rem;
  padding: 0.4rem 0.7rem;
  font-weight: 800;
}

.tab-button.active {
  color: var(--brand);
  border-bottom-color: var(--accent);
}

.tab-button span {
  display: inline-grid;
  place-items: center;
  min-width: 1.45rem;
  min-height: 1.45rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand);
  font-size: 0.78rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.admin-grid .wide {
  grid-column: 1 / -1;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.service-admin-list,
.participant-admin-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.admin-item {
  display: grid;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.68);
}

.admin-item-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.service-edit-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.78fr 0.55fr 0.55fr 0.55fr;
  gap: 0.45rem;
}

.participant-grid {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: start;
}

.helper-overview {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.8rem;
}

.helper-row {
  display: grid;
  grid-template-columns: minmax(12rem, 1.2fr) minmax(7rem, 0.65fr) minmax(6.5rem, 0.55fr) minmax(7rem, 0.55fr) minmax(10rem, 1.1fr);
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.72);
}

.helper-event,
.helper-role,
.helper-date,
.helper-time {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.helper-role,
.helper-date,
.helper-time {
  font-weight: 700;
}

.helper-role {
  color: var(--brand);
}

.helper-time {
  text-align: center;
  justify-self: center;
  min-height: 1.45rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: #e3efe4;
  color: var(--yes);
  font-size: 0.88rem;
  font-weight: 760;
}

.helper-date {
  color: var(--muted);
  text-align: center;
}

.helper-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
}

.helper-list span {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: #e3efe4;
  color: var(--yes);
  font-size: 0.88rem;
  font-weight: 760;
}

.mini-votes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.45rem;
}

.mini-vote {
  display: grid;
  gap: 0.25rem;
}

.empty-state,
.loading {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
}

.login-panel {
  max-width: 28rem;
  margin: 3rem auto;
}

@media (max-width: 1050px) {
  .workspace,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .form-panel,
  .side-panel .form-grid,
  .vote-list {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .brand,
  .topbar-view-control,
  .nav-actions {
    justify-self: stretch;
  }

  .nav-actions {
    justify-content: flex-start;
  }

  .brand-title,
  .brand-subtitle {
    white-space: normal;
  }

  .container {
    padding: 0.75rem;
  }

  .panel-header,
  .form-panel,
  .admin-section {
    padding: 0.85rem;
  }

  .schedule-title-row,
  .admin-grid,
  .share-controls,
  .helper-row,
  .service-edit-grid,
  .participant-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .helper-list {
    justify-content: flex-start;
  }

  .helper-event,
  .helper-role,
  .helper-date,
  .helper-time {
    white-space: normal;
  }

  .table-wrap {
    display: none;
  }

  .service-cards {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    background: #eef6f7;
  }

  .needs-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .view-control {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .view-switch {
    width: 100%;
  }

  .header-tools {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .entry-tools,
  .bottom-lookup-form {
    grid-template-columns: 1fr auto;
  }

  .entry-tools {
    justify-self: stretch;
    max-width: none;
    margin-top: 0.35rem;
  }

  .entry-control-panel,
  .bottom-lookup-form {
    grid-template-columns: 1fr;
  }

  .bottom-lookup-form > div {
    grid-column: 1 / -1;
  }

  .entry-control-panel label {
    grid-column: 1 / -1;
  }

  .entry-control-panel .button {
    width: 100%;
  }

  .entry-control-panel #participant-message {
    grid-column: 1 / -1;
  }

  .bottom-lookup-form .field,
  .bottom-lookup-form #lookup-message {
    grid-column: 1 / -1;
  }
}
