@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --ink: #1c1713;
  --muted: #7a6f65;
  --subtle: #a89d93;
  --border: #e5ddd6;
  --bg: #f7f3ef;
  --card: #fdfaf7;
  --accent: #b85c2a;
  --accent-light: #f5ede6;
  --font: 'Instrument Sans', sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
}

html, body { height: 100%; background: var(--bg); font-family: var(--font); color: var(--ink); -webkit-font-smoothing: antialiased; }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); position: relative; z-index: 0; }
/* Faint paper grain — subliminal warmth over the flat sand */
#app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

@media (min-width: 768px) {
  #app { max-width: 640px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
  .bottom-nav { max-width: 640px !important; }
  .topbar { max-width: 640px !important; }
  .story-page-author { max-width: 640px !important; }
  .sheet { max-width: 640px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .photo-img { max-height: none; }
  .story-page-image { }
  .story-card { padding: 4px 0; margin-bottom: 10px; }
  .onboard-slide { max-width: 400px; }
  .onboard-footer { max-width: 400px; }
  .auth-screen { max-width: 400px; margin: 0 auto; }
}

/* ── Auth ── */
.auth-screen { padding: 48px 24px; display: flex; flex-direction: column; min-height: 100dvh; }
.auth-title { font-size: 36px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.auth-sub { font-size: 14px; color: var(--muted); margin-bottom: 40px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-input { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); font-family: var(--font); font-size: 14px; color: var(--ink); outline: none; width: 100%; }
.auth-input:focus { border-color: var(--accent); }
.auth-btn { padding: 14px; border-radius: 12px; background: var(--accent); color: white; border: none; font-family: var(--font); font-size: 14px; font-weight: 500; cursor: pointer; }
.auth-switch { margin-top: 24px; text-align: center; font-size: 14px; color: var(--muted); background: none; border: none; font-family: var(--font); cursor: pointer; }
.auth-hint { font-size: 11px; color: var(--subtle); padding: 4px 4px 0; }
.auth-error { font-size: 11px; color: var(--accent); padding: 4px 4px 0; }
.auth-success { font-size: 11px; color: #4a7c59; padding: 4px 4px 0; }
.auth-forgot { align-self: flex-end; font-size: 12px; color: var(--accent); background: none; border: none; font-family: var(--font); cursor: pointer; padding: 0 4px; }

/* ── Top bar ── */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); background: rgba(243,238,232,0.97); backdrop-filter: blur(14px); position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 100; }
.topbar-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.convo-counter { font-size: 11px; font-weight: 500; color: var(--subtle); display: flex; align-items: center; gap: 4px; opacity: 0; transition: opacity 0.3s; }
.convo-counter:not(:empty) { opacity: 1; }
.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 10px; font-size: 13px; font-weight: 500; opacity: 0; transition: opacity 0.3s, transform 0.3s; z-index: 999; pointer-events: none; font-family: "Instrument Sans", sans-serif; }
.toast-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.topbar-actions { display: flex; gap: 12px; align-items: center; }
.kofi-btn { display: flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; padding: 5px 10px; font-size: 11px; font-weight: 500; font-family: var(--font); background: rgba(231,76,60,0.07); border-radius: 20px; border: none; cursor: pointer; transition: opacity 0.15s; }
.kofi-btn:active { opacity: 0.6; }
.kofi-btn svg { display: block; flex-shrink: 0; }
.kofi-text { display: flex; gap: 3px; }
.kofi-text span:first-child { font-weight: 600; }
.icon-btn { background: none; border: none; cursor: pointer; color: var(--muted); display: flex; align-items: center; justify-content: center; padding: 2px; }

/* ── Bottom nav ── */
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: 58px; background: rgba(236,230,222,0.97); backdrop-filter: blur(14px); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-around; z-index: 100; padding-bottom: env(safe-area-inset-bottom); }
.nav-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; padding: 8px 0; color: var(--subtle); height: 100%; position: relative; }
.nav-tab.active { color: var(--accent); }
.nav-tab svg { transition: all 0.2s; }
.nav-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--accent); position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); }
.nav-plus { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; }

/* ── Page ── */
.page { flex: 1; overflow-y: auto; padding-top: 57px; padding-bottom: 72px; }
.page::-webkit-scrollbar { display: none; }

/* ── Story card ── */
.story-card { background: var(--card); border-bottom: 1px solid var(--border); margin-bottom: 10px; border-radius: 2px; }
.card-meta { display: flex; align-items: center; gap: 8px; padding: 12px 16px 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-light); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex-shrink: 0; overflow: hidden; line-height: 1; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.meta-name { font-size: 13px; font-weight: 500; }
.meta-time { font-size: 11px; color: var(--subtle); margin-left: 6px; }
.bookmark-btn { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--subtle); display: flex; padding: 4px; }
.bookmark-btn.saved { color: var(--accent); }
.article-body { padding: 2px 16px 12px; }
.article-title { font-family: var(--font-serif); font-size: 17px; font-weight: 600; line-height: 1.3; margin-bottom: 6px; letter-spacing: -0.01em; }
.article-excerpt { font-family: var(--font-serif); font-size: 14px; color: var(--ink); line-height: 1.6; }
.read-more-btn { font-size: 12px; color: var(--accent); font-weight: 500; background: none; border: none; cursor: pointer; padding: 6px 0 0; display: block; }
.photo-img { width: 100%; display: block; object-fit: contain; cursor: pointer; opacity: 0; transition: opacity 0.35s ease; }
.photo-img.loaded { opacity: 1; }
.photo-caption { padding: 10px 16px 4px; font-family: var(--font-serif); font-size: 14px; color: var(--ink); line-height: 1.55; }
.card-actions { display: flex; align-items: center; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--border); }
.card-action { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--subtle); background: none; border: none; cursor: pointer; }
.card-tags { margin-left: auto; display: flex; gap: 6px; }
.tag-pill { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: var(--accent-light); color: var(--accent); }

/* ── Skeleton loader ── */
.skeleton { background: var(--border); border-radius: 4px; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }

