/* Folknity design reference: original dark navy surfaces, electric blue and soft violet.
   No full-page photo portraits; strong hierarchy, readable copy, restrained glow. */
:root,[data-theme="midnight"]{
 --bg:#0a1022;--panel:#121b34;--panel-2:#1a2744;--field:#172341;
 --text:#f2f6ff;--sub:#a6b5d5;--faint:#7384ab;--line:#293a5c;
 --accent:#668dff;--glow:rgba(99,126,255,.18);--shadow:0 18px 55px rgba(3,6,22,.27);
 --radius:19px;
}
body{background:var(--bg);font-family:Inter,Manrope,system-ui,-apple-system,'Segoe UI',sans-serif;font-size:14px}
body:before{background:radial-gradient(ellipse 48% 42% at 83% -12%,rgba(93,65,188,.12),transparent 80%),radial-gradient(ellipse 42% 30% at 2% 17%,rgba(45,113,235,.11),transparent 84%)}
.topbar{border-color:rgba(139,168,247,.11);background:color-mix(in srgb,var(--bg) 92%,transparent)}
.brand{font-weight:850;letter-spacing:-1.2px}.brand-icon{background:linear-gradient(145deg,#517cf2,#8c69df)}
.button{background:linear-gradient(110deg,#5488fa,#7764d9);border-color:#7391e7;box-shadow:0 4px 20px rgba(48,80,190,.17)}
.button.secondary{background:var(--panel-2);box-shadow:none}.button.secondary:hover{box-shadow:0 0 0 1px rgba(130,160,255,.35)}
.button:focus-visible,a:focus-visible,button:focus-visible{outline:3px solid #97bcff;outline-offset:3px}
.top-actions .icon-link,.side-icon,.mobile-nav a{font-weight:900}.side-icon{font-size:26px;line-height:1}
.side-link{font-size:13px;padding:13px 15px}.side-link.current{background:rgba(102,141,255,.14)}
.post-card,.card,.widget,.space-card,.auth-card,.stat-card{background:var(--panel);border-color:var(--line)}
.post-card{border-radius:18px;overflow:hidden;box-shadow:0 9px 30px rgba(2,8,25,.12)}
.post-media{background:#080f22}.post-media img{display:block;width:100%;object-fit:cover}
.post-actions .chip{font-size:14px;font-weight:800;min-height:40px}.post-actions form .chip{font-size:14px}
.post-identity{font-weight:700}.post-identity strong{font-weight:850}
.verified{background:#2886ee;border-radius:6px;transform:rotate(45deg)}.verified::first-letter{transform:rotate(-45deg)}
.profile-shell.folknity-profile{position:relative;margin:3px 0 20px;background:linear-gradient(135deg,rgba(30,48,92,.72),rgba(16,27,53,.9));border:1px solid var(--line);border-radius:22px;overflow:hidden}
.profile-shell.folknity-profile:before{content:"";display:block;position:absolute;top:-62px;right:-62px;width:240px;height:240px;border:1px solid rgba(130,155,250,.14);border-radius:50%;pointer-events:none}
.folknity-profile .profile-inner{padding:27px 30px 29px}.folknity-profile .profile-top{margin:0 0 14px;align-items:center}
.folknity-profile .avatar{border:3px solid #4e74e9;border-radius:50%;object-fit:cover;box-shadow:0 8px 26px rgba(58,100,235,.2)}
.folknity-profile .profile-stats{border-top:1px solid var(--line);padding-top:20px;margin-top:22px;display:flex;gap:6px}
.folknity-profile .profile-stats>*{flex:1;min-width:0;text-align:center;display:flex;flex-direction:column;gap:3px}
.folknity-profile .profile-stats>a{border-radius:12px;padding:6px 1px;transition:background .2s}
.folknity-profile .profile-stats>a:hover{background:rgba(99,140,250,.1)}
.folknity-profile .profile-stats strong{font-size:22px;letter-spacing:-.4px}
.folknity-profile .profile-stats span{color:var(--sub);font-size:12px}
.settings-hub{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:18px}
.settings-tile{padding:19px;display:flex;align-items:center;gap:14px;text-align:left;transition:border-color .2s,transform .2s}
.settings-tile:hover{border-color:#789ef4;transform:translateY(-2px)}
.settings-tile-icon{border:1px solid #4866a4;color:#a7baf8;background:#263354;width:42px;height:42px;border-radius:13px;display:grid;place-items:center;flex:none;font-size:23px}
.settings-tile span:nth-child(2){flex:1;min-width:0}.settings-tile strong,.settings-tile small{display:block}.settings-tile small{font-size:11px;color:var(--sub);margin-top:6px;line-height:1.5}
.connection-row{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:12px 0;gap:9px}.connection-row:last-child{border:0}.connection-row strong{font-weight:800}
.landing-screen{display:grid;grid-template-columns:1.15fr .85fr;gap:35px;min-height:calc(100vh - 170px);align-items:center;padding:3vw 0}
.landing-words h1{font-size:clamp(70px,9vw,124px);font-weight:900;line-height:1.1;letter-spacing:-7px;margin:14px 0 10px}
.landing-words h2{font-size:clamp(25px,3vw,43px);letter-spacing:-1.6px;font-weight:800;margin:0 0 25px;background:linear-gradient(95deg,#eaf3ff,#819cfe 67%,#b38bf1);background-clip:text;color:transparent}
.landing-words p{font-size:16px;color:var(--sub);line-height:1.8;max-width:540px;margin-bottom:28px}
.landing-tags{display:flex;gap:12px;flex-wrap:wrap;margin-top:35px;color:#a9bbee}.landing-tags span{background:#192644;border:1px solid #2e436b;border-radius:14px;padding:10px 12px;font-weight:700;font-size:12px}
.landing-world{width:min(39vw,460px);aspect-ratio:1;margin:auto;position:relative;display:grid;place-items:center;background:radial-gradient(circle at center,rgba(87,107,248,.17),transparent 59%)}
.world-ring{position:absolute;inset:11%;border:1px solid rgba(123,153,255,.25);border-radius:50%}.ring-one{transform:rotate(-20deg) scaleX(.78)}.ring-two{transform:rotate(53deg) scaleX(.78)}
.world-core{width:44%;height:44%;display:grid;place-items:center;border-radius:38%;font-size:105px;color:#d0d9ff;background:radial-gradient(circle at 30% 15%,#708ff2,#29397b 70%);border:1px solid #859bfb;box-shadow:0 20px 95px rgba(73,96,240,.22);transform:rotate(-9deg)}
.world-tag{position:absolute;padding:9px 13px;background:#142343;border:1px solid #4a6299;border-radius:22px;font-size:11px;font-weight:800;box-shadow:var(--shadow);white-space:nowrap}
.world-tag.t1{top:11%;right:-8%}.world-tag.t2{bottom:14%;left:-11%}.world-tag.t3{bottom:18%;right:-15%}
.mobile-admin-link{display:none}.auth-intro .intro-orbit{font-size:76px}.auth-intro h1{font-size:clamp(45px,4.4vw,69px)}
@media(max-width:1000px){.settings-hub{grid-template-columns:1fr}.landing-screen{grid-template-columns:1fr;min-height:auto;padding:70px 0 30px}.landing-world{width:340px;margin-top:30px}.landing-words h1{font-size:76px}}
@media(max-width:720px){.landing-screen{padding:20px 0 35px;gap:5px}.landing-words h1{font-size:66px;letter-spacing:-3px}.landing-words h2{font-size:25px}.landing-world{width:270px}.world-core{font-size:67px}.world-tag{font-size:10px}.landing-tags{margin-top:20px}.settings-hub{gap:10px}.settings-tile{padding:14px}.folknity-profile .profile-inner{padding:19px 16px}.folknity-profile .profile-stats strong{font-size:18px}.folknity-profile .profile-stats span{font-size:10px}.mobile-admin-link{display:block;position:fixed;right:14px;bottom:calc(78px + env(safe-area-inset-bottom));padding:10px 15px;border:1px solid #5f8ee9;background:linear-gradient(95deg,#1b387b,#3b3a89);border-radius:25px;font-size:12px;font-weight:850;color:#fff!important;z-index:155;box-shadow:0 9px 31px #060c23a8}.mobile-admin-link:hover{transform:translateY(-2px)}.public-main{padding:22px 17px}.landing-tags span{padding:8px 10px}}
@media(prefers-reduced-motion:reduce){.settings-tile:hover,.mobile-admin-link:hover{transform:none}}

.f-icon{width:24px;height:24px;display:block;flex:none}.icon-link .f-icon{width:25px;height:25px}.side-icon .f-icon{width:25px;height:25px}.mobile-nav .f-icon{width:26px;height:26px}.mobile-nav .mobile-create .f-icon{width:29px;height:29px}.mobile-admin-link .f-icon{width:17px;height:17px;display:inline-block;vertical-align:middle;margin-right:7px}
.verified{display:inline-flex;background:none!important;border:0;width:18px;height:18px;margin:0 3px;transform:none!important;vertical-align:middle;box-shadow:none}.verified svg{width:18px;height:18px;display:block}.side-link.current .f-icon{stroke-width:2.8}
.event-card{display:flex;gap:20px;align-items:center;margin-bottom:13px}.event-date{min-width:68px;background:#233357;border-radius:12px;padding:11px;text-align:center}.event-date strong{font-size:24px;display:block}.event-date span{font-size:10px;color:var(--sub)}.event-card p{font-size:12px;color:var(--sub);max-width:580px}.event-card .inline-form{margin-left:auto}.event-list{margin-top:17px}
@media(max-width:720px){.event-card{flex-wrap:wrap;gap:12px}.event-card .inline-form{margin-left:0}.mobile-admin-link{display:flex;align-items:center}}

.folknity-new-message-toast{position:fixed;right:20px;bottom:90px;background:linear-gradient(115deg,#203a79,#493b99);border:1px solid #698de9;border-radius:15px;padding:13px 19px;color:white;box-shadow:0 15px 40px #020817a6;z-index:400;font-size:13px;font-weight:700;cursor:pointer}
@media(max-width:720px){.folknity-new-message-toast{right:14px;left:14px;bottom:145px}}
