:root {
  --bg: #2f1c14;
  --bg-2: #5d3824;
  --panel: rgba(255, 255, 255, 0.7);
  --panel-strong: #f5e5d1;
  --rose: #f6d6d0;
  --rose-deep: #c97a66;
  --peach: #d99a62;
  --gold: #c98a4a;
  --mint: #cfe6bd;
  --lavender: #e4d7ee;
  --sky: #dfeef8;
  --text: #3b2a24;
  --muted: #765d4c;
  --line: rgba(58, 47, 51, 0.1);
  --shadow: 0 22px 55px rgba(105, 87, 92, 0.15);

  --storybook-ink: #70452f;
  --storybook-paper: rgba(255, 247, 233, 0.92);
  --storybook-gold: #c98a4a;
  --storybook-rose: #d98b72;
  --storybook-sage: #a9c18d;
  --storybook-sky: #dfeef9;
  --storybook-brown: #70452f;
  --storybook-brown-soft: #9a633f;
  --storybook-forest: #587a52;

  --ease-organic: cubic-bezier(0.17, 0.78, 0.2, 1.18);
  --ease-bounce: cubic-bezier(0.29, 0.88, 0.25, 1.25);
  --ease-idle: cubic-bezier(0.45, 0.04, 0.52, 0.96);

  --wf-fur: #d9a066;
  --wf-fur-dark: #b97f4a;
  --wf-cream: #fffdf7;
  --wf-leaf: #8fbf7a;
  --wf-forest-dark: #345b3a;
  --wf-shadow: rgba(76, 122, 83, 0.3);
  --mf-gold: #f2c14e;
  --mf-glow: rgba(242, 193, 78, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: clip;
  font-family: "Quicksand", "DM Sans", sans-serif;
  background:
    radial-gradient(circle at 20% 10%, var(--sky-glow), transparent 22%),
    radial-gradient(circle at 76% 12%, var(--sky-shadow), transparent 20%),
    radial-gradient(circle at 80% 80%, rgba(181, 135, 98, 0.2), transparent 22%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
  position: relative;
}

body[data-time="dawn"] {
  --bg: #8e6670;
  --bg-2: #d89b78;
  --sky-glow: rgba(255, 211, 143, 0.48);
  --sky-shadow: rgba(92, 70, 96, 0.38);
}

body[data-time="day"] {
  --bg: #6d9fba;
  --bg-2: #b9d7d3;
  --sky-glow: rgba(255, 244, 184, 0.38);
  --sky-shadow: rgba(65, 112, 145, 0.34);
}

body[data-time="sunset"] {
  --bg: #874c50;
  --bg-2: #d58b5b;
  --sky-glow: rgba(255, 190, 106, 0.5);
  --sky-shadow: rgba(73, 42, 73, 0.42);
}

body[data-time="night"] {
  --bg: #171f3d;
  --bg-2: #3d385d;
  --sky-glow: rgba(111, 143, 207, 0.22);
  --sky-shadow: rgba(10, 17, 44, 0.54);
}

.time-sky {
  position: fixed;
  inset: 0 0 auto;
  height: min(42vh, 430px);
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(180deg, var(--sky-top), transparent 92%);
  transition: background 1.4s ease;
}

body { --sky-top: rgba(255, 225, 171, 0.2); }
body[data-time="day"] { --sky-top: rgba(185, 231, 244, 0.34); }
body[data-time="sunset"] { --sky-top: rgba(255, 167, 91, 0.38); }
body[data-time="night"] { --sky-top: rgba(20, 29, 71, 0.62); }

.time-sky-sun {
  position: absolute;
  top: 54px;
  right: 14%;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--sky-orb);
  box-shadow: 0 0 0 18px var(--sky-orb-ring), 0 0 42px var(--sky-orb-glow);
  transition: background 1.4s ease, box-shadow 1.4s ease;
}

body { 
  --sky-orb: #f7d98e;
  --sky-orb-ring: rgba(247, 217, 142, 0.16);
  --sky-orb-glow: rgba(247, 217, 142, 0.35);
}
body[data-time="sunset"] { --sky-orb: #ffb16d; --sky-orb-ring: rgba(255, 177, 109, 0.18); --sky-orb-glow: rgba(255, 137, 82, 0.38); }
body[data-time="night"] { --sky-orb: #e8e4c5; --sky-orb-ring: rgba(232, 228, 197, 0.12); --sky-orb-glow: rgba(180, 194, 235, 0.22); }

.time-sky-stars {
  position: absolute;
  inset: 20px 12% 0;
  opacity: 0;
  background-image: radial-gradient(circle, rgba(255, 250, 214, 0.9) 0 1px, transparent 1.8px);
  background-size: 72px 58px;
  transition: opacity 1.4s ease;
}

body[data-time="night"] .time-sky-stars { opacity: 0.8; }

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99998;
  box-shadow: inset 0 0 120px rgba(52, 91, 58, 0.16);
  background-image: radial-gradient(circle at 18% 24%, rgba(255, 248, 216, 0.75) 0 1px, transparent 2px),
    radial-gradient(circle at 76% 68%, rgba(255, 248, 216, 0.6) 0 1px, transparent 2px);
  background-size: 180px 160px, 240px 220px;
  opacity: 0.55;
  animation: mf-twinkle 5s ease-in-out infinite alternate;
}

h1, h2, h3, h4 {
  font-family: "Baloo 2", "Playfair Display", serif;
  color: var(--wf-forest-dark);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.65);
}

button,
input,
textarea,
select {
  font-family: "Quicksand", "DM Sans", sans-serif;
}

#mf-particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 99990;
}

