/* ============================================================
   INK & CRAYONS — Pastel Watercolor Theme
   Full design-system rebuild
   ============================================================ */

/* --- Local Font --- */
@font-face {
  font-family: 'Patrick Hand';
  src: url('assets/fonts/PatrickHand-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Design Tokens --- */
:root {
  color-scheme: light;
  --pink:         #f7a8c4;
  --pink-light:   #fce4ec;
  --pink-dark:    #d4608a;
  --purple:       #c9a8f7;
  --purple-light: #ede4fc;
  --purple-dark:  #7a5abf;
  --yellow:       #fce68a;
  --yellow-light: #fef9e4;
  --yellow-dark:  #b8a030;
  --blue:         #a8d4f7;
  --blue-light:   #e4f0fc;
  --blue-dark:    #5a9abf;
  --cream:        #fdf6ee;
  --bg:           #fdfafc;
  --text:         #3a2f45;
  --text-muted:   #7a6f85;
  --white:        #ffffff;
  --shadow-xs:    0 2px 8px rgba(60,40,80,0.06);
  --shadow:       0 6px 24px rgba(60,40,80,0.08);
  --shadow-md:    0 10px 36px rgba(60,40,80,0.12);
  --shadow-lg:    0 16px 48px rgba(60,40,80,0.14);
  --radius:       20px;
  --radius-lg:    30px;
  --radius-pill:  999px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Nunito', 'Trebuchet MS', sans-serif;
  --font-hand:    'Patrick Hand', 'Caveat', cursive;
  --font-script:  'Cormorant Garamond', 'Dancing Script', serif;
  --max-w:        1100px;
  --gutter:       24px;
  --section-py:   80px;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;

  /* Radius scale */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;

  /* Shadow scale */
  --shadow-sm: 0 2px 8px rgba(60,40,80,0.06);
  --shadow-md: 0 6px 24px rgba(60,40,80,0.08);
  --shadow-lg: 0 16px 48px rgba(60,40,80,0.14);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background-color: #ffffff;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
a { color: inherit; }
a:hover { color: var(--purple-dark); }

/* --- Skip Link (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 9999;
  padding: var(--space-3) var(--space-5);
  background: var(--purple-dark);
  color: var(--white);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
}

/* --- Focus visible ring (accessibility) --- */
:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --- Layout utilities --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--space-8);
}

/* --- SVG sketch filter (for hand-drawn borders) --- */
svg.sketch-filters {
  position: absolute;
  width: 0;
  height: 0;
}

/* --- Watercolor Background (applied directly to body) --- */

/* Paper-grain noise overlay on body */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* --- Watercolor paint-edge mixin via box-shadow --- */
.wc-edge {
  border: 2px solid rgba(201,168,247,0.18);
  box-shadow:
    inset 0 0 20px rgba(201,168,247,0.06),
    0 2px 12px rgba(60,40,80,0.06);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 26px;
  border-radius: 24px 20px 22px 26px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  transition: all 0.28s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 100%);
  color: var(--white);
  box-shadow: 
    0 4px 16px rgba(201,168,247,0.3),
    inset 0 1px 2px rgba(255,255,255,0.25);
  border-radius: 30px 25px 28px 32px;
  position: relative;
}
.btn--primary::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(247,168,196,0.3), rgba(201,168,247,0.3));
  filter: blur(4px);
  z-index: -1;
}
.btn--primary:hover {
  transform: translateY(-2px) rotate(-0.5deg);
  box-shadow: 
    0 8px 28px rgba(201,168,247,0.45),
    inset 0 1px 2px rgba(255,255,255,0.25);
  filter: brightness(1.06);
}
.btn--primary:focus-visible {
  outline: 3px solid var(--pink-dark);
  outline-offset: 3px;
}
.btn--primary:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

.btn--lg { padding: 14px 36px; font-size: 1.05rem; }

.btn--soft {
  background: var(--purple-light);
  color: var(--purple-dark);
  border-color: transparent;
}
.btn--soft:hover {
  background: var(--pink-light);
  color: var(--pink-dark);
}

/* Secondary button */
.btn--secondary {
  background: var(--blue-light);
  color: var(--blue-dark);
  border-color: rgba(168,212,247,0.4);
}
.btn--secondary:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-1px);
}
.btn--secondary:active {
  transform: translateY(0);
}

/* Ghost button */
.btn--ghost {
  background: transparent;
  color: var(--purple-dark);
  border: 2px solid var(--purple);
}
.btn--ghost:hover {
  background: var(--purple-light);
  transform: translateY(-1px);
}
.btn--ghost:active {
  transform: translateY(0);
  background: rgba(201,168,247,0.2);
}

#navBlogCta {
  animation: blog-pulse 2s ease-in-out infinite;
}

@keyframes blog-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.btn--pill {
  background: rgba(255,255,255,0.85);
  color: var(--purple-dark);
  border-color: var(--purple);
  backdrop-filter: blur(4px);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 20px;
  border-radius: 22px 18px 20px 24px;
}
.btn--pill:hover {
  background: var(--purple-light);
  border-color: var(--pink);
  color: var(--pink-dark);
  transform: translateY(-1px) rotate(-0.5deg);
}
.btn--pill:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
}

.btn--text {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 4px 8px;
  font-weight: 600;
  font-size: 0.88rem;
}
.btn--text:hover { color: var(--purple-dark); }

/* ============================================================
   UTILITIES
   ============================================================ */
.section-divider {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  line-height: 0;
  padding: 0 var(--gutter);
}
.section-divider img {
  width: 100%;
  height: 60px;
  object-fit: cover;
  opacity: 0.9;
  filter: saturate(1.4) brightness(1.05);
}

.section-title {
  font-family: var(--font-script);
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  color: #111;
  text-align: center;
  margin-bottom: 48px;
  line-height: 1.25;
  position: relative;
  display: inline-block;
  width: 100%;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.03em;
}
.section-title--dark {
  color: #1a1a1a;
}

.section-title::after {
  content: '';
  display: block;
  width: 60%;
  max-width: 220px;
  height: 6px;
  margin: 10px auto 0;
  border-radius: 50%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(247,168,196,0.45) 15%, 
    rgba(201,168,247,0.5) 50%, 
    rgba(168,212,247,0.45) 85%, 
    transparent 100%);
  filter: blur(1px);
}

/* ============================================================
   SITE HEADER / NAVIGATION
   ============================================================ */
