:root {
  --bg-top: #fbfcfe;
  --bg-bottom: #eef2f7;
  --shell: rgba(255, 255, 255, 0.84);
  --shell-strong: rgba(255, 253, 255, 0.96);
  --shell-border: rgba(99, 112, 132, 0.12);
  --card: rgba(255, 255, 255, 0.92);
  --card-strong: rgba(255, 255, 255, 0.97);
  --text: #1f2937;
  --text-secondary: #536173;
  --muted: #7a8797;
  --accent: #2f8cff;
  --accent-strong: #176fd6;
  --accent-soft: #e8f3ff;
  --accent-glow: rgba(47, 140, 255, 0.18);
  --line: rgba(99, 112, 132, 0.11);
  --shadow-lg: 0 20px 60px rgba(65, 81, 105, 0.14), 0 8px 20px rgba(65, 81, 105, 0.08);
  --shadow-md: 0 8px 24px rgba(65, 81, 105, 0.10), 0 2px 8px rgba(65, 81, 105, 0.06);
  --shadow-sm: 0 2px 8px rgba(65, 81, 105, 0.08);
  --radius-xl: 36px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --transition-fast: 160ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-smooth: 280ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(ellipse at 12% 8%, rgba(255, 255, 255, 0.92), transparent 40%),
    radial-gradient(ellipse at 86% 10%, rgba(213, 222, 235, 0.62), transparent 34%),
    radial-gradient(ellipse at 52% 100%, rgba(229, 234, 242, 0.72), transparent 42%),
    radial-gradient(ellipse at 22% 62%, rgba(255, 255, 255, 0.72), transparent 36%),
    linear-gradient(175deg, var(--bg-top) 0%, var(--bg-bottom) 56%, #ffffff 100%);
  background-attachment: fixed;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }

/* ================================================================
   PAGE SHELL
   ================================================================ */

.page-shell,
.unlock-page {
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
}

.page-shell {
  padding: 20px 14px 34px;
}

/* ── Ambient blurs ── */

.ambient {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
}

.ambient-left {
  top: 40px;
  left: -140px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(214, 222, 234, 0.22) 60%, transparent 75%);
}

.ambient-right {
  top: 200px;
  right: -100px;
  background: radial-gradient(circle, rgba(188, 201, 218, 0.38), rgba(233, 238, 246, 0.18) 60%, transparent 75%);
}

/* ================================================================
   DESKTOP TOP BAR  (hidden on mobile)
   ================================================================ */

.desktop-topbar {
  display: none;
}

/* ================================================================
   STAGE LAYOUT
   ================================================================ */

.app-stage {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  align-items: start;
  justify-content: center;
}

/* ── Shared glass card base ── */

.app-frame,
.unlock-card,
.compose-card {
  border: 1px solid var(--shell-border);
  background: var(--shell);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  box-shadow: var(--shadow-lg);
}

.app-frame {
  width: 100%;
  border-radius: 40px;
  overflow: hidden;
}

/* ── App chrome (phone status bar — mobile only) ── */

.app-chrome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px 6px;
  font-size: 0.88rem;
  font-weight: 700;
}

.app-status {
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-pill {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.82);
}

.status-pill-wide {
  width: 22px;
  border-radius: 4px;
}

/* ── App surface ── */

.app-surface {
  padding: 56px 20px 96px;
}

/* ================================================================
   TYPOGRAPHY
   ================================================================ */

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.4rem, 10vw, 3.45rem);
  max-width: 6ch;
}

h2 { font-size: 1.6rem; line-height: 1.1; }
h3 { font-size: 1.2rem; line-height: 1.2; }

.hero-text,
.discover-copy,
.post-time,
.helper-text,
.input-label,
.post-id {
  color: var(--muted);
}

/* ================================================================
   BRAND HEADER
   ================================================================ */

.brand-row {
  display: grid;
  gap: 14px;
}

.brand-lockup { display: block; }

.brand-logo {
  width: min(100%, 240px);
  height: auto;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.hero-text {
  margin: 10px 0 0;
  max-width: 28ch;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ── Chip / button resets ── */

.refresh-chip,
.icon-button,
.compose-close-button,
.load-more-row button {
  border: 0;
  border-radius: 999px;
}

.refresh-chip {
  justify-self: start;
  min-height: 40px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.90);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  font-size: 0.84rem;
  font-weight: 700;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.refresh-chip:hover:not(:disabled) {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.refresh-chip:active:not(:disabled) {
  transform: translateY(0);
}

/* ================================================================
   QUICK LINKS
   ================================================================ */

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 32px 0 24px;
}

.quick-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.18) 100%),
    rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(255, 255, 255, 0.25),
    0 6px 18px rgba(65, 81, 105, 0.12),
    0 1px 2px rgba(65, 81, 105, 0.06);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
}

