/* FaceWork — Static HTML kit (no build tools)
   - Glassmorphism UI
   - Dark/Light mode via [data-theme]
*/

:root{
  --bg0:#120524;
  --bg1:#3a116b;
  --bg2:#6422ad;
  --grid: rgba(255,255,255,.05);

  --card: rgba(255,255,255,.07);
  --card2: rgba(255,255,255,.10);
  --stroke: rgba(255,255,255,.15);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.72);

  --accent1:#ff6a00;
  --accent2:#ff2d78;

  --shadow: 0 18px 60px rgba(0,0,0,.35);
  --radius: 20px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;

  /* Space background image (put the file at /assets/image_espace.png) */
  --space-bg-image: url("../assets/image_espace.png");
  --space-overlay0: rgba(10, 6, 22, .78);
  --space-overlay1: rgba(20, 8, 44, .66);
  --space-overlay2: rgba(44, 14, 88, .58);
}

/* Light mode */
html[data-theme="light"]{
  --bg0:#f4f1ff;
  --bg1:#e8dcff;
  --bg2:#d7c3ff;
  --grid: rgba(20,16,45,.08);

  --card: rgba(255,255,255,.72);
  --card2: rgba(255,255,255,.82);
  --stroke: rgba(20,16,45,.14);
  --text: rgba(20,16,45,.92);
  --muted: rgba(20,16,45,.68);

  /* More neon in light mode */
  --accent1:#00f5ff;
  --accent2:#ff2d78;

  --shadow:
    0 18px 60px rgba(32,18,72,.14),
    0 0 70px rgba(0,245,255,.22),
    0 0 62px rgba(255,45,120,.16),
    0 0 56px rgba(162,89,255,.14),
    0 0 48px rgba(34,197,94,.10);

  --space-overlay0: rgba(244, 241, 255, .78);
  --space-overlay1: rgba(232, 220, 255, .68);
  --space-overlay2: rgba(215, 195, 255, .60);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg0);
  background-image:
              radial-gradient(1000px 520px at 15% 10%, rgba(255,122,24,.18), transparent 58%),
              radial-gradient(980px 640px at 85% 25%, rgba(255,45,120,.18), transparent 62%),
              radial-gradient(1100px 700px at 55% 110%, rgba(154,91,255,.18), transparent 56%),
              linear-gradient(180deg, var(--space-overlay0), var(--space-overlay1) 48%, var(--space-overlay2)),
              var(--space-bg-image);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  overflow-x:hidden;
}

/* More color "pop" in light mode */
html[data-theme="light"] body{
  background-image:
              radial-gradient(1000px 520px at 15% 10%, rgba(0,245,255,.30), transparent 58%),
              radial-gradient(980px 640px at 85% 25%, rgba(255,45,120,.26), transparent 62%),
              radial-gradient(1100px 700px at 55% 110%, rgba(162,89,255,.26), transparent 56%),
              radial-gradient(900px 520px at 35% 86%, rgba(34,197,94,.18), transparent 60%),
              linear-gradient(180deg, var(--space-overlay0), var(--space-overlay1) 48%, var(--space-overlay2)),
              var(--space-bg-image);
}

/* subtle grid */
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity:.16;
  mix-blend-mode: soft-light;
}
html[data-theme="light"] body::before{opacity:.22}

a{color:inherit; text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%; display:block}

.container{width:min(1160px, 92vw); margin-inline:auto}
.spacer{height:24px}
.hidden{display:none !important}
.hide-sm{display:inline}
.sr-only{
  position:absolute !important;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip: rect(0, 0, 0, 0);
  white-space:nowrap;
  border:0;
}
.muted{color: var(--muted)}

/* glass card */
.card{
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.pill{
  display:inline-flex; align-items:center; gap:10px;
  padding:10px 14px;
  border:1px solid var(--stroke);
  border-radius:999px;
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-weight:600;
  font-size:13px;
}

.kbd{
  font-family: var(--mono);
  font-size: 12px;
  border:1px solid var(--stroke);
  background: rgba(0,0,0,.18);
  padding:2px 6px;
  border-radius:8px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border-radius: 14px;
  padding: 12px 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s ease, background .12s ease, border-color .12s ease;
  user-select:none;
}
.btn:hover{background: rgba(255,255,255,.12)}
.btn:active{transform: translateY(1px)}
.btn.primary{
  border: none;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color:white;
  box-shadow: 0 12px 30px rgba(255,45,120,.25);
}
html[data-theme="light"] .btn.primary{
  box-shadow:
    0 12px 30px rgba(255,45,120,.18),
    0 0 44px rgba(0,245,255,.22),
    0 0 38px rgba(162,89,255,.14);
}
.btn.primary:hover{filter:saturate(1.05) brightness(1.03)}
.btn.danger{
  border: none;
  background: linear-gradient(90deg, rgba(239,68,68,.98), rgba(255,45,120,.92));
  color: white;
  box-shadow: 0 12px 30px rgba(239,68,68,.20);
}
.btn.danger:hover{filter:saturate(1.05) brightness(1.02)}
.btn.ghost{
  background: transparent;
}
.btn.small{padding:10px 12px; border-radius: 12px; font-size:14px}
.btn.icon{padding:10px; width:42px; height:42px}
.btn.block{width:100%}

.input{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.08);
  color: var(--text);
  outline:none;
}
.input::placeholder{color: rgba(255,255,255,.55)}
html[data-theme="light"] .input::placeholder{color: rgba(20,16,45,.40)}
.input:focus{border-color: rgba(255,255,255,.35)}

.label{font-size:13px; color: var(--muted); font-weight:700; margin-bottom:8px}

