@font-face {
  font-family: Manrope;
  src: url("/assets/fonts/Manrope.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  font-family: Manrope, system-ui, sans-serif;
  color-scheme: dark;
  --bg: #090909;
  --surface: #141414;
  --raised: #1b1b1b;
  --line: #323232;
  --line-soft: #242424;
  --text: #f5f5f3;
  --muted: #a5a5a3;
  --quiet: #7f7f7d;
  --inverse: #101010;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--bg); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
::selection { color: #111; background: #fff; }
.ambient { position: fixed; z-index: 0; pointer-events: none; border-radius: 50%; filter: blur(90px); }
.ambient-a { width: 330px; height: 330px; top: -180px; right: -170px; background: #4d4d4d; opacity: .13; }
.ambient-b { width: 320px; height: 320px; bottom: 8%; left: -220px; background: #666; opacity: .08; }
.shell { position: relative; z-index: 1; width: min(100%, 560px); min-height: 100vh; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 22px calc(112px + env(safe-area-inset-bottom)); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; letter-spacing: -.07em; white-space: nowrap; }
.brand-mark { display: block; width: 35px; height: 35px; padding: 6px; border: 1px solid #5b5b5b; border-radius: 11px; background: #141414; }
.brand-accent { color: #a2a2a2; }
.eyebrow, .kicker, .card-label { font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow { max-width: 58%; color: #d6d6d5; border: 1px solid #414141; border-radius: 999px; padding: 8px 10px; text-align: center; line-height: 1.35; }
.eyebrow.stale { border-style: dashed; }
.page { display: none; animation: pageIn .35s ease both; }
.page.active { display: block; }
.hero { margin-top: 27px; }
.hero-art { position: relative; display: grid; place-items: center; height: 240px; overflow: hidden; border: 1px solid #3a3a3a; border-radius: 26px; background: radial-gradient(circle at 50% 50%, #262626, #111 43%, #080808 75%); isolation: isolate; }
.hero-art::before, .hero-art::after { content: ""; position: absolute; width: 310px; height: 310px; border: 1px solid #3a3a3a; border-radius: 50%; transform: rotate(-24deg) scaleY(.46); }
.hero-art::before { animation: orbit 13s ease-in-out infinite alternate; }
.hero-art::after { width: 390px; height: 390px; border-color: #252525; animation: orbit 18s ease-in-out infinite alternate-reverse; }
.hero-art img { position: relative; z-index: 1; width: 132px; height: 132px; filter: drop-shadow(0 0 22px #ffffff44); animation: markFloat 5s ease-in-out infinite; }
.hero-copy { position: relative; margin: -22px 6px 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #4a4a4a; border-radius: 999px; color: #ededeb; background: #1c1c1c; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.live-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #ffffff15; animation: dotPulse 2.4s ease-in-out infinite; }
h1 { margin: 18px 0 13px; font-size: clamp(34px, 8.2vw, 46px); font-weight: 800; letter-spacing: -.075em; line-height: 1.12; }
h1 em { font-style: normal; color: #bdbdbb; }
p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.hero-copy p { max-width: 385px; font-size: 14px; }
.access-card, .feed-card, .info-card, .profile-card { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.access-card { margin-top: 28px; padding: 21px; }
.card-label, .kicker { color: #bfbfbd; }
.access-card h2 { margin: 9px 0 8px; font-size: 23px; letter-spacing: -.05em; }
.access-card p { margin-bottom: 17px; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 11px 16px; border-radius: 12px; font-size: 13px; font-weight: 800; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.primary { border: 1px solid #fff; color: var(--inverse); background: #f4f4f2; }
.primary:hover { background: #dcdcd9; }
.primary:disabled { border-color: #555; background: #555; color: #c8c8c6; }
.secondary { border: 1px solid #646464; color: var(--text); background: #222; }
.secondary:hover { background: #333; }
.primary:active, .secondary:active, .nav-item:active { transform: scale(.97); }
.wide { width: 100%; }
.plan-row { display: flex; gap: 9px; }
.plan { flex: 1; padding: 13px; border: 1px solid #3b3b3b; border-radius: 12px; text-align: left; color: var(--text); background: #1c1c1c; }
.plan b, .plan small { display: block; }
.plan b { font-size: 16px; }
.plan small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.plan:disabled { opacity: .7; }
.muted-note { display: block; margin-top: 10px; color: var(--quiet); font-size: 11px; line-height: 1.5; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 30px 2px 14px; }
.section-head h2 { margin: 0; font-size: 17px; letter-spacing: -.03em; }
.section-head span { color: var(--quiet); font-size: 10px; letter-spacing: .12em; }
.steps { display: grid; gap: 8px; }
.step { display: flex; gap: 16px; align-items: center; padding: 15px 16px; border: 1px solid var(--line-soft); border-radius: 14px; background: #101010; }
.step > span { color: #f1f1ef; font-size: 11px; font-weight: 800; }
.step b, .step small { display: block; }
.step b { font-size: 12px; }
.step small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.page-intro { margin-top: 39px; }
.page-intro h1 { margin: 9px 0 10px; }
.page-intro p { font-size: 14px; }
.period { color: #a8a8a6; }
.quota { display: flex; justify-content: space-between; margin: 28px 0 12px; color: var(--muted); font-size: 12px; }
.quota strong { color: var(--text); }
.feed-list { display: grid; gap: 11px; margin-bottom: 15px; }
.empty { padding: 31px 22px; border: 1px dashed #555; border-radius: 19px; text-align: center; background: #121212; }
.empty-icon { margin-bottom: 7px; color: #fff; font-size: 32px; }
.empty b { display: block; font-size: 14px; }
.empty p { margin-top: 5px; font-size: 12px; }
.feed-card { padding: 18px; }
.feed-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.feed-card h3 { margin: 0; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.feed-card .feed-url { margin: 9px 0 13px; color: #a8a8a6; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.badge { flex: 0 0 auto; padding: 6px 9px; border: 1px solid #666; border-radius: 999px; color: #f0f0ee; font-size: 9px; font-weight: 800; letter-spacing: .05em; white-space: nowrap; }
.badge.off { border-color: #404040; color: #aaa; }
.badge.error { border-style: dashed; }
.badge.warning { border-color: #aaa; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; color: #c2c2c0; font-size: 11px; line-height: 1.5; }
.feed-meta span + span::before { content: "·"; margin-right: 10px; color: #777; }
.feed-schedule { display: grid; gap: 3px; margin-top: 12px; }
.feed-schedule small { color: var(--muted); font-size: 11px; }
.feed-error, .feed-warning { margin: 13px 0 0; padding-left: 11px; border-left: 2px solid #aaa; color: #e3e3e1; font-size: 11px; line-height: 1.55; }
.feed-warning { border-color: #666; color: #c5c5c3; }
.feed-actions { display: flex; gap: 9px; margin-top: 15px; }
.feed-actions button { flex: 1; min-height: 40px; padding: 9px; border: 1px solid #454545; border-radius: 10px; color: var(--text); background: #202020; font-size: 11px; font-weight: 700; }
.feed-actions button:hover, .admin-actions button:hover { background: #303030; }
.feed-actions .danger { color: #c4c4c2; }
.text-button { min-height: 42px; padding: 11px 4px; border: 0; color: #e8e8e6; background: transparent; font-size: 12px; font-weight: 700; }
.text-button:hover { text-decoration: underline; }
.profile-card { display: flex; align-items: center; gap: 14px; margin-top: 26px; padding: 17px; }
.avatar { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #686868; border-radius: 14px; color: #fff; background: #222; font-size: 20px; font-weight: 800; }
.profile-card b, .profile-card small { display: block; }
.profile-card b { font-size: 14px; }
.profile-card small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.info-card { display: grid; gap: 6px; margin-top: 10px; padding: 18px; }
.info-card span, .info-card small { color: var(--muted); font-size: 11px; }
.info-card b { font-size: 14px; }
.support-row { display: flex; justify-content: space-between; margin-top: 14px; padding: 18px 2px; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 13px; }
.support-cta { display: inline-block; margin-top: 13px; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; font-weight: 700; }
.bottom-nav { position: fixed; z-index: 5; bottom: 0; left: 50%; display: flex; justify-content: space-around; width: min(100%, 560px); transform: translateX(-50%); padding: 11px 8px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #333; background: #111111f2; backdrop-filter: blur(18px); }
.nav-item { display: flex; flex: 1; min-width: 0; flex-direction: column; align-items: center; gap: 5px; padding: 0 2px; border: 0; color: #929290; background: transparent; font-size: 10px; font-weight: 700; transition: color .18s ease, transform .18s ease; }
.nav-icon { display: grid; place-items: center; width: 42px; height: 33px; border-radius: 10px; transition: background .18s ease; }
.nav-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.selected { color: #fff; }
.nav-item.selected .nav-icon { background: #303030; }
#admin-tab[hidden] { display: none !important; }
.notice { position: fixed; z-index: 40; top: calc(64px + env(safe-area-inset-top)); left: 50%; width: min(90%, 450px); padding: 13px 15px; transform: translate(-50%, -10px); border: 1px solid #666; border-radius: 12px; color: #fff; background: #252525; font-size: 12px; line-height: 1.5; opacity: 0; pointer-events: none; text-align: center; transition: opacity .2s ease, transform .2s ease; }
.notice.show { transform: translate(-50%, 0); opacity: 1; }
.notice.error { border-style: dashed; }
.modal { position: fixed; z-index: 20; inset: 0; display: none; }
.modal.open { display: block; }
.scrim { position: absolute; inset: 0; background: #000c; }
.sheet { position: absolute; bottom: 0; left: 50%; width: min(100%, 560px); max-height: 90dvh; padding: 13px 21px calc(25px + env(safe-area-inset-bottom)); transform: translateX(-50%); overflow: auto; overscroll-behavior: contain; border: 1px solid #454545; border-radius: 24px 24px 0 0; background: #171717; animation: sheetIn .28s cubic-bezier(.2,.7,.2,1) both; }
.sheet-handle { width: 38px; height: 4px; margin: 0 auto 18px; border-radius: 99px; background: #5a5a5a; }
.sheet-header { display: flex; justify-content: space-between; align-items: start; }
.sheet-header h2 { margin: 0 0 16px; font-size: 20px; letter-spacing: -.05em; }
.close { margin: -3px 0 12px; padding: 0 5px; border: 0; color: #d8d8d6; background: transparent; font-size: 26px; }
label { display: block; margin: 14px 0 7px; color: #d2d2d0; font-size: 11px; font-weight: 700; }
input, select { display: block; width: 100%; min-height: 49px; padding: 12px 13px; border: 1px solid #535353; border-radius: 11px; outline: none; color: #fff; background: #101010; font-size: 16px; }
input::placeholder { color: #777; }
select, select option { color-scheme: dark; color: #fff; background: #101010; }
form .primary { margin-top: 21px; }
.help { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.code { margin: 16px 0; padding: 17px; overflow-wrap: anywhere; border: 1px dashed #777; border-radius: 12px; color: #fff; background: #101010; font-size: clamp(17px, 6vw, 23px); font-weight: 800; letter-spacing: .12em; text-align: center; user-select: text; }
#group-copy { margin-bottom: 8px; }
.groups-list { margin-top: 10px; }
.groups-list .section-head { margin-top: 20px; }
.group-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.group-row span { min-width: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 700; }
.group-row button { flex: 0 0 auto; min-height: 38px; padding: 8px 11px; border: 1px solid #555; border-radius: 9px; color: #ddd; background: #252525; font-size: 11px; font-weight: 700; }
.group-row button:disabled { opacity: .5; }
.admin-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 18px 0; }
.admin-stats span, .admin-section { padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.admin-stats span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.admin-stats b { display: block; margin-top: 5px; overflow-wrap: anywhere; color: var(--text); font-size: 19px; }
.admin-section { margin: 13px 0; }
.admin-section h2 { margin: 0 0 11px; font-size: 17px; letter-spacing: -.03em; }
.admin-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.admin-status { margin-bottom: 11px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.admin-status b { color: var(--text); }
.admin-row { padding: 13px 0; border-top: 1px solid var(--line-soft); }
.admin-row b, .admin-row small { display: block; overflow-wrap: anywhere; }
.admin-row b { font-size: 12px; }
.admin-row small { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.admin-row .admin-error { color: #f0f0ee; }
.admin-row .admin-warning { color: #c8c8c6; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.admin-actions button, .admin-heading button { min-height: 38px; padding: 8px 10px; border: 1px solid #555; border-radius: 9px; color: var(--text); background: #222; font-size: 11px; font-weight: 700; }
.admin-actions .danger { border-style: dashed; color: #cececc; }
.admin-checkbox { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.admin-checkbox input { width: auto; min-height: 0; margin: 0; accent-color: #fff; }
.admin-load { margin-top: 14px; }
.admin-refresh { margin-top: 8px; }
.admin-skeleton { height: 88px; margin: 12px 0; border-radius: 15px; background: linear-gradient(100deg, #151515 20%, #333 48%, #151515 76%); background-size: 220% 100%; animation: shimmer 1.6s linear infinite; }
.app-loader { position: fixed; z-index: 15; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; background: radial-gradient(circle at 50% 43%, #202020, #090909 55%); }
body.booting .app-loader { display: flex; }
body.booting .page, body.booting .bottom-nav { opacity: 0; pointer-events: none; }
.loader-symbol { position: relative; display: grid; place-items: center; width: 106px; height: 106px; margin-bottom: 27px; }
.loader-symbol img { width: 65px; height: 65px; animation: markFloat 3s ease-in-out infinite; }
.loader-ring { position: absolute; inset: 0; border: 1px solid #454545; border-top-color: #fff; border-radius: 50%; animation: spin 1.5s linear infinite; }
.app-loader b { font-size: 20px; letter-spacing: -.05em; }
.app-loader p { margin: 10px 0 19px; font-size: 13px; }
.app-loader.is-error p { max-width: 320px; }
.loader-track { width: min(210px, 65vw); height: 2px; overflow: hidden; border-radius: 3px; background: #3a3a3a; }
.loader-track span { display: block; width: 40%; height: 100%; background: #fff; animation: travel 1.5s ease-in-out infinite; }
.app-loader #loader-retry { margin-top: 20px; }
.app-loader.is-error .loader-ring, .app-loader.is-error .loader-symbol img { animation: none; }
body.status-loading:not(.booting)::after { content: ""; position: fixed; z-index: 30; top: 0; left: 0; width: 35%; height: 2px; background: #fff; animation: travel 1.2s ease-in-out infinite; }
body.modal-open { overflow: hidden; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
html, .sheet { scrollbar-color: #555 #111; scrollbar-width: thin; }

@keyframes pageIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes sheetIn { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
@keyframes orbit { to { transform: rotate(20deg) scaleY(.48); } }
@keyframes markFloat { 50% { transform: translateY(-6px); } }
@keyframes dotPulse { 50% { box-shadow: 0 0 0 7px #ffffff08; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes travel { from { transform: translateX(-120%); } to { transform: translateX(340%); } }
@keyframes shimmer { to { background-position-x: -220%; } }

@media (max-width: 360px) {
  .shell { padding-left: 15px; padding-right: 15px; }
  .brand { font-size: 17px; }
  .eyebrow { font-size: 8px; }
  .hero-art { height: 210px; }
  .feed-meta { gap: 4px 7px; }
  .feed-meta span + span::before { margin-right: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .page, .sheet, .hero-art::before, .hero-art::after, .hero-art img,
  .live-dot, .loader-symbol img, .loader-ring, .loader-track span,
  body.status-loading::after, .admin-skeleton { animation: none !important; }
  .primary, .secondary, .nav-item, .notice { transition: none; }
}