.site-header {
  position: relative;
  padding: 0 var(--gutter);
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='620' height='580' viewBox='0 0 620 580'%3E%3Cdefs%3E%3Cfilter id='wc'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.045' numOctaves='3' seed='2' result='noise'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='noise' scale='4' xChannelSelector='R' yChannelSelector='G' result='displaced'/%3E%3CfeGaussianBlur in='displaced' stdDeviation='0.8'/%3E%3C/filter%3E%3CradialGradient id='pg' cx='45%25' cy='40%25' r='55%25'%3E%3Cstop offset='0%25' stop-color='%23fcc' stop-opacity='0.7'/%3E%3Cstop offset='45%25' stop-color='%23f7a8c4' stop-opacity='0.5'/%3E%3Cstop offset='100%25' stop-color='%23f7a8c4' stop-opacity='0.15'/%3E%3C/radialGradient%3E%3CradialGradient id='prg' cx='45%25' cy='40%25' r='55%25'%3E%3Cstop offset='0%25' stop-color='%23ddc8ff' stop-opacity='0.7'/%3E%3Cstop offset='45%25' stop-color='%23c9a8f7' stop-opacity='0.5'/%3E%3Cstop offset='100%25' stop-color='%23c9a8f7' stop-opacity='0.12'/%3E%3C/radialGradient%3E%3CradialGradient id='yg' cx='45%25' cy='40%25' r='55%25'%3E%3Cstop offset='0%25' stop-color='%23fff4b8' stop-opacity='0.75'/%3E%3Cstop offset='45%25' stop-color='%23fce68a' stop-opacity='0.5'/%3E%3Cstop offset='100%25' stop-color='%23e8d36a' stop-opacity='0.12'/%3E%3C/radialGradient%3E%3CradialGradient id='og' cx='45%25' cy='40%25' r='55%25'%3E%3Cstop offset='0%25' stop-color='%23ffddb8' stop-opacity='0.7'/%3E%3Cstop offset='45%25' stop-color='%23f7c8a0' stop-opacity='0.5'/%3E%3Cstop offset='100%25' stop-color='%23f0a870' stop-opacity='0.12'/%3E%3C/radialGradient%3E%3CradialGradient id='lg' cx='50%25' cy='35%25' r='60%25'%3E%3Cstop offset='0%25' stop-color='%23a8dd88' stop-opacity='0.65'/%3E%3Cstop offset='100%25' stop-color='%2378bb55' stop-opacity='0.15'/%3E%3C/radialGradient%3E%3C/defs%3E%3C!-- Pink apple 1 --%3E%3Cg filter='url(%23wc)' transform='translate(70,65) rotate(-8)'%3E%3Cpath d='M0,-4 C-9,-30 -38,-33 -33,-6 C-35,19 -14,38 0,40 C14,38 35,19 33,-6 C38,-33 9,-30 0,-4 Z' fill='url(%23pg)'/%3E%3Cpath d='M-5,10 Q-10,-2 -3,-10 Q5,-2 0,10' fill='%23ffffff' opacity='0.25'/%3E%3Cline x1='0' y1='-6' x2='2' y2='-22' stroke='%23886655' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M2,-20 Q14,-32 24,-22' fill='url(%23lg)'/%3E%3C/g%3E%3C!-- Purple apple --%3E%3Cg filter='url(%23wc)' transform='translate(310,40) rotate(12)'%3E%3Cpath d='M0,-4 C-8,-28 -35,-31 -30,-6 C-32,17 -12,35 0,37 C12,35 32,17 30,-6 C35,-31 8,-28 0,-4 Z' fill='url(%23prg)'/%3E%3Cpath d='M-4,9 Q-9,-1 -2,-9 Q4,-1 0,9' fill='%23ffffff' opacity='0.22'/%3E%3Cline x1='0' y1='-6' x2='1' y2='-21' stroke='%23886655' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M1,-19 Q11,-30 20,-20' fill='url(%23lg)'/%3E%3C/g%3E%3C!-- Orange apple --%3E%3Cg filter='url(%23wc)' transform='translate(530,110) rotate(-5)'%3E%3Cpath d='M0,-4 C-8,-27 -34,-30 -29,-6 C-31,16 -11,33 0,35 C11,33 31,16 29,-6 C34,-30 8,-27 0,-4 Z' fill='url(%23og)'/%3E%3Cpath d='M-4,8 Q-8,-1 -2,-8 Q4,-1 0,8' fill='%23ffffff' opacity='0.2'/%3E%3Cline x1='0' y1='-6' x2='1' y2='-20' stroke='%23886655' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M1,-18 Q10,-28 17,-19' fill='url(%23lg)'/%3E%3C/g%3E%3C!-- Yellow apple --%3E%3Cg filter='url(%23wc)' transform='translate(175,260) rotate(6)'%3E%3Cpath d='M0,-4 C-9,-29 -36,-32 -31,-6 C-33,18 -13,36 0,38 C13,36 33,18 31,-6 C36,-32 9,-29 0,-4 Z' fill='url(%23yg)'/%3E%3Cpath d='M-5,10 Q-10,-1 -3,-10 Q5,-1 0,10' fill='%23ffffff' opacity='0.25'/%3E%3Cline x1='0' y1='-6' x2='2' y2='-22' stroke='%23886655' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M2,-20 Q12,-30 20,-20' fill='url(%23lg)'/%3E%3C/g%3E%3C!-- Pink apple 2 --%3E%3Cg filter='url(%23wc)' transform='translate(450,290) rotate(-14)'%3E%3Cpath d='M0,-4 C-8,-28 -34,-30 -29,-6 C-31,16 -12,34 0,36 C12,34 31,16 29,-6 C34,-30 8,-28 0,-4 Z' fill='url(%23pg)'/%3E%3Cpath d='M-4,8 Q-8,-1 -2,-8 Q4,-1 0,8' fill='%23ffffff' opacity='0.22'/%3E%3Cline x1='0' y1='-6' x2='2' y2='-21' stroke='%23886655' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M2,-19 Q12,-29 20,-20' fill='url(%23lg)'/%3E%3C/g%3E%3C!-- Purple apple 2 --%3E%3Cg filter='url(%23wc)' transform='translate(55,430) rotate(10)'%3E%3Cpath d='M0,-4 C-8,-27 -33,-29 -28,-6 C-30,15 -11,32 0,34 C11,32 30,15 28,-6 C33,-29 8,-27 0,-4 Z' fill='url(%23prg)'/%3E%3Cpath d='M-3,7 Q-7,-1 -1,-7 Q3,-1 0,7' fill='%23ffffff' opacity='0.2'/%3E%3Cline x1='0' y1='-6' x2='1' y2='-20' stroke='%23886655' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M1,-18 Q9,-27 16,-18' fill='url(%23lg)'/%3E%3C/g%3E%3C!-- Orange apple 2 --%3E%3Cg filter='url(%23wc)' transform='translate(340,470) rotate(-10)'%3E%3Cpath d='M0,-4 C-9,-28 -35,-31 -30,-6 C-32,17 -13,35 0,37 C13,35 32,17 30,-6 C35,-31 9,-28 0,-4 Z' fill='url(%23og)'/%3E%3Cpath d='M-4,9 Q-9,-1 -2,-9 Q4,-1 0,9' fill='%23ffffff' opacity='0.22'/%3E%3Cline x1='0' y1='-6' x2='2' y2='-21' stroke='%23886655' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M2,-19 Q12,-29 19,-20' fill='url(%23lg)'/%3E%3C/g%3E%3C!-- Yellow apple 2 --%3E%3Cg filter='url(%23wc)' transform='translate(570,400) rotate(15)'%3E%3Cpath d='M0,-4 C-8,-26 -32,-28 -27,-6 C-29,14 -10,31 0,33 C10,31 29,14 27,-6 C32,-28 8,-26 0,-4 Z' fill='url(%23yg)'/%3E%3Cpath d='M-4,8 Q-8,-1 -2,-8 Q4,-1 0,8' fill='%23ffffff' opacity='0.25'/%3E%3Cline x1='0' y1='-6' x2='1' y2='-19' stroke='%23886655' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M1,-17 Q9,-26 15,-18' fill='url(%23lg)'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 620px 580px;
}
/* Center-fade overlay so apples don't fight text */
.site-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 75% 80% at 50% 50%, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.6) 55%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.site-header__inner { position: relative; z-index: 1; }

.site-header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 20px;
  gap: 12px;
  position: relative;
}

/* Top-right action bar: CTA buttons + avatar */
.site-header__actions {
  position: absolute;
  top: 14px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
}

.nav-pills {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.nav-pills[hidden] {
  display: none !important;
}

/* --- Nav Dropdown --- */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown__trigger {
  cursor: pointer;
}

.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(201,168,247,0.25);
  border-radius: 14px 16px 18px 14px;
  box-shadow: 0 8px 28px rgba(60,40,80,0.12);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown__item {
  display: block;
  width: 100%;
  padding: 10px 20px;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-hand);
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown__item:hover {
  background: var(--purple-light);
  color: var(--purple-dark);
}

.site-header__brand { text-align: center; }

.site-header__logo-img {
  width: 500px;
  margin: 0 auto;
}

.site-header__tagline {
  font-family: var(--font-hand);
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.12em;
}

.site-header__cta {
  display: none; /* replaced by .site-header__actions */
}

/* ---- Header Quick-Link Buttons (horizontal row below logo) ---- */
.header-quick-links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

.header-quick-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid rgba(201,168,247,0.4);
  border-radius: 16px 12px 14px 18px;
  background: rgba(237,228,252,0.7);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.header-quick-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.25s;
}
.header-quick-link:hover::before { opacity: 1; }
.header-quick-link:hover {
  transform: translateY(-3px) rotate(0.5deg);
  box-shadow: 0 6px 20px rgba(60,40,80,0.14);
  border-color: var(--purple);
}
.header-quick-link:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(60,40,80,0.10);
}

.header-quick-link__icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.header-quick-link__icon--market {
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-quick-link__icon--market svg {
  width: 28px;
  height: 28px;
}

.header-quick-link__text {
  font-family: var(--font-hand);
  font-size: 1rem;
  font-weight: 600;
  color: #5a3d9c;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.header-quick-link::before {
  background: linear-gradient(135deg, rgba(201,168,247,0.2), rgba(237,228,252,0.4));
}

.site-header__status {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--purple-dark);
}

.site-header__avatar-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(201,168,247,0.35);
  background: linear-gradient(135deg, #e8d5f5 0%, #fce4ec 100%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(60,40,80,0.10);
  transition: transform 0.2s, box-shadow 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.site-header__avatar-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 3px 14px rgba(60,40,80,0.16);
}
.site-header__avatar-btn[hidden] { display: none; }

/* Sign-in button (shown when logged out, same position as avatar) */
.site-header__sign-in-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  padding: 8px 18px;
  border-radius: 22px;
  border: 2px solid rgba(201,168,247,0.4);
  background: linear-gradient(135deg, #e8d5f5 0%, #fce4ec 100%);
  color: var(--purple-dark, #5a3d8a);
  font-family: var(--font-hand, 'Patrick Hand', cursive);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(60,40,80,0.10);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
}
.site-header__sign-in-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 14px rgba(60,40,80,0.18);
  background: linear-gradient(135deg, #dcc4f0 0%, #f8d0dc 100%);
}
.site-header__sign-in-btn[hidden] { display: none; }

.site-header__avatar-initial {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--purple-dark);
  text-transform: uppercase;
  line-height: 1;
  pointer-events: none;
}

.site-header__avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Header CTA buttons (top-right, compact) */
.btn--header-even {
  min-width: auto;
  text-align: center;
  justify-content: center;
  padding: 8px 18px;
  font-size: 0.82rem;
}

/* Responsive: stack actions below logo on small screens */
@media (max-width: 600px) {
  .site-header__actions {
    position: static;
    justify-content: center;
    width: 100%;
  }
  .site-header__logo-img {
    width: 280px;
  }
  .btn--header-even {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}

/* Marketplace control (centered below logo, in flow) */
.market-control {
  position: relative;
  top: auto;
  left: auto;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}
.site-header__market-btn {
  background: none !important;
  border: none !important;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: auto;
  width: auto;
  box-shadow: none !important;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.site-header__market-btn:hover {
  background: none !important;
}
.site-header__market-btn:active {
  background: none !important;
}
.site-header__market-btn:focus { outline: 2px solid rgba(201,168,247,0.25); border-radius: 8px; background: none !important; }
.market-icon { display: block; }

.site-header__market-btn .market-label {
  font-family: var(--font-hand);
  font-size: 1.12rem;
  color: #111111;
  font-weight: 800;
  letter-spacing: 0.02em;
  transform-origin: center;
  animation: market-pulse 1.2s ease-in-out infinite;
  display: inline-block;
  margin: 0;
  white-space: nowrap;
  padding: 8px 14px;
  background: rgba(255,255,255,0.95);
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.18);
  box-shadow: 0 4px 12px rgba(60,40,80,0.06);
  backdrop-filter: blur(4px);
}

.site-header__market-btn .market-icon {
  width: 120px;
  height: 120px;
  display: block;
}

@keyframes market-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Popup menu */
.market-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 998;
  min-width: 260px;
  background: rgba(255,255,255,0.98);
  border: 1.5px solid rgba(201,168,247,0.22);
  border-radius: 12px;
  box-shadow: 0 10px 36px rgba(60,40,80,0.12);
  padding: 8px;
  display: none;
}
.market-menu__inner { padding: 6px; }
.market-menu__title {
  font-weight: 700;
  color: var(--purple-dark);
  font-family: var(--font-heading);
  margin-bottom: 8px;
}
.market-menu__item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-hand);
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
}
.market-menu__item:hover { background: linear-gradient(90deg,var(--purple-light),var(--pink-light)); color: var(--purple-dark); }

