/* Clean, friendly look: light cool-grey page, white cards with soft corners, one teal accent. */
:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f0f3f6;
  --fg: #141a22;
  --muted: #637083;
  --line: #e2e7ee;
  --accent: #0b7a63;
  --accent-fg: #ffffff;
  --accent-soft: #e3f4ef;
  --accent-ink: #085c4a;
  --danger: #c4281c;
  --warn: #e08a0b;
  --shadow: 0 1px 2px rgba(20, 26, 34, 0.05), 0 4px 14px rgba(20, 26, 34, 0.05);
  --radius: 16px;
  --radius-sm: 10px;
  --f: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1319; --surface: #181e27; --surface-2: #212936; --fg: #eef1f6; --muted: #97a3b5;
    --line: #2a3342; --accent: #4fd8b4; --accent-fg: #06251d; --accent-soft: #15332d; --accent-ink: #7be8cb;
    --danger: #ff8f86; --warn: #f5b042; --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
    --bg: #0f1319; --surface: #181e27; --surface-2: #212936; --fg: #eef1f6; --muted: #97a3b5;
    --line: #2a3342; --accent: #4fd8b4; --accent-fg: #06251d; --accent-soft: #15332d; --accent-ink: #7be8cb;
    --danger: #ff8f86; --warn: #f5b042; --shadow: none;
}
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.55 var(--f);
  padding-block: 8px 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 720px; margin: 0 auto; }

header { padding: 22px 0 6px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; }
h1 { font-size: clamp(26px, 6vw, 34px); line-height: 1.1; font-weight: 800; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
h2 { font-size: 20px; line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; margin: 0; }
.stats { font-size: 13px; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }

.id-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px 10px 16px; margin: 14px 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.id-bar label { font-size: 13px; color: var(--muted); }
.id-bar strong { font-weight: 700; overflow-wrap: anywhere; }
.id-bar .spacer { flex: 1; }

input, textarea, select { font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); padding: 10px 12px; border-radius: var(--radius-sm); width: 100%; min-width: 0; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.8; }
textarea { resize: vertical; min-height: 72px; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

button { font: 600 14px var(--f); cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--fg); padding: 9px 16px; border-radius: 999px; }
button:hover { background: var(--surface-2); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
button.primary:hover { filter: brightness(1.07); background: var(--accent); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.quiet { border-color: transparent; background: transparent; color: var(--muted); padding: 7px 10px; font-weight: 500; }
button.quiet:hover { color: var(--fg); background: var(--surface-2); }
button.icon-btn { display: inline-flex; align-items: center; justify-content: center; border-color: transparent; background: transparent; color: var(--muted); padding: 8px; }
button.icon-btn:hover { color: var(--fg); background: var(--surface-2); }
button.icon-btn[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }

/* Tabs: segmented control */
.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 20px; background: var(--surface-2); border-radius: 14px; overflow-x: auto; }
.tabs button { flex: 1 0 auto; border: none; background: transparent; border-radius: 10px; padding: 9px 16px; white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--muted); }
.tabs button:hover { color: var(--fg); background: transparent; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }

.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }

