:root {
  --bg: #f4f8f6; --bg-2: #eaf5ef; --card: #ffffff; --ink: #0f1f19; --muted: #6b7c75; --line: #e6eeea;
  --brand: #008345; --brand-2: #00934d; --brand-3: #8ec965; --teal: #3fae55; --brand-soft: #e4f4dc;
  --grad: linear-gradient(135deg, #006b38 0%, #008345 50%, #4fae4f 100%);
  --warn: #b45309; --warn-soft: #fef3c7; --bad: #dc2626; --bad-soft: #fee2e2; --info: #4f46e5; --info-soft: #e0e7ff;
  --shadow: 0 1px 2px rgba(15, 31, 25, .04), 0 8px 24px -12px rgba(15, 31, 25, .12);
  --shadow-lg: 0 18px 40px -16px rgba(0, 131, 69, .45);
  --r: 10px; --r-sm: 6px;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0a1210; --bg-2: #0e1a16; --card: #121d19; --ink: #e9f3ee; --muted: #8fa39a; --line: #1f2e28;
    --brand: #8ec965; --brand-2: #00934d; --brand-soft: #14321f; --warn: #fbbf24; --warn-soft: #33270b;
    --bad: #f87171; --bad-soft: #3a1414; --info: #a5b4fc; --info-soft: #1e2142;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6); --shadow-lg: 0 18px 40px -16px rgba(0,131,69,.4); }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  background: radial-gradient(1200px 500px at 100% -10%, var(--bg-2), transparent 60%), var(--bg); background-attachment: fixed; min-height: 100vh; }
a { color: var(--brand); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.02em; }
h2 { font-size: 1.5rem; font-weight: 800; } h3 { font-size: 1.05rem; font-weight: 700; }
.center { display: grid; place-items: center; min-height: 60vh; text-align: center; padding: 16px; }
.muted { color: var(--muted); } .small { font-size: .85rem; }

/* header */
.top { position: sticky; top: 0; z-index: 5; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 1100px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; }
.brand img, .brand svg { width: 36px; height: 36px; object-fit: contain; }
.me { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 2px; }
nav { display: flex; flex-wrap: wrap; gap: 4px; max-width: 1100px; margin: 10px auto 0;
  padding: 4px; background: var(--card); border-radius: 10px; box-shadow: var(--shadow); width: fit-content; max-width: 100%; }
.bell { position: relative; border: 0; background: transparent; font-size: 1.25rem; line-height: 1; padding: 6px 8px; cursor: pointer; box-shadow: none; }
.badge { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff;
  font: 700 .7rem/18px var(--font); text-align: center; }
.notif { display: block; padding: 10px 12px; margin: 0 -4px; border-radius: 8px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.notif:hover { background: var(--bg-2); }
.notif.unread { background: var(--brand-soft); border-left: 3px solid var(--brand-2); }
/* schedule tabs, view switcher, everyone's schedule */
.seg { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 12px; background: var(--card); border-radius: 10px; box-shadow: var(--shadow); max-width: 100%; }
.seg a, .seg button { border: 0; background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 7px; font: inherit; font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer; box-shadow: none; white-space: nowrap; }
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg a.on, .seg button.on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(0,131,69,.8); }
.seg.sm { margin-bottom: 0; } .seg.sm button { padding: 5px 12px; font-size: .85rem; }
.mine { box-shadow: inset 3px 0 0 var(--brand-2); background: color-mix(in srgb, var(--brand-soft) 55%, transparent); }
.sched td.name.mine { background: color-mix(in srgb, var(--brand-soft) 70%, var(--card)); }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month .mh { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.mday { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 68px; padding: 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); text-align: left; cursor: pointer; font: inherit; overflow: hidden; box-shadow: none; }
.mday.dim { opacity: .45; } .mday.today { border-color: var(--brand-2); box-shadow: inset 0 0 0 1px var(--brand-2); } .mday.mine { background: var(--brand-soft); }
.mday .dn { font-weight: 800; font-size: .85rem; } .mday .cnt { font-size: .7rem; font-weight: 700; color: var(--brand); } .mday .nm { display: none; font-size: .68rem; color: var(--muted); line-height: 1.25; }
.mday .wk { display: none; } .mday .cnt { font-size: .85rem; }
@media (min-width: 700px) { .mday { min-height: 96px; } .mday .nm { display: block; } .mday .wk { display: inline; } .mday .cnt { font-size: .7rem; } }
.daytot td { text-align: right; font-size: .8rem; color: var(--muted); background: color-mix(in srgb, var(--brand-soft) 35%, transparent); border-bottom: 2px solid var(--line); }
.menu { position: relative; }
.menu > button { border: 0; background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 7px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; box-shadow: none; }
.menu > button::after { content: " ▾"; font-size: .75em; }
.menu > button:hover { color: var(--ink); }
.menu > button.on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(0,131,69,.8); }
.pop { position: absolute; top: calc(100% + 8px); z-index: 30; min-width: 190px; display: flex; flex-direction: column; gap: 2px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; }
nav .pop a { color: var(--ink); padding: 9px 12px; border-radius: 7px; font-size: .92rem; }
nav .pop a:hover { background: var(--bg-2); }
nav .pop a.on { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
nav a { color: var(--muted); text-decoration: none; padding: 7px 14px; border-radius: 7px; white-space: nowrap; font-size: .9rem; font-weight: 600; transition: .15s; }
nav a:hover { color: var(--ink); }
nav a.on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(0,131,69,.8); }
nav .sep { width: 1px; background: var(--line); margin: 6px 4px; flex: none; }
main { max-width: 1100px; margin: 0 auto; padding: 18px 16px 90px; animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* surfaces */
.card { background: var(--card); border-radius: var(--r); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.page-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.page-h h2 { margin: 0; }

/* controls */
button, .btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 8px; padding: 9px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: transform .1s, box-shadow .15s, background .15s; }
button:hover { box-shadow: var(--shadow); }
button:active { transform: scale(.97); }
button.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -10px rgba(0,131,69,.9); }
button.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: var(--card); }
button.ghost { border-color: transparent; background: transparent; }
button.big { width: 100%; justify-content: center; padding: 16px; font-size: 1.05rem; border-radius: 10px; }
button:disabled { opacity: .5; cursor: default; transform: none; }
button.link { border: 0; background: none; color: var(--brand); padding: 4px 6px; box-shadow: none; }
label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; font: inherit; font-weight: 500; color: var(--ink);
  background: var(--bg); border: 1.5px solid transparent; border-radius: var(--r-sm); padding: 10px 12px; transition: .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); background: var(--card); box-shadow: 0 0 0 4px var(--brand-soft); }
