/* Layout: dashboard shell. Glass sidebar with grouped nav on desktop, a top bar on phones. Neon spectrum glows on a deep indigo ground; one committed dark look. */
:root {
  color-scheme: dark;
  --bg: #0A0816;
  --ink: #F3F1FF;
  --muted: #AAA5CC;
  --line: rgba(255, 255, 255, 0.13);
  --glass: linear-gradient(150deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.035));
  --glass-flat: rgba(255, 255, 255, 0.055);
  --soft: rgba(255, 255, 255, 0.07);
  --btn-grad: linear-gradient(110deg, #B77CFF, #3EC1FF);
  --focus: #5FD0FF;
  --pink: #FF5CC8;
  --red: #FF5470;
  --orange: #FF9A4D;
  --yellow: #FFD84A;
  --green: #3DF2A5;
  --blue: #3EC1FF;
  --violet: #A978FF;
  --spectrum: linear-gradient(90deg, var(--pink), var(--red), var(--orange), var(--yellow), var(--green), var(--blue), var(--violet));
  --font-display: 'Bricolage Grotesque', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font-body); }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
  radial-gradient(900px 520px at 8% -6%, rgba(169, 120, 255, 0.30), transparent 62%),
  radial-gradient(760px 520px at 104% 8%, rgba(62, 193, 255, 0.20), transparent 62%),
  radial-gradient(720px 560px at 55% 112%, rgba(255, 92, 200, 0.16), transparent 62%); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 16px; }
.spectrum { height: 4px; background: var(--spectrum); box-shadow: 0 0 14px rgba(169, 120, 255, 0.6); }
.gradtext { background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* shell, top bar */
.shell { display: block; min-height: 100%; }
.content { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: rgba(10, 8, 22, 0.82); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.topbar { max-width: 1080px; margin-inline: auto; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand b { font: 800 1.7rem/1 var(--font-display); letter-spacing: -0.03em; background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 10px rgba(169, 120, 255, 0.55)); }
.brand span { font-size: 1.05rem; font-weight: 700; line-height: 1; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-logo { height: 38px; width: auto; max-width: 150px; display: block; filter: drop-shadow(0 0 12px rgba(169, 120, 255, 0.45)); }
.tb-actions { position: relative; display: flex; align-items: center; gap: 8px; flex: none; }
.tb-btn, .tb-avatar { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--glass-flat); color: var(--ink); cursor: pointer; text-decoration: none; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tb-btn:hover, .tb-avatar:hover { border-color: rgba(169, 120, 255, 0.7); }
.tb-btn[aria-expanded="true"], .tb-btn[aria-current="page"] { background: var(--btn-grad); color: #0A0816; border-color: transparent; box-shadow: 0 0 18px rgba(124, 140, 255, 0.45); }
.tb-btn .badge { position: absolute; top: -5px; right: -5px; margin: 0; }
.tb-avatar { overflow: visible; font: 800 1rem var(--font-display); }
.tb-avatar .pfp, .tb-avatar > img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: none; }
.tb-avatar .pfp.dot { background: var(--violet); color: #0A0816; }
.tb-avatar[aria-expanded="true"] { border-color: var(--violet); box-shadow: 0 0 18px rgba(169, 120, 255, 0.5); }
.tb-avatar .caret { position: absolute; right: -4px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); color: var(--ink); }
/* dropdowns: same glass card look as the rest of the site, kept inside the screen */
.dd { position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; width: min(320px, calc(100vw - 24px)); max-height: calc(100vh - 90px); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(150deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.035)), #0F0C20; box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.dd a, .dd > button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 12px; background: none; text-align: left; text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--muted); cursor: pointer; width: 100%; }
.dd a:hover, .dd > button:hover, .dd a:focus-visible, .dd > button:focus-visible { background: var(--soft); color: var(--ink); }
.dd a[aria-current="page"] { background: var(--btn-grad); color: #0A0816; box-shadow: 0 0 18px rgba(124, 140, 255, 0.5); }
.dd a[aria-current="page"] .badge { background: #0A0816; color: var(--ink); box-shadow: none; }
.dd-label { display: block; font: 600 0.7rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 10px 14px 4px; }
.dd a.dd-me { justify-content: flex-start; gap: 12px; padding: 10px 12px; margin-bottom: 6px; border-radius: 14px; background: var(--glass-flat); border: 1px solid var(--line); color: var(--ink); }
.dd a.dd-me:hover { border-color: rgba(169, 120, 255, 0.7); }
.dd a.dd-me[aria-current="page"] { background: var(--glass-flat); color: var(--ink); box-shadow: none; border-color: var(--violet); }
.dd-me .pfp { width: 44px; height: 44px; }
.dd-me > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.dd-me b { font-size: 0.98rem; line-height: 1.25; overflow-wrap: anywhere; }
.dd-me .row { gap: 4px; }
.dd-me .chip { font-size: 0.7rem; padding: 1px 8px; }
.dd #dd-logout { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
@media (max-width: 460px) { .brand span { display: none; } .topbar { padding-inline: 12px; } }
@media (min-width: 900px) { .topbar { padding: 10px 32px; } .wrap { padding-inline: 32px; } }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; background: var(--btn-grad); color: #0A0816; padding: 10px 18px; border-radius: 999px; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2; box-shadow: 0 0 22px rgba(124, 140, 255, 0.35); }
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: var(--glass-flat); color: var(--ink); border-color: var(--line); box-shadow: none; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn.ghost:hover { border-color: rgba(169, 120, 255, 0.7); filter: none; }
.btn.sm { padding: 6px 12px; font-size: 0.85rem; }
.btn.danger { background: var(--red); color: #0A0816; border-color: var(--red); box-shadow: 0 0 18px rgba(255, 84, 112, 0.45); }
.btn[disabled] { opacity: 0.5; cursor: default; }
label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
input, select, textarea { width: 100%; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 12px; padding: 10px 12px; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(62, 193, 255, 0.2); outline: none; }
select option { background: #1A1636; color: var(--ink); }
textarea { min-height: 96px; resize: vertical; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.fields .full { grid-column: 1 / -1; }
.hint { color: var(--muted); font-size: 0.85rem; }

/* sections */
main { padding-block: 28px 56px; }
.view { display: flex; flex-direction: column; gap: 28px; }
.view-head { display: flex; flex-direction: column; gap: 8px; max-width: 62ch; }
.view-head h2 { font-size: clamp(1.9rem, 5vw, 2.8rem); font-weight: 800; background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 14px rgba(169, 120, 255, 0.35)); }
.view-head p { color: var(--muted); }
.eyebrow { font: 600 0.72rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; align-items: start; }
.cols > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sec-title { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; }
.sec-title::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--spectrum); opacity: 0.7; }
.sec-title h3 { font-size: 1.25rem; font-weight: 700; }
.sec-title a { font-size: 0.88rem; font-weight: 600; color: var(--blue); }
.empty { color: var(--muted); padding: 18px; border: 1px dashed rgba(255, 255, 255, 0.22); border-radius: 14px; font-size: 0.95rem; background: var(--glass-flat); }

/* glass surfaces */
.card, .event, .pillar, .person, .panel, .stat, .value, .hero { background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 10px 34px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.08); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px 36px; align-items: center; padding: 18px 26px; border-radius: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 90px rgba(169, 120, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.mark { display: flex; flex-direction: column; user-select: none; }
.mark .word { font: 800 clamp(4rem, 16vw, 7rem)/0.82 var(--font-display); letter-spacing: -0.05em; padding-bottom: 0.04em; color: var(--ink); text-shadow: 0 0 26px rgba(169, 120, 255, 0.75), 0 0 64px rgba(62, 193, 255, 0.4); }
.mark .water { height: 4px; margin-block: 2px; }
.mark .reflect { font: 800 clamp(4rem, 16vw, 7rem)/0.82 var(--font-display); letter-spacing: -0.05em; transform: scaleY(-1); transform-origin: center; height: 0.62em; overflow: hidden; display: flex; align-items: flex-end; background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 92%); mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 92%); }
.mark.has-logo .word, .mark.has-logo .reflect { display: none; }
.mark.has-logo .water { width: min(100%, 240px); }
.logo-stack { width: min(100%, 240px); }
.logo-stack img { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 22px rgba(169, 120, 255, 0.5)); }
.logo-clip { position: relative; overflow: hidden; width: min(100%, 240px); -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 95%); mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 95%); }
.logo-reflect { position: absolute; top: 0; left: 0; width: 100%; transform: scaleY(-1); }
.logo-fill { width: 100%; height: 100%; background: var(--spectrum); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.logo-preview img { display: block; max-width: 220px; max-height: 120px; background: var(--soft); border-radius: 12px; padding: 8px; }
.hero-copy { display: flex; flex-direction: column; gap: 10px; }
.hero-copy h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 800; }
.hero-copy .lead { color: var(--muted); max-width: 52ch; }
.tagline { font: 700 1.2rem/1.3 var(--font-display); background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* stat tiles, values, pillars */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 18px; min-width: 0; }
.stat strong { font: 800 2.5rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; text-shadow: 0 0 22px rgba(62, 193, 255, 0.5); overflow-wrap: anywhere; }
.stat strong.small { font-size: 1.4rem; }
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.value { padding: 18px; border-radius: 18px; display: flex; flex-direction: column; gap: 6px; }
.value i { display: block; width: 22px; height: 22px; border-radius: 50%; margin-bottom: 4px; filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4)); }
.value h4 { font-size: 1.05rem; font-weight: 700; }
.value p { color: var(--muted); font-size: 0.92rem; }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.pillar { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 18px; text-decoration: none; }
.pillar:hover { border-color: rgba(169, 120, 255, 0.75); box-shadow: 0 10px 34px rgba(0, 0, 0, 0.38), 0 0 26px rgba(169, 120, 255, 0.3); }
.pillar h4 { font-size: 1.05rem; font-weight: 700; }
.pillar p { color: var(--muted); font-size: 0.92rem; }
.pillar .tag { font: 600 0.7rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--pink); }

