*{box-sizing:border-box;margin:0;padding:0}

:root{
--bg:#020202;
--panel:#090b11;
--panel-soft:#0f1420;
--line:rgba(255,255,255,.08);
--text:#f3f6fb;
--muted:#9aa4b5;
--brand:#2f6bff;
--brand-strong:#8eb6ff;
--brand-soft:rgba(47,107,255,.16);
--app-max:420px;
--topbar-h:44px;
--nav-h:54px;
--desktop-nav-w:78px;
--desktop-rail-w:220px;
}

html,body{
height:100%;
background:#000;
}

html{
scroll-behavior:smooth;
}

body{
background:radial-gradient(circle at top,#0d1730 0%,#05070e 32%,#000 100%);
color:var(--text);
font-family:'Inter',sans-serif;
overflow:hidden;
display:flex;
justify-content:center;
color-scheme:dark;
}

button,input,select,textarea{
font:inherit;
}

button{
appearance:none;
}

a{
color:inherit;
text-decoration:none;
}

.hidden{
display:none!important;
}

.nowrap{
white-space:nowrap;
}

.app{
position:relative;
width:100%;
max-width:var(--app-max);
height:100dvh;
min-height:100dvh;
background:linear-gradient(180deg,rgba(9,13,24,.78) 0%,rgba(4,5,10,.96) 18%,#000 100%);
display:flex;
flex-direction:column;
overflow:hidden;
isolation:isolate;
}

.authGate{
position:absolute;
inset:0;
display:flex;
justify-content:center;
align-items:stretch;
padding:0;
background:
radial-gradient(circle at top right,rgba(73,122,255,.18),transparent 30%),
linear-gradient(180deg,#071122 0%,#040913 38%,#020202 100%);
z-index:120;
}

.authShell{
width:100%;
max-width:var(--app-max);
min-height:100dvh;
padding:calc(32px + env(safe-area-inset-top)) 24px calc(26px + env(safe-area-inset-bottom));
display:flex;
flex-direction:column;
gap:20px;
position:relative;
overflow:hidden;
}

.authSlides{
flex:1;
display:flex;
overflow:hidden;
position:relative;
}

.authSlide{
width:100%;
min-width:100%;
display:none;
flex-direction:column;
justify-content:center;
padding-top:12px;
gap:14px;
position:relative;
z-index:1;
}

.authSlideActive{
display:flex;
animation:authFade .28s ease;
}

.authEyebrow{
font-size:11px;
font-weight:800;
letter-spacing:.24em;
text-transform:uppercase;
color:#90b4ff;
}

.authSlide h1{
font-size:42px;
line-height:.98;
letter-spacing:-.05em;
max-width:320px;
}

.authSlide p{
font-size:17px;
line-height:1.5;
color:#c7d2e5;
max-width:260px;
}

.authMinimalBlock{
margin-top:18px;
display:flex;
flex-direction:column;
gap:12px;
width:100%;
max-width:260px;
}

.authMinimalBlock span{
display:inline-flex;
align-items:center;
gap:10px;
width:fit-content;
padding:8px 14px;
border-radius:999px;
font-size:13px;
line-height:1.4;
color:#d9e4f8;
background:rgba(255,255,255,.04);
border:1px solid rgba(255,255,255,.08);
}

.authMinimalBlock span::before{
content:"";
width:6px;
height:6px;
border-radius:999px;
background:#8eb6ff;
}

.authFooter{
display:flex;
flex-direction:column;
gap:16px;
position:relative;
z-index:1;
}

.authDots{
display:flex;
gap:10px;
justify-content:center;
}

.authDot{
width:10px;
height:10px;
border-radius:999px;
border:none;
background:rgba(255,255,255,.22);
cursor:pointer;
transition:transform .22s ease,background .22s ease,width .22s ease;
}

.authDotActive{
width:28px;
background:#8eb6ff;
}

.authActions{
display:grid;
grid-template-columns:88px minmax(0,1fr);
gap:12px;
}

.authGhostBtn,
.authPrimaryBtn{
min-height:50px;
border-radius:16px;
font-size:14px;
font-weight:800;
letter-spacing:.02em;
}

.authGhostBtn{
background:rgba(255,255,255,.03);
}

.authCard{
padding:26px 22px 22px;
gap:18px;
border-radius:28px;
background:
linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,.03)),
rgba(8,12,22,.78);
border:1px solid rgba(255,255,255,.10);
box-shadow:0 24px 60px rgba(0,0,0,.34);
}

.authCard h3{
font-size:32px;
letter-spacing:-.04em;
}

.authLoginTop{
display:flex;
flex-direction:column;
gap:10px;
}

.authLoginCard .mutedText{
font-size:14px;
line-height:1.6;
}

.authInput{
min-height:54px;
border-radius:20px;
background:rgba(255,255,255,.05);
border-color:rgba(255,255,255,.09);
}

.authSubmitBtn{
min-height:54px;
border-radius:20px;
font-size:14px;
font-weight:800;
}

.otpGroup{
display:grid;
grid-template-columns:repeat(6,minmax(0,1fr));
gap:10px;
}

.otpDigit{
width:100%;
min-height:54px;
border-radius:18px;
border:1px solid rgba(255,255,255,.10);
background:rgba(255,255,255,.05);
color:var(--text);
text-align:center;
font-size:22px;
font-weight:800;
outline:none;
transition:border-color .22s ease,background .22s ease,box-shadow .22s ease,transform .18s ease;
}

.otpDigit:focus{
border-color:rgba(47,107,255,.52);
box-shadow:0 0 0 4px rgba(47,107,255,.14);
background:rgba(255,255,255,.07);
transform:translateY(-1px);
}

.authLoginMeta{
display:flex;
align-items:center;
justify-content:space-between;
gap:12px;
font-size:12px;
line-height:1.4;
color:#9fb0cb;
}

.authLoginMeta span{
display:block;
}

.authInlineBtn{
align-self:flex-start;
font-size:12px;
font-weight:700;
letter-spacing:.04em;
}

@keyframes authFade{
from{
opacity:0;
transform:translateY(10px);
}
to{
opacity:1;
transform:translateY(0);
}
}

.topbar{
height:calc(var(--topbar-h) + env(safe-area-inset-top));
padding:env(safe-area-inset-top) 20px 0;
background:linear-gradient(180deg,rgba(8,13,28,.98) 0%,rgba(7,9,16,.95) 64%,rgba(0,0,0,.92) 100%);
border-bottom:1px solid rgba(255,255,255,.04);
display:flex;
align-items:center;
justify-content:flex-start;
position:relative;
z-index:12;
backdrop-filter:blur(14px);
box-shadow:0 12px 24px rgba(0,0,0,.18);
}

.logo{
font-weight:800;
font-size:11px;
letter-spacing:.26em;
color:#eef4ff;
}

.toast{
position:fixed;
bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 18px);
left:50%;
transform:translateX(-50%);
width:min(360px,calc(100vw - 28px));
padding:14px 16px;
border-radius:18px;
background:rgba(15,18,28,.94);
border:1px solid rgba(255,255,255,.08);
color:#e8f1ff;
font-size:13px;
line-height:1.5;
box-shadow:0 18px 40px rgba(0,0,0,.32);
backdrop-filter:blur(18px);
z-index:90;
opacity:1;
transition:opacity .24s ease,transform .24s ease;
}

