/* =====================================================================
   Fortunate Youth · Community Hub — design system
   Warm "golden hour" identity: ink background, amber→rose accent, serif
   display headings over a clean sans body. Hairline borders, soft glows,
   generous rhythm, and restrained motion.
   ===================================================================== */
@font-face { font-family: 'Inter'; src: url('/font.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #0b0c10;
  --bg-2: #101218;
  --panel: #14161d;
  --panel-2: #1a1d26;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --fg: #f4f2ec;
  --muted: #a8a49a;
  --dim: #6f6c65;
  --amber: #f2b84b;
  --rose: #ef7d94;
  --grad: linear-gradient(115deg, #f2b84b 0%, #ef7d94 100%);
  --grad-soft: linear-gradient(115deg, rgba(242,184,75,.18), rgba(239,125,148,.18));
  --serif: ui-serif, Georgia, 'Times New Roman', 'Songti SC', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --r: 18px; --r-sm: 12px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .6);
  --ease: cubic-bezier(.22, .61, .36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--sans);
  min-height: 100vh; display: flex; flex-direction: column; font-size: 15.5px;
  line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: rgba(242, 184, 75, .32); }

/* ambient glow */
#bg { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(1100px 600px at 88% -12%, rgba(239, 125, 148, .10), transparent 55%),
    radial-gradient(900px 560px at -8% 8%, rgba(242, 184, 75, .09), transparent 55%),
    radial-gradient(700px 700px at 50% 120%, rgba(242, 184, 75, .05), transparent 60%),
    linear-gradient(180deg, #0b0c10, #0d0f14 60%, #0a0b0f);
}
#bg::after { content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px); background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%); opacity: .5; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 6px;
}
img { max-width: 100%; display: block; }

/* ================= header ================= */
#top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 22px;
  padding: 14px clamp(16px, 4vw, 44px);
  background: rgba(11, 12, 16, .7); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 16.5px; letter-spacing: -.01em; }
