/* Group Event Planner — toolkityourlife.com/GroupEventPlanner/
   Matches the site's look: black, Inter + Archivo Black, lime accent. Each event adds its own accent (--ev). Mobile first. */
:root {
  --bg: #000; --card: #121214; --card2: #18181b; --line: rgba(255,255,255,.12); --line2: rgba(255,255,255,.2);
  --ink: #f4f4f2; --muted: #9a9aa0; --accent: #c9ff3d; --accent-ink: #000;
  --ok: #34c472; --maybe: #e9b949; --bad: #ff6b6b; --info: #7cc4ff; --gold: #f5c542;
  --ev: #c9ff3d; --r: 14px; --tab-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
  /* names the shared calendar engine (gtcal.js) reads */
  --panel: var(--card); --panel2: var(--card2); --text: var(--ink);
  color-scheme: dark;
}
html.big { font-size: 115%; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 1rem/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh; }
body.has-tabs { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 8px); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse 70% 40% at 50% 0%, color-mix(in srgb, var(--ev) 9%, transparent), transparent 70%); }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* header */
.top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px; background: rgba(0,0,0,.8);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-nav { flex: 1; min-width: 0; min-height: 38px; display: flex; align-items: center; }
.acct { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 6px; border-radius: 999px;
  background: rgba(18,18,20,.9); border: 1px solid var(--line); cursor: pointer; font-size: .82rem; font-weight: 600; letter-spacing: .03em; }
