/* ── Google Fonts ─────────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap");

/* ── Design Tokens — Dark (default) ──────────────────────── */
:root {
  --bg:           #0b1120;
  --bg-2:         #0f172a;
  --bg-3:         #111a2e;
  --bg-hover:     rgba(255,255,255,0.04);
  --surface:      rgba(255,255,255,0.03);
  --panel:        rgba(12,16,28,0.7);
  --line:         rgba(255,255,255,0.08);
  --line-2:       rgba(255,255,255,0.14);
  --text:         #f9fafb;
  --text-2:       #d1d5db;
  --text-3:       #9ca3af;
  --accent:       #10b981;
  --accent-hover: #34d3a0;
  --accent-soft:  rgba(16,185,129,0.12);
  --accent-border:rgba(16,185,129,0.3);
  --danger:       #f87171;
  --success:      #10b981;
  --on-accent:    #04140d;
  --chip-bg:      rgba(11,17,32,0.75);
  --shadow-popover: 0 16px 40px -10px rgba(0,0,0,0.7), 0 2px 6px rgba(0,0,0,0.5);
  --shadow-toast: 0 10px 30px -6px rgba(0,0,0,0.6), 0 0 0 4px var(--accent-soft);
}

/* ── Design Tokens — Light ────────────────────────────────── */
[data-theme="light"] {
  --bg:           #fafaf7;
  --bg-2:         #ffffff;
  --bg-3:         #ffffff;
  --bg-hover:     rgba(16,185,129,0.06);
  --surface:      rgba(16,24,40,0.035);
  --panel:        rgba(255,255,255,0.75);
  --line:         rgba(17,24,39,0.09);
  --line-2:       rgba(17,24,39,0.16);
  --text:         #0f172a;
  --text-2:       #374151;
  --text-3:       #6b7280;
  --accent:       #059669;
  --accent-hover: #047857;
  --accent-soft:  rgba(5,150,105,0.1);
  --accent-border:rgba(5,150,105,0.35);
  --danger:       #dc2626;
  --success:      #059669;
  --on-accent:    #ffffff;
  --chip-bg:      rgba(255,255,255,0.85);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 15% 20%, rgba(16,185,129,0.07), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(16,185,129,0.04), transparent 45%),
    var(--bg);
  transition: background-color 180ms;
}

[data-theme="light"] body {
  background:
    radial-gradient(circle at 15% 20%, rgba(16,185,129,0.08), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(16,185,129,0.05), transparent 45%),
    var(--bg);
}

body[data-layout="app"] {
  overflow: hidden;
  height: 100vh;
}

a { color: var(--accent); }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-border); }

/* ── App Shell — Three Column Layout ─────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 340px;
  height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Left Nav Column ──────────────────────────────────────── */
.nav-col {
  display: flex;
  flex-direction: column;
  padding: 20px 16px 20px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  gap: 2px;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 20px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  text-decoration: none;
  display: block;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand-name .dot { color: var(--accent); }

.theme-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  flex-shrink: 0;
  transition: background 120ms, color 120ms, border-color 120ms;
}

.theme-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-border);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: background 120ms, color 120ms;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav-item.active {
  color: var(--text);
  font-weight: 600;
}

.nav-item.active .nav-icon { color: var(--accent); }

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-2);
  transition: color 120ms;
}

.nav-item:hover .nav-icon { color: var(--text); }

.nav-badge {
  margin-left: auto;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}

.nav-badge:empty { display: none; }

/* ── Center Feed Column ───────────────────────────────────── */
.feed-col {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--line);
}

.feed-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--panel);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  gap: 12px;
}

.seg {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.seg-btn {
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms, color 120ms;
  display: inline-block;
}

.seg-btn:hover { color: var(--text); }

.seg-btn.active {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 2px 8px -2px rgba(16,185,129,0.5);
}

.feed-empty {
  padding: 60px 18px;
  text-align: center;
  color: var(--text-3);
}

.feed-spacer { height: 60px; }

/* ── Alert Banners ────────────────────────────────────────── */
.feed-alert {
  margin: 12px 12px 0;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  border: 1px solid var(--line-2);
}

.feed-alert.info {
  border-color: var(--line-2);
  background: var(--bg-hover);
  color: var(--text-2);
}

.feed-alert.warn {
  border-color: rgba(251,191,36,0.3);
  background: rgba(251,191,36,0.06);
  color: #fbbf24;
}

.feed-alert.success {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ── Post Card ────────────────────────────────────────────── */
.post {
  display: flex;
  flex-direction: column;
  padding: 18px 22px 12px;
  margin: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: background 120ms, border-color 120ms;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.post:hover { background: var(--bg-hover); }

.post-thumb-link { display: block; margin-bottom: 10px; border-radius: 10px; overflow: hidden; }

.post.unread { border-color: var(--accent-border); }

.post.unread::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--accent);
  box-shadow: 0 0 12px 0 var(--accent-soft);
  border-radius: 14px 0 0 14px;
}

.post-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  margin-bottom: 6px;
}