/* Input with icon (login/settings) */
.field{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.10);
}
.field:focus-within{border-color: rgba(255,255,255,.40)}
.field .field-icon{
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  color: rgba(255,255,255,.78);
}
.field .input{
  padding:0;
  border:0;
  background: transparent;
  border-radius: 0;
}
.field .input:focus{border-color: transparent}

.row{display:flex; gap:14px; align-items:center}
.col{display:flex; flex-direction:column; gap:12px}
.item-left{display:flex; align-items:center; gap:10px; min-width:0}
.truncate{min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}

.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px;
  border:1px solid var(--stroke);
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  color: var(--muted);
  background: rgba(255,255,255,.06);
}

.hr{
  height:1px;
  background: var(--stroke);
  margin: 18px 0;
}

/* Top navbar (landing) */
.navbar{
  position: sticky;
  top:0;
  z-index: 10;
  background: rgba(10,10,25,.18);
  border-bottom: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(12px);
}
html[data-theme="light"] .navbar{background: rgba(255,255,255,.42)}
.navbar .inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
}
.brand{
  display:flex; align-items:center; gap:12px;
  font-weight: 900;
  letter-spacing:.2px;
}
.brand:hover{text-decoration:none}
.logo{
  width:42px; height:42px; border-radius: 12px;
  background: rgba(0,0,0,.18);
  display:grid;
  place-items:center;
  box-shadow: 0 16px 32px rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.24);
  overflow:hidden;
}
html[data-theme="light"] .logo{
  background: rgba(255,255,255,.62);
  box-shadow: 0 12px 26px rgba(32,18,72,.18);
}
.logo span{font-weight:1000}
.logo img{width:100%; height:100%; display:block; object-fit:contain}
.navlinks{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap: 10px 22px;
  color: var(--muted);
  font-weight:700;
}
.navlinks a{opacity:.92}
.navlinks a:hover{opacity:1; text-decoration:none}
.nav-actions{display:flex; align-items:center; gap:10px}

/* Side drawer menu (replaces top nav buttons) */
body.has-sidemenu .navlinks,
body.has-sidemenu .appnav{
  display:none !important;
}

.side-overlay{
  position: fixed;
  inset: 0;
  z-index: 96;
  background: rgba(0,0,0,.62);
  display:flex;
  justify-content:flex-start;
}
.side-drawer{
  width: min(360px, 86vw);
  height: 100%;
  display:flex;
  flex-direction:column;
  border-right: 1px solid var(--stroke);
  background: rgba(10,10,25,.78);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: 18px 0 44px rgba(0,0,0,.35);
  transform: translateX(-102%);
  transition: transform .18s ease;
}
html[data-theme="light"] .side-drawer{
  background: rgba(255,255,255,.82);
  box-shadow: 18px 0 44px rgba(32,18,72,.18);
}
.side-overlay.open .side-drawer{transform: translateX(0)}
.side-head{
  padding: 14px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  border-bottom: 1px solid var(--stroke);
}
.side-brand{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 0;
}
.side-brand .t{font-weight: 950; letter-spacing:-.2px; white-space:nowrap}
.side-brand .s{font-size: 12px; color: var(--muted); font-weight: 850; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.side-links{
  padding: 12px 12px 16px;
  display:flex;
  flex-direction:column;
  gap: 8px;
  overflow:auto;
  flex: 1;
}
.side-link{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-weight: 820;
  text-decoration:none;
}
html[data-theme="light"] .side-link{background: rgba(255,255,255,.72)}
.side-link:hover{
  text-decoration:none;
  background: rgba(255,255,255,.10);
}
html[data-theme="light"] .side-link:hover{background: rgba(20,16,45,.05)}
.side-link.active{
  border-color: rgba(255,45,120,.35);
  box-shadow: 0 0 0 3px rgba(255,45,120,.14);
}
html[data-theme="light"] .side-link.active{
  border-color: rgba(0,245,255,.35);
  box-shadow:
    0 0 0 3px rgba(0,245,255,.16),
    0 0 28px rgba(162,89,255,.10);
}

/* Hero */
.hero{
  padding: 62px 0 26px;
  display:flex;
  flex-direction:column;
  gap: 18px;
}
@media (max-width: 980px){
  .hero{padding-top: 34px}
}
.hero-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  flex-wrap:wrap;
}
.searchbar{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.searchbar input{
  border:0;
  outline:0;
  background: transparent;
  color: var(--text);
  font-weight: 750;
  width: min(320px, 62vw);
}
.searchbar input::placeholder{color: rgba(255,255,255,.55)}
.searchbar .icon{opacity:.9}
.h1{
  font-size: clamp(40px, 4.8vw, 68px);
  line-height: 1.02;
  margin: 10px 0 14px;
  letter-spacing:-.8px;
}
.h1 .grad{
  background: linear-gradient(90deg, var(--accent1), var(--accent2), rgba(151,93,255,1));
  -webkit-background-clip: text;
  background-clip:text;
  color: transparent;
}
.lead{font-size: 16.5px; color: var(--muted); line-height: 1.55; max-width: 56ch}
.hero-actions{display:flex; gap:12px; flex-wrap: wrap; margin-top: 16px}

/* Stats */
.stats{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}
@media (max-width: 720px){
  .stats{grid-template-columns:1fr}
}
.stat{
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
}
.stat .num{font-size: 34px; font-weight: 950; letter-spacing:-.6px}
.stat .cap{color: var(--muted); font-weight: 700; margin-top: 2px; font-size: 13px}

/* Illustration card */
.illus{
  padding: 18px;
}
.illus .frame{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.22);
  overflow:hidden;
  position:relative;
  aspect-ratio: 16/10;
}
html[data-theme="light"] .illus .frame{background: rgba(255,255,255,.38)}
.illus svg{width:100%; height:100%}

