*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
:root {
  /* Cozy cream + navy palette, sky-blue accent */
  --bg:#fbf6ee; --bg2:#fffdf9; --bg3:#f3ebdd;
  --surface:#ffffff; --surface2:#f3ebdd;
  --border:#ebe2d2; --border2:#d9cdb8;
  --accent:#2f6fb3; --accent2:#1f5c99; --accent3:#2f6fb3; --accent-soft:#dbe9f7;
  --navy:#2b2238; --butter:#ffd89a; --blush:#f6dde3; --mint:#d9efe5; --lavender:#e9e0f8;
  --text:#2b2238; --text2:#4a4157; --text3:#675d73;
  --gold:#9a6b00; --teal:#1f7a5a; --coral:#c2413a;
  --font:'Figtree',system-ui,sans-serif; --display:'Fredoka','Figtree',system-ui,sans-serif; --mono:'Figtree',system-ui,sans-serif;
  --site-bg:#fbf6ee;
  --radius-lg:28px; --radius-xl:40px;
  /* theme-aware roles (redefined for dark mode below) */
  --ink:#2b2238; --on-navy:#fbf6ee; --accent-text:#2f6fb3;
  --danger-soft:#fbe3e1; --nav-bg:rgba(251,246,238,0.92);
  --page-bg:var(--site-bg); --tile-mix:100%;
  color-scheme:light;
}