#mf-top-clouds,
#mf-bottom-scene {
  position: fixed;
  left: 0;
  width: 100vw;
  pointer-events: none;
  overflow: hidden;
}

#mf-top-clouds {
  top: 0;
  height: 130px;
  z-index: 2;
}

#mf-bottom-scene {
  bottom: 0;
  height: 220px;
  z-index: 0;
}

.mf-cloud {
  position: absolute;
  height: 28px;
  border-radius: 50px;
  background: rgba(255, 252, 244, 0.82);
  filter: drop-shadow(0 4px 6px rgba(92, 55, 36, 0.16));
  animation: mf-drift linear infinite;
}

.mf-cloud-lobe {
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.mf-cloud-puff {
  position: fixed;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100000;
  background: radial-gradient(circle, #fff 0%, #f5e7d5 60%, transparent 80%);
  box-shadow: 0 0 10px 4px rgba(255, 248, 232, 0.55);
  animation: mf-puff 0.9s ease-out forwards;
}

@keyframes mf-drift {
  from { transform: translateX(-20vw); }
  to { transform: translateX(120vw); }
}

@keyframes mf-puff {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.9; }
  100% { transform: translate(calc(-50% + var(--mf-dx)), calc(-50% + var(--mf-dy) - 20px)) scale(1.4); opacity: 0; }
}

.mf-particle {
  position: absolute;
  bottom: -12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8d8 0%, var(--mf-gold) 60%, transparent 80%);
  box-shadow: 0 0 6px 2px var(--mf-glow);
  opacity: 0;
  animation: mf-float linear infinite;
}

.mf-burst {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100000;
  background: var(--mf-gold);
  box-shadow: 0 0 8px 3px var(--mf-glow);
  animation: mf-burst 0.6s ease-out forwards;
}

@keyframes mf-float {
  0% { transform: translateY(0) translateX(0) scale(0.6); opacity: 0; }
  10% { opacity: 0.9; }
  50% { transform: translateY(-50vh) translateX(20px) scale(1); }
  90% { opacity: 0.7; }
  100% { transform: translateY(-100vh) translateX(-10px) scale(0.4); opacity: 0; }
}

@keyframes mf-burst {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--mf-dx)), calc(-50% + var(--mf-dy))) scale(0); opacity: 0; }
}

@keyframes mf-twinkle {
  from { opacity: 0.3; }
  to { opacity: 0.7; }
}

button,
input[type="button"],
input[type="submit"],
.btn,
a.button {
  background: linear-gradient(180deg, var(--wf-fur), var(--wf-fur-dark));
  color: #fff8ec;
  border-color: var(--wf-forest-dark);
  box-shadow: 0 4px 0 var(--wf-forest-dark), 0 6px 14px var(--wf-shadow), 0 0 0 3px transparent;
  transition: transform 0.18s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
.btn:hover,
a.button:hover {
  box-shadow: 0 7px 0 var(--wf-forest-dark), 0 10px 18px var(--wf-shadow), 0 0 12px 3px var(--mf-glow);
}

@media (prefers-reduced-motion: reduce) {
  body::after,
  .mf-particle,
  .mf-burst,
  .mf-cloud,
  .mf-cloud-puff,
  .scroll-roll,
  .scroll-roll-top,
  .scroll-roll-bottom { animation: none; }
}

@media (max-width: 600px) {
  #mf-top-clouds { height: 90px; }
  #mf-bottom-scene { height: 140px; }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(244, 206, 138, 0.2) 0 8px, transparent 9px),
    radial-gradient(circle at 84% 28%, rgba(201, 228, 209, 0.3) 0 10px, transparent 11px),
    radial-gradient(circle at 70% 75%, rgba(240, 180, 198, 0.18) 0 12px, transparent 13px),
    linear-gradient(120deg, transparent 0%, rgba(133, 92, 63, 0.06) 50%, transparent 100%);
  opacity: 0.9;
}

img {
  max-width: 100%;
  display: block;
}

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

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 22px auto 60px;
  position: relative;
  z-index: 1;
}

main {
  display: grid;
  gap: 18px;
}