.toast.hidden{
display:block!important;
opacity:0;
transform:translate(-50%,18px);
pointer-events:none;
}

.feed{
flex:1;
height:calc(100dvh - var(--topbar-h) - env(safe-area-inset-top));
overflow-y:auto;
overflow-x:hidden;
scroll-snap-type:y mandatory;
scroll-behavior:smooth;
-webkit-overflow-scrolling:touch;
overscroll-behavior-y:contain;
}

.card{
height:calc(100dvh - var(--topbar-h) - env(safe-area-inset-top));
min-height:calc(100dvh - var(--topbar-h) - env(safe-area-inset-top));
scroll-snap-align:start;
scroll-snap-stop:always;
display:flex;
flex-direction:column;
overflow:hidden;
cursor:pointer;
}

.heroWrap{
position:relative;
height:min(36dvh,300px);
flex-shrink:0;
}

.storyActions{
position:absolute;
top:16px;
right:18px;
display:flex;
align-items:center;
gap:10px;
}

.storyIconBtn{
width:40px;
height:40px;
border-radius:999px;
border:1px solid rgba(255,255,255,.16);
background:rgba(18,28,54,.36);
backdrop-filter:blur(14px);
color:#eef4ff;
display:flex;
align-items:center;
justify-content:center;
cursor:pointer;
}

.storyIconBtn svg{
width:18px;
height:18px;
display:block;
stroke:currentColor;
stroke-linecap:round;
stroke-linejoin:round;
}

.hero{
width:100%;
height:100%;
object-fit:cover;
background:#080808;
display:block;
}

.heroFade{
position:absolute;
inset:auto 0 0 0;
height:42%;
background:linear-gradient(to top,rgba(0,0,0,.62),transparent);
pointer-events:none;
}