/* Footer */
.footer{
  padding: 40px 0 60px;
  color: var(--muted);
  font-weight: 650;
}
.footer .inner{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap: 22px;
  border-top: 1px solid var(--stroke);
  padding-top: 18px;
}
@media (max-width: 780px){
  .footer .inner{flex-direction:column}
}

/* Auth layout */
.auth{
  min-height: calc(100vh - 78px);
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 34px;
  align-items:center;
  padding: 28px 0 56px;
}
@media (max-width: 980px){
  .auth{grid-template-columns:1fr}
}
.auth-left{padding: 8px 4px}
.auth-left h2{margin: 14px 0 12px; font-size: clamp(46px, 5.2vw, 74px); letter-spacing:-.9px; line-height:1.02}
.auth-left p{margin:0; color: var(--muted); line-height:1.6}
.auth-left .mini{
  margin-top: 18px;
  display:flex; gap:12px; flex-wrap:wrap
}
.auth-right{padding: 22px; max-width: 520px; margin-left:auto}
.form{padding: 22px}
.form h3{margin: 4px 0 4px; font-size: 30px}
.form p{margin:0 0 18px; color: var(--muted); font-weight: 650}
.form .grid{display:grid; gap: 12px}
.form .or{
  display:flex; align-items:center; gap:10px;
  color: var(--muted);
  font-weight:800;
  font-size: 12px;
  margin: 12px 0;
}
.form .or::before, .form .or::after{
  content:"";
  height:1px;
  background: var(--stroke);
  flex:1;
}
.note{
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* Landing sections */
.section-head{
  text-align:center;
  margin: 46px 0 18px;
}
.section-head h2{
  margin: 0;
  font-size: 34px;
  letter-spacing:-.5px;
}
.section-head p{
  margin: 10px auto 0;
  max-width: 62ch;
  color: var(--muted);
  font-weight: 720;
  line-height: 1.6;
}
.features-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 980px){
  .features-grid{grid-template-columns: 1fr}
}
.feature-card{
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
}
.feature-icon{
  width: 46px;
  height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(135deg, rgba(255,106,0,.92), rgba(255,45,120,.88));
  display:grid;
  place-items:center;
  box-shadow: 0 16px 32px rgba(255,45,120,.16);
}
.feature-card h3{margin: 12px 0 6px; font-size: 18px}
.feature-card p{margin:0; color: var(--muted); line-height: 1.6}
.about-card{
  padding: 26px 18px;
  text-align:center;
}
.cta{
  text-align:center;
  padding: 22px 0 56px;
}
.cta h3{margin:0 0 8px; font-size: 26px; letter-spacing:-.4px}
.cta p{margin:0 0 16px; color: var(--muted); font-weight: 720}

/* App shell */
.app{
  min-height: 100vh;
  display:grid;
  grid-template-rows: auto 1fr;
}
.appbar{
  position: sticky;
  top:0;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: rgba(10,10,25,.20);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: 0 14px 36px rgba(0,0,0,.22);
}
.appbar::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:1px;
  pointer-events:none;
  background: linear-gradient(90deg,
    transparent,
    rgba(255,106,0,.65),
    rgba(255,45,120,.65),
    transparent
  );
  opacity:.55;
}
html[data-theme="light"] .appbar::after{
  background: linear-gradient(90deg,
    transparent,
    rgba(0,245,255,.88),
    rgba(34,197,94,.58),
    rgba(255,45,120,.78),
    rgba(162,89,255,.70),
    transparent
  );
  opacity:.85;
}
html[data-theme="light"] .appbar{
  background: rgba(255,255,255,.55);
  box-shadow: 0 14px 36px rgba(32,18,72,.14);
}
.appbar .inner{
  display:grid;
  grid-template-columns: auto 1fr auto;
  align-items:center;
  gap:14px;
  min-height:70px;
  padding: 10px 0;
}
.appnav{
  justify-self:center;
  display:flex;
  align-items:center;
  gap:6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  font-weight: 850;
  color: var(--muted);
}
html[data-theme="light"] .appnav{
  background: rgba(255,255,255,.72);
  border-color: rgba(20,16,45,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.80);
}
.appnav a{
  display:flex; gap:10px; align-items:center;
  padding: 10px 12px;
  border-radius: 999px;
  white-space:nowrap;
  text-decoration:none;
  transition: transform .08s ease, background .12s ease, color .12s ease, box-shadow .12s ease, filter .12s ease;
}
.appnav-label{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.appnav-pill{
  display:none;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  border:1px solid rgba(255,45,120,.30);
  background: rgba(255,45,120,.18);
  color:#fff;
  font-size:11px;
  font-weight:950;
  line-height:1;
  box-shadow: 0 8px 18px rgba(255,45,120,.18);
}
.appnav-pill.show{display:inline-flex}
html[data-theme="light"] .appnav-pill{
  color: var(--text);
  border-color: rgba(0,245,255,.34);
  background: rgba(0,245,255,.20);
  box-shadow:
    0 8px 18px rgba(0,245,255,.14),
    0 0 20px rgba(162,89,255,.10);
}
.appnav a:hover{
  background: rgba(255,255,255,.07);
  color: var(--text);
  text-decoration:none;
}
html[data-theme="light"] .appnav a:hover{background: rgba(20,16,45,.05)}
.appnav a:active{transform: translateY(1px)}
.appnav a.active{
  color: white;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  box-shadow: 0 10px 26px rgba(255,45,120,.22);
}
html[data-theme="light"] .appnav a.active{
  color: var(--text);
  box-shadow:
    0 10px 26px rgba(255,45,120,.16),
    0 0 30px rgba(0,245,255,.20),
    0 0 26px rgba(162,89,255,.12);
  filter: saturate(1.06) brightness(1.02);
}
.appnav a:focus-visible{
  outline:none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.18), 0 10px 26px rgba(255,45,120,.18);
}
html[data-theme="light"] .appnav a:focus-visible{
  box-shadow: 0 0 0 3px rgba(20,16,45,.12), 0 10px 26px rgba(59,130,246,.12);
}
.userbox{
  justify-self:end;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
}
html[data-theme="light"] .userbox{
  background: rgba(255,255,255,.62);
  border-color: rgba(20,16,45,.12);
}
.userbox [data-user-name],
.userbox [data-user-company]{
  max-width: 180px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media (max-width: 980px){
  .appbar .inner{
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand user"
      "nav nav";
  }
  .appbar .brand{grid-area: brand}
  .appbar .userbox{grid-area: user}
  .appbar .appnav{
    grid-area: nav;
    justify-self:start;
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width:none;
  }
  .appbar .appnav::-webkit-scrollbar{display:none}
}

@media (max-width: 560px){
  .hide-sm{display:none !important}
  .userbox{padding: 5px; gap: 8px}
  .userbox [data-user-company]{display:none}
  .userbox [data-user-name]{max-width: 120px}
}
.avatar{
  width:36px; height:36px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,106,0,.85), rgba(255,45,120,.85));
  border: 1px solid rgba(255,255,255,.26);
  display:grid; place-items:center;
  font-weight: 950;
  overflow:hidden;
}
.avatar img{width:100%; height:100%; object-fit:cover; border-radius:inherit}
.avatar.lg{width:72px; height:72px; border-radius: 999px; font-size: 22px}
.avatar.sm{width:28px; height:28px; border-radius: 999px; font-size: 12px}
.sub{
  font-size: 12px;
  color: var(--muted);
  margin-top:-2px;
}
.main{
  padding: 26px 0 56px;
}
.page-title{
  font-size: 42px;
  margin: 6px 0 6px;
  letter-spacing:-.5px;
}
.page-sub{
  color: var(--muted);
  font-weight: 700;
  margin:0;
}
.panel{
  padding: 18px;
}