section {
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  border: 3px solid var(--storybook-ink);
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(10px);
  border-radius: 26% 74% 31% 69% / 29% 24% 76% 71%;
  box-shadow: 0 14px 30px rgba(64, 45, 39, 0.05);
  position: sticky;
  top: 18px;
  z-index: 30;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--storybook-brown-soft), var(--peach));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
  font-size: 1.25rem;
  color: var(--storybook-ink);
}

.brand-name {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-tag {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.main-nav a:hover,
.footer-links a:hover {
  color: var(--text);
}

.hidden {
  display: none !important;
}

.owner-login,
.owner-panel {
  border: 2px solid var(--storybook-ink);
  border-radius: 14px 18px 12px 16px;
}

.owner-login {
  padding: 0.55rem 0.8rem;
  background: rgba(255, 255, 255, 0.68);
  color: var(--storybook-ink);
  font: 700 0.72rem "Quicksand", sans-serif;
  cursor: pointer;
}

.owner-login:hover,
.owner-login:focus-visible {
  background: var(--storybook-paper);
}

.owner-panel {
  position: relative;
  z-index: 20;
  width: min(920px, 100%);
  margin: 18px auto 0;
  padding: 16px 20px;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 8px 0 rgba(112, 69, 47, 0.12);
}

.owner-login-form,
.owner-editor {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.owner-login-form label,
.owner-editor strong {
  color: var(--storybook-brown);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.owner-login-form input {
  min-width: 220px;
  padding: 0.7rem 0.8rem;
  border: 2px solid rgba(112, 69, 47, 0.28);
  border-radius: 10px;
  background: #fffdf7;
  color: var(--text);
}

.owner-editor {
  justify-content: space-between;
}

.owner-editor p,
.owner-message {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.owner-editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.owner-panel .primary-btn,
.owner-panel .secondary-btn {
  padding: 0.65rem 0.9rem;
  font-size: 0.7rem;
}

.reader-status {
  margin: 0;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(64, 45, 39, 0.18);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-cta,
.primary-btn,
.secondary-btn,
.newsletter-form button,
.filter-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  border: 3px solid var(--storybook-ink);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.2s ease;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(64, 45, 39, 0.9);
  transform-origin: center bottom;
  animation: idle-breathe 5.5s var(--ease-idle) infinite;
}

.nav-cta,
.primary-btn,
.newsletter-form button {
  background: linear-gradient(135deg, var(--storybook-brown), var(--storybook-gold));
  color: #fffaf1;
}

.secondary-btn,
.filter-btn {
  background: rgba(255, 255, 255, 0.8);
  color: var(--storybook-ink);
}

.nav-cta:hover,
.primary-btn:hover,
.secondary-btn:hover,
.newsletter-form button:hover,
.filter-btn:hover {
  transform: translateY(-2px) rotate(-0.5deg);
  filter: saturate(1.05);
}

.nav-cta:active,
.primary-btn:active,
.secondary-btn:active,
.newsletter-form button:active,
.filter-btn:active,
.nav-cta.pop,
.primary-btn.pop,
.secondary-btn.pop,
.newsletter-form button.pop,
.filter-btn.pop {
  animation: squash-stretch 0.72s var(--ease-organic) 1, settle-bounce 0.9s var(--ease-bounce) 1;
}

.hero {
  position: relative;
  min-height: 570px;
  padding: 56px 12px 28px;
}

.hero-copy {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
}

.writing-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  width: min(920px, 100%);
}

.page-text-box {
  position: relative;
  width: min(560px, 100%);
  min-height: 680px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 76px 52px 78px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

@keyframes wf-morph {
  0% { border-radius: 42% 58% 61% 39% / 45% 40% 60% 55%; }
  25% { border-radius: 58% 42% 38% 62% / 55% 62% 38% 45%; }
  50% { border-radius: 48% 52% 55% 45% / 40% 55% 45% 60%; }
  75% { border-radius: 62% 38% 45% 55% / 58% 42% 58% 42%; }
  100% { border-radius: 42% 58% 61% 39% / 45% 40% 60% 55%; }
}

@keyframes wf-glow-pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(143, 191, 122, 0.25), 0 14px 30px rgba(76, 122, 83, 0.25), inset 0 0 24px rgba(217, 160, 102, 0.12); }
  50% { box-shadow: 0 0 0 6px rgba(242, 193, 78, 0.3), 0 14px 34px rgba(76, 122, 83, 0.3), inset 0 0 28px rgba(242, 193, 78, 0.18); }
}

@keyframes wf-glow-focus {
  0%, 100% { box-shadow: 0 0 0 6px rgba(242, 193, 78, 0.35), 0 14px 34px rgba(76, 122, 83, 0.3), 0 0 22px rgba(242, 193, 78, 0.4), inset 0 0 28px rgba(242, 193, 78, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(242, 193, 78, 0.5), 0 16px 38px rgba(76, 122, 83, 0.35), 0 0 32px rgba(242, 193, 78, 0.6), inset 0 0 32px rgba(242, 193, 78, 0.28); }
}

.side-writing-boxes {
  display: grid;
  gap: 16px;
  width: 190px;
  padding-top: 78px;
}

.mini-text-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 166px;
  padding: 16px 14px 14px;
  border: 3px solid var(--storybook-ink);
  border-radius: 24px 15px 28px 18px / 18px 26px 16px 24px;
  box-shadow: 0 6px 0 rgba(112, 69, 47, 0.15);
  transform: rotate(2deg);
}

.mini-text-box:nth-child(2) { transform: rotate(-2deg); }
.mini-text-box:nth-child(3) { transform: rotate(1deg); }

.mini-text-box span {
  color: var(--storybook-brown);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.mini-text-box textarea {
  flex: 1;
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 0.86rem/1.45 "DM Sans", sans-serif;
}

.mini-text-box textarea:focus {
  outline: none;
}

.mini-text-box:focus-within {
  outline: 3px solid rgba(201, 138, 74, 0.28);
  outline-offset: 2px;
}

.mini-text-box-rose { background: #f8dfe0; }
.mini-text-box-mint { background: #dcefe2; }
.mini-text-box-gold { background: #f8e9bd; }

.scroll-flare {
  position: absolute;
  z-index: 0;
  width: 70px;
  height: 115px;
  background: linear-gradient(90deg, #8f1f18, #df3025 55%, #7e1714);
  border: 6px solid #2d2925;
  filter: drop-shadow(4px 5px 0 rgba(45, 41, 37, 0.25));
}

.scroll-flare-top {
  top: -34px;
  right: -22px;
  border-radius: 0 55% 55% 0;
  transform: rotate(-19deg) skewY(-12deg);
}

.scroll-flare-bottom {
  bottom: -34px;
  left: -22px;
  border-radius: 55% 0 0 55%;
  transform: rotate(-19deg) skewY(12deg);
}

.scroll-roll {
  position: absolute;
  left: -10px;
  right: -10px;
  height: 52px;
  z-index: 2;
  border: 6px solid #2d2925;
  border-radius: 48% 48% 42% 42%;
  background: linear-gradient(180deg, #ffe5a2 0%, #e4ad51 42%, #8b5520 100%);
  box-shadow: 0 8px 0 rgba(45, 41, 37, 0.35), inset 0 5px 5px rgba(255, 247, 207, 0.72), inset 0 -5px 8px rgba(101, 53, 17, 0.4);
  background-size: 180% 100%;
  animation: scroll-edge-shimmer 5s ease-in-out infinite;
  transform-style: preserve-3d;
}

.scroll-roll::before,
.scroll-roll::after {
  content: "";
  position: absolute;
  top: -9px;
  width: 54px;
  height: 54px;
  border: 6px solid #2d2925;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe5a2 0 16%, #d18d30 47%, #6b3c16 100%);
  box-shadow: inset 3px 2px 3px rgba(255, 250, 235, 0.45);
  animation: scroll-cap-wobble 4.5s ease-in-out infinite;
}

.scroll-roll::before { left: -30px; }
.scroll-roll::after { right: -30px; }

.scroll-roll-top {
  top: -28px;
  animation: scroll-top-curl 4.5s ease-in-out infinite;
  transform-origin: center bottom;
}

.scroll-roll-bottom {
  bottom: -28px;
  transform: scaleY(-1);
  animation: scroll-bottom-curl 4.5s ease-in-out infinite;
  transform-origin: center top;
}

@keyframes scroll-edge-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes scroll-cap-wobble {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(4deg); }
}

@keyframes scroll-top-curl {
  0%, 100% { transform: perspective(520px) rotateX(10deg) rotateZ(-0.4deg) scaleY(1); }
  50% { transform: perspective(520px) rotateX(21deg) rotateZ(0.6deg) scaleY(1.08); }
}

@keyframes scroll-bottom-curl {
  0%, 100% { transform: perspective(520px) rotateX(-10deg) rotateZ(-0.4deg) scaleY(-1); }
  50% { transform: perspective(520px) rotateX(-21deg) rotateZ(0.6deg) scaleY(-1.08); }
}

.page-text-box::before {
  display: none;
}

.page-text-box::after {
  display: none;
}

.page-text-box .scroll-flare,
.page-text-box .scroll-roll {
  display: none;
}

.frame-character {
  position: absolute;
  top: -30px;
  z-index: 3;
  width: 64px;
  height: 64px;
  border: 4px solid var(--storybook-ink);
  border-radius: 48% 48% 44% 44%;
  background: var(--wf-fur);
  box-shadow: 0 6px 0 rgba(112, 69, 47, 0.2);
}

.frame-character::before,
.frame-character::after {
  content: "";
  position: absolute;
  top: -17px;
  width: 25px;
  height: 25px;
  border: 4px solid var(--storybook-ink);
  border-radius: 50% 50% 35% 35%;
  background: var(--wf-fur-dark);
  z-index: -1;
}

.frame-character::before { left: 2px; }
.frame-character::after { right: 2px; }

.frame-character-left { left: 24px; transform: rotate(-7deg); }
.frame-character-right {
  right: 24px;
  background: var(--storybook-sage);
  transform: rotate(7deg);
}

.frame-character-right::before,
.frame-character-right::after { background: var(--storybook-forest); }

.frame-character-face,
.frame-character-face::before,
.frame-character-face::after {
  position: absolute;
}

.frame-character-face {
  inset: 0;
}

.frame-character-face::before {
  content: "";
  top: 22px;
  left: 17px;
  width: 7px;
  height: 9px;
  border-radius: 50%;
  background: var(--storybook-ink);
  box-shadow: 19px 0 0 var(--storybook-ink);
}

.frame-character-face::after {
  content: "";
  left: 25px;
  bottom: 14px;
  width: 10px;
  height: 7px;
  border-radius: 50%;
  background: #f3c3a4;
  border: 2px solid var(--storybook-ink);
}

.page-text-kicker {
  position: relative;
  z-index: 1;
  color: var(--storybook-brown);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-text-box textarea {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  min-height: 500px;
  resize: vertical;
  border: 3px solid var(--storybook-forest);
  border-radius: 42% 58% 61% 39% / 45% 40% 60% 55%;
  padding: 72px 68px 62px;
  background: radial-gradient(circle at 85% 12%, rgba(242, 193, 78, 0.12), transparent 55%), var(--storybook-paper);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  text-shadow: none;
  box-shadow: 0 0 0 6px rgba(143, 191, 122, 0.25), 0 14px 30px rgba(76, 122, 83, 0.25), inset 0 0 24px rgba(217, 160, 102, 0.12);
  animation: wf-morph 9s ease-in-out infinite, wf-glow-pulse 4s ease-in-out infinite;
}

.page-text-box:focus-within textarea {
  animation: wf-morph 9s ease-in-out infinite, wf-glow-focus 1.8s ease-in-out infinite;
}

.page-text-box textarea:focus {
  outline: none;
  border-color: var(--storybook-gold);
}

[data-owner-only] {
  cursor: default;
}

[data-owner-only][readonly] {
  caret-color: transparent;
}

[data-owner-only]:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.eyebrow {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  background: rgba(255,255,255,0.7);
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--rose-deep);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.hero-copy h1,
.section-head h2,
.about-copy h2,
.newsletter-box h2 {
  margin: 18px 0 14px;
  font-family: "Playfair Display", serif;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy h1 {
  font-size: clamp(3.1rem, 6vw, 5.3rem);
  max-width: 640px;
  color: #3c312d;
  text-shadow: 0 2px 0 rgba(255,255,255,0.9);
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  flex-wrap: wrap;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 90px;
}

.hero-stats strong {
  font-size: 1.5rem;
  font-family: "Playfair Display", serif;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-visual {
  position: relative;
  position: absolute;
  top: 42px;
  left: 12px;
  width: 150px;
  min-height: 135px;
  display: grid;
  place-items: start;
  z-index: 2;
}

.storybook-scene {
  position: relative;
  width: min(150px, 100%);
  height: 130px;
  border: 4px solid var(--storybook-ink);
  border-radius: 33% 67% 38% 62% / 43% 34% 66% 57%;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.74), rgba(255,255,255,0.88));
  box-shadow: 0 18px 38px rgba(48, 39, 34, 0.12);
  animation: idle-breathe 6.2s var(--ease-idle) infinite alternate;
}

.image-slot {
  position: absolute;
  inset: 12px;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 8px;
  border: 2px dashed rgba(64, 45, 39, 0.32);
  border-radius: inherit;
  color: var(--storybook-brown);
  text-align: center;
  cursor: pointer;
}

.image-slot-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.image-slot input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.image-slot {
  pointer-events: none;
  cursor: default;
}

body.owner-mode .image-slot {
  pointer-events: auto;
  cursor: pointer;
}

body:not(.owner-mode) .image-slot-icon {
  display: none;
}

.uploaded-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 180ms ease;
}

.uploaded-image.visible {
  opacity: 1;
}

.storybook-scene > .forest-cartoon,
.storybook-scene > .moon-glow,
.storybook-scene > .cloud {
  display: none;
}

.storybook-scene::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(64, 45, 39, 0.14);
  border-radius: inherit;
  pointer-events: none;
}

.moon-glow {
  position: absolute;
  right: 54px;
  top: 36px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(247, 231, 183, 0.95);
  box-shadow: 0 0 0 18px rgba(247, 231, 183, 0.18), 0 0 28px rgba(247, 231, 183, 0.4);
}

.cloud {
  position: absolute;
  background: rgba(255,255,255,0.7);
  border: 3px solid var(--storybook-ink);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
}

.cloud-one {
  width: 116px;
  height: 38px;
  left: 56px;
  top: 72px;
}

.cloud-two {
  width: 96px;
  height: 32px;
  right: 120px;
  top: 140px;
}

.forest-cartoon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.deer-sticker {
  position: absolute;
  right: 10px;
  top: 36px;
  z-index: 3;
  transform: rotate(8deg);
  animation: idle-breathe 5.8s var(--ease-idle) infinite alternate;
}

.deer-head {
  position: relative;
  width: 120px;
  height: 110px;
  background: linear-gradient(135deg, #a06d48, #d9a173);
  border: 4px solid var(--storybook-ink);
  border-radius: 48% 52% 46% 54% / 49% 47% 53% 51%;
  box-shadow: 0 8px 0 rgba(64, 45, 39, 0.12);
}

.antler {
  position: absolute;
  top: -34px;
  width: 18px;
  height: 48px;
  background: #d9c5a4;
  border: 4px solid var(--storybook-ink);
  border-radius: 14px 14px 0 0;
  transform-origin: bottom center;
}

.antler-left {
  left: 18px;
  transform: rotate(-25deg);
}

.antler-right {
  right: 18px;
  transform: rotate(25deg);
}

.antler::before,
.antler::after {
  content: "";
  position: absolute;
  bottom: -14px;
  width: 14px;
  height: 16px;
  background: #d9c5a4;
  border: 4px solid var(--storybook-ink);
  border-radius: 10px 10px 0 0;
}

.antler-left::before { left: -8px; transform: rotate(-20deg); }
.antler-left::after { left: 12px; transform: rotate(10deg); }
.antler-right::before { left: -8px; transform: rotate(20deg); }
.antler-right::after { left: 12px; transform: rotate(-10deg); }

.ear {
  position: absolute;
  top: -14px;
  width: 20px;
  height: 28px;
  background: #d7a47d;
  border: 4px solid var(--storybook-ink);
  border-radius: 50% 50% 50% 50%;
}

.ear-left { left: 18px; }
.ear-right { right: 18px; }

.eye {
  position: absolute;
  top: 42px;
  width: 10px;
  height: 10px;
  background: var(--storybook-ink);
  border-radius: 50%;
}

.eye.left { left: 28px; }
.eye.right { right: 28px; }

.nose {
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: 24px;
  height: 18px;
  transform: translateX(-50%);
  background: #6d3b2a;
  border: 4px solid var(--storybook-ink);
  border-radius: 50% 50% 55% 55%;
}

.floating-badge {
  position: absolute;
  padding: 0.68rem 0.95rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.8);
  border: 3px solid var(--storybook-ink);
  box-shadow: 0 8px 0 rgba(64, 45, 39, 0.12);
  color: var(--text);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  transform: rotate(-4deg);
}

.badge-two {
  transform: rotate(4deg);
}

.badge-one {
  top: 26px;
  right: 34px;
}

.badge-two {
  bottom: 26px;
  left: 26px;
}

.journal-top {
  display: flex;
  gap: 8px;
  padding-bottom: 24px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}

.dot.pink { background: var(--rose-deep); }
.dot.gold { background: var(--gold); }
.dot.mint { background: var(--mint); }

.journal-content {
  background: linear-gradient(180deg, rgba(247, 201, 216, 0.18), rgba(231, 221, 255, 0.25));
  border-radius: 24px;
  padding: 34px 28px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.journal-content p {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.72rem;
}

.journal-content h2 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 3vw, 2.9rem);
  line-height: 1.2;
}

.mini-line {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(46, 42, 50, 0.09);
  margin-top: 14px;
}

.mini-line.short {
  width: 54%;
}

.floating-badge {
  position: absolute;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--line);
  box-shadow: 0 14px 26px rgba(46,42,50,0.08);
  color: var(--text);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.floating-badge:empty {
  width: 74px;
  height: 42px;
  padding: 0;
}

.badge-one {
  top: 25px;
  right: 20px;
}

.badge-two {
  bottom: 30px;
  left: 10px;
}

.featured-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 20px 0 10px;
}

.strip-card::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(227, 170, 109, 0.7);
  border: 3px solid var(--storybook-ink);
  box-shadow: -18px -10px 0 0 rgba(218, 142, 116, 0.45);
}

.strip-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.76), rgba(255,249,243,0.94));
  border: 3px solid var(--storybook-ink);
  border-radius: 26% 74% 26% 74% / 24% 26% 74% 76%;
  padding: 22px 24px;
  box-shadow: 0 8px 0 rgba(64, 45, 39, 0.12);
  animation: idle-breathe 6.5s var(--ease-idle) infinite alternate;
}

.strip-card::before,
.article-card::before,
.note-card::before,
.about-card::before,
.newsletter-box::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(64, 45, 39, 0.16);
  border-radius: inherit;
  pointer-events: none;
}