/* ── Empty state ── */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 32px; text-align: center; gap: 8px; }
.empty-title { font-weight: 500; color: var(--ink); }
.empty-sub { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ── Discover ── */
.search-bar { display: flex; align-items: center; gap: 8px; margin: 12px 16px; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.discover-sticky { background: var(--bg); position: relative; z-index: 2; }
.discover-tag-wrap { overflow: hidden; position: relative; z-index: 1; max-height: 60px; transition: max-height 0.35s ease; }
.search-input { flex: 1; border: none; background: transparent; font-family: var(--font); font-size: 13px; color: var(--ink); outline: none; }
.tags-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 12px; scrollbar-width: none; }
.tags-scroll::-webkit-scrollbar { display: none; }
.tag-btn { font-size: 12px; padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border); background: var(--card); color: var(--muted); white-space: nowrap; cursor: pointer; font-family: var(--font); }
.tag-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.discover-tabs { display: flex; border-bottom: 1px solid var(--border); position: relative; }
.discover-tab { flex: 1; padding: 10px 0; text-align: center; font-size: 13px; font-weight: 500; color: var(--subtle); background: none; border: none; cursor: pointer; font-family: var(--font); border-bottom: 2px solid transparent; transition: color 0.25s; }
.discover-tab.active { color: var(--accent); border-bottom-color: transparent; }
.discover-tab-indicator { position: absolute; bottom: 0; left: 0; width: 50%; height: 2px; background: var(--accent); transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1); will-change: transform; }
#discover-tag-strip { transition: opacity 0.35s ease, transform 0.35s ease; }
.discover-panel { min-height: 200px; }
.grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; }
.grid-item { aspect-ratio: 1; overflow: hidden; cursor: pointer; position: relative; background: var(--bg); outline: 0.5px solid var(--border); }
.grid-item img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.35s ease; }
.grid-item img.loaded { opacity: 1; }
.grid-item:hover img { opacity: 0.85; }
.grid-article { background: var(--card); display: flex; flex-direction: column; padding: 14px 14px 4px; padding-top: 18px; text-align: left; overflow: hidden; }
.grid-article-title { font-family: var(--font-serif); font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.grid-article-excerpt { font-family: var(--font-serif); font-size: 11px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; margin-top: 8px; }
.grid-article-user { font-size: 10px; color: var(--subtle); margin-top: 6px; }
@media (max-width: 767px) {
  .kofi-btn { padding: 4px 12px; }
  .kofi-text { flex-direction: column; line-height: 1.2; text-align: left; gap: 0; }
  .grid-article { padding: 8px 9px 10px; padding-top: 10px; }
  .grid-article-title { font-size: 11px; -webkit-line-clamp: 3; }
  .grid-article-excerpt { font-size: 10px; -webkit-line-clamp: 4; margin-top: 4px; }
  .grid-article-user { display: none; }
}
.new-pill { position: absolute; bottom: 6px; right: 6px; font-size: 9px; font-weight: 600; text-transform: lowercase; color: #fff; background: rgba(0,0,0,0.45); padding: 1px 6px; border-radius: 4px; line-height: 1.4; pointer-events: none; z-index: 2; }
.comment-count-pill { position: absolute; bottom: 6px; left: 6px; font-size: 10px; font-weight: 600; color: #fff; background: rgba(0,0,0,0.55); padding: 2px 6px; border-radius: 6px; line-height: 1.3; pointer-events: none; z-index: 2; display: flex; align-items: center; gap: 3px; }
.people-list { padding: 4px 16px; }
.person-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; }
.person-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-light); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; flex-shrink: 0; overflow: hidden; }
.person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-info { flex: 1; min-width: 0; }
.person-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.person-bio { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.follow-btn { padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; font-family: var(--font); cursor: pointer; border: none; }
.follow-btn.following { background: var(--border); color: var(--muted); }
.follow-btn.follow { background: var(--accent); color: white; }

/* ── Compose ── */
.compose-page { padding: 0; }
.compose-topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); background: rgba(247,243,239,0.96); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 10; }
.compose-label { font-size: 13px; font-weight: 500; }
.post-btn { padding: 6px 18px; border-radius: 20px; background: var(--accent); color: white; border: none; font-family: var(--font); font-size: 13px; font-weight: 500; cursor: pointer; }
.post-btn:disabled { background: var(--border); color: var(--subtle); cursor: default; }
.compose-body { padding: 20px; }
.type-toggle { display: flex; gap: 0; background: var(--border); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.type-btn { flex: 1; padding: 8px; border-radius: 8px; font-size: 13px; font-family: var(--font); border: none; background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 500; }
.type-btn.active { background: var(--card); color: var(--ink); }
.compose-title { font-family: var(--font-serif); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; border: none; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 4px; background: transparent; color: var(--ink); width: 100%; outline: none; }
.compose-text { font-family: var(--font-serif); font-size: 16px; color: var(--ink); border: none; background: transparent; width: 100%; outline: none; line-height: 1.7; min-height: 200px; margin-top: 0; overflow-y: auto; }
.compose-text:empty::before { content: attr(data-placeholder); color: var(--subtle); pointer-events: none; }
.compose-text h3 { font-size: 16px; font-weight: 600; margin: 12px 0 4px; }
.compose-text b, .compose-text strong { font-weight: 600; }
.compose-text a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

#compose-editor-wrap { margin-top: 12px; }
.compose-toolbar { display: flex; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.toolbar-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border: none; background: var(--bg); border-radius: 8px; cursor: pointer; font-family: var(--font); font-size: 14px; color: var(--ink); transition: background 0.15s, color 0.15s; }
.toolbar-btn:active { background: var(--border); }
.toolbar-btn.active { background: var(--ink); color: white; }
.photo-upload-area { border: 2px dashed var(--border); border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 48px 20px; cursor: pointer; color: var(--subtle); margin-bottom: 16px; }
.photo-preview { position: relative; border-radius: 16px; overflow: hidden; margin-bottom: 16px; }
.photo-preview img { width: 100%; display: block; max-height: 320px; object-fit: cover; }
.photo-remove { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,0.45); border: none; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.tags-field { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); margin-top: 12px; }
.tags-field-input { flex: 1; border: none; background: transparent; font-family: var(--font); font-size: 13px; color: var(--ink); outline: none; }