/* Forms */
form.new { display: grid; gap: 14px; padding: 18px; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
form.new .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
form.new label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
form.new .actions { display: flex; gap: 8px; flex-wrap: wrap; }
form.new h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.auth-card { max-width: 420px; margin: 28px auto; }
.hint { margin: 0; font-size: 13px; color: var(--muted); }
.error { margin: 0; font-size: 14px; color: var(--danger); font-weight: 600; }
.tip { margin: 0 0 14px; }

/* Cards */
.list { display: grid; gap: 14px; }
.card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 16px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.past { opacity: 0.65; }
.date { text-align: center; align-self: start; padding: 8px 0; background: var(--accent-soft); color: var(--accent-ink); border-radius: 14px; font-variant-numeric: tabular-nums; }
.date .wd { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; }
.date .dd { font-size: 28px; line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; }
.date .mo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.card h3 { margin: 0; font-size: 18px; line-height: 1.25; font-weight: 700; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.meta { font-size: 13px; color: var(--muted); margin: 3px 0 6px; overflow-wrap: anywhere; }
.note { margin: 6px 0 8px; overflow-wrap: anywhere; white-space: pre-line; }
.fill { display: flex; align-items: center; gap: 10px; margin: 12px 0 6px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { flex: 1; height: 8px; background: var(--surface-2); border-radius: 999px; position: relative; overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 999px; }
.bar.full > i { background: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chips .lbl { font-size: 12px; font-weight: 600; color: var(--muted); align-self: center; min-width: 58px; }
.chip { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--fg); overflow-wrap: anywhere; }
.chip.me { background: var(--accent-soft); color: var(--accent-ink); }
.chip.dim { background: transparent; border: 1px dashed var(--line); color: var(--muted); padding: 2px 9px; }
.rsvp { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rsvp button[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.rsvp button.in[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.foot { grid-column: 2; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.empty { padding: 32px 16px; border: 1.5px dashed var(--line); border-radius: var(--radius); text-align: center; color: var(--muted); background: var(--surface); }
.empty strong { display: block; font-size: 17px; font-weight: 700; color: var(--fg); margin-bottom: 4px; }

/* Voting cards */
.place { grid-template-columns: 56px minmax(0, 1fr); }
.votebtn { width: 56px; padding: 8px 0; display: grid; gap: 0; text-align: center; align-self: start; border-radius: 14px; }
.votebtn b { font-size: 22px; line-height: 1.1; font-weight: 800; }
.votebtn span { font-size: 11px; font-weight: 600; }
.votebtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.votebtn[aria-pressed="true"]:hover { background: var(--accent); filter: brightness(1.07); }
.place .bar { margin: 10px 0; }
.place a { color: var(--accent); font-weight: 600; overflow-wrap: anywhere; }

details.past-wrap { margin-top: 24px; }
details.past-wrap summary { cursor: pointer; font-size: 15px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }

#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); background: var(--fg); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; max-width: calc(100% - 32px); z-index: 20; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }

@media (max-width: 420px) {
  .card { grid-template-columns: 54px minmax(0, 1fr); gap: 0 12px; padding: 14px; }
  .date .dd { font-size: 24px; }
  .foot { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: no-preference) {
  button { transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
  input, textarea { transition: border-color 0.15s, box-shadow 0.15s; }
}

/* Availability calendar */
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); margin-bottom: 8px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head strong { font-size: 16px; }
.cal-head button { min-width: 44px; min-height: 40px; font-size: 22px; line-height: 1; }
.cal-head button:disabled { opacity: 0.3; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow span { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding: 2px 0 4px; }
.cal-cell { aspect-ratio: 1 / 1.05; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; font-size: 14px; border: 1px solid transparent; }
.cal-cell.off { color: var(--muted); opacity: 0.35; }
.cal-cell.blank { visibility: hidden; }
.cal-cell.day { background: var(--surface-2); color: var(--fg); border-color: var(--line); cursor: pointer; font-weight: 600; padding: 0; }
.cal-cell.day b { font-size: 11px; min-height: 13px; color: var(--muted); }
.cal-cell.day.today { border-color: var(--accent); }
.cal-cell.day.mine { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.cal-cell.day.mine b { color: var(--accent-fg); }
.cal-cell.day:disabled { opacity: 0.35; cursor: default; }
.cal-sub { margin: 18px 0 8px; }

.preset { margin: 4px 0 12px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--surface-2); }
.preset summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.preset[open] summary { margin-bottom: 6px; }

.mapbtn { margin: 6px 0; }
.btn-link { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.photos { display: flex; gap: 8px; overflow-x: auto; margin: 8px 0; padding-bottom: 2px; }
.photos .ph { position: relative; flex: 0 0 auto; }
.photos img { display: block; height: 120px; width: auto; max-width: 220px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.photos .phx { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 50%; background: rgba(20,26,34,.75); color: #fff; border: 0; font-size: 18px; line-height: 1; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.thumbs img { height: 56px; width: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.editrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0; }
.editrow .quiet, .filebtn { cursor: pointer; }
label.filebtn { display: inline-flex; align-items: center; margin: 0; padding: 7px 10px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 14px; flex-direction: row; }
label.filebtn:hover { color: var(--fg); background: var(--surface-2); }

/* Attendance panel: separated from the event text */
.attend { grid-column: 1 / -1; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.att-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.att-head strong { font-size: 14px; letter-spacing: -0.01em; }
.att-count { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.attend .bar { margin: 0 0 12px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 14px; }
.seg button { min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; padding: 0 6px; box-shadow: none; }
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { color: #fff; box-shadow: 0 1px 3px rgba(20, 26, 34, 0.25); }
.seg button.in[aria-pressed="true"] { background: var(--accent); }
.seg button.maybe[aria-pressed="true"] { background: var(--warn); }
.seg button.out[aria-pressed="true"] { background: var(--muted); }
.who { margin-top: 12px; display: grid; gap: 6px; }
.who .grp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.who .lbl { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 64px; }
.who-empty { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

/* Chat */
.badge { display: inline-block; margin-left: 4px; color: var(--accent); font-size: 18px; line-height: 0; vertical-align: middle; }
.chat { display: flex; flex-direction: column; gap: 8px; max-height: min(55vh, 520px); min-height: 160px; overflow-y: auto; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.msg { align-self: flex-start; max-width: 85%; background: var(--surface-2); border-radius: 14px 14px 14px 4px; padding: 8px 12px; }
.msg.mine { align-self: flex-end; background: var(--accent-soft); border-radius: 14px 14px 4px 14px; }
.msg .mh { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.msg .mh strong { color: var(--fg); font-weight: 700; }
.msg .mh .quiet { margin-left: auto; padding: 0 6px; min-height: 0; font-size: 16px; line-height: 1.2; }
.msg p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chatform { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.chatform textarea { min-height: 44px; max-height: 120px; resize: none; }
.chatform button { min-height: 44px; }

/* Gear */
.gearwrap { position: relative; margin: 10px auto; max-width: 460px; padding: 14px 10px 10px; border-radius: 6px; border: 1px solid #2c342d; background: radial-gradient(ellipse at 50% 38%, #1d251f 0%, #0c100d 72%); box-shadow: inset 0 0 40px rgba(0,0,0,.6); }
.gearwrap::before, .gearwrap::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid #7f9467; pointer-events: none; }
.gearwrap::before { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.gearwrap::after { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }
#gear-fig { width: 100%; height: auto; display: block; }
#gear-fig .ground { fill: #000; opacity: .55; }
#gear-fig .body { pointer-events: none; }
#gear-fig .body path { fill: none; stroke: #2a312a; stroke-linecap: round; stroke-linejoin: round; }
#gear-fig .body .t { fill: url(#gB); stroke: none; }
#gear-fig .body .neck { fill: #343c34; stroke: none; }
#gear-fig .body ellipse { fill: #343c34; stroke: none; }
#gear-fig .slot { cursor: pointer; outline: none; pointer-events: all; fill: url(#gE); stroke: #a3ac9b; stroke-width: 1.3; stroke-dasharray: 4 3; stroke-linejoin: round; transition: fill .15s, stroke .15s; }
#gear-fig .slot:hover, #gear-fig .slot:focus-visible { stroke: #e3b341; stroke-width: 2.2; }
#gear-fig .slot.filled { fill: url(#gF); stroke: #cfe8a8; stroke-dasharray: none; stroke-width: 1.6; filter: drop-shadow(0 0 5px rgba(150,200,90,.55)); }
#gear-fig .slot.sel { stroke: #e3b341; stroke-width: 2.6; stroke-dasharray: none; }
#gear-fig .slot .dk { fill-opacity: .62; }
#gear-fig .dec { fill: none; stroke: rgba(0,0,0,.45); stroke-width: 1.1; stroke-dasharray: none; pointer-events: none; }
#gear-fig .weap path { stroke-dasharray: none; stroke-width: 1; vector-effect: non-scaling-stroke; }
#gear-fig .weap .frame { fill: rgba(0,0,0,.001); stroke: #6f7a68; stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
#gear-fig .weap:hover .frame, #gear-fig .weap:focus-visible .frame { stroke: #e3b341; }
#gear-fig .weap.sel .frame { stroke: #e3b341; stroke-dasharray: none; stroke-width: 2; }
#gear-fig .weap.filled .frame { stroke: #7f9467; stroke-dasharray: none; }
#gear-fig .weap.sel, #gear-fig .weap.filled { stroke-width: 1; }
#gear-fig .rifleimg { pointer-events: none; filter: grayscale(1) brightness(.7) drop-shadow(0 0 .7px #b4bdac) drop-shadow(0 0 .7px #b4bdac); transition: filter .15s; }
#gear-fig .weap.filled .rifleimg { filter: drop-shadow(0 0 .8px #d6efb0) drop-shadow(0 0 .8px #d6efb0) drop-shadow(0 0 4px rgba(150,200,90,.85)); }
#gear-fig .weap.sel .rifleimg { filter: grayscale(1) brightness(.8) drop-shadow(0 0 .8px #e3b341) drop-shadow(0 0 .8px #e3b341); }
#gear-fig .worn { display: none; pointer-events: none; }
#gear-fig .bs.filled .worn { display: inline; }
#gear-fig .bs { fill: rgba(255,255,255,.015); stroke: #eef3e6; stroke-width: 1.6; stroke-dasharray: 5 4; filter: drop-shadow(0 0 1.5px rgba(0,0,0,.9)); }
#gear-fig .bs > path, #gear-fig .bs > ellipse { vector-effect: non-scaling-stroke; }
#gear-fig .bs:hover, #gear-fig .bs:focus-visible { fill: rgba(227,179,65,.18); stroke: #e3b341; stroke-width: 2.2; }
#gear-fig .bs.filled { fill: rgba(150,205,90,.26); stroke: #c9ec9a; stroke-dasharray: none; stroke-width: 2; filter: drop-shadow(0 0 5px rgba(150,200,90,.85)); }
#gear-fig .bs.sel { fill: rgba(227,179,65,.2); stroke: #e3b341; stroke-width: 2.6; stroke-dasharray: none; }
#gear-fig .brand { font: 700 4.6px ui-sans-serif, Arial, sans-serif; letter-spacing: .08em; fill: rgba(0,0,0,.55); stroke: none; pointer-events: none; }
#gear-fig .plus { pointer-events: none; }
#gear-fig .plus circle { fill: #e3b341; stroke: none; stroke-dasharray: none; }
#gear-fig .plus path { stroke: #151a14; stroke-width: 2; stroke-linecap: round; stroke-dasharray: none; fill: none; }
#gear-fig .slot.filled .plus { display: none; }
#gear-fig .lbls text { font: 700 9px ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; fill: #8d9885; text-anchor: middle; pointer-events: none; }
#gear-fig .ld { stroke: #6f7a68; stroke-width: 1; fill: none; }
#gear-fig .lbls .inb { fill: rgba(10,14,10,.72); }
#gearform { margin-top: 10px; display: block; }
#gearform[hidden] { display: none; }
#gearform .row { display: flex; gap: 8px; margin-top: 10px; }
.gearrow { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 10px 14px; }
.gearrow .lbl { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 120px; }

#gearform { margin-top: 10px; display: block; }
#gearform[hidden] { display: none; }
#gearform .row { display: flex; gap: 8px; margin-top: 10px; }
.gearrow { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 10px 14px; }
.gearrow .lbl { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 120px; }

/* Next game day + gear overview */
.nextup { margin: 0 0 14px; padding: 12px 16px; background: var(--accent-soft); color: var(--accent-ink); border-radius: var(--radius-sm, 10px); font-size: 14px; line-height: 1.4; }
.nextup strong { font-weight: 700; }
.gearcount { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.gearcount .bar { flex: 1; height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; position: relative; }
.gearcount .bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 999px; }
.gearwho { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: baseline; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.gearwho .lbl { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 120px; }
.gearwho .none { font-size: 13px; color: var(--muted); }

/* Eye protection + share */
.eyes { margin: 10px 0 0; font-size: 13px; font-weight: 600; }
.eyes.ok { color: var(--accent-ink); }
.eyes.warn { color: var(--warn); }
.eyes span { font-weight: 500; color: var(--muted); }

/* guide toggle: dotted outlines hidden unless guide is on */
.guidebtn { display: inline-block; margin: 0 0 4px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line, #cfd6cc); background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.gearwrap:not(.guide) #gear-fig .bs:not(.filled):not(.sel) { stroke: transparent; fill: transparent; filter: none; }
.gearwrap:not(.guide) #gear-fig .slot:not(.filled):not(.sel) .plus { display: none; }
.gearwrap:not(.guide) #gear-fig .weap:not(.filled):not(.sel) .frame { stroke: transparent; }
.gearwrap:not(.guide) #gear-fig .lbls { display: none; }

/* equipped = no outline, soft tint only; bigger gear text boxes */
#gear-fig .bs.filled { stroke: transparent; stroke-width: 0; filter: none; fill: rgba(150,205,90,.2); }
#gear-fig .weap.filled .frame { stroke: transparent; }
#gearform textarea { width: 100%; box-sizing: border-box; font-size: 17px; line-height: 1.35; padding: 12px; min-height: 64px; resize: vertical; border-radius: 10px; }
#gearform #gear-note { min-height: 88px; }

#gearform textarea { min-height: 46px; height: 46px; resize: none; overflow: hidden; white-space: pre-wrap; }
#gearform #gear-note { min-height: 46px; height: 46px; }

.pack { margin: 8px 0 0; }
.pack ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.pack li label { display: flex; gap: 10px; align-items: center; padding: 8px 4px; font-size: 15px; }
.pack input[type=checkbox] { width: 22px; height: 22px; }

#gearform.card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
#gearform.card[hidden] { display: none; }
#gearform textarea, #gearform input { width: 100%; min-width: 0; box-sizing: border-box; }

.wx { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--accent-ink); }

.tabchip { border: 1px solid var(--line); cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; }
.tabchip.on { background: var(--accent); color: var(--accent-fg, #fff); border-color: var(--accent); }

.photopick { border: 1px dashed var(--line); justify-content: center; padding: 14px; }
#gal-preview { max-width: 100%; max-height: 240px; border-radius: 12px; object-fit: contain; margin: 4px 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 8px; }
.gallery figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.gallery img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: contain; background: var(--surface-2); }
.gallery figcaption { padding: 8px 10px; display: grid; gap: 2px; font-size: 13px; }
.gallery figcaption small { color: var(--muted); }

a.quiet.gcal { display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; color: var(--muted); text-decoration: none; font-size: 14px; }
.seg button.in { color: #1f8a4c; }
.seg button.maybe { color: #a67c00; }
.seg button.out { color: #c93c37; }
.seg button.in[aria-pressed="true"] { background: #1f9d55; color: #fff; }
.seg button.maybe[aria-pressed="true"] { background: #f5c518; color: #2b2300; }
.seg button.out[aria-pressed="true"] { background: #d9433d; color: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .seg button.in { color: #5fd28e; }
  :root:not([data-theme="light"]) .seg button.maybe { color: #f5c518; }
  :root:not([data-theme="light"]) .seg button.out { color: #ff8f86; }
}
:root[data-theme="dark"] .seg button.in { color: #5fd28e; }
:root[data-theme="dark"] .seg button.maybe { color: #f5c518; }
:root[data-theme="dark"] .seg button.out { color: #ff8f86; }
:root[data-theme="dark"] .seg button[aria-pressed="true"].in, :root[data-theme="dark"] .seg button[aria-pressed="true"].out { color: #fff; }
:root[data-theme="dark"] .seg button[aria-pressed="true"].maybe { color: #2b2300; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .seg button[aria-pressed="true"].in, :root:not([data-theme="light"]) .seg button[aria-pressed="true"].out { color: #fff; }
  :root:not([data-theme="light"]) .seg button[aria-pressed="true"].maybe { color: #2b2300; }
}
@media (max-width: 520px) {
  .tabs { gap: 2px; padding: 3px; }
  .tabs button { flex: 1 1 auto; padding: 9px 5px; font-size: 12.5px; }
}
#lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.92); display: flex; align-items: center; justify-content: center; padding: env(safe-area-inset-top, 0px) 8px env(safe-area-inset-bottom, 0px); }
#lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
#lightbox .lb-close { position: absolute; top: max(12px, env(safe-area-inset-top, 0px)); right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); color: transparent; font-size: 0; padding: 0; cursor: pointer; }
#lightbox .lb-close::before, #lightbox .lb-close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 3px; margin: -1.5px 0 0 -11px; background: #111; border-radius: 2px; }
#lightbox .lb-close::before { transform: rotate(45deg); }
#lightbox .lb-close::after { transform: rotate(-45deg); }

/* ---- Burger menu + Home ---- */
.burger { position: relative; width: 44px; height: 44px; margin-left: -6px; flex: none; }
.burger .dot { position: absolute; top: 8px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger, #e5484d); border: 2px solid var(--surface); }
#drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.55); }
#drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 70; width: min(82vw, 320px); background: var(--surface); border-right: 1px solid var(--line); box-shadow: 8px 0 30px rgba(0, 0, 0, 0.3); padding: max(14px, env(safe-area-inset-top, 0px)) 14px 20px; transform: translateX(-105%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; overflow-y: auto; }
#drawer.open { transform: none; visibility: visible; transition: transform .22s ease; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.drawer-head strong { font-size: 18px; }
#drawer .tabs { flex-direction: column; gap: 4px; padding: 0; margin: 0; background: transparent; overflow: visible; }
#drawer .tabs button { flex: none; text-align: left; padding: 14px 14px; font-size: 16px; border-radius: 12px; display: flex; align-items: center; justify-content: space-between; }
#drawer .tabs button[aria-selected="true"] { background: var(--accent-soft, var(--surface-2)); color: var(--accent-ink, var(--fg)); box-shadow: none; }
.hero { padding: 18px 18px 20px; margin-bottom: 16px; border-radius: 16px; background: linear-gradient(135deg, var(--accent-soft, var(--surface-2)), var(--surface)); border: 1px solid var(--line); }
.hero-hi { margin: 0 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.hero h2 { margin: 0; font-size: 22px; line-height: 1.25; }
.home-block { margin-bottom: 22px; }
.home-block .section-head h3 { margin: 0; font-size: 17px; }
.news { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.news h4 { margin: 0 0 4px; font-size: 16px; }
.news p { margin: 0 0 6px; overflow-wrap: anywhere; }
.news small { display: block; color: var(--muted); font-size: 12px; }
.news button { margin-top: 6px; }
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.strip figure { margin: 0; border-radius: 10px; overflow: hidden; background: var(--surface-2); aspect-ratio: 1; }
.strip img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hc { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 8px 12px; margin-bottom: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.hc strong { font-size: 13px; }
.hc span { overflow-wrap: anywhere; }
.hc small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
@media (min-width: 521px) { .strip { grid-template-columns: repeat(6, 1fr); } }
.strip .empty { grid-column: 1 / -1; }
.news .quiet { padding-left: 0; }

/* Payments */
#pay-list { display: grid; gap: 14px; }
.pay { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 12px; }
.pay.past { opacity: .7; }
.pay-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pay-top > div { min-width: 0; }
.fee { flex: none; font-weight: 800; font-size: 15px; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.fee.none { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 12px; }
.paybtn { width: 100%; padding: 14px; border-radius: 14px; border: 2px solid var(--accent); background: transparent; color: var(--accent-ink); font-weight: 800; font-size: 16px; cursor: pointer; }
.paybtn.on { background: var(--accent); color: var(--accent-fg); }
.paysum { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; }
.paysum .bar { flex: 1; }
.pchip.ok { background: var(--accent-soft); color: var(--accent-ink); }
.pchip.no { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.feeedit { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.feeedit label { flex-basis: 100%; }
.feeedit input { flex: 1; min-width: 90px; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.feebtn { width: auto; padding: 10px 16px; }

/* ===== Modern look (layer on top of style.css) ===== */
:root {
  --bg: #f3f5f7; --surface: #ffffff; --surface-2: #eef1f4; --fg: #0f1720; --muted: #64707f; --line: rgba(15, 23, 32, 0.08);
  --accent: #0e8f73; --accent-2: #19b58f; --accent-fg: #ffffff; --accent-soft: #e0f5ee; --accent-ink: #076b55;
  --shadow: 0 1px 2px rgba(15, 23, 32, 0.04), 0 10px 30px -8px rgba(15, 23, 32, 0.12);
  --radius: 22px; --radius-sm: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0a0e13; --surface: #131a22; --surface-2: #1b242e; --fg: #eef2f7; --muted: #8f9cae; --line: rgba(255, 255, 255, 0.07); --accent: #27c9a1; --accent-2: #5fe3c0; --accent-fg: #04201a; --accent-soft: #123a30; --accent-ink: #7cebcf; --shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 12px 30px -10px rgba(0, 0, 0, 0.6); }
}
:root[data-theme="dark"] { --bg: #0a0e13; --surface: #131a22; --surface-2: #1b242e; --fg: #eef2f7; --muted: #8f9cae; --line: rgba(255, 255, 255, 0.07); --accent: #27c9a1; --accent-2: #5fe3c0; --accent-fg: #04201a; --accent-soft: #123a30; --accent-ink: #7cebcf; --shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 12px 30px -10px rgba(0, 0, 0, 0.6); }
body { background: radial-gradient(900px 420px at 85% -80px, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%), var(--bg); background-attachment: fixed; letter-spacing: -0.005em; }

/* top bar: one glassy sticky bar instead of a heading + a boxed row */
header { padding: 18px 0 2px; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.035em; }
.stats { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface); padding: 5px 11px; border-radius: 999px; box-shadow: var(--shadow); }
.id-bar { position: sticky; top: 8px; z-index: 40; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-radius: 20px; box-shadow: var(--shadow); padding: 8px 10px 8px 12px; margin: 12px 0 18px; }
.id-bar strong { letter-spacing: -0.02em; }
button.icon-btn { border-radius: 14px; }
.burger { background: var(--surface-2) !important; color: var(--fg) !important; }

/* cards */
.card, .new, .news, .hc, .empty { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card { padding: 18px; }
.card h3 { font-size: 19px; letter-spacing: -0.025em; }
.empty { background: color-mix(in srgb, var(--surface) 60%, transparent); border-style: dashed; }
.new { padding: 18px; background: var(--surface); }
.section-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.home-block .section-head h3 { font-size: 18px; font-weight: 800; letter-spacing: -0.025em; }

/* buttons + fields */
button { padding: 10px 18px; transition: transform .08s ease, filter .15s ease, background .15s ease; }
button:active { transform: scale(0.97); }
button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 0; box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
input, textarea, select { background: var(--surface-2); border: 1px solid transparent; border-radius: var(--radius-sm); padding: 12px 14px; }
input:focus, textarea:focus, select:focus { background: var(--surface); border-color: var(--accent); }

/* hero on Home */
.hero { position: relative; overflow: hidden; padding: 22px 20px 24px; border: 0; border-radius: 26px; color: #fff; background: linear-gradient(135deg, #0b6e5a 0%, #12a07f 55%, #35c9a0 100%); box-shadow: 0 18px 36px -16px rgba(14, 143, 115, 0.65); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.hero::before { width: 190px; height: 190px; right: -60px; top: -70px; }
.hero::after { width: 120px; height: 120px; right: 40px; bottom: -70px; background: rgba(255, 255, 255, 0.08); }
.hero-hi { color: rgba(255, 255, 255, 0.82); font-weight: 600; letter-spacing: 0; position: relative; }
.hero h2 { font-size: 25px; line-height: 1.2; font-weight: 800; letter-spacing: -0.035em; position: relative; text-wrap: balance; }
.news { border-left: 0; position: relative; padding-left: 20px; }
.news::before { content: ""; position: absolute; left: 8px; top: 14px; bottom: 14px; width: 4px; border-radius: 4px; background: linear-gradient(var(--accent), var(--accent-2)); }
.strip figure, .gallery figure { border-radius: 16px; box-shadow: var(--shadow); border: 0; }

/* RSVP buttons: tinted until chosen */
.seg { background: transparent; padding: 0; gap: 8px; }
.seg { gap: 6px; }
.seg button { min-height: 48px; border-radius: 16px; font-size: 13.5px; padding: 0 4px; border: 1px solid transparent; }
.seg button.in { background: color-mix(in srgb, #1f9d55 14%, var(--surface)); }
.seg button.maybe { background: color-mix(in srgb, #f5c518 20%, var(--surface)); }
.seg button.out { background: color-mix(in srgb, #d9433d 13%, var(--surface)); }
.seg button[aria-pressed="true"] { box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.45); }

/* menu */
#drawer { border-radius: 0 28px 28px 0; border-right: 0; background: var(--surface); padding-top: max(18px, env(safe-area-inset-top, 0px)); }
#drawer .tabs button { border-radius: 16px; padding: 15px 16px; font-weight: 700; letter-spacing: -0.01em; border: 0; background: transparent; }
#drawer .tabs button[aria-selected="true"] { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-fg); }
.drawer-head strong { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
#drawer-backdrop { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

/* chips, toast, lightbox */
.chip { border-radius: 999px; }
#toast { border-radius: 16px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5); }
.id-bar { flex-wrap: nowrap; gap: 8px; }
.id-bar label { display: none; }
.id-bar strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.id-bar .chip, .id-bar .icon-btn { flex: none; }

#drawer .tabs button { display: flex; align-items: center; gap: 14px; }
#drawer .tabs .ti { flex: none; padding: 7px; box-sizing: content-box; width: 22px; height: 22px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }
#drawer .tabs button[aria-selected="true"] .ti { background: rgba(255,255,255,.22); color: var(--accent-fg); }
#drawer .tabs .badge { margin-left: auto; }
#drawer .tabs button { justify-content: flex-start; text-align: left; }
.pay { border-radius: 22px; }
.paybtn { border-radius: 16px; border-color: transparent; background: var(--accent-soft); color: var(--accent-ink); box-shadow: none; }
.paybtn.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-fg); box-shadow: 0 10px 20px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.fee { background: var(--pop-soft, var(--accent-soft)); color: var(--pop, var(--accent-ink)); }
.fee.none { background: var(--surface-2); color: var(--muted); }

/* ===== Vivid palette pass ===== */
:root {
  --bg: #eef6f3; --surface: #ffffff; --surface-2: #e6f1ed; --fg: #0c1f24; --muted: #5a7076; --line: rgba(12, 60, 60, 0.10);
  --accent: #00a67e; --accent-2: #12b5d6; --accent-fg: #ffffff; --accent-soft: #d4f4ea; --accent-ink: #00694f;
  --pop: #ff7a3d; --pop-soft: #ffe6d9;
  --shadow: 0 1px 2px rgba(0, 70, 60, 0.05), 0 14px 32px -10px rgba(0, 110, 100, 0.22);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #06151a; --surface: #0e2229; --surface-2: #15303a; --fg: #eaf8f6; --muted: #86a8ad; --line: rgba(120, 255, 230, 0.10); --accent: #1fe0b0; --accent-2: #38c8f0; --accent-fg: #02231c; --accent-soft: #0f4036; --accent-ink: #7ff2d6; --pop: #ff9158; --pop-soft: #4a2a1a; --shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 14px 34px -10px rgba(0, 0, 0, 0.65); }
}
:root[data-theme="dark"] { --bg: #06151a; --surface: #0e2229; --surface-2: #15303a; --fg: #eaf8f6; --muted: #86a8ad; --line: rgba(120, 255, 230, 0.10); --accent: #1fe0b0; --accent-2: #38c8f0; --accent-fg: #02231c; --accent-soft: #0f4036; --accent-ink: #7ff2d6; --pop: #ff9158; --pop-soft: #4a2a1a; --shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 14px 34px -10px rgba(0, 0, 0, 0.65); }
body { background:
  radial-gradient(520px 340px at 100% -60px, color-mix(in srgb, var(--accent-2) 30%, transparent), transparent 70%),
  radial-gradient(480px 360px at -10% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
  radial-gradient(420px 320px at 100% 85%, color-mix(in srgb, var(--pop) 14%, transparent), transparent 70%), var(--bg); background-attachment: fixed; }
.hero { background: linear-gradient(135deg, #00775e 0%, #00a67e 40%, #12b5d6 80%, #5b8cff 100%); box-shadow: 0 20px 40px -14px rgba(0, 150, 170, 0.55); }
button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.hero .btn, .hero button { background: #fff; color: #00694f; }
.news::before { background: linear-gradient(var(--pop), var(--accent)); }
h1 { background: linear-gradient(90deg, var(--fg) 40%, var(--accent-ink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats { background: var(--accent-soft); color: var(--accent-ink); box-shadow: none; }
#drawer .tabs button[aria-selected="true"] { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.id-bar .chip.me { background: var(--pop-soft); color: var(--pop); }
.dot { background: var(--pop) !important; }

/* Gear tab: tidy header, compact list of what you own */
.gearhead { display: flex; align-items: center; gap: 10px; }
.gearhead select { flex: 1; min-width: 0; }
.gearhead .guidebtn { margin: 0; flex: none; }
#gear-tip { text-align: center; margin: 4px 0 12px; }
.gearlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 4px; }
.gearpill { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; cursor: pointer; min-width: 0; }
.gearpill .lbl { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); }
.gearpill strong { font-size: 14px; overflow-wrap: anywhere; }
.gearpill .meta { font-size: 12px; overflow-wrap: anywhere; }

/* Gear: scrollable slot picker (easier than tapping small parts of the figure) */
.slotstrip { display: flex; gap: 8px; overflow-x: auto; margin: 4px -2px 12px; padding: 4px 2px 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.slotstrip::-webkit-scrollbar { display: none; }
.slotchip { flex: none; scroll-snap-align: start; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.slotchip.filled { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.slotchip.sel { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-fg); border-color: transparent; box-shadow: 0 8px 16px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.slotchip.addchip { border: 1.5px dashed var(--accent); background: transparent; color: var(--accent-ink); }
.slotchip.addchip.sel { border-style: solid; }

/* Gear on the figure: the model's own outline glows (like the guns), only on the outside edge */
#gear-fig .bs.filled { fill: rgba(0,0,0,.001); stroke: none; filter: none; }
#gear-fig .bs.filled:hover { fill: rgba(150,205,90,.10); }
#gear-fig .bs.filled.sel { stroke: #e3b341; stroke-width: 1.6; stroke-dasharray: 4 3; }

/* Highlights */
.hl-grid { display: grid; gap: 12px; }
.hl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 10px; min-width: 0; }
.hl h4, .hl h3 { margin: 0; font-size: 16px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.hl-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hl-top h3 { min-width: 0; }
.lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lb li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); min-width: 0; }
.lb li .who { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.lb li strong { flex: none; font-variant-numeric: tabular-nums; }
.lb li.mine { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.lb li.r1 { background: linear-gradient(90deg, rgba(255,214,90,.28), var(--surface-2) 75%); }
.lb li.r2 { background: linear-gradient(90deg, rgba(190,200,215,.32), var(--surface-2) 75%); }
.lb li.r3 { background: linear-gradient(90deg, rgba(225,150,95,.28), var(--surface-2) 75%); }
.lb .medal { flex: none; display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.lb .rk { flex: none; width: 28px; text-align: center; font-weight: 800; color: var(--muted); }
.empty-board { margin: 0; }
.scoreedit { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.se { display: flex; align-items: center; gap: 8px; }
.se .who { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.se .stp { flex: none; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); font-size: 20px; font-weight: 700; cursor: pointer; line-height: 1; }
.se .scin { flex: none; width: 76px; text-align: center; padding: 8px; }
.quiet.danger { color: #c2412d; justify-self: start; }
#board-list { display: grid; gap: 14px; }
.hl.mini { padding: 10px 12px; gap: 6px; border-radius: 18px; }
.hl.mini h4 { font-size: 13px; color: var(--muted); font-weight: 700; }
.hl-grid.compact { gap: 8px; }
.podium { display: flex; flex-wrap: wrap; gap: 6px; }
.pod { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 6px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.pod.mine { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.pod .medal { flex: none; }
.lb .trophy { filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }

/* spacing between stacked settings cards */
#lookcard, #notifcard { margin-bottom: 18px; }

/* logo */
.brand-logo { height: 52px; width: auto; margin-right: 12px; vertical-align: middle; border-radius: 6px; }
h1 { display: block; text-align: center; }
header { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; }
.auth-logo { display: block; width: 170px; height: auto; margin: 4px auto 14px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); }

/* no empty pill under the title on the login screen */
.stats:empty { display: none; }
.auth-logo { margin-top: 0; }

/* login screen colours + room under the title */
.auth-logo { margin-top: 26px; }
#authform h2 { color: var(--accent-ink); }
#authform label { color: var(--fg); opacity: .92; }
#authform .actions .quiet, #authform button.quiet { color: var(--pop, var(--accent-ink)); }

/* login screen: sleek angular tech title */
:root:root:root h1 { font-family: "Orbitron", "Rajdhani", "Eurostile", "Arial Narrow", sans-serif; font-weight: 800; font-size: clamp(19px, 5.6vw, 25px); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }

/* login title takes the colours of the chosen style */
body:has(#auth:not([hidden])) h1 { background: linear-gradient(90deg, var(--accent-ink), var(--pop, var(--accent))); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* faint helmet watermark behind the app */
body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .07; background: url(/logo.png) center 52% / min(92vw, 560px) no-repeat; }
.wrap { position: relative; z-index: 1; }
body:has(#auth:not([hidden]))::before { display: none; }


/* tidier burger menu: grouped and compact */
.tabgroup { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 12px 8px 4px; }
.tabgroup:first-child { padding-top: 2px; }
:root:root #drawer .tabs { gap: 2px; }
:root:root #drawer .tabs button { padding: 8px 10px; font-size: 15px; gap: 12px; border-radius: 12px; }
:root:root #drawer .tabs .ti { padding: 5px; width: 20px; height: 20px; border-radius: 10px; }
.drawer-head { margin-bottom: 4px; }


/* startup intro */
#splash { display: none; position: fixed; inset: 0; z-index: 99999; flex-direction: column; align-items: center; justify-content: center; isolation: isolate; overflow: hidden; }
.sp-bg { position: absolute; inset: 0; z-index: -2; background: radial-gradient(ellipse at center, #1c0508 0%, #070707 48%, #000 90%); transition: opacity .9s ease; }
html.intro #splash { display: flex; }
html.intro:not(.intro-fly) body { overflow: hidden; }
.sp-logo-wrap { position: relative; width: min(72vw, 300px); aspect-ratio: 1; }
.sp-head, .sp-eyes { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sp-head { opacity: 0; transform: scale(.94); animation: sp-head 1.4s 1.9s cubic-bezier(.2,.8,.2,1) forwards, sp-glow 2s 2.6s ease-in-out both; }
.sp-eyes { opacity: 0; animation: sp-eyes 1.2s .5s ease-out forwards, sp-pulse 2.4s 1.7s ease-in-out infinite; }
.sp-line { width: 0; height: 2px; margin-top: 18px; background: #e60023; box-shadow: 0 0 20px #f03; animation: sp-line 1s 2.9s ease-out forwards; }
.sp-status { margin-top: 22px; letter-spacing: .36em; font-size: 10px; color: #aaa; opacity: 0; animation: sp-fade .8s 3.2s forwards; }
#splash.exit { animation: sp-exit .5s ease-in forwards; }
@keyframes sp-head { to { opacity: 1; transform: scale(1); } }
@keyframes sp-eyes { 0% { opacity: 0; filter: drop-shadow(0 0 0 #ff0a2a); } 35% { opacity: 1; filter: drop-shadow(0 0 6px #ff0a2a); } 100% { opacity: 1; filter: drop-shadow(0 0 16px #ff0a2a) drop-shadow(0 0 34px #e00028aa); } }
@keyframes sp-pulse { 0%, 100% { filter: drop-shadow(0 0 14px #ff0a2a) drop-shadow(0 0 30px #e00028aa); } 50% { filter: drop-shadow(0 0 22px #ff0a2a) drop-shadow(0 0 48px #e00028); } }
@keyframes sp-glow { 0% { filter: drop-shadow(0 0 14px #ff0a2a) drop-shadow(0 0 28px #e00028aa); } 50% { filter: drop-shadow(0 0 22px #e0002870); } 100% { filter: drop-shadow(0 0 9px #e0002840); } }
@keyframes sp-line { to { width: 110px; } }
@keyframes sp-fade { to { opacity: 1; } }
@keyframes sp-spin { to { transform: rotate(360deg); } }
@keyframes sp-exit { to { opacity: 0; transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { #splash * { animation-duration: .01ms !important; animation-delay: 0ms !important; } .sp-head, .sp-eyes, .sp-status { opacity: 1; } .sp-head { transform: none; } }
/* intro hand-off: the helmet flies down onto the login helmet */
.sp-logo-wrap { transition: transform .95s cubic-bezier(.45, 0, .2, 1); will-change: transform; }
#splash.flying .sp-head { animation: none; opacity: 1; transform: none; filter: none; }
#splash.flying .sp-eyes { animation: none; opacity: 1; filter: none; transition: filter .6s; }
#splash.flying .sp-bg { opacity: 0; }
#splash.flying .sp-line, #splash.flying .sp-status { animation: none; opacity: 0; transition: opacity .35s; }
html.intro-fly .auth-logo { opacity: 0; }

/* chat box: tall enough for two lines of text */
.chatform textarea { min-height: 72px; max-height: 160px; line-height: 1.35; padding-top: 12px; padding-bottom: 12px; }
.chatform button { min-height: 72px; }

/* chat topic buttons: clearly show the selected one */
:root:root:root .chips .tabchip { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); box-shadow: none; transition: background .15s, color .15s; }
:root:root:root .chips .tabchip.on { background: linear-gradient(135deg, var(--accent), var(--accent-2, var(--accent))); color: var(--accent-fg, #fff); border-color: transparent; box-shadow: 0 6px 14px -6px var(--accent); }

/* Android app (Capacitor): keep content clear of the status bar and the navigation bar */
html.native body { padding-top: max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 34px)); padding-bottom: max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px)); }

.ticketbtn { display: block; text-align: center; text-decoration: none; padding: 14px; border-radius: 14px; background: var(--accent); color: var(--accent-fg); font-weight: 800; font-size: 16px; }
.feeedit input[type=url] { flex-basis: 100%; }

.notifprefs { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.prefrow { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.prefrow input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.prefrow span { display: grid; gap: 2px; font-weight: 700; }
.prefrow small { font-weight: 400; color: var(--muted, inherit); opacity: .75; }

html.intro:not(.intro-fly), html.intro:not(.intro-fly) body { overflow: hidden !important; overscroll-behavior: none; touch-action: none; }
html.intro:not(.intro-fly) body { position: fixed; inset: 0; width: 100%; }
/* once the logo starts flying to the login screen, taps must reach the real login form underneath */
#splash.flying, #splash.exit { pointer-events: none; }
.splash { touch-action: none; }

/* No rubber-band or glow past the ends, and the area behind the page uses the page colour (no black bar). */
html { background: var(--bg); overscroll-behavior: none; }
body { overscroll-behavior: none; }
/* Side menu open: the page behind it cannot scroll. */
html.menu-open, html.menu-open body { overflow: hidden !important; overscroll-behavior: none; }
#drawer { overscroll-behavior: contain; }
#drawer-backdrop { touch-action: none; }

/* Logged in: slim one-line header */
html.authed header { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; text-align: left; gap: 10px; padding: 8px 0 2px; }
html.authed h1 { text-align: left !important; font-size: 15px !important; letter-spacing: .1em !important; min-width: 0; white-space: nowrap; flex: 0 0 auto; }
html.authed .stats { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; padding: 4px 9px; }

/* Event card chips and forecast */
.echips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.ec { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--fg); }
.ec.cd.soon { background: var(--accent); color: var(--accent-fg); }
.ec.yes { background: color-mix(in srgb, #2f9e5f 28%, transparent); color: var(--fg); }
.ec.maybe { background: color-mix(in srgb, #d9a514 26%, transparent); color: var(--fg); }
.ec.no { background: color-mix(in srgb, #d6453d 24%, transparent); color: var(--fg); }
.ec.ask { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.wxbox { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 10px 0 0; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wxbox strong { color: var(--accent-ink); }

/* Waking-up screen */
#wake { position: fixed; inset: 0; z-index: 9000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; background: var(--bg); color: var(--fg); }
#wake[hidden] { display: none; }
#wake p { margin: 0; max-width: 28ch; color: var(--muted); font-size: 14px; }
#wake strong { font-size: 18px; letter-spacing: .02em; }
.wake-ring { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: wake-spin 1s linear infinite; }
@keyframes wake-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wake-ring { animation-duration: 3s; } }

/* Rank badges and the My Rank page */
.rkb { display: inline-block; vertical-align: -0.2em; margin-right: 6px; flex: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
#me-badge { display: inline-flex; align-items: center; }
#me-badge .rkb { margin-right: 8px; }
#panel-rank .new { margin-bottom: 14px; }
.rk-hero { display: flex; align-items: center; gap: 18px; }
.rk-big .rkb { margin: 0; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
.rk-id { flex: 1; min-width: 0; display: grid; gap: 6px; }
.rk-name { font-size: 22px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.rk-name small { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 800; color: #7a1612; background: #ffd75e; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.rk-pts { font-size: 14px; font-weight: 700; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.rk-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 6px; }
.rk-split > div { display: grid; gap: 2px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.rk-split strong { font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.rk-split span { font-size: 13px; color: var(--muted); }
.rk-split em { font-style: normal; font-weight: 800; font-size: 13px; color: var(--accent-ink); }
.rk-grp { display: grid; gap: 4px; margin-top: 12px; }
.rk-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-weight: 600; font-size: 14px; }
.rk-row span { display: grid; min-width: 0; }
.rk-row small { font-weight: 400; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.rk-row b { font-variant-numeric: tabular-nums; color: var(--accent-ink); }
.rk-row.miss { background: transparent; border: 1px dashed var(--line); opacity: .8; }
.rk-row.miss b { color: var(--muted); }
#rk-gear { margin-top: 14px; }
.rk-ladder { display: grid; gap: 4px; margin: 10px 0; }
.rk-step { display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-radius: 10px; opacity: .55; font-weight: 600; }
.rk-step .rkb { margin: 0; }
.rk-step span { flex: 1; min-width: 0; }
.rk-step b { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.rk-step.done { opacity: .85; }
.rk-step.now { opacity: 1; background: var(--accent-soft, var(--surface-2)); outline: 2px solid var(--accent); }
.chip .rkb { vertical-align: -3px; margin-right: 5px; }
.mh strong .rkb { vertical-align: -3px; }

.rk-step span { display: grid; }
.rk-step small { font-weight: 400; font-size: 12px; color: var(--muted); }
.rk-desc { margin: 0; }

.rk-step small:empty, .rk-desc:empty { display: none; }

/* compact gear score */
.rk-grp { margin-top: 8px; gap: 4px; }
.rk-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.rk-cols .rk-row { padding: 5px 9px; font-size: 13px; gap: 6px; border-radius: 8px; }
.rk-cols .rk-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.rk-cols .rk-row b { font-size: 12px; }
#rk-gear { margin-top: 10px; }

/* password reset */
#force-pw { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; background: var(--bg); overflow-y: auto; }
#force-pw[hidden] { display: none; }
#force-pw .auth-card { width: 100%; max-width: 420px; }
.rs-out { margin-top: 14px; display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.rs-out code { font-size: 28px; font-weight: 800; letter-spacing: .12em; user-select: all; font-variant-numeric: tabular-nums; }
.rs-out small { color: var(--muted); }

/* the page background glow is anchored to the body box: keep the body at least screen height so it never pops in/out */
body { min-height: 100vh; min-height: 100dvh; }

/* settings cards that are not <form>s get the same spacing as the form cards */
#panel-settings > div.new { display: grid; gap: 14px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
#panel-settings > div.new h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
#panel-settings > div.new .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
#panel-settings > div.new label:not(.prefrow) { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
#panel-settings > div.new .actions { display: flex; gap: 8px; flex-wrap: wrap; }
#panel-settings > div.new p { margin: 0; }

/* photo albums */
.albumbar { display: grid; gap: 4px; margin: 6px 0 12px; }
.albumbar .chips { margin: 0; }
.albumbar .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery select.mv { width: 100%; margin-top: 4px; padding: 6px 8px; font-size: 13px; border-radius: 8px; }
#albumform[hidden] { display: none; }

/* multi photo upload */
.qthumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.qthumbs[hidden] { display: none; }
.qt { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.qt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qt button { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.gallery .empty { grid-column: 1 / -1; }

.upchoice { margin: 0; }
#up-newwrap[hidden] { display: none; }
.lblwrap { display: grid; gap: 6px; }
.lbl2 { font-size: 13px; font-weight: 600; color: var(--muted); }
.mvchips { margin: 4px 0 0; }
.mvchips .tabchip { font-size: 12px; padding: 5px 10px; }

#gal-more[hidden] { display: none; }
#gal-more { justify-self: start; }

/* photo viewer: no scrolling behind it */
html.lb-open, html.lb-open body { overflow: hidden !important; overscroll-behavior: none; }
#lightbox { touch-action: none; overscroll-behavior: contain; }
/* album bubbles */
.gallery .albcard { grid-column: auto; display: grid; gap: 6px; padding: 10px; text-align: left; font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); cursor: pointer; align-content: start; }
.albcollage { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.albcollage img, .albcollage span { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--surface-2); min-height: 0; }
.albname { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.albcard small { color: var(--muted); font-size: 12px; }
.gal-sub { grid-column: 1 / -1; margin: 10px 0 0; font-size: 15px; }
#alb-tabs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 4px; }
#alb-tabs[hidden] { display: none; }
.albtitle { font-size: 17px; }
#gal-more { border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); border-radius: 12px; padding: 12px 16px; font-weight: 700; justify-self: stretch; text-align: center; }

#photoform[hidden] { display: none; }
.albumbar .actions .primary { padding: 9px 16px; }

/* photo cards are only as tall as their photo; actions live in the viewer */
.gallery { align-items: start; }
#lightbox { flex-direction: column; gap: 10px; }
#lightbox > img { flex: 1 1 auto; min-height: 0; margin-top: 64px; }
.lb-panel { flex: 0 0 auto; width: 100%; max-width: 560px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); border-radius: 16px 16px 0 0; background: rgba(24, 24, 28, 0.96); color: #f2efe9; display: grid; gap: 10px; }
.lb-info { display: grid; gap: 2px; }
.lb-info span { color: #a8a39a; font-size: 13px; }
.lb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lb-actions button { flex: 1 1 120px; padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #f2efe9; font: inherit; font-weight: 700; cursor: pointer; }
.lb-actions .lb-del { color: #ff8b82; }
.lb-chips { margin: 0; }

/* pull to refresh */
#ptr { position: fixed; top: env(safe-area-inset-top, 0px); left: 50%; width: 40px; height: 40px; margin: 0; border-radius: 50%; display: grid; place-items: center; background: var(--panel, #1c1c21); color: #fff; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 4px 14px rgba(0,0,0,.5); font-size: 20px; line-height: 1; z-index: 60; opacity: 0; transform: translate(-50%, -48px); pointer-events: none; }
#ptr svg { display: block; }
#ptr.spin svg { animation: ptrspin .9s cubic-bezier(.45, .1, .55, .9) infinite; transform-origin: 50% 50%; }
@keyframes ptrspin { to { transform: rotate(360deg); } }

/* what to bring */
.bring-h { margin: 18px 0 4px; display: flex; align-items: baseline; gap: 8px; }
.bring-h small { color: var(--muted); font-weight: 600; font-size: 13px; }
ul.bring { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.bring-item { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface, #1c1c21); color: var(--fg); font: inherit; cursor: pointer; }
.bring-box { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--muted); display: grid; place-items: center; font-weight: 800; line-height: 1; }
.bring-item.on { border-color: var(--accent); }
.bring-item.on .bring-box { background: var(--accent); border-color: var(--accent); color: var(--accent-fg, #fff); }
.bring-item.on span:last-child { color: var(--muted); text-decoration: line-through; }

/* foldable menu groups */
.tabgroup { padding: 0; }
.tabgroup-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; padding: 12px 8px 4px; cursor: pointer; }
.tabgroup:first-child .tabgroup-btn { padding-top: 2px; }
.tabgroup-btn svg { transition: transform .2s; }
.tabgroup.closed .tabgroup-btn svg { transform: rotate(-90deg); }
.tabs .gfold { display: none !important; }