/* crayons moved to hero section */

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  padding: var(--section-py) var(--gutter) 40px;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='620' height='580' viewBox='0 0 620 580'%3E%3Cdefs%3E%3Cfilter id='wc'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.045' numOctaves='3' seed='2' result='noise'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='noise' scale='4' xChannelSelector='R' yChannelSelector='G' result='displaced'/%3E%3CfeGaussianBlur in='displaced' stdDeviation='0.8'/%3E%3C/filter%3E%3CradialGradient id='pg' cx='45%25' cy='40%25' r='55%25'%3E%3Cstop offset='0%25' stop-color='%23fcc' stop-opacity='0.7'/%3E%3Cstop offset='45%25' stop-color='%23f7a8c4' stop-opacity='0.5'/%3E%3Cstop offset='100%25' stop-color='%23f7a8c4' stop-opacity='0.15'/%3E%3C/radialGradient%3E%3CradialGradient id='prg' cx='45%25' cy='40%25' r='55%25'%3E%3Cstop offset='0%25' stop-color='%23ddc8ff' stop-opacity='0.7'/%3E%3Cstop offset='45%25' stop-color='%23c9a8f7' stop-opacity='0.5'/%3E%3Cstop offset='100%25' stop-color='%23c9a8f7' stop-opacity='0.12'/%3E%3C/radialGradient%3E%3CradialGradient id='yg' cx='45%25' cy='40%25' r='55%25'%3E%3Cstop offset='0%25' stop-color='%23fff4b8' stop-opacity='0.75'/%3E%3Cstop offset='45%25' stop-color='%23fce68a' stop-opacity='0.5'/%3E%3Cstop offset='100%25' stop-color='%23e8d36a' stop-opacity='0.12'/%3E%3C/radialGradient%3E%3CradialGradient id='og' cx='45%25' cy='40%25' r='55%25'%3E%3Cstop offset='0%25' stop-color='%23ffddb8' stop-opacity='0.7'/%3E%3Cstop offset='45%25' stop-color='%23f7c8a0' stop-opacity='0.5'/%3E%3Cstop offset='100%25' stop-color='%23f0a870' stop-opacity='0.12'/%3E%3C/radialGradient%3E%3CradialGradient id='lg' cx='50%25' cy='35%25' r='60%25'%3E%3Cstop offset='0%25' stop-color='%23a8dd88' stop-opacity='0.65'/%3E%3Cstop offset='100%25' stop-color='%2378bb55' stop-opacity='0.15'/%3E%3C/radialGradient%3E%3C/defs%3E%3C!-- Pink apple 1 --%3E%3Cg filter='url(%23wc)' transform='translate(70,65) rotate(-8)'%3E%3Cpath d='M0,-4 C-9,-30 -38,-33 -33,-6 C-35,19 -14,38 0,40 C14,38 35,19 33,-6 C38,-33 9,-30 0,-4 Z' fill='url(%23pg)'/%3E%3Cpath d='M-5,10 Q-10,-2 -3,-10 Q5,-2 0,10' fill='%23ffffff' opacity='0.25'/%3E%3Cline x1='0' y1='-6' x2='2' y2='-22' stroke='%23886655' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M2,-20 Q14,-32 24,-22' fill='url(%23lg)'/%3E%3C/g%3E%3C!-- Purple apple --%3E%3Cg filter='url(%23wc)' transform='translate(310,40) rotate(12)'%3E%3Cpath d='M0,-4 C-8,-28 -35,-31 -30,-6 C-32,17 -12,35 0,37 C12,35 32,17 30,-6 C35,-31 8,-28 0,-4 Z' fill='url(%23prg)'/%3E%3Cpath d='M-4,9 Q-9,-1 -2,-9 Q4,-1 0,9' fill='%23ffffff' opacity='0.22'/%3E%3Cline x1='0' y1='-6' x2='1' y2='-21' stroke='%23886655' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M1,-19 Q11,-30 20,-20' fill='url(%23lg)'/%3E%3C/g%3E%3C!-- Orange apple --%3E%3Cg filter='url(%23wc)' transform='translate(530,110) rotate(-5)'%3E%3Cpath d='M0,-4 C-8,-27 -34,-30 -29,-6 C-31,16 -11,33 0,35 C11,33 31,16 29,-6 C34,-30 8,-27 0,-4 Z' fill='url(%23og)'/%3E%3Cpath d='M-4,8 Q-8,-1 -2,-8 Q4,-1 0,8' fill='%23ffffff' opacity='0.2'/%3E%3Cline x1='0' y1='-6' x2='1' y2='-20' stroke='%23886655' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M1,-18 Q10,-28 17,-19' fill='url(%23lg)'/%3E%3C/g%3E%3C!-- Yellow apple --%3E%3Cg filter='url(%23wc)' transform='translate(175,260) rotate(6)'%3E%3Cpath d='M0,-4 C-9,-29 -36,-32 -31,-6 C-33,18 -13,36 0,38 C13,36 33,18 31,-6 C36,-32 9,-29 0,-4 Z' fill='url(%23yg)'/%3E%3Cpath d='M-5,10 Q-10,-1 -3,-10 Q5,-1 0,10' fill='%23ffffff' opacity='0.25'/%3E%3Cline x1='0' y1='-6' x2='2' y2='-22' stroke='%23886655' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M2,-20 Q12,-30 20,-20' fill='url(%23lg)'/%3E%3C/g%3E%3C!-- Pink apple 2 --%3E%3Cg filter='url(%23wc)' transform='translate(450,290) rotate(-14)'%3E%3Cpath d='M0,-4 C-8,-28 -34,-30 -29,-6 C-31,16 -12,34 0,36 C12,34 31,16 29,-6 C34,-30 8,-28 0,-4 Z' fill='url(%23pg)'/%3E%3Cpath d='M-4,8 Q-8,-1 -2,-8 Q4,-1 0,8' fill='%23ffffff' opacity='0.22'/%3E%3Cline x1='0' y1='-6' x2='2' y2='-21' stroke='%23886655' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M2,-19 Q12,-29 20,-20' fill='url(%23lg)'/%3E%3C/g%3E%3C!-- Purple apple 2 --%3E%3Cg filter='url(%23wc)' transform='translate(55,430) rotate(10)'%3E%3Cpath d='M0,-4 C-8,-27 -33,-29 -28,-6 C-30,15 -11,32 0,34 C11,32 30,15 28,-6 C33,-29 8,-27 0,-4 Z' fill='url(%23prg)'/%3E%3Cpath d='M-3,7 Q-7,-1 -1,-7 Q3,-1 0,7' fill='%23ffffff' opacity='0.2'/%3E%3Cline x1='0' y1='-6' x2='1' y2='-20' stroke='%23886655' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M1,-18 Q9,-27 16,-18' fill='url(%23lg)'/%3E%3C/g%3E%3C!-- Orange apple 2 --%3E%3Cg filter='url(%23wc)' transform='translate(340,470) rotate(-10)'%3E%3Cpath d='M0,-4 C-9,-28 -35,-31 -30,-6 C-32,17 -13,35 0,37 C13,35 32,17 30,-6 C35,-31 9,-28 0,-4 Z' fill='url(%23og)'/%3E%3Cpath d='M-4,9 Q-9,-1 -2,-9 Q4,-1 0,9' fill='%23ffffff' opacity='0.22'/%3E%3Cline x1='0' y1='-6' x2='2' y2='-21' stroke='%23886655' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M2,-19 Q12,-29 19,-20' fill='url(%23lg)'/%3E%3C/g%3E%3C!-- Yellow apple 2 --%3E%3Cg filter='url(%23wc)' transform='translate(570,400) rotate(15)'%3E%3Cpath d='M0,-4 C-8,-26 -32,-28 -27,-6 C-29,14 -10,31 0,33 C10,31 29,14 27,-6 C32,-28 8,-26 0,-4 Z' fill='url(%23yg)'/%3E%3Cpath d='M-4,8 Q-8,-1 -2,-8 Q4,-1 0,8' fill='%23ffffff' opacity='0.25'/%3E%3Cline x1='0' y1='-6' x2='1' y2='-19' stroke='%23886655' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cpath d='M1,-17 Q9,-26 15,-18' fill='url(%23lg)'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 620px 580px;
  position: relative;
}
/* Center-fade overlay so apple pattern doesn't compete with hero content */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 75% at 50% 50%, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.hero__inner { position: relative; z-index: 1; }

.hero__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
}

.hero__text {
  max-width: 900px;
  margin-left: 40px;
  background: rgba(255,255,255,0.85);
  padding: var(--space-6) var(--space-7);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(4px);
}

.hero__title {
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 300;
  color: #111;
  line-height: 1.25;
  margin-bottom: var(--space-5);
  letter-spacing: 0.03em;
  font-style: italic;
}

.hero__highlight {
  font-family: var(--font-script);
  color: #111;
  font-style: italic;
  font-weight: 300;
  font-size: 1em;
  letter-spacing: 0.03em;
}

.hero__body {
  color: var(--text-muted);
  font-size: 1.08rem;
  margin-bottom: var(--space-3);
  line-height: 1.65;
  font-style: italic;
  max-width: 100%;
}

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__illustration {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  position: relative;
}


.hero__books {
  width: clamp(340px, 36vw, 500px);
  filter: drop-shadow(0 10px 30px rgba(60,40,80,0.12));
  position: relative;
}

/* ============================================================
   HOW IT WORKS — STICKY NOTES
   ============================================================ */