/* Feed cards */
.post{
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
}
html[data-theme="light"] .post{
  background: rgba(255,255,255,.62);
  transition: box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
html[data-theme="light"] .post:hover{
  border-color: rgba(0,245,255,.26);
  box-shadow:
    0 18px 60px rgba(32,18,72,.12),
    0 0 44px rgba(0,245,255,.16),
    0 0 40px rgba(255,45,120,.10);
}
.post .top{
  display:flex; justify-content:space-between; gap: 12px; align-items:flex-start
}
.post .who{
  display:flex; align-items:center; gap: 10px;
}
.post .who .meta{display:flex; flex-direction:column}
.post .who .name{font-weight:950}
.post .who .time{font-size:12px; color: var(--muted); font-weight:800}
.post h4{margin: 10px 0 6px; font-size: 20px}
.post p{margin:0; color: var(--muted); line-height: 1.55}
.post-code{
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.22);
  overflow:auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(255,255,255,.92);
  white-space: pre;
}
html[data-theme="light"] .post-code{
  border-color: rgba(20,16,45,.16);
  background: rgba(2,6,23,.92);
}
.post-code code{font-family: inherit}
.post .actions{display:flex; gap:10px; margin-top: 12px; flex-wrap:wrap}
.iconbtn{
  display:inline-flex; align-items:center; gap:8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-weight: 800;
  cursor:pointer;
}
.iconbtn:hover{background: rgba(255,255,255,.10); color: var(--text)}
.iconbtn.active{
  background: rgba(255,45,120,.16);
  border-color: rgba(255,45,120,.28);
  color: var(--text);
}
.iconbtn.danger{color: rgba(255,120,150,.90)}

/* Comments */
.post .comments{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--stroke);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.comments-list{display:flex; flex-direction:column; gap:10px}
.comments-empty{
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  padding: 6px 2px;
}
.comments-form{
  display:flex;
  gap:10px;
  align-items:flex-end;
  flex-wrap:wrap;
}
.comment-input{
  flex: 1;
  min-width: 240px;
  resize: vertical;
}
.comment{
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.04);
}
html[data-theme="light"] .comment{background: rgba(255,255,255,.55)}
.comment-head{display:flex; justify-content:space-between; gap:10px; align-items:flex-start}
.comment-who{display:flex; gap:10px; align-items:center; min-width:0}
.comment-meta{display:flex; flex-direction:column; min-width:0}
.comment-name{font-weight: 950; font-size: 13px; line-height: 1.2}
.comment-time{font-size: 12px; color: var(--muted); font-weight: 820}
.comment-text{
  margin-top: 8px;
  color: rgba(255,255,255,.88);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
html[data-theme="light"] .comment-text{color: rgba(20,16,45,.78)}

/* Layouts */
.grid2{display:grid; grid-template-columns: 1fr 1fr; gap: 14px}
@media (max-width: 980px){.grid2{grid-template-columns:1fr}}

.split{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
  align-items:stretch;
}
@media (max-width: 980px){.split{grid-template-columns: 1fr}}

.sidebar{
  padding: 14px;
}
.sidebar h3{margin: 10px 0 8px}
.sidegroup{
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--stroke);
}
.ch-list{display:flex; flex-direction:column; gap: 6px}
.ch-item{
  display:flex; align-items:center; justify-content:space-between;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor:pointer;
}
.ch-item:hover{background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.10); color: var(--text)}
.ch-item.active{background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.14); color: var(--text)}
.hash{opacity:.85; font-weight: 950}
.empty{
  height: 520px;
  display:grid;
  place-items:center;
  text-align:center;
  color: var(--muted);
}
.empty .big{font-size: 72px; opacity:.7}
.empty .title{font-weight: 950; font-size: 20px; margin-top:10px; color: var(--text)}
.empty .hint{margin-top:4px; font-weight: 750}