.post-sender {
  font-weight: 700;
  color: var(--text);
}

.post-handle {
  color: var(--text-3);
  font-size: 13px;
}

.post-sep { color: var(--text-3); }

.post-time {
  color: var(--text-3);
  font-size: 13px;
}

.post-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 8px;
}

.post-summary {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 8px;
  width: 100%;
}

.action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: color 120ms, background 120ms;
}

.action:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.action.is-read { color: var(--success); }
.action.is-saved { color: var(--accent); }

.action svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.actions-spacer { flex: 1; }

/* Kebab */
.kebab-wrap {
  position: relative;
}

.kebab-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 120ms, background 120ms;
}

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

.kebab-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 220px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow-popover);
  backdrop-filter: blur(12px);
  z-index: 50;
  animation: kebab-in 120ms ease-out;
}

.kebab-menu.open { display: block; }

@keyframes kebab-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.kebab-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  transition: background 120ms;
}

.kebab-item:hover { background: var(--bg-hover); }

.kebab-item.danger { color: var(--danger); }
.kebab-item.danger:hover { background: rgba(248,113,113,0.1); }

.kebab-item--disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.kebab-item-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.kebab-item-body {}
.kebab-item-title { font-weight: 500; }
.kebab-item-desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.kebab-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

/* Post Thumbnail */
.post-thumb {
  width: 100%;
  max-height: 280px;
  border-radius: 10px;
  border: 1px solid var(--line);
  object-fit: cover;
  display: block;
}

.post-thumb-placeholder {
  width: 100%;
  height: 160px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  display: flex;
  align-items: flex-end;
  padding: 8px;
}

/* ── Right Rail ───────────────────────────────────────────── */
.right-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 18px;
  border-left: 1px solid var(--line);
  overflow-y: auto;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line);
  transition: border-color 120ms, box-shadow 120ms;
}

.search-wrap:focus-within {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-3);
  pointer-events: none;
}

.search-wrap .search-input {
  flex: 1;
  padding: 12px 0;
  background: transparent;
  border: none;
  -webkit-appearance: none;
  appearance: none;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  outline: none;
  min-width: 0;
}

.search-wrap .search-input::placeholder { color: var(--text-3); }

.right-placeholder {
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  padding: 24px 18px;
}

.right-placeholder-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.right-placeholder-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-3);
}

/* ── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-3);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow-toast);
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  transition: opacity 200ms, transform 200ms;
  white-space: nowrap;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Auth Layout ──────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
}

.card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}

.card h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--text);
}

/* ── Content Layouts (non-feed pages) ────────────────────── */
.page-content {
  padding: 24px;
  max-width: 720px;
}

.page-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}

.page-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}

/* ── Form Elements ────────────────────────────────────────── */
.field-row {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
select,
textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  font-size: 14px;
  font-family: "Inter", sans-serif;
  background: var(--surface);
  color: var(--text);
  width: 100%;
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input::placeholder,
textarea::placeholder { color: var(--text-3); }

code {
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--accent);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms, box-shadow 120ms;
  box-shadow: 0 4px 16px -6px rgba(16,185,129,0.5);
}

.btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 22px -6px rgba(16,185,129,0.6);
  color: var(--on-accent);
}

.btn.secondary {
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--line-2);
  box-shadow: none;
}

.btn.secondary:hover {
  background: var(--bg-hover);
  box-shadow: none;
}

.btn--sm {
  padding: 5px 12px;
  font-size: 13px;
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--text-3);
  box-shadow: none;
}

.btn--ghost:hover {
  background: var(--bg-hover);
  color: var(--text);
  box-shadow: none;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 120ms;
}

.btn-outline:hover { background: var(--accent-soft); }