/* ── Profile ── */
.profile-header { padding: 20px; border-bottom: 1px solid var(--border); }
.profile-centered { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 20px 20px; }
.profile-avatar-lg { width: 90px; height: 90px; border-radius: 50%; background: var(--accent-light); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 600; flex-shrink: 0; overflow: hidden; border: 3px solid var(--accent); }
.profile-avatar-lg.donor { border-color: #c9a84c; box-shadow: 0 0 0 2px rgba(201,168,76,0.25); }
.avatar.donor { border: 2px solid #c9a84c; box-shadow: 0 0 0 1.5px rgba(201,168,76,0.2); }
.person-avatar.donor { border: 2px solid #c9a84c; box-shadow: 0 0 0 1.5px rgba(201,168,76,0.2); }
.notif-avatar.donor { border: 2px solid #c9a84c; }

/* @mention autocomplete */
.mention-dropdown { position: absolute; bottom: 100%; left: 0; right: 0; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 -4px 20px rgba(0,0,0,0.08); max-height: 180px; overflow-y: auto; z-index: 300; display: none; }
.mention-dropdown.visible { display: block; }
.mention-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; transition: background 0.1s; }
.mention-item:first-child { border-radius: 12px 12px 0 0; }
.mention-item:last-child { border-radius: 0 0 12px 12px; }
.mention-item:only-child { border-radius: 12px; }
.mention-item.selected, .mention-item:active { background: var(--accent-light); }
.mention-item-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.mention-link { color: var(--accent); font-weight: 500; cursor: pointer; }
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-display-name { font-size: 20px; font-weight: 700; color: var(--ink); margin-top: 14px; }
.profile-bio-centered { font-size: 13px; color: var(--subtle); margin-top: 4px; font-style: italic; line-height: 1.4; }
.profile-stats-row { display: flex; gap: 0; margin-top: 20px; width: 100%; justify-content: space-around; }
.stat-item-clean { flex: 1; text-align: center; background: none; border: none; cursor: pointer; font-family: var(--font); padding: 0; }
.stat-item-clean .stat-n { font-size: 18px; font-weight: 700; color: var(--ink); display: block; }
.stat-item-clean .stat-l { font-size: 10px; font-weight: 500; color: var(--subtle); display: block; margin-top: 2px; letter-spacing: 0.05em; }
.avatar-badge { position: absolute; bottom: 0; right: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); display: flex; align-items: center; justify-content: center; }
.profile-stats { flex: 1; display: flex; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.stat-item { flex: 1; padding: 8px 0; text-align: center; border-right: 1px solid var(--border); cursor: pointer; background: none; border-top: none; border-bottom: none; font-family: var(--font); }
.stat-item:last-child { border-right: none; }
.stat-n { font-size: 14px; font-weight: 600; color: var(--ink); display: block; }
.stat-l { font-size: 11px; color: var(--subtle); display: block; }
.profile-bio { font-size: 13px; color: #000; line-height: 1.5; }
.profile-tabs { display: flex; border-bottom: 1px solid var(--border); }
.profile-tab { flex: 1; padding: 12px 0; text-align: center; font-size: 13px; font-weight: 500; color: var(--subtle); background: none; border: none; cursor: pointer; font-family: var(--font); border-bottom: 2px solid transparent; display: flex; align-items: center; justify-content: center; gap: 5px; }
.profile-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Modals & sheets ── */
.overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; pointer-events: none; }
.overlay::before { content: ''; position: absolute; inset: 0; background: rgba(20,15,10,0); backdrop-filter: blur(0px); transition: background 0.5s ease, backdrop-filter 0.5s ease; z-index: -1; }
.overlay.visible { pointer-events: all; }
.overlay.visible::before { background: rgba(20,15,10,0.78); backdrop-filter: blur(20px); }
.overlay-img { max-width: 100%; max-height: 88dvh; border-radius: 16px; object-fit: contain; transform: scale(0.88); opacity: 0; transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease; box-shadow: 0 32px 80px rgba(0,0,0,0.5); }
.overlay.visible .overlay-img { transform: scale(1); opacity: 1; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(20,15,10,0); backdrop-filter: blur(0px); transition: background 0.35s ease, backdrop-filter 0.35s ease; pointer-events: none; }
.sheet-backdrop.visible { background: rgba(20,15,10,0.6); backdrop-filter: blur(8px); pointer-events: all; }
.sheet { position: fixed; bottom: 0; left: 0; right: 0; margin: 0 auto; transform: translateY(100%); transition: transform 0.45s cubic-bezier(0.32,0.72,0,1); width: 100%; max-width: 480px; background: var(--card); border-radius: 24px 24px 0 0; z-index: 201; display: flex; flex-direction: column; box-shadow: 0 -8px 40px rgba(0,0,0,0.15); }
.sheet.visible { transform: translateY(0); }
.sheet.settled { transform: none; }
.sheet.full { max-height: 98dvh; }
.sheet.half { max-height: 75dvh; }
.sheet-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 12px auto 0; flex-shrink: 0; }
.sheet-close { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--border); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 16px; }
.sheet-scroll { overflow-y: auto; flex: 1; padding: 20px 24px; scrollbar-width: none; }
.sheet-scroll::-webkit-scrollbar { display: none; }
.sheet-title { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 16px; line-height: 1.25; }
.sheet-body { font-size: 15px; color: #000; line-height: 1.8; }
.sheet-body h3 { font-size: 18px; font-weight: 600; margin: 20px 0 8px; }
.sheet-body b, .sheet-body strong { font-weight: 600; }
.sheet-body p, .sheet-body div { margin-bottom: 4px; }
.sheet-divider { display: none; }
.sheet-author { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }

/* Comments */
.comments-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.comments-title { font-size: 13px; font-weight: 500; margin-bottom: 16px; }
.comment-row { display: flex; gap: 10px; margin-bottom: 16px; }
.comment-name { font-size: 12px; font-weight: 500; }
.comment-time { font-size: 11px; color: var(--subtle); margin-left: 6px; }
.comment-text { font-size: 13px; color: #000; margin-top: 2px; line-height: 1.5; }
.comment-input-row { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); margin-top: 8px; }
.comment-input { flex: 1; border: none; background: transparent; font-family: var(--font); font-size: 13px; color: var(--ink); outline: none; }
.send-btn { background: none; border: none; cursor: pointer; color: var(--border); }
.send-btn.active { color: var(--accent); }

/* Profile sheet */
.profile-sheet-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.profile-sheet-avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--accent-light); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; flex-shrink: 0; overflow: hidden; }
.profile-sheet-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-sheet-name { font-size: 18px; font-weight: 600; }
.profile-sheet-bio { font-size: 13px; color: #000; margin-top: 2px; }
.profile-sheet-stats { display: flex; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 16px; }
.follow-action-btn { width: 100%; padding: 14px; border-radius: 16px; font-size: 14px; font-weight: 600; font-family: var(--font); border: none; cursor: pointer; margin-bottom: 20px; }
.follow-action-btn.follow { background: var(--accent); color: white; }
.follow-action-btn.following { background: var(--border); color: var(--muted); }

/* Follow list sheet */
.follow-list { padding: 8px 16px; overflow-y: auto; }
.follow-list-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.follow-list-title { font-size: 15px; font-weight: 600; }

/* Delete confirm */
.delete-sheet-body { padding: 20px 24px 12px; }
.delete-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.delete-sub { font-size: 13px; color: var(--muted); }
.delete-btns { padding: 8px 16px; display: flex; flex-direction: column; gap: 8px; padding-bottom: calc(env(safe-area-inset-bottom) + 80px); }
.delete-confirm-btn { padding: 14px; border-radius: 16px; background: #c0392b; color: white; border: none; font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer; }
.delete-cancel-btn { padding: 14px; border-radius: 16px; background: var(--border); color: var(--ink); border: none; font-family: var(--font); font-size: 14px; font-weight: 500; cursor: pointer; }

/* Activity */
.activity-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 60vh; gap: 12px; text-align: center; padding: 0 32px; }

/* Page host container — each page is a separate host */
.page-host {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  position: relative;
}

.page {
  flex: 1;
  overflow-y: auto;
  padding-top: 57px;
  padding-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}
.page::-webkit-scrollbar { display: none; }

/* ── Threaded Conversations ── */
.convo-section { margin-top: 12px; padding-top: 4px; }
.ornament-divider { display: flex; align-items: center; justify-content: center; margin: 8px 0 22px; }
.ornament-divider::before, .ornament-divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.ornament-divider span { display: flex; gap: 7px; padding: 0 14px; }
.ornament-divider span i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); display: block; }
.convo-title { font-size: 14px; font-weight: 600; margin-bottom: 16px; color: var(--ink); }
.convo-count { font-weight: 400; color: var(--ink); margin-left: 4px; }
.convo-empty-prompt { padding: 24px 0; text-align: center; font-size: 14px; color: var(--subtle); line-height: 1.5; font-family: var(--font-serif); }
.convo-empty-prompt strong { color: var(--ink); font-weight: 600; }