/* App workbench (sidebar + main in one card) */
.workbench{
  overflow:hidden;
  display:grid;
  grid-template-columns: 320px 1fr;
  min-height: 640px;
}
@media (max-width: 980px){
  .workbench{grid-template-columns:1fr}
  .workbench-sidebar{border-right: 0; border-bottom: 1px solid var(--stroke)}
}
.workbench-sidebar{
  padding: 16px;
  background: rgba(0,0,0,.14);
  border-right: 1px solid var(--stroke);
  overflow:auto;
}
html[data-theme="light"] .workbench-sidebar{background: rgba(255,255,255,.42)}
.workbench-main{padding: 16px}
.workbench-main .empty{height: 100%; min-height: 560px}

/* Discord-like dock menu (salon / chan / dm) */
.workbench.discord{
  grid-template-columns: 88px 320px 1fr;
}
.dock{
  padding: 10px;
  background: rgba(0,0,0,.16);
  border-right: 1px solid var(--stroke);
  display:flex;
  flex-direction:column;
  gap: 10px;
  overflow:auto;
}
html[data-theme="light"] .dock{background: rgba(255,255,255,.44)}
.dock-grow{flex:1}
.dock-sep{
  height: 1px;
  background: var(--stroke);
  opacity:.75;
  margin: 4px 10px;
}
.dock-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: rgba(255,255,255,.04);
  text-decoration:none;
  color: var(--muted);
  font-weight: 950;
  transition: transform .08s ease, background .12s ease, border-color .12s ease, color .12s ease, filter .12s ease;
}
.dock-item:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.10);
  color: var(--text);
  text-decoration:none;
}
.dock-item:active{transform: translateY(1px)}
.dock-item.active{
  background: linear-gradient(135deg, rgba(255,106,0,.20), rgba(255,45,120,.14));
  border-color: rgba(255,45,120,.26);
  color: var(--text);
}
.dock-ico{
  width: 42px;
  height: 42px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  display:grid;
  place-items:center;
  font-weight: 950;
}
.dock-item.active .dock-ico{
  border: none;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: white;
  box-shadow: 0 14px 32px rgba(255,45,120,.18);
}
.dock-label{
  font-family: var(--mono);
  font-size: 11px;
  opacity:.9;
  text-align:center;
  line-height: 1.1;
}
@media (max-width: 980px){
  .workbench.discord{grid-template-columns:1fr}
  .dock{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--stroke);
  }
  .dock-sep{display:none}
  .dock-grow{display:none}
  .dock-item{flex:1}
  .dock-label{display:none}
}

/* Admin (roles/members) */
.role-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.26);
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
  flex: 0 0 auto;
}
html[data-theme="light"] .role-dot{border-color: rgba(20,16,45,.18)}
.role-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.checklist{display:flex; flex-direction:column; gap:10px}
.check{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.05);
}
.check:hover{background: rgba(255,255,255,.07)}
.check .t{font-weight: 950}
.check .d{margin-top:2px; color: var(--muted); font-weight: 740; font-size: 12px; line-height: 1.35}
.check input{width: 18px; height: 18px}
.color-swatch{
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.08);
}
.color-swatch::-webkit-color-swatch-wrapper{padding:0}
.color-swatch::-webkit-color-swatch{border:0; border-radius: 12px}

.side-title{
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 850;
  margin: 14px 0 8px;
  display:flex;
  align-items:center;
  gap:10px;
}
.side-title::before{
  content:"";
  height: 1px;
  flex:1;
  background: var(--stroke);
  opacity:.75;
}
.side-title span{white-space:nowrap}

/* Chat (Discord-like) */
.chat{
  height: 100%;
  min-height: 560px;
  display:flex;
  flex-direction:column;
}
.chat-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
}
.chat-left{display:flex; align-items:center; gap:12px; min-width:0}
.chat-icon{
  width: 42px;
  height: 42px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  display:grid;
  place-items:center;
  font-weight: 950;
}
.chat-meta{min-width:0}
.chat-title{
  font-weight: 950;
  font-size: 18px;
  letter-spacing:-.2px;
}
.chat-sub{margin-top:2px; color: var(--muted); font-weight: 780; font-size: 12px}
.chat-actions{display:flex; gap:8px; align-items:center}

.chat-messages{
  flex:1;
  overflow:auto;
  padding: 10px 4px;
  margin-top: 12px;
  display:flex;
  flex-direction:column;
  gap: 2px;
}
.msg{
  display:flex;
  align-items:flex-start;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 16px;
}
.msg:hover{background: rgba(255,255,255,.05)}
.msg-body{flex:1; min-width:0}
.msg-head{display:flex; gap:10px; align-items:baseline; flex-wrap:wrap}
.msg-name{font-weight: 950}
.msg-time{font-size: 12px; color: var(--muted); font-weight: 820}
.msg-text{
  margin-top: 2px;
  color: rgba(255,255,255,.88);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg.system .msg-name{color: var(--muted)}
.msg.system .msg-text{color: var(--muted)}

.avatar.msg-avatar{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 14px;
  flex: 0 0 auto;
}
.mini-avatar{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  display:grid;
  place-items:center;
  font-weight: 950;
  font-size: 12px;
  background: rgba(255,255,255,.10);
}

.chat-composer{
  margin-top: 12px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,.18);
  display:flex;
  gap: 10px;
  align-items:flex-end;
}
html[data-theme="light"] .chat-composer{background: rgba(255,255,255,.55)}
.chat-composer.dragover{
  border-style: dashed;
  border-color: rgba(124,58,237,.85);
  background: rgba(124,58,237,.12);
}
.chat-input{
  flex: 1;
  min-height: 44px;
  max-height: 160px;
  resize: none;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  outline: none;
  font: inherit;
  line-height: 1.35;
}
.chat-input::placeholder{color: rgba(255,255,255,.55)}
.chat-input:focus{border-color: rgba(255,255,255,.35)}