/* ── Notices ──────────────────────────────────────────────── */
.notice {
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  margin: 10px 0;
  font-size: 14px;
}

.notice.error {
  border-color: rgba(248,113,113,0.4);
  background: rgba(248,113,113,0.08);
  color: var(--danger);
}

.muted { color: var(--text-3); }

/* ── Section Cards ────────────────────────────────────────── */
.section-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}

.section-card h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--text);
}

/* ── Tables ───────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  padding: 6px 8px;
  font-weight: 600;
  color: var(--text-3);
  border-bottom: 1px solid var(--line);
}

td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
}

tr:last-child td { border-bottom: none; }

/* ── Sender Rows ──────────────────────────────────────────── */
.sender-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--surface);
  margin-bottom: 10px;
}

.sender-row.pending { border-color: rgba(251,191,36,0.35); background: rgba(251,191,36,0.04); }
.sender-row.denied  { opacity: 0.6; }

.sender-confirm-box {
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(251,191,36,0.4);
  border-radius: 8px;
  background: rgba(251,191,36,0.05);
  font-size: 13px;
}

/* ── News Item Detail ─────────────────────────────────────── */
.reader-content {
  padding: 24px 28px;
  max-width: 680px;
}

.news-email-wrapper {
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  padding: 24px 28px;
  overflow: hidden;
  isolation: isolate;
}

.email-scale-inner { transform-origin: top left; }

/* Kit/ConvertKit full-width div fix — replicates email-client mobile media query */
.news-email-wrapper .full-width { width: 100% !important; }
/* Kit/ConvertKit preview-text: container div has no display:none, only its children do */
.news-email-wrapper #preview-text { display: none !important; }

/* ── Reader Bar (sticky combined header for /news/items view) ── */
.reader-bar {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 4px;
}

.reader-bar-actions {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 2px;
}

/* ── Feedback Widget ──────────────────────────────────────── */
.feedback-widget {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  right: calc(20px + env(safe-area-inset-right, 0px));
  z-index: 1000;
}

.feedback-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback-panel {
  display: none;
  position: absolute;
  bottom: 48px;
  right: 0;
  width: 280px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-popover);
}

.feedback-panel.open { display: block; }

.feedback-panel textarea {
  resize: vertical;
  min-height: 80px;
}

/* ── Responsive ───────────────────────────────────────────── */
/* inline search form inside feed-header (search results page) */
.search-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
}
.search-inline .search-icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-3); }
.search-inline .search-clear { display: flex; align-items: center; flex-shrink: 0; color: var(--text-3); line-height: 1; }
.search-inline .search-clear:hover { color: var(--text); }
.search-inline .search-clear svg { width: 14px; height: 14px; }
.search-inline .search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  flex: 1;
  min-width: 0;
}

/* hide search nav item when right-rail search box is visible */
.nav-search-btn { display: none; }

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .right-col { display: none; }
  .nav-search-btn { display: flex; }
}

/* Pull-to-refresh indicator */
.ptr-indicator {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-3);
  transition: opacity 150ms;
}
.ptr-indicator.ptr-visible { display: flex; }
.ptr-indicator svg {
  width: 16px;
  height: 16px;
  animation: ptr-spin 0.8s linear infinite;
}
@keyframes ptr-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .hide-on-mobile { display: none !important; }
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .nav-col {
    flex-direction: row;
    padding: 10px 12px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: hidden;
    gap: 4px;
    height: auto;
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 96px), transparent 100%);
    mask-image: linear-gradient(to right, black calc(100% - 96px), transparent 100%);
  }
  .brand-header { padding-bottom: 0; margin-right: 8px; }
  .brand-name   { display: none; }
  .theme-btn    { margin-left: 4px; }
  .nav-item     { padding: 8px 10px; }
  .nav-item span.nav-label { display: none; }
  .feed-col     { height: calc(100vh - 60px); height: calc(100dvh - 60px); }

  .reader-content {
    padding: 16px 14px;
    max-width: 100%;
  }
  .news-email-wrapper {
    border: none;
    border-radius: 0;
    padding: 8px 0;
  }
  .post-actions {
    gap: 2px;
  }
  .post-actions .action {
    padding: 6px 6px;
    font-size: 12px;
  }
  .actions-spacer {
    flex: 0;
    width: 4px;
  }
  .feed-spacer { height: calc(80px + env(safe-area-inset-bottom, 0px)); }
}