.brand .mark { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center;
  font-size: 19px; color: #1c1204; box-shadow: 0 6px 18px -6px rgba(239, 125, 148, .7); }
.brand img { width: 36px; height: 36px; border-radius: 11px; object-fit: cover; }
.brand .tag { margin-left: -6px; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); background: var(--panel-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
#nav { display: flex; gap: 2px; margin: 0 auto; }
#nav a { padding: 9px 15px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14.5px; transition: color .18s, background .18s; }
#nav a:hover { color: var(--fg); background: rgba(255,255,255,.05); }
#nav a.on { color: var(--fg); background: var(--grad-soft); box-shadow: inset 0 0 0 1px var(--line-2); }
#topRight { display: flex; gap: 8px; }
#burger { display: none; font-size: 20px; padding: 7px 11px; border-radius: 9px; color: var(--muted); }
#burger:hover { color: var(--fg); background: rgba(255,255,255,.06); }
#mnav { display: none; flex-direction: column; padding: 8px 16px 12px; background: rgba(11,12,16,.96); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line); position: sticky; top: 62px; z-index: 39; }
#mnav a { padding: 13px 8px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 15.5px; }
#mnav a:last-child { border: 0; }

.chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; font-size: 14.5px;
  font-weight: 700; display: inline-flex; align-items: center; gap: 8px; color: var(--fg); transition: transform .15s var(--ease), border-color .15s, background .15s; }
.chip:hover { border-color: var(--line-2); background: #1e222d; transform: translateY(-1px); }
.chip.pri { background: var(--grad); color: #241503; border: 0; box-shadow: 0 10px 26px -10px rgba(239, 125, 148, .7); }
.chip.pri:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(239, 125, 148, .8); }
.chip.sm { padding: 6px 13px; font-size: 13px; min-height: 32px; }
.chip.on { background: var(--grad-soft); border-color: rgba(242,184,75,.4); color: var(--amber); }

/* ================= layout ================= */
#main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 44px) 72px; }
.view { animation: rise .45s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
h1.pg { font-family: var(--serif); font-size: clamp(30px, 4.5vw, 44px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 4px 0 6px; }
.sub { color: var(--muted); font-size: 15.5px; }
h2.sec { font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin: 40px 0 16px; display: flex; align-items: center; gap: 12px; }
h2.sec::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.grid { display: grid; gap: 18px; }
.g3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.g2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 4px 11px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.pill.accent { background: var(--grad-soft); border-color: rgba(242,184,75,.35); color: var(--amber); }

/* ================= hero ================= */
.hero { position: relative; overflow: hidden; border-radius: 26px; padding: clamp(34px, 5vw, 64px); margin-bottom: 22px;
  background: linear-gradient(140deg, rgba(242,184,75,.13) 0%, rgba(239,125,148,.06) 34%, rgba(20,22,29,.9) 78%);
  border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.hero::before { content: ''; position: absolute; top: -120px; right: -80px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242,184,75,.25), transparent 62%); filter: blur(10px); }
.hero .tag { color: var(--amber); font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.hero h1 { font-family: var(--serif); font-size: clamp(38px, 6vw, 62px); font-weight: 700; letter-spacing: -.03em; line-height: 1.04; margin: 0 0 16px; }
.hero h1 em { font-style: italic; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.note { color: var(--muted); max-width: 620px; line-height: 1.7; font-size: 16.5px; }
.hero .chips { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero .chips .chip { padding: 12px 22px; font-size: 15px; }

/* stats */
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; }
.stat { flex: 1; min-width: 130px; background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 16px 20px; }
.stat b { font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; }
.stat span { font-size: 12.5px; color: var(--dim); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* ================= cards (news etc.) ================= */
.card { background: var(--panel); border-radius: var(--r); padding: 18px; border: 1px solid var(--line);
  transition: transform .22s var(--ease), border-color .22s, box-shadow .22s; }
.card:hover { border-color: var(--line-2); transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card { display: flex; flex-direction: column; gap: 12px; cursor: pointer; overflow: hidden; }
.post-card .cov { aspect-ratio: 16/9; border-radius: var(--r-sm); background: var(--panel-2) center/cover;
  border: 1px solid var(--line); position: relative; overflow: hidden; }
.post-card .cov::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(11,12,16,.35)); }
.post-card:hover .cov { transform: scale(1.03); }
.post-card h3 { font-size: 17.5px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.post-card .snip { color: var(--muted); font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .meta { display: flex; gap: 8px; align-items: center; color: var(--dim); font-size: 12.5px; font-weight: 600; margin-top: auto; }

/* article */
.article { max-width: 780px; margin: 0 auto; }
.article .cov { aspect-ratio: 16/8; border-radius: 20px; background: var(--panel-2) center/cover; margin: 22px 0; border: 1px solid var(--line); }
.article h1 { font-family: var(--serif); font-size: clamp(30px, 4.5vw, 46px); font-weight: 700; letter-spacing: -.02em; line-height: 1.12; }
.article .meta { color: var(--dim); font-size: 13.5px; font-weight: 600; margin: 12px 0 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.article .body { margin-top: 26px; line-height: 1.8; font-size: 17px; color: #e7e3da; }
.article .body h2 { font-family: var(--serif); font-size: 26px; margin: 30px 0 10px; letter-spacing: -.01em; }
.article .body h3 { font-size: 20px; margin: 24px 0 8px; }
.article .body p { margin: 14px 0; }
.article .body ul { margin: 14px 0 14px 24px; }
.article .body li { margin: 8px 0; }
.article .body li::marker { color: var(--amber); }
.article .body a { color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }
.article .body strong { color: var(--fg); }
.attach { display: flex; flex-direction: column; gap: 10px; margin-top: 30px; }
.attach a { display: flex; align-items: center; gap: 13px; background: var(--panel); border: 1px solid var(--line); padding: 14px 18px;
  border-radius: var(--r-sm); font-weight: 600; font-size: 14.5px; transition: border-color .15s, background .15s; }
.attach a:hover { background: var(--panel-2); border-color: var(--line-2); }
.attach .sz { color: var(--dim); font-size: 12.5px; margin-left: auto; white-space: nowrap; }

/* ================= docs ================= */
.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
.tree { background: var(--panel); border-radius: var(--r); padding: 12px; border: 1px solid var(--line); position: sticky; top: 78px; }
.tree .th { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 6px 10px 10px; }
.tnode { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); transition: background .15s, color .15s; }
.tnode:hover { background: var(--panel-2); color: var(--fg); }
.tnode.on { background: var(--grad-soft); color: var(--amber); }
.tnode .cnt { margin-left: auto; font-size: 11.5px; color: var(--dim); }
.searchbox { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; height: 46px; flex: 1; max-width: 420px; transition: border-color .15s; }
.searchbox:focus-within { border-color: rgba(242,184,75,.5); }
.searchbox input { flex: 1; background: none; border: 0; outline: 0; color: var(--fg); font-size: 15px; }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 13.5px; font-weight: 600; flex-wrap: wrap; }
.crumbs a:hover { color: var(--amber); }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 13px; }
.fcard { background: var(--panel); border-radius: var(--r-sm); padding: 16px; border: 1px solid var(--line); cursor: pointer; position: relative; transition: transform .18s var(--ease), border-color .18s, background .18s; }
.fcard:hover { background: var(--panel-2); border-color: var(--line-2); transform: translateY(-3px); }
.fcard .fi { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 22px; margin-bottom: 12px;
  background: var(--grad-soft); border: 1px solid var(--line); }
.fcard .fn { font-weight: 600; font-size: 14px; line-height: 1.35; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fcard .fm { color: var(--dim); font-size: 12px; margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.fcard .fm .dl { color: var(--muted); }
.fmenu { position: absolute; top: 10px; right: 10px; display: none; gap: 2px; }
.fcard:hover .fmenu, .fmenu:focus-within { display: flex; }
.fmenu button, .fmenu a.ib { width: 30px; height: 30px; border-radius: 8px; background: rgba(11,12,16,.85); display: grid; place-items: center; font-size: 14px; }
.fmenu button:hover, .fmenu a.ib:hover { background: var(--panel-2); }
.upzone { border: 2px dashed rgba(242, 184, 75, .4); border-radius: var(--r); padding: 30px; text-align: center; color: var(--muted); margin-top: 18px; transition: .18s; cursor: pointer; }
.upzone:hover { border-color: rgba(242,184,75,.7); color: var(--fg); }
.upzone.drag { background: rgba(242,184,75,.08); border-color: var(--amber); }
.upbar { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 13px 16px; margin-top: 10px; }
.upbar .bar { flex: 1; height: 6px; border-radius: 6px; background: var(--panel-2); overflow: hidden; }
.upbar .bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.upbar .pc { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.upbar.err .bar i { background: #e76a6a; }

/* ================= schedule ================= */
.cal { background: var(--panel); border-radius: var(--r); padding: 20px; border: 1px solid var(--line); }
.cal .ch { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal .ch b { font-family: var(--serif); font-size: 21px; }
.cal .ch .ib { width: 34px; height: 34px; border-radius: 9px; color: var(--muted); }
.cal .ch .ib:hover { color: var(--fg); background: var(--panel-2); }
.cal .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal .dow { text-align: center; font-size: 11px; font-weight: 800; color: var(--dim); text-transform: uppercase; padding: 6px 0; letter-spacing: .08em; }
.cal .day { aspect-ratio: 1; min-height: 46px; border-radius: 11px; background: var(--bg-2); padding: 7px 9px; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 4px; overflow: hidden; transition: background .15s; }
.cal .day:hover { background: var(--panel-2); }
.cal .day.dim2 { opacity: .32; }
.cal .day.today { box-shadow: inset 0 0 0 1.5px var(--amber); }
.cal .day.today { font-weight: 800; color: var(--amber); }
.cal .day .dots { display: flex; gap: 3px; flex-wrap: wrap; }
.cal .day .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }
.ev { display: flex; gap: 15px; background: var(--panel); border-radius: var(--r-sm); padding: 18px; border: 1px solid var(--line); cursor: pointer; align-items: flex-start; transition: border-color .18s, transform .18s; }
.ev:hover { border-color: var(--line-2); transform: translateY(-2px); }
.ev .dt { flex: none; width: 62px; text-align: center; border-radius: 13px; padding: 9px 4px; background: var(--grad-soft); border: 1px solid rgba(242,184,75,.2); }
.ev .dt b { display: block; font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1; color: var(--amber); }
.ev .dt span { font-size: 10.5px; font-weight: 800; text-transform: uppercase; color: var(--dim); letter-spacing: .08em; }
.ev h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.ev .where { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.ev .when { color: var(--dim); font-size: 12.5px; margin-top: 3px; font-weight: 600; }

/* ================= prose (about/support) ================= */
.prose { max-width: 760px; line-height: 1.8; font-size: 16.5px; color: #e7e3da; }
.prose p { margin: 14px 0; }
.prose h2 { font-family: var(--serif); font-size: 26px; margin: 28px 0 10px; }
.prose ul { margin: 14px 0 14px 24px; } .prose li { margin: 8px 0; }
.prose li::marker { color: var(--amber); }
.prose a { color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }
.soc { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.acct { display: flex; align-items: center; gap: 15px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px 20px; transition: border-color .15s; }
.acct:hover { border-color: var(--line-2); }
.acct .bk { font-weight: 800; font-size: 13px; color: var(--amber); min-width: 78px; letter-spacing: .02em; }
.acct .no { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.acct .nm { color: var(--dim); font-size: 12.5px; }
.acct .cp { margin-left: auto; }
.qris { max-width: 300px; border-radius: 18px; background: #fff; padding: 14px; margin: 24px 0 0; box-shadow: 0 14px 44px rgba(0,0,0,.45); }

/* ================= forms / admin ================= */
label.f { display: block; margin: 18px 0 7px; font-size: 13px; font-weight: 700; color: var(--muted); }
input.tx, textarea.tx, select.tx { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--fg); border-radius: 12px;
  padding: 12px 15px; font: inherit; font-size: 14.5px; outline: 0; transition: border-color .15s, box-shadow .15s; }
input.tx:focus, textarea.tx:focus { border-color: rgba(242,184,75,.6); box-shadow: 0 0 0 3px rgba(242,184,75,.12); }
textarea.tx { min-height: 120px; resize: vertical; line-height: 1.6; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.btn { background: var(--grad); color: #241503; border-radius: 12px; padding: 12px 24px; font-weight: 800; font-size: 14.5px; transition: transform .15s var(--ease), box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(239,125,148,.7); }
.btn.sec { background: var(--panel-2); color: var(--fg); border: 1px solid var(--line-2); box-shadow: none; }
.btn.sec:hover { background: #20242f; }
.btn.bad { background: rgba(231, 106, 106, .14); color: #f0a0a0; border: 1px solid rgba(231,106,106,.3); box-shadow: none; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; align-items: center; }
.login { max-width: 400px; margin: 9vh auto 0; background: var(--panel); border-radius: 22px; padding: 38px; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.login h2 { font-family: var(--serif); font-size: 26px; margin-bottom: 8px; }
.atabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 22px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.atabs button { padding: 9px 17px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); transition: .15s; }
.atabs button:hover { color: var(--fg); }
.atabs button.on { background: var(--grad-soft); color: var(--amber); }
.arow { display: flex; align-items: center; gap: 14px; padding: 15px 17px; background: var(--panel); border-radius: var(--r-sm); border: 1px solid var(--line); margin-bottom: 10px; flex-wrap: wrap; transition: border-color .15s; }
.arow:hover { border-color: var(--line-2); }
.arow .grow { flex: 1; min-width: 180px; }
.arow b { font-size: 15px; }
.arow .mm { color: var(--dim); font-size: 12.5px; font-weight: 600; }
.arow .acts { display: flex; gap: 4px; }
.ib { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); font-size: 15px; transition: .15s; }
.ib:hover { color: var(--fg); background: var(--panel-2); }
.ib.bad:hover { color: #f0a0a0; }
table.adm { width: 100%; border-collapse: collapse; font-size: 14px; }
table.adm th { text-align: left; color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 9px 12px; border-bottom: 1px solid var(--line-2); }
table.adm td { padding: 12px; border-bottom: 1px solid var(--line); }

/* ================= empty states ================= */
.empty { text-align: center; padding: 54px 24px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--muted); }
.empty .eic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; background: var(--grad-soft); display: grid; place-items: center; font-size: 30px; border: 1px solid var(--line-2); }
.empty h3 { font-family: var(--serif); font-size: 21px; color: var(--fg); margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: 14.5px; max-width: 420px; margin: 0 auto; }

/* ================= modal / toast ================= */
#modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(5, 6, 9, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 20px; }
.mbox { background: var(--panel); border-radius: 20px; padding: 28px; width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: rise .3s var(--ease); }
.mbox h3 { font-family: var(--serif); font-size: 22px; margin-bottom: 4px; }
.mbox .x { float: right; margin-top: -4px; }
.mbox.wide { max-width: min(96vw, 1000px); padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.mbox.wide .mh { padding: 15px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.mbox.wide .mc { padding: 18px 22px; overflow: auto; flex: 1; display: grid; place-items: center; min-height: 200px; }
.mbox.wide iframe { width: 100%; height: 74vh; border: 0; background: #fff; border-radius: 10px; }
.mbox.wide img { max-width: 100%; max-height: 74vh; border-radius: 10px; }
.mbox.wide video, .mbox.wide audio { width: 100%; }
#toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
#toast div { background: var(--panel-2); border: 1px solid var(--line-2); padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 14px; box-shadow: 0 12px 34px rgba(0,0,0,.5); animation: rise .25s var(--ease); }
#toast div.err { border-color: rgba(231,106,106,.5); color: #f0a0a0; }
#overlay { position: fixed; inset: 0; z-index: 70; background: rgba(5,6,9,.75); display: grid; place-items: center; }
#overlay .box { text-align: center; font-weight: 700; }

/* ================= footer ================= */
#foot { border-top: 1px solid var(--line); padding: 30px clamp(16px, 4vw, 44px); text-align: center; color: var(--dim); font-size: 13.5px; }
#footSocials { display: flex; gap: 18px; justify-content: center; margin-bottom: 12px; }
#footSocials a { color: var(--muted); font-weight: 600; transition: color .15s; }
#footSocials a:hover { color: var(--amber); }
#foot a { color: var(--muted); }

/* ================= responsive ================= */
@media (max-width: 920px) {
  #top { gap: 12px; }
  #nav { display: none; }
  #burger { display: block; margin-left: auto; }
  #topRight { margin-left: 0; flex: none; }
  .brand .tag { display: none; }
  .brand { min-width: 0; }
  #brandName { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #mnav.open { display: flex; }
  .docs { grid-template-columns: 1fr; }
  .tree { position: static; }
  .row2 { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  #adminBtn { padding: 8px 12px; font-size: 13px; }
  .brand { gap: 9px; }
  .brand .mark { width: 32px; height: 32px; }
}
@media (max-width: 560px) {
  .ev .dt { width: 56px; }
  .cal .day { min-height: 40px; font-size: 12px; }
  .fgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .stat { min-width: 45%; }
}
@media (prefers-reduced-motion: reduce) { .view, .mbox, #toast div { animation: none; } .card, .chip, .btn, .fcard, .ev { transition: none; } }