.quick-link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 45%);
  pointer-events: none;
  z-index: 0;
}

.quick-link > * { position: relative; z-index: 1; }

.quick-link:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(255, 255, 255, 0.3),
    0 12px 28px rgba(65, 81, 105, 0.18),
    0 2px 6px rgba(65, 81, 105, 0.08);
}

.quick-link:active { transform: translateY(0); }

.quick-link-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, #5ab6ff, #2f8cff);
  color: #fff;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(18, 86, 170, 0.25),
    0 2px 6px rgba(47, 140, 255, 0.28);
  overflow: hidden;
}

.quick-link-badge svg { display: block; }

.quick-link-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quick-link-badge-plain {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.65) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    0 2px 6px rgba(65, 81, 105, 0.12);
}

.quick-link-badge-plain img {
  object-fit: contain;
  padding: 4px;
}

.quick-link-label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ================================================================
   DISCOVER ROW
   ================================================================ */

.discover-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0 14px;
}

.discover-copy {
  margin: 6px 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.discover-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hidden-filter-toggle {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}

.hidden-filter-toggle.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.icon-button {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(47, 140, 255, 0.3);
  font-size: 1.2rem;
  line-height: 1;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.icon-button:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(47, 140, 255, 0.4);
}

.icon-button:active { transform: scale(0.96); }

/* ================================================================
   FEED
   ================================================================ */

.feed-stack {
  display: grid;
  gap: 12px;
}

/* ================================================================
   POST CARD
   ================================================================ */

.post-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  background: var(--card-strong);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-smooth), transform var(--transition-smooth);
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.post-card-hidden {
  border-color: rgba(86, 88, 96, 0.18);
  background: var(--card-strong);
  box-shadow: inset 4px 0 0 #5d626d, var(--shadow-sm);
}

.post-card-hidden:hover {
  box-shadow: inset 4px 0 0 #3f444d, var(--shadow-md);
}

.post-topline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.post-avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft) 0%, #d8ebff 100%);
  border: 1px solid rgba(47, 140, 255, 0.15);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-strong);
  text-transform: uppercase;
}

.post-meta { flex: 1; min-width: 0; }
.post-author, .post-time { margin: 0; }

.post-author {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
}

.post-time {
  margin-top: 1px;
  font-size: 0.74rem;
}

.post-more {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.post-card:hover .post-more { opacity: 1; }

.post-body { padding: 0 0 8px; }

.post-edit-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.post-edit-button:hover {
  background: #d8ebff;
  transform: translateY(-1px);
}

.post-edit-form {
  display: grid;
  gap: 10px;
  padding: 2px 0 12px;
}

.post-edit-form[hidden],
.post-body[hidden],
.post-edit-button[hidden] {
  display: none;
}

.post-hidden-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 700;
}

.post-hidden-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-strong);
}

.post-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
}

.rich-content {
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.rich-content > :first-child { margin-top: 0; }
.rich-content > :last-child { margin-bottom: 0; }

.rich-content p,
.rich-content ul,
.rich-content ol,
.rich-content blockquote,
.rich-content div,
.rich-content h3 {
  margin: 0 0 0.85rem;
}

.rich-content ul,
.rich-content ol { padding-left: 1.25rem; }

.rich-content h3 {
  color: var(--text);
  font-size: 1.06rem;
  line-height: 1.35;
  font-weight: 700;
}

.rich-content a {
  color: var(--accent-strong);
  text-decoration: none;
  border-bottom: 1px solid rgba(47, 140, 255, 0.2);
  transition: border-color var(--transition-fast);
}

.rich-content a:hover { border-color: var(--accent-strong); }

/* ── Post engagement row ── */

.post-engagement {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0 2px;
  border-top: 1px solid var(--line);
}

.engage-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  transition: background var(--transition-fast), color var(--transition-fast);
  cursor: default;
}

.engage-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.engage-btn svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.engage-spacer { flex: 1; }

