@font-face {
  font-family: 'Ridibatang';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_twelve@1.0/RIDIBatang.woff') format('woff');
  font-weight: normal;
  font-display: swap;
}

[hidden] {
  display: none !important;
}

:root {
  --bg: #f6f3ee;
  --surface: #fffdf9;
  --surface-strong: #ffffff;
  --ink: #191816;
  --muted: #77716a;
  --line: #ddd7ce;
  --line-soft: #ebe6df;
  --accent: #2a2926;
  --chip: #ebe6de;
  --shadow: 0 18px 50px rgba(37, 33, 28, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,.9), transparent 34%),
    var(--bg);
  color: var(--ink);
  font-family:
    Pretendard, "Pretendard Variable", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Noto Sans KR", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.site-header {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  font-size: 15px;
}

.brand-text {
  font-size: 19px;
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.45);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ghost-button:hover {
  background: white;
}

.hero {
  padding: 78px 0 48px;
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}

.hero h1 {
  white-space: pre-line;
  margin: 0;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.055em;
  font-weight: 850;
}

.hero-copy {
  max-width: 610px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: -0.015em;
}

.search-box {
  margin-top: 38px;
  width: min(100%, 650px);
  min-height: 62px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.search-icon {
  color: var(--muted);
  font-size: 26px;
  transform: translateY(-1px);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 18px 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
}

.search-box input::placeholder {
  color: #aaa39a;
}

.clear-search {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9b948b;
  font-size: 22px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}

.clear-search.visible {
  opacity: 1;
  pointer-events: auto;
}

.clear-search:hover {
  background: var(--chip);
  color: var(--ink);
}

.controls {
  padding: 8px 0 50px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
}

.filter-label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.4);
  border-radius: 999px;
  padding: 9px 15px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  transition: .16s ease;
}

.chip:hover {
  transform: translateY(-1px);
  background: white;
}

.chip.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.content-section {
  padding: 42px 0 120px;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-kicker {
  margin-bottom: 8px;
}

.section-head h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.035em;
}

.result-count {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.status-card,
.empty-state {
  min-height: 240px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
  text-align: center;
  background: rgba(255,255,255,.25);
}

.status-card p,
.empty-state p {
  margin: 0;
  line-height: 1.6;
  font-size: 14px;
}

.status-card.error {
  color: #8d3535;
  border-color: #ddb9b6;
  background: #fff7f6;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #d5cfc7;
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.content-card {
  position: relative;
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.64);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.content-card:hover {
  transform: translateY(-3px);
  background: white;
  border-color: #d0c8bd;
  box-shadow: 0 14px 32px rgba(37, 33, 28, .075);
}

.card-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 27px;
}

.card-tag {
  border-radius: 999px;
  background: var(--chip);
  color: #5f5952;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 800;
}

.card-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.card-author {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.card-arrow {
  position: absolute;
  right: 20px;
  bottom: 18px;
  color: #9e978e;
  font-size: 18px;
}

.empty-symbol {
  font-size: 30px;
  color: #aaa298;
}

.empty-state h3 {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
}

.reader-overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  overflow-y: auto;
  background: rgba(20, 18, 16, .55);
  backdrop-filter: blur(8px);
  padding: 32px;
}

.reader {
  width: min(100%, 900px);
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  background: var(--surface);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  overflow: hidden;
}

.reader-header {
  position: relative;
  padding: 52px 64px 34px;
  border-bottom: 1px solid var(--line-soft);
}

.reader-meta-top {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
}

.reader-tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.reader-tag.subtle {
  background: var(--chip);
  color: #5f5952;
}

.reader-close {
  position: absolute;
  right: 28px;
  top: 28px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: #6f6961;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.reader-close:hover {
  background: var(--chip);
  color: var(--ink);
}

.reader-header h2 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(29px, 4vw, 44px);
  line-height: 1.2;
  letter-spacing: -0.045em;
}