.convo-thread { margin-bottom: 8px; background: var(--card); border-radius: 14px; padding: 6px 12px; box-shadow: 0 1px 6px rgba(28,23,19,0.05); }
.convo-item { padding: 10px 0; position: relative; }
.convo-item + .convo-item { border-top: none; }

/* Nesting indentation — caps at depth 2, deeper replies stay flush */
.convo-depth-1, .convo-depth-2 { padding-left: 28px; border-top: none !important; padding-top: 6px; padding-bottom: 6px; }
.convo-depth-flat { padding-left: 0; border-top: none !important; padding-top: 6px; padding-bottom: 6px; }

/* Thread line - removed for cleaner look */

.convo-content { position: relative; }

.convo-header { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.convo-user-link { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.convo-user-link:active { opacity: 0.7; }
.convo-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.convo-time { font-size: 11px; color: var(--subtle); margin-left: auto; margin-right: 12px; }
.convo-body { font-size: 14px; color: var(--ink); line-height: 1.5; padding-left: 33px; }
.convo-actions { display: flex; gap: 14px; padding-left: 33px; margin-top: 4px; }
.convo-action-btn { font-size: 11px; color: var(--subtle); background: none; border: none; cursor: pointer; font-family: var(--font); display: flex; align-items: center; gap: 4px; }
.convo-action-btn:hover { color: var(--accent); }

/* Author highlight - now on .convo-content, not .convo-item */
.convo-content.is-author {
  background: rgba(184,92,42,0.05);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 2px 0;
}
.convo-content.is-author .convo-body { padding-left: 33px; }
.convo-content.is-author .convo-actions { padding-left: 33px; }
.convo-content.is-author .convo-time { margin-right: 0; }

.convo-author-badge {
  font-size: 10px;
  font-weight: 600;
  color: white;
  background: var(--accent);
  padding: 1px 7px;
  border-radius: 10px;
  letter-spacing: 0.02em;
}

/* Quoted reply */
.convo-quote {
  margin-left: 33px;
  margin-bottom: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--bg);
  border-left: 2px solid var(--border);
  font-size: 11px;
  color: var(--subtle);
  line-height: 1.4;
}
.convo-quote-user { font-weight: 500; color: var(--muted); }

/* Pinned comment */
.convo-pinned {
  background: var(--accent-light);
  border-radius: 12px;
  padding: 12px !important;
  margin-bottom: 12px;
  border: 1px solid rgba(184,92,42,0.12);
}
.convo-pinned .avatar {
  background: white;
  box-shadow: 0 0 0 1px rgba(184,92,42,0.15);
}
.convo-pinned .convo-time { margin-right: 0; }
.convo-pin-badge {
  font-size: 10px;
  font-weight: 500;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 8px;
}

/* Reply input */
.convo-reply-box {
  margin-left: 33px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.convo-reply-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 12px;
  color: var(--ink);
  outline: none;
}
.convo-reply-context {
  margin-bottom: 8px;
  padding: 0 2px;
  font-size: 12px;
  color: var(--subtle);
  display: flex;
  align-items: center;
  gap: 6px;
}
.convo-reply-cancel {
  font-size: 12px;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}
.story-comment-bar .convo-reply-context {
  margin: 0 0 6px;
  padding: 0 2px;
}

/* Inline reply box — breaks out to full width regardless of nesting */
.convo-inline-reply:empty { display: none; }
.convo-inline-reply.active {
  padding: 10px 0 4px;
}
.convo-inline-reply .convo-main-input {
  margin-top: 4px;
}

/* Main comment input — fixed above the bottom navbar at all times */
.story-comment-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(58px + env(safe-area-inset-bottom));
  width: 100%;
  max-width: 480px;
  padding: 10px 16px;
  background: rgba(245, 241, 235, 0.75);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-radius: 20px 20px 0 0;
  z-index: 99;
}
.story-comment-bar::before {
  display: none;
}
@media (min-width: 768px) {
  .story-comment-bar { max-width: 640px; }
}
.story-comment-bar:empty { display: none; }
.convo-main-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 8px 9px 18px;
  border-radius: 22px;
  background: #fff;
  border: none;
  box-shadow: 0 3px 14px rgba(28,23,19,0.09);
  position: relative;
  z-index: 1;
}
.convo-main-field {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  resize: none;
  overflow-y: auto;
  line-height: 1.4;
  padding: 0;
  margin: 0;
  min-height: 22px;
  max-height: 120px;
  word-break: break-word;
}
.convo-main-field:empty:before {
  content: attr(data-placeholder);
  color: var(--subtle);
  pointer-events: none;
}
.convo-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.convo-send-btn:active { opacity: 0.7; }
.convo-send-btn.active { color: white; }

