@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #7a8179;
  --paper: #f4f3ed;
  --card: #fffefa;
  --line: #e8e7df;
  --lime: #d3f27b;
  --forest: #1d342a;
  --soft-green: #edf4e5;
  --mono: "DM Mono", "Courier New", monospace;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #96bc49; outline-offset: 3px; }
::selection { color: var(--ink); background: var(--lime); }

.loading-screen, .error-screen, .setup-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; padding: 32px; text-align: center; }
.loading-screen p { color: var(--muted); font-size: 14px; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: var(--lime); color: var(--ink); font-family: "Manrope", sans-serif; font-size: 25px; font-weight: 800; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: "Manrope", sans-serif; font-size: 21px; font-weight: 800; letter-spacing: -1px; text-decoration: none; }
.brand-period, .heading-dot { color: #8eaf45; }
.eyebrow { color: #7f8e71; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 1.15px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 8px; padding: 0 17px; font-size: 13px; font-weight: 700; transition: transform .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .7; transform: none; }
.button svg, .icon-button svg, .rehearsal-meta svg, .dashboard-footer svg, .pending-line svg, .empty-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.button-dark { background: var(--ink); color: white; }
.button-dark:hover { background: #2b3c33; }
.text-button { border: 0; padding: 0; background: transparent; color: #526e3b; font-size: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; max-width: min(390px, calc(100vw - 32px)); padding: 15px 19px; border: 1px solid #dce5d2; border-radius: 10px; background: #fbfff6; box-shadow: 0 12px 36px #17211d1a; color: #315232; font-size: 14px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast-error { border-color: #f0d7d1; background: #fff8f6; color: #99493b; }

.setup-screen { justify-items: center; background: radial-gradient(ellipse at 75% 20%, #edf1dc 0, transparent 40%), var(--paper); }
.setup-card { width: min(100%, 520px); text-align: left; }
.setup-card .brand { margin-bottom: 65px; }
.setup-card h1, .error-screen h1 { margin: 16px 0 12px; font-family: "Manrope", sans-serif; font-size: clamp(32px, 6vw, 48px); line-height: 1.12; letter-spacing: -2px; }
.setup-card h1 em { color: #718e3e; font-style: normal; }
.setup-card > p { color: var(--muted); line-height: 1.7; }
.setup-steps { display: grid; gap: 17px; margin: 30px 0 22px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: #fffefa; list-style: none; }
.setup-steps li { display: flex; align-items: flex-start; gap: 13px; color: #4b544d; font-size: 14px; line-height: 1.6; }
.setup-steps li > span { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--soft-green); color: #4c6338; font-family: var(--mono); font-size: 11px; }
.setup-note { font-size: 12px; }
code { border-radius: 4px; padding: 2px 5px; background: #ecece4; font-family: var(--mono); font-size: .88em; }

.auth-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 47%); }
.auth-visual { position: relative; display: flex; min-height: 100vh; overflow: hidden; align-items: center; padding: clamp(44px, 8vw, 124px); background: var(--ink); color: white; }
.auth-visual::before { position: absolute; inset: 0; background: radial-gradient(ellipse at 8% 95%, #37513e 0, transparent 43%), radial-gradient(ellipse at 91% 11%, #25372d 0, transparent 41%); content: ""; }
.auth-quote { position: relative; z-index: 1; max-width: 560px; }
.auth-quote .eyebrow { color: #a7c477; }
.auth-quote h1 { max-width: 560px; margin: 28px 0 18px; font-family: "Manrope", sans-serif; font-size: clamp(42px, 5.3vw, 76px); line-height: 1.08; letter-spacing: -3.7px; }
.auth-quote h1 em { color: var(--lime); font-style: normal; }
.auth-quote p { color: #abb4ac; font-size: 16px; }
.staff { display: flex; align-items: baseline; gap: 26px; margin-top: 60px; color: #b7d77c; font-family: Georgia, serif; font-size: 36px; opacity: .8; }
.staff span:nth-child(2), .staff span:nth-child(4) { font-size: 52px; }
.visual-caption { position: absolute; right: 38px; bottom: 35px; left: 38px; display: flex; justify-content: space-between; color: #89978d; font-family: var(--mono); font-size: 9px; letter-spacing: 1.4px; }
.visual-caption span { color: var(--lime); font-size: 18px; }
.auth-orbit { position: absolute; width: 480px; height: 480px; border: 1px solid #ffffff0a; border-radius: 50%; }
.orbit-one { right: -210px; bottom: -240px; }
.orbit-two { right: -100px; bottom: -320px; }
.auth-panel { display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; padding: 38px clamp(35px, 6vw, 92px); background: #fbfaf6; }
.auth-form { width: 100%; max-width: 400px; margin: 50px auto; }
.auth-form h2 { margin: 13px 0 8px; font-family: "Manrope", sans-serif; font-size: 35px; letter-spacing: -1.5px; }
.form-intro { margin: 0 0 30px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.auth-form label, .rehearsal-form label { display: block; margin: 17px 0 8px; font-size: 12px; font-weight: 700; }
.auth-form input, .rehearsal-form input, .rehearsal-form textarea { width: 100%; min-height: 47px; border: 1px solid #e3e3da; border-radius: 7px; padding: 0 13px; background: white; color: var(--ink); font-size: 13px; }
.auth-form input::placeholder, .rehearsal-form input::placeholder, .rehearsal-form textarea::placeholder { color: #a4a69e; }
.auth-form input:focus, .rehearsal-form input:focus, .rehearsal-form textarea:focus { border-color: #91aa69; outline: 2px solid #dce9c7; }
.auth-submit { width: 100%; margin-top: 24px; }
.inline-error { min-height: 0; margin: 10px 0 0; color: #a34436; font-size: 12px; line-height: 1.5; }
.inline-error:empty { display: none; }
.auth-switch { margin-top: 21px; color: #7e837a; text-align: center; font-size: 12px; }
.auth-footnote { margin: 30px 0 5px; color: #93958c; text-align: center; font-size: 11px; }

.app-shell { min-height: 100vh; }
.topbar { height: 75px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(calc((100vw - 1180px) / 2), 5vw); border-bottom: 1px solid #e6e5dd; background: #faf9f4; }
.topbar .brand { font-size: 19px; }
.topbar .brand-mark { width: 34px; height: 34px; border-radius: 11px; font-size: 21px; }
.topbar-right { display: flex; align-items: center; gap: 15px; }
.role-badge { border: 1px solid #dfe5d6; border-radius: 30px; padding: 6px 9px; color: #78866b; font-family: var(--mono); font-size: 9px; letter-spacing: .6px; }
.role-admin { border-color: #d9e8bc; background: #eff6e2; color: #61783e; }
.user-chip { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 600; }
.avatar, .mini-avatar { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid #d6e2c6; border-radius: 50%; background: #eaf0df; color: #526a3d; font-size: 10px; font-weight: 700; }
.icon-button { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: #737d73; }
.icon-button:hover { background: #f0f0e9; color: var(--ink); }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.welcome-band { position: relative; display: flex; min-height: 268px; overflow: hidden; align-items: center; justify-content: space-between; padding: 38px max(calc((100vw - 1180px) / 2), 5vw); background: #e9eddf; }
.welcome-band::after { position: absolute; right: 0; bottom: 0; left: 0; height: 1px; background: #dce1d2; content: ""; }
.welcome-copy { position: relative; z-index: 1; }
.welcome-copy h1 { margin: 13px 0 8px; font-family: "Manrope", sans-serif; font-size: clamp(43px, 6vw, 66px); font-weight: 700; letter-spacing: -3.7px; line-height: 1.05; }
.welcome-copy h1 em { color: #718e3e; font-style: normal; }
.welcome-copy p { margin: 0; color: #717a6b; font-size: 14px; }
.welcome-art { position: absolute; top: -88px; right: max(calc((100vw - 1120px) / 2), 5vw); width: 390px; height: 390px; }
.art-disc { position: absolute; top: 28px; left: 62px; width: 310px; height: 310px; border: 1px solid #aeb995; border-radius: 50%; background: repeating-radial-gradient(circle at center, transparent 0 28px, #c0c8aa 29px 30px); opacity: .65; }
.art-disc::before { position: absolute; inset: 102px; border-radius: 50%; background: #d3f27b; content: ""; opacity: .68; }
.art-note { position: absolute; z-index: 1; color: #44543a; font-family: Georgia, serif; font-size: 47px; }
.note-one { top: 104px; left: 95px; transform: rotate(-17deg); }
.note-two { top: 182px; right: 2px; color: #738a48; font-size: 61px; transform: rotate(12deg); }
.art-spark { position: absolute; top: 80px; right: 65px; z-index: 2; color: #617a3e; font-size: 23px; }
.dashboard { width: min(100% - 48px, 1180px); margin: 0 auto; padding: 42px 0 20px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading h2 { margin: 8px 0 0; font-family: "Manrope", sans-serif; font-size: 25px; letter-spacing: -.8px; }
.section-heading .button { min-height: 42px; }
.rehearsal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 17px; }
.rehearsal-card { position: relative; min-width: 0; border: 1px solid #e7e6de; border-radius: 12px; padding: 22px; background: var(--card); transition: transform .2s ease, box-shadow .2s ease; }
.rehearsal-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px #17211d0a; }
.featured-card { border-top: 2px solid #a9cb61; }
.card-topline { display: flex; align-items: center; justify-content: space-between; }
.card-index { color: #899282; font-family: var(--mono); font-size: 9px; letter-spacing: .8px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #9dc05c; box-shadow: 0 0 0 4px #9dc05c23; }
.delete-button { border: 0; padding: 0 4px; background: transparent; color: #a6a69e; font-size: 22px; line-height: 1; }
.delete-button:hover { color: #a34436; }
.date-block { display: flex; align-items: baseline; gap: 6px; margin-top: 17px; }
.date-day { font-family: "Manrope", sans-serif; font-size: 34px; font-weight: 700; letter-spacing: -2px; line-height: 1; }
.date-month { color: #66734f; font-family: var(--mono); font-size: 11px; }
.date-weekday { margin-left: auto; color: #a0a297; font-family: var(--mono); font-size: 9px; letter-spacing: .7px; }
.rehearsal-card h3 { margin: 11px 0 11px; font-family: "Manrope", sans-serif; font-size: 19px; letter-spacing: -.45px; }
.rehearsal-meta { display: grid; gap: 8px; color: #757c72; font-size: 11px; }
.rehearsal-meta span { display: flex; align-items: center; gap: 7px; }
.rehearsal-meta svg { width: 14px; height: 14px; color: #87966f; }
.rehearsal-notes { margin: 14px 0 0; border-left: 2px solid #d5e5b5; padding-left: 10px; color: #777d73; font-size: 11px; line-height: 1.55; }
.respond-area, .attendance-summary { margin-top: 21px; border-top: 1px solid #eeede7; padding-top: 15px; }
.respond-prompt { color: #788071; font-size: 11px; }
.response-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
.response-button { min-height: 41px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #e6e8df; border-radius: 7px; background: #fff; color: #626d5b; font-size: 11px; font-weight: 700; transition: .15s ease; }
.response-button:hover { border-color: #a6c776; background: #f8fbf2; }
.response-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.response-button.selected-yes { border-color: #aecb7d; background: #f0f6e5; color: #4e6a31; }
.response-button.selected-no { border-color: #e4c4bb; background: #fcf3ef; color: #945c4d; }
.cross-icon { display: grid; width: 15px; height: 15px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 13px; line-height: 1; }
.member-count { margin-top: 11px; color: #999c91; text-align: center; font-size: 10px; }
.summary-title { display: flex; justify-content: space-between; color: #72796b; font-family: var(--mono); font-size: 9px; letter-spacing: .5px; }
.summary-title > span:last-child { color: #43563a; font-weight: 500; }
.summary-title i { color: #9a9c92; font-style: normal; }
.progress-track { height: 4px; overflow: hidden; margin: 9px 0 13px; border-radius: 4px; background: #eeefe8; }
.progress-track span { display: block; height: 100%; border-radius: 4px; background: #a6c86b; transition: width .3s ease; }
.response-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.response-label { display: flex; justify-content: space-between; margin-bottom: 7px; font-family: var(--mono); font-size: 8px; letter-spacing: .2px; }
.response-label b { font-size: 10px; }
.yes-label { color: #71894e; }
.no-label { color: #a27869; }
.member-stack { min-height: 24px; display: flex; align-items: center; }
.mini-avatar { width: 24px; height: 24px; margin-right: -5px; border: 2px solid #fffefa; background: #e6eedb; font-size: 8px; }
.avatar-muted { border-color: #fffefa; background: #eee8e2; color: #987b6f; }
.no-names { color: #a1a195; font-size: 9px; }
.pending-line { display: flex; align-items: center; gap: 4px; margin: 13px 0 0; color: #a27a50; font-size: 10px; }
.pending-line svg { width: 13px; height: 13px; color: #729548; }
.all-answered { color: #71894e; }
.empty-state { display: grid; min-height: 250px; justify-items: center; align-content: center; border: 1px dashed #d6dbca; border-radius: 12px; padding: 35px; text-align: center; background: #f9f9f3; }
.empty-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: #ecf2e3; color: #71894e; }
.empty-icon svg { width: 22px; height: 22px; }
.empty-state h3 { margin: 17px 0 5px; font-family: "Manrope", sans-serif; font-size: 18px; }
.empty-state p { max-width: 340px; margin: 0 0 17px; color: #81857a; font-size: 12px; line-height: 1.6; }
.past-section { margin-top: 42px; }
.compact-heading { margin-bottom: 13px; }
.compact-heading h2 { font-size: 20px; }
.past-list { border-top: 1px solid var(--line); }
.past-row { min-height: 48px; display: grid; grid-template-columns: 150px 1fr 180px; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); font-size: 11px; }
.past-date { color: #83877d; text-transform: capitalize; }
.past-title { font-weight: 700; }
.past-location { color: #8f9289; text-align: right; }
.dashboard-footer { display: flex; justify-content: space-between; margin-top: 54px; padding: 18px 0; border-top: 1px solid #e5e4dc; color: #90948a; font-size: 10px; }
.dashboard-footer > span:first-child { display: flex; align-items: center; gap: 6px; }
.dashboard-footer svg { width: 14px; height: 14px; color: #91a66c; }
.dashboard-footer > span:last-child { font-family: var(--mono); font-size: 9px; letter-spacing: 1px; }
.dashboard-footer i { color: #8fad54; font-style: normal; }
.install-button { position: fixed; right: 20px; bottom: 20px; border: 0; border-radius: 30px; padding: 12px 18px; background: var(--ink); box-shadow: 0 5px 16px #17211d2b; color: white; font-size: 12px; font-weight: 700; }

.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; overflow-y: auto; place-items: center; padding: 24px; background: #111a178c; backdrop-filter: blur(4px); }
.modal-card { position: relative; width: min(100%, 540px); border: 1px solid #eeede6; border-radius: 15px; padding: 36px; background: #fbfaf6; box-shadow: 0 28px 90px #0003; animation: modal-in .2s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
.modal-close { position: absolute; top: 15px; right: 17px; width: 31px; height: 31px; border: 1px solid #e7e7df; border-radius: 50%; background: transparent; color: #7b8077; font-size: 21px; line-height: 1; }
.modal-card h2 { margin: 10px 0 7px; font-family: "Manrope", sans-serif; font-size: 29px; letter-spacing: -1.2px; }
.modal-intro { margin: 0 0 21px; color: #82867c; font-size: 12px; }
.rehearsal-form label { margin-top: 14px; }
.rehearsal-form label span { color: #999d92; font-weight: 400; }
.rehearsal-form input { min-height: 43px; font-size: 12px; }
.rehearsal-form textarea { min-height: 78px; resize: vertical; padding: 11px 13px; font-size: 12px; line-height: 1.5; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row input { min-width: 0; }
.modal-submit { width: 100%; margin-top: 15px; }
.error-screen { background: radial-gradient(ellipse at 50% 20%, #edf1dc 0, transparent 45%), var(--paper); }
.error-screen h1 { max-width: 550px; }
.error-screen p { max-width: 500px; color: var(--muted); line-height: 1.6; }

@media (max-width: 920px) {
  .auth-screen { grid-template-columns: minmax(0, .9fr) minmax(390px, 1.1fr); }
  .auth-visual { padding: 48px; }
  .auth-quote h1 { font-size: clamp(40px, 6vw, 59px); }
  .welcome-art { right: -105px; opacity: .6; }
}
@media (max-width: 700px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-visual { min-height: 250px; padding: 43px 27px 48px; }
  .auth-quote .eyebrow { font-size: 9px; }
  .auth-quote h1 { max-width: 450px; margin: 15px 0 10px; font-size: 39px; letter-spacing: -2px; }
  .auth-quote p { margin: 0; font-size: 13px; }
  .staff, .visual-caption, .auth-orbit { display: none; }
  .auth-panel { min-height: 0; padding: 23px 26px; }
  .auth-panel > .brand { display: none; }
  .auth-form { max-width: 430px; margin: 42px auto 22px; }
  .auth-footnote { margin: 4px 0 5px; }
  .topbar { height: 65px; padding: 0 20px; }
  .topbar-right { gap: 10px; }
  .user-name { display: none; }
  .welcome-band { min-height: 225px; padding: 32px 24px; }
  .welcome-copy h1 { font-size: 48px; }
  .welcome-copy p { max-width: 270px; font-size: 12px; line-height: 1.5; }
  .welcome-art { top: -49px; right: -205px; opacity: .4; }
  .dashboard { width: calc(100% - 36px); padding-top: 32px; }
  .section-heading h2 { font-size: 21px; }
  .section-heading .button { gap: 6px; padding: 0 11px; font-size: 11px; }
  .section-heading .button svg { width: 14px; height: 14px; }
  .rehearsal-grid { grid-template-columns: 1fr; }
  .rehearsal-card { padding: 19px; }
  .past-row { grid-template-columns: 95px 1fr; gap: 8px; padding: 10px 0; }
  .past-location { grid-column: 2; text-align: left; }
  .dashboard-footer { margin-top: 38px; }
  .dashboard-footer > span:first-child { max-width: 210px; }
  .modal-card { padding: 29px 22px 23px; }
}
@media (max-width: 390px) {
  .role-badge { padding: 5px 7px; font-size: 8px; }
  .topbar-right { gap: 7px; }
  .welcome-copy h1 { font-size: 42px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