.reader-author {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.reader-body {
  min-height: 350px;
  padding: 48px 64px 80px;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
  font-family: 'Ridibatang', "Batang", serif;
  font-size: 17px;
  line-height: 2.05;
  letter-spacing: -0.01em;
}

.reader-loading {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
  font-family:
    Pretendard, "Pretendard Variable", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Noto Sans KR", Arial, sans-serif;
  font-size: 14px;
}

.reader-error {
  color: #9b3b3b;
  font-family:
    Pretendard, "Pretendard Variable", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Noto Sans KR", Arial, sans-serif;
}

body.reader-open {
  overflow: hidden;
}

@media (max-width: 840px) {
  .filter-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reader-overlay {
    padding: 12px;
  }

  .reader {
    min-height: calc(100vh - 24px);
    border-radius: 20px;
  }

  .reader-header,
  .reader-body {
    padding-left: 30px;
    padding-right: 30px;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(calc(100% - 28px), var(--max));
  }

  .site-header {
    height: 68px;
  }

  .hero {
    padding: 58px 0 40px;
  }

  .hero h1 {
  white-space: pre-line;
    font-size: 44px;
  }

  .hero-copy {
    font-size: 15px;
  }

  .search-box {
    min-height: 58px;
    border-radius: 17px;
  }

  .controls {
    padding-bottom: 38px;
  }

  .content-section {
    padding-top: 34px;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .content-card {
    min-height: 168px;
  }

  .reader-header {
    padding-top: 74px;
  }

  .reader-body {
    font-size: 16px;
    line-height: 1.95;
  }
}


.filter-row.secondary {
  margin-top: 28px;
}

.view-switch-wrap {
  min-width: 210px;
}

.view-switch {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.45);
}

.view-button {
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.view-button.active {
  background: var(--ink);
  color: #fff;
}

.card-status {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff3d8;
  color: #8a6213;
  font-size: 10px;
  font-weight: 850;
}

.content-list-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(255,255,255,.58);
}

.content-list {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.content-list th,
.content-list td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  font-size: 13px;
}

.content-list th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .02em;
  background: rgba(255,255,255,.45);
}

.content-list tbody tr {
  cursor: pointer;
  transition: background .15s ease;
}

.content-list tbody tr:hover {
  background: rgba(255,255,255,.9);
}

.content-list tbody tr:last-child td {
  border-bottom: 0;
}

.list-title {
  font-weight: 800;
  color: var(--ink);
}

.list-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 8px;
  background: #eee9e2;
  color: #625b53;
  font-size: 10px;
  font-weight: 850;
}

.list-status.warning {
  background: #fff3d8;
  color: #8a6213;
}

.reader-tag.warning {
  background: #fff3d8;
  color: #8a6213;
}

.reader-filename {
  margin: 9px 0 0;
  color: #9d958c;
  font-size: 12px;
  line-height: 1.6;
  word-break: break-all;
}

@media (max-width: 840px) {
  .filter-row.secondary {
    margin-top: 24px;
  }

  .view-switch-wrap {
    min-width: 0;
  }
}


.card-status.edited,
.list-status.edited,
.reader-tag.edited {
  background: #e8f0ff;
  color: #315a9c;
}


/* v6.3 controls refresh */
.controls {
  padding: 10px 0 52px;
}