/* Pin button in context menu */
.convo-pin-btn {
  font-size: 11px;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Clickable tags */
.clickable-tag { cursor: pointer; transition: all 0.2s; }
.clickable-tag:hover { background: var(--accent); color: white; }

/* Tag header on discover when filtering */
.tag-hero { padding: 20px 16px 16px; border-bottom: 1px solid var(--border); }
.tag-hero-name { font-size: 22px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.tag-hero-count { font-size: 13px; color: var(--subtle); margin-top: 4px; }

/* Hot conversations */
.hot-section { padding: 16px 0 6px; border-bottom: 1px solid var(--border); }
.hot-header { display: flex; align-items: center; gap: 6px; padding: 0 16px 10px; font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.hot-header svg { color: var(--accent); }
.hot-scroll { display: flex; gap: 10px; padding: 0 16px 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scrollbar-width: none; }
.hot-scroll::-webkit-scrollbar { display: none; }
.hot-card { flex-shrink: 0; width: 260px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; cursor: pointer; scroll-snap-align: start; transition: transform 0.15s ease; }
.hot-card:active { transform: scale(0.98); }
.hot-card-photo { width: 100%; height: 140px; object-fit: cover; display: block; }
.hot-card-article { height: 140px; display: flex; align-items: center; justify-content: center; padding: 16px 20px; text-align: center; background: var(--bg); }
.hot-card-article-title { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.35; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.hot-card-meta { padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; }
.hot-card-author { display: flex; align-items: center; gap: 7px; }
.hot-card-av { width: 22px; height: 22px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 600; color: var(--muted); overflow: hidden; }
.hot-card-av img { width: 100%; height: 100%; object-fit: cover; }
.hot-card-name { font-size: 12px; color: var(--muted); font-weight: 500; }
.hot-card-badge { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-light); padding: 3px 8px; border-radius: 10px; }
.hot-card-badge svg { flex-shrink: 0; }
.just-posted-section { padding: 0 0 8px; }
.just-posted-header { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 12px 16px 8px; }
.just-posted-grid { display: flex; gap: 10px; padding: 0 16px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.just-posted-grid::-webkit-scrollbar { display: none; }
.jp-card { flex-shrink: 0; width: 150px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; scroll-snap-align: start; transition: transform 0.15s ease; }
.jp-card:active { transform: scale(0.97); }
.jp-card-photo { width: 100%; height: 120px; overflow: hidden; }
.jp-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jp-card-article { height: 120px; display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center; background: var(--bg); }
.jp-card-title { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.jp-card-meta { padding: 8px 10px; display: flex; align-items: center; gap: 6px; }
.jp-card-av { width: 18px; height: 18px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 600; color: var(--muted); overflow: hidden; flex-shrink: 0; }
.jp-card-av img { width: 100%; height: 100%; object-fit: cover; }
.jp-card-name { font-size: 11px; color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* Tag chips input */
.tag-chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); margin-top: 12px; min-height: 44px; cursor: text; }
.tag-chip { display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; background: var(--accent-light); color: var(--accent); font-size: 12px; font-weight: 500; font-family: var(--font); white-space: nowrap; }
.tag-chip-remove { background: none; border: none; cursor: pointer; color: var(--accent); font-size: 14px; line-height: 1; padding: 0 0 0 2px; font-family: var(--font); opacity: 0.6; }
.tag-chip-remove:hover { opacity: 1; }
.tag-chips-input { border: none; background: transparent; font-family: var(--font); font-size: 13px; color: var(--ink); outline: none; flex: 1; min-width: 80px; padding: 2px 0; }
.tag-chips-input::placeholder { color: var(--subtle); }

/* ── Story Page ── */
.story-back-btn { background: none; border: none; cursor: pointer; color: var(--muted); display: flex; align-items: center; padding: 4px; }
.story-page-author {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: fixed;
  top: 57px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 99;
}
.story-page-content { padding-top: 61px; background: var(--card); }
.story-page-username { font-size: 14px; font-weight: 500; color: var(--ink); }
.story-page-time { font-size: 12px; color: var(--subtle); margin-top: 1px; }
.story-page-image { width: 100%; display: block; opacity: 0; transition: opacity 0.35s ease; }
.story-page-image.loaded { opacity: 1; }
.story-page-photo-title { padding: 14px 16px 8px; font-size: 15px; font-weight: 500; color: var(--ink); }
.story-page-caption { padding: 14px 16px 2px; font-family: var(--font-serif); font-size: 15px; color: var(--ink); line-height: 1.65; white-space: pre-wrap; word-wrap: break-word; background: var(--card); }
.story-page-article-title { padding: 20px 16px 12px; font-family: var(--font-serif); font-size: 28px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; line-height: 1.2; background: var(--card); }
.story-page-divider { display: none; }
.story-page-article-body { padding: 16px; font-family: var(--font-serif); font-size: 16px; color: var(--ink); line-height: 1.75; background: var(--card); }
.story-page-article-body h3 { font-size: 18px; font-weight: 600; margin: 20px 0 8px; }
.story-page-article-body b, .story-page-article-body strong { font-weight: 600; }
.story-page-article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.story-page-article-body p, .story-page-article-body div { margin-bottom: 4px; }
.story-page-tags { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 16px 12px; background: var(--card); }
.story-page-stats { display: flex; gap: 20px; padding: 12px 16px 4px; border-top: 1px solid var(--border); }
.story-page-stat { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--subtle); }
.story-share-btn { background: none; border: none; cursor: pointer; font-family: var(--font); font-size: 13px; margin-left: auto; color: var(--ink); }
#story-page-comments { padding: 0 16px 60px; }

/* User page follow button */
.userpage-follow-btn { width: 100%; padding: 12px; border-radius: 12px; font-size: 14px; font-weight: 600; font-family: var(--font); border: none; cursor: pointer; margin-top: 14px; transition: all 0.2s; }
.userpage-follow-btn.follow { background: var(--accent); color: white; }
.userpage-follow-btn.following { background: var(--border); color: var(--muted); }

/* Sheet handle — more visible for swipe affordance */
.sheet-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 10px auto 0; flex-shrink: 0; cursor: grab; }
.sheet-handle:active { cursor: grabbing; background: var(--subtle); }

/* ── Notifications / Activity ── */
.activity-filters { display: flex; gap: 0; padding: 0; border-bottom: none; background: none; backdrop-filter: none; position: static; z-index: 9; margin: 6px -20px 0; padding: 0 20px; border-top: 1px solid var(--border); }
.activity-filter-tab { flex: 1; padding: 12px 0; font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--muted); background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: color 0.15s, border-color 0.15s; position: relative; text-align: center; }
.activity-filter-tab.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.unreplied-count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; border-radius: 8px; background: var(--accent); color: white; font-size: 9px; font-weight: 700; padding: 0 4px; margin-left: 6px; vertical-align: middle; line-height: 1; }
.notif-dismiss-x { font-size: 12px; font-weight: 500; color: var(--subtle); background: none; border: none; cursor: pointer; font-family: var(--font); padding: 0; transition: color 0.15s; }
.notif-dismiss-x:hover, .notif-dismiss-x:active { color: var(--muted); }
.notif-dismissed-label { font-size: 11px; color: var(--subtle); font-style: italic; }
.activity-group-label { font-size: 13px; font-weight: 600; color: var(--ink); padding: 16px 16px 8px; }

.notif-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; cursor: pointer; transition: background 0.15s; }
.notif-item:active { background: var(--border); }
.notif-unread { background: rgba(193, 118, 62, 0.06); }

.notif-left { flex-shrink: 0; }
.notif-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.notif-avatar-placeholder { background: var(--accent-light); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }

.notif-center { flex: 1; min-width: 0; }
.notif-text { font-size: 13px; color: var(--ink); line-height: 1.4; }
.notif-text strong { font-weight: 600; }
.notif-time { color: var(--subtle); font-size: 12px; }

.notif-comment-body { font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.notif-actions { margin-top: 6px; display: flex; gap: 12px; }
.notif-reply-btn { font-size: 12px; font-weight: 500; color: var(--accent); background: none; border: none; cursor: pointer; font-family: var(--font); padding: 0; }

.notif-right { flex-shrink: 0; }
.notif-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; cursor: pointer; }
.notif-thumb-text { background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 9px; color: var(--muted); padding: 4px; text-align: center; overflow: hidden; line-height: 1.2; }