.how-it-works {
  padding: var(--section-py) var(--gutter);
  background:
    radial-gradient(ellipse 60% 50% at 70% 30%, rgba(252,230,138,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 30% 70%, rgba(201,168,247,0.08) 0%, transparent 70%);
}

.how-it-works__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.sticky-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 920px;
  margin: 0 auto;
}

.sticky-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  padding: 32px 14px 28px;
  background: none;
  border: none;
  transition: transform 0.32s ease, filter 0.32s ease;
  cursor: pointer;
}

.sticky-card:hover {
  transform: translateY(-8px) rotate(-2deg) scale(1.03);
  filter: brightness(1.05) drop-shadow(0 12px 24px rgba(60,40,80,0.10));
}

.sticky-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

.sticky-card__icon {
  position: relative;
  z-index: 1;
  font-size: 2.2rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
}

.sticky-card__label {
  position: relative;
  z-index: 1;
  font-family: var(--font-script);
  font-size: 1.5rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.3;
  color: rgba(42, 42, 42, 0.7);
  text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.sticky-card--pink .sticky-card__label  { color: rgba(42, 42, 42, 0.7); }
.sticky-card--purple .sticky-card__label { color: rgba(42, 42, 42, 0.7); }
.sticky-card--mint .sticky-card__label { color: rgba(42, 42, 42, 0.7); }
.sticky-card--blue .sticky-card__label   { color: rgba(42, 42, 42, 0.7); }

/* ============================================================
   STEPS SECTION
   ============================================================ */
.steps {
  padding: var(--section-py) var(--gutter);
  padding-bottom: 100px;
  background:
    radial-gradient(ellipse 55% 50% at 25% 40%, rgba(168,212,247,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 45% 55% at 75% 60%, rgba(247,168,196,0.07) 0%, transparent 70%);
}

.steps__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 960px;
  margin: 0 auto;
}

/* 5-card variant: 3 on top, 2 centered below */
.steps-grid--5 {
  grid-template-columns: repeat(6, 1fr);
  max-width: 1060px;
}
.steps-grid--5 .step-card:nth-child(1) { grid-column: 1 / 3; }
.steps-grid--5 .step-card:nth-child(2) { grid-column: 3 / 5; }
.steps-grid--5 .step-card:nth-child(3) { grid-column: 5 / 7; }
.steps-grid--5 .step-card:nth-child(4) { grid-column: 2 / 4; }
.steps-grid--5 .step-card:nth-child(5) { grid-column: 4 / 6; }

/* Subtitle under section title */
.steps__subtitle {
  font-family: var(--font-hand);
  font-size: 1.1rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Age badge */
.step-card__age {
  display: inline-block;
  font-family: var(--font-hand);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--pink), var(--purple));
  padding: 3px 14px;
  border-radius: 20px;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

/* Number text fallback for steps 4 & 5 */
.step-card__num--text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-light), var(--blue-light));
  border: 2px solid rgba(201,168,247,0.25);
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--purple-dark);
}

/* Age-specific accent colors */
.step-card--age1 { border-color: rgba(247,168,196,0.3); }
.step-card--age2 { border-color: rgba(201,168,247,0.3); }
.step-card--age3 { border-color: rgba(168,212,247,0.3); }
.step-card--age4 { border-color: rgba(252,230,138,0.35); }
.step-card--age5 { border-color: rgba(168,247,201,0.3); }

.step-card {
  background: var(--white);
  border-radius: 18px 22px 20px 24px;
  padding: 40px 28px 36px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid rgba(201,168,247,0.15);
  position: relative;
  /* Watercolor paper texture */
  background-image:
    radial-gradient(ellipse at 20% 15%, rgba(247,168,196,0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 85%, rgba(168,212,247,0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(252,230,138,0.05) 0%, transparent 60%);
}
.step-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, 
    rgba(247,168,196,0.12), 
    rgba(201,168,247,0.12), 
    rgba(168,212,247,0.12));
  filter: blur(6px);
  z-index: -1;
}

.step-card:hover {
  transform: translateY(-5px) rotate(-0.5deg);
  box-shadow: var(--shadow-md);
}

.step-card__num {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
}

.step-card__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--purple-dark);
  margin-bottom: 10px;
}

.step-card__text {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.65;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: none;
  padding: 48px var(--gutter) 36px;
  position: relative;
  background:
    radial-gradient(ellipse 60% 80% at 30% 100%, rgba(247,168,196,0.12) 0%, transparent 65%),
    radial-gradient(ellipse 50% 70% at 70% 100%, rgba(201,168,247,0.10) 0%, transparent 65%),
    radial-gradient(ellipse 40% 60% at 50% 0%, rgba(168,212,247,0.06) 0%, transparent 60%);
}
.site-footer::before {
  display: none;
}

.site-footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.site-footer__nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.site-footer__slogan {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--pink-dark);
  letter-spacing: 0.04em;
}

.site-footer__copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================================
   AUTH GATE MODAL
   ============================================================ */
.gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gate[aria-hidden="true"] { display: none; }

.gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(60,40,80,0.3);
  backdrop-filter: blur(8px);
}

.gate__close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  line-height: 1;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s, transform 0.2s;
}
.gate__close:hover {
  color: var(--pink-dark);
  background: rgba(247,168,196,0.15);
  transform: rotate(90deg);
}

.gate__content {
  position: relative;
  background: var(--white);
  border-radius: 26px 30px 28px 32px;
  padding: 44px 40px;
  max-width: 420px;
  width: 92%;
  box-shadow: var(--shadow-lg);
  text-align: center;
  border: 2px solid rgba(201,168,247,0.18);
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(247,168,196,0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(201,168,247,0.10) 0%, transparent 50%);
}

.gate__content h2 {
  font-family: var(--font-heading);
  color: var(--purple-dark);
  margin-bottom: 6px;
  font-size: 1.5rem;
}
.gate__content h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  margin: 8px auto 0;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  filter: blur(0.5px);
}

.gate__content > p {
  color: var(--text-muted);
  margin-bottom: 24px;
  margin-top: 10px;
  font-size: 0.95rem;
  font-family: var(--font-hand);
}

.gate__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.gate__form label {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--purple-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-hand);
}

.gate__form input {
  padding: 12px 16px;
  border-radius: 14px 16px 12px 18px;
  border: 1.5px solid rgba(201,168,247,0.25);
  font-size: 0.95rem;
  font-family: var(--font-hand);
  background: #fefcff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gate__form input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(201,168,247,0.18);
}

.gate__actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.gate__actions .btn { flex: 1; }

.gate__note {
  display: block;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ── Gate tabs (Sign In / Create Account) ── */
.gate__tabs {
  display: flex;
  gap: 0;
  border-radius: 14px;
  background: rgba(201,168,247,0.1);
  padding: 4px;
  margin: 12px 0 20px;
}

.gate__tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: none;
  border-radius: 10px;
  font-family: var(--font-hand);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.gate__tab--active,
.gate__tab[aria-selected="true"] {
  background: var(--white);
  color: var(--purple-dark);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ── Gate fields ── */
.gate__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 4px;
}

.gate__label {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--purple-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-hand);
}

.gate__input {
  padding: 12px 16px;
  border-radius: 14px 16px 12px 18px;
  border: 1.5px solid rgba(201,168,247,0.25);
  font-size: 0.95rem;
  font-family: var(--font-hand);
  background: #fefcff;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  box-sizing: border-box;
}
.gate__input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(201,168,247,0.18);
}
.gate__input--error {
  border-color: #e04;
  box-shadow: 0 0 0 3px rgba(220,0,60,0.1);
}

/* ── Gate status message ── */
.gate__status {
  font-family: var(--font-hand);
  font-size: 0.88rem;
  min-height: 1.2em;
  text-align: center;
  padding: 2px 0;
  transition: color 0.2s;
}
.gate__status:empty { display: none; }
.gate__status--error { color: #d03; }
.gate__status--success { color: #1a7a3a; }
.gate__status--info { color: var(--purple); }

/* ── Gate submit button ── */
.gate__submit {
  width: 100%;
  margin-top: 4px;
}
.gate__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Forgot password link ── */
.gate__forgot-link {
  background: none;
  border: none;
  font-family: var(--font-hand);
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  display: block;
  width: 100%;
  margin-top: 2px;
  padding: 4px;
  transition: color 0.18s;
}
.gate__forgot-link:hover { color: var(--purple); }

/* ============================================================
   COMMENT REACTIONS
   ============================================================ */
.post__comment-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.post__comment-author {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--purple-dark);
  font-family: var(--font-hand);
}

.post__comment-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-hand);
}

.post__comment-body {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
}

.post__comment--flagged {
  border-left: 3px solid #f5a623;
  padding-left: 8px;
  opacity: 0.85;
}

.post__comment-flag-badge {
  font-size: 0.7rem;
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc10730;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: auto;
  font-family: var(--font-hand);
}

/* Emoji reaction row */
.post__comment-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.post__reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1.5px solid rgba(201,168,247,0.2);
  background: rgba(201,168,247,0.06);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  line-height: 1.4;
  color: inherit;
}
.post__reaction-btn:hover:not(:disabled) {
  background: rgba(201,168,247,0.18);
  border-color: var(--purple);
  transform: scale(1.08);
}
.post__reaction-btn.reacted {
  background: rgba(201,168,247,0.25);
  border-color: var(--purple);
  font-weight: 700;
}
.post__reaction-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.post__reaction-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--purple-dark);
}

