:root {
  --bg: #050706;
  --bg-2: #090c0a;
  --panel: rgba(14, 19, 16, .78);
  --panel-solid: #0d120f;
  --line: rgba(166, 198, 167, .18);
  --line-strong: rgba(186, 218, 185, .38);
  --text: #e9eee8;
  --muted: #8e9b90;
  --green: #a7c8a6;
  --green-2: #718e74;
  --danger: #c77f78;
  --warning: #c6ad70;
  --radius: 20px;
  --shadow: 0 30px 90px rgba(0, 0, 0, .55);
  --header-h: 78px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Tahoma, Arial, sans-serif;
  line-height: 1.75;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

#signalCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  opacity: .38;
}
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}
.scanlines {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .12;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, rgba(174, 213, 176, .07) 4px);
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  padding: 0 clamp(18px, 4vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: .35s ease;
}
.topbar.scrolled {
  background: rgba(5, 7, 6, .88);
  border-color: var(--line);
  backdrop-filter: blur(18px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  cursor: pointer;
  letter-spacing: 2px;
}
.brand img { width: 39px; height: 39px; }
.brand span { font-size: 18px; color: #aeb9ae; }
.brand b { color: #edf3ec; font-weight: 800; }
.desktop-nav { display: flex; align-items: center; gap: 8px; }
.desktop-nav button, .mobile-menu button {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 9px 14px;
  cursor: pointer;
  transition: .2s ease;
}
.desktop-nav button:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.ghost-button, .primary-button {
  border-radius: 999px;
  padding: 11px 20px;
  border: 1px solid var(--line-strong);
  background: rgba(10, 15, 12, .7);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.ghost-button:hover, .primary-button:hover { transform: translateY(-2px); }
.primary-button {
  color: #071008;
  background: linear-gradient(135deg, #c5ddc2, #86a889);
  border-color: #a8c6a7;
  font-weight: 800;
  box-shadow: 0 12px 35px rgba(120, 162, 126, .18);
}
.primary-button.compact { padding: 9px 16px; margin-bottom: 14px; }
.icon-button, .avatar-button, .menu-button {
  border: 1px solid var(--line);
  background: rgba(11, 15, 13, .65);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.cart-button { position: relative; }
.cart-button i {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #061007;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}
.avatar-button { color: #071008; background: var(--green); font-weight: 900; }
.menu-button { display: none; }

.mobile-menu {
  position: fixed;
  top: var(--header-h);
  right: 16px;
  left: 16px;
  z-index: 120;
  background: rgba(8, 12, 9, .96);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
  box-shadow: var(--shadow);
}
.mobile-menu.open { transform: none; opacity: 1; pointer-events: auto; }
.mobile-menu button { width: 100%; text-align: right; border-bottom: 1px solid var(--line); }
.mobile-menu button:last-child { border: 0; }

main { min-height: 100vh; }
.view { display: none; }
.view.active { display: block; animation: viewIn .5s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }

#homeView {
  min-height: 100vh;
  position: relative;
  padding: max(110px, 12vh) clamp(22px, 6vw, 110px) 45px;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 42%, rgba(101, 138, 104, .14), transparent 30%),
    radial-gradient(circle at 15% 90%, rgba(75, 100, 78, .12), transparent 28%),
    linear-gradient(90deg, rgba(2, 3, 3, .88), rgba(4, 6, 5, .42));
}
#homeView::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 92px 92px;
  opacity: .1;
  mask-image: linear-gradient(to bottom, transparent, black 30%, transparent);
}
.hero-copy { max-width: 680px; position: relative; z-index: 2; }
.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 11px;
  letter-spacing: 3px;
  direction: ltr;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}
.eyebrow span { width: 30px; height: 1px; background: var(--green); display: inline-block; }
.hero-copy .eyebrow, .section-hero .eyebrow, .about-copy .eyebrow, .admin-header .eyebrow { justify-content: flex-start; direction: ltr; }
.hero-copy h1 {
  font-size: clamp(44px, 6.5vw, 92px);
  line-height: 1.22;
  margin: 0;
  letter-spacing: -4px;
  max-width: 900px;
}
.hero-copy h1 em { color: transparent; -webkit-text-stroke: 1px #97a498; font-style: normal; }
.hero-lead { color: #a4afa5; max-width: 620px; font-size: 16px; margin: 28px 0; }
.system-line {
  width: min(390px, 100%);
  display: grid;
  grid-template-columns: auto 1fr 10px;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 12px;
}
.system-line b { color: var(--green); font-weight: 500; }
.system-line i, .inventory-status i { width: 8px; height: 8px; background: #91bb93; border-radius: 50%; box-shadow: 0 0 18px #91bb93; animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }

.hero-symbol {
  position: absolute;
  width: min(50vw, 660px);
  aspect-ratio: 1;
  left: 4vw;
  top: 13vh;
  opacity: .72;
  display: grid;
  place-items: center;
}
.orbital { position: absolute; border: 1px solid rgba(160, 195, 162, .22); border-radius: 50%; }
.orbit-a { inset: 4%; animation: spin 44s linear infinite; border-style: dashed; }
.orbit-b { inset: 20%; animation: spin 28s linear reverse infinite; }
.orbit-c { inset: 34%; animation: spin 18s linear infinite; border-style: dashed; }
.orbital::before, .orbital::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #9ab49b; box-shadow: 0 0 18px #7fa080; }
.orbital::before { top: -4px; left: 50%; }
.orbital::after { bottom: -4px; right: 18%; }
@keyframes spin { to { transform: rotate(360deg); } }
.eye-core {
  width: 38%;
  aspect-ratio: 1.55;
  border: 2px solid rgba(208, 227, 205, .75);
  border-radius: 55% 45% 55% 45%;
  transform: rotate(45deg);
  display: grid;
  place-items: center;
  box-shadow: 0 0 100px rgba(132, 171, 136, .17), inset 0 0 70px rgba(132, 171, 136, .07);
}
.eye-core span {
  width: 42%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 45% 40%, #d8ead5 0 8%, #8da98f 10% 48%, #080d09 50% 100%); box-shadow: 0 0 45px #77967a; transform: rotate(-45deg);
}

.portal-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
  max-width: 760px;
  margin: clamp(75px, 13vh, 140px) 0 0 auto;
}
.portal-card {
  min-height: 300px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(12, 17, 14, .78), rgba(5, 7, 6, .55));
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: .35s ease;
}
.portal-card:hover { border-color: var(--line-strong); transform: translateY(-7px); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.portal-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 15%, rgba(143, 178, 145, .13), transparent 42%); opacity: 0; transition: .3s; }
.portal-card:hover::after { opacity: 1; }
.portal-index { position: absolute; left: 18px; top: 14px; color: #647068; font-size: 12px; letter-spacing: 2px; }
.portal-icon { width: 55px; height: 55px; border: 1px solid var(--line-strong); display: grid; place-items: center; border-radius: 50%; font-size: 24px; color: var(--green); }
.portal-card p { direction: ltr; text-align: right; color: var(--green-2); font-size: 10px; letter-spacing: 2px; margin: 28px 0 5px; }
.portal-card h2 { margin: 0; font-size: 25px; }
.portal-card > span { color: var(--muted); font-size: 13px; line-height: 1.9; display: block; margin-top: 8px; padding-bottom: 14px; }
.portal-card > * { position: relative; z-index: 2; }
.portal-card button { position: static; align-self: flex-start; margin-top: auto; padding: 10px 0 0; border: 0; background: none; color: #dfe9de; cursor: pointer; white-space: nowrap; }
.portal-card button i { display: inline-block; margin-right: 8px; transition: .2s; }
.portal-card:hover button i { transform: translateX(-6px); }
.hero-footer { position: relative; z-index: 2; display: flex; justify-content: space-between; margin-top: 38px; color: #566058; font-size: 9px; letter-spacing: 3px; direction: ltr; }

.content-view { min-height: 100vh; padding: calc(var(--header-h) + 55px) clamp(18px, 5vw, 80px) 90px; background: radial-gradient(circle at 80% 10%, rgba(82, 112, 86, .08), transparent 30%); }
.section-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: 35px 0 45px; border-bottom: 1px solid var(--line); }
.section-hero h1, .about-copy h1 { font-size: clamp(38px, 5vw, 70px); margin: 0 0 10px; letter-spacing: -3px; }
.section-hero p { margin: 0; max-width: 650px; color: var(--muted); }
.glass-panel { border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(16px); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.room-toolbar { margin: 28px 0; padding: 15px; display: flex; align-items: center; gap: 15px; justify-content: space-between; }
.search-box { flex: 1; min-width: 260px; display: flex; gap: 10px; align-items: center; padding: 0 14px; background: rgba(4, 7, 5, .7); border: 1px solid var(--line); border-radius: 999px; }
.search-box span { font-size: 22px; color: var(--green); }
.search-box input { width: 100%; border: 0; outline: 0; background: none; color: var(--text); padding: 10px 0; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chips button { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 7px 12px; cursor: pointer; font-size: 12px; }
.filter-chips button.active, .filter-chips button:hover { background: rgba(151, 185, 153, .12); color: var(--green); border-color: var(--line-strong); }
.room-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 26px; align-items: start; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 18px; }
.section-title-row h1, .section-title-row h2 { margin: 0; }
.section-title-row span { color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.post-card {
  padding: 22px;
  min-height: 260px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(13, 18, 15, .9), rgba(7, 10, 8, .74));
  border-radius: 17px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: .28s ease;
  position: relative;
  overflow: hidden;
}
.post-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.post-card.featured { grid-column: span 2; min-height: 300px; background: linear-gradient(120deg, rgba(17, 25, 19, .96), rgba(7, 10, 8, .72)), radial-gradient(circle at 10% 10%, rgba(119, 160, 123, .2), transparent 45%); }
.post-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 25%, rgba(194, 222, 193, .03) 50%, transparent 75%); transform: translateX(100%); transition: .6s; }
.post-card:hover::before { transform: translateX(-100%); }
.post-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.category-tag { color: var(--green); font-size: 11px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 9px; }
.post-date { color: #647068; font-size: 10px; direction: ltr; }
.post-card h3 { font-size: 21px; margin: 20px 0 9px; line-height: 1.55; }
.post-card p { color: var(--muted); margin: 0; font-size: 13px; }
.post-meta { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.author-chip { display: flex; align-items: center; gap: 9px; }
.mini-avatar { width: 31px; height: 31px; border-radius: 50%; background: #1d2a20; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--green); font-weight: 800; font-size: 12px; }
.author-chip div { display: flex; flex-direction: column; line-height: 1.4; }
.author-chip b { font-size: 12px; }
.author-chip small { color: var(--green-2); font-size: 9px; }
.discussion-count { color: var(--muted); font-size: 11px; }
.room-sidebar { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }
.protocol-card, .rank-card { padding: 22px; }
.protocol-card h3, .rank-card h3 { margin: 5px 0 15px; }
.protocol-card ol { list-style: none; padding: 0; margin: 0; }
.protocol-card li { display: grid; grid-template-columns: 32px 1fr; gap: 9px; border-top: 1px solid var(--line); padding: 12px 0; color: var(--muted); font-size: 12px; }
.protocol-card li b { color: var(--green); font-weight: 500; font-size: 10px; }
.rank-card { text-align: center; }
.rank-orbit { width: 90px; height: 90px; margin: 0 auto 10px; border: 1px dashed var(--line-strong); border-radius: 50%; display: grid; place-items: center; animation: spin 18s linear infinite; }
.rank-orbit span { font-size: 30px; animation: spin 18s linear reverse infinite; color: var(--green); }
.rank-card p { color: var(--muted); font-size: 12px; }
.rank-list { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.rank-list span { border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; color: #8ca08e; font-size: 10px; }
.empty-state { padding: 70px 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-state div { font-size: 42px; color: var(--green); }
.empty-state h3 { margin: 5px 0; }
.empty-state p { color: var(--muted); }

.back-button { margin: 0 0 22px; border: 0; background: none; color: var(--green); cursor: pointer; }
.single-post { max-width: 900px; margin: 0 auto; padding: clamp(25px, 5vw, 65px); }
.single-post .post-header { border-bottom: 1px solid var(--line); padding-bottom: 30px; margin-bottom: 32px; }
.single-post h1 { font-size: clamp(32px, 5vw, 58px); line-height: 1.45; margin: 16px 0; }
.single-post .lead { color: #a9b5aa; font-size: 17px; }
.single-post .post-body { white-space: pre-line; color: #c5cec5; font-size: 15px; line-height: 2.2; }
.single-post .post-author-box { margin-top: 45px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; display: flex; align-items: center; gap: 15px; }
.single-post .post-author-box .mini-avatar { width: 52px; height: 52px; }
.discussion-section { max-width: 900px; margin: 50px auto 0; }
.comment-form { padding: 18px; margin-bottom: 18px; }
.comment-form textarea { width: 100%; resize: vertical; border: 0; outline: 0; color: var(--text); background: transparent; }
.comment-form > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); padding-top: 13px; }
.comment-form small { color: var(--muted); }
.comment-item { padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: rgba(10, 14, 12, .72); margin-bottom: 10px; }
.comment-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comment-item p { color: #b8c2b9; white-space: pre-line; }

.store-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 25px 0; }
.store-toolbar select, .form-card select, .form-card input, .form-card textarea, .auth-form input {
  background: rgba(5, 8, 6, .8);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px;
  outline: 0;
}
.store-toolbar select:focus, .form-card input:focus, .form-card textarea:focus, .auth-form input:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(148, 183, 150, .06); }
.inventory-status { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; font-size: 11px; }
.inventory-status b { color: var(--green); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.product-card { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: rgba(10, 14, 12, .8); transition: .3s ease; }
.product-card:hover { transform: translateY(-5px); border-color: var(--line-strong); }
.product-image { aspect-ratio: 1 / 1.05; overflow: hidden; background: #080b09; position: relative; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.product-card:hover .product-image img { transform: scale(1.04); }
.stock-badge { position: absolute; top: 13px; right: 13px; border: 1px solid var(--line-strong); background: rgba(5, 8, 6, .82); backdrop-filter: blur(8px); border-radius: 999px; padding: 5px 9px; font-size: 10px; color: var(--green); }
.product-info { padding: 18px; }
.product-info .category { color: var(--green-2); font-size: 10px; letter-spacing: 1px; }
.product-info h3 { margin: 6px 0; font-size: 18px; }
.product-info p { color: var(--muted); font-size: 12px; min-height: 52px; }
.product-buy { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 15px; border-top: 1px solid var(--line); padding-top: 14px; }
.product-buy b { font-size: 15px; color: #d7e3d5; }
.product-buy button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(145, 177, 146, .12); cursor: pointer; font-size: 20px; }
.product-buy button:disabled { opacity: .35; cursor: not-allowed; }

.about-layout { min-height: 70vh; display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-copy > p { color: var(--muted); font-size: 16px; }
.about-copy blockquote { margin: 30px 0 0; border-right: 2px solid var(--green); padding: 18px 20px; color: #d8e2d7; background: rgba(123, 158, 126, .06); }
.manifesto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.manifesto-grid article { border: 1px solid var(--line); padding: 22px; min-height: 190px; background: rgba(10, 14, 12, .65); }
.manifesto-grid span { color: var(--green); font-size: 11px; }
.manifesto-grid h3 { font-size: 22px; margin: 18px 0 4px; }
.manifesto-grid p { color: var(--muted); font-size: 12px; }

.account-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.account-sidebar { position: sticky; top: calc(var(--header-h) + 25px); overflow: hidden; }
.account-identity { padding: 25px; text-align: center; border-bottom: 1px solid var(--line); }
.account-identity .large-avatar { width: 74px; height: 74px; margin: 0 auto 12px; border-radius: 50%; border: 1px solid var(--line-strong); background: radial-gradient(circle, #29382c, #101712); display: grid; place-items: center; font-size: 26px; color: var(--green); }
.account-identity h3 { margin: 0; }
.account-identity p { margin: 4px 0 0; color: var(--green); font-size: 11px; }
.account-sidebar nav { padding: 10px; display: grid; }
.account-sidebar nav button { text-align: right; border: 0; border-radius: 10px; background: none; color: var(--muted); padding: 11px; cursor: pointer; }
.account-sidebar nav button.active, .account-sidebar nav button:hover { color: var(--text); background: rgba(147, 180, 148, .08); }
.account-tab { display: none; }
.account-tab.active { display: block; animation: viewIn .3s ease; }
.form-card { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 22px; }
.form-card label, .auth-form label { display: grid; gap: 7px; color: #adb8ae; font-size: 12px; }
.form-card .full { grid-column: 1 / -1; }
.form-card textarea { resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.check-label { grid-template-columns: auto 1fr !important; align-items: center; justify-content: start; }
.check-label input { width: auto; }
.submission-note { color: var(--warning); background: rgba(188, 158, 94, .07); border: 1px solid rgba(188, 158, 94, .18); padding: 10px 12px; border-radius: 10px; font-size: 11px; }
.stack-list { display: grid; gap: 12px; }
.order-card, .admin-item { border: 1px solid var(--line); background: rgba(9, 13, 10, .75); border-radius: 14px; padding: 16px; }
.order-card header, .admin-item header { display: flex; justify-content: space-between; gap: 15px; align-items: start; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 10px; }
.order-card h3, .admin-item h3 { margin: 0; font-size: 15px; }
.order-card small, .admin-item small { color: var(--muted); }
.status-pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--green); font-size: 10px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.admin-header h1 { margin: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stat-card { border: 1px solid var(--line); border-radius: 14px; background: rgba(9, 13, 10, .7); padding: 16px; }
.stat-card span { color: var(--muted); font-size: 11px; }
.stat-card b { display: block; font-size: 25px; margin-top: 4px; }
.admin-tabs { display: flex; gap: 7px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 15px; }
.admin-tabs button { border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); padding: 10px 13px; cursor: pointer; }
.admin-tabs button.active { color: var(--green); border-color: var(--green); }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.admin-list { display: grid; gap: 10px; }
.admin-item p { color: var(--muted); font-size: 12px; white-space: pre-line; }
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.admin-actions button, .admin-actions select, .admin-actions input { border: 1px solid var(--line); background: #0a0e0b; color: var(--text); border-radius: 8px; padding: 7px 10px; font-size: 11px; }
.admin-actions button { cursor: pointer; }
.admin-actions .approve { color: var(--green); }
.admin-actions .danger { color: var(--danger); }
.admin-actions input { min-width: 170px; }

footer { border-top: 1px solid var(--line); padding: 30px clamp(18px, 5vw, 80px); display: grid; grid-template-columns: auto 1fr auto; gap: 35px; align-items: center; color: var(--muted); background: #050706; }
.footer-brand { display: flex; align-items: center; gap: 10px; direction: ltr; }
.footer-brand img { width: 42px; }
.footer-brand div { display: flex; flex-direction: column; line-height: 1.4; }
.footer-brand b { color: var(--text); letter-spacing: 1px; }
.footer-brand span, footer > span { font-size: 8px; letter-spacing: 2px; }
footer p { margin: 0; font-size: 11px; text-align: center; }

.drawer-backdrop, .modal-backdrop {
  position: fixed; inset: 0; z-index: 190; background: rgba(0,0,0,.68); backdrop-filter: blur(5px); opacity: 0; pointer-events: none; transition: .25s;
}
.drawer-backdrop.open, .modal-backdrop.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; z-index: 200; top: 0; bottom: 0; left: 0; width: min(440px, 94vw); background: #090d0a; border-right: 1px solid var(--line); transform: translateX(-105%); transition: .35s ease; padding: 20px; display: grid; grid-template-rows: auto 1fr auto; box-shadow: var(--shadow);
}
.cart-drawer.open { transform: none; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.drawer-header h2 { margin: 0; }
.drawer-header small { color: var(--green); letter-spacing: 2px; font-size: 9px; }
.drawer-header button, .modal-close { border: 1px solid var(--line); background: none; color: var(--muted); border-radius: 50%; width: 38px; height: 38px; font-size: 25px; cursor: pointer; }
.cart-items { overflow: auto; padding: 15px 0; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); padding: 12px 0; }
.cart-item img { width: 72px; height: 72px; border-radius: 9px; object-fit: cover; }
.cart-item h4 { margin: 0; font-size: 13px; }
.cart-item small { color: var(--muted); }
.qty-control { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
.qty-control button { border: 1px solid var(--line); background: none; color: var(--text); width: 25px; height: 25px; border-radius: 6px; cursor: pointer; }
.remove-cart { color: var(--danger); border: 0; background: none; cursor: pointer; }
.cart-summary { border-top: 1px solid var(--line); padding-top: 15px; }
.cart-summary > div { display: flex; justify-content: space-between; margin-bottom: 15px; }
.cart-summary .primary-button { width: 100%; }

.modal {
  position: fixed;
  z-index: 220;
  top: 50%; left: 50%;
  width: min(430px, calc(100vw - 28px));
  max-height: calc(100vh - 30px);
  overflow: auto;
  transform: translate(-50%, -46%) scale(.97);
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
  background: #0b100c;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.wide-modal { width: min(760px, calc(100vw - 28px)); }
.modal-close { position: absolute; left: 14px; top: 14px; }
.modal-brand { display: flex; align-items: center; gap: 10px; direction: ltr; color: var(--green); font-size: 9px; letter-spacing: 2px; }
.modal-brand img { width: 45px; }
.modal h2 { margin: 14px 0 4px; font-size: 29px; }
.modal > p { color: var(--muted); font-size: 12px; }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; margin: 20px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.auth-switch button { border: 0; background: none; color: var(--muted); padding: 10px; cursor: pointer; }
.auth-switch button.active { background: rgba(145, 177, 146, .12); color: var(--green); }
.auth-form { display: none; gap: 14px; }
.auth-form.active { display: grid; }
.auth-form .primary-button { margin-top: 5px; }

.toast-stack { position: fixed; z-index: 300; right: 18px; bottom: 18px; width: min(370px, calc(100vw - 36px)); display: grid; gap: 8px; }
.toast { background: #101612; border: 1px solid var(--line-strong); border-right: 3px solid var(--green); border-radius: 12px; padding: 12px 14px; box-shadow: 0 15px 45px rgba(0,0,0,.4); animation: toastIn .35s ease; font-size: 12px; }
.toast.error { border-right-color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateX(15px); } }

@media (max-width: 1050px) {
  .hero-symbol { left: -10vw; opacity: .35; }
  .room-layout { grid-template-columns: 1fr; }
  .room-sidebar { position: static; grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .account-shell { grid-template-columns: 220px 1fr; }
}

@media (max-width: 780px) {
  :root { --header-h: 68px; }
  .desktop-nav, #authButton { display: none; }
  .menu-button { display: grid; }
  .topbar { padding: 0 15px; }
  .brand span { font-size: 15px; }
  #homeView { padding: 100px 18px 35px; }
  .hero-copy h1 { letter-spacing: -2px; }
  .hero-symbol { width: 95vw; left: -40vw; top: 130px; }
  .portal-grid { grid-template-columns: 1fr; max-width: none; margin-top: 65px; }
  .portal-card { min-height: 230px; }
  .section-hero { align-items: start; flex-direction: column; }
  .room-toolbar { align-items: stretch; flex-direction: column; }
  .search-box { min-width: 0; }
  .post-grid { grid-template-columns: 1fr; }
  .post-card.featured { grid-column: auto; }
  .room-sidebar { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 1fr; }
  .manifesto-grid { gap: 8px; }
  .account-shell { grid-template-columns: 1fr; }
  .account-sidebar { position: static; }
  .account-sidebar nav { grid-template-columns: repeat(2, 1fr); }
  .form-card { grid-template-columns: 1fr; }
  .form-card .full { grid-column: auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  footer { grid-template-columns: 1fr; text-align: center; }
  .footer-brand { justify-content: center; }
}

@media (max-width: 500px) {
  .content-view { padding-right: 14px; padding-left: 14px; }
  .header-actions { gap: 6px; }
  .icon-button, .avatar-button, .menu-button { width: 39px; height: 39px; }
  .section-hero h1, .about-copy h1 { letter-spacing: -2px; }
  .store-toolbar { align-items: stretch; flex-direction: column; }
  .store-toolbar select { width: 100%; }
  .manifesto-grid { grid-template-columns: 1fr; }
  .comment-form > div { align-items: stretch; flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-actions { align-items: stretch; flex-direction: column; }
  .admin-actions > * { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* ===== UFOMagic PHP v2 — Formal graphic typography & post media ===== */
:root {
  --font-body: "Vazirmatn", "IRANSansX", "Dana", Tahoma, Arial, sans-serif;
  --font-display: "Noto Kufi Arabic", "Vazirmatn", Tahoma, sans-serif;
  --font-brand: "Cinzel", Georgia, serif;
}

body,
button,
input,
textarea,
select {
  font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
.section-title-row,
.modal h2,
.portal-card h2,
.admin-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.035em;
}

.brand span,
.footer-brand b,
.eyebrow,
.product-info .category,
.modal-brand,
.system-line b {
  font-family: var(--font-brand), var(--font-body);
}

.brand span { letter-spacing: 2.6px; }
.hero-copy h1 { font-weight: 800; letter-spacing: -.055em; text-wrap: balance; }
.section-hero h1,
.about-copy h1,
.single-post h1 { text-wrap: balance; }

.post-card.has-media { padding-top: 22px; }
.post-cover {
  height: 190px;
  margin: -22px -22px 20px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #070a08;
  position: relative;
  z-index: 1;
}
.post-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,7,6,.62), transparent 48%);
  pointer-events: none;
}
.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.72) contrast(1.08) brightness(.8);
  transition: transform .7s ease, filter .45s ease;
}
.post-card:hover .post-cover img {
  transform: scale(1.045);
  filter: saturate(.9) contrast(1.06) brightness(.92);
}
.post-card.featured .post-cover { height: 260px; }

.single-post-image {
  margin: 0 0 38px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #070a08;
  box-shadow: 0 28px 70px rgba(0,0,0,.34);
}
.single-post-image img {
  width: 100%;
  max-height: 620px;
  object-fit: cover;
  filter: saturate(.82) contrast(1.05);
}

.image-upload-field { position: relative; }
.image-upload-field > span:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}
.image-upload-field small { color: var(--muted); font-weight: 400; }
.image-upload-field input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.upload-dropzone {
  min-height: 112px;
  border: 1px dashed var(--line-strong);
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(151,185,153,.06), transparent 46%),
    rgba(5,8,6,.78);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  cursor: pointer;
  transition: .25s ease;
}
.upload-dropzone:hover {
  border-color: var(--green);
  background-color: rgba(14,20,16,.9);
  transform: translateY(-1px);
}
.upload-dropzone b { color: var(--green); font-size: 14px; }
.upload-dropzone em { color: var(--muted); font-style: normal; font-size: 10px; }

.post-image-preview {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  overflow: hidden;
  background: #060806;
}
.post-image-preview img {
  width: 100%;
  max-height: 330px;
  object-fit: cover;
}
.post-image-preview button {
  position: absolute;
  left: 12px;
  top: 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(5,7,6,.82);
  color: #e8ece8;
  padding: 7px 12px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.admin-post-thumb {
  width: 150px;
  height: 96px;
  object-fit: cover;
  float: right;
  margin: 0 0 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  filter: saturate(.75) contrast(1.05);
}
.admin-item::after { content: ""; display: table; clear: both; }

@media (max-width: 780px) {
  .post-cover,
  .post-card.featured .post-cover { height: 210px; }
  .image-upload-field > span:first-child { align-items: flex-start; flex-direction: column; gap: 3px; }
}

/* ===== UFOMagic launch polish — mobile, typography, community ===== */
:root {
  --font-body: "Vazirmatn", Tahoma, Arial, sans-serif;
  --font-display: "Vazirmatn", Tahoma, Arial, sans-serif;
  --font-brand: "Cinzel", Georgia, serif;
  --mobile-nav-h: 68px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}
body {
  min-height: 100dvh;
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.9;
  font-weight: 400;
  overscroll-behavior-y: none;
}
body, button, input, textarea, select { font-family: var(--font-body); }
button, [data-route], .portal-card { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: wait; opacity: .72; }
input, textarea, select { color: var(--text); }

h1, h2, h3, h4,
.section-title-row,
.modal h2,
.portal-card h2,
.admin-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.55;
}
.brand span,
.footer-brand b,
.eyebrow,
.modal-brand {
  font-family: var(--font-brand), var(--font-body);
}
.product-info .category,
.system-line b { font-family: var(--font-body); letter-spacing: 0; }
.hero-copy h1 { letter-spacing: -.04em; }
.hero-copy h1 em { -webkit-text-stroke-width: .7px; }
.hero-lead, .section-hero p, .post-card p, .product-info p, .about-copy > p { color: #aab5ab; }

.content-view { min-height: 100dvh; }
.topbar { padding-top: env(safe-area-inset-top); height: calc(var(--header-h) + env(safe-area-inset-top)); }
.mobile-menu { top: calc(var(--header-h) + env(safe-area-inset-top)); }

.community-pulse {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: -14px 0 18px;
}
.community-pulse article {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 15, 12, .56);
  backdrop-filter: blur(12px);
}
.community-pulse span { display: block; color: var(--muted); font-size: 11px; }
.community-pulse b { display: block; margin-top: 2px; font-size: 21px; color: #dce9dc; }

.admin-product-thumb {
  width: 96px;
  height: 112px;
  object-fit: cover;
  float: right;
  margin: 0 0 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #070a08;
}
.product-image-preview img { object-position: center; }

.analytics-shell { display: grid; gap: 18px; }
.analytics-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.analytics-summary article, .analytics-card {
  border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, rgba(13,18,15,.9), rgba(7,10,8,.72));
  padding: 18px;
}
.analytics-summary article { min-height: 118px; display: flex; flex-direction: column; justify-content: center; }
.analytics-summary small { color: var(--green); font-size: 9px; letter-spacing: 1.4px; direction: ltr; }
.analytics-summary b { font-size: 30px; margin: 4px 0; }
.analytics-summary span { color: var(--muted); font-size: 12px; }
.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr); gap: 14px; }
.analytics-card .section-title-row { margin-bottom: 18px; }
.analytics-bars { height: 240px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 9px; align-items: end; padding-top: 15px; }
.analytics-bar-item { height: 100%; display: grid; grid-template-rows: 24px 1fr 24px; align-items: end; text-align: center; gap: 5px; min-width: 0; }
.analytics-bar-item b { font-size: 10px; color: var(--muted); }
.analytics-bar-item i { display: block; width: min(32px, 72%); height: var(--bar); min-height: 6px; margin: 0 auto; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #b7d0b5, #6f9273); box-shadow: 0 0 25px rgba(138,180,142,.14); }
.analytics-bar-item span { font-size: 9px; color: var(--muted); white-space: nowrap; }
.top-pages { display: grid; gap: 15px; }
.top-page-row { display: grid; gap: 7px; }
.top-page-row > div { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.top-page-row b { font-size: 12px; }
.top-page-row span { font-size: 10px; color: var(--muted); }
.top-page-row > i { height: 6px; border-radius: 999px; background: rgba(180,210,180,.08); overflow: hidden; }
.top-page-row > i em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6e9271, #bfd7bd); }
.analytics-note { margin: 0; color: var(--muted); font-size: 10px; }

.mobile-bottom-nav { display: none; }

.modal {
  max-height: min(88dvh, 860px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal::-webkit-scrollbar { width: 5px; }
.modal::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }

@media (max-width: 780px) {
  :root { --header-h: 62px; }
  body { padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom)); }
  .noise { opacity: .018; }
  .scanlines { opacity: .055; }
  #signalCanvas { opacity: .22; }
  .topbar { padding-left: 12px; padding-right: 12px; }
  .brand img { width: 34px; height: 34px; }
  .brand span { font-size: 14px; letter-spacing: 1.5px; }
  .header-actions .cart-button { display: grid; }
  .header-actions .menu-button { display: grid; }

  #homeView {
    min-height: 100dvh;
    padding-top: calc(88px + env(safe-area-inset-top));
    padding-bottom: 24px;
  }
  .hero-copy { max-width: 100%; }
  .hero-copy h1 { font-size: clamp(35px, 10vw, 54px); line-height: 1.45; letter-spacing: -.035em; }
  .hero-lead { font-size: 14px; line-height: 2; margin: 20px 0; }
  .hero-symbol { opacity: .18; width: 92vw; left: -46vw; top: 120px; }
  .portal-grid { margin-top: 44px; gap: 12px; }
  .portal-card { min-height: 255px; padding: 20px; }
  .portal-card h2 { font-size: 24px; }

  .content-view {
    padding-top: calc(var(--header-h) + env(safe-area-inset-top) + 24px);
    padding-right: 14px;
    padding-left: 14px;
    padding-bottom: 34px;
  }
  .section-hero { gap: 18px; margin-bottom: 22px; }
  .section-hero h1, .about-copy h1 { font-size: clamp(30px, 8vw, 44px); }
  .section-hero .primary-button { width: 100%; justify-content: center; }

  .community-pulse {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 0;
  }
  .community-pulse article { padding: 11px 9px; text-align: center; }
  .community-pulse span { font-size: 9px; line-height: 1.6; min-height: 30px; }
  .community-pulse b { font-size: 18px; }

  .room-toolbar { padding: 12px; border-radius: 15px; }
  .filter-chips {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 3px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .filter-chips::-webkit-scrollbar { display: none; }
  .filter-chips button { flex: 0 0 auto; min-height: 40px; }
  .search-box input { min-width: 0; width: 100%; }

  .post-grid, .product-grid { gap: 12px; }
  .post-card, .product-card { border-radius: 15px; }
  .post-card { padding: 18px; }
  .post-cover, .post-card.featured .post-cover { margin: -18px -18px 16px; height: 205px; }
  .post-card h3 { font-size: 19px; }
  .post-meta { gap: 8px; align-items: flex-end; }
  .discussion-count { font-size: 10px; }

  .single-post { padding: 18px; border-radius: 16px; }
  .single-post h1 { font-size: clamp(27px, 8vw, 38px); }
  .single-post .lead { font-size: 14px; }
  .single-post .post-body { font-size: 15px; line-height: 2.05; }
  .discussion-section { margin-top: 20px; }

  .account-sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 8px;
    scrollbar-width: none;
  }
  .account-sidebar nav::-webkit-scrollbar { display: none; }
  .account-sidebar nav button { flex: 0 0 auto; min-width: 118px; text-align: center; }
  .account-content { min-width: 0; }
  .admin-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tabs button { flex: 0 0 auto; }
  .admin-item { padding: 14px; }
  .admin-item header { align-items: flex-start; gap: 8px; }
  .admin-post-thumb, .admin-product-thumb { float: none; width: 100%; height: 180px; margin: 0 0 12px; }

  .form-card, .auth-form { gap: 13px; }
  input, textarea, select { font-size: 16px !important; }
  input, select { min-height: 48px; }
  textarea { min-height: 110px; }
  .image-upload-field input[type="file"] { min-height: 0; }
  .upload-dropzone { min-height: 102px; padding: 14px; text-align: center; }
  .post-image-preview img { max-height: 270px; }

  .modal-backdrop { z-index: 210; }
  .modal {
    z-index: 220;
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    transform: translateY(105%);
    width: 100%;
    max-width: none;
    max-height: 91dvh;
    border-radius: 22px 22px 0 0;
    padding: 22px 16px calc(18px + env(safe-area-inset-bottom));
  }
  .modal.open { transform: translateY(0); }
  .wide-modal { width: 100%; }
  .modal-close { top: 12px; left: 12px; width: 42px; height: 42px; }

  .cart-drawer {
    width: 100%;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 180;
    right: 10px;
    left: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    height: var(--mobile-nav-h);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 7px;
    border: 1px solid rgba(176, 207, 176, .2);
    border-radius: 18px;
    background: rgba(7, 11, 8, .92);
    backdrop-filter: blur(20px);
    box-shadow: 0 14px 50px rgba(0,0,0,.45);
  }
  .mobile-bottom-nav button {
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #9aa69b;
    display: grid;
    place-content: center;
    gap: 1px;
    min-width: 0;
    min-height: 52px;
    padding: 3px;
  }
  .mobile-bottom-nav button:active { background: rgba(157,190,159,.1); color: var(--text); }
  .mobile-bottom-nav span { font-size: 20px; line-height: 1; }
  .mobile-bottom-nav small { font-size: 9px; }

  .toast-stack {
    right: 12px;
    bottom: calc(var(--mobile-nav-h) + 20px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
  }
}

@media (max-width: 420px) {
  .community-pulse { grid-template-columns: 1fr 1fr; }
  .community-pulse article:last-child { grid-column: 1 / -1; }
  .hero-footer { display: none; }
  .system-line { font-size: 11px; }
  .post-meta { flex-direction: column; align-items: stretch; }
  .discussion-count { text-align: left; }
  .stats-grid { grid-template-columns: 1fr; }
  .admin-actions { display: grid; grid-template-columns: 1fr; }
  .admin-actions > * { width: 100%; }
  .manifesto-grid { grid-template-columns: 1fr; }
}

.admin-health {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: -8px 0 18px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 15, 12, .55);
  color: #cbd6cb;
}
.admin-health .health-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.admin-health .health-dot.ok { background: #8fbd92; box-shadow: 0 0 15px rgba(143,189,146,.65); }
.admin-health .health-dot.bad { background: var(--danger); box-shadow: 0 0 15px rgba(199,127,120,.55); }
.admin-health b { font-size: 11px; }
.admin-health small { margin-right: auto; color: var(--muted); font-size: 9px; }
@media (max-width: 780px) {
  .mobile-bottom-nav button.active { background: rgba(157,190,159,.11); color: #e4eee4; }
  .admin-health { align-items: flex-start; flex-wrap: wrap; }
  .admin-health small { width: 100%; margin: 0; }
}

.security-card {
  margin-top: 14px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(180px, .75fr) 1.25fr;
  gap: 18px;
  align-items: center;
}
.security-card h3 { margin: 0 0 4px; }
.security-card p { margin: 0; color: var(--muted); font-size: 11px; }
.security-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.security-form input { min-width: 0; }
@media (max-width: 780px) {
  .security-card { grid-template-columns: 1fr; padding: 15px; }
  .security-form { grid-template-columns: 1fr; }
}


@media (max-width: 780px) {
  .analytics-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-summary article { min-height: 105px; padding: 14px; }
  .analytics-summary b { font-size: 25px; }
  .analytics-grid { grid-template-columns: 1fr; }
  .analytics-bars { height: 210px; gap: 5px; }
  .analytics-bar-item i { width: 70%; }
  .portal-card p { margin-top: 20px; }
  .portal-card > span { font-size: 12px; line-height: 1.8; padding-bottom: 12px; }
  .portal-card button { font-size: 12px; padding-top: 8px; }
}
@media (max-width: 420px) {
  .analytics-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .analytics-summary article { min-height: 94px; padding: 12px; }
  .analytics-summary b { font-size: 22px; }
  .analytics-bars { height: 180px; }
  .portal-card { min-height: 270px; }
}


/* ===== UFOMagic v5 — pinned post + account isolation ===== */
.post-tags { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.pinned-tag { display:inline-flex; align-items:center; gap:5px; padding:5px 9px; border:1px solid rgba(171,205,168,.32); border-radius:999px; background:rgba(119,160,123,.10); color:#cfe5cf; font-size:9px; font-weight:700; white-space:nowrap; }
.post-card.featured { border-color:rgba(158,197,158,.38); box-shadow:0 18px 65px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.025); }
.pinned-action { color:#d9ecd9 !important; border-color:rgba(154,198,156,.38) !important; }
[data-account-panel="admin"].hidden { display:none !important; }
@media (max-width: 700px) {
  .post-top { align-items:flex-start; gap:10px; }
  .post-tags { max-width:72%; }
}