.chat-attach{
  margin-top: 12px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
html[data-theme="light"] .chat-attach{background: rgba(255,255,255,.65)}
.chat-attach-left{display:flex; align-items:center; gap:10px; min-width:0}
.chat-attach-label{font-size: 12px; color: var(--muted); font-weight: 850; min-width:0}

.chat{position:relative}
.chat-pop{
  position:absolute;
  left: 10px;
  bottom: 74px;
  width: min(560px, calc(100% - 20px));
  z-index: 40;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: rgba(15,15,18,.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  overflow:hidden;
}
html[data-theme="light"] .chat-pop{background: rgba(255,255,255,.92)}
.chat-pop-head{
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
html[data-theme="light"] .chat-pop-head{
  background: rgba(0,0,0,.04);
  border-bottom-color: rgba(0,0,0,.08);
}
.chat-pop-body{padding: 10px}
.chat-emoji-grid{
  padding: 10px;
  display:grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  max-height: 220px;
  overflow:auto;
}
@media (max-width: 520px){
  .chat-emoji-grid{grid-template-columns: repeat(8, 1fr)}
}
.emoji-btn{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: inherit;
  font: inherit;
  cursor: pointer;
  display:grid;
  place-items:center;
  transition: background .12s ease, transform .08s ease;
}
html[data-theme="light"] .emoji-btn{border-color: rgba(0,0,0,.10); background: rgba(0,0,0,.04)}
.emoji-btn:hover{background: rgba(255,255,255,.10)}
html[data-theme="light"] .emoji-btn:hover{background: rgba(0,0,0,.06)}
.emoji-btn:active{transform: translateY(1px)}
.gif-ico{font-size:12px; font-weight:950; letter-spacing:.5px}
.chat-gif-grid{
  margin-top: 10px;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 260px;
  overflow:auto;
  padding: 2px;
}
@media (max-width: 520px){
  .chat-gif-grid{grid-template-columns: repeat(3, 1fr)}
}
.gif-btn{
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  overflow:hidden;
  cursor:pointer;
  padding: 0;
  display:block;
  color: inherit;
  font: inherit;
  outline:none;
  appearance: none;
  transition: background .12s ease, transform .08s ease;
}
html[data-theme="light"] .gif-btn{border-color: rgba(0,0,0,.10); background: rgba(0,0,0,.04)}
.gif-btn:hover{background: rgba(255,255,255,.10)}
html[data-theme="light"] .gif-btn:hover{background: rgba(0,0,0,.06)}
.gif-btn:active{transform: translateY(1px)}
.gif-thumb{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display:block;
  background: rgba(0,0,0,.35);
}
.chat-gif-powered{
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}
.chat-gif-powered:hover{text-decoration: underline}

/* Visio (call modal) */
.call-overlay{
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0,0,0,.62);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
.call-modal{
  width: min(1100px, 96vw);
  max-height: 90vh;
  overflow: hidden;
  display:flex;
  flex-direction:column;
}
.call-modal.is-max{
  width: 98vw;
  max-height: 94vh;
}
.call-header{
  padding: 14px 16px;
  border-bottom: 1px solid var(--stroke);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  background: rgba(0,0,0,.12);
}
html[data-theme="light"] .call-header{background: rgba(255,255,255,.55)}
.call-head-left{display:flex; flex-direction:column; gap:2px; min-width:0}
.call-title{font-weight: 950; letter-spacing:-.2px}
.call-sub{font-size: 12px; color: var(--muted); font-weight: 850}
.call-grid{
  padding: 14px;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  overflow:auto;
  flex: 1;
}
.call-grid.call-grid--single{
  grid-template-columns: 1fr;
}
.call-tile{
  position: relative;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,.25);
  overflow:hidden;
}
html[data-theme="light"] .call-tile{background: rgba(0,0,0,.08)}
.call-video{
  width: 100%;
  height: 240px;
  object-fit: cover;
  background: rgba(0,0,0,.55);
  display:block;
}
.call-grid.call-grid--single .call-video{
  height: min(60vh, 640px);
}
.call-modal.is-max .call-grid.call-grid--single .call-video{
  height: min(72vh, 820px);
}
.call-label{
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 12px;
  font-weight: 850;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.call-controls{
  padding: 12px 16px;
  border-top: 1px solid var(--stroke);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  background: rgba(0,0,0,.12);
}
html[data-theme="light"] .call-controls{background: rgba(255,255,255,.55)}
.call-ctrl-left{display:flex; align-items:center; gap:10px}

/* Feed: upload dropzone */
.dropzone{
  margin-top: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,.22);
  background: rgba(0,0,0,.18);
  display:flex;
  align-items:center;
  gap: 12px;
  cursor:pointer;
  user-select:none;
  outline: none;
  transition: border-color .12s ease, background .12s ease, transform .08s ease;
}
html[data-theme="light"] .dropzone{
  background: rgba(255,255,255,.55);
  border-color: rgba(0,0,0,.18);
}
.dropzone:hover{background: rgba(255,255,255,.05)}
.dropzone:active{transform: translateY(1px)}
.dropzone:focus-visible{
  border-color: rgba(124,58,237,.85);
  box-shadow: 0 0 0 3px rgba(124,58,237,.18);
}
.dropzone.dragover{
  border-color: rgba(124,58,237,.85);
  background: rgba(124,58,237,.12);
}
html[data-theme="light"] .dropzone:focus-visible{
  border-color: rgba(0,245,255,.92);
  box-shadow:
    0 0 0 3px rgba(0,245,255,.20),
    0 0 34px rgba(255,45,120,.14),
    0 0 30px rgba(162,89,255,.10);
}
html[data-theme="light"] .dropzone.dragover{
  border-color: rgba(0,245,255,.92);
  background: linear-gradient(135deg, rgba(0,245,255,.16), rgba(255,45,120,.12), rgba(162,89,255,.10));
  box-shadow:
    0 0 0 3px rgba(0,245,255,.18),
    0 0 40px rgba(255,45,120,.14),
    0 0 34px rgba(34,197,94,.10);
}
.drop-ico{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
  display:grid;
  place-items:center;
  flex:0 0 auto;
  font-weight: 950;
}
.drop-meta{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px}
.drop-title{font-weight: 900}
.drop-sub{font-size: 12px; color: var(--muted); font-weight: 750}
.drop-file{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255,255,255,.86);
  font-weight: 850;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-theme="light"] .drop-file{color: rgba(0,0,0,.70)}

/* Feed: attachment block */
.file-box{
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  width:100%;
  cursor:pointer;
  text-align:left;
  color: inherit;
  font: inherit;
  outline:none;
  appearance: none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  transition: background .12s ease, transform .08s ease;
}
html[data-theme="light"] .file-box{background: rgba(255,255,255,.62)}
.file-box:hover{background: rgba(255,255,255,.07)}
html[data-theme="light"] .file-box:hover{
  background: rgba(255,255,255,.74);
  border-color: rgba(0,245,255,.22);
  box-shadow:
    0 0 28px rgba(0,245,255,.14),
    0 0 22px rgba(255,45,120,.10);
}
.file-box:active{transform: translateY(1px)}
.file-left{display:flex; align-items:center; gap:12px}
.file-ico{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
  display:grid;
  place-items:center;
  font-weight: 950;
}
.file-meta{display:flex; flex-direction:column; gap:2px}
.file-title{font-weight: 900}
.file-sub{font-size: 12px; color: var(--muted); font-weight: 750}

/* Chat: file inside message */
.msg .file-box{margin-top: 10px}
.msg .media-box{margin-top: 10px}

/* Settings */
.settings-card{
  max-width: 980px;
  margin: 0 auto;
  padding: 22px;
}
.settings-card h1{
  margin: 0 0 6px;
  font-size: 34px;
  letter-spacing:-.5px;
}
.avatar-row{
  display:flex;
  align-items:center;
  gap: 14px;
  flex-wrap:wrap;
}
.avatar-actions{display:flex; flex-direction:column; gap:10px; flex:1; min-width: 280px}
.avatar-presets{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  margin-top: 12px;
}
.preset{
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.20);
  display:grid;
  place-items:center;
  font-weight: 950;
  cursor:pointer;
  user-select:none;
}
.account-box{
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.05);
}
.account-box .k{color: var(--muted); font-weight: 850; font-size: 12px}
.account-box .v{font-weight: 850}
.notif-toggle{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
}
.notif-toggle:hover{text-decoration:none}
.notif-toggle input{
  width:18px;
  height:18px;
  margin-top:2px;
  accent-color: var(--accent2);
}
html[data-theme="light"] .notif-toggle{
  background: rgba(255,255,255,.72);
}
.notif-toggle strong{display:block}

