:root {
  --brand: #5b5ce2;
  --brand-strong: #4546c8;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --orange: #f97316;
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #151827;
  --muted: #73768a;
  --line: #e8e9f1;
  --soft: #f0f0ff;
  --danger: #dc3f55;
  --shadow: 0 18px 55px rgba(48, 49, 105, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: ui-rounded, "SF Pro Display", "Segoe UI", system-ui, sans-serif; background: var(--bg); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 68px; padding: 0 max(20px, 5vw); background: rgba(255,255,255,.88); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(232,233,241,.9); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 20px; }
.brand-orb { width: 36px; height: 36px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-weight: 900; background: linear-gradient(135deg, var(--brand), var(--violet) 65%, var(--pink)); box-shadow: 0 8px 18px rgba(91,92,226,.28); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .avatar-button, .more-button { border: 0; background: transparent; }
.icon-button { width: 39px; height: 39px; border-radius: 50%; background: #f2f3f8; font-size: 21px; color: var(--ink); }
.avatar-button { width: 39px; height: 39px; border-radius: 50%; background: linear-gradient(135deg,#ffd6e8,#c8c4ff); color: #383270; font-weight: 900; }
.visually-muted { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.page-shell { width: min(700px, 94vw); margin: 0 auto; padding: 22px 0 110px; }
.desktop-tabs { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 20px; }
.tab, .button { border: 0; border-radius: 14px; padding: 11px 17px; font-weight: 800; }
.desktop-tabs .tab { background: transparent; color: var(--muted); }
.desktop-tabs .tab.active { color: var(--brand); background: var(--soft); }
.button.primary { color: #fff; background: linear-gradient(135deg, var(--brand), var(--violet)); box-shadow: 0 10px 24px rgba(91,92,226,.22); }
.button.secondary { background: #f1f2f7; color: var(--ink); }
.button.danger { background: #fff0f2; color: var(--danger); }
.button.full { width: 100%; }
.button.compact { padding: 10px 14px; }
.panel { display: none; }
.panel.active-panel { display: block; }
.feed-panel, .creator-panel, .library-panel, .discover-panel, .profile-panel { animation: rise .28s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.feed-heading, .panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.feed-heading h1, .panel-heading h2 { margin: 4px 0 0; letter-spacing: -.035em; }
.feed-heading h1 { font-size: clamp(30px,6vw,44px); }
.eyebrow { margin: 0; color: var(--brand); font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.muted, .status { color: var(--muted); line-height: 1.55; }
.story-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 18px; scrollbar-width: none; }
.story-row::-webkit-scrollbar { display: none; }
.story { min-width: 70px; border: 0; background: transparent; display: grid; justify-items: center; gap: 7px; color: var(--ink); }
.story small { font-size: 11px; white-space: nowrap; }
.story-ring { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 3px solid #fff; outline: 2px solid var(--violet); font-weight: 900; box-shadow: 0 8px 18px rgba(52,48,105,.10); }
.add-story { color: var(--brand); font-size: 24px; outline-style: dashed; }
.story-ai { color:#fff; background: linear-gradient(135deg,#6366f1,#a855f7); }
.story-shop { color:#fff; background: linear-gradient(135deg,#f97316,#ec4899); }
.story-travel { color:#fff; background: linear-gradient(135deg,#0ea5e9,#6366f1); }
.story-business { color:#fff; background: linear-gradient(135deg,#111827,#6366f1); }
.social-card { overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); margin-bottom: 16px; }
.card-author { display: flex; align-items: center; gap: 11px; padding: 15px 17px; }
.card-author div { display: grid; gap: 2px; }
.card-author small { color: var(--muted); }
.creator-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color:#fff; font-weight:900; background: linear-gradient(135deg,var(--brand),var(--pink)); }
.more-button { margin-left: auto; color: var(--muted); font-size: 18px; }
.featured-visual { min-height: 330px; padding: 34px 26px; display: flex; flex-direction: column; justify-content: flex-end; color:#fff; background: radial-gradient(circle at 90% 10%,rgba(255,255,255,.28),transparent 30%), linear-gradient(145deg,#24265e,#5b5ce2 48%,#9d4edd); }
.featured-visual h2 { margin: 12px 0 8px; font-size: clamp(30px,7vw,50px); line-height: 1.02; letter-spacing: -.05em; }
.featured-visual p { max-width: 520px; margin: 0; color: rgba(255,255,255,.82); line-height: 1.55; }
.visual-chip { width: fit-content; padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: 10px; letter-spacing: .14em; font-weight: 900; }
.social-actions { display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.social-actions button { border: 0; background: transparent; color: var(--ink); padding: 8px; border-radius: 10px; font-weight: 750; }
.social-actions button:hover { background: #f3f3f8; }
.social-actions .save-action { margin-left: auto; }
.stack { display: grid; gap: 13px; }
.social-feed { margin-top: 16px; }
.saved-card, .collection-card { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 10px 28px rgba(48,49,105,.06); }
.saved-card { position: relative; overflow: hidden; }
.saved-card::before { content:""; position:absolute; inset:0 auto 0 0; width:4px; background: linear-gradient(var(--brand),var(--pink)); }
.saved-card h3, .collection-card h3 { margin: 0 0 6px; font-size: 17px; }
.saved-card p, .collection-card p { margin: 0; color: var(--muted); }
.card-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag, .badge { display:inline-flex; padding:5px 9px; border-radius:999px; background:var(--soft); color:var(--brand); font-size:11px; font-weight:850; }
.creator-panel, .library-panel, .discover-panel { padding: 24px; border-radius: 26px; border: 1px solid var(--line); background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.save-composer { padding: 2px; }
label { display: grid; gap: 7px; margin: 13px 0; font-size: 13px; font-weight: 800; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 15px; padding: 14px; color:var(--ink); background:#fff; outline:none; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91,92,226,.12); }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.form-grid .wide { grid-column:1/-1; }
.search { margin-bottom: 12px; font-size: 15px; background:#f7f7fb; }
.filter-row { display:flex; gap:8px; overflow:auto; margin-bottom:16px; }
.filter-pill { border:0; border-radius:999px; padding:8px 13px; background:#f0f1f6; color:var(--muted); font-weight:800; }
.filter-pill.active { background:var(--brand); color:#fff; }
.library-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.library-grid .saved-card { grid-template-columns:1fr; min-height:190px; }
.collection-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.collection-grid .collection-card { grid-template-columns:1fr; min-height:180px; }
.discover-banner { margin:8px 0 20px; padding:24px; border-radius:22px; color:#fff; background:linear-gradient(135deg,#111827,#4f46e5 55%,#8b5cf6); }
.discover-banner span { font-size:10px; letter-spacing:.16em; font-weight:900; color:#d8d6ff; }
.discover-banner h3 { margin:9px 0 6px; font-size:27px; letter-spacing:-.035em; }
.discover-banner p { margin:0; color:rgba(255,255,255,.76); }
.profile-panel { overflow:hidden; border-radius:26px; border:1px solid var(--line); background:#fff; box-shadow:var(--shadow); }
.profile-cover { height:170px; background: radial-gradient(circle at 20% 20%,rgba(255,255,255,.28),transparent 26%), linear-gradient(135deg,#312e81,#6366f1,#a855f7); }
.profile-card { padding:0 24px 26px; }
.profile-top { display:flex; justify-content:space-between; align-items:flex-end; margin-top:-48px; }
.avatar { width:96px; height:96px; border-radius:30px; border:5px solid #fff; display:grid; place-items:center; color:#3b3474; font-size:27px; font-weight:900; background:linear-gradient(135deg,#ffd3e7,#c9c5ff); }
.profile-card h2 { margin:15px 0 0; font-size:28px; }
.profile-handle { margin:3px 0 10px; color:var(--muted); }
.profile-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; padding:18px 0; border-block:1px solid var(--line); }
.profile-stats div { display:grid; text-align:center; gap:3px; }
.profile-stats strong { font-size:18px; }
.profile-stats span { color:var(--muted); font-size:11px; }
.profile-links { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:16px; }
.profile-links span { padding:11px; border-radius:12px; background:#f4f4f9; text-align:center; font-weight:750; }
.profile-tabs { display:grid; grid-template-columns:repeat(3,1fr); margin-top:18px; border-bottom:1px solid var(--line); }
.profile-tabs button { border:0; background:transparent; padding:12px; color:var(--muted); font-weight:800; }
.profile-tabs button.active { color:var(--brand); border-bottom:2px solid var(--brand); }
.bottom-nav { display:none; }
.hidden { display:none!important; }
.empty { padding:24px 0; color:var(--muted); }
dialog { border:0; padding:0; border-radius:24px; box-shadow:0 32px 100px rgba(20,20,54,.32); }
dialog::backdrop { background:rgba(15,16,31,.58); backdrop-filter:blur(6px); }
.dialog-card { width:min(430px,90vw); padding:25px; }
.dialog-close { float:right; border:0; background:transparent; font-size:27px; }
@media(max-width:760px){
  .topbar{height:60px;padding:0 14px}.brand strong{font-size:18px}.top-actions .icon-button:nth-child(2){display:none}
  .page-shell{width:100%;padding:14px 12px 96px}.desktop-tabs{display:none}.feed-heading{padding:0 3px}.feed-heading .button{display:none}
  .story-row{margin-inline:-12px;padding-inline:14px}.social-card{border-radius:20px}.featured-visual{min-height:300px;padding:26px 20px}
  .creator-panel,.library-panel,.discover-panel{padding:18px;border-radius:22px}.form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}
  .library-grid,.collection-grid{grid-template-columns:1fr}.saved-card,.collection-card{grid-template-columns:1fr}.profile-stats{grid-template-columns:repeat(4,1fr)}
  .bottom-nav{position:fixed;z-index:30;left:0;right:0;bottom:0;height:72px;padding:7px 10px calc(7px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(5,1fr);align-items:center;background:rgba(255,255,255,.95);backdrop-filter:blur(18px);border-top:1px solid var(--line)}
  .bottom-nav .tab{height:54px;padding:3px;background:transparent;color:var(--muted);display:grid;place-items:center;gap:1px;border-radius:14px}.bottom-nav .tab span{font-size:22px;line-height:1}.bottom-nav .tab small{font-size:10px}.bottom-nav .tab.active{color:var(--brand)}
  .bottom-nav .create-tab span{width:40px;height:40px;border-radius:15px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,var(--brand),var(--violet));box-shadow:0 8px 20px rgba(91,92,226,.3)}.bottom-nav .create-tab small{display:none}
}