input[type=checkbox] { display: inline; width: 18px; height: 18px; margin: 0 8px 0 0; accent-color: var(--brand-2); vertical-align: -3px; }
input[type=time] { min-width: 0; }

/* avatars */
.av { --s: 32px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; object-fit: cover; display: inline-grid; place-items: center;
  font-size: calc(var(--s) * .38); font-weight: 700; color: #fff; background: hsl(var(--h, 160) 55% 45%); box-shadow: 0 0 0 2px var(--card); }
.av-stack { display: flex; } .av-stack .av { margin-left: -8px; } .av-stack .av:first-child { margin-left: 0; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* clock screen */
.hero { position: relative; overflow: hidden; border-radius: 14px; padding: 22px; color: #fff; background: var(--grad); box-shadow: var(--shadow-lg); margin-bottom: 22px; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 55%, rgba(255,255,255,.10) 55%, rgba(255,255,255,.04) 80%, transparent 80%); }

.hero > * { position: relative; z-index: 1; }
.hero .muted { color: rgba(255,255,255,.8); }
.hero .pill { background: rgba(255,255,255,.2); color: #fff; }
.big-time { font-size: 3.2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hero-shift { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.14); font-weight: 600; font-size: .92rem; }
.clockbtn { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; width: 100%; max-width: 460px; height: 120px; margin: 22px auto 18px; border-radius: 12px; border: 0; color: #fff;
  font-size: 1.35rem; font-weight: 800; background: var(--grad); box-shadow: 0 0 0 6px var(--brand-soft), var(--shadow-lg); animation: glow 2.6s ease-in-out infinite; }
.clockbtn.out { background: linear-gradient(135deg, #e11d48, #f97316); box-shadow: 0 0 0 10px var(--bad-soft), 0 18px 40px -16px rgba(225,29,72,.5); animation: none; }
.clockbtn small { display: block; font-size: .8rem; font-weight: 600; opacity: .85; }
@keyframes glow { 0%,100% { box-shadow: 0 0 0 6px var(--brand-soft), var(--shadow-lg); } 50% { box-shadow: 0 0 0 11px color-mix(in srgb, var(--brand-soft) 50%, transparent), var(--shadow-lg); } }
.actions { display: grid; grid-template-columns: 1fr; gap: 10px; max-width: 460px; margin: 0 auto; }

/* pills / banners */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 5px; font-size: .75rem; font-weight: 700; background: var(--bg); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--brand-soft); color: var(--brand); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.banner { border-radius: 8px; padding: 12px 14px; margin: 10px 0; font-weight: 500; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner.ok { background: var(--brand-soft); color: var(--brand); }
.banner.info { background: var(--info-soft); color: var(--info); }

/* tables */
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* schedule grid */
.sched td { min-width: 98px; vertical-align: top; padding: 8px 5px; }
.sched th { padding: 10px 5px; }
.sched td.name { min-width: 168px; position: sticky; left: 0; background: var(--card); z-index: 1; }
.sched th.today, .sched td.today { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
.shift { display: block; width: 100%; text-align: left; padding: 6px 8px; margin-bottom: 4px; border-radius: 6px; font-size: .78rem; font-weight: 700;
  background: color-mix(in srgb, var(--c, #10b981) 16%, var(--card)); border: 0; border-left: 4px solid var(--c, #10b981); color: var(--ink); box-shadow: none; line-height: 1.3; }
.shift .muted { font-weight: 500; }
.shift.draft { background: var(--card); border: 1.5px dashed color-mix(in srgb, var(--c, #10b981) 70%, transparent); border-left-width: 4px; border-left-style: solid; }
.addcell { width: 100%; justify-content: center; padding: 3px; border: 1.5px dashed var(--line); background: transparent; color: var(--muted); font-size: .8rem; opacity: .6; box-shadow: none; }
.addcell:hover { opacity: 1; border-color: var(--brand-2); color: var(--brand); }

/* templates */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.tpl { border-top: 5px solid var(--c); display: flex; flex-direction: column; gap: 10px; margin: 0; }
.days { display: flex; gap: 4px; flex-wrap: wrap; }
.day { min-width: 38px; text-align: center; padding: 5px 4px; border-radius: 6px; font-size: .7rem; font-weight: 700; background: var(--bg); color: var(--muted); line-height: 1.2; }
.day.on { background: color-mix(in srgb, var(--c) 18%, var(--card)); color: var(--ink); }
.day span { display: block; font-weight: 500; font-size: .66rem; opacity: .8; }
.swatches { display: flex; gap: 8px; margin-top: 6px; }
.swatches input { display: none; }
.swatches label { margin: 0; width: 30px; height: 30px; border-radius: 7px; background: var(--c); cursor: pointer; box-shadow: 0 0 0 2px var(--card), 0 0 0 2px transparent; transition: .15s; }
.swatches input:checked + label { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--c); }
.dayrow { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 8px; align-items: center; margin-bottom: 6px; }
.dayrow label { margin: 0; color: var(--ink); font-size: .9rem; }
.dayrow input[type=time] { margin: 0; padding: 8px; }
.picklist { max-height: 260px; overflow: auto; border-radius: var(--r-sm); background: var(--bg); padding: 4px; }
.picklist label { display: flex; align-items: center; gap: 10px; margin: 0; padding: 7px 8px; border-radius: 6px; color: var(--ink); font-size: .92rem; cursor: pointer; }
.picklist label:hover { background: var(--card); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }
.chips button { padding: 5px 10px; font-size: .78rem; }

/* lists */
.list-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }

/* stats */
.stat { font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-card { margin: 0; }
.stat-card .muted { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(6, 20, 15, .45); backdrop-filter: blur(4px); z-index: 20; display: grid; place-items: center; padding: 12px; animation: fade .15s; }
.modal { background: var(--card); border-radius: 12px; width: min(540px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); animation: pop .2s ease-out; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 6px; }
.modal-h h3 { margin: 0; font-size: 1.2rem; }
.modal-b { padding: 10px 20px 20px; }
.x { border: 0; font-size: 1.5rem; padding: 0 8px; background: var(--bg); width: 36px; height: 36px; justify-content: center; }
.photo-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.photo-edit input[type=file] { display: none; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: 8px; z-index: 30; max-width: 90vw; font-weight: 600; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); animation: pop .2s; }

/* login */
/* ---- Holiday themes (set on <html data-theme="…"> by the app). Only the accent colors change; text and backgrounds stay readable. ---- */
/* Halloween (and the Oct 31 birthday) is always a dark night look, whatever the phone is set to */
:root[data-theme="halloween"], :root[data-theme="evbirthday"] { --bg: #0d0716; --bg-2: #3a1650; --card: #170e24; --ink: #f3ecfb; --muted: #a99bbd; --line: #2c1d3d; --brand: #fb923c; --brand-2: #7c3aed; --brand-soft: #3b2314; --warn: #fbbf24; --warn-soft: #33270b; --bad: #f87171; --bad-soft: #3a1414; --info: #c4b5fd; --info-soft: #241a40; --grad: linear-gradient(160deg, #0b0820 0%, #3b1170 45%, #9a3412 100%); --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.7); --shadow-lg: 0 18px 40px -16px rgba(124, 58, 237, .5); --deco: #d8b4fe; color-scheme: dark; }
:root[data-theme="thanksgiving"] { --brand: #9a3412; --brand-2: #c2410c; --brand-soft: #fde4c4; --bg: #fbefe0; --bg-2: #f9d3a5; --line: #efdcc4; --grad: linear-gradient(135deg, #7c2d12 0%, #c2410c 55%, #d97706 100%); }
:root[data-theme="christmas"] { --brand: #b91c1c; --brand-2: #15803d; --brand-soft: #fde2e2; --bg: #f7eeee; --bg-2: #cdeedc; --line: #ecdede; --grad: linear-gradient(135deg, #14532d 0%, #166534 45%, #b91c1c 100%); }
:root[data-theme="newyear"] { --brand: #a16207; --brand-2: #1e3a8a; --brand-soft: #fef3c7; --bg: #fdf8e7; --bg-2: #c7d7fb; --line: #efe6c8; --grad: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #ca8a04 100%); }
:root[data-theme="valentines"] { --brand: #be185d; --brand-2: #e11d48; --brand-soft: #fce7f3; --bg: #fdf0f6; --bg-2: #ffd1d9; --line: #f6dbe8; --grad: linear-gradient(135deg, #881337 0%, #be185d 50%, #f472b6 100%); }
:root[data-theme="stpatricks"] { --brand: #15803d; --brand-2: #0f5132; --brand-soft: #d2f5dc; --bg: #ebfaee; --bg-2: #b9f0c9; --line: #d6eedb; --grad: linear-gradient(135deg, #052e16 0%, #14532d 45%, #22c55e 100%); }
:root[data-theme="july4"] { --brand: #b91c1c; --brand-2: #1d4ed8; --brand-soft: #dbeafe; --bg: #eef4ff; --bg-2: #fecaca; --line: #dbe4f3; --grad: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 45%, #dc2626 100%); }
@media (prefers-color-scheme: dark) {
  :root[data-theme="halloween"], :root[data-theme="evbirthday"] { --bg: #0d0716; --bg-2: #3a1650; --card: #170e24; --ink: #f3ecfb; --muted: #a99bbd; --line: #2c1d3d; --brand: #fb923c; --brand-2: #7c3aed; --brand-soft: #3b2314; --warn: #fbbf24; --warn-soft: #33270b; --bad: #f87171; --bad-soft: #3a1414; --info: #c4b5fd; --info-soft: #241a40; --grad: linear-gradient(160deg, #0b0820 0%, #3b1170 45%, #9a3412 100%); --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.7); --shadow-lg: 0 18px 40px -16px rgba(124, 58, 237, .5); --deco: #d8b4fe; color-scheme: dark; }
  :root[data-theme="thanksgiving"] { --brand: #f59e0b; --brand-soft: #3a2410; --bg: #150d07; --bg-2: #4a2a10; --card: #1f1610; --line: #332416; }
  :root[data-theme="christmas"] { --brand: #f87171; --brand-soft: #3a1515; --bg: #0f0a0a; --bg-2: #14351f; --card: #1a1212; --line: #2e1f1f; }
  :root[data-theme="newyear"] { --brand: #fbbf24; --brand-soft: #3a2e0a; --bg: #0a0f1f; --bg-2: #1e2a5a; --card: #121a2e; --line: #1f2a44; }
  :root[data-theme="valentines"] { --brand: #f472b6; --brand-soft: #3a1527; --bg: #180a12; --bg-2: #4a1030; --card: #22121b; --line: #3a1f2e; }
  :root[data-theme="stpatricks"] { --brand: #4ade80; --brand-soft: #0f2e1a; --bg: #07130b; --bg-2: #0f3d20; --card: #0f1c13; --line: #1c3324; }
  :root[data-theme="july4"] { --brand: #93c5fd; --brand-soft: #172554; --bg: #0a0f1f; --bg-2: #3a1414; --card: #121a2e; --line: #1f2a44; }
}
/* scenery */
.top { position: sticky; }
.top > .top-row, .top > nav { position: relative; z-index: 1; }
.deco { pointer-events: none; color: var(--deco, #2a1240); }
.deco-h { position: absolute; inset: 0; overflow: hidden; }
.deco-h .web { position: absolute; left: 0; top: 0; width: 86px; height: 86px; opacity: .45; }
.deco-h .bat { position: absolute; width: 22px; height: 11px; fill: currentColor; opacity: .8; left: -30px; animation: fly 22s linear infinite; }
.deco-h .bat.b1 { top: 10px; } .deco-h .bat.b2 { top: 26px; width: 16px; animation-duration: 31s; animation-delay: -12s; } .deco-h .bat.b3 { top: 6px; width: 13px; animation-duration: 27s; animation-delay: -21s; opacity: .55; }
@keyframes fly { 0% { transform: translateX(0) translateY(0); } 25% { transform: translateX(28vw) translateY(6px); } 50% { transform: translateX(55vw) translateY(-5px); } 75% { transform: translateX(82vw) translateY(5px); } 100% { transform: translateX(110vw) translateY(0); } }
.hero > .deco-hero { position: absolute; inset: 0; z-index: 0; }
.deco-hero .scene { position: absolute; right: 0; bottom: 0; height: 100%; width: 100%; }
.deco-hero .web { position: absolute; right: 0; top: 0; width: 110px; height: 110px; color: #fff; opacity: .35; transform: scaleX(-1); }
.hero::after { z-index: 0; }
@media (prefers-reduced-motion: reduce) { .deco-h .bat { animation: none; left: auto; right: 120px; } }
.brand .fest { font-size: 1rem; letter-spacing: 2px; margin-left: 2px; font-weight: 400; }
.brand span.fest { display: inline; }
.fest-greet { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.fest-ic { letter-spacing: 2px; }
:root[data-theme="evbirthday"] .fest-greet { background: var(--grad); color: #fff; box-shadow: var(--shadow-lg); }
:root[data-theme="evbirthday"] .fest-ic, :root[data-theme="evbirthday"] .brand .fest { animation: bob 1.4s ease-in-out infinite; display: inline-block; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-3px) rotate(3deg); } }
.nb { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--bad); color: #fff; font-size: .7rem; font-weight: 800; line-height: 1; vertical-align: 1px; }
nav a.on .nb, .menu > button.on .nb { background: #fff; color: var(--bad); }
.aplist { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.aplist > summary { cursor: pointer; padding: 4px 0; }
.apperson { margin-top: 10px; }
.apperson table { margin-top: 4px; } .apperson td, .apperson th { padding: 5px 8px; }
/* 💡 suggestions bubble: bottom-right on every page, above the phone home bar */
.sugg { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20; display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 999px; border: 0; background: var(--grad); color: #fff; font-weight: 700; box-shadow: var(--shadow-lg); }
.sugg:hover { box-shadow: var(--shadow-lg); filter: brightness(1.05); }
.sugg span:first-child { font-size: 1.1rem; line-height: 1; }
@media (max-width: 600px) { .sugg { padding: 12px; } .sugg .sugg-t { display: none; } }
textarea { resize: vertical; }
/* Loading: a stalk of celery spinning above "Loading…" */
.loading { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 0; text-align: center; }
.loading .celery { width: 96px; height: 96px; animation: celery-spin 1.1s linear infinite; }
@keyframes celery-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading .celery { animation-duration: 4s; } }
/* the occasional celery flying across the screen */
.celery-fly { position: fixed; left: 0; top: 0; z-index: 15; pointer-events: none; opacity: .9; will-change: transform; filter: drop-shadow(0 3px 4px rgba(0,0,0,.18)); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
/* "Sign in with Microsoft" per Microsoft's branding guidelines: Segoe UI 15px semibold, 21px logo, 12px padding, light or dark theme. */
button.msbtn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 41px; padding: 10px 12px; margin-top: 4px;
  font: 600 15px/1 "Segoe UI", system-ui, sans-serif; color: #5e5e5e; background: #fff; border: 1px solid #8c8c8c; border-radius: 4px; box-shadow: none; }
button.msbtn:hover { background: #f3f3f3; box-shadow: none; }
button.msbtn:focus-visible { outline: 2px solid #0067b8; outline-offset: 2px; }
@media (prefers-color-scheme: dark) { button.msbtn { color: #fff; background: #2f2f2f; border-color: #8c8c8c; } button.msbtn:hover { background: #3a3a3a; } }
.login { width: min(400px, 100%); text-align: left; }
.login-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.login-head img, .login-head svg { width: 72px; height: auto; max-height: 72px; flex: none; }
.login-head h2 { margin: 0; font-size: 1.45rem; line-height: 1.2; }
.pwalt { margin: 14px 0 0; text-align: center; }
.pwalt button.link { font-size: .72rem; font-weight: 500; color: var(--muted); padding: 2px 4px; }
.pwalt button.link:hover { color: var(--brand); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 14px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

@media (max-width: 600px) {
  h2 { font-size: 1.3rem; }
  .brand span { display: none; }
  /* Phone: Clock / Schedule / Requests / Hours share one row in equal widths; the Manage / Admin menus drop to a second row. */
  nav { width: 100%; gap: 2px; }
  nav > a { flex: 1 1 0; min-width: 0; text-align: center; padding: 8px 4px; font-size: .84rem; }
  nav .sep { flex-basis: 100%; width: auto; height: 0; margin: 2px 0; background: none; }
  nav .menu { flex: 1 1 0; }
  nav .menu > button { width: 100%; padding: 8px 4px; font-size: .84rem; text-align: center; justify-content: center; }
  nav .pop { min-width: 0; width: max(190px, 100%); }
}

[hidden] { display: none !important; }