/* ── DARK MODE ── set by the toggle (data-theme on <html>) ── */
:root[data-theme="dark"] {
  --bg:#17121f; --bg2:#1e1829; --bg3:#261f33;
  --surface:#221b2e; --surface2:#2e2640;
  --border:#342b45; --border2:#4a3f5e;
  --accent:#2f6fb3; --accent2:#8dbdf0; --accent3:#2f6fb3; --accent-soft:#1d2d44;
  --accent-text:#8dbdf0;
  --navy:#30264a; --butter:#4a3b22; --blush:#40262f; --mint:#193a2e; --lavender:#2f2747;
  --text:#f3eee6; --text2:#d3cadf; --text3:#ab9fbb;
  --ink:#f3eee6; --on-navy:#fbf6ee;
  --gold:#e8b84a; --teal:#5cc9a0; --coral:#f08a82;
  --danger-soft:#43242a; --nav-bg:rgba(23,18,31,0.92);
  --page-bg:var(--bg); --tile-mix:28%;
  color-scheme:dark;
}
:root[data-theme="dark"] .member-tile { background:color-mix(in srgb,var(--tile,#dbe9f7) var(--tile-mix),var(--surface2)) !important; }
:root[data-theme="dark"] .join-section { background:#0f0c16; }
:root[data-theme="dark"] .founder-photo img { border-color:#fbf6ee; }
:root[data-theme="dark"] .form-group input::placeholder,
:root[data-theme="dark"] .form-group textarea::placeholder,
:root[data-theme="dark"] .fg input::placeholder,
:root[data-theme="dark"] .fg textarea::placeholder,
:root[data-theme="dark"] .dash-search::placeholder { color:#8d82a0; }

/* ── THEME TOGGLE ── */
.theme-toggle { width:44px; height:44px; flex-shrink:0; border-radius:999px; border:2px solid var(--border2); background:var(--surface); color:var(--ink); display:inline-flex; align-items:center; justify-content:center; cursor:pointer; transition:border-color .2s,background .2s; padding:0; }
.theme-toggle:hover { border-color:var(--ink); }
.theme-toggle .icon-sun { display:none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display:block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display:none; }
html { scroll-behavior:smooth; scroll-padding-top:80px; }
body { font-family:var(--font); background:var(--page-bg); color:var(--text); min-height:100vh; overflow-x:hidden; transition:background 0.4s; line-height:1.5; }
a { color:inherit; }
img { max-width:100%; }
:focus-visible { outline:3px solid var(--accent); outline-offset:3px; border-radius:8px; }

/* ── VIEWS ── */
#view-home    { display:block; }
#view-profile { display:none;  }

/* ── BUTTONS ── */
.btn-pill { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:0 22px; border-radius:999px; font-family:var(--font); font-weight:700; font-size:0.95rem; text-decoration:none; cursor:pointer; border:2px solid transparent; transition:background .2s,color .2s,border-color .2s,transform .1s; }
.btn-pill:active { transform:scale(.97); }
.btn-primary { background:var(--accent); color:#fff; }
.btn-primary:hover { background:var(--accent2); }
.btn-light { background:var(--surface); color:var(--ink); }
.btn-light:hover { background:var(--accent-soft); }
.btn-outline { background:transparent; color:var(--ink); border-color:var(--ink); }
.btn-outline:hover { background:var(--navy); color:var(--on-navy); }
.btn-dark { background:var(--navy); color:var(--on-navy); }
.btn-dark:hover { background:#3d3150; }
.btn-butter { background:var(--butter); color:var(--ink); }
.btn-butter:hover { background:#ffcb70; }

/* ── NAV ── */
nav { position:sticky; top:0; z-index:50; display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:0 clamp(16px,4vw,56px); min-height:68px; background:var(--nav-bg); backdrop-filter:blur(14px); border-bottom:1px solid transparent; }
.nav-logo { display:flex; align-items:center; gap:10px; font-family:var(--display); font-size:1.3rem; font-weight:700; color:var(--ink); cursor:pointer; text-decoration:none; background:none; border:none; letter-spacing:-0.01em; white-space:nowrap; }
.nav-logo img { width:40px; height:40px; object-fit:contain; }
.nav-right { display:flex; align-items:center; gap:1.25rem; }
.nav-links { display:flex; gap:1.9rem; list-style:none; }
.nav-links a { color:var(--ink); text-decoration:none; font-size:0.92rem; font-weight:600; transition:color 0.2s; }
.nav-links a:hover { color:var(--accent2); }
.nav-cta { min-height:42px; padding:0 18px; font-size:0.9rem; }
.admin-status { display:flex; align-items:center; gap:8px; font-size:0.8rem; font-weight:600; }
.admin-dot { width:8px; height:8px; border-radius:50%; background:#b3a9bd; transition:background 0.3s; }
.admin-dot.active { background:var(--teal); box-shadow:0 0 0 3px rgba(31,122,90,0.18); }
.admin-label { color:var(--text3); transition:color 0.3s; }
.admin-label.active { color:var(--teal); }
.btn-nav { min-height:40px; padding:0 16px; font-size:0.85rem; font-weight:700; font-family:var(--font); background:transparent; border:2px solid var(--border2); border-radius:999px; color:var(--ink); cursor:pointer; transition:all 0.2s; }
.btn-nav:hover { border-color:var(--ink); }
.btn-nav.logout { border-color:rgba(194,65,58,0.4); color:var(--coral); }
.btn-nav.logout:hover { background:rgba(194,65,58,0.08); }
.btn-nav.dashboard { border-color:var(--accent-text); color:var(--accent2); }
.btn-nav.dashboard:hover { background:var(--accent-soft); }

/* ── ADMIN BANNER ── */
.admin-banner { background:var(--mint); padding:0.6rem clamp(16px,5vw,80px); display:none; align-items:center; justify-content:space-between; gap:1rem; font-size:0.85rem; font-weight:600; color:var(--teal); flex-wrap:wrap; }
.admin-banner.visible { display:flex; }

/* ── SHARED SECTION TYPE ── */
.eyebrow { font-size:0.8rem; font-weight:700; letter-spacing:0.14em; text-transform:uppercase; color:var(--accent-text); }
.section-h2 { font-family:var(--display); font-weight:700; font-size:clamp(1.9rem,3.6vw,2.8rem); line-height:1.05; letter-spacing:-0.01em; color:var(--ink); }
.section-lede { font-size:1.15rem; line-height:1.6; color:var(--text2); max-width:640px; }

/* ── HERO ── */
.hero { max-width:1240px; width:calc(100% - clamp(0px,5vw,80px)); margin:12px auto 0; padding:clamp(40px,5vw,64px) clamp(16px,4.5vw,64px) clamp(44px,5.5vw,72px); border-radius:var(--radius-xl); background:var(--accent-soft); display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:44px; align-items:center; }
.hero-content { display:flex; flex-direction:column; gap:26px; align-items:flex-start; }
.hero-pill { display:inline-flex; align-items:center; gap:10px; padding:8px 16px; border-radius:999px; background:var(--surface); font-size:0.9rem; font-weight:600; color:var(--ink); }
.hero-pill svg { color:var(--accent-text); flex-shrink:0; }
.hero h1 { font-family:var(--display); font-weight:700; font-size:clamp(2.4rem,4.8vw,4.3rem); line-height:1; letter-spacing:-0.02em; color:var(--ink); }
.hero h1 span { color:var(--accent-text); }
.hero p { font-size:clamp(1rem,1.3vw,1.12rem); line-height:1.55; color:var(--text2); max-width:540px; }
.hero-actions { display:flex; gap:14px; flex-wrap:wrap; }
.hero-actions .btn-pill { min-height:48px; padding:0 24px; font-size:0.98rem; }
.hero-art { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.hero-art-main { grid-column:span 2; min-height:190px; border-radius:var(--radius-lg); background:transparent; display:flex; align-items:center; justify-content:center; padding:24px; }
.hero-art-main img { width:min(200px,60%); height:auto; filter:drop-shadow(0 10px 24px rgba(43,34,56,.22)); animation:float 5s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.hero-stat { padding:20px 22px; border-radius:var(--radius-lg); display:flex; flex-direction:column; gap:6px; }
.hero-stat strong { font-family:var(--display); font-weight:700; font-size:clamp(2rem,3vw,2.6rem); line-height:1; }
.hero-stat span { font-size:1rem; }
.hero-stat.dark { background:var(--navy); color:var(--on-navy); }
.hero-stat.warm { background:var(--butter); color:var(--ink); }

/* ── WHAT WE DO ── */
.help-section { max-width:1240px; margin:0 auto; padding:clamp(56px,6vw,80px) clamp(16px,4.5vw,64px) 24px; display:flex; flex-direction:column; gap:32px; }
.section-head { display:flex; flex-direction:column; gap:14px; max-width:780px; }
.help-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:22px; }
.help-card { padding:24px; border-radius:var(--radius-lg); background:var(--surface); display:flex; flex-direction:column; gap:10px; min-height:0; }
.help-num { width:44px; height:44px; border-radius:14px; background:var(--accent-soft); display:flex; align-items:center; justify-content:center; font-family:var(--display); font-weight:700; font-size:1.2rem; color:var(--accent2); }
.help-card h3 { font-family:var(--display); font-weight:600; font-size:1.25rem; color:var(--ink); }
.help-card p { font-size:0.95rem; line-height:1.55; color:var(--text2); }

/* ── FOUNDER ── */
.founder-section { max-width:1240px; margin:0 auto; padding:56px clamp(16px,4.5vw,64px); display:grid; grid-template-columns:minmax(0,340px) minmax(0,1fr); gap:48px; align-items:center; }
.founder-photo { aspect-ratio:1/1; background:transparent; display:flex; align-items:center; justify-content:center; }
.founder-photo img { width:92%; height:auto; aspect-ratio:1/1; object-fit:cover; border-radius:999px; border:6px solid var(--surface); filter:drop-shadow(0 10px 24px rgba(43,34,56,.22)); }
.founder-text { display:flex; flex-direction:column; gap:22px; align-items:flex-start; }
.founder-text p { font-size:1.05rem; line-height:1.6; color:var(--text2); max-width:640px; }
.founder-links { display:flex; gap:12px; flex-wrap:wrap; }

/* ── TEAM SECTION ── */
.section { max-width:1240px; margin:0 auto; padding:56px clamp(16px,4.5vw,64px); }
.section-header { display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:28px; flex-wrap:wrap; gap:1rem; }
.section-title { font-family:var(--display); font-weight:700; font-size:clamp(1.9rem,3.6vw,2.8rem); line-height:1.05; color:var(--ink); }
.section-title .badge { display:inline-block; padding:2px 16px; border-radius:999px; background:var(--navy); color:var(--on-navy); font-size:0.5em; vertical-align:middle; margin-left:6px; font-weight:600; }
.btn-add { display:flex; align-items:center; gap:6px; min-height:46px; padding:0 22px; background:var(--accent); color:#fff; border:none; border-radius:999px; font-size:0.95rem; font-weight:700; font-family:var(--font); cursor:pointer; transition:background 0.2s,transform 0.1s; }
.btn-add:hover { background:var(--accent2); }
.btn-add:active { transform:scale(0.97); }
.admin-hint { font-size:0.85rem; color:var(--text3); display:flex; align-items:center; gap:6px; min-height:44px; padding:0 16px; border:2px dashed var(--border2); border-radius:999px; cursor:pointer; transition:border-color 0.2s,color 0.2s; background:none; font-family:var(--font); }
.admin-hint:hover { border-color:var(--accent-text); color:var(--accent2); }

/* ── TEAM GRID ── */
.team-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:18px; align-items:start; }
.member-card { background:var(--surface); border:2px solid transparent; border-radius:var(--radius-lg); padding:18px; display:flex; flex-direction:column; gap:14px; position:relative; cursor:pointer; transition:transform 0.2s,box-shadow 0.2s; animation:fadeIn 0.3s ease both; text-align:left; }
@keyframes fadeIn { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
.member-card:hover { transform:translateY(-4px); box-shadow:0 14px 34px rgba(43,34,56,0.10); }
.member-card:hover .card-actions,.member-card:focus-within .card-actions { opacity:1; }
.member-tile { height:148px; border-radius:18px; display:flex; align-items:center; justify-content:center; background:var(--accent-soft); }
.member-card .avatar { width:96px; height:96px; margin:0; font-size:44px; border-width:5px; border-color:var(--surface) !important; background-clip:padding-box; }
.card-actions { position:absolute; top:26px; right:26px; display:flex; gap:6px; opacity:0; transition:opacity 0.15s; z-index:2; }
.card-btn { width:34px; height:34px; border-radius:50%; border:none; font-size:14px; cursor:pointer; padding:0; font-family:var(--font); transition:background 0.15s; display:flex; align-items:center; justify-content:center; box-shadow:0 2px 8px rgba(43,34,56,0.15); }
.card-btn-remove { background:var(--surface); color:var(--coral); }
.card-btn-remove:hover { background:var(--danger-soft); }
.card-btn-edit { background:var(--surface); color:var(--accent2); }
.card-btn-edit:hover { background:var(--accent-soft); }
.avatar { width:60px; height:60px; border-radius:50%; margin:0 auto 0.75rem; display:flex; align-items:center; justify-content:center; font-size:26px; border:2px solid var(--border2); overflow:hidden; background:var(--surface); }
.avatar img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
.member-name { font-family:var(--display); font-size:1.15rem; font-weight:600; color:var(--ink); word-break:break-word; line-height:1.2; padding:0 4px; }
.member-role { font-size:0.9rem; color:var(--text3); line-height:1.4; }

/* ── JOIN ── */
.join-section { max-width:1240px; width:calc(100% - clamp(0px,5vw,80px)); margin:24px auto 56px; padding:clamp(36px,5vw,56px) clamp(16px,4.5vw,64px); border-radius:var(--radius-xl); background:var(--navy); color:var(--on-navy); display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:44px; align-items:center; }
.join-section .eyebrow { color:#ffd89a; }
.join-section h2 { font-family:var(--display); font-weight:700; font-size:clamp(2rem,3.8vw,3.1rem); line-height:1.04; }
.join-copy { display:flex; flex-direction:column; gap:22px; align-items:flex-start; }
.join-copy p { font-size:1.02rem; line-height:1.6; color:#ddd6e6; max-width:520px; }
.join-steps { list-style:none; display:flex; flex-direction:column; gap:12px; font-size:1.05rem; }
.join-steps li { display:flex; align-items:center; gap:12px; }
.join-steps li::before { content:''; width:10px; height:10px; border-radius:999px; background:#ffd89a; flex-shrink:0; }
.join-card { padding:28px; border-radius:var(--radius-lg); background:var(--bg); color:var(--ink); display:flex; flex-direction:column; gap:18px; align-items:flex-start; }
.join-card h3 { font-family:var(--display); font-weight:700; font-size:1.45rem; }
.join-card p { color:var(--text2); font-size:1.05rem; line-height:1.6; }
.join-status { display:inline-flex; align-items:center; gap:8px; padding:6px 14px; border-radius:999px; font-weight:700; font-size:0.9rem; background:var(--mint); color:var(--teal); }
.join-status::before { content:''; width:8px; height:8px; border-radius:999px; background:currentColor; }
.join-status.closed { background:var(--danger-soft); color:var(--coral); }

/* ── FOOTER ── */
footer { max-width:1240px; margin:0 auto; padding:28px clamp(16px,4.5vw,64px); display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; font-size:0.95rem; color:var(--text3); }
footer .footer-links { display:flex; gap:28px; font-weight:600; flex-wrap:wrap; }
footer a { color:var(--ink); text-decoration:none; }
footer a:hover { color:var(--accent2); }

/* ══════════════════════════════════════
   PROFILE PAGE
══════════════════════════════════════ */
.profile-page { max-width:900px; margin:0 auto; padding:2.5rem clamp(16px,4vw,40px) 5rem; animation:fadeIn 0.25s ease; }
.profile-back { display:inline-flex; align-items:center; gap:7px; min-height:44px; font-size:0.95rem; font-weight:700; font-family:var(--font); color:var(--ink); cursor:pointer; padding:0 18px; border:2px solid var(--border2); border-radius:999px; margin-bottom:2rem; transition:color 0.2s,border-color 0.2s; background:transparent; }
.profile-back:hover { color:var(--accent2); border-color:var(--accent-text); }
.profile-hero { background:var(--surface); border:2px solid transparent; border-radius:var(--radius-lg); padding:2.5rem; display:flex; gap:2rem; align-items:center; flex-wrap:wrap; position:relative; overflow:hidden; margin-bottom:1.25rem; }
.profile-hero::before { content:''; position:absolute; top:0; left:0; right:0; height:6px; }
.profile-avatar { width:130px; height:130px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:3.6rem; border:6px solid var(--accent-soft); overflow:hidden; flex-shrink:0; background:var(--surface); }
.profile-avatar img { width:100%; height:100%; object-fit:cover; }
.profile-meta { flex:1; min-width:180px; }
.profile-name { font-family:var(--display); font-size:clamp(2rem,5vw,2.8rem); font-weight:700; line-height:1.05; margin-bottom:0.3rem; color:var(--ink); }
.profile-role-tag { display:inline-block; font-size:0.85rem; color:var(--accent2); background:var(--accent-soft); padding:3px 12px; border-radius:999px; margin-bottom:1rem; }
.profile-admin-btns { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.profile-card { background:var(--surface); border-radius:24px; padding:1.75rem 2rem; margin-bottom:1rem; }
.profile-card-title { font-size:0.85rem; font-weight:700; color:var(--accent-text); text-transform:uppercase; letter-spacing:0.14em; margin-bottom:1rem; }
.profile-bio { font-size:1.08rem; color:var(--text2); line-height:1.75; white-space:pre-wrap; word-break:break-word; }
.profile-empty { font-size:0.95rem; color:var(--text3); font-style:italic; }

/* LINKS */
.profile-links-list { display:flex; flex-direction:column; gap:10px; }
.profile-link { display:flex; align-items:center; gap:14px; min-height:52px; padding:10px 18px; background:var(--bg); border:2px solid transparent; border-radius:16px; text-decoration:none; color:var(--ink); transition:border-color 0.2s,background 0.2s; }
.profile-link:hover { border-color:var(--accent-text); background:var(--accent-soft); }
.profile-link-icon { font-size:1.2rem; width:24px; text-align:center; flex-shrink:0; }
.profile-link-label { font-size:0.95rem; font-weight:700; min-width:84px; flex-shrink:0; }
.profile-link-url { font-size:0.92rem; color:var(--text3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ── OVERLAYS ── */
.overlay { display:none; position:fixed; inset:0; background:rgba(43,34,56,0.45); backdrop-filter:blur(6px); z-index:200; align-items:center; justify-content:center; }
.overlay.open { display:flex; }

/* ── MODALS ── */
.modal { background:var(--bg2); border:1px solid var(--border); border-radius:28px; padding:2rem; width:100%; max-width:500px; margin:1rem; animation:modalIn 0.2s ease; max-height:92vh; overflow-y:auto; scrollbar-width:thin; scrollbar-color:var(--border2) transparent; box-shadow:0 30px 70px rgba(43,34,56,0.25); }
.modal::-webkit-scrollbar { width:6px; }
.modal::-webkit-scrollbar-thumb { background:var(--border2); border-radius:99px; }
@keyframes modalIn { from{opacity:0;transform:scale(0.95) translateY(10px)} to{opacity:1;transform:scale(1) translateY(0)} }
.modal h3 { font-family:var(--display); font-size:1.6rem; font-weight:700; margin-bottom:0.3rem; color:var(--ink); }
.modal-sub { font-size:0.9rem; color:var(--text3); margin-bottom:1.5rem; }
.form-group { margin-bottom:1.1rem; }
.form-group label { display:block; font-size:0.85rem; font-weight:700; color:var(--ink); margin-bottom:6px; }
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group textarea { width:100%; padding:12px 14px; font-size:1rem; background:var(--surface); border:2px solid var(--border2); border-radius:14px; color:var(--text); font-family:var(--font); outline:none; transition:border-color 0.2s; resize:vertical; }
.form-group input:focus,.form-group textarea:focus { border-color:var(--accent-text); }
.form-group input::placeholder,.form-group textarea::placeholder { color:#948aa0; }
.form-group input[type="password"] { letter-spacing:0.12em; }
.form-group textarea { min-height:90px; line-height:1.6; }
.error-msg { font-size:0.85rem; color:var(--coral); margin-top:6px; min-height:18px; font-weight:600; }
.modal-actions { display:flex; gap:0.75rem; justify-content:flex-end; margin-top:1.5rem; flex-wrap:wrap; }
.btn-cancel { min-height:44px; padding:0 20px; background:transparent; border:2px solid var(--border2); border-radius:999px; color:var(--ink); font-size:0.95rem; font-family:var(--font); font-weight:700; cursor:pointer; transition:background 0.15s,border-color .15s; }
.btn-cancel:hover { border-color:var(--ink); }
.btn-confirm { min-height:44px; padding:0 22px; background:var(--accent); border:none; border-radius:999px; color:#fff; font-size:0.95rem; font-family:var(--font); font-weight:700; cursor:pointer; transition:background 0.15s; }
.btn-confirm:hover { background:var(--accent2); }
.btn-confirm:disabled { opacity:.6; cursor:not-allowed; }

/* ── LINKS EDITOR ── */
.links-editor { display:flex; flex-direction:column; gap:8px; }
.link-row { display:grid; grid-template-columns:100px 1fr 34px; gap:6px; align-items:center; }
.link-row input { padding:10px 12px; font-size:0.92rem; background:var(--surface); border:2px solid var(--border2); border-radius:12px; color:var(--text); font-family:var(--font); outline:none; width:100%; }
.link-row input:focus { border-color:var(--accent-text); }
.link-row input::placeholder { color:#948aa0; }
.link-del-btn { width:32px; height:32px; border-radius:50%; background:var(--danger-soft); border:none; color:var(--coral); font-size:14px; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:background 0.15s; }
.link-del-btn:hover { background:#f6cdc9; }
.btn-add-link { display:inline-flex; align-items:center; gap:5px; min-height:38px; padding:0 16px; font-size:0.88rem; font-weight:700; font-family:var(--font); background:transparent; border:2px dashed var(--border2); border-radius:999px; color:var(--text2); cursor:pointer; transition:border-color 0.15s,color 0.15s; margin-top:6px; }
.btn-add-link:hover { border-color:var(--accent-text); color:var(--accent2); }
.link-row-head { display:grid; grid-template-columns:100px 1fr 34px; gap:6px; margin-bottom:2px; }
.link-row-head span { font-size:0.78rem; font-weight:600; color:var(--text3); padding-left:2px; }

/* ── AVATAR TOGGLE ── */
.avatar-toggle { display:flex; background:var(--surface2); border-radius:999px; padding:4px; margin-bottom:1rem; }
.avatar-toggle-btn { flex:1; min-height:38px; font-size:0.9rem; font-weight:700; font-family:var(--font); background:transparent; border:none; border-radius:999px; color:var(--text2); cursor:pointer; transition:background 0.15s,color 0.15s; }
.avatar-toggle-btn.active { background:var(--navy); color:var(--on-navy); }

/* ── PHOTO UPLOAD ── */
.photo-upload-area { position:relative; border:2px dashed var(--border2); border-radius:20px; padding:1.5rem 1rem; text-align:center; cursor:pointer; transition:border-color 0.2s,background 0.2s; background:var(--surface); }
.photo-upload-area:hover,.photo-upload-area.drag-over { border-color:var(--accent-text); background:var(--accent-soft); }
.photo-upload-area input[type="file"] { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; height:100%; }
.photo-preview-wrap { position:relative; display:inline-block; }
.photo-preview { width:88px; height:88px; border-radius:50%; object-fit:cover; border:3px solid var(--accent-soft); display:block; margin:0 auto 0.5rem; }
.photo-preview-placeholder { width:88px; height:88px; border-radius:50%; background:var(--surface2); display:flex; align-items:center; justify-content:center; font-size:2rem; margin:0 auto 0.5rem; }
.photo-upload-label { font-size:0.9rem; color:var(--text2); font-weight:600; }
.photo-upload-hint { font-size:0.8rem; color:var(--text3); margin-top:4px; }
.photo-clear-btn { position:absolute; top:-4px; right:-4px; width:26px; height:26px; border-radius:50%; background:var(--coral); border:none; color:#fff; font-size:12px; cursor:pointer; display:flex; align-items:center; justify-content:center; z-index:2; }

/* ── EMOJI + ACCENT COLORS ── */
.emoji-grid { display:grid; grid-template-columns:repeat(8,1fr); gap:4px; margin-top:6px; }
.emoji-btn { padding:6px; font-size:1.15rem; border:2px solid transparent; border-radius:12px; cursor:pointer; background:var(--surface); line-height:1; transition:border-color 0.15s,background 0.15s; }
.emoji-btn:hover { background:var(--surface2); }
.emoji-btn.selected { border-color:var(--accent-text); background:var(--accent-soft); }
.color-row { display:flex; gap:8px; flex-wrap:wrap; margin-top:6px; }
.color-dot { width:28px; height:28px; border-radius:50%; cursor:pointer; border:3px solid transparent; transition:transform 0.15s; }
.color-dot:hover { transform:scale(1.12); }
.color-dot.selected { border-color:#fff; box-shadow:0 0 0 2px var(--ink); }

/* ── CARD BG SWATCHES ── */
.swatch-row { display:flex; gap:8px; flex-wrap:wrap; margin-top:6px; align-items:center; }
.swatch { width:32px; height:32px; border-radius:10px; cursor:pointer; border:2px solid var(--border); transition:transform 0.15s,box-shadow 0.15s; flex-shrink:0; }
.swatch:hover { transform:scale(1.1); }
.swatch.selected { box-shadow:0 0 0 3px var(--ink); }
.swatch-custom { width:32px; height:32px; border-radius:10px; border:2px solid var(--border2); cursor:pointer; overflow:hidden; position:relative; flex-shrink:0; }
.swatch-custom input[type="color"] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; border:none; padding:0; }
.swatch-custom-fill { width:100%; height:100%; border-radius:7px; pointer-events:none; }

/* ── DASHBOARD ── */
.dashboard-modal { background:var(--bg2); border:1px solid var(--border); border-radius:32px; width:100%; max-width:920px; margin:1rem; animation:modalIn 0.22s ease; max-height:92vh; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 30px 80px rgba(43,34,56,0.28); }
.dashboard-header { padding:1.5rem 2rem 1.25rem; flex-shrink:0; display:flex; justify-content:space-between; align-items:center; background:var(--accent-soft); }
.dashboard-header h3 { font-family:var(--display); font-size:1.7rem; font-weight:700; color:var(--ink); }
.dashboard-header p { font-size:0.88rem; color:var(--text2); margin-top:2px; }
.dashboard-close { width:44px; height:44px; background:var(--surface); border:none; border-radius:999px; color:var(--ink); font-size:1rem; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background 0.15s, color 0.15s; }
.dashboard-close:hover { background:var(--danger-soft); color:var(--coral); }

.dash-tabs { display:flex; gap:6px; flex-shrink:0; padding:1rem 2rem 0; flex-wrap:wrap; }
.dash-tab { min-height:40px; padding:0 18px; font-size:0.9rem; font-weight:700; font-family:var(--font); background:transparent; border:2px solid var(--border2); border-radius:999px; color:var(--ink); cursor:pointer; transition:color 0.15s, background 0.15s, border-color 0.15s; }
.dash-tab.active { color:var(--on-navy); background:var(--navy); border-color:var(--ink); }
.dash-tab:hover:not(.active) { border-color:var(--ink); }

.dash-panel-toolbar { flex-shrink:0; padding:1rem 2rem 0; display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.dash-panel { display:none; flex:1; flex-direction:column; min-height:0; }
.dash-panel.active { display:flex; }

.dashboard-body { flex:1; overflow-y:auto; padding:1rem 2rem 1.5rem; min-height:0; scrollbar-width:thin; scrollbar-color:var(--border2) transparent; }
.dashboard-body::-webkit-scrollbar { width:6px; }
.dashboard-body::-webkit-scrollbar-track { background:transparent; }
.dashboard-body::-webkit-scrollbar-thumb { background:var(--border2); border-radius:99px; }

.dash-member-row { display:flex; align-items:center; gap:14px; padding:10px 12px; border-radius:16px; margin-bottom:4px; transition:background 0.15s; }
.dash-member-row:hover { background:var(--surface); }
.dash-member-row:last-child { margin-bottom:0; }
.dash-avatar { width:44px; height:44px; border-radius:50%; overflow:hidden; flex-shrink:0; border:2px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:1.25rem; background:var(--surface); }
.dash-avatar img { width:100%; height:100%; object-fit:cover; }
.dash-member-id { font-size:0.75rem; font-weight:700; color:var(--text3); background:var(--surface2); border-radius:999px; padding:2px 8px; flex-shrink:0; }
.dash-info { flex:1; min-width:0; }
.dash-name { font-size:1rem; font-weight:700; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dash-role { font-size:0.82rem; color:var(--text3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:1px; }

.dash-actions { display:flex; gap:6px; flex-shrink:0; }
.dash-btn { min-height:36px; padding:0 14px; font-size:0.85rem; font-weight:700; font-family:var(--font); border-radius:999px; cursor:pointer; border:2px solid; transition:background 0.15s, transform 0.1s; }
.dash-btn:active { transform:scale(0.96); }
.dash-btn-edit { background:var(--accent-soft); border-color:var(--accent-soft); color:var(--accent2); }
.dash-btn-edit:hover { border-color:var(--accent-text); }
.dash-btn-del { background:var(--danger-soft); border-color:var(--danger-soft); color:var(--coral); }
.dash-btn-del:hover { border-color:var(--coral); }

/* ── APPEARANCE PANEL ── */
.appear-section { margin-bottom:2rem; }
.appear-section h4 { font-family:var(--display); font-size:1.2rem; font-weight:600; color:var(--ink); margin-bottom:0.25rem; }
.appear-section p { font-size:0.9rem; color:var(--text3); margin-bottom:0.9rem; }
.theme-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:10px; margin-bottom:1rem; }
.theme-swatch { border-radius:16px; padding:0.65rem; cursor:pointer; border:2px solid var(--border); transition:border-color 0.2s,transform 0.15s; }
.theme-swatch:hover { transform:translateY(-2px); }
.theme-swatch.selected { border-color:var(--ink); }
.theme-swatch-preview { width:100%; height:36px; border-radius:10px; margin-bottom:6px; display:flex; align-items:center; justify-content:center; gap:4px; }
.theme-dot { width:10px; height:10px; border-radius:50%; }
.theme-name { font-size:0.8rem; font-weight:600; color:var(--ink); text-align:center; }
.custom-bg-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.custom-bg-swatch { width:44px; height:44px; border-radius:12px; border:2px solid var(--border2); overflow:hidden; position:relative; cursor:pointer; flex-shrink:0; }
.custom-bg-swatch input[type="color"] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; border:none; padding:0; }
.custom-bg-fill { width:100%; height:100%; border-radius:9px; pointer-events:none; }
.custom-bg-label { font-size:0.88rem; color:var(--text2); }
.dash-divider { height:1px; background:var(--border); margin:1.5rem 0; }

.dashboard-footer { padding:1rem 2rem 1.25rem; border-top:1px solid var(--border); flex-shrink:0; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; }
.dash-stats { font-size:0.85rem; color:var(--text3); font-weight:600; }
.dash-footer-right { display:flex; gap:8px; align-items:center; }
.dash-search { min-height:44px; padding:0 16px; font-size:0.95rem; background:var(--surface); border:2px solid var(--border2); border-radius:999px; color:var(--text); font-family:var(--font); outline:none; width:240px; transition:border-color 0.2s; }
.dash-search:focus { border-color:var(--accent-text); }
.dash-search::placeholder { color:#948aa0; }

/* ── TOAST ── */
.toast { position:fixed; bottom:2rem; left:50%; transform:translateX(-50%) translateY(20px); background:var(--navy); border-radius:999px; padding:12px 22px; font-size:0.92rem; font-weight:700; font-family:var(--font); color:#9fe0c5; opacity:0; transition:opacity 0.25s,transform 0.25s; pointer-events:none; z-index:999; white-space:nowrap; box-shadow:0 10px 30px rgba(43,34,56,0.25); }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ── APPLICATIONS PANEL ── */
#app-detail-overlay { display:none; }
#app-detail-overlay.open { display:flex; }

/* ── MAINTENANCE MODE ── */
.maintenance-card{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:10px;padding:14px 16px;background:var(--surface);border:1px solid var(--border);border-radius:18px}
.maintenance-status{display:flex;align-items:center;gap:11px;min-width:0}
.maintenance-status-dot{width:10px;height:10px;border-radius:50%;background:var(--teal);flex-shrink:0}
.maintenance-status-dot.on{background:var(--coral)}
.maintenance-status-title{font-size:.95rem;font-weight:700}
.maintenance-status-sub{font-size:.82rem;color:var(--text3);margin-top:2px}
.maintenance-toggle{min-width:160px;min-height:44px;border:2px solid var(--border2);border-radius:999px;background:transparent;color:var(--ink);padding:0 18px;cursor:pointer;font-family:var(--font);font-size:.9rem;font-weight:700;transition:all .2s;flex-shrink:0}
.maintenance-toggle:hover{border-color:var(--coral);color:var(--coral)}
.maintenance-toggle.on{background:var(--coral);border-color:var(--coral);color:#fff}
.maintenance-message-box{margin-top:12px;padding:14px;background:var(--surface);border:1px solid var(--border);border-radius:18px}
.maintenance-message-box label{display:block;font-size:.85rem;font-weight:700;color:var(--ink);margin-bottom:6px}
.maintenance-message-box textarea{width:100%;padding:10px 12px;font-size:.95rem;background:var(--surface);border:2px solid var(--border2);border-radius:12px;color:var(--text);font-family:var(--font);outline:none;resize:vertical;min-height:62px}
.maintenance-message-box textarea:focus{border-color:var(--accent-text)}
.maintenance-save-message{margin-top:8px}

/* ═══ MEMBER OUTLINES + TAGS ═══ */
.member-tags{display:flex;flex-wrap:wrap;gap:6px;padding:0 4px}
.profile-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.member-tag{display:inline-flex;align-items:center;gap:4px;max-width:100%;padding:4px 12px;border-radius:999px;background:color-mix(in srgb,var(--tag-color,#2f6fb3) 16%,var(--surface));color:var(--ink);font-size:.82rem;font-weight:700;line-height:1.3;white-space:nowrap}
.member-outline-editor,.member-tag-editor{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#outline-color-input{width:46px;height:40px;padding:3px;border:2px solid var(--border2);border-radius:12px;background:var(--surface);cursor:pointer}
.outline-none-btn,.outline-color-btn{min-height:40px;border:2px solid var(--border2);background:var(--surface);color:var(--ink);border-radius:999px;padding:0 14px;font-family:var(--font);font-size:.85rem;font-weight:700;cursor:pointer;transition:.2s}
.outline-none-btn:hover,.outline-color-btn:hover{border-color:var(--ink)}
.outline-none-btn.selected{border-color:var(--coral);color:var(--coral);background:var(--danger-soft)}
.member-tag-editor input{flex:1;min-width:0}
.member-tag-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px;min-height:28px}
.editor-tag button{border:0;background:transparent;color:var(--text3);font-size:1.05rem;line-height:1;cursor:pointer;padding:0 0 0 4px}
.editor-tag button:hover{color:var(--coral)}
.form-hint{margin-top:6px;color:var(--text3);font-size:.82rem;line-height:1.4}
@supports not (color:color-mix(in srgb, red 50%, transparent)){
  .member-tag{background:var(--accent-soft)}
}

/* ── RESPONSIVE ── */
@media(max-width:1100px){
  .help-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .nav-links { gap:1.25rem; }
}
@media(max-width:960px){
  .hero, .join-section, .founder-section { grid-template-columns:minmax(0,1fr); gap:40px; }
  .founder-photo { max-width:340px; width:100%; }
  .nav-links { display:none; }
}
@media(max-width:640px){
  nav { min-height:70px; flex-wrap:wrap; gap:0.5rem; padding-top:10px; padding-bottom:10px; }
  .nav-logo { font-size:1.25rem; }
  .nav-logo img { width:38px; height:38px; }
  .nav-right { gap:.6rem; flex-wrap:wrap; }
  .nav-cta { display:none; }
  .hero { border-radius:0 0 32px 32px; margin:0; width:100%; }
  .help-grid { grid-template-columns:minmax(0,1fr); }
  .help-card { min-height:0; }
  .join-section { border-radius:32px; margin-left:0; margin-right:0; width:100%; }
  .join-card { padding:24px; }
  .team-grid { grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px; }
  .member-tile { height:140px; }
  .member-card .avatar { width:92px; height:92px; font-size:42px; }
  .card-actions { opacity:1; }
  .dashboard-modal { max-width:100%; margin:0.5rem; border-radius:22px; }
  .dash-member-id { display:none; }
  .dashboard-body { padding:1rem; }
  .dashboard-header,.dashboard-footer { padding-left:1rem; padding-right:1rem; }
  .dash-tabs,.dash-panel-toolbar { padding-left:1rem; padding-right:1rem; }
  .dash-search { width:100%; }
  .theme-grid { grid-template-columns:repeat(auto-fill,minmax(90px,1fr)); }
  .profile-hero { padding:1.5rem; gap:1rem; }
  .profile-avatar { width:96px; height:96px; font-size:2.6rem; }
  .profile-card { padding:1.35rem; }
  .link-row,.link-row-head { grid-template-columns:80px 1fr 34px; }
  .maintenance-card { flex-direction:column; align-items:flex-start; }
  footer { flex-direction:column; align-items:flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation:none !important; transition:none !important; }
  html { scroll-behavior:auto; }
}

/* ═══ STAFF HIGHLIGHT ═══
   Members with an outline colour (set in the admin editor) get a slowly
   rotating gradient border, a soft pulsing glow and a light shimmer sweep. */
@property --staff-angle { syntax:'<angle>'; initial-value:0deg; inherits:false; }
.member-card.is-staff,
.profile-hero.is-staff {
  border:3px solid transparent;
  background:
    linear-gradient(var(--surface),var(--surface)) padding-box,
    conic-gradient(from var(--staff-angle),
      var(--outline),
      color-mix(in srgb,var(--outline) 35%,#fff),
      var(--outline),
      color-mix(in srgb,var(--outline) 55%,transparent),
      var(--outline)) border-box;
  animation:staffSpin 6s linear infinite, staffGlow 3s ease-in-out infinite;
  isolation:isolate;
  overflow:hidden;
}
.member-card.is-staff { animation:fadeIn 0.3s ease both, staffSpin 6s linear infinite, staffGlow 3s ease-in-out infinite; }
.member-card.is-staff:hover { animation-duration:0.3s, 2.5s, 3s; box-shadow:0 14px 34px color-mix(in srgb,var(--outline) 35%,transparent); }
@keyframes staffSpin { to { --staff-angle:360deg; } }
@keyframes staffGlow {
  0%,100% { box-shadow:0 6px 18px color-mix(in srgb,var(--outline) 18%,transparent); }
  50%     { box-shadow:0 8px 30px color-mix(in srgb,var(--outline) 42%,transparent); }
}
/* shimmer sweep across the card every few seconds */
.member-card.is-staff::after {
  content:''; position:absolute; inset:0; pointer-events:none; z-index:1; border-radius:inherit;
  background:linear-gradient(115deg,transparent 35%,color-mix(in srgb,var(--outline) 22%,rgba(255,255,255,.5)) 50%,transparent 65%);
  transform:translateX(-120%);
  animation:staffShimmer 5s ease-in-out infinite;
}
@keyframes staffShimmer { 0%,65% { transform:translateX(-120%); } 100% { transform:translateX(120%); } }
.member-card.is-staff .card-actions { z-index:3; }
.profile-hero.is-staff::before { background:var(--outline) !important; }
/* browsers without color-mix: plain coloured border, still highlighted */
@supports not (color:color-mix(in srgb, red 50%, transparent)){
  .member-card.is-staff,.profile-hero.is-staff { background:var(--surface); border-color:var(--outline); }
}
@media (prefers-reduced-motion: reduce) {
  .member-card.is-staff::after { display:none; }
}

/* ═══ MAINTENANCE NOTICE (visitors) ═══ */
.maintenance-notice { max-width:560px; margin:72px auto; padding:40px 28px; border-radius:var(--radius-xl); background:var(--accent-soft); text-align:center; display:flex; flex-direction:column; align-items:center; gap:14px; }
.maintenance-notice[hidden] { display:none; }
.maintenance-notice h1 { font-family:var(--display); font-weight:700; font-size:clamp(1.9rem,4vw,2.6rem); color:var(--ink); }
.maintenance-notice p { color:var(--text2); font-size:1.05rem; line-height:1.6; }
.account-form { max-width:360px; }