.small-label {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose-deep);
  font-weight: 700;
}

.strip-card h3 {
  margin: 12px 0 8px;
  font-size: 1.7rem;
  font-family: "Playfair Display", serif;
}

.strip-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.article-section,
.note-section,
.about-section,
.newsletter-section {
  padding-top: 60px;
}

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

.section-head h2,
.about-copy h2,
.newsletter-box h2 {
  font-size: clamp(2.1rem, 4vw, 3rem);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  border: 3px solid var(--storybook-ink);
  background: rgba(255,255,255,0.76);
  color: var(--storybook-ink);
  padding: 0.72rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: 180ms ease;
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--storybook-rose), var(--storybook-gold));
  border-color: var(--storybook-ink);
  color: var(--storybook-ink);
}

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

.article-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,246,233,0.94));
  border: 3px solid var(--storybook-ink);
  border-radius: 28% 72% 25% 75% / 18% 20% 80% 82%;
  padding: 18px;
  box-shadow: 0 12px 24px rgba(46, 42, 50, 0.03);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
  animation: idle-breathe 6s var(--ease-idle) infinite alternate;
  overflow: hidden;
}

.article-card::after {
  content: "";
  position: absolute;
  width: 82px;
  height: 82px;
  right: -10px;
  top: -14px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(255,255,255,0) 60%);
  border-radius: 50%;
  opacity: 0.5;
}