.acct:hover { border-color: rgba(201,255,61,.6); }
.acct-av { width: 26px; height: 26px; border-radius: 50%; background: var(--card2); display: grid; place-items: center; overflow: hidden; font-size: .8rem; color: var(--muted); }
.acct-av img { width: 100%; height: 100%; object-fit: cover; }
.acct.signed-in .acct-av { background: var(--accent); color: #000; }
.acct.guest .acct-av { background: var(--maybe); color: #000; }
.acct-label { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu { position: absolute; right: 12px; top: calc(100% + 6px); min-width: 250px; max-width: calc(100vw - 24px); padding: 6px; background: rgba(18,18,20,.97);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,.6); }
.acct-menu p { margin: 8px 10px; color: var(--muted); font-size: .82rem; }
.acct-menu button, .acct-menu a { display: block; width: 100%; text-align: left; padding: 11px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); text-decoration: none; cursor: pointer; }
.acct-menu button:hover, .acct-menu a:hover { background: rgba(255,255,255,.07); color: var(--accent); }

/* layout */
.view { max-width: 980px; margin: 0 auto; padding: 16px 14px 24px; outline: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font: 400 clamp(1.5rem, 6vw, 2.3rem)/1.05 "Archivo Black", "Inter", sans-serif; text-transform: uppercase; letter-spacing: -.01em; }
h1 .accent { color: var(--accent); }
h2 { font-size: 1.08rem; font-weight: 700; }
h3 { font-size: .95rem; font-weight: 600; }
.sub { color: var(--muted); margin: 6px 0 0; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .tiny { font-size: .76rem; }
.ok-t { color: var(--ok); } .bad-t { color: var(--bad); } .warn-t { color: var(--maybe); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spread { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.section { margin-top: 20px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.card.ev { border-color: color-mix(in srgb, var(--ev) 40%, var(--line)); background: linear-gradient(color-mix(in srgb, var(--ev) 6%, transparent), color-mix(in srgb, var(--ev) 6%, transparent)), var(--card); }
.card.tight { padding: 10px 12px; }
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
.grid3 { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: repeat(3, 1fr); } .view { padding: 22px 20px 28px; } }
.crumbs { margin-bottom: 10px; }
.crumbs a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.crumbs a:hover { color: var(--accent); }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line2); background: var(--card2); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none; font-size: .95rem; }
.btn:hover { border-color: rgba(201,255,61,.6); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.evb { background: var(--ev); color: #000; border-color: var(--ev); }
.btn.primary:hover, .btn.evb:hover { filter: brightness(1.06); }
.btn.ghost { background: none; }
.btn.danger { color: var(--bad); border-color: rgba(255,107,107,.4); background: none; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn.xs { min-height: 30px; padding: 0 10px; font-size: .8rem; border-radius: 9px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg, .ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.big-actions { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.big-actions .btn { min-height: 74px; flex-direction: column; gap: 6px; font-size: 1rem; border-radius: 16px; }
.big-actions .btn svg { width: 24px; height: 24px; }
label.f { display: block; }
label.f > span, .f-label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.in, select.in, textarea.in { width: 100%; min-height: 44px; padding: 10px 12px; font-size: 16px; background: #0e0e10; color: var(--ink);
  border: 1px solid var(--line2); border-radius: 10px; }
textarea.in { min-height: 72px; resize: vertical; }
.in:focus { outline: none; border-color: rgba(201,255,61,.7); box-shadow: 0 0 0 3px rgba(201,255,61,.12); }
.fgrid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.fgrid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.seg { display: inline-flex; background: #0e0e10; border: 1px solid var(--line2); border-radius: 12px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 8px 12px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--muted); min-height: 38px; }
.seg button.on { background: var(--card2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.seg.rsvp button.on[data-v="yes"] { background: var(--ok); color: #032312; }
.seg.rsvp button.on[data-v="maybe"] { background: var(--maybe); color: #2b1f00; }
.seg.rsvp button.on[data-v="no"] { background: #3a3b42; color: var(--ink); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; background: #0e0e10; }
.stepper button { width: 44px; height: 44px; border: 0; background: none; font-size: 1.3rem; cursor: pointer; }
.stepper button:hover { background: rgba(255,255,255,.06); }
.stepper output, .stepper input { min-width: 40px; width: 48px; text-align: center; font-weight: 700; background: none; border: 0; font-size: 1.05rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px #000 inset; }

/* chips, badges, bars */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--card2); border: 1px solid var(--line); white-space: nowrap; }
.chip.ok { background: rgba(52,196,114,.16); border-color: rgba(52,196,114,.4); color: #8ff0b6; }
.chip.maybe { background: rgba(233,185,73,.14); border-color: rgba(233,185,73,.4); color: #f3d68f; }
.chip.no { color: var(--muted); }
.chip.ev { background: color-mix(in srgb, var(--ev) 18%, transparent); border-color: color-mix(in srgb, var(--ev) 50%, transparent); color: var(--ink); }
.chip.lock { background: var(--ev); color: #000; border-color: var(--ev); }
.bar { height: 8px; border-radius: 99px; background: #26262b; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--ok); }
.bar.over i { background: var(--info); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .78rem; color: #000; flex: none; }
.works { font-size: .8rem; color: var(--muted); text-decoration: none; border: 1px dashed var(--line2); padding: 4px 10px; border-radius: 999px; display: inline-block; }
.works:hover { color: var(--accent); border-color: rgba(201,255,61,.5); }
.empty { text-align: center; padding: 26px 12px; color: var(--muted); }
.banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r);
  background: rgba(124,196,255,.08); border: 1px solid rgba(124,196,255,.3); }
.banner.warn { background: rgba(233,185,73,.08); border-color: rgba(233,185,73,.35); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .92rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }

/* home list */
.evlist { display: grid; gap: 10px; }
.evrow { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--c, var(--accent)); text-decoration: none; color: var(--ink); }
.evrow:hover { border-color: var(--line2); border-left-color: var(--c); }
.evrow .ico { font-size: 1.5rem; width: 36px; text-align: center; flex: none; }
.evrow .t { flex: 1; min-width: 0; }
.evrow .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evrow .t small { color: var(--muted); }
.types { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .types { grid-template-columns: repeat(3, 1fr); } }
.type { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); cursor: pointer; text-align: left; min-height: 92px; }
.type .e { font-size: 1.7rem; }
.type b { font-size: 1rem; }
.type small { color: var(--muted); font-size: .78rem; }
.type.on { border-color: var(--c); box-shadow: 0 0 0 1px var(--c) inset; background: color-mix(in srgb, var(--c) 8%, var(--card)); }

/* event header & tabs */
.evhead { position: relative; padding: 16px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--ev) 45%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--ev) 22%, transparent), transparent 60%), var(--card); overflow: hidden; }
.evhead .kind { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ev); }
.evhead h1 { margin-top: 6px; font-size: clamp(1.4rem, 6vw, 2.1rem); word-break: break-word; }
.evhead .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .95rem; }
.evhead .meta span { display: inline-flex; align-items: center; gap: 6px; }
.evhead .meta .ic { width: 16px; height: 16px; color: var(--ev); }
.tabs { display: none; gap: 6px; margin: 14px 0 4px; overflow-x: auto; }
.tabs a { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.tabs a.on { background: var(--ev); border-color: var(--ev); color: #000; }
@media (min-width: 760px) { .tabs { display: flex; } body.has-tabs { padding-bottom: 0; } .tabbar { display: none !important; } }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(10,10,12,.94); border-top: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 600; position: relative; }
.tabbar a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--ev); }
.tabbar a b { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--bad); color: #fff; font-size: .62rem; display: grid; place-items: center; }

/* stats */
.stats { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 12px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); }
.stat b { display: block; font-size: 1.5rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .8rem; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps .tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid var(--line2); font-size: .8rem; }
.steps li.done .tick { background: var(--ok); border-color: var(--ok); color: #032312; }
.steps li.done span { color: var(--muted); text-decoration: line-through; }

/* calendar & polls */
.calwrap .gtc-month { border-color: color-mix(in srgb, var(--ev) 30%, var(--line)); }
.calwrap .gtc-d { font-size: 13px; }
.calwrap .gtc-d.mine-sel { outline: 2px solid #fff; outline-offset: 1px; }
.calwrap .gtc-d.opt { outline: 2px dashed var(--ev); outline-offset: 1px; }
.calwrap .gtc-d.won { outline: 3px solid var(--ev); outline-offset: 1px; z-index: 2; }
.daycard { margin-top: 10px; }
.people-line { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.people-line:last-child { border-bottom: 0; }
.poll { margin-top: 12px; }
.opt-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.opt-row:last-child { border-bottom: 0; }
.opt-row.won .ol b { color: var(--ev); }
.opt-row .ol small { display: block; color: var(--muted); }
.opt-row .bar { grid-column: 1 / -1; height: 6px; }
.opt-row .bar i { background: linear-gradient(90deg, var(--ok) var(--y, 0%), var(--maybe) var(--y, 0%)); }
.vote { display: inline-flex; gap: 4px; }
@media (max-width: 560px) { .opt-row { grid-template-columns: 1fr; } .opt-row > .row { justify-content: flex-start !important; } }
.vote button { min-width: 44px; height: 38px; border-radius: 10px; border: 1px solid var(--line2); background: #0e0e10; cursor: pointer; font-size: .82rem; font-weight: 700; color: var(--muted); }
.vote button.on[data-v="yes"] { background: var(--ok); color: #032312; border-color: var(--ok); }
.vote button.on[data-v="maybe"] { background: var(--maybe); color: #2b1f00; border-color: var(--maybe); }
.vote button.on[data-v="no"] { background: #3a3b42; color: var(--ink); }

/* sign-up sheet */
.cat-h { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; font-weight: 700; }
.cat-h .e { font-size: 1.2rem; }
.slot { padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.slot + .slot { margin-top: 8px; }
.slot.full { opacity: .78; }
.slot.mine { border-color: color-mix(in srgb, var(--ev) 55%, var(--line)); }
.slot .top-l { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.slot .need { font-size: .82rem; font-weight: 700; white-space: nowrap; }
.slot .who { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.slot .bar { margin-top: 8px; }
.claimrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.flag { font-size: .8rem; color: var(--maybe); margin-top: 6px; }

/* day-of */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 78px 1fr auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.timeline li:last-child { border-bottom: 0; }
.timeline .tm { font-weight: 700; color: var(--ev); font-variant-numeric: tabular-nums; }
.timeline li.now { background: color-mix(in srgb, var(--ev) 10%, transparent); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.bring { display: grid; gap: 8px; }
.bring .p { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bring .p:last-child { border-bottom: 0; }

/* sheets, toasts */
.sheet-bg { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.66); display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet { width: min(560px, 100%); max-height: 92vh; overflow: auto; background: #0e0e10; border: 1px solid var(--line2); border-bottom: 0; border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(18px + var(--safe-b)); box-shadow: 0 -20px 60px rgba(0,0,0,.6); }
@media (min-width: 640px) { .sheet-bg { align-items: center; } .sheet { border-radius: 20px; border-bottom: 1px solid var(--line2); } }
.sheet h2 { margin-bottom: 12px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 16px); z-index: 120; max-width: calc(100vw - 24px);
  background: #151517; border: 1px solid var(--accent); color: var(--ink); padding: 10px 16px; border-radius: 999px; font-size: .92rem; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.photo-prev { max-height: 220px; border-radius: 12px; border: 1px solid var(--line); display: block; margin: 10px auto; }

/* ads */
.ad { margin: 16px auto; max-width: 980px; text-align: center; }
.ad-label { display: block; font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: #55555b; margin-bottom: 4px; }
.ad-ph { border: 1px dashed var(--line2); border-radius: 10px; padding: 26px 10px; color: var(--muted); font-size: .8rem; }

/* footer */
.foot { max-width: 980px; margin: 24px auto 0; padding: 18px 14px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; text-align: center; }
.foot p { margin: 4px 0; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--accent); }

/* print */
.print-area { display: none; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; color: #000 !important; padding: 0 !important; }
  body::before, [data-noprint], .top, .foot, .tabbar, .toast, .sheet-bg, .view, .ad, tyl-nav, .tylp-foot { display: none !important; }
  .print-area { display: block !important; font: 11pt/1.4 "Inter", Arial, sans-serif; color: #000; }
  .print-area h1 { font: 700 20pt/1.1 "Inter", Arial, sans-serif; text-transform: none; color: #000; }
  .print-area .pmeta { margin: 4pt 0 10pt; font-size: 11pt; }
  .print-area h2 { font-size: 13pt; margin: 14pt 0 6pt; border-bottom: 1.5pt solid #000; padding-bottom: 2pt; }
  .print-area table { width: 100%; border-collapse: collapse; page-break-inside: auto; }
  .print-area tr { page-break-inside: avoid; }
  .print-area th, .print-area td { border: .75pt solid #888; padding: 5pt 6pt; text-align: left; vertical-align: top; font-size: 10.5pt; }
  .print-area th { background: #eee; }
  .print-area .blank { height: 20pt; }
  .print-area .pfoot { margin-top: 12pt; font-size: 9pt; color: #444; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
