:root {
  color-scheme: light;
  --bg: #f6f1e8;
  --surface: #fffdfa;
  --surface-soft: #faf4ea;
  --surface-strong: #fff8ef;
  --line: #e7decf;
  --line-strong: #d8cbb8;
  --text: #1d1d1b;
  --muted: #6c655b;
  --accent: #ff6600;
  --shadow: 0 16px 36px rgba(29, 29, 27, 0.06);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --gradient-1: rgba(255, 255, 255, 0.88);
  --gradient-2: rgba(255, 255, 255, 0.5);
  --thumb-bg: #f0e6d8;
  --thumb-text: #9b6d42;
  --banner-bg: rgba(255, 253, 250, 0.96);
  --input-bg: #fffdf9;
  --visited: #8b8b8b;
  
  /* Native Typography Stack */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: ui-serif, "New York", Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    color-scheme: dark;
    --bg: #13110e;
    --surface: #1c1915;
    --surface-soft: #24211d;
    --surface-strong: #1a1714;
    --line: #2d2a25;
    --line-strong: #3d3a34;
    --text: #e7e4e0;
    --muted: #a09a90;
    --accent: #ff7722;
    --shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
    --gradient-1: rgba(30, 25, 20, 0.6);
    --gradient-2: rgba(20, 15, 10, 0.3);
    --thumb-bg: #2a2622;
    --thumb-text: #bca894;
    --banner-bg: rgba(28, 25, 21, 0.96);
    --input-bg: #221f1b;
    --visited: #66625d;
  }
}

.dark {
  color-scheme: dark;
  --bg: #13110e;
  --surface: #1c1915;
  --surface-soft: #24211d;
  --surface-strong: #1a1714;
  --line: #2d2a25;
  --line-strong: #3d3a34;
  --text: #e7e4e0;
  --muted: #a09a90;
  --accent: #ff7722;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
  --gradient-1: rgba(30, 25, 20, 0.6);
  --gradient-2: rgba(20, 15, 10, 0.3);
  --thumb-bg: #2a2622;
  --thumb-text: #bca894;
  --banner-bg: rgba(28, 25, 21, 0.96);
  --input-bg: #221f1b;
  --visited: #66625d;
}

.light {
  color-scheme: light;
  --bg: #f6f1e8;
  --surface: #fffdfa;
  --surface-soft: #faf4ea;
  --surface-strong: #fff8ef;
  --line: #e7decf;
  --line-strong: #d8cbb8;
  --text: #1d1d1b;
  --muted: #6c655b;
  --accent: #ff6600;
  --shadow: 0 16px 36px rgba(29, 29, 27, 0.06);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --gradient-1: rgba(255, 255, 255, 0.88);
  --gradient-2: rgba(255, 255, 255, 0.5);
  --thumb-bg: #f0e6d8;
  --thumb-text: #9b6d42;
  --banner-bg: rgba(255, 253, 250, 0.96);
  --input-bg: #fffdf9;
  --visited: #8b8b8b;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  font-size: 17px; /* iOS standard body size */
}

@media (min-width: 1024px) {
  html {
    font-size: 18px; /* High readability for desktop */
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  line-height: 1.5; /* WCAG / UX standard */
  color: var(--text);
  background:
    radial-gradient(circle at top left, var(--gradient-1), transparent 28rem),
    linear-gradient(180deg, var(--gradient-2), transparent 18rem),
    var(--bg);
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.app-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(4rem + env(safe-area-inset-top)) 1rem 2.2rem;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .app-shell {
    padding: calc(5rem + env(safe-area-inset-top)) 1.5rem 3rem;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.top-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 30;
  padding: calc(0.7rem + env(safe-area-inset-top)) 1rem 0.7rem;
  background: var(--banner-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

@media (min-width: 768px) {
  .top-banner {
    padding: calc(0.8rem + env(safe-area-inset-top)) 2rem 0.8rem;
  }
}

.pull-indicator {
  position: fixed;
  top: calc(4rem + env(safe-area-inset-top));
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-20px) scale(0.85);
  color: var(--accent);
}

.pull-indicator-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--surface);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--line);
}

.pull-indicator-icon {
  width: 22px;
  height: 22px;
}

.pull-indicator.is-refreshing .pull-indicator-icon {
  animation: pull-spinner 0.8s linear infinite;
}

