:root {
  color-scheme: light;
  --paper: #f7f4ef;
  --paper-deep: #e8efe9;
  --ink: #26231f;
  --muted: #736b60;
  --line: #ddd7ce;
  --surface: #ffffff;
  --surface-soft: #fbfaf7;
  --accent: #315f55;
  --accent-strong: #21483f;
  --gold: #a77434;
  --sky: #d8e9ec;
  --rose: #ead2ca;
  --shadow: 0 22px 55px rgba(42, 35, 24, 0.12);
  --soft-shadow: 0 10px 28px rgba(42, 35, 24, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #f4f7f3 0, var(--paper) 34%, #f6f0e8 100%);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(49, 95, 85, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(167, 116, 52, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 70%);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 84px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(247, 244, 239, 0.86);
  border-bottom: 1px solid rgba(221, 215, 206, 0.74);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  gap: 2px;
  max-width: min(58vw, 420px);
  background: transparent;
  color: inherit;
  text-align: left;
}

.brand strong {
  overflow: hidden;
  font-size: 17px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  gap: 8px;
}

.icon-button,
.ghost-button,
.primary-button,
.danger-button {
  min-height: 42px;
  border-radius: var(--radius);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.icon-button {
  width: 42px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: var(--soft-shadow);
}

.ghost-button {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: var(--soft-shadow);
}

.primary-button {
  background: linear-gradient(180deg, #3b7468, var(--accent));
  color: #fff;
  box-shadow: 0 12px 25px rgba(49, 95, 85, 0.22);
}

.primary-button:hover {
  background: var(--accent-strong);
}

.danger-button {
  background: #7b2d26;
  color: #fff;
}

.icon-button:hover,
.ghost-button:hover,
.quick-card:hover,
.chapter-card:hover,
.album-card:hover {
  transform: translateY(-1px);
  border-color: rgba(49, 95, 85, 0.36);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  min-height: calc(100vh - 66px);
  padding: 22px 18px 26px;
  align-content: center;
  gap: 24px;
}

.portrait-scene {
  position: relative;
  min-height: 365px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px 28px 42px 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background:
    linear-gradient(145deg, rgba(35, 33, 29, 0), rgba(35, 33, 29, 0.26)),
    var(--hero-image, linear-gradient(135deg, #9fb8b0, #e2c7a8));
  background-size: cover;
  background-position: center;
}

.portrait-scene::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 22px 22px 34px 6px;
  pointer-events: none;
}

.portrait-scene::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(transparent, rgba(20, 18, 14, 0.68));
}

.hero-card {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  z-index: 1;
  color: #fff;
}

.hero-card h1 {
  margin: 0;
  max-width: 9ch;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: clamp(38px, 13vw, 62px);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.22);
}

.hero-card p {
  max-width: 28rem;
  margin: 14px 0 0;
  font-size: 17px;
  line-height: 1.7;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.2);
}

.hero-intro {
  display: grid;
  gap: 16px;
}

.large-text {
  margin: 0;
  padding: 0 2px;
  color: #454039;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 21px;
  line-height: 1.85;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-card {
  min-height: 112px;
  padding: 18px;
  border: 1px solid rgba(221, 215, 206, 0.9);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 250, 247, 0.96)),
    var(--surface);
  box-shadow: var(--soft-shadow);
  text-align: left;
  color: var(--ink);
}

.quick-card strong {
  display: block;
  color: var(--accent-strong);
  font-size: 19px;
}

.quick-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.section {
  padding: 34px 18px;
}

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

.section-header h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 31px;
  font-weight: 650;
  line-height: 1.1;
}

.section-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.chapter-list,
.album-list {
  display: grid;
  gap: 12px;
}

.chapter-card,
.album-card,
.photo-card,
.panel {
  border: 1px solid rgba(221, 215, 206, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

.chapter-card {
  position: relative;
  padding: 20px;
  overflow: hidden;
  text-align: left;
}

.chapter-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--gold));
}

.chapter-card h3 {
  margin: 0;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 24px;
  font-weight: 650;
}

.chapter-card p {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.82;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.album-card {
  overflow: hidden;
  text-align: left;
}

.album-cover {
  min-height: 210px;
  background: var(--sky);
  background-size: cover;
  background-position: center;
}

.photo-image {
  display: block;
  width: 100%;
  height: 190px;
  background: var(--surface-soft);
  object-fit: cover;
}

.album-cover {
  position: relative;
}

.album-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 40%, rgba(38, 35, 31, 0.22)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent);
}

.album-card .copy,
.photo-card .copy {
  padding: 17px;
}

