:root{
  --bg:#f5f6fa;
  --surface:#ffffff;
  --surface-2:#f1f3f9;
  --line:#e5e8f0;
  --text:#111827;
  --muted:#667085;
  --accent:#ff6a00;
  --accent-soft:#fff1e7;
  --shadow:0 18px 50px rgba(17,24,39,.08);
  --shadow-soft:0 8px 30px rgba(17,24,39,.06);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:Arial,sans-serif;
  background:linear-gradient(180deg,#fcfcfe 0%,#f5f6fa 100%);
  color:var(--text);
}
a{text-decoration:none;color:inherit}
img,video{max-width:100%;display:block}
button{font:inherit}
.wrap{max-width:1400px;margin:0 auto;padding:0 20px}

.site-header{
  position:sticky;top:0;z-index:30;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.nav-row{
  min-height:78px;
  height:78px;
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  overflow:visible;
}
.brand{display:flex;align-items:center;height:78px;overflow:visible}
.brand img{height:58px;width:auto;display:block;margin-top:0;margin-bottom:0}
.main-nav{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.nav-pill{
  padding:11px 14px;border-radius:999px;
  color:var(--muted);background:transparent;border:1px solid transparent;
}
.nav-pill:hover{background:var(--surface-2);color:var(--text)}
.nav-pill-active{background:var(--surface-2);color:var(--text);border-color:var(--line)}
.nav-actions{display:flex;align-items:center;gap:12px}

.btn-primary,.btn-ghost,.btn-soft,.comment-form button{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:46px;padding:0 18px;border-radius:999px;border:1px solid transparent;
  transition:.2s ease;
}
.btn-primary{background:var(--accent);color:#fff;box-shadow:var(--shadow-soft)}
.btn-primary:hover{background:#ea6200;transform:translateY(-1px)}
.btn-ghost{background:#fff;border-color:var(--line);color:var(--text)}
.btn-ghost:hover{background:var(--surface-2)}
.btn-soft{background:var(--accent-soft);color:var(--accent)}
.btn-soft:hover{filter:brightness(.98)}

.page-shell{padding:18px 0 0}
.home-stage{
  display:grid;
  grid-template-columns:280px minmax(320px, 640px) 280px;
  gap:22px;
  align-items:start;
}
.rail{
  position:sticky;top:98px;
  display:flex;flex-direction:column;gap:16px;
}
.rail-card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:28px;
  padding:22px;
  box-shadow:var(--shadow-soft);
}
.brand-card h1{font-size:2.1rem;line-height:1.05;margin:.35rem 0 .8rem}
.brand-card p,.rail-card p{color:var(--muted);line-height:1.6}
.eyebrow{
  display:inline-block;
  padding:7px 10px;border-radius:999px;
  background:var(--accent-soft);color:var(--accent);font-size:.86rem;font-weight:700;
}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}
.feature-list{margin:14px 0 0 18px;padding:0;color:var(--muted);line-height:1.8}

.feed-center{min-width:0}
.feed-tabs{
  display:flex;gap:10px;flex-wrap:wrap;
  margin-bottom:14px;padding:8px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow-soft);
}
.tab{
  padding:10px 14px;border-radius:999px;
  background:transparent;color:var(--muted);font-weight:700;
}
.tab.active{background:var(--surface-2);color:var(--text)}

.reel-feed{
  height:calc(100vh - 136px);
  overflow:auto;
  scroll-snap-type:y mandatory;
  scrollbar-width:none;
}
.reel-feed::-webkit-scrollbar{display:none}
.reel-card{
  height:calc(100vh - 136px);
  scroll-snap-align:start;
  display:grid;
  place-items:start center;
  padding-bottom:20px;
}
.reel-phone-frame{
  position:relative;
  width:100%;
  max-width:640px;
  height:100%;
  min-height:620px;
  overflow:hidden;
  background:#ddd;
  border-radius:34px;
  border:1px solid rgba(17,24,39,.08);
  box-shadow:var(--shadow);
}
.reel-media,.reel-media img,.reel-media video{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
}
.reel-gradient{
  position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(17,24,39,.05) 0%, rgba(17,24,39,.18) 35%, rgba(17,24,39,.78) 100%);
}
.reel-content{
  position:relative;z-index:2;height:100%;
  display:flex;flex-direction:column;justify-content:flex-end;
  padding:26px;
}
.reel-copy{max-width:72%;color:#fff}
.seller-line{font-weight:700;margin-bottom:8px}
.reel-copy h2{margin:0 0 10px;font-size:1.9rem;line-height:1.08}
.reel-copy p{margin:0 0 14px;color:rgba(255,255,255,.9);line-height:1.5}
.price-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.price{font-size:1.24rem;font-weight:700}
.badge{
  padding:8px 11px;border-radius:999px;
  background:rgba(255,255,255,.18);backdrop-filter:blur(8px);color:#fff;
}

.reel-side-actions{
  position:absolute;right:18px;bottom:112px;z-index:3;
  display:flex;flex-direction:column;gap:12px;
}
.action-btn{
  width:72px;height:72px;border-radius:24px;border:1px solid rgba(255,255,255,.24);
  background:rgba(255,255,255,.12);color:#fff;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  backdrop-filter:blur(12px);cursor:pointer;
}
.action-icon{font-size:1.2rem;line-height:1}
.action-btn.active{
  border-color:rgba(255,255,255,.8);
  box-shadow:0 0 0 2px rgba(255,255,255,.14) inset;
}
.cta-row{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}

.comments-drawer{
  position:absolute;right:16px;top:16px;z-index:4;
  width:min(390px,calc(100% - 32px));
  max-height:calc(100% - 32px);
  display:none;flex-direction:column;
  background:rgba(255,255,255,.98);
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow);
  color:var(--text);
  padding:14px;
}
.comments-drawer.open{display:flex}
.comments-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.drawer-close{background:none;border:none;font-size:28px;cursor:pointer;color:var(--text)}
.comments-list{overflow:auto;display:flex;flex-direction:column;gap:10px;padding-right:6px}
.comment-item{
  padding:12px;border-radius:18px;background:var(--surface-2);border:1px solid var(--line);
}
.comment-form{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.comment-form textarea{
  min-height:88px;border-radius:16px;border:1px solid var(--line);
  background:#fff;color:var(--text);padding:12px;resize:vertical;
}
.comment-form button{background:var(--accent);color:#fff;border:none}
.comment-form button:hover{background:#ea6200}
.comment-login-note{color:var(--muted)}

.auth-wrap{min-height:70vh;display:grid;place-items:center;padding:36px 18px}
.auth-card,.content-card{
  width:min(560px,92vw);
  background:var(--surface);border:1px solid var(--line);
  padding:26px;border-radius:28px;box-shadow:var(--shadow-soft);
}
.auth-card input,.auth-card select{
  width:100%;padding:12px;border-radius:14px;border:1px solid var(--line);
  background:#fff;color:var(--text);margin:8px 0;
}
.form-msg{margin-top:10px;color:#ff6a00}
.content-page{padding:34px 18px}

.site-footer{
  margin-top:26px;background:#fff;border-top:1px solid var(--line);
}
.footer-grid{
  display:grid;grid-template-columns:2fr 1fr 1fr;gap:22px;
  padding:28px 20px;
}
.footer-grid p,.footer-grid a{color:var(--muted);line-height:1.7}
.footer-grid a{display:block;margin:4px 0}

@media (max-width:1180px){
  .home-stage{grid-template-columns:1fr}
  .rail{position:static}
  .rail-left,.rail-right{order:2}
  .feed-center{order:1}
}
@media (max-width:1100px){
  .nav-row{
    min-height:72px;
    height:auto;
    align-items:center;
    flex-wrap:wrap;
    padding:10px 0 12px;
    gap:12px;
  }
  .brand{height:56px;order:1}
  .brand img{height:46px;margin-top:0;margin-bottom:0}
  .nav-actions{
    gap:8px;
    order:2;
    margin-left:auto;
    flex:0 0 auto;
  }
  .main-nav{
    display:flex;
    order:3;
    width:100%;
    gap:8px;
    flex-wrap:nowrap;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    padding-bottom:2px;
    scrollbar-width:none;
  }
  .main-nav::-webkit-scrollbar{display:none}
  .main-nav .nav-pill{
    flex:0 0 auto;
    white-space:nowrap;
    padding:10px 12px;
  }
  .reel-feed{
    height:auto;
    overflow:visible;
    scroll-snap-type:none;
  }
  .reel-card{
    height:auto;
    min-height:calc(100svh - 160px);
  }
  .reel-phone-frame{
    border-radius:26px;
    min-height:calc(100svh - 180px);
  }
  .reel-content{padding:18px}
  .reel-copy{max-width:76%}
  .reel-copy h2{font-size:1.45rem}
  .reel-side-actions{right:12px;bottom:106px}
  .action-btn{width:62px;height:62px;border-radius:20px}
  .footer-grid{grid-template-columns:1fr}
}
@media (max-width:560px){
  .wrap{padding:0 14px}
  .home-stage{gap:14px}
  .feed-tabs{
    padding:6px;
    overflow-x:auto;
    flex-wrap:nowrap;
    scrollbar-width:none;
  }
  .feed-tabs::-webkit-scrollbar{display:none}
  .tab{
    padding:9px 12px;
    white-space:nowrap;
    flex:0 0 auto;
  }
  .btn-primary,.btn-ghost,.btn-soft,.comment-form button{min-height:42px;padding:0 14px}
  .reel-copy{max-width:100%;padding-right:72px}
  .reel-card{min-height:calc(100svh - 176px)}
  .reel-phone-frame{min-height:calc(100svh - 196px)}
  .comments-drawer{left:12px;right:12px;width:auto}
  .site-footer{margin-top:22px}
  .footer-grid{padding:34px 14px 24px;gap:18px}
}


@media (max-width:430px){
  .nav-actions .btn-primary,
  .nav-actions .btn-ghost{
    min-height:40px;
    padding:0 12px;
    font-size:.95rem;
  }
}