@keyframes pull-spinner {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  min-width: 0;
  max-width: min(54vw, 34rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-mark.is-story-title {
  max-width: min(72vw, 44rem);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.view-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.view {
  min-width: 0;
  opacity: 0;
  transition: opacity 250ms ease-in-out;
}

.view.active {
  opacity: 1;
}

.media-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(19, 16, 13, 0.84);
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease-in-out;
}

.media-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.media-modal-content {
  width: min(100%, 1180px);
  height: min(100%, calc(100vh - 2rem));
}

.media-modal-frame {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  height: 100%;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(17, 14, 11, 0.94);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.media-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.media-modal-copy {
  min-width: 0;
}

.media-modal-copy h2 {
  margin: 0;
  color: #fffaf4;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  line-height: 1.05;
}

.media-modal-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: #130f0c;
  overflow: hidden;
}

.media-modal-image,
.media-modal-video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.media-modal-gallery {
  display: flex;
  gap: 1rem;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 0.25rem;
}

.media-modal-gallery-item {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  margin: 0;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.muted,
.field-help,
.search-copy span,
.member-copy span,
.post-meta,
.story-meta,
.comment-meta,
.story-body,
.empty-state p,
.placeholder-note {
  color: var(--muted);
}

.button,
.pill,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.62rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 600;
}

.button-link {
  min-height: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.button-link:hover {
  color: var(--accent);
}

.button {
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    opacity 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: default;
  opacity: 0.5;
}

.button-primary {
  color: #fffaf3;
  background: var(--accent);
}

.button-primary:hover:not(:disabled) {
  background: #e45c00;
}

.button-ghost {
  background: transparent;
  border-color: var(--line-strong);
}

.button-ghost:hover:not(:disabled) {
  background: var(--surface-soft);
}

.icon-button {
  min-width: 2.35rem;
  padding: 0.5rem;
}

.button-icon {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
}

.pill {
  min-height: 2rem;
  padding: 0.42rem 0.75rem;
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--muted);
  font-size: 0.87rem;
}

.error-banner,
.inline-error {
  padding: 0.9rem 1rem;
  border: 1px solid #f1cab0;
  border-radius: var(--radius-md);
  background: #fff4ec;
  color: #8a3b00;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feed-section,
.settings-panel,
.story-hero,
.story-media-card,
.story-body-card,
.story-comments-card {
  background: var(--surface-strong);
  padding: 1rem;
}

@media (min-width: 768px) {
  .feed-section,
  .story-hero,
  .story-media-card,
  .story-body-card,
  .story-comments-card {
    padding: 1.25rem 1.75rem;
    border-radius: 20px;
  }
}

.section-header,
.panel-heading,
.page-top,
.panel-actions,
.story-comments-header,
.comment-header {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  justify-content: space-between;
}

.section-header {
  padding-bottom: 1rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.section-header.concise {
  padding-bottom: 0.6rem;
  margin-bottom: 0.2rem;
  border-bottom: 1px solid var(--line);
}

.header-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  width: 100%;
}

.header-label {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.header-meta {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.header-separator {
  color: var(--line-strong);
  font-weight: 400;
}

.section-header h2,
.section-header h3,
.page-top h2,
.panel-heading h3,
.story-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.settings-panel .eyebrow {
  margin-bottom: 0.15rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.settings-panel h3 {
  font-size: 1.15rem !important;
  margin: 0;
}

.panel-actions .button {
  min-height: 2.1rem;
  padding: 0.4rem 1rem;
  font-size: 0.88rem;
}

.section-header h2,
.section-header h3 {
  font-size: 1.35rem;
}
.page-top.compact-top {
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
}

.page-top.compact-top h2 {
  font-size: 1.6rem;
  font-family: var(--font-serif);
}

.page-note {
  max-width: 44rem;
  margin: 0.4rem 0 0;
  line-height: 1.6;
}

.section-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

/* Post List & Rows Rewrite */
.posts-list {
  display: flex;
  flex-direction: column;
}

.post-card {
  display: block;
  border-bottom: 1px solid var(--line);
}

.post-card:last-child {
  border-bottom: 0;
}

.post-row-container {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 0;
  width: 100%;
}

@media (min-width: 768px) {
  .post-row-container {
    gap: 1.25rem;
    padding: 1rem 0;
  }
}

.post-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

@media (min-width: 768px) {
  .post-main {
    gap: 0.25rem;
  }
}

.post-kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: -0.1rem;
}

.post-subreddit {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--accent);
}

.post-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 600;
  font-family: "IBM Plex Sans", sans-serif;
}

@media (min-width: 768px) {
  .post-title {
    font-size: 1.2rem;
    line-height: 1.3;
  }
}

.post-title-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.post-title-button:hover .post-title {
  color: var(--accent);
}

.post-title-button:visited .post-title,
.post-card.is-seen .post-title {
  color: var(--visited);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .post-meta {
    flex-wrap: nowrap;
    gap: 1.25rem;
    font-size: 0.88rem;
    margin-top: 0.25rem;
  }
}

.post-meta span {
  display: inline-flex;
  align-items: center;
}

.stat-icon {
  width: 0.9rem;
  height: 0.9rem;
  margin-right: 0.25rem;
  opacity: 0.7;
}

.post-thumb {
  position: relative;
  display: block;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--thumb-bg);
  border: 1px solid var(--line);
  flex-shrink: 0;
  cursor: pointer;
}

@media (min-width: 768px) {
  .post-thumb {
    width: 84px;
    height: 84px;
    border-radius: 14px;
  }
}

.post-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--thumb-text);
}