.album-card h3,
.photo-card h3 {
  margin: 0;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 23px;
  font-weight: 650;
}

.album-card p,
.photo-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.photo-card {
  overflow: hidden;
  text-align: left;
}

.photo-card .photo-image {
  height: 190px;
}

.reader {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 110px;
}

.reader h1 {
  margin: 18px 0 10px;
  font-family: Georgia, "Songti SC", "STSong", serif;
  max-width: 13em;
  font-size: clamp(32px, 8vw, 52px);
  font-weight: 650;
  line-height: 1.14;
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.no-widow {
  white-space: nowrap;
}

.reader article,
.story-article {
  margin-top: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  color: #38342e;
  font-size: 21px;
  line-height: 2.05;
}

.story-article p {
  margin: 0 0 24px;
  text-indent: 2em;
}

.story-photo-cluster {
  display: grid;
  gap: 12px;
  margin: 34px 0 38px;
}

.story-photo-cluster figcaption {
  display: grid;
  gap: 4px;
  max-width: 40rem;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.story-photo-cluster figcaption strong {
  color: var(--accent-strong);
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 19px;
  font-weight: 700;
}

.story-photo-layout {
  display: grid;
  gap: 10px;
  align-items: start;
}

.story-photo-lead,
.story-photo-side {
  min-width: 0;
}

.story-photo-side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.story-photo-cluster.has-scroll .story-photo-side {
  display: flex;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}

.story-photo-cluster.has-scroll .chapter-photo-thumb {
  flex: 0 0 42%;
  scroll-snap-align: start;
}

.chapter-photo-image,
.chapter-photo-thumb {
  display: block;
  width: 100%;
  border-radius: 6px;
  background-color: var(--surface-soft);
  object-fit: contain;
}

.chapter-photo-image {
  height: auto;
  max-height: min(74vh, 620px);
}

.chapter-photo-thumb {
  height: 150px;
  object-fit: cover;
}

.chapter-photo-essay,
.chapter-photo-item {
  display: grid;
  gap: 18px;
  margin: 0;
}

.chapter-photo-item figcaption {
  display: grid;
  gap: 4px;
  max-width: 36rem;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.chapter-photo-item figcaption strong {
  color: var(--accent);
  font-size: 16px;
}

.chapter-photo-item figcaption em {
  color: var(--gold);
  font-style: normal;
  font-weight: 700;
}

.back-row {
  margin-bottom: 10px;
}

.empty {
  padding: 34px 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.86);
  border-top: 1px solid rgba(221, 215, 206, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 -14px 35px rgba(42, 35, 24, 0.08);
}

.nav-item {
  min-height: 52px;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.nav-item.active {
  background: linear-gradient(180deg, #3c7367, var(--accent));
  color: #fff;
  box-shadow: 0 10px 20px rgba(49, 95, 85, 0.18);
}

.admin-layout {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.panel {
  padding: 18px;
}

.panel h2,
.panel h3 {
  margin: 0 0 14px;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-weight: 650;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 12px;
  font-size: 16px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(49, 95, 85, 0.7);
  box-shadow: 0 0 0 3px rgba(49, 95, 85, 0.12);
  outline: 0;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.7;
}

.image-picker {
  display: grid;
  gap: 12px;
}

.image-preview {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(49, 95, 85, 0.18), rgba(167, 116, 52, 0.18)),
    var(--surface-soft);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.58);
}

.image-controls {
  display: grid;
  gap: 10px;
}

.image-file-button {
  width: 100%;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.admin-row strong {
  font-size: 17px;
}

.admin-row span {
  color: var(--muted);
  font-size: 14px;
}

.photo-admin-list {
  display: grid;
  gap: 10px;
}

.photo-admin-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.photo-admin-thumb {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  background: var(--surface-soft);
  background-size: cover;
  background-position: center;
}

.photo-admin-row .row-actions {
  grid-column: 1 / -1;
}

.row-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

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

.notice {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.status-line {
  padding: 12px;
  border-left: 4px solid var(--gold);
  background: var(--surface-soft);
}

.status-line strong {
  color: var(--accent-strong);
}

.toast {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 92px;
  z-index: 30;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #1e3933;
  color: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.hidden {
  display: none !important;
}

@media (min-width: 760px) {
  .app-shell {
    padding-bottom: 0;
  }

  .topbar {
    padding: 16px 34px;
  }

  .hero {
    grid-template-columns: minmax(360px, 0.86fr) minmax(420px, 1.14fr);
    align-items: center;
    max-width: 1180px;
    min-height: calc(100vh - 76px);
    margin: 0 auto;
    padding: 56px 34px 42px;
    gap: 54px;
  }

  .portrait-scene {
    min-height: 590px;
  }

  .hero-intro {
    order: -1;
  }

  .large-text {
    max-width: 590px;
    font-size: 26px;
  }

  .section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 58px 34px;
  }

  .chapter-list,
  .album-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .story-filters {
    margin-bottom: 28px;
  }

  .media-strip,
  .media-collections {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .bottom-nav {
    left: 50%;
    right: auto;
    bottom: 18px;
    width: min(560px, calc(100vw - 36px));
    transform: translateX(-50%);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

  .admin-layout {
    grid-template-columns: 360px 1fr;
    align-items: start;
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 34px 120px;
  }

  .image-picker {
    grid-template-columns: 190px 1fr;
    align-items: start;
  }

  .image-preview {
    min-height: 190px;
  }
}

/* Contemporary editorial theme */
:root {
  --paper: #f8f8f5;
  --paper-deep: #edf0ed;
  --ink: #17221f;
  --muted: #66706c;
  --line: #dce1de;
  --surface: #ffffff;
  --surface-soft: #f3f5f3;
  --accent: #0f4b3d;
  --accent-strong: #08362d;
  --gold: #d85742;
  --shadow: 0 18px 48px rgba(10, 36, 31, 0.12);
  --soft-shadow: 0 8px 24px rgba(10, 36, 31, 0.08);
}

body {
  background: var(--paper);
}

body::before {
  display: none;
}

.topbar {
  padding: 12px 18px;
  background: rgba(248, 248, 245, 0.9);
  border-color: rgba(220, 225, 222, 0.8);
}

.brand strong {
  color: var(--accent-strong);
  font-size: 16px;
}

.brand span {
  display: none;
}

.top-actions .ghost-button {
  min-height: 40px;
  border-color: rgba(15, 75, 61, 0.16);
  background: transparent;
  box-shadow: none;
  color: var(--accent);
}

.hero {
  display: block;
  min-height: auto;
  padding: 0 0 28px;
}

.portrait-scene {
  min-height: min(72vh, 650px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background:
    linear-gradient(90deg, rgba(6, 29, 25, 0.72) 0%, rgba(6, 29, 25, 0.22) 58%, rgba(6, 29, 25, 0.02) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.portrait-scene::before {
  display: none;
}

.portrait-scene::after {
  height: 58%;
  background: linear-gradient(transparent, rgba(5, 25, 22, 0.52));
}

.hero-card {
  left: 22px;
  right: 22px;
  bottom: 30px;
}

.hero-card::before {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  margin-bottom: 18px;
  background: #ef654f;
}

.hero-card h1 {
  max-width: 7ch;
  color: #fff;
  font-size: clamp(48px, 15vw, 72px);
  font-weight: 700;
  line-height: 1.05;
}

.hero-card p {
  max-width: 18em;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1.72;
}

.hero-intro {
  gap: 22px;
  padding: 26px 20px 0;
}

.large-text {
  max-width: 29em;
  padding: 0;
  color: #364440;
  font-family: inherit;
  font-size: 19px;
  line-height: 1.88;
}

.quick-grid {
  gap: 12px;
}

.quick-card {
  min-height: 146px;
  padding: 18px;
  border: 1px solid rgba(15, 75, 61, 0.13);
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}

.quick-card:first-child {
  background: var(--accent);
  color: #fff;
}

.quick-card .quick-index {
  display: block;
  margin-bottom: 22px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
}

.quick-card strong {
  color: inherit;
  font-size: 24px;
}

.quick-card span:last-child {
  color: inherit;
  opacity: 0.72;
}

.section {
  padding: 42px 20px;
}

.section-header {
  margin-bottom: 22px;
}

.section-header h2 {
  color: var(--accent-strong);
  font-size: 38px;
}

.section-header h2::after {
  content: "";
  display: block;
  width: 38px;
  height: 4px;
  margin-top: 12px;
  background: var(--gold);
}

.section-header p {
  max-width: 25em;
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.65;
}

.section-header .ghost-button {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
}

.chapter-list {
  gap: 0;
  border-top: 1px solid var(--line);
}

.chapter-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 24px;
  gap: 12px;
  align-items: center;
  padding: 22px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.chapter-card::before {
  display: none;
}

.chapter-number {
  align-self: start;
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
}

.chapter-copy {
  min-width: 0;
}

.chapter-card .meta-line {
  margin: 0 0 8px;
  color: var(--muted);
}

.story-filters {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  padding: 0 16px;
  font-size: 14px;
  font-weight: 800;
}

.filter-chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.media-strip,
.media-collections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.media-card {
  display: grid;
  gap: 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 75, 61, 0.13);
  border-radius: 6px;
  background: #fff;
  text-align: left;
}

.media-thumb {
  display: block;
  width: 100%;
  height: 168px;
  min-height: 154px;
  background: var(--surface-soft);
  background-size: cover;
  background-position: center;
  object-fit: cover;
}

.media-video {
  display: block;
  width: 100%;
  object-fit: cover;
  background: #0f1715;
}

.image-preview.media-video {
  min-height: 190px;
  max-height: 320px;
}

.chapter-photo-image.media-video {
  min-height: 0;
  aspect-ratio: 16 / 10;
}

.media-thumb.media-video,
.photo-image.media-video {
  min-height: 154px;
  aspect-ratio: 4 / 3;
}

.media-card div:last-child {
  display: grid;
  gap: 5px;
  padding: 0 12px 12px;
}

.media-card strong {
  color: var(--accent-strong);
  font-size: 16px;
}

.media-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.media-card em {
  color: var(--gold);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.45;
}

.media-reader-actions {
  margin: 18px 0 24px;
}

.editorial-photo-grid .photo-card {
  align-self: start;
}

.editorial-photo-grid .photo-image {
  height: 210px;
}

.legacy-albums {
  margin-top: 12px;
}

.reader-toolbar,
.reader-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reader-toolbar span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.reader-pager {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.reader-pager button {
  max-width: 48%;
}

.ai-panel {
  background:
    linear-gradient(135deg, rgba(15, 75, 61, 0.06), rgba(216, 87, 66, 0.08)),
    #fff;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.chapter-card h3 {
  color: var(--accent);
  font-size: 25px;
}

.chapter-card p {
  margin-top: 8px;
  color: #59645f;
  line-height: 1.7;
  -webkit-line-clamp: 2;
}

.chapter-arrow {
  color: var(--accent);
  font-size: 24px;
}

.album-list {
  gap: 14px;
}

.album-card {
  border: 0;
  border-radius: 6px;
  box-shadow: none;
}

.album-cover {
  min-height: 230px;
}

.album-card .copy {
  padding: 18px;
}

.album-card h3 {
  color: var(--accent);
  font-size: 25px;
}

.bottom-nav {
  gap: 4px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(220, 225, 222, 0.86);
  box-shadow: 0 -8px 28px rgba(10, 36, 31, 0.08);
}

.nav-item {
  color: #69736f;
  font-size: 14px;
}

.nav-item.active {
  background: transparent;
  box-shadow: none;
  color: var(--accent);
}

.reader h1,
.panel h2,
.panel h3 {
  color: var(--accent-strong);
}

.panel {
  background: rgba(255, 255, 255, 0.94);
}

@media (min-width: 760px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(420px, 1.08fr) minmax(360px, 0.92fr);
    gap: 0;
    max-width: none;
    padding: 0;
    background: #fff;
  }

  .portrait-scene {
    min-height: calc(100vh - 72px);
  }

  .hero-intro {
    order: 0;
    align-content: center;
    padding: 56px;
  }

  .large-text {
    font-size: 24px;
  }

  .quick-grid {
    max-width: 520px;
  }

  .section {
    padding: 72px 34px;
  }

  .chapter-list {
    grid-template-columns: 1fr;
  }

  .chapter-card {
    grid-template-columns: 46px minmax(0, 1fr) 28px;
    padding: 26px 0;
  }

  .album-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chapter-photo-essay {
    grid-template-columns: repeat(12, 1fr);
    align-items: end;
    gap: 18px;
  }

  .chapter-photo-item {
    grid-column: span 7;
  }

  .chapter-photo-item:nth-child(3n + 1) {
    grid-column: span 12;
  }

  .chapter-photo-item:nth-child(3n + 2) {
    grid-column: 7 / span 6;
    width: auto;
  }

  .chapter-photo-item:nth-child(3n) {
    grid-column: span 6;
  }

  .chapter-photo-item .chapter-photo-image {
    min-height: 340px;
  }

  .chapter-photo-item:nth-child(3n + 1) .chapter-photo-image {
    min-height: 460px;
  }

  .story-photo-cluster .chapter-photo-image {
    min-height: 0;
  }

  .photo-admin-row {
    grid-template-columns: 82px minmax(0, 1fr) auto;
  }

  .photo-admin-thumb {
    width: 82px;
    height: 82px;
  }

  .photo-admin-row .row-actions {
    grid-column: auto;
  }
}