.post-id {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.5;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.post-badge {
  border-radius: 999px;
  padding: 5px 11px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 700;
}

.post-badge-hidden {
  background: #2f333a;
  color: #fff;
}

/* ================================================================
   LOAD MORE
   ================================================================ */

.load-more-row {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
}

.load-more-row button,
.secondary-button {
  min-height: 42px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  font-size: 0.86rem;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.load-more-row button:hover,
.secondary-button:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.end-cap {
  color: var(--muted);
  font-size: 0.84rem;
}

/* ================================================================
   BOTTOM NAV  (mobile only)
   ================================================================ */

.bottom-nav {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(251, 252, 254, 0.0) 0%, rgba(251, 252, 254, 0.96) 25%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.nav-item {
  display: grid;
  justify-items: center;
  gap: 3px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 0;
  transition: color var(--transition-fast);
}

.nav-logout-form {
  display: contents;
}

.nav-item:hover { color: var(--accent); }
.nav-item-active { color: var(--accent-strong); }
.nav-item-compose { color: var(--accent-strong); }

.nav-glyph {
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
}

.nav-glyph svg {
  width: 22px; height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item-active .nav-glyph svg,
.nav-item-compose .nav-glyph svg {
  stroke-width: 2.2;
}

.nav-label {
  font-size: 0.68rem;
  font-weight: 700;
}


/* ================================================================
   COMPOSE OVERLAY & SHEET
   ================================================================ */

.compose-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 41, 55, 0.24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
  z-index: 40;
}

.compose-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.compose-column {
  position: fixed;
  left: 50%;
  bottom: 14px;
  width: min(calc(100% - 24px), 430px);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
  z-index: 50;
}

.compose-column.is-open {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.compose-card {
  border-radius: 28px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--shell-border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
}

.compose-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.compose-heading { margin-bottom: 14px; }

.compose-close-button {
  min-height: 36px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  border: 0;
  border-radius: 999px;
  transition: box-shadow var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.compose-close-button:hover { box-shadow: var(--shadow-md); }

/* ================================================================
   FORM CONTROLS
   ================================================================ */

.composer-form {
  display: grid;
  gap: 10px;
}

.input-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(182, 138, 163, 0.14);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

textarea {
  resize: vertical;
  min-height: 140px;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(47, 140, 255, 0.4);
  box-shadow: 0 0 0 3px var(--accent-glow), inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.notes-editor-shell {
  overflow: hidden;
  border: 1px solid rgba(182, 138, 163, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.notes-editor-shell:focus-within {
  border-color: rgba(47, 140, 255, 0.4);
  box-shadow: 0 0 0 3px var(--accent-glow), inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(245, 248, 252, 0.86));
}

.editor-tool {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 800;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.editor-tool:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.editor-tool:active { transform: scale(0.96); }

.editor-divider {
  width: 1px;
  height: 22px;
  margin: 0 3px;
  background: var(--line);
}

.tool-underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tool-list {
  font-size: 1.4rem;
  line-height: 1;
}

.tool-numbered {
  font-size: 0.8rem;
}

.notes-editor {
  min-height: 170px;
  max-height: min(48vh, 420px);
  overflow-y: auto;
  padding: 14px;
  color: var(--text);
  background: transparent;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}

.notes-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}

.notes-editor.rich-content {
  line-height: 1.65;
}

.composer-footer {
  display: grid;
  gap: 10px;
}

.helper-text,
.error-text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.error-text { color: #a73055; }

.primary-button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2f8cff 0%, #5ab6ff 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(47, 140, 255, 0.25);
  font-weight: 800;
  font-size: 0.92rem;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.primary-button:hover {
  box-shadow: 0 16px 36px rgba(47, 140, 255, 0.35);
  transform: translateY(-1px);
}

.primary-button:active { transform: translateY(0); }

/* ================================================================
   UNLOCK PAGE
   ================================================================ */

.unlock-page {
  display: grid;
  place-items: center;
  padding: 20px;
}

.unlock-card {
  width: min(100%, 480px);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.brand-lockup-unlock { margin-bottom: 8px; }

.unlock-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

/* ================================================================
   DESKTOP LAYOUT  (≥ 980px)
   ================================================================ */

@media (min-width: 980px) {
  body {
    background-attachment: fixed;
  }

  .page-shell {
    padding: 0 0 60px;
  }

  /* ── Top bar ── */

  .desktop-topbar {
    display: block;
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(251, 252, 254, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--line);
  }

  .topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .topbar-logo {
    height: 72px;
    width: auto;
  }

  .topbar-divider {
    width: 1px;
    height: 24px;
    background: var(--line);
  }

  .topbar-tagline {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
  }

  .topbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .topbar-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    transition: background var(--transition-fast), color var(--transition-fast);
  }

  .topbar-nav-item:hover {
    background: rgba(47, 140, 255, 0.08);
    color: var(--accent-strong);
  }

  .topbar-nav-active {
    background: var(--accent-soft);
    color: var(--accent-strong);
  }

  .topbar-nav-compose {
    background: linear-gradient(135deg, #2f8cff 0%, #5ab6ff 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(47, 140, 255, 0.25);
  }

  .topbar-nav-compose:hover {
    background: linear-gradient(135deg, #247de8 0%, #48a7ff 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(47, 140, 255, 0.35);
  }

  .topbar-nav-item svg {
    flex-shrink: 0;
  }

  /* ── Stage: full-width 2-column ── */

  .app-stage {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 32px 0;
    grid-template-columns: 1fr;
    gap: 32px;
    justify-content: stretch;
  }

  /* ── App frame → becomes borderless content column ── */

  .app-frame {
    width: 100%;
    border-radius: 0;
    border: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    overflow: visible;
  }

  .app-chrome { display: none; }
  .bottom-nav { display: none; }

  .app-surface {
    padding: 0 0 40px;
  }

  /* ── Brand row on desktop ── */

  .brand-row {
    display: none;
  }

  /* ── Story strip desktop ── */

  /* ── Discover row desktop ── */

  .discover-row {
    padding: 20px 0 18px;
  }

  h2 {
    font-size: 1.8rem;
  }

  .discover-copy {
    font-size: 0.92rem;
  }

  /* ── Feed desktop ── */

  .feed-stack {
    gap: 16px;
  }

  .post-card {
    padding: 20px;
    border-radius: var(--radius-lg);
  }

  .post-avatar {
    width: 44px;
    height: 44px;
    font-size: 0.82rem;
  }

  .post-author {
    font-size: 0.96rem;
  }

  .rich-content {
    font-size: 1rem;
    line-height: 1.75;
  }

  .post-more {
    opacity: 0;
  }

  /* ── Compose modal on desktop: centered ── */

  .compose-column {
    bottom: auto;
    top: 50%;
    width: min(calc(100% - 64px), 560px);
    transform: translate(-50%, -48%) scale(0.97);
  }

  .compose-column.is-open {
    transform: translate(-50%, -50%) scale(1);
  }

  .compose-card {
    border-radius: var(--radius-lg);
    padding: 28px;
  }

  textarea {
    min-height: 180px;
  }

  .notes-editor {
    min-height: 210px;
  }

  /* ── Ambient blurs bigger on desktop ── */

  .ambient {
    width: 500px;
    height: 500px;
    filter: blur(100px);
    opacity: 0.35;
  }

  .ambient-left {
    top: 80px;
    left: -200px;
  }

  .ambient-right {
    top: 300px;
    right: -150px;
  }
}

/* ================================================================
   LARGE DESKTOP  (≥ 1200px)
   ================================================================ */

@media (min-width: 1200px) {
  .app-stage {
    max-width: 1200px;
    gap: 40px;
    padding: 40px 48px 0;
  }

  .topbar-inner {
    padding: 0 48px;
    max-width: 1200px;
  }
}

/* ================================================================
   MOBILE  (≤ 560px)
   ================================================================ */

@media (max-width: 560px) {
  .page-shell {
    padding: 0 0 22px;
  }

  .app-frame {
    width: 100%;
    border-radius: 0;
    border: none;
  }

  .app-surface {
    padding: 56px 18px 94px;
  }

  h2 { font-size: 1.4rem; }

  .brand-logo {
    width: min(100%, 210px);
  }

  .discover-row { padding-top: 10px; }

  .post-card,
  .compose-card,
  .unlock-card {
    border-radius: 20px;
  }

  .post-topline { align-items: center; }
  .post-footer { flex-wrap: wrap; }

  .quick-links {
    justify-items: center;
  }

  .quick-link {
    justify-content: center;
    padding: 0;
    gap: 0;
    background: none;
    border: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }

  .quick-link::before { content: none; }

  .quick-link:hover {
    box-shadow: none;
    transform: translateY(-1px);
  }

  .quick-link-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .quick-link-badge {
    width: 48px;
    height: 48px;
  }

  .compose-column {
    width: calc(100% - 16px);
    bottom: 8px;
  }

.post-more { opacity: 0.4; }
}

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.error-panel {
  width: min(100%, 520px);
  text-align: center;
}

.error-panel h1 {
  margin: 10px 0 22px;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.15;
}