.notif-reply-box { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.notif-reply-input { flex: 1; padding: 8px 12px; border-radius: 20px; border: 1px solid var(--border); background: var(--card); font-family: var(--font); font-size: 13px; color: var(--ink); outline: none; }
.notif-reply-input:focus { border-color: var(--accent); }
.notif-send-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: opacity 0.15s; }
.notif-send-btn:active { opacity: 0.7; }

/* Notification badge on bell icon */
.nav-tab { position: relative; }
.notif-badge { position: absolute; top: 2px; right: 50%; margin-right: -16px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--accent); color: white; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; line-height: 1; pointer-events: none; }

/* Inline reply in activity */
.notif-my-reply { padding: 6px 0 0; }
.notif-my-reply-header { font-size: 11px; font-weight: 500; color: #4a7c59; display: flex; align-items: center; gap: 4px; }
.notif-my-reply-header::before { content: '\2713'; font-size: 10px; }
.notif-my-reply-body { font-size: 12px; color: var(--ink); margin-top: 2px; line-height: 1.4; }

/* Delete comment button */
.convo-delete-btn { color: var(--subtle) !important; }
.convo-edited { font-size: 10px; color: var(--subtle); font-style: italic; margin-left: 4px; }
.convo-edit-field { width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); font-family: var(--font); font-size: 13px; color: var(--ink); outline: none; min-height: 36px; line-height: 1.5; }
.convo-edit-field:focus { border-color: var(--accent); }
.convo-edit-actions { display: flex; gap: 8px; margin-top: 6px; }
.convo-edit-save { font-size: 12px; font-weight: 500; color: white; background: var(--accent); border: none; border-radius: 8px; padding: 5px 14px; cursor: pointer; font-family: var(--font); }
.convo-edit-cancel { font-size: 12px; color: var(--subtle); background: none; border: none; cursor: pointer; font-family: var(--font); }

/* Dismiss notification */
.notif-actions-row { display: flex; gap: 12px; margin-top: 4px; }
.notif-dismiss-btn { font-size: 11px; color: var(--subtle); background: none; border: none; cursor: pointer; font-family: var(--font); padding: 0; }
.notif-dismiss-btn:active { color: var(--accent); }

/* ── Support Modal ── */
.support-header { padding: 20px 20px 12px; text-align: center; }
.support-title { font-size: 18px; font-weight: 600; color: var(--ink); }
.support-sub { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.4; }

.support-tabs { display: flex; gap: 4px; margin: 0 20px; padding: 3px; background: var(--bg); border-radius: 10px; }
.support-tab { flex: 1; padding: 8px; font-size: 13px; font-weight: 500; font-family: var(--font); border: none; background: none; border-radius: 8px; cursor: pointer; color: var(--muted); transition: all 0.2s; }
.support-tab.active { background: white; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.support-body { padding: 20px; }

.support-once { text-align: center; }
.support-once-text { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 20px; }
.support-donate-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 32px; border-radius: 12px; background: var(--ink); color: white; font-size: 14px; font-weight: 500; font-family: var(--font); border: none; cursor: pointer; transition: opacity 0.15s; }
.support-donate-btn:active { opacity: 0.7; }

.support-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.support-plan { display: flex; flex-direction: column; align-items: center; padding: 14px 8px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--card); cursor: pointer; font-family: var(--font); transition: all 0.15s; }
.support-plan:active { transform: scale(0.96); }
.support-plan.selected { border-color: var(--accent); background: rgba(184,92,42,0.05); }
.support-plan-amount { font-size: 18px; font-weight: 600; color: var(--ink); }
.support-plan-cycle { font-size: 11px; color: var(--subtle); margin-top: 2px; }

.support-success { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; font-size: 14px; font-weight: 500; color: #4a7c59; }

#paypal-btn-area { min-height: 50px; }

/* ── Pull to Refresh ── */
.ptr-indicator { height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; opacity: 0; transition: height 0.25s ease, opacity 0.2s ease; }
.ptr-arc { transform: rotate(-90deg); }
.ptr-arc-track { fill: none; stroke: var(--border); stroke-width: 2.5; }
.ptr-arc-fill { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; transition: stroke-dashoffset 0.1s linear; }
.ptr-loading .ptr-arc { animation: ptr-spin 0.7s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(270deg); } }

/* ── Count roll + bump ── */
.roll-wrap { position: relative; display: inline-block; overflow: hidden; vertical-align: bottom; }
.roll-num { display: inline-block; transition: transform 0.34s cubic-bezier(0.4,0,0.2,1), opacity 0.34s ease; }
.roll-out { position: absolute; left: 0; top: 0; transform: translateY(0); opacity: 1; }
.roll-out-active { transform: translateY(-100%); opacity: 0; }
.roll-in { transform: translateY(100%); opacity: 0; }
.roll-in-active { transform: translateY(0); opacity: 1; }
.count-bump { animation: count-bump 0.4s cubic-bezier(0.34,1.56,0.64,1); display: inline-block; }
@keyframes count-bump { 0% { transform: scale(1); } 35% { transform: scale(1.32); } 100% { transform: scale(1); } }

/* ── Send button launch ── */
.convo-send-btn svg { transition: transform 0.15s ease; }
.convo-send-btn.launching svg { animation: send-launch 0.5s cubic-bezier(0.4,0,0.2,1); }
@keyframes send-launch {
  0% { transform: translate(0,0) scale(1); opacity: 1; }
  40% { transform: translate(14px,-14px) scale(0.85); opacity: 0; }
  41% { transform: translate(-10px,10px) scale(0.85); opacity: 0; }
  100% { transform: translate(0,0) scale(1); opacity: 1; }
}

/* ── New comment slide-in ── */
.convo-item.convo-new { animation: comment-in 0.45s cubic-bezier(0.2,0.8,0.2,1); }
.convo-item.convo-new .convo-content { animation: comment-glow 1.4s ease forwards; border-radius: 12px; }
.convo-item.convo-highlight .convo-content {
  animation: comment-glow 2.2s ease forwards;
  border-radius: 12px;
}
.convo-item.convo-unseen .convo-content { animation: unseen-fade 4s ease forwards; border-radius: 12px; }
@keyframes unseen-fade { 0% { background: rgba(184,92,42,0.07); } 100% { background: transparent; } }
.convo-unseen-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: middle; animation: dot-fade 4s ease forwards; }
@keyframes dot-fade { 0%,60% { opacity: 1; } 100% { opacity: 0; } }
.convo-show-more { display: flex; align-items: center; gap: 6px; padding: 8px 0 4px; font-size: 12px; color: var(--accent); font-weight: 500; background: none; border: none; cursor: pointer; font-family: var(--font); }
.convo-show-more svg { flex-shrink: 0; }
.convo-collapsed { display: none; }
.comment-row.convo-new { animation: comment-in 0.45s cubic-bezier(0.2,0.8,0.2,1), comment-glow 1.4s ease forwards; border-radius: 12px; }
@keyframes comment-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes comment-glow { 0% { background: var(--accent-light); } 100% { background: transparent; } }