/* Toast */
.toast{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(420px, 92vw);
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(10,10,25,.22);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  display:none;
  z-index: 50;
}
html[data-theme="light"] .toast{background: rgba(255,255,255,.62)}
.toast.show{display:block}
.toast .t{font-weight: 950}
.toast .d{color: var(--muted); margin-top: 2px; font-weight: 700}

/* AI helper */
.ai-fab{
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 60;
  box-shadow: var(--shadow);
}
body.ai-open .ai-fab{display:none}
@media (max-width: 560px){
  .ai-fab{right: 12px; bottom: 84px}
}

/* Tutorial */
.tut-hero{padding-bottom: 10px}
.tut-shell{margin-bottom: 10px}
.tut-nav .ch-item:hover{text-decoration:none}

.tut-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 980px){
  .tut-grid{grid-template-columns: 1fr}
}
.tut-card{
  display:flex;
  gap: 12px;
  align-items:flex-start;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  color: inherit;
  text-decoration:none;
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
.tut-card:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 16px 44px rgba(0,0,0,.18);
}
html[data-theme="light"] .tut-card{
  background: rgba(255,255,255,.62);
}
html[data-theme="light"] .tut-card:hover{
  border-color: rgba(0,245,255,.22);
  box-shadow:
    0 18px 60px rgba(32,18,72,.12),
    0 0 44px rgba(0,245,255,.14),
    0 0 34px rgba(255,45,120,.10);
}
.tut-card:active{transform: translateY(0)}
.tut-card-ico{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  display:grid;
  place-items:center;
  font-weight: 950;
  flex: 0 0 auto;
}
html[data-theme="light"] .tut-card-ico{
  border-color: rgba(20,16,45,.14);
  background: linear-gradient(135deg, rgba(0,245,255,.18), rgba(255,45,120,.10));
}
.tut-card-main{min-width:0}
.tut-card-title{
  font-weight: 950;
  letter-spacing:-.2px;
}
.tut-card-desc{
  margin-top: 4px;
  color: var(--muted);
  font-weight: 720;
  line-height: 1.45;
}
.tut-card-meta{
  margin-top: 10px;
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
}
.tut-card-go{
  margin-left:auto;
  color: var(--muted);
  font-weight: 950;
  opacity:.9;
}
.tut-card:hover .tut-card-go{color: var(--text)}