/* ============================================================
   GENERIC MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal[aria-hidden="true"] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(60,40,80,0.28);
  backdrop-filter: blur(5px);
}

.modal__content {
  position: relative;
  background: var(--white);
  border-radius: 26px 30px 28px 32px;
  padding: 40px 36px;
  max-width: 600px;
  width: 92%;
  max-height: 82vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(201,168,247,0.18);
  background-image:
    radial-gradient(ellipse at 10% 5%, rgba(247,168,196,0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 95%, rgba(201,168,247,0.10) 0%, transparent 50%);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.modal__close:hover {
  color: var(--pink-dark);
  background: rgba(247,168,196,0.1);
  transform: rotate(90deg);
}

.modal__content h2 {
  font-family: var(--font-heading);
  color: var(--purple-dark);
  margin-bottom: 4px;
  font-size: 1.4rem;
}
.modal__content h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  margin-top: 8px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  filter: blur(0.5px);
}

.modal__content > p {
  color: var(--text-muted);
  margin-bottom: 18px;
  margin-top: 10px;
  font-size: 0.93rem;
  font-family: var(--font-hand);
}

.modal__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal__card {
  background: #fefcff;
  border-radius: 16px 18px 14px 20px;
  padding: 20px 22px;
  border: 1.5px solid rgba(201,168,247,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(201,168,247,0.04) 0%, transparent 60%);
}
.modal__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(60,40,80,0.06);
}
.modal__card strong {
  display: block;
  color: var(--purple-dark);
  margin-bottom: 4px;
  font-family: var(--font-heading);
  font-size: 1rem;
}
.modal__card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
  line-height: 1.6;
}
.modal__card a {
  color: var(--pink-dark);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(212,96,138,0.3);
  transition: border-color 0.2s;
}
.modal__card a:hover {
  border-bottom-color: var(--pink-dark);
}
.modal__card small {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ============================================================
   BOOKSHELF MODAL
   ============================================================ */
.bookshelf-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 16px;
}

.bookshelf {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  background: linear-gradient(170deg, #d4b896 0%, #b08860 50%, #8c6840 100%);
  border-radius: 4px 4px 0 0;
  padding: 28px 28px 0;
  box-shadow:
    0 -4px 12px rgba(0,0,0,0.12) inset,
    2px 2px 10px rgba(60,30,10,0.15);
  min-height: 190px;
  width: 100%;
  max-width: 540px;
  position: relative;
}

.bookshelf__ledge {
  width: 100%;
  max-width: 540px;
  height: 18px;
  background: linear-gradient(to bottom, #7a5530, #5c3d1e);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 5px 12px rgba(60,30,10,0.4), 0 2px 0 rgba(255,255,255,0.08) inset;
  margin-bottom: 24px;
}

.book {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 54px;
  min-height: 150px;
  border-radius: 2px 4px 4px 2px;
  position: relative;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease, filter 0.25s ease;
  box-shadow:
    3px 0 0 rgba(255,255,255,0.18) inset,
    -1px 0 0 rgba(0,0,0,0.12) inset,
    -4px 2px 10px rgba(0,0,0,0.25),
    2px 2px 6px rgba(0,0,0,0.15);
  flex-shrink: 0;
  overflow: hidden;
}

/* Top edge of book */
.book::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: rgba(0,0,0,0.15);
  border-radius: 2px 4px 0 0;
}

/* Spine highlight */
.book::after {
  content: '';
  position: absolute;
  top: 0;
  left: 4px;
  width: 3px;
  bottom: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 0 0 0 2px;
}

.book:hover {
  transform: translateY(-12px) rotate(-3deg);
  filter: brightness(1.12);
}

.book--coming {
  cursor: default;
  opacity: 0.45;
}
.book--coming:hover {
  transform: none;
  filter: none;
}

.book__spine {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: var(--font-hand);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.95);
  text-align: center;
  padding: 14px 6px;
  line-height: 1.3;
  overflow: hidden;
  max-height: 130px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.35);
  letter-spacing: 0.03em;
  z-index: 1;
  position: relative;
}