/* ── Follow button morph ── */
.userpage-follow-btn.morphing, .follow-action-btn.morphing { animation: follow-pop 0.42s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes follow-pop { 0% { transform: scale(1); } 40% { transform: scale(0.9); } 100% { transform: scale(1); } }

/* ── Empty-state warmth ── */
.empty-state { animation: empty-fade 0.6s ease both; }
@keyframes empty-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .roll-num, .count-bump, .convo-send-btn.launching svg, .convo-item.convo-new,
  .convo-item.convo-new .convo-content, .userpage-follow-btn.morphing,
  .follow-action-btn.morphing, .empty-state { animation: none !important; transition: none !important; }
}

/* ── Push Notification Banner ── */
.push-banner { position: fixed; bottom: 72px; left: 12px; right: 12px; background: var(--card); border-radius: 16px; padding: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.12); z-index: 50; transform: translateY(120%); transition: transform 0.35s ease; }
.push-banner.visible { transform: translateY(0); }
.push-banner-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.push-banner-sub { font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 4px; }
.push-banner-actions { display: flex; gap: 8px; margin-top: 12px; }
.push-banner-btn { padding: 8px 20px; border-radius: 10px; font-size: 13px; font-weight: 500; font-family: var(--font); border: none; cursor: pointer; }
.push-enable { background: var(--accent); color: white; }
.push-enable:active { opacity: 0.8; }
.push-dismiss { background: var(--bg); color: var(--muted); }
.push-dismiss:active { opacity: 0.8; }

/* ── Onboarding ── */
.onboard-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100dvh; padding: 40px 32px; text-align: center; }
.onboard-slide { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; max-width: 320px; }
.onboard-icon { margin-bottom: 28px; }
.onboard-title { font-size: 22px; font-weight: 600; color: var(--ink); margin-bottom: 12px; letter-spacing: -0.02em; }
.onboard-text { font-size: 14px; color: var(--muted); line-height: 1.6; }
.onboard-footer { width: 100%; max-width: 320px; padding-bottom: 20px; }
.onboard-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 24px; }
.onboard-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background 0.2s; }
.onboard-dot.active { background: var(--accent); }
.onboard-btn { width: 100%; padding: 14px; border-radius: 12px; background: var(--accent); color: white; font-size: 15px; font-weight: 500; font-family: var(--font); border: none; cursor: pointer; }
.onboard-btn:active { opacity: 0.8; }
.onboard-skip { width: 100%; padding: 12px; background: none; border: none; font-size: 13px; color: var(--subtle); font-family: var(--font); cursor: pointer; margin-top: 8px; }

/* Analytics */
.analytics-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px; }
.analytics-stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: center; }
.analytics-stat-icon { color: var(--subtle); margin-bottom: 6px; }
.analytics-stat-value { font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.analytics-stat-label { font-size: 11px; font-weight: 500; color: var(--subtle); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 2px; }
.analytics-section { padding: 0 16px 20px; }
.analytics-section-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.analytics-compare { display: flex; justify-content: space-between; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--ink); }
.analytics-split-bar { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; margin-bottom: 8px; }
.analytics-split-fill { height: 100%; background: var(--accent); border-radius: 4px; }
.analytics-split-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--subtle); }
.analytics-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.analytics-toggle { display: flex; gap: 0; margin: 0 16px 16px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.analytics-toggle-btn { flex: 1; padding: 8px; font-size: 12px; font-weight: 500; font-family: var(--font); color: var(--subtle); background: none; border: none; cursor: pointer; transition: all 0.2s; }
.analytics-toggle-btn.active { background: var(--accent); color: #fff; }
.analytics-chart { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 8px 8px; min-height: 140px; }
.analytics-bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 120px; }
.analytics-bar-col { display: flex; flex-direction: column; align-items: center; flex: 1; max-width: 32px; height: 100%; justify-content: flex-end; }
.analytics-bar-val { font-size: 9px; font-weight: 600; color: var(--subtle); margin-bottom: 2px; min-height: 12px; }
.analytics-bar { border-radius: 3px 3px 0 0; min-height: 2px; transition: height 0.3s ease; width: 100%; }
.analytics-bar-label { font-size: 9px; color: var(--subtle); margin-top: 3px; }
.analytics-bar-day { font-size: 8px; color: var(--subtle); opacity: 0.7; margin-top: 1px; }
.analytics-commenters { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.analytics-commenter-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.analytics-commenter-row:last-child { border-bottom: none; }
.analytics-rank { font-size: 12px; font-weight: 700; color: var(--subtle); width: 16px; text-align: center; }
.analytics-commenter-av { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-light); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; overflow: hidden; flex-shrink: 0; }
.analytics-commenter-av img { width: 100%; height: 100%; object-fit: cover; }
.analytics-commenter-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--ink); }
.analytics-commenter-count { font-size: 13px; font-weight: 600; color: var(--accent); }
.analytics-report { margin: 8px 16px 24px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px 16px; }
.analytics-report-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 16px; }
.analytics-report-section { margin-bottom: 18px; }
.analytics-report-section:last-child { margin-bottom: 0; }
.analytics-report-heading { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); margin-bottom: 8px; }
.analytics-report-text { font-size: 13px; color: var(--ink); line-height: 1.5; margin-bottom: 6px; }
.analytics-report-text:last-child { margin-bottom: 0; }
.analytics-report-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: 13px; }
.analytics-report-row-label { font-weight: 500; color: var(--ink); }
.analytics-report-row-vals { font-weight: 600; color: var(--ink); }
.analytics-report-row-change { font-size: 12px; font-weight: 600; min-width: 50px; text-align: right; }
.analytics-report-tip { font-size: 13px; color: var(--ink); line-height: 1.5; padding: 8px 12px; background: var(--bg); border-radius: 8px; margin-bottom: 6px; }
.analytics-report-tip:last-child { margin-bottom: 0; }


/* ═══════════════════════════════════════════════════════════════
   DESKTOP LAYOUT (>= 1024px)
   Centered column with slim labeled sidebar + right panel
   ═══════════════════════════════════════════════════════════════ */