.content{
flex:1;
min-height:0;
display:flex;
flex-direction:column;
padding:16px 22px calc(110px + env(safe-area-inset-bottom));
}

.tag{
color:var(--brand-strong);
font-size:11px;
font-weight:700;
letter-spacing:.16em;
text-transform:uppercase;
display:inline-flex;
align-items:center;
align-self:flex-start;
width:fit-content;
min-height:36px;
padding:0 14px;
border-radius:999px;
border:1px solid rgba(255,255,255,.14);
background:rgba(255,255,255,.03);
backdrop-filter:blur(12px);
max-width:min(68%,240px);
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}

.contentTopRow{
display:flex;
align-items:center;
justify-content:space-between;
gap:14px;
margin-bottom:14px;
}

.title{
font-size:22px;
font-weight:800;
line-height:1.14;
letter-spacing:-.03em;
margin-bottom:12px;
}

.desc{
color:var(--muted);
font-size:14px;
line-height:1.6;
letter-spacing:.01em;
}

.contentActions{
display:flex;
align-items:center;
justify-content:flex-end;
gap:10px;
margin-left:auto;
flex-shrink:0;
}

.storyIconBtn{
width:40px;
height:40px;
border-radius:999px;
border:1px solid rgba(255,255,255,.14);
background:rgba(255,255,255,.03);
color:#eef4ff;
display:flex;
align-items:center;
justify-content:center;
cursor:pointer;
backdrop-filter:blur(14px);
transition:transform .22s ease,background .22s ease,border-color .22s ease,color .22s ease;
}

.storyIconBtn svg{
width:18px;
height:18px;
display:block;
stroke:currentColor;
stroke-linecap:round;
stroke-linejoin:round;
pointer-events:none;
}

.storyIconBtn svg *{
pointer-events:none;
}

.storyIconBtn.saved{
background:rgba(47,107,255,.16);
border-color:rgba(142,182,255,.54);
color:var(--brand-strong);
}

.storyIconBtn:active{
transform:scale(.96);
}

.bottomNav{
position:fixed;
left:50%;
transform:translateX(-50%);
bottom:0;
width:min(var(--app-max),100vw);
height:calc(var(--nav-h) + env(safe-area-inset-bottom));
padding:7px 12px calc(8px + env(safe-area-inset-bottom));
background:linear-gradient(180deg,rgba(13,19,36,.95) 0%,rgba(8,10,18,.97) 48%,rgba(0,0,0,.99) 100%);
backdrop-filter:blur(22px);
border-top:1px solid rgba(255,255,255,.08);
display:grid;
grid-template-columns:repeat(4,1fr);
gap:6px;
z-index:20;
box-shadow:0 -18px 42px rgba(0,0,0,.34);
}

.navItem{
background:transparent;
color:#a7a194;
border:1px solid transparent;
border-radius:12px;
cursor:pointer;
transition:background .28s ease,color .28s ease,border-color .28s ease,transform .22s ease;
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
padding:6px 2px;
}

.navItem.active{
color:#eef4ff;
background:rgba(47,107,255,.15);
border-color:rgba(47,107,255,.28);
box-shadow:inset 0 0 0 1px rgba(255,255,255,.02);
}

.navItem:active{
transform:scale(.98);
}

.navIcon{
width:20px;
height:20px;
display:flex;
align-items:center;
justify-content:center;
line-height:1;
flex-shrink:0;
}

.navIcon svg{
width:20px;
height:20px;
display:block;
stroke:currentColor;
stroke-linecap:round;
stroke-linejoin:round;
overflow:visible;
}

.navLabel{
display:none;
}

.screenPanel{
position:fixed;
top:calc(var(--topbar-h) + env(safe-area-inset-top));
bottom:0;
left:50%;
width:min(var(--app-max),100vw);
transform:translateX(-50%);
display:flex;
justify-content:flex-end;
background:rgba(0,0,0,.42);
backdrop-filter:blur(10px);
opacity:0;
pointer-events:none;
transition:opacity .24s ease;
z-index:40;
overflow:hidden;
}

.screenPanel.active{
opacity:1;
pointer-events:auto;
}