.controls-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr) minmax(240px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.control-card {
  background: rgba(255,255,255,.58);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 20px;
  min-height: 110px;
  box-shadow: 0 10px 28px rgba(37, 33, 28, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.control-card-wide {
  min-width: 0;
}

.filter-label {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.view-switch {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.76);
  align-self: flex-start;
}

.view-button {
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 10px 13px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.view-button.active {
  background: var(--ink);
  color: #fff;
}

.content-list-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(255,255,255,.58);
}

.content-list {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.content-list th,
.content-list td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  font-size: 13px;
}

.content-list th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .02em;
  background: rgba(255,255,255,.45);
}

.content-list tbody tr {
  cursor: pointer;
  transition: background .15s ease;
}

.content-list tbody tr:hover {
  background: rgba(255,255,255,.9);
}

.content-list tbody tr:last-child td {
  border-bottom: 0;
}

.list-title {
  font-weight: 800;
  color: var(--ink);
}

@media (max-width: 980px) {
  .controls-grid {
    grid-template-columns: 1fr;
  }

  .control-card {
    min-height: 0;
  }
}


/* v6.6 - hero settings flicker prevention */
.hero-settings-pending .eyebrow,
.hero-settings-pending h1,
.hero-settings-pending .hero-copy {
  opacity: 0;
}

.hero-settings-ready .eyebrow,
.hero-settings-ready h1,
.hero-settings-ready .hero-copy {
  opacity: 1;
  transition: opacity .14s ease;
}

/* v6.6 - list alignment */
.content-list th:nth-child(1),
.content-list th:nth-child(2),
.content-list th:nth-child(4),
.content-list td:nth-child(1),
.content-list td:nth-child(2),
.content-list td:nth-child(4) {
  text-align: center;
}

.content-list th:nth-child(3),
.content-list td:nth-child(3) {
  text-align: left;
}

.content-list th:nth-child(1),
.content-list td:nth-child(1) {
  width: 120px;
}

.content-list th:nth-child(2),
.content-list td:nth-child(2) {
  width: 100px;
}

.content-list th:nth-child(4),
.content-list td:nth-child(4) {
  width: 180px;
}

/* v6.6 - reader scroll-to-top */
.reader-scroll-top {
  position: fixed;
  z-index: 70;
  right: max(28px, calc((100vw - 900px) / 2 + 28px));
  bottom: 28px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,253,249,.96);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(25,24,22,.14);
  font-size: 21px;
  font-weight: 800;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity .16s ease,
    transform .16s ease,
    visibility .16s ease,
    background .16s ease;
}

.reader-scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.reader-scroll-top:hover {
  background: #fff;
  transform: translateY(-2px);
}

@media (max-width: 840px) {
  .reader-scroll-top {
    right: 24px;
    bottom: 24px;
  }
}


/* v6.8 - mobile list optimization */
@media (max-width: 640px) {
  .content-list-wrap {
    overflow-x: hidden;
    width: 100%;
  }

  .content-list {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }

  .content-list th,
  .content-list td {
    padding: 9px 5px;
    font-size: 10px;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    vertical-align: middle;
  }

  .content-list th {
    font-size: 9px;
    letter-spacing: -0.01em;
  }

  .content-list th:nth-child(1),
  .content-list td:nth-child(1) {
    width: 17%;
  }

  .content-list th:nth-child(2),
  .content-list td:nth-child(2) {
    width: 15%;
  }

  .content-list th:nth-child(3),
  .content-list td:nth-child(3) {
    width: 43%;
  }

  .content-list th:nth-child(4),
  .content-list td:nth-child(4) {
    width: 25%;
  }

  .content-list td:nth-child(3) {
    font-size: 10.5px;
    line-height: 1.4;
  }

  .content-list td:nth-child(1),
  .content-list td:nth-child(2),
  .content-list td:nth-child(4) {
    font-size: 9.5px;
  }

  .list-title {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 420px) {
  .content-list th,
  .content-list td {
    padding: 8px 4px;
    font-size: 9px;
  }

  .content-list th {
    font-size: 8.5px;
  }

  .content-list td:nth-child(3) {
    font-size: 9.5px;
    line-height: 1.35;
  }

  .content-list td:nth-child(1),
  .content-list td:nth-child(2),
  .content-list td:nth-child(4) {
    font-size: 8.8px;
  }
}


/* v6.9 - compact header / RJS BOOK brand */
.site-header {
  height: 64px;
}

.brand {
  gap: 9px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.cat-mark {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
}

.cat-mark svg {
  width: 22px;
  height: 22px;
  display: block;
}

.brand-text {
  font-size: 17px;
  letter-spacing: .015em;
}

.ghost-button {
  padding: 8px 12px;
  font-size: 12px;
}

.hero {
  padding: 46px 0 32px;
  max-width: 720px;
}

.eyebrow {
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.02;
}

.hero-copy {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.65;
}

.search-box {
  margin-top: 26px;
  min-height: 56px;
  border-radius: 17px;
  box-shadow: 0 12px 34px rgba(37,33,28,.065);
}

.search-box input {
  padding: 15px 0;
  font-size: 15px;
}

.controls {
  padding: 4px 0 38px;
}

.control-card {
  min-height: 98px;
  padding: 16px 18px;
}

.content-section {
  padding-top: 34px;
}

@media (max-width: 640px) {
  .site-header {
    height: 58px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .cat-mark svg {
    width: 20px;
    height: 20px;
  }

  .brand-text {
    font-size: 15px;
  }

  .hero {
    padding: 28px 0 24px;
  }

  .hero h1 {
    font-size: clamp(31px, 9vw, 42px);
    line-height: 1.06;
  }

  .hero-copy {
    margin-top: 14px;
    font-size: 14px;
  }

  .search-box {
    margin-top: 20px;
    min-height: 52px;
    padding: 0 14px;
  }

  .controls {
    padding-bottom: 28px;
  }

  .control-card {
    padding: 14px 15px;
  }
}


/* v6.10 - reader sticky compact header */
.reader {
  overflow: visible;
}

.reader-header {
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(255,253,249,.97);
  backdrop-filter: blur(14px);
  transition:
    padding .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.reader.reader-compact .reader-header {
  padding-top: 14px;
  padding-bottom: 13px;
  box-shadow: 0 8px 22px rgba(35,31,27,.08);
}

.reader.reader-compact .reader-meta-top {
  margin-bottom: 7px;
  gap: 5px;
}

.reader.reader-compact .reader-tag {
  padding: 4px 8px;
  font-size: 9px;
}

.reader.reader-compact .reader-header h2 {
  max-width: calc(100% - 58px);
  font-size: 18px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.025em;
}

.reader.reader-compact .reader-author {
  margin-top: 5px;
  font-size: 11px;
}

.reader.reader-compact .reader-filename {
  display: none;
}

.reader.reader-compact .reader-close {
  top: 15px;
  right: 20px;
  width: 34px;
  height: 34px;
  font-size: 20px;
  background: rgba(255,255,255,.86);
}

/* Move the top button outside the clipped reader card */
.reader-scroll-top {
  position: fixed;
  z-index: 90;
  right: 28px;
  bottom: 28px;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(221,215,206,.95);
  border-radius: 50%;
  background: rgba(255,253,249,.98);
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(20,18,16,.20);
  font-size: 22px;
  font-weight: 850;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity .16s ease,
    visibility .16s ease,
    transform .16s ease,
    background .16s ease;
}

.reader-scroll-top.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.reader-scroll-top:hover {
  background: #fff;
  transform: translateY(-2px);
}

@media (min-width: 960px) {
  .reader-scroll-top {
    right: max(30px, calc((100vw - 900px) / 2 - 72px));
  }
}

@media (max-width: 840px) {
  .reader-header {
    top: 0;
  }

  .reader.reader-compact .reader-header {
    padding: 11px 18px 10px;
  }

  .reader.reader-compact .reader-close {
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
  }

  .reader.reader-compact .reader-header h2 {
    max-width: calc(100% - 48px);
    font-size: 15px;
  }

  .reader.reader-compact .reader-author {
    font-size: 10px;
  }

  .reader-scroll-top {
    right: 18px;
    bottom: 18px;
    width: 46px;
    height: 46px;
    font-size: 20px;
  }
}


/* v6.11 - simplified hero / compact mobile controls */
.hero {
  padding-top: 34px;
  padding-bottom: 24px;
  max-width: 680px;
}

.hero h1 {
  font-size: clamp(34px, 4.3vw, 54px);
  line-height: 1.04;
}

.search-box {
  margin-top: 22px;
}

@media (max-width: 640px) {
  .hero {
    padding: 12px 0 12px;
    max-width: none;
  }

  .hero .eyebrow,
  .hero h1 {
    display: none;
  }

  .search-box {
    margin-top: 0;
    min-height: 44px;
    border-radius: 14px;
    padding: 0 12px;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(37,33,28,.05);
  }

  .search-icon {
    font-size: 20px;
  }

  .search-box input {
    padding: 11px 0;
    font-size: 13px;
  }

  .clear-search {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }

  .controls {
    padding: 0 0 20px;
  }

  .controls-grid {
    gap: 8px;
  }

  .control-card {
    min-height: 0;
    padding: 10px 11px;
    border-radius: 14px;
  }

  .filter-label {
    margin-bottom: 8px;
    font-size: 10px;
  }

  .chips {
    gap: 6px;
  }

  .chip {
    padding: 6px 10px;
    font-size: 11px;
  }

  .view-switch {
    gap: 4px;
    padding: 3px;
    border-radius: 11px;
  }

  .view-button {
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 10px;
  }

  .content-section {
    padding-top: 24px;
  }

  .section-head {
    margin-bottom: 16px;
  }
}

@media (max-width: 420px) {
  .app-shell {
    width: min(calc(100% - 24px), var(--max));
  }

  .hero {
    padding-top: 8px;
  }

  .search-box {
    min-height: 42px;
  }

  .control-card {
    padding: 9px 10px;
  }

  .chip {
    padding: 5px 9px;
    font-size: 10px;
  }
}