.article-card .article-thumb {
  border: 3px solid var(--storybook-ink);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.45);
}

.article-card:hover {
  transform: translateY(-4px) rotate(-0.8deg);
  box-shadow: 0 18px 32px rgba(46, 42, 50, 0.08);
}

.article-thumb {
  height: 200px;
  border-radius: 18px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.article-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0));
}

.thumb-rose { background: linear-gradient(135deg, #f8d3df, #f4e5bd); }
.thumb-mint { background: linear-gradient(135deg, #d9f0e4, #eae0ff); }
.thumb-gold { background: linear-gradient(135deg, #f9e3bf, #f7cfd7); }
.thumb-lavender { background: linear-gradient(135deg, #e4dcff, #d8f5ee); }

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.article-card h3 {
  margin: 16px 0 10px;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.2;
  font-family: "Playfair Display", serif;
}

.article-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.note-card {
  position: relative;
  padding: 24px 22px;
  border-radius: 24% 76% 23% 77% / 29% 31% 69% 71%;
  border: 3px solid var(--storybook-ink);
  background: rgba(255,255,255,0.76);
  box-shadow: 0 8px 0 rgba(64, 45, 39, 0.12);
  animation: idle-breathe 7s var(--ease-idle) infinite alternate;
  overflow: hidden;
}

.note-card::after {
  content: "✦";
  position: absolute;
  right: 18px;
  bottom: 12px;
  font-size: 1.25rem;
  opacity: 0.6;
  color: var(--storybook-brown);
}

.note-card span {
  display: inline-block;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-card h3 {
  margin: 16px 0 12px;
  font-size: 1.6rem;
  font-family: "Playfair Display", serif;
}

.note-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.accent-one { background: linear-gradient(135deg, rgba(247,201,216,0.35), rgba(255,255,255,0.78)); }
.accent-two { background: linear-gradient(135deg, rgba(215,240,227,0.45), rgba(255,255,255,0.78)); }
.accent-three { background: linear-gradient(135deg, rgba(231,221,255,0.45), rgba(255,255,255,0.78)); }

.about-card {
  position: relative;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
  align-items: center;
  padding: 18px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(255,245,238,0.9));
  border: 3px solid var(--storybook-ink);
  box-shadow: 0 12px 0 rgba(64, 45, 39, 0.08);
  animation: idle-breathe 6.2s var(--ease-idle) infinite alternate;
}

.about-photo {
  min-height: 420px;
  display: grid;
  place-items: center;
}

.portrait-blob {
  position: relative;
  width: min(320px, 100%);
  height: 360px;
  border-radius: 38% 62% 57% 43% / 43% 39% 61% 57%;
  background: linear-gradient(135deg, #f7dfe8, #f3d7a9 38%, #d6ebd7 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 26px 30px rgba(95, 78, 88, 0.12);
  border: 4px solid var(--storybook-ink);
}

.portrait-blob::before,
.portrait-blob::after {
  content: "";
  position: absolute;
  background: #f5d7b3;
  border: 4px solid var(--storybook-ink);
}

.portrait-blob::before {
  width: 52px;
  height: 80px;
  top: -38px;
  left: 70px;
  border-radius: 60% 40% 50% 50%;
  transform: rotate(-18deg);
}

.portrait-blob::after {
  width: 52px;
  height: 80px;
  top: -38px;
  right: 70px;
  border-radius: 40% 60% 50% 50%;
  transform: rotate(18deg);
}

.about-copy p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.02rem;
  margin-bottom: 1.2rem;
}

.newsletter-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px;
  background: linear-gradient(135deg, rgba(255,255,255,0.76), rgba(247,201,216,0.14));
  border: 3px solid var(--storybook-ink);
  border-radius: 26% 74% 31% 69% / 26% 30% 70% 74%;
  box-shadow: 0 12px 0 rgba(64, 45, 39, 0.08);
  animation: idle-breathe 6.8s var(--ease-idle) infinite alternate;
}

.newsletter-form {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(480px, 100%);
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 0.95rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.8);
  color: var(--text);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 60px;
  padding: 28px 0 8px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 100;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 22, 30, 0.42);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 32px));
  max-height: 80vh;
  overflow: auto;
  padding: 28px 28px 24px;
  border-radius: 28px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(46,42,50,0.08);
  box-shadow: var(--shadow);
}

.close-btn {
  position: absolute;
  right: 18px;
  top: 14px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(46,42,50,0.06);
  font-size: 1.6rem;
  cursor: pointer;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.modal-category {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: var(--lavender);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.modal-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#modalTitle {
  margin: 0 0 18px;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.1rem, 3vw, 3rem);
  line-height: 1.1;
}

.modal-body {
  color: var(--muted);
  line-height: 1.9;
}

.modal-body p {
  margin: 0 0 1rem;
}

#articles:has(#articleGrid:empty),
#notes.is-empty,
#about.is-empty {
  display: none;
}

#wf-mascot-container {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 180px;
  height: 180px;
  z-index: 40;
  cursor: pointer;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.2));
  outline: none;
}

