.discover-screen,
.story-detail-screen,
.garden-screen,
.share-card-screen {
  padding: 51px 0 0;
  background: #fff8f2;
}

.discover-scroll,
.story-detail-scroll,
.share-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.discover-scroll::-webkit-scrollbar,
.story-detail-scroll::-webkit-scrollbar,
.share-scroll::-webkit-scrollbar {
  display: none;
}

.discover-scroll {
  padding: 12px 12px 102px;
}

.story-masonry {
  columns: 2;
  column-gap: 10px;
}

.story-card {
  width: 100%;
  display: inline-block;
  break-inside: avoid;
  margin: 0 0 10px;
  overflow: hidden;
  border: 1px solid rgba(97, 64, 59, 0.1);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 7px 22px rgba(93, 59, 54, 0.07);
}

.story-open {
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.story-cover-visual {
  height: 178px;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  background: #f4e7df;
}

.story-card.short .story-cover-visual { height: 118px; }
.story-card.medium .story-cover-visual { height: 150px; }
.story-card.tall .story-cover-visual { height: 182px; }

.story-cover-art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.story-cover-visual.cover-blueprint { background: #ead7cc; }
.story-cover-visual.cover-running { background: #dfe2d4; }
.story-cover-visual.cover-style { background: #efe0da; }
.story-cover-visual.cover-phone { background: #eadfd2; }
.story-cover-visual.cover-mending { background: #dbe0d5; }
.story-cover-visual.cover-teaching { background: #f0ddd5; }

.demo-pill {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 7px;
  border: 1px solid rgba(143, 29, 44, 0.2);
  border-radius: 99px;
  color: var(--accent);
  background: rgba(255, 248, 242, 0.92);
  font-size: 8px;
  font-weight: 600;
}

.story-card-copy {
  padding: 11px 10px 8px;
}

.story-card-copy h3 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: 14px;
  line-height: 1.48;
}

.story-card-copy p {
  margin: 6px 0 8px;
  color: #7c6863;
  font-size: 10px;
  line-height: 1.55;
}

.story-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.story-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid rgba(143, 29, 44, 0.2);
  border-radius: 99px;
  color: var(--accent);
  background: rgba(255, 248, 242, 0.72);
  font-size: 9px;
  white-space: nowrap;
}

.story-person {
  width: calc(100% - 20px);
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 10px 8px;
  padding: 6px 0 0;
  border: 0;
  border-top: 1px solid rgba(88, 61, 57, 0.08);
  color: #5f4a46;
  background: transparent;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}

.avatar {
  width: 26px;
  height: 26px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(143, 29, 44, 0.16);
  border-radius: 50%;
  color: var(--accent);
  background: #f3ddd5;
  font-family: "Noto Serif SC", serif;
  font-size: 10px;
  font-weight: 700;
}

.avatar.large {
  width: 46px;
  height: 46px;
  font-size: 17px;
}

.story-person small {
  margin-left: auto;
  color: #a18b84;
  font-size: 8px;
}

.feed-boundary {
  margin: 14px 0 0;
  color: #a38e88;
  font-size: 9px;
  text-align: center;
}

.community-nav {
  position: absolute;
  z-index: 15;
  right: 0;
  bottom: 0;
  left: 0;
  height: 82px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  padding: 8px 17px 12px;
  border-top: 1px solid rgba(92, 62, 57, 0.12);
  background: rgba(255, 250, 246, 0.97);
  box-shadow: 0 -8px 24px rgba(84, 55, 51, 0.05);
}

.community-nav button {
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  border: 0;
  color: #8d7771;
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.community-nav button.active { color: var(--accent); font-weight: 700; }
.community-nav button > svg { width: 19px; height: 19px; }

.community-nav .create-story-button {
  color: var(--accent);
  transform: translateY(-5px);
}

.create-orb {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  border: 4px solid #fffaf6;
  border-radius: 50%;
  color: white;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(143, 29, 44, 0.23);
}

.story-detail-screen > .screen-top,
.garden-screen > .screen-top,
.share-card-screen > .screen-top {
  flex: 0 0 auto;
  padding: 2px 16px 6px;
}

.story-detail-scroll { padding: 4px 18px 28px; }

.story-detail-screen .story-cover-visual {
  height: 224px;
  margin: 0 -18px 12px;
  border-radius: 0 0 26px 26px;
}

.detail-person {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 4px;
  border: 0;
  color: #55413e;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.detail-person > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; }
.detail-person small { color: #9a847e; font-size: 9px; }
.detail-person > svg { margin-left: auto; color: #9a847e; }

.detail-evidence {
  margin-top: 6px;
  padding: 18px;
  border: 1px solid rgba(101, 68, 62, 0.11);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 30px rgba(91, 59, 54, 0.06);
}

.detail-evidence .label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
}

.detail-evidence h2 {
  margin: 0 0 12px;
  font-family: "Noto Serif SC", serif;
  font-size: 23px;
  line-height: 1.5;
}

.story-subtitle {
  margin: -4px 0 13px;
  color: #806863;
  font-family: "Noto Serif SC", serif;
  font-size: 13px;
  line-height: 1.75;
}

.story-body {
  margin: 16px 0;
  color: #6e5752;
  font-size: 12px;
  line-height: 1.85;
}

.story-body-full p {
  margin: 0 0 12px;
}

.story-body-full p:last-child {
  margin-bottom: 0;
}

.story-body-full strong {
  color: #3f2b28;
  font-weight: 700;
}

.detail-evidence blockquote {
  margin: 0;
  padding: 14px 0 14px 15px;
  border-left: 3px solid var(--accent);
  color: #3f2b28;
  font-family: "Noto Serif SC", serif;
  font-size: 14px;
  line-height: 1.75;
}

.detail-audio {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px;
  border: 1px solid rgba(143, 29, 44, 0.12);
  border-radius: 18px;
  color: var(--accent);
  background: #fff8f2;
  cursor: pointer;
}

.detail-play {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--accent);
}

.detail-audio > span:last-child { font-size: 9px; white-space: nowrap; }
.demo-disclosure { margin: 14px 0 0; color: #a18c86; font-size: 8px; line-height: 1.5; }

.garden-screen { padding-bottom: 82px; }

.garden-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 22px 13px;
}

.garden-profile h3 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: 17px;
}

.garden-profile p { margin: 4px 0 0; color: #856f69; font-size: 10px; }

.garden-demo-label {
  margin-left: auto;
  padding: 4px 8px;
  border: 1px solid rgba(143, 29, 44, 0.18);
  border-radius: 99px;
  color: var(--accent);
  font-size: 8px;
  white-space: nowrap;
}

.garden-world {
  min-height: 0;
  flex: 1;
  margin: 0 12px 7px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(109, 91, 65, 0.16);
  border-radius: 28px;
  background-color: #dfd4ba;
  background-image: url("assets/garden-magnolia-tree-background-v2.png");
  background-position: center 48%;
  background-size: cover;
  box-shadow:
    0 18px 36px rgba(74, 56, 38, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.garden-world::before,
.garden-world::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.garden-world::before {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 249, 240, 0.28) 0%, rgba(255, 249, 240, 0.04) 30%, rgba(38, 50, 40, 0.08) 72%, rgba(24, 37, 30, 0.3) 100%),
    radial-gradient(circle at 52% 35%, rgba(255, 238, 197, 0.18), transparent 45%);
}

.garden-world::after {
  right: 0;
  bottom: 0;
  left: 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(24, 38, 31, 0.26));
}

.garden-haze {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 247, 234, 0.08), transparent 24%, transparent 76%, rgba(255, 247, 234, 0.08));
}

.garden-bloom {
  position: absolute;
  z-index: 3;
  width: calc(var(--story-flower-size) + 30px);
  height: calc(var(--story-flower-size) * 1.18 + 35px);
  padding: 0;
  border: 0;
  color: #533e39;
  background: transparent;
  cursor: pointer;
  transform-origin: 50% 82%;
  transition: transform 220ms ease, filter 220ms ease;
}

.garden-story-flower {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  width: var(--story-flower-size) !important;
  height: var(--story-flower-size) !important;
  overflow: visible;
  transform: translateX(-50%);
  transform-origin: 50% 94%;
  pointer-events: none;
}

.garden-story-flower img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  opacity: 1;
  filter: none;
}

.garden-bloom.bloom-2 .garden-story-flower { transform: translateX(-50%) scaleX(-1) rotate(7deg); }
.garden-bloom.bloom-3 .garden-story-flower { transform: translateX(-50%) rotate(-3deg) scale(0.94); }
.garden-bloom.bloom-4 .garden-story-flower { transform: translateX(-50%) scaleX(-1) rotate(-8deg) scale(0.92); }
.garden-bloom.bloom-5 .garden-story-flower { transform: translateX(-50%) rotate(10deg) scale(0.94); }
.garden-bloom.bloom-6 .garden-story-flower { transform: translateX(-50%) scaleX(-1) rotate(12deg) scale(1.02); }

.garden-bloom.bloom-2 .garden-story-flower img { filter: saturate(0.9) brightness(1.02); }
.garden-bloom.bloom-3 .garden-story-flower img { filter: saturate(1.05) sepia(0.03); }
.garden-bloom.bloom-5 .garden-story-flower img { filter: saturate(0.86) brightness(1.03); }

.garden-bloom-label {
  position: absolute;
  z-index: 4;
  bottom: 1px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(117, 77, 61, 0.2);
  border-radius: 99px;
  background: rgba(255, 251, 246, 0.92);
  box-shadow: 0 5px 14px rgba(60, 44, 35, 0.14);
  backdrop-filter: blur(10px);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  transform: translateX(-50%);
}

.garden-bloom-label::before {
  content: "✦";
  color: var(--accent);
  font-size: 8px;
}

.garden-bloom:hover,
.garden-bloom:focus-visible { z-index: 6; transform: translateY(-3px) scale(1.015); }
.garden-bloom:focus-visible { outline: 2px solid rgba(255, 250, 244, 0.95); outline-offset: 2px; border-radius: 18px; }

.garden-ground-copy {
  position: absolute;
  z-index: 7;
  right: 18px;
  bottom: 16px;
  left: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  color: #fffaf5;
  background: rgba(39, 53, 45, 0.78);
  box-shadow: 0 10px 24px rgba(22, 32, 27, 0.18);
  backdrop-filter: blur(12px);
}

.garden-ground-copy strong { font-family: "Noto Serif SC", serif; font-size: 12px; }
.garden-ground-copy span { font-size: 8px; opacity: 0.82; }

.share-scroll { padding: 5px 20px 28px; }

.share-card-preview {
  min-height: 500px;
  padding: 22px 20px 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(104, 70, 65, 0.13);
  border-radius: 24px;
  background: #fffdf9;
  box-shadow: 0 16px 38px rgba(90, 57, 52, 0.11);
}

.share-name {
  margin: 0;
  color: var(--accent);
  font-family: "Noto Serif SC", serif;
  font-size: 18px;
  font-weight: 700;
}

.share-cover {
  height: 188px;
  margin: 12px 0 15px;
  overflow: hidden;
  border-radius: 18px;
  background: #f2e4da;
}

.share-cover .story-cover-art {
  width: 100%;
  height: 100%;
}

.share-card-preview h2 {
  max-width: 285px;
  margin: 0 0 13px;
  font-family: "Noto Serif SC", serif;
  font-size: 23px;
  line-height: 1.52;
}

.share-card-preview > p:not(.share-name) {
  margin: 14px 0 12px;
  color: #735d57;
  font-size: 11px;
  line-height: 1.75;
}

.share-audio {
  min-height: 39px;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 7px;
  color: var(--accent);
}

.share-audio > svg {
  width: 26px;
  height: 26px;
  padding: 7px;
  border-radius: 50%;
  color: white;
  background: var(--accent);
}

.share-audio > span { font-size: 8px; color: #917b74; }

.share-card-preview footer {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(104, 70, 65, 0.13);
  color: #705a54;
  font-family: "Noto Serif SC", serif;
  font-size: 9px;
}

.share-card-preview footer strong { color: var(--accent); font-size: 11px; }
.share-card-preview footer > span:last-child { margin-left: auto; }
.share-logo { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid rgba(143, 29, 44, 0.25); border-radius: 50%; color: var(--accent); }

.share-actions { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 9px; margin-top: 14px; }
.share-actions .primary-button { min-height: 50px; margin: 0; }

.outline-button,
.add-garden-button {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(143, 29, 44, 0.4);
  border-radius: 99px;
  color: var(--accent);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.outline-button svg,
.add-garden-button svg { width: 18px; height: 18px; }
.outline-button:disabled { opacity: 0.45; }

.add-garden-button {
  width: 100%;
  margin-top: 9px;
  border-color: rgba(66, 94, 80, 0.3);
  color: var(--leaf);
}

.share-scroll > .privacy-note { display: block; margin-top: 9px; text-align: center; }

.result-outline-button {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 9px;
  border: 1px solid rgba(66, 94, 80, 0.3);
  border-radius: 99px;
  color: var(--leaf);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.result-outline-button svg { width: 18px; height: 18px; }

.result-outline-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.result-story-zone {
  height: 205px;
  margin: 3px 0 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(104, 70, 65, 0.1);
  border-radius: 24px;
  background: #f2e4da;
}

.result-story-zone .story-cover-art {
  width: 100%;
  height: 100%;
}

.result-story-label {
  position: absolute;
  right: 12px;
  bottom: 11px;
  padding: 5px 10px;
  border: 1px solid rgba(143, 29, 44, 0.18);
  border-radius: 99px;
  color: var(--accent);
  background: rgba(255, 250, 245, 0.92);
  font-size: 9px;
  font-weight: 700;
}

.result-quality-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 10px;
}

.result-quality-list .quality-chip {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  min-height: 28px;
  padding: 5px 8px;
  transform: none;
  box-shadow: none;
  font-size: 9px;
}

@media (max-height: 735px) and (min-width: 781px) {
  .community-nav { height: 70px; padding-bottom: 7px; }
  .discover-scroll { padding-bottom: 88px; }
  .share-card-preview { min-height: 460px; }
  .share-cover { height: 160px; }
}

@media (max-width: 780px) {
  .discover-screen,
  .story-detail-screen,
  .garden-screen,
  .share-card-screen { padding-top: max(48px, env(safe-area-inset-top)); }
  .community-nav { padding-bottom: max(12px, env(safe-area-inset-bottom)); height: calc(82px + env(safe-area-inset-bottom)); }
  .garden-screen { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
}