.book--pink   { background: linear-gradient(to right, #d4607a 0%, #e8849a 40%, #f0a0b4 100%); }
.book--purple { background: linear-gradient(to right, #8855bb 0%, #b088d0 40%, #c9a8f7 100%); }
.book--mint   { background: linear-gradient(to right, #3d9e7a 0%, #6bbfa0 40%, #8dd5b8 100%); }
.book--blue   { background: linear-gradient(to right, #3d7ab8 0%, #6a9fd8 40%, #90bfee 100%); }
.book--yellow { background: linear-gradient(to right, #b88820 0%, #d4a832 40%, #f0c84a 100%); }
.book--peach  { background: linear-gradient(to right, #b86048 0%, #d4886a 40%, #f0a882 100%); }

.bookshelf-note {
  font-family: var(--font-hand);
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
  font-style: italic;
}

/* ============================================================
   KINDLE-STYLE LIBRARY (My Library modal)
   ============================================================ */
.kindle-library {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 8px 0;
}

.kindle-book {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: rgba(255,255,255,0.55);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s ease;
}

.kindle-book:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
}

.kindle-book__cover {
  width: 90px;
  min-width: 90px;
  height: auto;
  border-radius: 4px;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
  object-fit: cover;
  transition: transform 0.2s ease;
}

.kindle-book__cover:hover {
  transform: scale(1.05);
}

.kindle-book__info {
  flex: 1;
  min-width: 0;
}

.kindle-book__title {
  font-family: var(--font-serif, "Playfair Display", serif);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}

.kindle-book__title a {
  color: inherit;
  text-decoration: none;
}

.kindle-book__title a:hover {
  text-decoration: underline;
  color: var(--clr-primary, #d4607a);
}

.kindle-book__author {
  font-family: var(--font-body, "Nunito", sans-serif);
  font-size: 0.85rem;
  color: var(--text-muted, #888);
  margin: 0 0 8px;
}

.kindle-book__blurb {
  font-family: var(--font-body, "Nunito", sans-serif);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-main, #444);
  margin: 0;
}

@media (max-width: 480px) {
  .kindle-book {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .kindle-book__cover {
    width: 120px;
  }
}

/* ============================================================
   BLOG PAGE — INSTAGRAM-STYLE FEED
   ============================================================ */

/* ============================================================
   CHAT MODAL
   ============================================================ */
.chat-modal {
  position: fixed;
  inset: 0;
  z-index: 910;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-modal[aria-hidden="true"] { display: none; }

.chat-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40,30,60,0.35);
  backdrop-filter: blur(4px);
}

.chat-modal__content {
  position: relative;
  background: #fff;
  border-radius: 20px 22px 18px 24px;
  max-width: 550px;
  width: 92%;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 48px rgba(60,40,80,0.18);
  border: 1.5px solid rgba(201,168,247,0.15);
  overflow: hidden;
}

.chat-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.chat-modal__title {
  font-family: var(--font-script);
  font-size: 1.1rem;
  font-weight: 300;
  font-style: italic;
  color: var(--purple-dark);
  margin: 0;
}

.chat-modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.chat-modal__close:hover { color: var(--purple-dark); }

.chat-modal__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px 16px 16px 4px;
  font-size: 0.9rem;
  line-height: 1.45;
  word-wrap: break-word;
}

.chat-msg--user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--purple-light), rgba(201,168,247,0.3));
  color: var(--text);
  border-radius: 16px 16px 4px 16px;
}

.chat-msg--admin {
  align-self: flex-start;
  background: rgba(0,0,0,0.04);
  color: var(--text);
}

.chat-msg__author {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--purple-dark);
  margin-bottom: 2px;
}

.chat-msg__time {
  font-size: 0.68rem;
  color: #aaa;
  margin-top: 4px;
  text-align: right;
}

.chat-modal__form {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.chat-modal__input {
  flex: 1;
  border: 1.5px solid rgba(201,168,247,0.2);
  border-radius: 20px;
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  background: rgba(0,0,0,0.02);
}
.chat-modal__input:focus { border-color: var(--purple); }

.chat-modal__send {
  background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 100%);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.chat-modal__send:hover { opacity: 0.85; }

.chat-modal__scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.activity-section {
  margin-bottom: 24px;
}

.activity-section__title {
  font-family: var(--font-script);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--purple-dark);
  margin-bottom: 8px;
}

.activity-section__intro {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
}

.activity-section__highlight {
  font-family: var(--font-hand);
  font-size: 0.9rem;
  color: var(--purple);
  margin-bottom: 12px;
  font-weight: 600;
}

.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.activity-item {
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
}

.activity-item::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--purple);
  font-size: 1.2rem;
  font-weight: bold;
}

.activity-link {
  display: inline;
  padding: 4px 8px;
  background: linear-gradient(135deg, rgba(201,168,247,0.08), rgba(232,138,171,0.06));
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s ease;
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.activity-link:hover {
  background: linear-gradient(135deg, rgba(201,168,247,0.15), rgba(232,138,171,0.12));
  color: var(--purple-dark);
}

.activity-link strong {
  color: var(--purple-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

.chat-empty {
  text-align: center;
  color: #bbb;
  font-family: var(--font-hand);
  font-size: 0.95rem;
  padding: 40px 20px;
}

/* ============================================================
   ACCOUNT SETTINGS MODAL
   ============================================================ */
.account-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.account-modal[aria-hidden="true"] { display: none; }

.account-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40,30,60,0.35);
  backdrop-filter: blur(4px);
}

.account-modal__content {
  position: relative;
  background: #fff;
  border-radius: 20px 22px 18px 24px;
  padding: 32px 28px 28px;
  max-width: 480px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 12px 48px rgba(60,40,80,0.18);
  border: 1.5px solid rgba(201,168,247,0.15);
}

.account-modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #999;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.account-modal__close:hover { color: var(--purple-dark); }

.account-modal__title {
  font-family: var(--font-script);
  color: var(--purple-dark);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(201,168,247,0.15);
}

.account-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.account-section:last-child { border-bottom: none; margin-bottom: 0; }

.account-section__heading {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 12px;
  font-weight: 600;
}

/* Profile header */
.account-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.account-profile__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-light), var(--purple-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--purple-dark);
  text-transform: uppercase;
  flex-shrink: 0;
  overflow: hidden;
}

.account-profile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.account-profile__name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.account-profile__email {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.account-profile__role {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--purple-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Forms */
.account-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-form label {
  font-family: var(--font-hand);
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.account-form input {
  padding: 10px 14px;
  border: 1.5px solid rgba(201,168,247,0.2);
  border-radius: 10px 12px 10px 14px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s;
  background: rgba(255,255,255,0.9);
}
.account-form input:focus {
  border-color: var(--purple);
}

.account-form .btn {
  margin-top: 8px;
  align-self: flex-start;
}

.account-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.account-status {
  display: block;
  font-size: 0.82rem;
  font-family: var(--font-hand);
  color: var(--pink-dark);
  margin-top: 6px;
  min-height: 1.2em;
}

/* Payment cards list */
.account-payments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.account-payment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(201,168,247,0.06);
  border-radius: 10px;
  border: 1px solid rgba(201,168,247,0.12);
  font-size: 0.88rem;
}

.account-payment-card__info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.account-payment-card__remove {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 0.8rem;
  transition: color 0.2s;
}
.account-payment-card__remove:hover { color: #ed4956; }

.account-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.account-section--signout {
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.account-signout-btn {
  width: 100%;
  color: #d44;
  border-color: rgba(220,68,68,0.25);
  font-weight: 600;
}
.account-signout-btn:hover {
  background: rgba(220,68,68,0.08);
}

/* ============================================================
   ABOUT ME PAGE
   ============================================================ */
.about-page {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: #fafafa;
  overflow-y: auto;
}
.about-page[aria-hidden="true"] { display: none; }

.about-page__topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.about-page__back-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}
.about-page__back-btn:hover { color: var(--accent); }

.about-page__topbar-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.about-page__topbar-spacer { width: 40px; }

.about-page__content {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.about-page__card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  text-align: center;
}

.about-page__avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #e8d5f5 0%, #fce4ec 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-page__avatar-emoji {
  font-size: 2.4rem;
}

.about-page__name {
  font-family: var(--font-script);
  font-weight: 300;
  font-style: italic;
  font-size: 1.6rem;
  color: var(--text);
  margin-bottom: 20px;
}

.about-page__bio {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: #555;
  margin-bottom: 16px;
  text-align: left;
}

.about-page__mission {
  margin-top: 32px;
  padding: 24px;
  background: linear-gradient(135deg, #f3e8ff 0%, #fef3e8 100%);
  border-radius: 12px;
  text-align: center;
}

.about-page__mission-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.about-page__mission-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.7;
  color: #555;
}

.about-page__values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.about-page__value {
  text-align: center;
  padding: 20px 12px;
  background: #fafafa;
  border-radius: 12px;
}

.about-page__value-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.about-page__value h5 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.about-page__value p {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #777;
  line-height: 1.5;
}

@media (max-width: 520px) {
  .about-page__card { padding: 28px 18px; }
  .about-page__name { font-size: 1.3rem; }
  .about-page__values { grid-template-columns: 1fr; }
}

/* ============================================================
   BLOG / ARTICLES PAGE
   ============================================================ */
.blog {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: #fafafa;
  overflow-y: auto;
}
.blog[aria-hidden="true"] { display: none; }

/* Standalone blog page (blog.html) — normal flow, not overlay */
.blog--standalone {
  position: static;
  inset: auto;
  z-index: auto;
  min-height: 100vh;
}
.blog--standalone[aria-hidden="true"] { display: block; }

/* On the standalone blog page, show action bars so edit/delete buttons work */
.blog--standalone .post__action-bar {
  display: flex;
}
.post__admin-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.blog-standalone {
  margin: 0;
  padding: 0;
  background: #fafafa;
}

/* --- Top bar (IG-style) --- */
.blog__topbar { }

/* --- Newspaper-style layout --- */
.blog__newspaper-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 40px;
  min-height: calc(100vh - 220px);
}

@media (max-width: 768px) {
  .blog__newspaper-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* --- Main article area --- */
.blog__main-article {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  padding: 0 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(40, 40, 40, 0.35) transparent;
  width: 100%;
  max-width: none;
  align-items: center;
  justify-content: flex-start;
}

.blog__main-article::-webkit-scrollbar {
  width: 8px;
}

.blog__main-article::-webkit-scrollbar-track {
  background: transparent;
}

.blog__main-article::-webkit-scrollbar-thumb {
  background: rgba(40, 40, 40, 0.3);
  border-radius: 999px;
}

.blog__feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.post {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  max-width: 1140px;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0 auto 40px auto;
}

.post__sheet {
  position: relative;
  display: block;
  /* 8.5 x 11 inch ratio = 0.7727 aspect ratio */
  width: 1100px;
  /* height auto to accommodate content, min-height for 8.5x11 ratio */
  min-height: 1056px;
  background: #faf8f3;
  border: 1px solid rgba(30, 30, 30, 0.15);
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.1),
    0 8px 16px rgba(0,0,0,0.08),
    0 16px 32px rgba(0,0,0,0.06);
  transform-style: preserve-3d;
  overflow: visible;
  margin: 0 auto;
}

.post__page {
  padding: 72px 68px 68px;
  min-height: 1056px;
  position: relative;
  background:
    linear-gradient(0deg, rgba(245,243,238,0.5), rgba(250,248,243,0.9)),
    repeating-linear-gradient(0deg, transparent 0px, transparent 31px, rgba(0,100,200,0.02) 31px, rgba(0,100,200,0.02) 32px);
  /* Add subtle paper texture */
  background-blend-mode: multiply;
}



.post__header {
  display: none;
}

.post__avatar {
  display: none;
}

.post__author {
  display: none;
}

.post__time {
  display: none;
}

.post__body {
  padding: 0;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.post__masthead {
  font-family: 'Times New Roman', serif;
  font-size: 0.85rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #222;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 3px double #333;
  font-weight: 700;
  text-align: center;
}

.post__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.7rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ddd;
  justify-content: center;
}

.post__title {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(2.3rem, 4.2vw, 3.4rem);
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.15;
  margin: 0 0 24px 0;
  letter-spacing: -0.02em;
  text-transform: none;
  max-width: 100%;
  text-align: center;
}

.post__text {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1.08rem;
  line-height: 1.8;
  color: #1a1a1a;
  margin: 0;
  column-count: 2;
  column-gap: 36px;
  column-rule: 1px solid rgba(0,0,0,0.15);
  text-align: justify;
  hyphens: auto;
  column-fill: balance;
}

.post__text::first-letter {
  font-size: 2.6rem;
  line-height: 1;
  font-weight: 700;
  color: #000;
  font-family: 'Times New Roman', serif;
}

.post__text ul {
  margin: 16px 0;
  padding-left: 28px;
  break-inside: avoid-column;
}

.post__text li {
  margin: 8px 0;
  font-size: 1.35rem;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .post__sheet {
    width: 90vw;
    min-height: auto;
  }
  
  .post__page {
    padding: 48px 36px;
  }
}

@media (max-width: 640px) {
  .post__sheet {
    width: 95vw;
  }
  
  .post__page {
    padding: 32px 24px;
  }

  .post__text {
    column-count: 1;
    column-rule: none;
    font-size: 1rem;
  }
  
  .post__title {
    font-size: 1.8rem;
  }
}

/* --- Sidebar --- */
.blog__sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog__sidebar-title {
  font-family: var(--font-hand);
  font-size: 1.1rem;
  color: var(--purple-dark);
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.01em;
}

.blog__related-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog__related-item {
  padding: 16px 0;
  border-left: 3px solid var(--pink);
  padding-left: 12px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.blog__related-item:hover {
  transform: translateX(4px);
}

.blog__related-title {
  font-family: 'Times New Roman', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.blog__related-author {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
}

.blog__related-item-title {
  font-family: var(--font-hand);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
}

.blog__topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.blog__back-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
  z-index: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.blog__back-btn:hover { color: var(--purple-dark); }

.blog__topbar-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Dancing Script', 'Cormorant Garamond', cursive;
  font-size: 3rem;
  color: #000;
  font-weight: 300;
  letter-spacing: 0.02em;
  font-style: normal;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

.blog__topbar-spacer { width: 36px; }

/* --- Feed layout --- */
.blog__feed-layout {
  max-width: 2000px;
  margin: 0 auto;
  padding: 0 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* --- Composer card (IG "create post") --- */
.blog__composer-card {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 16px;
  align-items: flex-start;
}

.blog__composer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}

.blog__composer-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.blog__composer-title {
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 8px 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  background: transparent;
  outline: none;
  transition: border-color 0.2s;
}
.blog__composer-title:focus {
  border-bottom-color: var(--purple);
}
.blog__composer-title::placeholder {
  color: #aaa;
  font-weight: 400;
}

.blog__composer-body {
  border: none;
  padding: 8px 0;
  font-family: var(--font-hand);
  font-size: 1rem;
  background: transparent;
  outline: none;
  resize: none;
  min-height: 60px;
  line-height: 1.5;
}
.blog__composer-body::placeholder {
  color: #bbb;
}

.blog__composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.blog__share-btn {
  padding: 8px 24px;
  font-size: 0.85rem;
}

.blog__status {
  font-size: 0.82rem;
  color: var(--pink-dark);
  font-family: var(--font-hand);
}

/* --- Feed (post list) --- */
.blog__feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* --- Individual post card (IG style) --- */
.post {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  overflow: hidden;
}

.post__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.post__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-light), var(--purple-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--purple-dark);
  text-transform: uppercase;
  flex-shrink: 0;
}

.post__author {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
}

.post__time {
  margin-left: auto;
  font-size: 0.75rem;
  color: #999;
}

.post__body {
  padding: 0 16px 12px;
}

.post__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.post__text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.post__text a {
  color: var(--purple-dark);
}

/* --- Actions bar (like, comment, share icons) --- */
.post__action-bar {
  display: none;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.post__action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text);
  padding: 4px;
  transition: transform 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.post__action-btn:hover {
  transform: scale(1.15);
}
.post__action-btn.liked {
  color: #ed4956;
}
.post__action-btn .action-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.post__delete-btn {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.78rem;
  color: #999;
  transition: color 0.2s;
}
.post__delete-btn:hover {
  color: #ed4956;
}

/* --- Comments section --- */
.post__comments {
  display: none;
  padding: 0 16px 8px;
  max-height: 200px;
  overflow-y: auto;
}

.post__comment {
  padding: 6px 0;
  font-size: 0.88rem;
  line-height: 1.4;
  border-bottom: 1px solid rgba(0,0,0,0.03);
}
.post__comment:last-child { border-bottom: none; }

.post__comment-author {
  font-weight: 700;
  color: var(--text);
  margin-right: 6px;
  font-size: 0.84rem;
}

.post__comment-body {
  color: var(--text-muted);
}

.post__comment-time {
  font-size: 0.7rem;
  color: #bbb;
  margin-top: 2px;
}

/* --- Comment input --- */
.post__comment-form {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.post__comment-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-hand);
  font-size: 0.92rem;
  padding: 6px 0;
  background: transparent;
}
.post__comment-input::placeholder {
  color: #bbb;
}

.post__comment-submit {
  background: none;
  border: none;
  color: var(--purple-dark);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.post__comment-submit:hover {
  opacity: 1;
}

/* --- Admin Panel --- */
.admin { margin-top: 28px; }
.admin[aria-hidden="true"] { display: none; }

.admin__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.admin__header h3 {
  font-family: var(--font-heading);
  color: var(--purple-dark);
  margin-bottom: 0;
}

.admin__badge {
  background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 100%);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin__section {
  margin-bottom: 12px;
  border: 1.5px solid rgba(201,168,247,0.18);
  border-radius: 16px 18px 14px 20px;
  overflow: hidden;
  background: rgba(255,255,255,0.8);
}

.admin__section summary {
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  background: rgba(201,168,247,0.08);
  color: var(--purple-dark);
  font-family: var(--font-hand);
  transition: background 0.2s;
}
.admin__section summary:hover { background: rgba(201,168,247,0.15); }

.admin__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.admin__form label {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--purple-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-hand);
}

.admin__form input,
.admin__form textarea {
  padding: 10px 14px;
  border-radius: 14px 16px 12px 18px;
  border: 1.5px solid rgba(201,168,247,0.25);
  font-size: 0.9rem;
  font-family: var(--font-hand);
  background: #fefcff;
  resize: vertical;
}
.admin__form input:focus,
.admin__form textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(201,168,247,0.15);
}

.admin__status {
  display: block;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--pink-dark);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__text { max-width: 100%; margin-left: 0; }
  .hero__actions { justify-content: center; }
  .hero__illustration { order: -1; justify-content: center; }
  .hero__books { width: 300px; }

  .sticky-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin: 0 auto;
  }
  .steps-grid--5 {
    grid-template-columns: 1fr;
    max-width: 460px;
  }
  .steps-grid--5 .step-card:nth-child(1),
  .steps-grid--5 .step-card:nth-child(2),
  .steps-grid--5 .step-card:nth-child(3),
  .steps-grid--5 .step-card:nth-child(4),
  .steps-grid--5 .step-card:nth-child(5) {
    grid-column: auto;
  }

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

@media (max-width: 520px) {
  :root {
    --section-py: 48px;
    --gutter: 16px;
  }

  .nav-pills { gap: 6px; }
  .btn--pill { font-size: 0.78rem; padding: 6px 14px; }

  .site-header__logo-img { width: 340px; }

  .sticky-grid { gap: 12px; }
  .sticky-card { padding: 24px 10px 20px; }
  .sticky-card__icon { font-size: 1.8rem; }
  .sticky-card__label { font-size: 1.1rem; }

  .step-card { padding: 28px 20px 24px; }
}

/* Hide marketplace from header when hidden attribute present */
.market-control[hidden] {
  display: none !important;
}

/* ============================================================
   HOME PAGE — LATEST BLOG PREVIEW
   ============================================================ */
.home-blog-preview {
  padding: var(--space-6) var(--gutter) var(--space-8);
  margin-top: -2rem;
}

.home-blog-preview__inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.home-blog-preview__card {
  background: #faf8f3;
  border: 1.5px solid rgba(201,168,247,0.22);
  border-radius: 18px 22px 20px 24px;
  padding: 36px 40px;
  margin: 28px auto 24px;
  max-width: 700px;
  box-shadow:
    0 4px 20px rgba(60,40,80,0.07),
    inset 0 0 30px rgba(252,228,236,0.15);
  position: relative;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.home-blog-preview__card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 32px rgba(60,40,80,0.12),
    inset 0 0 30px rgba(252,228,236,0.15);
}

.home-blog-preview__card::before {
  content: '"';
  position: absolute;
  top: -8px;
  left: 24px;
  font-family: 'Georgia', serif;
  font-size: 4rem;
  line-height: 1;
  color: var(--pink);
  opacity: 0.4;
}

.home-blog-preview__title {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.home-blog-preview__meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.home-blog-preview__snippet {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1rem;
  line-height: 1.75;
  color: #444;
  margin: 0;
}

.home-blog-preview__cta {
  margin-top: 20px;
}

@media (max-width: 640px) {
  .home-blog-preview__card {
    padding: 24px 20px;
  }
  .home-blog-preview__title {
    font-size: 1.15rem;
  }
  .home-blog-preview__snippet {
    font-size: 0.92rem;
  }
}

/* ============================================================
   BLOG PAGE — ARCHIVE SECTION WITH ARROW NAVIGATION
   ============================================================ */
.blog__archive {
  max-width: 780px;
  margin: 36px auto 60px;
  padding: 0 40px;
}

.blog__engagement {
  max-width: 640px;
  width: 100%;
  margin: 12px auto 0;
  padding: 0 40px;
}

.post__engagement-block {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.post__engagement-block .post__action-panel {
  border-top: none;
}

.post__engagement-block .post__action-btn {
  font-size: 1.45rem;
  padding: 7px 10px;
}

.post__engagement-block .post__action-btn .action-count {
  font-size: 0.92rem;
}

.post__engagement-block .post__comment-section[hidden] {
  display: none !important;
}

.post__engagement-block .post__comment-section:not([hidden]) {
  display: block;
}

.post__engagement-block .post__comment-section .post__comments {
  display: block;
}

.post__engagement-block .post__comment-section .post__comment-form {
  display: flex;
}

.blog__archive-header {
  text-align: center;
  margin-bottom: 28px;
}

.blog__archive-heading {
  font-family: 'Dancing Script', 'Cormorant Garamond', cursive;
  font-size: 2rem;
  color: #1a1a1a;
  margin: 0;
  font-weight: 600;
}

/* --- Carousel wrapper with arrows --- */
.blog__archive-carousel {
  display: flex;
  align-items: center;
  gap: 16px;
}

.blog__archive-arrow {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(201,168,247,0.3);
  background: rgba(255,255,255,0.85);
  font-size: 1.8rem;
  line-height: 1;
  color: var(--purple-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 2px 10px rgba(60,40,80,0.08);
}
.blog__archive-arrow:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(247,168,196,0.25), rgba(201,168,247,0.25));
  border-color: var(--purple);
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(201,168,247,0.25);
}
.blog__archive-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

/* --- Article buttons row --- */
.blog__archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 200px));
  gap: 14px;
  justify-content: center;
  align-items: stretch;
}

/* --- Individual article button (auto-sizes to title) --- */
.blog__archive-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 20px;
  background: #faf8f3;
  border: 1.5px solid rgba(201,168,247,0.22);
  border-radius: 18px 14px 16px 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(60,40,80,0.05);
  text-align: left;
  width: 200px;
  max-width: 100%;
  min-height: 84px;
}
.blog__archive-btn:hover {
  background: linear-gradient(135deg, rgba(252,228,236,0.5), rgba(237,228,252,0.5));
  border-color: var(--pink);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(60,40,80,0.1);
}