@media (min-width: 1024px) {

  :root {
    --desk-nav-w: 160px;
    --desk-content-w: 580px;
    --desk-right-w: 260px;
    --desk-gap: 0px;
  }

  /* ── Reset mobile #app ── */
  #app {
    max-width: var(--desk-content-w);
    margin: 0 auto;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
  #app::before { display: none; }

  /* ── Hide mobile chrome ── */
  .bottom-nav { display: none !important; }
  .topbar { display: none !important; }
  /* Keep topbar on story/profile/userpage/analytics pages */
  #page-story .topbar,
  #page-profile .topbar,
  #page-userpage .topbar,
  #page-analytics .topbar {
    display: flex !important;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    max-width: none !important;
    width: 100% !important;
    z-index: 100;
  }

  /* ── Page adjustments ── */
  .page-host {
    overflow: visible !important;
  }
  .page {
    padding-top: 0 !important;
    padding-bottom: 32px !important;
    overflow: visible !important;
  }

  /* ── Feed header (replaces topbar) ── */
  .desk-feed-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(247,243,239,0.95);
    backdrop-filter: blur(12px);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .desk-feed-header h1 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
  }
  .desk-feed-header .convo-counter {
    opacity: 1;
    margin-left: 12px;
  }
  .desk-feed-header .activity-filters {
    position: static;
    border-bottom: none;
    background: none;
    backdrop-filter: none;
    padding: 0;
    margin-top: 12px;
  }

  /* ── Story card tweaks ── */
  .story-card {
    padding: 0;
    margin-bottom: 10px;
    border-radius: 0;
    transition: background 0.15s;
  }
  .story-card:hover { background: var(--card); }
  .photo-img { border-radius: 0; }
  .card-actions { border-top: none; }

  /* Recent conversations text ── */
  .desk-rc-body { color: #1c1713; }
  .desk-rc-story { color: var(--muted); }

  /* Happening now */
  .desk-happening-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: opacity 0.15s;
  }
  .desk-happening-item:last-child { border-bottom: none; }
  .desk-happening-item:hover { opacity: 0.7; }
  .desk-happening-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
  }
  .desk-happening-title {
    font-size: 12px;
    color: var(--ink);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ── Story page ── */
  .story-page-author {
    position: sticky !important;
    top: 57px !important;
    left: 0 !important;
    transform: none !important;
    max-width: none !important;
    width: 100% !important;
    z-index: 99;
  }
  .story-page-content { padding-top: 0 !important; }
  .story-comment-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: var(--desk-content-w) !important;
    width: 100% !important;
    border-radius: 0;
    border-top: 1px solid var(--border);
    z-index: 99;
  }

  /* ── Discover ── */
  .discover-sticky {
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(12px);
    background: rgba(247,243,239,0.95);
  }
  .grid { grid-template-columns: repeat(3, 1fr); }

  /* ── Sheets on desktop ── */
  .sheet {
    max-width: 560px;
    left: 50%;
    margin-left: -280px;
    right: auto;
    transform: translateY(100%);
  }
  .sheet.visible { transform: translateY(0); }
  .sheet.settled { transform: none; }

  /* ── Toast ── */
  .toast { bottom: 40px; }

  /* ── Auth ── */
  .auth-screen { max-width: 400px; margin: 0 auto; }

  /* ═════════════════════════════════════
     Left sidebar (hugs center column)
     ═════════════════════════════════════ */
  .desk-left-nav {
    position: fixed;
    top: 0;
    bottom: 0;
    width: var(--desk-nav-w);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    z-index: 10;
    /* positioned via JS to hug center column */
  }
  .desk-logo {
    padding: 0 16px 28px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    cursor: pointer;
  }
  .desk-logo span { font-weight: 300; }
  .desk-logo i {
    display: inline-block;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--accent);
    margin-left: 1px;
    vertical-align: middle;
    margin-bottom: 2px;
    font-style: normal;
  }
  .desk-nav-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 8px;
    flex: 1;
  }
  .desk-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 400;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    background: none;
    border: none;
    font-family: var(--font);
    width: 100%;
    text-align: left;
  }
  .desk-nav-btn:hover { background: var(--bg); color: var(--ink); }
  .desk-nav-btn.active { background: var(--accent-light); color: var(--accent); font-weight: 500; }
  .desk-nav-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
  .desk-nav-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    background: var(--accent);
    color: #fff;
    min-width: 18px; height: 18px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 5px;
  }
  .desk-compose-btn {
    margin: 0 8px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    border: none;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s;
  }
  .desk-compose-btn:hover { opacity: 0.9; }
  .desk-compose-btn svg { width: 16px; height: 16px; }
  .desk-user-area {
    display: flex; align-items: center; gap: 8px;
    padding: 14px 16px 0;
    margin-top: 10px;
    border-top: 1px solid var(--border);
    cursor: pointer;
  }
  .desk-user-area:hover { opacity: 0.8; }
  .desk-user-name { font-size: 12px; font-weight: 500; }
  .desk-user-handle { font-size: 11px; color: var(--subtle); }

  /* ═════════════════════════════════════
     Right panel (hugs center column)
     ═════════════════════════════════════ */
  .desk-right-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    width: var(--desk-right-w);
    padding: 24px 16px;
    overflow-y: auto;
    z-index: 10;
    /* positioned via JS to hug center column */
  }
  .desk-right-panel::-webkit-scrollbar { display: none; }
  .desk-panel-section { margin-bottom: 24px; }
  .desk-panel-heading {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--subtle);
    margin-bottom: 12px;
  }

  /* Recent conversations */
  .desk-rc-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: opacity 0.15s;
  }
  .desk-rc-item:last-child { border-bottom: none; }
  .desk-rc-item:hover { opacity: 0.7; }
  .desk-rc-header {
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 3px;
  }
  .desk-rc-user { font-size: 12px; font-weight: 500; }
  .desk-rc-time { font-size: 10px; color: var(--subtle); margin-left: auto; }
  .desk-rc-body {
    font-size: 12px; color: var(--muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .desk-rc-story {
    font-size: 11px; color: var(--subtle);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Suggested people in right panel */
  .desk-sp {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0;
    cursor: pointer;
  }
  .desk-sp:hover { opacity: 0.8; }
  .desk-sp-info { flex: 1; min-width: 0; }
  .desk-sp-name { font-size: 13px; font-weight: 500; }
  .desk-sp-bio {
    font-size: 11px; color: var(--subtle);
    white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis;
  }
  .desk-sp-follow {
    font-size: 11px; padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--accent);
    color: var(--accent);
    background: none;
    font-family: var(--font);
    font-weight: 500; cursor: pointer;
    transition: all 0.15s;
  }
  .desk-sp-follow:hover { background: var(--accent); color: #fff; }

  .desk-panel-footer {
    font-size: 11px; color: var(--subtle);
    line-height: 1.6;
    padding-top: 16px;
    border-top: 1px solid var(--border);
  }
  .desk-panel-footer a { color: var(--subtle); text-decoration: none; }
  .desk-panel-footer a:hover { color: var(--accent); }
}

/* Wider screens: bump content width slightly */
@media (min-width: 1400px) {
  :root {
    --desk-content-w: 620px;
    --desk-right-w: 280px;
    --desk-nav-w: 180px;
  }
}

/* Hide desktop elements on mobile */
@media (max-width: 1023px) {
  .desk-left-nav { display: none !important; }
  .desk-right-panel { display: none !important; }
}