.post-media-indicator {
  position: absolute;
  right: 0.3rem;
  bottom: 0.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background: rgba(19, 16, 13, 0.85);
  color: #fff7ef;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.post-media-icon {
  width: 0.75rem;
  height: 0.75rem;
}

@media (min-width: 768px) {
  .post-media-indicator {
    width: 1.6rem;
    height: 1.6rem;
    right: 0.4rem;
    bottom: 0.4rem;
  }
  .post-media-icon {
    width: 0.85rem;
    height: 0.85rem;
  }
}

.post-actions {
  display: flex;
  align-items: center;
}

.post-link-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.72rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-link-tag:hover {
  background: var(--surface-soft);
}

.settings-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.settings-layout {
  display: grid;
  gap: 0.85rem;
}

.settings-panel {
  padding: 1rem 1.15rem 1.15rem;
}

.panel-heading {
  margin-bottom: 0.6rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.field > span:first-child {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}

.field-help {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.input {
  width: 100%;
  min-height: 2.4rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 16px; /* Prevents iOS auto-zoom on focus */
}

.input-with-button {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.input-with-button .input {
  flex: 1;
}

.input-with-button .button {
  flex-shrink: 0;
  white-space: nowrap;
}

.panel-actions {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.search-results,
.subreddit-members {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.search-results {
  max-height: 18rem;
  overflow-y: auto;
}

.search-result,
.member-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg);
}

.search-copy,
.member-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.search-copy strong,
.member-copy strong {
  font-size: 0.88rem;
}

.search-copy span,
.member-copy span {
  font-size: 0.78rem;
  line-height: 1.35;
}

.member-remove {
  white-space: nowrap;
}

.search-placeholder {
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--line-strong);
  background: var(--surface-soft);
  color: var(--muted);
}

.story-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.story-content,
.story-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.story-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
}

.story-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.story-hero-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.story-hero,
.story-media-card,
.story-body-card,
.story-comments-card {
  padding: 1.25rem 1.35rem;
}

.story-media-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #16110d;
}

.story-gallery {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.story-gallery-item {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #16110d;
}

.story-media-image,
.story-media-video {
  display: block;
  width: 100%;
  max-height: min(70vh, 46rem);
  object-fit: contain;
  background: #16110d;
}

.story-title-link {
  transition: color 160ms ease;
}

.story-title-link:hover {
  color: var(--accent);
}

.story-reddit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: #ff4500;
  background: rgba(255, 255, 255, 0.78);
}

.story-reddit-link:hover {
  background: var(--surface-soft);
}

.story-body {
  line-height: 1.6;
  font-family: var(--font-serif);
}

@media (min-width: 768px) {
  .story-body {
    max-width: 680px; /* ~66 characters per line */
    font-size: 1.15rem;
  }
}

.story-body a,
.comment-body a {
  color: #0066cc;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 160ms ease;
  overflow-wrap: break-word;
  word-break: break-all;
}