.blog__archive-btn-title {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
  white-space: normal;
}

.blog__archive-btn-date {
  font-family: var(--font-hand);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.blog__archive-empty {
  width: 100%;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1rem;
  color: var(--text-muted);
  padding: 30px 0;
  font-style: italic;
}

/* --- Search bar in topbar --- */
.blog__search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.blog__search-input {
  width: 220px;
  padding: 8px 36px 8px 14px;
  border: 1.5px solid rgba(201,168,247,0.3);
  border-radius: 22px;
  font-family: var(--font-hand);
  font-size: 0.9rem;
  background: rgba(255,255,255,0.85);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, width 0.3s;
  color: var(--text);
}
.blog__search-input::placeholder {
  color: #bbb;
  font-style: italic;
}
.blog__search-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(201,168,247,0.15);
  width: 280px;
}

.blog__search-icon {
  position: absolute;
  right: 12px;
  font-size: 0.95rem;
  pointer-events: none;
  opacity: 0.5;
}

@media (max-width: 768px) {
  .blog__engagement {
    padding: 0 20px;
  }
  .blog__archive {
    padding: 0 20px;
    margin: 60px auto 40px;
  }
  .blog__archive-grid {
    grid-template-columns: repeat(2, minmax(160px, 200px));
  }
  .blog__archive-carousel {
    gap: 8px;
  }
  .blog__archive-arrow {
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
  }
  .blog__archive-grid {
    gap: 8px;
  }
  .blog__search-input {
    width: 160px;
  }
  .blog__search-input:focus {
    width: 200px;
  }
}

@media (max-width: 560px) {
  .blog__archive-grid {
    grid-template-columns: minmax(160px, 200px);
    justify-content: center;
  }
}

/* ============================================================
   BOOKSHELF PAGE (standalone)
   ============================================================ */
.bookshelf-standalone {
  background-color: var(--cream);
  min-height: 100vh;
}

.bs-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--gutter) 60px;
}

.bs-page__topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0 12px;
  border-bottom: 2px solid rgba(201,168,247,0.15);
  margin-bottom: 20px;
}

.bs-page__back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--purple-light);
  color: var(--purple-dark);
  font-size: 1.4rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.bs-page__back-btn:hover {
  background: var(--pink-light);
  color: var(--pink-dark);
  transform: scale(1.08);
}

