:root { --bg:#0f1115; --card:#181b22; --line:#2a2f3a; --text:#e8eaf0; --muted:#9aa3b2; --accent:#f5a524; --yes:#22c55e; --maybe:#eab308; --no:#ef4444; --pending:#4b5563; }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background:var(--bg); color:var(--text); }
.top { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; padding:14px 18px; border-bottom:1px solid var(--line); position:sticky; top:0; background:rgba(15,17,21,.95); z-index:5; }
.brand { font-weight:800; font-size:1.2rem; }
.tabs { display:flex; gap:6px; }
.tabs a { color:var(--muted); text-decoration:none; padding:8px 14px; border-radius:999px; border:1px solid var(--line); font-weight:600; }
.tabs a.active { background:var(--accent); color:#111; border-color:var(--accent); }
main { max-width:960px; margin:0 auto; padding:16px; display:flex; flex-direction:column; gap:14px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:14px 16px; }
h2 { margin:0 0 10px; font-size:1.05rem; }
.whoami { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.whoami label { font-weight:700; }
select, input[type=text], input[type=date], input[type=time] { background:#0f1115; color:var(--text); border:1px solid var(--line); border-radius:8px; padding:8px 10px; font-size:1rem; }
.propose { display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; }
.propose label { display:flex; flex-direction:column; gap:4px; font-size:.85rem; color:var(--muted); }
.propose .grow { flex:1 1 180px; } .propose .full { flex:1 1 100%; }
.propose input { width:100%; }
button { cursor:pointer; border-radius:8px; border:1px solid var(--line); background:#232834; color:var(--text); padding:8px 12px; font-size:.95rem; }
button:hover { filter:brightness(1.15); }
button.primary { background:var(--accent); color:#111; border-color:var(--accent); font-weight:700; }
button:disabled { opacity:.5; cursor:not-allowed; }
.msg { min-height:1.2em; margin:8px 0 0; font-size:.9rem; } .msg.err { color:var(--no); } .msg.ok { color:var(--yes); }
.muted { color:var(--muted); } .small { font-size:.85rem; } .hidden { display:none !important; }
.row-between { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.banner { border-radius:14px; padding:12px 16px; background:linear-gradient(90deg, rgba(34,197,94,.18), rgba(245,165,36,.12)); border:1px solid rgba(34,197,94,.5); }
.grid-wrap { overflow-x:auto; }
table.grid { border-collapse:collapse; width:100%; font-size:.9rem; }
.grid th, .grid td { border-bottom:1px solid var(--line); padding:6px 8px; text-align:center; white-space:nowrap; }
.grid th:first-child, .grid td:first-child { text-align:left; }
.grid tr.best td { background:rgba(34,197,94,.08); }
.dot { display:inline-block; width:22px; height:22px; line-height:22px; border-radius:50%; font-size:.8rem; }
.dot.yes { background:var(--yes); } .dot.maybe { background:var(--maybe); color:#111; } .dot.no { background:var(--no); } .dot.pending { background:var(--pending); }
.slots { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:12px; }
.slot { position:relative; }
.slot.best { border-color:var(--yes); box-shadow:0 0 0 1px var(--yes) inset; }
.slot.confirmed { border-color:var(--accent); }
.slot.cancelled { opacity:.55; }
.slot .when { font-size:1.1rem; font-weight:800; }
.slot .meta { color:var(--muted); font-size:.9rem; margin:2px 0 8px; }
.badge { display:inline-block; font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.04em; padding:2px 8px; border-radius:999px; margin-left:6px; vertical-align:middle; }
.badge.best { background:var(--yes); color:#06210f; } .badge.confirmed { background:var(--accent); color:#111; } .badge.cancelled { background:var(--no); }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }
.chip { padding:3px 9px; border-radius:999px; font-size:.82rem; border:1px solid var(--line); }
.chip.yes { background:rgba(34,197,94,.2); border-color:var(--yes); } .chip.maybe { background:rgba(234,179,8,.2); border-color:var(--maybe); }
.chip.no { background:rgba(239,68,68,.2); border-color:var(--no); } .chip.pending { color:var(--muted); border-style:dashed; }
.chip.me { font-weight:800; }
.vote { display:flex; gap:6px; margin:8px 0; }
.vote button { flex:1; } .vote button.sel.yes { background:var(--yes); color:#06210f; } .vote button.sel.maybe { background:var(--maybe); color:#111; } .vote button.sel.no { background:var(--no); }
.actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; } .actions button, .actions a { font-size:.82rem; padding:6px 9px; }
.actions a { color:var(--text); border:1px solid var(--line); border-radius:8px; text-decoration:none; background:#232834; }
.empty { color:var(--muted); text-align:center; padding:24px; grid-column:1/-1; }
footer { text-align:center; padding:24px 16px 40px; }
@media (max-width:560px) { .top { padding:10px 12px; } main { padding:10px; } .tabs a { padding:6px 10px; font-size:.9rem; } }

/* ---------- Home ---------- */
.brand { color:inherit; text-decoration:none; }
.home { text-align:center; padding-top:40px; }
.home h1 { font-size:2rem; margin:0 0 6px; }
.band-buttons { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:18px; margin-top:24px; }
.band-btn { display:flex; flex-direction:column; align-items:center; gap:10px; text-decoration:none; color:var(--text); background:var(--card); border:1px solid var(--line); border-radius:16px; padding:16px; transition:transform .12s ease; }
.band-btn:hover { transform:translateY(-3px) rotate(-.4deg); border-color:var(--accent); }
.band-btn img { width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:10px; display:block; }
.band-btn .name { font-weight:800; font-size:1.1rem; }
.band-btn .who { font-size:.85rem; color:var(--muted); }
.band-btn.mehn { background:#f6f1e3; color:#111; border:2px solid #111; border-radius:6px 14px 8px 12px; box-shadow:4px 5px 0 #111; font-family:'Patrick Hand', 'Comic Sans MS', cursive; }
.band-btn.mehn .name { font-family:'Gloria Hallelujah', cursive; font-size:1.3rem; background:linear-gradient(100deg, transparent 4%, rgba(255,230,0,.75) 6%, rgba(255,230,0,.75) 94%, transparent 96%); padding:0 10px; }
.band-btn.mehn .who { color:#444; }
.band-btn.tpe .logo-fallback, .band-hero .logo-fallback { width:100%; aspect-ratio:16/9; display:flex; flex-direction:column; justify-content:center; align-items:center; background:#0b0b0f; border-radius:10px; font-family:Georgia, serif; letter-spacing:.2em; font-weight:700; font-size:1.6rem; color:#f2f2f2; }
.logo-fallback b { color:#c9a227; }

/* ---------- Band hero ---------- */
.band-hero { text-align:center; }
.band-hero img { max-width:min(560px, 100%); width:100%; border-radius:12px; display:block; margin:0 auto; }
.band-hero .logo-fallback { max-width:560px; margin:0 auto; aspect-ratio:auto; padding:28px 12px; }

/* ---------- Mehn: slacker notebook ---------- */
body.theme-mehn {
  --bg:#f6f1e3; --card:#fffdf6; --line:#1a1a1a; --text:#141414; --muted:#5b5b5b; --accent:#ffe600;
  --yes:#3fae5a; --maybe:#f2c200; --no:#e04848; --pending:#bdb7a6;
  font-family:'Patrick Hand', 'Comic Sans MS', cursive; font-size:18px;
  background-color:var(--bg);
  background-image:
    linear-gradient(90deg, transparent 54px, rgba(224,72,72,.45) 54px, rgba(224,72,72,.45) 56px, transparent 56px),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(80,130,200,.22) 31px 32px);
}
.theme-mehn .top { background:rgba(246,241,227,.96); border-bottom:2px solid #111; }
.theme-mehn .brand { font-family:'Gloria Hallelujah', cursive; }
.theme-mehn .tabs a { color:#111; border:2px solid #111; border-radius:12px 6px 14px 8px; }
.theme-mehn .tabs a.active { background:var(--accent); color:#111; border-color:#111; }
.theme-mehn .card { border:2px solid #111; border-radius:4px 12px 6px 14px / 12px 4px 14px 6px; box-shadow:3px 4px 0 #111; }
.theme-mehn .slot:nth-child(odd) { transform:rotate(-.5deg); }
.theme-mehn .slot:nth-child(even) { transform:rotate(.45deg); }
.theme-mehn h2, .theme-mehn .when { font-family:'Gloria Hallelujah', cursive; font-weight:400; display:inline-block;
  background:linear-gradient(100deg, transparent 2%, rgba(255,230,0,.7) 4%, rgba(255,230,0,.7) 96%, transparent 98%); padding:0 8px; }
.theme-mehn select, .theme-mehn input[type=text], .theme-mehn input[type=date], .theme-mehn input[type=time] {
  background:transparent; color:#111; border:none; border-bottom:2px solid #111; border-radius:0; font-family:inherit; font-size:1.05rem; }
.theme-mehn button { font-family:inherit; font-size:1.05rem; background:#fffdf6; color:#111; border:2px solid #111; border-radius:10px 4px 12px 5px; }
.theme-mehn button.primary { background:var(--accent); }
.theme-mehn .actions a { background:#fffdf6; color:#111; border:2px solid #111; }
.theme-mehn .banner { background:rgba(255,230,0,.45); border:2px dashed #111; }
.theme-mehn .chip { border:1.5px solid #111; }
.theme-mehn .chip.yes { background:rgba(63,174,90,.25); } .theme-mehn .chip.maybe { background:rgba(255,230,0,.55); } .theme-mehn .chip.no { background:rgba(224,72,72,.25); }
.theme-mehn .chip.pending { color:#666; border-style:dashed; }
.theme-mehn .grid th, .theme-mehn .grid td { border-bottom:1.5px dashed #999; }
.theme-mehn .grid tr.best td { background:rgba(255,230,0,.35); }
.theme-mehn .badge.best, .theme-mehn .badge.confirmed { background:#111; color:var(--accent); }
.theme-mehn .vote button.sel.yes { background:var(--yes); color:#111; }
.theme-mehn .msg.ok { color:#1f7a37; }
.theme-mehn footer { font-family:'Gloria Hallelujah', cursive; }
.theme-mehn .band-hero img { border-radius:2px; box-shadow:3px 4px 0 #111; border:2px solid #111; transform:rotate(-1deg); }

/* ---------- TPE: clean dark ---------- */
body.theme-tpe { --accent:#c9a227; }

/* ---------- Week scheduler ---------- */
.inline { display:inline-block; margin:0; }
.wrap { flex-wrap:wrap; }
.btn { display:inline-block; cursor:pointer; border-radius:8px; border:1px solid var(--line); background:#232834; color:var(--text); padding:10px 14px; font-size:1rem; text-decoration:none; font-family:inherit; }
.btn.primary, a.btn.primary { background:var(--accent); color:#111; border-color:var(--accent); font-weight:700; }
.name-buttons { display:grid; grid-template-columns:repeat(auto-fill, minmax(120px, 1fr)); gap:10px; }
.name-btn { font-size:1.15rem; padding:14px 10px; font-weight:700; }
button.ghost { background:transparent; }
.week-nav { display:flex; gap:6px; }
.week-nav button.sel { background:var(--accent); color:#111; border-color:var(--accent); font-weight:700; }
.lock-status { margin-top:10px; line-height:1.6; }
.slot-toggles { display:flex; flex-direction:column; gap:8px; }
.day { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:8px 0; border-bottom:1px solid var(--line); }
.day:last-child { border-bottom:none; }
.day.past { opacity:.45; }
.day-label { min-width:150px; font-weight:700; }
.day-slots { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.slot-toggle { min-width:110px; padding:10px 12px; font-size:1rem; }
.slot-toggle.on { background:var(--yes); color:#06210f; border-color:var(--yes); font-weight:700; }
.badge.today { background:var(--accent); color:#111; } .badge.holiday { background:#7c3aed; color:#fff; }
.lock-row { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:14px; }
.lock-row button { padding:12px 18px; font-size:1.05rem; }
.grid .yes { color:var(--yes); font-weight:800; font-size:1.1rem; } .grid .no { color:var(--muted); }
.grid tr.all td { background:rgba(34,197,94,.14); }
.send-card { border-color:var(--yes); }
.message-preview { white-space:pre-wrap; background:rgba(0,0,0,.25); border-radius:10px; padding:12px; font-family:inherit; font-size:.95rem; margin:0 0 12px; }
.send-actions { display:flex; flex-wrap:wrap; gap:10px; }
.theme-mehn .btn { background:#fffdf6; color:#111; border:2px solid #111; border-radius:10px 4px 12px 5px; }
.theme-mehn .btn.primary { background:var(--accent); }
.theme-mehn .slot-toggle.on { background:var(--accent); color:#111; border-color:#111; }
.theme-mehn .week-nav button.sel { background:var(--accent); color:#111; border-color:#111; }
.theme-mehn .day { border-bottom:1.5px dashed #999; }
.theme-mehn .message-preview { background:rgba(255,230,0,.25); border:1.5px dashed #111; }
.theme-mehn .grid tr.all td { background:rgba(255,230,0,.45); }
.theme-mehn .badge.today { background:#111; color:var(--accent); }
@media (max-width:560px) { .day-label { min-width:100%; } .slot-toggle { min-width:0; flex:1 1 30%; } }

/* ---------- Wax it ---------- */
.wax-btn { font-weight:800; font-size:1.05rem; padding:12px 18px; border-radius:10px; background:var(--accent); color:#111; border:2px solid var(--accent); letter-spacing:.02em; white-space:nowrap; }
.wax-btn.small { font-size:.85rem; padding:6px 10px; }
.wax-card { border-color:var(--accent); }
.wax-list { display:flex; flex-direction:column; gap:10px; }
.wax-row { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px 12px; padding:8px 0; border-bottom:1px solid var(--line); }
.wax-row:last-child { border-bottom:none; }
.grid tr.waxed td { background:rgba(201,162,39,.22); font-weight:700; }
.wax-banner { position:relative; text-align:center; padding:22px 18px 18px; border-radius:14px; overflow:hidden; }
.wax-banner .wax-title { font-size:.95rem; font-weight:800; text-transform:uppercase; letter-spacing:.18em; }
.wax-banner .wax-when { font-size:clamp(1.6rem, 6vw, 2.4rem); font-weight:900; line-height:1.15; margin:6px 0 2px; }
.wax-banner .wax-time { font-size:1.1rem; font-weight:700; opacity:.85; }
.wax-banner .wax-who { margin-top:12px; font-size:1.02rem; }
.wax-banner .wax-out { opacity:.7; font-size:.9rem; }
.wax-banner .wax-by { margin-top:4px; font-size:.9rem; opacity:.75; }
.wax-actions { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:10px 18px; margin-top:14px; }
.wax-actions .wax-cal { font-weight:800; }
button.linkish { background:none; border:none; padding:4px; text-decoration:underline; font-size:.9rem; color:inherit; opacity:.75; }
.toast { position:fixed; left:50%; bottom:20px; transform:translateX(-50%); max-width:min(92vw, 520px); padding:12px 16px; border-radius:12px; font-weight:700; z-index:20; box-shadow:0 8px 30px rgba(0,0,0,.35); background:#2a1414; color:#ffd7d7; border:1px solid var(--no); }
.toast.ok { background:#13261a; color:#c9f7d6; border-color:var(--yes); }

/* TPE: dark industrial — steel plate, hazard stripe, brass type */
.theme-tpe .wax-btn { background:linear-gradient(180deg, #e0b93a, #b08a1c); border-color:#7a5f10; color:#111; text-transform:uppercase; letter-spacing:.12em; box-shadow:inset 0 1px 0 rgba(255,255,255,.35), 0 2px 0 #000; }
.theme-tpe .wax-banner { color:#f2f2f2; border:2px solid #c9a227; padding-top:30px;
  background:repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 2px, transparent 2px 6px), linear-gradient(160deg, #23262d 0%, #121418 55%, #0b0c0f 100%);
  box-shadow:inset 0 0 0 4px #0b0c0f, inset 0 0 40px rgba(0,0,0,.6), 0 6px 24px rgba(0,0,0,.45); }
.theme-tpe .wax-banner::before { content:''; position:absolute; left:0; right:0; top:0; height:12px;
  background:repeating-linear-gradient(-45deg, #c9a227 0 14px, #111 14px 28px); }
.theme-tpe .wax-banner .wax-title { color:#c9a227; font-family:Georgia, serif; }
.theme-tpe .wax-banner .wax-when { font-family:Georgia, serif; letter-spacing:.04em; text-transform:uppercase; text-shadow:0 2px 0 #000; }
.theme-tpe .wax-banner .wax-cal { background:#c9a227; color:#111; border-color:#c9a227; text-transform:uppercase; letter-spacing:.08em; font-size:.9rem; }

/* Mehn: notebook + yellow highlighter */
.theme-mehn .wax-btn { background:#111; color:var(--accent); border:2px solid #111; border-radius:12px 5px 14px 6px; font-family:'Gloria Hallelujah', cursive; font-weight:400; box-shadow:2px 3px 0 rgba(0,0,0,.25); transform:rotate(-1deg); }
.theme-mehn .wax-btn:hover { transform:rotate(1deg) scale(1.03); }
.theme-mehn .wax-row { border-bottom:1.5px dashed #999; }
.theme-mehn .grid tr.waxed td { background:rgba(255,230,0,.8); }
.theme-mehn .wax-banner { color:#111; background:#fffdf6; border:2.5px solid #111; border-radius:6px 16px 8px 18px / 16px 6px 18px 8px; box-shadow:4px 5px 0 #111; transform:rotate(-.6deg); }
.theme-mehn .wax-banner .wax-title { font-family:'Gloria Hallelujah', cursive; letter-spacing:.08em; text-transform:none; font-size:1.1rem; font-weight:400; }
.theme-mehn .wax-banner .wax-when { font-family:'Gloria Hallelujah', cursive; font-weight:400; display:inline-block; padding:0 14px;
  background:linear-gradient(100deg, transparent 1%, rgba(255,230,0,.85) 3%, rgba(255,230,0,.75) 97%, transparent 99%); transform:rotate(-1deg); }
.theme-mehn .wax-banner .wax-cal { background:var(--accent); }
.theme-mehn .toast { font-family:'Patrick Hand', cursive; }