#wf-mascot-container:focus-visible {
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--wf-cream), 0 0 0 7px var(--wf-forest-dark);
}

#wf-mascot-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

#wf-mascot-bubble {
  position: fixed;
  right: 20px;
  bottom: 190px;
  z-index: 40;
  max-width: 160px;
  padding: 8px 12px;
  border: 2px solid var(--wf-leaf);
  border-radius: 16px;
  background: var(--wf-cream);
  color: var(--storybook-ink);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#wf-mascot-bubble.show {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  #wf-mascot-bubble {
    transition: none;
  }
}

@keyframes idle-breathe {
  0%, 100% {
    transform: scale(1) rotate(0deg) translateY(0px);
  }
  50% {
    transform: scale(1.016) rotate(-0.9deg) translateY(-4px);
  }
}

@keyframes squash-stretch {
  0% { transform: scaleX(1) scaleY(1) rotate(0deg); }
  18% { transform: scaleX(0.9) scaleY(1.14) rotate(-1.5deg); }
  42% { transform: scaleX(1.09) scaleY(0.88) rotate(1.3deg); }
  68% { transform: scaleX(0.97) scaleY(1.05) rotate(-0.7deg); }
  100% { transform: scaleX(1) scaleY(1) rotate(0deg); }
}

@keyframes settle-bounce {
  0% { transform: translateY(0) scale(1); }
  18% { transform: translateY(-4px) scale(1.035); }
  45% { transform: translateY(2px) scale(0.99); }
  75% { transform: translateY(-1px) scale(1.01); }
  100% { transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; justify-content: center; }
  .hero,
  .about-card,
  .newsletter-box,
  .article-grid,
  .note-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-top: 44px;
  }

  .hero-visual {
    position: relative;
    top: auto;
    left: auto;
    width: 150px;
    min-height: 130px;
    margin-bottom: 24px;
    order: -1;
  }

  .hero-copy {
    width: 100%;
  }

  .writing-layout {
    flex-direction: column;
    align-items: center;
  }

  .page-text-box {
    min-height: 540px;
    padding: 68px 30px 72px;
  }

  .side-writing-boxes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(560px, 100%);
    padding-top: 0;
  }

  .mini-text-box {
    min-height: 150px;
  }

  .page-text-box textarea {
    min-height: 390px;
  }

  .featured-strip {
    grid-template-columns: 1fr;
  }

  .newsletter-box {
    display: grid;
  }

  .newsletter-form {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 18px, 1180px);
  }

  .topbar {
    padding: 16px 18px;
    border-radius: 20px;
  }

  .owner-login {
    margin-left: auto;
  }

  .owner-panel {
    padding: 14px;
  }

  .owner-login-form,
  .owner-editor,
  .owner-editor-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .owner-login-form input,
  .owner-panel button {
    width: 100%;
  }

  #wf-mascot-container {
    right: 8px;
    bottom: 8px;
    width: 120px;
    height: 120px;
  }

  #wf-mascot-bubble {
    right: 12px;
    bottom: 128px;
  }

  .main-nav {
    gap: 12px;
    font-size: 0.82rem;
    justify-content: space-between;
  }

  .nav-cta {
    width: 100%;
  }

  .hero-copy h1 {
    font-size: 2.7rem;
  }

  .side-writing-boxes {
    grid-template-columns: 1fr;
    width: min(360px, 100%);
  }

  .article-grid,
  .note-grid {
    display: grid;
  }

  .newsletter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