.callout{
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  color: var(--muted);
  font-weight: 750;
  line-height: 1.6;
}
.callout strong{color: var(--text)}
.callout code{
  font-family: var(--mono);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.18);
}
html[data-theme="light"] .callout code{
  border-color: rgba(20,16,45,.16);
  background: rgba(20,16,45,.06);
}

.tut-details{
  margin: 12px 0;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  overflow:hidden;
}
html[data-theme="light"] .tut-details{
  background: rgba(255,255,255,.62);
  transition: box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
html[data-theme="light"] .tut-details:hover{
  border-color: rgba(0,245,255,.22);
  box-shadow:
    0 0 34px rgba(0,245,255,.12),
    0 0 28px rgba(255,45,120,.08);
}
.tut-details[open]{background: rgba(255,255,255,.06)}
html[data-theme="light"] .tut-details[open]{
  background: rgba(255,255,255,.70);
  border-color: rgba(255,45,120,.22);
  box-shadow:
    0 0 38px rgba(255,45,120,.10),
    0 0 32px rgba(0,245,255,.10);
}
.tut-summary{
  cursor:pointer;
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 14px 14px;
  font-weight: 950;
}
.tut-summary::-webkit-details-marker{display:none}
.tut-summary:focus-visible{
  outline: 2px solid rgba(255,45,120,.55);
  outline-offset: 2px;
  border-radius: 16px;
}
.tut-left{display:flex; align-items:center; gap:12px; min-width:0}
.tut-ico{
  width: 42px;
  height: 42px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  display:grid;
  place-items:center;
  font-weight: 950;
  flex: 0 0 auto;
}
.tut-txt{display:flex; flex-direction:column; gap:2px; min-width:0}
.tut-title{color: var(--text)}
.tut-question{color: var(--text); line-height: 1.35}
.tut-meta{color: var(--muted); font-weight: 750; font-size: 12px}
.tut-details[data-learn-kind="exercise"] .tut-summary{align-items:flex-start}
.tut-details[data-learn-kind="exercise"] .tut-left{align-items:flex-start}
.tut-details[data-learn-kind="exercise"] .tut-ico{margin-top: 2px}
.tut-details[data-learn-kind="exercise"] .badge{margin-top: 4px}
.tut-body{padding: 0 14px 14px}
.tut-body p{
  margin: 10px 0;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 720;
}
.tut-body ul{
  margin: 10px 0 10px 18px;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 720;
  padding: 0;
}
.tut-body li{margin: 6px 0}
.tut-body strong{color: var(--text)}
.tut-body code{
  font-family: var(--mono);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.18);
}
html[data-theme="light"] .tut-body code{
  border-color: rgba(20,16,45,.16);
  background: rgba(20,16,45,.06);
}

.codeblock{
  margin-top: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.28);
  overflow:hidden;
}
html[data-theme="light"] .codeblock{
  border-color: rgba(20,16,45,.16);
  background: rgba(2,6,23,.92);
}
.codebar{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 800;
}
.codebar .btn{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
  color: rgba(255,255,255,.92);
}
.codebar .btn:hover{background: rgba(255,255,255,.12)}
.codeblock pre{
  margin:0;
  padding: 12px;
  overflow:auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255,255,255,.92);
  white-space: pre;
}

/* Code preview modal (HTML) */
.preview-overlay{
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0,0,0,.62);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
.preview-modal{
  width: min(980px, 96vw);
  height: min(720px, 86vh);
  overflow: hidden;
  display:flex;
  flex-direction:column;
}
.preview-header{
  padding: 12px 14px;
  border-bottom: 1px solid var(--stroke);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  background: rgba(0,0,0,.12);
}
html[data-theme="light"] .preview-header{background: rgba(255,255,255,.55)}
.preview-head-left{display:flex; flex-direction:column; gap:2px; min-width:0}
.preview-title{font-weight: 950; letter-spacing:-.2px}
.preview-sub{font-size: 12px; color: var(--muted); font-weight: 850}
.preview-body{flex: 1; background: rgba(0,0,0,.18)}
html[data-theme="light"] .preview-body{background: rgba(255,255,255,.45)}
.preview-frame{
  width: 100%;
  height: 100%;
  border: 0;
  background: #0b0b0b;
}
html[data-theme="light"] .preview-frame{background:#fff}

/* Feed: composer modal */
.composer-overlay{
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0,0,0,.62);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
.composer-modal{
  width: min(1100px, 96vw);
  max-height: 86vh;
  overflow:auto;
}
.composer-modal .grid2{grid-template-columns: 1fr 420px}
@media (max-width: 980px){.composer-modal .grid2{grid-template-columns:1fr}}

/* Feed: image preview */
.media-box{
  margin-top: 12px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  width:100%;
  cursor:pointer;
  text-align:left;
  color: inherit;
  font: inherit;
  outline:none;
  appearance: none;
  overflow:hidden;
  display:block;
  transition: background .12s ease, transform .08s ease;
}
html[data-theme="light"] .media-box{background: rgba(255,255,255,.62)}
.media-box:hover{background: rgba(255,255,255,.07)}
html[data-theme="light"] .media-box:hover{
  background: rgba(255,255,255,.74);
  border-color: rgba(0,245,255,.22);
  box-shadow:
    0 0 28px rgba(0,245,255,.14),
    0 0 22px rgba(255,45,120,.10);
}
.media-box:active{transform: translateY(1px)}
.media-img{
  width:100%;
  max-height: 420px;
  object-fit: contain;
  object-position: center;
  display:block;
  background: rgba(0,0,0,.35);
}
.media-bar{
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
html[data-theme="light"] .media-bar{background: rgba(255,255,255,.55)}
.media-name{
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width:0;
}