.screenCard{
width:100%;
height:100%;
background:
radial-gradient(circle at top,rgba(47,107,255,.12),transparent 32%),
linear-gradient(180deg,#0a0d15 0%,#050505 22%,#020202 100%);
transform:translateY(102%);
transition:transform .26s cubic-bezier(.22,1,.36,1);
padding:14px 18px calc(72px + env(safe-area-inset-bottom));
overflow-y:auto;
-webkit-overflow-scrolling:touch;
border-top:1px solid rgba(255,255,255,.08);
box-shadow:0 -20px 50px rgba(0,0,0,.44);
}

.screenPanel.active .screenCard{
transform:translateY(0);
}

.screenHeader{
display:flex;
align-items:center;
justify-content:space-between;
gap:14px;
margin-bottom:18px;
padding-top:max(8px,env(safe-area-inset-top));
}

.screenHeader h2{
font-size:28px;
font-weight:800;
letter-spacing:-.03em;
flex:1;
min-width:0;
}

.headerActions{
display:flex;
align-items:center;
gap:10px;
flex-shrink:0;
}

.sheetClose,
.primaryAction,
.ghostAction{
border-radius:14px;
padding:10px 15px;
cursor:pointer;
font-size:12px;
font-weight:600;
letter-spacing:.04em;
transition:transform .22s ease,background .22s ease,border-color .22s ease;
}

.sheetClose,
.ghostAction{
background:rgba(255,255,255,.04);
border:1px solid rgba(255,255,255,.10);
color:#eef4ff;
flex-shrink:0;
}

.sheetClose{
min-height:42px;
padding:10px 18px;
background:linear-gradient(180deg,rgba(96,150,255,.34),rgba(142,182,255,.16));
border-color:rgba(142,182,255,.46);
box-shadow:0 12px 28px rgba(18,36,84,.34), inset 0 1px 0 rgba(255,255,255,.12);
font-weight:800;
letter-spacing:.02em;
}

.primaryAction{
background:linear-gradient(135deg,#2f6bff,#89b5ff);
border:none;
color:#f7fbff;
}

.sheetClose:active,
.primaryAction:active,
.ghostAction:active{
transform:scale(.98);
}

.iconGhostBtn{
width:42px;
height:42px;
min-width:42px;
flex:0 0 42px;
border-radius:14px;
border:1px solid rgba(255,255,255,.12);
background:rgba(255,255,255,.03);
color:#eef4ff;
display:flex;
align-items:center;
justify-content:center;
cursor:pointer;
transition:transform .22s ease,background .22s ease,border-color .22s ease,box-shadow .22s ease;
box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}

.iconGhostBtn svg{
width:17px;
height:17px;
display:block;
stroke:currentColor;
stroke-linecap:round;
stroke-linejoin:round;
pointer-events:none;
}

.iconGhostBtn:active{
transform:scale(.98);
}

.stackForm{
display:flex;
flex-direction:column;
gap:14px;
}

.filtersFormLayout{
gap:18px;
}

.filterSection{
display:flex;
flex-direction:column;
gap:10px;
}

.fieldLabel{
display:block;
font-size:12px;
font-weight:700;
letter-spacing:.14em;
color:#d5e4ff;
text-transform:uppercase;
}

.textInput{
width:100%;
background:rgba(255,255,255,.04);
border:1px solid rgba(255,255,255,.10);
color:var(--text);
border-radius:18px;
padding:16px 18px;
outline:none;
font-size:15px;
transition:border-color .22s ease,background .22s ease,box-shadow .22s ease;
}

.textInput:focus{
border-color:rgba(47,107,255,.44);
box-shadow:0 0 0 4px rgba(47,107,255,.12);
}

.actionRow{
display:flex;
gap:12px;
flex-wrap:wrap;
}

.filtersActionRow{
display:grid;
grid-template-columns:minmax(0,1fr);
width:100%;
margin-top:2px;
}

.filtersApplyBtn{
width:100%;
display:flex;
justify-content:center;
align-items:center;
min-height:50px;
padding-inline:18px;
border-radius:18px;
font-size:14px;
font-weight:700;
}

.listView{
display:flex;
flex-direction:column;
gap:14px;
margin-top:18px;
}

.listView:empty{
display:none;
}

.listCard{
background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02));
border:1px solid rgba(255,255,255,.08);
border-radius:22px;
padding:16px;
display:flex;
flex-direction:column;
gap:10px;
}

.listThumbWrap{
width:100%;
height:124px;
border-radius:18px;
overflow:hidden;
background:#0a0a0a;
border:1px solid rgba(255,255,255,.06);
margin-bottom:2px;
}

.listThumb{
width:100%;
height:100%;
object-fit:cover;
display:block;
}

.listCard .tag{
max-width:78%;
}

.listCard h3{
font-size:18px;
line-height:1.42;
letter-spacing:-.02em;
}

.listMeta{
font-size:13px;
color:var(--muted);
line-height:1.6;
}