.story-body a:hover,
.comment-body a:hover {
  color: var(--accent);
}

.story-body p,
.comment-body p {
  margin: 0 0 0.9rem;
}

.story-link-note {
  display: grid;
  gap: 0.85rem;
}

.story-comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.comment {
  padding: 0.2rem 0 0.15rem 0.8rem;
  border-left: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
}

.comment-header {
  display: block;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.55rem;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.comment-author {
  color: var(--text);
  font-weight: 600;
}

.comment-toggle {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.comment-toggle:hover:not(:disabled) {
  color: var(--accent);
  background: transparent;
  transform: none;
}

.comment-badge {
  color: #a74a00;
  font-weight: 700;
}

.comment-collapsed-note {
  color: var(--muted);
}

.comment-more {
  padding: 0.15rem 0 0.3rem 0.8rem;
}

.comment-more-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #8b4a0d;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.comment-more-link:hover:not(:disabled) {
  color: var(--accent);
}

.comment-more-link:disabled {
  cursor: default;
  opacity: 0.55;
}

.comment-filter-note {
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.comment-children {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.45rem;
  margin-left: 0.4rem;
  padding-left: 0.75rem;
}

.comment-body {
  margin-top: 0.35rem;
  padding-left: 1.25rem;
  color: var(--text);
  line-height: 1.62;
}

.empty-state,
.loading-state,
.placeholder-state {
  padding: 1.1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.feature-card {
  padding: 1.35rem 1.4rem;
}

.feature-card h2,
.feature-card h3,
.story-empty h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  line-height: 1.02;
}

.feature-card p,
.story-empty p {
  line-height: 1.65;
}

.loading-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.skeleton-row {
  height: 4.6rem;
  border-radius: var(--radius-md);
  background:
    linear-gradient(90deg, rgba(231, 222, 207, 0.6), rgba(255, 255, 255, 0.95), rgba(231, 222, 207, 0.6));
  background-size: 200% 100%;
  animation: shimmer 1.15s linear infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@media (min-width: 920px) {
  .settings-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #multi-panel {
    grid-column: 1 / -1;
  }
}

.desktop-only {
  display: flex !important;
}
.mobile-only {
  display: none !important;
}

@media (max-width: 760px) {
  .app-shell {
    padding: 4.2rem 0 1.6rem;
  }

  .feed-section {
    padding: 0.8rem 0.2rem;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .post-row-container {
    gap: 0.65rem;
    padding: 0.6rem 0.4rem;
    width: 100%;
    align-items: center;
  }

  .post-main {
    flex: 1;
    min-width: 0;
  }

  .post-thumb {
    width: 52px;
    height: 52px;
    border-radius: 6px;
  }

  .post-title {
    font-size: 0.95rem;
    line-height: 1.25;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .post-meta {
    font-size: 0.76rem;
    gap: 0.3rem 0.5rem;
    margin-top: 0.15rem;
    line-height: 1;
  }

  .stat-icon {
    width: 0.8rem;
    height: 0.8rem;
    margin-right: 0.18rem;
    opacity: 0.65;
  }

  .post-media-indicator {
    width: 1.2rem;
    height: 1.2rem;
    right: 0.2rem;
    bottom: 0.2rem;
  }

  .post-media-icon {
    width: 0.65rem;
    height: 0.65rem;
  }

  .top-banner {
    top: 0.4rem;
    width: calc(100vw - 0.8rem);
    padding: 0.55rem 0.7rem;
  }

  .page-top,
  .panel-heading,
  .panel-actions:not(.settings-panel .panel-actions),
  .section-header:not(.concise),
  .story-comments-header,
  .search-result,
  .member-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-panel .panel-actions {
    flex-direction: row;
    justify-content: flex-end;
  }

  .section-header.concise {
    flex-direction: row;
    align-items: baseline;
  }

  .settings-grid,
  .input-row {
    grid-template-columns: 1fr;
  }

  .story-title {
    font-size: 1.8rem;
  }

  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: flex !important;
  }
  
  .post-subreddit-inline {
    font-weight: 400;
    color: var(--accent);
  }

  .post-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 0.35rem;
    opacity: 0.5;
  }
  
  .post-meta span {
    display: inline-flex;
    align-items: center;
  }
}
@import url('/js/render.css');