/* lists */
.list { display: flex; flex-direction: column; gap: 12px; }
.card { border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card h3 { font-size: 1.15rem; font-weight: 700; }
.card .body { display: flex; flex-direction: column; gap: 8px; overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 0.82rem; color: var(--muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; color: var(--ink); background: color-mix(in srgb, var(--c, var(--muted)) 20%, transparent); border: 1px solid color-mix(in srgb, var(--c, var(--muted)) 75%, transparent); }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--muted)); box-shadow: 0 0 8px var(--c, var(--muted)); }
.c-red { --c: var(--red); } .c-orange { --c: var(--orange); } .c-yellow { --c: var(--yellow); } .c-green { --c: var(--green); } .c-blue { --c: var(--blue); } .c-violet { --c: var(--violet); }
.event { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; border-radius: 18px; padding: 14px 16px; }
.event .date { display: flex; flex-direction: column; align-items: center; line-height: 1; padding-right: 14px; border-right: 1px solid var(--line); }
.event .date small { font: 600 0.7rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.event .date strong { font: 800 1.9rem/1.15 var(--font-display); background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.event h4 { font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }
.event p { color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.event .time { font: 600 0.9rem var(--font-mono); text-align: right; white-space: nowrap; color: var(--green); text-shadow: 0 0 12px rgba(61, 242, 165, 0.45); }
.event.past { opacity: 0.55; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.toc button { border: 1px solid var(--line); background: var(--glass-flat); border-radius: 999px; padding: 4px 12px; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.toc button:hover { border-color: rgba(62, 193, 255, 0.8); box-shadow: 0 0 14px rgba(62, 193, 255, 0.25); }
.rgroup { font: 800 clamp(1.4rem, 3.6vw, 2rem)/1.1 var(--font-display); padding-top: 28px; margin-top: 12px; border-top: 1px solid var(--line); background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.rsec { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 24px; padding: 26px 0; border-top: 1px solid var(--line); scroll-margin-top: 120px; }
.rsec .lab { font: 600 0.78rem/1.8 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }
.rbody { display: flex; flex-direction: column; gap: 12px; max-width: 72ch; min-width: 0; overflow-wrap: anywhere; }
.rbody h3 { font-size: 1.5rem; font-weight: 800; }
.rbody h4 { font: 700 1.05rem/1.3 var(--font-display); margin-top: 8px; color: var(--pink); }
.rbody ul { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 4px; }
.rbody blockquote.principle { margin: 4px 0; padding: 14px 16px; background: var(--glass-flat); border: 1px solid rgba(169, 120, 255, 0.45); border-radius: 14px; font-weight: 600; box-shadow: 0 0 24px rgba(169, 120, 255, 0.18); }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; min-width: 0; }
.person .dot { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 800 1rem var(--font-display); background: var(--c); color: #0A0816; box-shadow: 0 0 16px var(--c); }
.person b { display: block; overflow-wrap: anywhere; line-height: 1.25; }
.person span { color: var(--muted); font-size: 0.82rem; }

/* members area */
.panel { border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel h3 { font-size: 1.3rem; font-weight: 700; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: var(--glass-flat); padding: 8px 16px; border-radius: 999px; font-weight: 600; cursor: pointer; }
.tabs button:hover { border-color: rgba(169, 120, 255, 0.7); }
.tabs button[aria-selected="true"] { background: var(--btn-grad); color: #0A0816; border-color: transparent; box-shadow: 0 0 18px rgba(124, 140, 255, 0.45); }
dl.kv { display: grid; grid-template-columns: minmax(90px, max-content) minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 0.92rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.note { background: var(--glass-flat); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 0.9rem; overflow-wrap: anywhere; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.end { justify-content: flex-end; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.admin-grid > * { min-width: 0; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: rgba(24, 19, 52, 0.94); color: var(--ink); border: 1px solid rgba(169, 120, 255, 0.55); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; max-width: calc(100vw - 32px); z-index: 50; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 24px rgba(169, 120, 255, 0.35); }
footer { border-top: 1px solid var(--line); padding-block: 24px 40px; color: var(--muted); font-size: 0.88rem; margin-top: auto; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding: 16px 16px; gap: 12px; }
  .event { grid-template-columns: 56px minmax(0, 1fr); }
  .event .time { grid-column: 2; text-align: left; }
  .rsec { grid-template-columns: minmax(0, 1fr); }
  .brand span { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .pillar, .btn, .dd a, .tb-btn, .toc button, .tabs button { transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s, filter 0.15s; }
}
.steps { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.who { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.who img { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 18px rgba(169, 120, 255, 0.45); }
.banner { margin-bottom: 20px; padding: 14px 16px; border-radius: 14px; background: rgba(255, 216, 74, 0.12); border: 1px solid rgba(255, 216, 74, 0.6); color: var(--ink); font-size: 0.92rem; }
.banner code { font-family: var(--font-mono); background: var(--soft); padding: 1px 6px; border-radius: 6px; }

/* Make the hidden attribute always win over display rules. */
[hidden] { display: none !important; }
.event .time .chip { margin-top: 6px; text-shadow: none; font-family: var(--font-body, inherit); }
#opk-record { color: var(--muted); font-size: 0.85rem; }

.decide { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0 0; margin-top: 8px; border-top: 1px solid var(--line); }
.decide .when { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.decide .acts { display: flex; gap: 8px; }
dl.kv dd.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- member profiles ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.back { font-weight: 600; text-decoration: none; color: var(--muted); }
.back:hover { color: var(--ink); }
.dir-tools { display: grid; gap: 12px; margin-bottom: 14px; }
.dir-tools input[type=search] { width: 100%; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.ghost[aria-pressed="true"] { background: var(--btn-grad); color: #0A0816; border-color: transparent; box-shadow: 0 0 18px rgba(124, 140, 255, 0.45); }
.roster { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
a.person { text-decoration: none; color: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
a.person:hover, a.person:focus-visible { border-color: rgba(169, 120, 255, 0.7); box-shadow: 0 0 22px rgba(169, 120, 255, 0.28); }
.person .who-line { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.person .who-line .chip { align-self: flex-start; font-size: 0.7rem; padding: 1px 8px; }
.person .who-line .id { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); overflow-wrap: anywhere; }
img.pfp, .pfp.dot { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 16px rgba(169, 120, 255, 0.45); }
.pfp.dot { display: grid; place-items: center; font: 800 1rem var(--font-display); background: var(--c, var(--violet)); color: #0A0816; }
.pfp.xl { width: 112px; height: 112px; font-size: 2.6rem; box-shadow: 0 0 34px rgba(169, 120, 255, 0.5); }
.pf-hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; padding: 24px; border-radius: 24px; }
.pf-hero h2 { margin: 0 0 6px; overflow-wrap: anywhere; }
.pf-hero .row { gap: 8px; flex-wrap: wrap; }
.pf-bio { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.pf-locked { color: var(--muted); margin: 0; }
.pfp-preview { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 22px rgba(169, 120, 255, 0.4); }
.pf-act .event { margin-bottom: 10px; }
@media (max-width: 520px) { .pf-hero { padding: 18px; } .pfp.xl { width: 88px; height: 88px; font-size: 2rem; } }

/* ---------- family chat ---------- */
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 8px; border-radius: 999px; background: var(--pink); color: #0A0816; font: 800 0.72rem/1 var(--font-body); box-shadow: 0 0 12px rgba(255, 92, 200, 0.7); }
.chat { gap: 12px; padding: 16px; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.chat-head h2 { font-size: 1.35rem; }
.chat-pins { display: grid; gap: 6px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255, 216, 74, 0.5); background: rgba(255, 216, 74, 0.08); max-height: 22vh; overflow-y: auto; }
.chat-pins h4 { font-size: 0.8rem; font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--yellow); }
.chat-pin { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; font-size: 0.92rem; }
.chat-pin q { quotes: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-pin small { color: var(--muted); }
.chat-list { height: min(62vh, 640px); min-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 12px 10px; overscroll-behavior: contain; border-radius: 14px; background: rgba(0, 0, 0, 0.18); }
.chat-list > * { flex: none; }
.chat-list .empty { margin: auto 8px; text-align: center; }
.chat-day { display: flex; align-items: center; gap: 12px; margin: 10px 0 6px; color: var(--muted); font: 600 0.72rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.chat-day::before, .chat-day::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.msg { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; max-width: 100%; }
.msg.cont { margin-top: 0; }
.msg.mine { flex-direction: row-reverse; align-self: flex-end; }
.msg .pfp { width: 38px; height: 38px; }
.msg.cont > a, .msg.cont > span { display: none; }
.msg.cont { padding-left: 48px; }
.msg.cont.mine { padding-left: 0; padding-right: 48px; }
.msg .bub { width: fit-content; min-width: 0; max-width: min(100%, 620px); padding: 8px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass-flat); }
.msg.mine .bub { border-color: rgba(169, 120, 255, 0.55); background: rgba(169, 120, 255, 0.16); }
.msg .mtop { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.msg .mtop a { font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.msg .mtop a:hover { text-decoration: underline; }
.msg .mtop time { color: var(--muted); font-size: 0.75rem; font-family: var(--font-mono); }
.msg .mtop .chip { font-size: 0.68rem; padding: 0 8px; }
.msg .txt { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.msg .quote { margin: 4px 0; padding: 4px 8px; border-left: 3px solid var(--violet); color: var(--muted); font-size: 0.84rem; overflow-wrap: anywhere; white-space: pre-wrap; max-height: 3.6em; overflow: hidden; }
.msg .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.msg .acts button, .react { border: 1px solid var(--line); background: var(--soft); color: var(--muted); border-radius: 999px; padding: 1px 9px; font-size: 0.78rem; cursor: pointer; line-height: 1.6; }
.msg .acts button:hover, .react:hover { color: var(--ink); border-color: rgba(169, 120, 255, 0.7); }
.react[aria-pressed="true"] { color: var(--ink); background: rgba(169, 120, 255, 0.3); border-color: var(--violet); }
.picker { display: inline-flex; gap: 2px; padding: 2px 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(10, 8, 22, 0.9); }
.msg .acts .picker button { border: 0; background: none; font-size: 1.1rem; padding: 2px 4px; color: inherit; }
/* On a mouse, tools stay hidden until you hover or focus a message; reactions already given stay visible. */
@media (hover: hover) and (min-width: 900px) {
  .msg .acts button:not(.react) { opacity: 0; transition: opacity 0.12s; }
  .msg:hover .acts button:not(.react), .msg:focus-within .acts button:not(.react) { opacity: 1; }
  .msg .acts { min-height: 0; }
}
.chat-more { align-self: center; }
.chat-reply { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 6px 10px; border-left: 3px solid var(--violet); background: var(--glass-flat); border-radius: 8px; font-size: 0.88rem; color: var(--muted); }
.chat-reply span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { min-height: 44px; max-height: 160px; resize: none; }
#chat-count { text-align: right; font-size: 0.75rem; min-height: 1em; }
/* Desktop: the chat fills the screen height and uses the full content width, like a chat app. */
@media (min-width: 900px) {
  #v-chat { max-width: none; }
  .chat { height: calc(100vh - 190px); min-height: 520px; padding: 20px 22px; }
  .chat-list { flex: 1; height: auto; min-height: 0; padding: 14px 18px; }
  .msg { max-width: 82%; }
  .msg .bub { max-width: 720px; }
  .msg .pfp { width: 42px; height: 42px; }
  .msg.cont { padding-left: 52px; }
  .msg.cont.mine { padding-right: 52px; }
}
@media (max-width: 560px) { .chat { padding: 12px; } .chat-list { height: 58vh; } .msg { max-width: 94%; } }

/* ---------- profile album ---------- */
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.album-item { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--glass-flat); cursor: pointer; }
.album-item.edit { cursor: default; padding-bottom: 8px; align-items: center; }
.album-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
button.album-item:hover, button.album-item:focus-visible { border-color: rgba(169, 120, 255, 0.8); box-shadow: 0 0 20px rgba(169, 120, 255, 0.35); }
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; padding: 20px; background: rgba(5, 4, 12, 0.92); cursor: zoom-out; }
.lightbox img { max-width: min(100%, 1100px); max-height: calc(100vh - 100px); object-fit: contain; border-radius: 14px; box-shadow: 0 0 40px rgba(169, 120, 255, 0.35); }

/* ---------- announcement photos: shown in their own shape (square, portrait or wide), never cropped ---------- */
.ann-photo { display: block; width: fit-content; max-width: 100%; margin-inline: auto; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--glass-flat); cursor: zoom-in; }
.ann-photo img { display: block; width: auto; height: auto; max-width: 100%; max-height: min(560px, 80vh); object-fit: contain; }
.ann-photo.compact img { max-height: min(380px, 60vh); }
.ann-photo:hover, .ann-photo:focus-visible { border-color: rgba(169, 120, 255, 0.8); }

/* ---------- chat: cleaner messages (reactions and time below the text, tools on tap) ---------- */
.chat-list { overflow-x: hidden; }
.msg .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.msg .reacts { display: flex; flex-wrap: wrap; gap: 6px; }
.msg .foot time { margin-left: auto; color: var(--muted); font: 0.7rem var(--font-mono); white-space: nowrap; }
.msg .tools { margin-top: 6px; }
@media (hover: none), (max-width: 899px) {
  .msg .tools { display: none; }
  .msg.open .tools { display: flex; }
  .msg .acts button:not(.react) { opacity: 1; }
}
.chat-pin button { flex: none; border: 1px solid var(--line); background: var(--soft); color: var(--muted); border-radius: 999px; padding: 1px 10px; font-size: 0.78rem; cursor: pointer; line-height: 1.6; }
.chat-pin button:hover { color: var(--ink); border-color: rgba(169, 120, 255, 0.7); }

/* ---------- chat photos and videos: always kept inside the message bubble ---------- */
.chat-form .chat-pick { flex: none; width: 42px; height: 42px; min-width: 42px; aspect-ratio: 1 / 1; padding: 0; border-radius: 50%; }
.chat-form .chat-pick[disabled] { opacity: 0.5; cursor: default; }
.chat-attach { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass-flat); }
.chat-attach img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; }
.chat-attach span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 0.85rem; }
.msg .bub { overflow: hidden; }
.chat-list { overflow-x: hidden; }
/* Fixed, bounded size: a large picture or video can never stretch the chat, whatever its pixel size. */
.msg .chat-img, .msg .chat-vid { display: block; width: min(340px, 68vw); max-width: 100%; margin: 4px 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--soft); }
.msg .chat-img { cursor: zoom-in; }
.msg .chat-img img, .msg .chat-vid video { display: block; width: 100%; height: auto; max-height: 320px; object-fit: contain; background: rgba(0, 0, 0, 0.25); }
.msg .chat-img.missing { width: auto; padding: 14px; color: var(--muted); font-size: 0.85rem; cursor: default; }
@media (min-width: 900px) {
  .msg .chat-img, .msg .chat-vid { width: min(420px, 100%); }
  .msg .chat-img img, .msg .chat-vid video { max-height: 380px; }
}
.chat-form .chat-pick { width: 44px; height: 44px; min-width: 44px; min-height: 44px; flex: none; aspect-ratio: 1 / 1; padding: 0; border-radius: 50%; }
.chat-form .btn { min-height: 44px; }

@media (max-width: 560px) {
  #v-chat { margin-inline: -6px; }
  .chat { padding: 10px; border-radius: 18px; height: calc(100vh - 120px); height: calc(100dvh - 120px); min-height: 420px; }
  .chat-head h2 { font-size: 1.1rem; }
  #chat-notify .nt { display: none; }
  #chat-notify { padding: 6px 10px; }
  .chat-list { height: auto; flex: 1; min-height: 0; padding: 10px 6px; }
  .msg { gap: 8px; max-width: 100%; }
  .msg .pfp { width: 32px; height: 32px; }
  .msg.mine > a, .msg.mine > span { display: none; }
  .msg.cont { padding-left: 40px; }
  .msg.cont.mine { padding-right: 0; }
  .msg.mine { padding-left: 24px; }
  .msg .bub { padding: 7px 11px; }
  .msg .mtop .role-plain { display: none; }
  .msg .chat-img img, .msg .chat-vid video { max-height: 260px; }
  .chat-pin q { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .chat-pins { max-height: 16vh; }
  #chat-count { min-height: 0; }
}

/* stat tiles: one aligned row, also on phones */
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.stat { justify-content: space-between; }
@media (max-width: 760px) {
  .stats { gap: 8px; }
  .stat { padding: 12px 10px; gap: 4px; border-radius: 14px; }
  .stat .eyebrow { font-size: .62rem; letter-spacing: .08em; }
  .stat strong { font-size: 1.8rem; }
  .stat strong.small { font-size: 1rem; line-height: 1.2; }
  .stat .hint { font-size: .72rem; line-height: 1.25; overflow-wrap: anywhere; }
}

/* admin hub */
.adm-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.adm-card { position: relative; }
.adm-ico { font-size: 1.6rem; line-height: 1; }
.adm-count { position: absolute; top: 14px; right: 14px; padding: 3px 9px; border-radius: 999px; background: var(--pink); color: #12082a; font: 700 .72rem/1.3 var(--font-mono); }
.adm-sec { display: flex; flex-direction: column; gap: 18px; }
.adm-head { display: flex; flex-direction: column; gap: 6px; }
.adm-head .back { color: var(--cyan, #3ec1ff); font-weight: 600; font-size: .9rem; text-decoration: none; width: fit-content; }
.adm-head .back:hover { text-decoration: underline; }
.adm-head h3 { font-size: 1.3rem; }

.adm-head h3 { display: none; }

.tb-btn svg { display: block; width: 20px; height: 20px; flex: none; }

.av-prev { margin: 4px 0 2px; }
.av-thumb { display: block; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--soft); cursor: zoom-in; width: min(220px, 100%); }
.av-thumb img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: contain; }

.confirm-q { flex: 1 1 100%; color: var(--ink); }
.btn.danger { background: var(--red, #ff5d6c); color: #12082a; }
.acts { flex-wrap: wrap; }

/* chat: no outer card or list box (more room), but each message keeps its bubble */
.chat.panel { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0; border-radius: 0; }
.chat-list { background: none; border-radius: 0; padding: 8px 2px; }
.chat-form textarea { background: var(--glass-flat); }
.msg .chat-img, .msg .chat-vid { border-radius: 12px; }
/* smaller type so more messages fit */
.chat-list { font-size: 0.88rem; line-height: 1.4; }
.msg { margin-top: 6px; max-width: 86%; }
.msg.mine { flex-direction: row-reverse; align-self: flex-end; }
.msg .bub { padding: 6px 10px; border-radius: 14px; max-width: min(100%, 560px); }
.msg .pfp { width: 32px; height: 32px; }
.msg.cont { padding-left: 42px; }
.msg.cont.mine { padding-left: 0; padding-right: 42px; }
.msg .mtop a { font-size: 0.88rem; }
.msg .mtop time, .msg .foot time { font-size: 0.66rem; }
.msg .mtop .chip { font-size: 0.62rem; }
.msg .quote { font-size: 0.78rem; }
.msg .acts button, .react { font-size: 0.72rem; line-height: 1.5; }
.chat-form textarea, .chat-form .btn { font-size: 0.92rem; }
@media (min-width: 900px) {
  .chat { padding: 0; }
  .msg { max-width: 78%; }
  .msg .bub { max-width: 560px; }
  .msg .pfp { width: 34px; height: 34px; }
  .msg.cont { padding-left: 44px; }
  .msg.cont.mine { padding-right: 44px; }
}
@media (max-width: 560px) { .chat { padding: 0; } .msg { max-width: 92%; } .msg.cont { padding-left: 42px; } }

/* chat on phones: the page is exactly one screen tall (no footer, no page scrolling); only the messages scroll */
@media (max-width: 899px) {
  html:has(body.on-chat), body.on-chat { height: 100dvh; overflow: hidden; }
  body.on-chat .shell { height: 100dvh; min-height: 0; display: flex; flex-direction: column; }
  body.on-chat .content { flex: 1; min-height: 0; }
  body.on-chat main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-block: 8px 10px; }
  body.on-chat #v-chat { flex: 1; min-height: 0; gap: 0; }
  body.on-chat .chat { flex: 1; min-height: 0; height: auto; }
  body.on-chat .chat-list { flex: 1; min-height: 0; height: auto; }
  body.on-chat footer { display: none; }
}

.stats.stats-solo { grid-template-columns: minmax(0, 1fr); max-width: 260px; }
@media (max-width: 760px) { .stats.stats-solo { max-width: none; } }

/* editable schedule table */
.sheet-block { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sheet-block summary { cursor: pointer; }
.sheet-block details[open] > summary { margin-bottom: 12px; }
.sheet-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--glass-flat); }
table.sheet { border-collapse: collapse; width: max-content; min-width: 100%; font-size: .85rem; }
table.sheet th { position: sticky; top: 0; text-align: left; padding: 8px 8px; font: 600 .7rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: rgba(10, 8, 22, .9); white-space: nowrap; }
table.sheet td { padding: 3px 4px; border-top: 1px solid var(--line); vertical-align: middle; }
table.sheet input:not([type=checkbox]), table.sheet select { width: 100%; min-width: 96px; min-height: 34px; padding: 4px 8px; font-size: .85rem; border-radius: 8px; }
table.sheet input[type=date] { min-width: 128px; }
table.sheet input[type=time] { min-width: 108px; }
table.sheet input[type=checkbox] { width: 20px; height: 20px; margin: 0 auto; display: block; }
table.sheet .saved { box-shadow: 0 0 0 2px var(--green, #4ade80); }
.sheet-block details.panel { display: block; padding: 14px 18px; }

/* private messages */
.dd a .badge { position: static; margin-left: 8px; display: inline-block; vertical-align: middle; }
#prof-btn.has-dm::before { content: ''; position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--pink, #ff5fa2); border: 2px solid #0A0816; z-index: 1; }
.dm { display: flex; flex-direction: column; gap: 12px; padding: 14px; min-width: 0; }
.dm-list { height: min(56vh, 520px); min-height: 240px; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 8px; padding: 6px 2px; overscroll-behavior: contain; }
.dm-list > * { flex: none; }
.dm-msg { align-self: flex-start; max-width: min(88%, 520px); padding: 6px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass-flat); }
.dm-msg.mine { align-self: flex-end; border-color: rgba(169, 120, 255, .55); background: rgba(169, 120, 255, .16); }
.dm-who { display: flex; gap: 10px; align-items: baseline; font-weight: 700; font-size: .82rem; }
.dm-who time { margin-left: auto; color: var(--muted); font: .66rem var(--font-mono); white-space: nowrap; }
.dm-txt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; }
.dm-form { display: flex; gap: 8px; align-items: flex-end; }
.dm-form textarea { min-height: 44px; max-height: 140px; resize: none; flex: 1; }
.dm-form .btn { min-height: 44px; }
.dm-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dm-admin { min-width: 0; }
.dm-threads { display: flex; flex-direction: column; gap: 8px; }
.dm-thread { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass-flat); color: var(--ink); cursor: pointer; }
.dm-thread:hover { border-color: rgba(169, 120, 255, .7); }
.dm-thread.unread { border-color: rgba(255, 95, 162, .7); }
.dm-thread .pfp { width: 40px; height: 40px; flex: none; }
.dm-tmain { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dm-snip { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-tmeta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; color: var(--muted); font: .68rem var(--font-mono); }
.dm-tmeta .badge { position: static; margin: 0; }

.sheet-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sheet-tools input[type=search] { flex: 1 1 240px; min-width: 0; }
.sheet-tools select { flex: 0 1 190px; }

/* the schedule table fits a desktop screen without sideways scrolling */
body.on-sheet main.wrap { max-width: min(1560px, 98vw); }
@media (min-width: 1100px) {
  .sheet-wrap { overflow-x: visible; }
  table.sheet { width: 100%; min-width: 0; table-layout: fixed; font-size: .76rem; }
  table.sheet th { padding: 6px 4px; font-size: .6rem; letter-spacing: .03em; white-space: normal; }
  table.sheet td { padding: 2px 2px; }
  table.sheet input:not([type=checkbox]), table.sheet select { min-width: 0; width: 100%; min-height: 30px; padding: 3px 5px; font-size: .76rem; border-radius: 7px; }
  table.sheet input[type=date], table.sheet input[type=time] { padding-right: 2px; }
  table.sheet .btn.sm { padding: 3px 6px; font-size: .68rem; min-height: 0; }
  table.sheet th:nth-child(1) { width: 7%; }
  table.sheet th:nth-child(2) { width: 7%; }
  table.sheet th:nth-child(3) { width: 7%; }
  table.sheet th:nth-child(4) { width: 6.5%; }
  table.sheet th:nth-child(5) { width: 3.5%; }
  table.sheet th:nth-child(6) { width: 6%; }
  table.sheet th:nth-child(7) { width: 7%; }
  table.sheet th:nth-child(8) { width: 9%; }
  table.sheet th:nth-child(9) { width: 3.5%; }
  table.sheet th:nth-child(10) { width: 6.5%; }
  table.sheet th:nth-child(11) { width: 6.5%; }
  table.sheet th:nth-child(12) { width: 6.5%; }
  table.sheet th:nth-child(13) { width: 6.5%; }
  table.sheet th:nth-child(14) { width: 6%; }
  table.sheet th:nth-child(15) { width: 4.5%; }
  table.sheet th:nth-child(16) { width: 5%; }
}
@media (max-width: 1099px) { table.sheet { min-width: 1100px; } }

table.sheet.pi td.ro { padding: 8px 8px; white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
@media (min-width: 1100px) { table.sheet.pi th { width: auto; } }

/* Host verification guide */
.gd-card{max-width:820px;margin:0 auto 16px;gap:12px}
.gd-prog{display:flex;align-items:center;gap:12px;font-size:.85rem;color:var(--muted,#aab)}
.gd-bar{flex:1;height:6px;border-radius:99px;background:rgba(255,255,255,.12);overflow:hidden}
.gd-bar i{display:block;height:100%;width:0;background:var(--btn-grad);transition:width .25s}
.gd-img-wrap{display:block;border-radius:12px;overflow:hidden;border:1px solid var(--line)}
.gd-img-wrap img{display:block;width:100%;height:auto}
.gd-body p{margin:0 0 8px;line-height:1.5}
.gd-body ul{margin:0 0 8px;padding-left:20px;line-height:1.5}
.gd-body li{margin-bottom:4px}
.gd-note{border-left:3px solid #ffb84d;padding:6px 10px;background:rgba(255,184,77,.1);border-radius:6px;margin:0 0 8px}
.gd-nav{display:flex;gap:10px;justify-content:space-between;flex-wrap:wrap}
.gd-nav .btn{flex:1;min-width:120px}
.gd-dots{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}
.gd-dots button{width:10px;height:10px;padding:0;border-radius:50%;border:0;background:rgba(255,255,255,.25);cursor:pointer}
.gd-dots button[aria-current="true"]{background:#a978ff;transform:scale(1.3)}
.gd-items{display:flex;flex-direction:column;gap:10px}
.gd-items label{display:flex;gap:12px;align-items:flex-start;cursor:pointer;line-height:1.4}
.gd-items input{width:20px;height:20px;min-height:0;flex:none;margin-top:1px}
.gd-done{color:#5be3a1;font-weight:700}
.wel{position:fixed;inset:0;z-index:200;background:rgba(5,3,15,.7);display:flex;align-items:center;justify-content:center;padding:16px}
.wel[hidden]{display:none!important}
.wel-box{max-width:460px;width:100%}

.gl-sec{border:1px solid var(--line);border-radius:12px;padding:10px 14px;background:rgba(255,255,255,.03)}
.gl-sec summary{cursor:pointer;font-weight:700}
.gl-sec ol{margin:10px 0 0;padding-left:22px;line-height:1.5}
.gl-sec li{margin-bottom:8px}

.role-pick{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:8px}
.role-opt{display:flex;gap:10px;align-items:flex-start;padding:8px 10px;border:1px solid var(--line);border-radius:12px;cursor:pointer;background:rgba(255,255,255,.03)}
.role-opt input{width:18px;height:18px;min-height:0;flex:none;margin-top:2px}
.role-opt small{display:block;opacity:.7;font-size:.78rem;line-height:1.3;font-weight:400}

.mem-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}
.mem-tabs .btn[aria-selected="true"]{background:var(--btn-grad);color:#0A0816;border-color:transparent}
.mem-tabs .badge{position:static;margin-left:6px}
.mem-det{border-top:1px solid var(--line);padding-top:8px}
.mem-det summary{cursor:pointer;font-size:.85rem;opacity:.85}

/* messages to the admins on phones: fit one screen, no footer, only the messages scroll */
@media (max-width: 899px) {
  html:has(body.on-dm), body.on-dm { height: 100dvh; overflow: hidden; }
  body.on-dm .shell { height: 100dvh; min-height: 0; display: flex; flex-direction: column; }
  body.on-dm .content { flex: 1; min-height: 0; }
  body.on-dm main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-block: 8px 10px; }
  body.on-dm #v-messages { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
  body.on-dm #v-messages .chat { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px; }
  body.on-dm #v-messages .chat-list { flex: 1; min-height: 0; height: auto; }
  body.on-dm footer { display: none; }
}

.dmc { display: flex; flex-direction: column; }
.dmc .chat-head h2 { font-size: 1.2rem; }
.dmc .chat-head { justify-content: flex-start; }

/* admin inbox on phones: conversation fits one screen, message box stays visible */
@media (max-width: 899px) {
  html:has(body.on-dma), body.on-dma { height: 100dvh; overflow: hidden; }
  body.on-dma .shell { height: 100dvh; min-height: 0; display: flex; flex-direction: column; }
  body.on-dma .content { flex: 1; min-height: 0; }
  body.on-dma main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-block: 8px 10px; }
  body.on-dma #v-admin, body.on-dma #v-admin .adm-sec[data-sec="inbox"], body.on-dma .dm-admin { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
  body.on-dma #v-admin[hidden], body.on-dma #v-admin .adm-sec[data-sec="inbox"][hidden] { display: none; }
  body.on-dma .dm-threads { flex: 1; min-height: 0; overflow-y: auto; }
  body.on-dma .dm-threads[hidden], body.on-dma #dm-pane[hidden] { display: none; }
  body.on-dma #dm-pane { flex: 1; min-height: 0; padding: 12px; }
  body.on-dma #dm-pane .chat-list { flex: 1; min-height: 0; height: auto; }
  body.on-dma footer { display: none; }
}

.ann-click { cursor: pointer; }
.ann-more { margin-top: 8px; padding: 4px 0; background: none; border: 0; color: var(--cyan, #38bdf8); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.ann-more:hover, .ann-more:focus-visible { text-decoration: underline; }

/* messages to the admins on desktop: fit one screen, no footer, only the messages scroll */
@media (min-width: 900px) {
  html:has(body.on-dm), body.on-dm { height: 100dvh; overflow: hidden; }
  body.on-dm .shell { height: 100dvh; min-height: 0; display: flex; flex-direction: column; }
  body.on-dm .content { flex: 1; min-height: 0; }
  body.on-dm main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-block: 8px 10px; }
  body.on-dm #v-messages { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
  body.on-dm #v-messages .chat { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px; }
  body.on-dm #v-messages .chat-list { flex: 1; min-height: 0; height: auto; }
  body.on-dm footer { display: none; }
}

/* admin inbox on desktop: conversation fits one screen, message box stays visible */
@media (min-width: 900px) {
  html:has(body.on-dma), body.on-dma { height: 100dvh; overflow: hidden; }
  body.on-dma .shell { height: 100dvh; min-height: 0; display: flex; flex-direction: column; }
  body.on-dma .content { flex: 1; min-height: 0; }
  body.on-dma main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-block: 8px 10px; }
  body.on-dma #v-admin, body.on-dma #v-admin .adm-sec[data-sec="inbox"], body.on-dma .dm-admin { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
  body.on-dma #v-admin[hidden], body.on-dma #v-admin .adm-sec[data-sec="inbox"][hidden] { display: none; }
  body.on-dma .dm-threads { flex: 1; min-height: 0; overflow-y: auto; }
  body.on-dma .dm-threads[hidden], body.on-dma #dm-pane[hidden] { display: none; }
  body.on-dma #dm-pane { flex: 1; min-height: 0; padding: 12px; }
  body.on-dma #dm-pane .chat-list { flex: 1; min-height: 0; height: auto; }
  body.on-dma footer { display: none; }
}

.yt { width: 100%; max-width: none; align-self: stretch; margin-top: 12px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #000; aspect-ratio: 16 / 9; }
.yt iframe { display: block; width: 100%; height: 100%; border: 0; }
.yt-play { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.yt-play img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; }
.yt-btn { position: absolute; inset: 0; margin: auto; width: 64px; height: 44px; border-radius: 12px; background: rgba(255, 0, 0, .9); color: #fff; display: grid; place-items: center; font-size: 1.2rem; padding-left: 3px; transition: transform .15s; }
.yt-play:hover .yt-btn, .yt-play:focus-visible .yt-btn { transform: scale(1.08); }

.cm-pic { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #000; cursor: zoom-in; }
.cm-pic img { display: block; width: 100%; height: auto; }
.cm-edit .row { flex-wrap: wrap; }

/* admin > family rules editor */
.rule-admin { max-width: 860px; }
.ru-row { flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; }
.ru-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: left; background: none; border: 0; color: inherit; font: inherit; padding: 4px; cursor: pointer; border-radius: 10px; }
.ru-main:hover, .ru-main:focus-visible { background: rgba(255, 255, 255, .05); }
.ru-grp { font: 600 .68rem/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.ru-snip { font-size: .85rem; opacity: .65; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ru-act { display: flex; gap: 6px; flex: none; align-items: center; }
.ru-editor { gap: 14px; padding: 18px; border-color: rgba(169, 120, 255, .55); box-shadow: 0 0 28px rgba(169, 120, 255, .18); }
.ru-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; }
.ru-text { min-height: 220px; resize: vertical; line-height: 1.55; font-size: 1rem; }
.ru-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.ru-prevbox { border: 1px dashed var(--line); border-radius: 14px; padding: 14px 16px; background: rgba(255, 255, 255, .02); }
@media (max-width: 700px) {
  .ru-row { flex-direction: column; align-items: stretch; }
  .ru-act { justify-content: flex-end; flex-wrap: wrap; }
  .ru-top { grid-template-columns: minmax(0, 1fr); }
}

.event .ids { font: 500 .8rem/1.4 var(--font-mono); opacity: .8; overflow-wrap: anywhere; }

.nf-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.nf-row input { width: 20px; height: 20px; flex: none; }
#notif .row { flex-wrap: wrap; }

.nf-ask { position: fixed; z-index: 150; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(440px, calc(100vw - 24px)); padding: 16px 18px; background: var(--card, #15122a); border: 1px solid rgba(169, 120, 255, .55); border-radius: 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, .55), 0 0 28px rgba(169, 120, 255, .25); display: flex; flex-direction: column; gap: 6px; }
.nf-ask[hidden] { display: none; }
.nf-ask p { margin: 0; font-size: .92rem; opacity: .85; }
.nf-ask .row { margin-top: 6px; }

.sh-qrbox { align-items: center; text-align: center; }
.sh-qr { min-height: 200px; display: grid; place-items: center; }
.sh-qr img { width: 200px; height: 200px; border-radius: 14px; background: #fff; }
.sh-tips { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; }

.su-edit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .su-edit { grid-template-columns: minmax(0, 1fr); } }

.copy-id { margin-left: 8px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .06); color: inherit; font: 600 .72rem/1.4 system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.copy-id:hover, .copy-id:focus-visible { background: rgba(255, 255, 255, .14); }
.copy-id.mini { margin: 0; padding: 0; width: 28px; flex: none; border-radius: 8px; font-size: .9rem; }
.cellcopy { display: flex; gap: 4px; align-items: stretch; }
.cellcopy input { min-width: 0; flex: 1; }

/* ---- Games ---- */
.gm-pn { display: inline-flex; align-items: center; gap: 8px; }
.gm-pn .pfp, .gm-pl .pfp { width: 26px; height: 26px; }
.gm-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--soft); }
.gm-ic { font-size: 1.3rem; }
.gm-rm { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gm-card { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass-flat); color: var(--ink); font: inherit; cursor: pointer; }
.gm-card:hover, .gm-card:focus-visible { border-color: var(--violet); background: var(--soft); }
.gm-big { font-size: 1.8rem; line-height: 1.1; }
.gm-tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.gm-tbl th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; }
.gm-tbl td { padding: 6px 8px; border-top: 1px solid var(--line); }
.gm-tbl tr.me td { background: rgba(169, 120, 255, 0.14); }
.gm-players { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.gm-pl { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; background: var(--soft); border: 2px solid transparent; }
.gm-pl.on { border-color: var(--green); }
.gm-pl.empty { opacity: 0.6; }
.gm-vs { color: var(--muted); }
.gm-status { text-align: center; font-weight: 600; margin: 0; }
.gm-status.go { color: var(--green); }
.gm-board-wrap { display: flex; justify-content: center; }
.gm-wait { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 0; }
.gm-room .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.gm-ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(320px, 100%); }
.gm-sq { aspect-ratio: 1; font-size: 2.6rem; font-weight: 800; border-radius: 16px; border: 1px solid var(--line); background: var(--glass-flat); color: var(--ink); cursor: pointer; }
.gm-sq.x { color: var(--pink); } .gm-sq.o { color: var(--blue); } .gm-sq.win { background: rgba(61, 242, 165, 0.25); }
.gm-sq:disabled, .gm-col:disabled, .gm-ck:disabled, .gm-cs:disabled, .gm-mc:disabled { cursor: default; }
.gm-c4 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 8px; border-radius: 18px; background: rgba(62, 90, 255, 0.35); width: min(380px, 100%); }
.gm-col { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer; }
.gm-col:not(:disabled):hover .gm-disc:not(.p0):not(.p1):first-child { background: rgba(255, 255, 255, 0.25); }
.gm-disc { aspect-ratio: 1; border-radius: 50%; background: rgba(10, 8, 22, 0.8); display: block; }
.gm-disc.p0 { background: var(--pink); } .gm-disc.p1 { background: var(--blue); }
.gm-disc.win { box-shadow: 0 0 0 3px var(--yellow); } .gm-disc.last { outline: 2px solid #fff; }
.gm-checkers, .gm-chess { display: grid; grid-template-columns: repeat(8, 1fr); width: min(440px, 100%); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.gm-ck, .gm-cs { aspect-ratio: 1; border: 0; padding: 0; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.10); cursor: pointer; position: relative; font: inherit; }
.gm-ck.dk, .gm-cs.dk { background: rgba(120, 80, 200, 0.55); }
.gm-ck:disabled:not(.dk) { opacity: 1; }
.gm-ck.sel, .gm-cs.sel { box-shadow: inset 0 0 0 3px var(--yellow); }
.gm-ck.dest::after, .gm-cs.dest::after { content: ''; width: 30%; height: 30%; border-radius: 50%; background: var(--green); opacity: 0.85; position: absolute; }
.gm-ck.last, .gm-cs.last { box-shadow: inset 0 0 0 2px rgba(255, 216, 74, 0.6); }
.gm-cs.chk { background: rgba(255, 84, 112, 0.7); }
.gm-pc { width: 76%; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--yellow); }
.gm-pc.red { background: var(--pink); } .gm-pc.blk { background: #1a1630; border: 2px solid var(--blue); }
.gm-cp { font-size: clamp(1.4rem, 7vw, 2.4rem); line-height: 1; }
.gm-cp.w { color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; } .gm-cp.b { color: #14102b; text-shadow: 0 0 2px #fff; }
.gm-mscore { display: flex; justify-content: space-around; font-weight: 700; }
.gm-mem { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: min(340px, 100%); margin: 0 auto; }
.gm-mc { aspect-ratio: 1; font-size: 2rem; border-radius: 14px; border: 1px solid var(--line); background: var(--btn-grad); color: #fff; cursor: pointer; }
.gm-mc.up { background: var(--glass-flat); } .gm-mc.done { opacity: 0.5; }
.gm-solo { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.gm-hud { display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; }
.gm-hud div { display: flex; flex-direction: column; align-items: center; }
.gm-2048 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: min(340px, 100%); padding: 8px; border-radius: 16px; background: rgba(255, 255, 255, 0.08); touch-action: none; outline: none; }
.gm-2048 .t { aspect-ratio: 1; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.4rem; background: rgba(255, 255, 255, 0.06); }
.gm-2048 .t2 { background: #5b4fa8; } .gm-2048 .t4 { background: #7a55c9; } .gm-2048 .t8 { background: #c0529f; } .gm-2048 .t16 { background: #d9546e; } .gm-2048 .t32 { background: #e07a3d; } .gm-2048 .t64 { background: #e5a032; color: #1a1630; } .gm-2048 .t128, .gm-2048 .t256 { background: #e8c93a; color: #1a1630; font-size: 1.2rem; } .gm-2048 .t512, .gm-2048 .t1024, .gm-2048 .t2048, .gm-2048 .tbig { background: var(--green); color: #0a0816; font-size: 1.05rem; }
.gm-pad { display: grid; grid-template-columns: repeat(4, auto); gap: 8px; }
.gm-react { width: min(420px, 100%); min-height: 240px; border-radius: 22px; border: 0; color: #fff; font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 16px; }
.gm-react b { font-size: 2rem; }
.gm-react.idle, .gm-react.done { background: #4a3d9a; } .gm-react.wait { background: #b8324f; } .gm-react.go { background: #1fbf7e; color: #04130c; } .gm-react.early { background: #c46a1c; }
.gm-wgrid { display: flex; flex-direction: column; gap: 6px; }
.gm-wrow { display: flex; gap: 6px; justify-content: center; }
.gm-wc { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.5rem; border: 2px solid var(--line); border-radius: 10px; }
.gm-wc.typed { border-color: var(--muted); }
.gm-wc.g, .gm-k.g { background: #1fbf7e; border-color: #1fbf7e; color: #04130c; } .gm-wc.y, .gm-k.y { background: #e5b52e; border-color: #e5b52e; color: #1a1630; } .gm-wc.x, .gm-k.x { background: rgba(255, 255, 255, 0.14); opacity: 0.7; }
.gm-kb { display: flex; flex-direction: column; gap: 6px; width: 100%; align-items: center; }
.gm-krow { display: flex; gap: 4px; justify-content: center; width: 100%; }
.gm-k { min-width: 0; flex: 1; max-width: 40px; height: 46px; border-radius: 8px; border: 0; background: var(--soft); color: var(--ink); font: 700 0.9rem var(--font-body); cursor: pointer; }
.gm-k.wide { max-width: 64px; font-size: 0.75rem; }
@media (max-width: 420px) { .gm-wc { width: 46px; height: 46px; } }

/* ---- Party games ---- */
.gm-score { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.gm-sc { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 12px; background: var(--soft); border: 2px solid transparent; font-size: 0.9rem; }
.gm-sc.on { border-color: var(--green); } .gm-sc .pfp { width: 24px; height: 24px; } .gm-sc span { color: var(--muted); }
.gm-final { margin: 0; padding-left: 20px; }
.gm-hword { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; min-height: 48px; }
.gm-hword span { min-width: 30px; text-align: center; font: 800 1.8rem var(--font-mono); border-bottom: 3px solid var(--violet); }
.gm-letters { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.gm-letters .gm-k { flex: none; width: 38px; max-width: none; }
.gm-called { display: flex; flex-direction: column; align-items: center; }
.gm-ball { font-size: 2.2rem; color: var(--yellow); }
.gm-chips { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.gm-chipn { padding: 2px 8px; border-radius: 999px; background: var(--soft); font-size: 0.85rem; }
.gm-bhead, .gm-bcard { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: min(340px, 100%); margin: 0 auto; }
.gm-bhead span { text-align: center; font-weight: 800; color: var(--pink); }
.gm-bc { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); background: var(--glass-flat); color: var(--ink); font: 700 1.1rem var(--font-body); cursor: pointer; }
.gm-bc.on { background: var(--btn-grad); color: #fff; } .gm-bc.hint { box-shadow: 0 0 0 2px var(--yellow); } .gm-bc.win { box-shadow: 0 0 0 3px var(--green); }
.gm-canvas { width: min(560px, 100%); aspect-ratio: 4 / 3; border-radius: 16px; border: 1px solid var(--line); background: #14102b; margin: 0 auto; display: block; touch-action: none; }
.gm-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.gm-sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; } .gm-sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--violet); }
.gm-guesses { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; text-align: center; color: var(--muted); }
.gm-opt { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass-flat); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.gm-opt.on { border-color: var(--green); }
.gm-bar { position: absolute; inset: 0 auto 0 0; background: rgba(169, 120, 255, 0.35); transition: width 0.3s; }
.gm-ot, .gm-opt b { position: relative; }
.gm-board-wrap > .stack { width: 100%; align-items: center; }
.gm-board-wrap { width: 100%; }
@media (max-width: 560px) { .gm-room .gm-chess, .gm-room .gm-checkers { width: 100%; } .gm-cp { font-size: clamp(1.6rem, 8.5vw, 2.6rem); } }
.gm-code { display: flex; gap: 8px; justify-content: center; }
.gm-code span { width: 44px; height: 58px; display: flex; align-items: center; justify-content: center; font: 800 2rem var(--font-mono); border-radius: 12px; background: var(--soft); border: 1px solid var(--line); color: var(--yellow); }
