:root {
  --ink: #30272c;
  --muted: #766a70;
  --paper: #fbf8f4;
  --card: #fff;
  --accent: #724c61;
  --soft: #efe4e8;
  --green: #3f725b;
  --red: #9a4f50;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.login-body { background:linear-gradient(to bottom,rgba(255,253,250,.58),rgba(255,253,250,.18)),#f3e8e8 url("/static/assets/login-wool-v1.webp") center bottom/cover fixed no-repeat; }
.login-body header { background:rgba(251,248,244,.86); backdrop-filter:blur(8px); }
header {
  min-height: 58px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e8dfdc;
  background: rgba(251, 248, 244, .95);
}
header form { margin: 0; }
header nav { display: flex; align-items: center; gap: 12px; overflow-x: auto; }
header nav a { color: var(--muted); font-size: .82rem; font-weight: 700; text-decoration: none; }
.brand { color: var(--ink); font-weight: 750; text-decoration: none; }.brand small,.version-label{color:var(--muted);font-size:.68rem;font-weight:500}
main { width: min(100% - 28px, 720px); margin: 0 auto; padding: 28px 0 64px; }
h1 { margin: 5px 0 8px; font-family: Georgia, serif; font-size: clamp(2rem, 9vw, 3.5rem); line-height: .98; }
h2 { margin: 5px 0 2px; font-size: 1.05rem; }
p { color: var(--muted); }
.eyebrow { margin: 0; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero { padding: 12px 2px 24px; }
.hero.compact h1 { font-size: 2.5rem; }
.note { padding: 10px 12px; border-radius: 10px; background: var(--soft); }
.session-grid, .people { display: grid; gap: 10px; margin-bottom: 24px; }
.workshop-posters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 34px;
}
.weekday-separator {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 8px 0 2px;
  color: var(--accent);
  font-size: .84rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.weekday-separator::before,
.weekday-separator::after {
  content: "";
  height: 1px;
  background: #e3d8d6;
}
.weekday-separator span {
  padding: 6px 12px;
  border: 1px solid #eadfdd;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
}
.workshop-poster {
  position: relative;
  min-height: 230px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 8%, rgba(255,255,255,.24) 0 36px, transparent 37px),
    linear-gradient(145deg, #835c72, #563849);
  box-shadow: 0 12px 28px rgba(70, 47, 58, .18);
  text-shadow: 0 1px 10px rgba(31, 20, 25, .2);
}
.workshop-poster.frequency-occasional {
  background:
    radial-gradient(circle at 90% 8%, rgba(255,255,255,.22) 0 36px, transparent 37px),
    linear-gradient(145deg, #52756b, #31534c);
}
.workshop-poster.teacher-tinted {
  background:
    radial-gradient(circle at 90% 8%, rgba(255,255,255,.24) 0 36px, transparent 37px),
    linear-gradient(145deg, color-mix(in srgb, var(--teacher-color) 88%, white), color-mix(in srgb, var(--teacher-color) 72%, black));
}
.workshop-poster.teacher-tinted::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: rgba(255,255,255,.45);
}
.poster-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.frequency, .poster-capacity {
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.17);
}
.poster-content h2 {
  margin: 3px 0 7px;
  max-width: 12ch;
  font-family: Georgia, serif;
  font-size: clamp(1.55rem, 6vw, 2.2rem);
  line-height: .95;
}
.poster-content .poster-teacher {
  max-width: 14ch;
  font-size: clamp(1.8rem, 6vw, 2.55rem);
}
.poster-content p, .poster-footer { margin: 0; color: rgba(255,255,255,.82); }
.poster-label {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.poster-period {
  font-size: 1.02rem;
  font-weight: 850;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.poster-footer {
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.2);
  font-size: .75rem;
}
.poster-members {
  display: block;
  margin-top: 7px;
  color: white;
  font-weight: 750;
}
.poster-edit {
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  color: white;
  background: transparent;
}
.poster-edit summary { font-size: .75rem; }
.poster-edit .stack { padding: 10px; border-radius: 10px; background: rgba(255,255,255,.12); }
.poster-edit label, .poster-edit legend { color: rgba(255,255,255,.9); }
.workshop-posters.is-editing { grid-template-columns: minmax(0, 700px); }
.workshop-posters.is-editing .workshop-poster:not(.is-editing) { display: none; }
.workshop-posters.is-editing .weekday-separator { display: none; }
.workshop-poster.is-editing { min-height: auto; }
.edit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.delete-workshop { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.25); }
.delete-workshop p { margin: 0 0 9px; color: rgba(255,255,255,.75); font-size: .75rem; }
button.danger { border-color: #8e263d; background: #8e263d; }
.teacher-filter { max-width: 420px; margin: 0 0 20px; padding: 14px; border: 1px solid #e9e0dc; border-radius: 14px; background: white; }
.admin-command { margin-top: 28px; padding: 20px; border: 1px solid #e9e0dc; border-radius: 18px; background: white; }
.admin-command h2 { margin: 4px 0 8px; font-family: Georgia, serif; }
.admin-command > p:not(.eyebrow) { color: var(--muted); }
.member-editor { min-width: 0; }
.member-list {
  max-height: 210px;
  padding: 8px;
  overflow-y: auto;
  border-radius: 9px;
  background: rgba(255,255,255,.12);
}
.member-list .check-option {
  padding: 7px 4px;
  border: 0;
  color: white;
  background: transparent;
}
.section-heading { margin: 0 2px 12px; }
.section-heading h2 { margin-top: 3px; font-family: Georgia, serif; font-size: 1.7rem; }
.session-card, .person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  color: inherit;
  text-decoration: none;
  background: var(--card);
  border: 1px solid #e9e0dc;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(70, 47, 58, .05);
}
.session-card p { margin: 0; font-size: .88rem; }
.workshop-display-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.workshop-display-title strong {
  font-family: Georgia, serif;
  font-size: 1.15em;
}
.workshop-display-title small {
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .45em;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.phone-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}
.phone-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.date { color: var(--accent); font-size: .75rem; font-weight: 750; }
.capacity {
  min-width: 54px;
  padding: 8px;
  border-radius: 999px;
  color: var(--green);
  background: #e3f0e9;
  text-align: center;
  font-weight: 800;
}
.capacity.full { color: var(--red); background: #f5e5e5; }
details { margin-top: 12px; padding: 15px; border: 1px solid #e5dcd8; border-radius: 12px; background: #fff; }
summary { cursor: pointer; font-weight: 750; }
form.stack { display: grid; gap: 12px; margin-top: 16px; }
.new-person-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.compact-check { display: flex; align-items: center; gap: 9px; min-height: 54px; padding: 9px 11px; border: 1px solid #eadfe0; border-radius: 10px; color: var(--ink); background: #faf7f5; cursor: pointer; }
.compact-check input { flex: 0 0 19px; width: 19px; height: 19px; min-height: 0; margin: 0; padding: 0; accent-color: var(--accent); }
.compact-check span { display: grid; gap: 1px; min-width: 0; }
.compact-check small { color: var(--muted); font-size: .72rem; font-weight: 400; line-height: 1.25; }
label { display: grid; gap: 5px; color: var(--muted); font-size: .82rem; font-weight: 700; }
fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
legend { margin-bottom: 6px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.radio-option {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid #d8cdca;
  border-radius: 9px;
  background: white;
}
.radio-option input { min-height: auto; margin: 0; accent-color: var(--accent); }
.radio-option span { display: grid; gap: 2px; color: var(--ink); }
.radio-option small { color: var(--muted); font-weight: 400; }
input, select, textarea, button {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d8cdca;
  border-radius: 9px;
  color: var(--ink);
  background: white;
  font: inherit;
}
textarea { min-height: 82px; resize: vertical; }
button { border-color: var(--accent); color: white; background: var(--accent); font-weight: 750; cursor: pointer; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 12px; border-radius: 9px; text-decoration: none; font-weight: 750; }
.secondary { border-color: #d8cdca; color: var(--accent); background: white; }
button:disabled { opacity: .45; }
.link-button { min-height: auto; padding: 6px; border: 0; color: var(--muted); background: none; }
.access-heading { max-width: 820px; margin: 7vh auto 22px; text-align: center; }
.access-heading h1 { margin-bottom: 8px; }
.login-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 390px)); justify-content: center; gap: 18px; }
.login-grid-three {
  width: min(calc(100vw - 28px), 1080px);
  margin-left: 50%;
  grid-template-columns: repeat(3, minmax(0, 350px));
  transform: translateX(-50%);
}
.login-card { margin: 0; padding: 24px; border-radius: 18px; background: white; box-shadow: 0 12px 32px rgba(68, 44, 56, .07); }
.login-card h2 { margin-bottom: 8px; }
.login-card form { display: grid; gap: 14px; margin-top: 24px; }
.login-card .button { width: 100%; }
.form-error { margin: 0; color: #9b2948; font-weight: 700; }
.form-result { margin: 0; color: var(--green); font-weight: 700; }
.friendly-login { width: min(calc(100vw - 28px), 520px); margin: 3vh 50% 0; transform: translateX(-50%); }
.login-welcome { text-align: center; }
.login-welcome h1 { font-size: clamp(2.5rem, 10vw, 3.6rem); }
.login-welcome > p:last-child { margin-top: 10px; }
.yarn-mark { position: relative; width: 62px; height: 62px; margin: 0 auto 15px; overflow: visible; border: 3px solid var(--accent); border-radius: 50%; color: transparent; background: repeating-linear-gradient(145deg, transparent 0 7px, rgba(114,76,97,.18) 8px 10px); }
.yarn-mark::after { content: ""; position: absolute; width: 54px; height: 20px; left: 45px; top: 42px; border-top: 3px solid var(--accent); border-radius: 50%; transform: rotate(12deg); }
.login-card-single { margin-top: 24px; padding: 22px; background:rgba(255,255,255,.96); backdrop-filter:blur(4px); }
.access-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 4px; border: 1px solid #e3d7d2; border-radius: 16px; background: #faf6f2; }
.access-tab { border: 0; border-radius: 12px; color: var(--ink); background: transparent; }
.access-tab.active { color: white; background: var(--accent); box-shadow: 0 5px 14px rgba(114,76,97,.2); }
.access-panel { margin-top: 20px; }
.access-panel form { display: grid; gap: 14px; }
.login-help-links { display: grid; gap: 12px; margin-top: 18px; text-align: center; }
.login-help-links a, .text-action, .install-link { color: var(--accent); font-size: .9rem; }
.text-action { min-height: auto; padding: 0; border: 0; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.inline-help-form { margin-top: 20px; padding-top: 18px; border-top: 1px solid #eadfe0; }
.inline-help-form p, .panel-intro { margin-top: 0; font-size: .9rem; line-height: 1.45; }
[hidden] { display: none !important; }
.privacy-card { max-width: 820px; margin: 24px auto; padding: clamp(22px, 5vw, 48px); background: white; border: 1px solid #eadfe0; border-radius: 24px; line-height: 1.65; }
.privacy-card h2 { margin-top: 30px; }
.privacy-card dt { margin-top: 8px; font-weight: 800; }
.privacy-card dd { margin-left: 0; color: var(--muted); }
.app-legal { margin: 18px auto; text-align: center; font-size: .88rem; }
.install-link { display: block; margin: 18px auto 0; text-align: center; text-decoration: none; }
.add-person { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px; margin: 16px 0 22px; }
.add-person button { grid-column: 1 / -1; }
.person select { width: 130px; }
.person small { display: block; margin-top: 3px; color: var(--muted); }
.waiting-person { border-left: 4px solid #b28642; }
.check-option { grid-template-columns: auto 1fr; align-items: center; color: inherit; }
.check-option input { min-height: auto; }
.backup-form { margin-top: 20px; }
.month-nav { display: flex; gap: 10px; margin-top: 18px; }
.month-nav a { padding: 8px 12px; color: var(--accent); border: 1px solid #d8cdca; border-radius: 9px; text-decoration: none; }
.timeline { display: grid; gap: 10px; }
.timeline-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  color: inherit;
  text-decoration: none;
  border: 1px solid #e9e0dc;
  border-radius: 14px;
  background: white;
}
.timeline-item time { display: grid; text-align: center; color: var(--accent); }
.timeline-item time strong { font-size: 1.35rem; }
.timeline-item time span { font-size: .72rem; }
.timeline-item h2, .timeline-item p { margin: 0; }
.directory { margin-top: 18px; }
.person-card { margin: 0; }
.person-card summary { display: flex; justify-content: space-between; gap: 10px; }
.person-card summary span { color: var(--muted); font-size: .78rem; }
.usual-schedule { margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: #faf5f6; color: var(--accent); }
.person-card .check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #faf7f5;
}
.person-card .checks {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 7px;
  padding: 10px;
  border: 1px solid #eadfe0;
  border-radius: 12px;
}
.person-card .checks legend { padding: 0 5px; }
.person-card .checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 9px;
  color: var(--ink);
  background: #faf5f6;
}
.person-card .check input,
.person-card .checks input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}
.priority-schedule { display: grid; gap: 9px; padding: 10px; border: 1px solid #d9c5cf; border-radius: 12px; background: #fff9fb; }
.priority-schedule > p { margin: 0; font-size: .82rem; }
@media (max-width: 560px) { .new-person-options { grid-template-columns: 1fr; } }
.admin-panel-section { margin-bottom: 18px; }
.admin-alerts { display: grid; gap: 10px; }
.admin-alert {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #e9e0dc;
  border-left: 6px solid var(--accent);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  background: white;
}
.admin-alert span { color: var(--muted); font-size: .92rem; }
.admin-alert.alert-warning { border-left-color: #b9822b; background: #fff9eb; }
.admin-alert.alert-danger { border-left-color: var(--red); background: #fff3f3; }
.admin-alert.alert-info { border-left-color: var(--green); background: #f2faf5; }
.maintenance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.maintenance-grid .wide { grid-column: 1 / -1; }
.metric-card.highlight { background: #fff9fb; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 10px; }
.stat-grid div { padding: 10px; border-radius: 12px; background: white; border: 1px solid #eadde2; }
.stat-grid strong { display: block; font-size: 1.35rem; color: var(--accent); }
.stat-grid span { display: block; color: var(--muted); font-size: .82rem; }
.report-filter { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 28px; align-items:end; }
.query-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.report-filter .button { grid-column: 1 / -1; }
.report-filter .print-button { grid-column: 1 / -1; }
.report-grid { display: grid; gap: 10px; margin-bottom: 30px; }
.metric-card { padding: 16px; border: 1px solid #e9e0dc; border-radius: 14px; background: white; }
.metric-card p { margin-bottom: 0; }
.pending-card { padding: 16px; border: 1px solid #e9e0dc; border-radius: 14px; background: white; }
.pending-card h2, .pending-card p { margin-top: 4px; }
.pending-actions { display: grid; gap: 8px; }
.pending-actions form:first-child { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.notice-status { padding: 7px 9px; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.notice-status.status-open { color: var(--green); background: #e3f0e9; }
.notice-status.status-filled { color: var(--red); background: #f5e5e5; }
.status-cancelled, .status-absent { opacity: .58; }
.status-attended { border-left: 4px solid var(--green); }
.empty { padding: 24px; color: var(--muted); text-align: center; border: 1px dashed #d8cdca; border-radius: 12px; }
.back { color: var(--accent); text-decoration: none; font-weight: 700; }
.flash { margin-bottom: 14px; padding: 12px; border-radius: 9px; background: #e3f0e9; }
.flash.error { background: #f5e5e5; }
@media (min-width: 680px) {
  .session-grid { grid-template-columns: 1fr 1fr; }
  .workshop-posters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 390px) {
  .workshop-posters { grid-template-columns: 1fr; }
  .workshop-poster { min-height: 205px; }
}
@media (max-width: 620px) {
  .access-heading { margin-top: 28px; text-align: left; }
  .login-grid { grid-template-columns: 1fr; }
  header { align-items: flex-start; flex-direction: column; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
  header nav { width: 100%; }
  .add-person { grid-template-columns: 1fr; }
  .add-person button { grid-column: auto; }
}
@media (min-width: 621px) and (max-width: 900px) {
  .login-grid-three { grid-template-columns: minmax(0, 520px); }
}
@media print {
  header, .report-filter, .flash { display: none; }
  body { background: white; }
  main { width: 100%; padding: 0; }
  .metric-card, .person { break-inside: avoid; box-shadow: none; }
}