.listActions{
display:flex;
align-items:center;
justify-content:flex-start;
gap:12px;
margin-top:4px;
}

.inlineAction{
display:flex;
align-items:center;
gap:12px;
}

.miniHeart{
width:36px;
height:36px;
border-radius:999px;
border:1px solid rgba(255,255,255,.12);
background:rgba(255,255,255,.03);
color:#eef4ff;
display:flex;
align-items:center;
justify-content:center;
cursor:pointer;
}

.miniHeart.saved{
color:var(--brand-strong);
border-color:rgba(137,181,255,.44);
background:rgba(47,107,255,.12);
}

.miniHeart svg{
width:16px;
height:16px;
display:block;
stroke:currentColor;
stroke-linecap:round;
stroke-linejoin:round;
pointer-events:none;
}

.miniShare{
width:36px;
height:36px;
border-radius:999px;
border:1px solid rgba(255,255,255,.12);
background:rgba(255,255,255,.03);
color:#eef4ff;
display:flex;
align-items:center;
justify-content:center;
cursor:pointer;
}

.miniShare svg{
width:16px;
height:16px;
display:block;
stroke:currentColor;
stroke-linecap:round;
stroke-linejoin:round;
pointer-events:none;
}

.miniHeart svg *,
.miniShare svg *{
pointer-events:none;
}

.accountCard{
background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02));
border:1px solid rgba(255,255,255,.08);
border-radius:24px;
padding:20px;
display:flex;
flex-direction:column;
gap:14px;
}

.accountCard h3{
font-size:24px;
font-weight:800;
letter-spacing:-.03em;
}

.mutedText{
color:var(--muted);
font-size:14px;
line-height:1.7;
}

.emptyState{
padding:24px 0;
color:var(--muted);
font-size:14px;
line-height:1.7;
}

.authSwitch{
font-size:13px;
color:#d7deea;
}

.linkBtn{
background:none;
border:none;
padding:0;
color:#89b5ff;
cursor:pointer;
font-weight:700;
}

.inlineError{
font-size:13px;
line-height:1.5;
color:#ffb3b3;
background:rgba(121,25,25,.18);
border:1px solid rgba(255,112,112,.20);
padding:12px 14px;
border-radius:14px;
}

.chipGrid{
display:grid;
grid-template-columns:repeat(2,minmax(0,1fr));
gap:12px;
}

.filterChip{
border:1px solid rgba(255,255,255,.10);
background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.02));
color:#dde6f5;
min-height:58px;
padding:14px 16px;
border-radius:18px;
font-size:15px;
font-weight:700;
line-height:1.35;
text-align:left;
cursor:pointer;
transition:background .22s ease,border-color .22s ease,color .22s ease,transform .22s ease;
display:flex;
align-items:center;
justify-content:flex-start;
box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}

.filterChip.selected{
background:rgba(47,107,255,.14);
border-color:rgba(137,181,255,.42);
color:var(--brand-strong);
box-shadow:0 10px 24px rgba(16,34,84,.22), inset 0 1px 0 rgba(255,255,255,.04);
}

.filterChip:active{
transform:scale(.98);
}

.searchCompactRow{
display:grid;
grid-template-columns:minmax(0,1fr);
align-items:center;
}

.textInputCompact{
padding:14px 16px;
}

.listViewCompact{
margin-top:12px;
}

.endCard{
min-height:calc(100dvh - var(--topbar-h) - env(safe-area-inset-top));
padding:40px 24px calc(126px + env(safe-area-inset-bottom));
display:flex;
align-items:center;
justify-content:center;
scroll-snap-align:start;
}

.endCardInner{
width:100%;
display:flex;
flex-direction:column;
align-items:center;
text-align:center;
gap:18px;
}

.endBadge{
width:84px;
height:84px;
border-radius:999px;
display:flex;
align-items:center;
justify-content:center;
background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.02));
border:1px solid rgba(255,255,255,.08);
font-size:34px;
color:#2ec27e;
}

.endTitle{
font-size:34px;
font-weight:800;
letter-spacing:-.04em;
}

.endText{
max-width:280px;
font-size:16px;
line-height:1.7;
color:var(--muted);
}

.endAction{
min-width:210px;
}

@media (max-height:780px){
.heroWrap{
height:min(32dvh,260px);
}

.title{
font-size:23px;
}

.authSlide h1{
font-size:34px;
}
}

@media (max-width:420px){
.title{
font-size:24px;
}

.screenHeader h2{
font-size:26px;
}

.endTitle{
font-size:30px;
}

.authShell{
padding-inline:18px;
}

.authSlide h1{
font-size:36px;
}
}