.bs-page__title {
  font-family: var(--font-script);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--pink-dark);
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.02em;
}

.bs-page__subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.65;
  font-family: var(--font-hand);
  font-size: 1.1rem;
}

.bs-loading {
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-hand);
  font-size: 1.1rem;
  padding: 40px 0;
}

.bs-shelf-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bs-shelf {
  position: relative;
  padding: 28px 20px 0;
  min-height: 260px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(160,110,60,0.06) 0px,
      transparent 2px,
      transparent 18px,
      rgba(160,110,60,0.04) 20px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(140,95,50,0.03) 0px,
      transparent 1px,
      transparent 6px
    ),
    linear-gradient(
      180deg,
      #dfc49c 0%,
      #d4b68a 30%,
      #c9a574 60%,
      #c19e6c 100%
    );
  border-radius: 4px 4px 0 0;
}

.bs-shelf::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px 4px 0 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='wg'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.03 0.15' numOctaves='6' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23wg)' opacity='0.12'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: overlay;
}

.bs-shelf-ledge {
  height: 22px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(160,110,60,0.08) 0px,
      transparent 2px,
      transparent 14px,
      rgba(160,110,60,0.05) 16px
    ),
    linear-gradient(
      180deg,
      #b8905c 0%,
      #a07844 20%,
      #8e6a38 60%,
      #7d5e30 100%
    );
  border-radius: 0 0 6px 6px;
  box-shadow:
    0 4px 12px rgba(80,50,20,0.25),
    inset 0 1px 0 rgba(255,255,255,0.15);
  position: relative;
}

.bs-shelf-ledge::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.08),
    rgba(255,255,255,0.2) 50%,
    rgba(255,255,255,0.08)
  );
  border-radius: 0 0 6px 6px;
}

.bs-books-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding-bottom: 10px;
}

.bs-book {
  width: 140px;
  cursor: pointer;
  perspective: 600px;
  transition: transform 0.3s ease;
  position: relative;
  flex-shrink: 0;
}

.bs-book:hover {
  transform: translateY(-8px);
}

.bs-book__cover-wrap {
  position: relative;
  width: 140px;
  height: 200px;
  border-radius: 3px 8px 8px 3px;
  overflow: hidden;
  box-shadow:
    -4px 4px 12px rgba(60,40,20,0.25),
    inset -2px 0 4px rgba(0,0,0,0.08);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  transform-origin: left center;
  transform-style: preserve-3d;
}

.bs-book:hover .bs-book__cover-wrap {
  transform: rotateY(-18deg) scale(1.04);
  box-shadow:
    -8px 8px 20px rgba(60,40,20,0.35),
    inset -2px 0 4px rgba(0,0,0,0.1);
}

.bs-book__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.3s;
}

.bs-book:hover .bs-book__cover {
  filter: brightness(1.05);
}

.bs-book__cover-wrap::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(90deg,
    rgba(0,0,0,0.15),
    rgba(0,0,0,0.04) 40%,
    rgba(255,255,255,0.08)
  );
  z-index: 2;
}

.bs-book__cover-wrap::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 4px;
  bottom: 4px;
  width: 6px;
  background: repeating-linear-gradient(
    180deg,
    #f5f0e8 0px,
    #e8e0d4 1px,
    #f5f0e8 2px
  );
  border-radius: 0 2px 2px 0;
  box-shadow: 1px 0 2px rgba(0,0,0,0.08);
  z-index: 1;
}

.bs-book__title {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--text);
  text-align: center;
  margin-top: 8px;
  line-height: 1.3;
  font-weight: 600;
}

.bs-book__author {
  font-family: var(--font-hand);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 2px;
}

.bs-book--coming .bs-book__cover-wrap {
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--pink-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bs-book--coming .bs-book__cover-placeholder {
  font-family: var(--font-hand);
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  padding: 12px;
}

.bs-book--coming {
  cursor: default;
  opacity: 0.7;
}

.bs-book--coming:hover {
  transform: none;
}

.bs-book--coming:hover .bs-book__cover-wrap {
  transform: none;
  box-shadow:
    -4px 4px 12px rgba(60,40,20,0.25),
    inset -2px 0 4px rgba(0,0,0,0.08);
}

.bs-blurb {
  margin-top: 24px;
  margin-bottom: 8px;
  padding: 20px 24px;
  background: rgba(255,255,255,0.92);
  border-radius: 16px 18px 14px 20px;
  border: 1.5px solid rgba(201,168,247,0.2);
  box-shadow: 0 4px 16px rgba(60,40,80,0.06);
  animation: bs-blurb-in 0.35s ease;
  position: relative;
  z-index: 1;
}

@keyframes bs-blurb-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.bs-blurb__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.bs-blurb__thumb {
  width: 56px;
  height: 80px;
  object-fit: cover;
  border-radius: 3px 6px 6px 3px;
  box-shadow: -2px 2px 8px rgba(60,40,20,0.15);
  flex-shrink: 0;
}

.bs-blurb__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--purple-dark);
  font-weight: 700;
  margin: 0;
}

.bs-blurb__author {
  font-family: var(--font-hand);
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.bs-blurb__text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.65;
  margin: 0 0 12px;
}

.bs-blurb__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--pink-dark);
  text-decoration: none;
  border-bottom: 2px solid rgba(212,96,138,0.3);
  transition: border-color 0.2s, color 0.2s;
}

.bs-blurb__link:hover {
  border-bottom-color: var(--pink-dark);
  color: var(--purple-dark);
}

.bs-blurb__close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.bs-blurb__close:hover {
  background: var(--pink-light);
  color: var(--pink-dark);
}

@media (max-width: 768px) {
  .bs-shelf {
    padding: 20px 12px 0;
    min-height: 220px;
  }
  .bs-book { width: 110px; }
  .bs-book__cover-wrap { width: 110px; height: 160px; }
  .bs-books-row { gap: 14px; }
}

@media (max-width: 480px) {
  .bs-book { width: 90px; }
  .bs-book__cover-wrap { width: 90px; height: 130px; }
  .bs-books-row { gap: 10px; }
  .bs-blurb { padding: 14px 16px; }
}

/* Bottom scribble */
.pastel-sidebar__scribble {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

/* Responsive: on small screens make sidebar smaller */
@media (max-width: 600px) {
  .pastel-sidebar__inner {
    width: 190px;
    padding: 14px 12px 10px;
  }
  .pastel-sidebar__toggle {
    width: 38px;
    height: 66px;
    right: -38px;
  }
  .pastel-sidebar__btn {
    padding: 8px 10px;
    gap: 8px;
  }
  .pastel-sidebar__btn-text {
    font-size: 0.85rem;
  }
  .pastel-sidebar__title {
    font-size: 1.1rem;
  }
  .pastel-sidebar__crayons svg {
    width: 12px;
    height: 54px;
  }
}

/* ============================================================
   ADMIN — BLOG FAB & EDITOR MODAL
   ============================================================ */

/* --- Floating Action Button (New Article) --- */
.blog-fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 900;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--purple) 0%, #a87adb 100%);
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(124,77,182,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.blog-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(124,77,182,0.45);
}
.blog-fab__icon {
  line-height: 1;
  font-weight: 300;
}

/* --- Post admin action buttons (Edit / Delete on each article) --- */
.post__admin-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.post__admin-btn {
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-family: var(--font-hand);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.post__admin-btn--edit {
  background: rgba(201,168,247,0.15);
  color: var(--purple-dark, #6a3fa0);
}
.post__admin-btn--edit:hover {
  background: rgba(201,168,247,0.35);
}

.post__admin-btn--delete {
  background: rgba(220,80,80,0.1);
  color: #b33;
}
.post__admin-btn--delete:hover {
  background: rgba(220,80,80,0.25);
}

/* --- Editor modal backdrop --- */
.editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.editor-backdrop[aria-hidden="true"] {
  display: none;
}

/* --- Editor modal card --- */
.editor-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 12px 48px rgba(0,0,0,0.2);
  animation: editorSlideIn 0.25s ease-out;
}

@keyframes editorSlideIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.editor-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.editor-modal__title {
  font-family: 'Dancing Script', cursive;
  font-size: 1.5rem;
  color: var(--purple-dark, #6a3fa0);
  margin: 0;
}

.editor-modal__close {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s;
}
.editor-modal__close:hover { color: #333; }

.editor-modal__form {
  padding: 16px 24px 24px;
}

.editor-modal__field {
  margin-bottom: 16px;
}

.editor-modal__label {
  display: block;
  font-family: var(--font-hand);
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}

.editor-modal__input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid rgba(201,168,247,0.3);
  border-radius: 10px;
  font-family: var(--font-hand);
  font-size: 0.95rem;
  background: #fafafa;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.editor-modal__input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(201,168,247,0.15);
}

/* --- Editor formatting toolbar --- */
.editor-modal__toolbar {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.editor-modal__fmt-btn {
  background: #f5f0fa;
  border: 1px solid rgba(201,168,247,0.25);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s;
  font-family: var(--font-hand);
  color: #555;
}
.editor-modal__fmt-btn:hover {
  background: rgba(201,168,247,0.25);
  color: var(--purple-dark, #6a3fa0);
}

.editor-modal__textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid rgba(201,168,247,0.3);
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  background: #fafafa;
  outline: none;
  resize: vertical;
  min-height: 200px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.editor-modal__textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(201,168,247,0.15);
}

.editor-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.editor-modal__status {
  font-family: var(--font-hand);
  font-size: 0.85rem;
  color: #7a5abf;
}

.editor-modal__actions {
  display: flex;
  gap: 10px;
}

/* --- Mobile adjustments --- */
@media (max-width: 600px) {
  .blog-fab {
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
    font-size: 1.6rem;
  }
  .editor-modal {
    max-width: 100%;
    border-radius: 12px;
  }
  .editor-modal__form {
    padding: 12px 16px 20px;
  }
  .post__admin-actions {
    flex-wrap: wrap;
  }
}