/* Gina's Dollhouse: playful pastel dollhouse theme (original artwork, self-hosted fonts, no JavaScript) */
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito-italic.woff2") format("woff2"); font-weight: 200 1000; font-style: italic; font-display: swap; }

:root {
  --ink: #3a1f66;
  --ink-soft: #66468f;
  --bg: #fbf3ff;
  --pink: #ff7ab8;      --pink-soft: #ffe0ef;   --pink-deep: #b3236b;
  --purple: #8f5fe8;    --purple-soft: #eadfff; --purple-deep: #4b2a8f;
  --teal: #35c8bb;      --teal-soft: #d2f6f2;   --teal-deep: #0b6e66;
  --sun: #ffc247;       --sun-soft: #fff0c2;    --sun-deep: #8a5a00;
  --lilac: #e9dcff;     --lilac-soft: #f5eeff;  --lilac-deep: #4b2a8f;
  --wall: #6b3fc4;
  --display: "Fredoka", "Baloo 2", "Comic Sans MS", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 22px;
  --shadow: 0 6px 0 rgba(75, 42, 143, .18), 0 14px 24px rgba(75, 42, 143, .12);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(circle at 20px 20px, rgba(255, 122, 184, .18) 3px, transparent 4px) 0 0 / 60px 60px,
    radial-gradient(circle at 50px 50px, rgba(53, 200, 187, .16) 3px, transparent 4px) 0 0 / 60px 60px,
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple-deep); text-underline-offset: 3px; }
a:hover { color: var(--pink-deep); }
:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); color: #000; padding: 10px 16px; border-radius: 12px; z-index: 100; }
.skip:focus { left: 8px; }
.center { text-align: center; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .55rem clamp(1rem, 4vw, 2.5rem);
  background: linear-gradient(180deg, #8f5fe8, #7b4fd6);
  border-bottom: 5px solid var(--pink);
  box-shadow: 0 4px 14px rgba(75, 42, 143, .3);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: #fff; }
.logo { width: 46px; height: 43px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; font-family: var(--display); font-weight: 600; font-size: 1.45rem; }
.brand-text small { font-size: .8rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: #ffe0ef; }
.site-nav { margin-left: auto; display: flex; gap: .4rem; flex-wrap: wrap; }
.site-nav a {
  font-family: var(--display); font-weight: 500; font-size: 1rem; text-decoration: none; color: var(--ink);
  padding: .45rem .95rem; border-radius: 999px; border: 3px solid #fff; min-height: 40px;
  display: inline-flex; align-items: center; transition: transform .15s;
}
.site-nav a:hover { transform: translateY(-2px) rotate(-2deg); color: var(--ink); }
.nav-pink { background: var(--pink-soft); } .nav-teal { background: var(--teal-soft); }
.nav-purple { background: var(--purple-soft); } .nav-sun { background: var(--sun-soft); } .nav-lilac { background: #fff; }
.site-nav a[aria-current="page"] { box-shadow: 0 0 0 3px var(--sun); }

/* ------------------------------------------------------------------ hero */
.hero { text-align: center; padding: clamp(2rem, 6vw, 4rem) 1.2rem 1.6rem; }
.kicker { font-family: var(--display); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; font-size: 1rem; color: var(--pink-deep); margin: 0 0 .3rem; }
.hero h1 {
  font-family: var(--display); font-weight: 700; margin: 0 0 .6rem; line-height: 1;
  font-size: clamp(3rem, 12vw, 6rem); color: var(--pink);
  text-shadow: 3px 3px 0 #fff, -3px 3px 0 #fff, 3px -3px 0 #fff, -3px -3px 0 #fff, 0 7px 0 var(--purple-deep);
}
.hero h1 span { color: var(--purple); display: block; }
.lede { font-size: clamp(1.15rem, 3vw, 1.5rem); font-weight: 600; max-width: 28ch; margin: 0 auto; }

/* ----------------------------------------------------------------- house */
.house { max-width: 760px; margin: 0 auto 3rem; padding: 0 clamp(.6rem, 3vw, 1rem); }
.roof { display: block; width: 100%; height: clamp(70px, 16vw, 130px); margin-bottom: -4px; filter: drop-shadow(0 6px 0 rgba(75, 42, 143, .2)); }
.floor {
  position: relative; display: grid; grid-template-columns: clamp(84px, 22%, 150px) 1fr; align-items: center; gap: 1rem;
  padding: 1.1rem 1.2rem; border: 6px solid var(--wall); border-top-width: 0; border-bottom-width: 6px;
  transition: transform .2s;
}
.floor:first-of-type { border-top-width: 0; }
.floor:hover { transform: scale(1.015) rotate(-.4deg); z-index: 2; }
.floor-badge {
  display: inline-block; margin: 0 0 .3rem; padding: .1rem .8rem; font-family: var(--display); font-weight: 600; font-size: .95rem;
  background: #fff; color: var(--ink); border-radius: 999px; border: 3px solid currentColor;
}
.floor h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.4rem, 5vw, 2rem); line-height: 1.15; margin: 0 0 .25rem; }
.floor h2 a { color: inherit; text-decoration: none; }
.floor h2 a::after { content: ""; position: absolute; inset: 0; } /* whole room is clickable */
.floor p { margin: 0 0 .3rem; }
.room-status { font-size: 1rem; font-weight: 700; }
.room-art { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; background: rgba(255, 255, 255, .75); border-radius: 50%; border: 5px solid #fff; box-shadow: inset 0 0 0 4px currentColor; }
.room-icon { font-size: clamp(2.4rem, 9vw, 4rem); line-height: 1; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .12)); }
.room-pink  { color: var(--pink-deep);   background: repeating-linear-gradient(90deg, var(--pink-soft) 0 28px, #ffcfe6 28px 56px); }
.room-teal  { color: var(--teal-deep);   background: radial-gradient(circle at 14px 14px, #fff 4px, transparent 5px) 0 0 / 38px 38px, var(--teal-soft); }
.room-purple{ color: var(--purple-deep); background: repeating-linear-gradient(45deg, var(--purple-soft) 0 20px, #dccbff 20px 40px); }
.room-sun   { color: var(--sun-deep);    background: radial-gradient(circle at 20px 20px, #ffd978 5px, transparent 6px) 0 0 / 46px 46px, var(--sun-soft); }
.room-lilac { color: var(--lilac-deep);  background: linear-gradient(180deg, #f5eeff, #e9dcff); }
.attic { border-top-width: 6px; }
.room-pink h2 a, .room-teal h2 a, .room-purple h2 a, .room-sun h2 a, .room-lilac h2 a { color: inherit; }
.doorstep { position: relative; height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; border: 6px solid var(--wall); border-top: 0; background: linear-gradient(180deg, #ffe9a8, #ffd87a); border-radius: 0 0 24px 24px; }
.door { position: absolute; bottom: 24px; width: 64px; height: 86px; background: var(--pink); border: 5px solid var(--wall); border-radius: 32px 32px 0 0; }
.door::after { content: ""; position: absolute; right: 10px; top: 46px; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); border: 2px solid var(--wall); }
.mat { position: relative; margin-bottom: 4px; padding: 0 1rem; font-family: var(--display); font-weight: 600; font-size: .95rem; color: var(--purple-deep); background: #fff; border-radius: 8px; border: 3px solid var(--purple); }

/* ------------------------------------------------------------ list pages */
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.wrap.narrow { max-width: 760px; }
.page-hero { text-align: center; padding: clamp(2rem, 6vw, 3.5rem) 1.2rem 1.6rem; border-radius: 0 0 40px 40px; margin-bottom: 2rem; }
.hero-pink { background: var(--pink-soft); color: var(--pink-deep); } .hero-teal { background: var(--teal-soft); color: var(--teal-deep); }
.hero-purple { background: var(--purple-soft); color: var(--purple-deep); } .hero-sun { background: var(--sun-soft); color: var(--sun-deep); } .hero-lilac { background: var(--lilac); color: var(--lilac-deep); }
.page-hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 7vw, 3.2rem); line-height: 1.1; margin: .2rem 0 .4rem; }
.page-hero p { margin: 0; font-weight: 700; }
.page-hero .floor-badge { color: inherit; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 1.4rem; margin-bottom: 2rem; }
.card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: #fff;
  border: 5px solid; border-radius: var(--radius); padding: 1.2rem 1.3rem 1.1rem; box-shadow: var(--shadow); transition: transform .2s;
}
.card:hover { transform: translateY(-5px) rotate(-1deg); color: var(--ink); }
.c-pink { border-color: var(--pink); } .c-teal { border-color: var(--teal); } .c-purple { border-color: var(--purple); } .c-sun { border-color: var(--sun); } .c-lilac { border-color: var(--purple); }
.card-icon { font-size: 2.2rem; line-height: 1; }
.card h3 { font-family: var(--display); font-weight: 600; font-size: 1.45rem; line-height: 1.2; margin: .4rem 0 .2rem; }
.card p { margin: 0 0 .5rem; }
.meta { color: var(--ink-soft); font-size: 1rem; font-weight: 600; }
.book-line { font-style: italic; font-weight: 700; color: var(--purple-deep); }
.more { margin-top: auto; font-family: var(--display); font-weight: 600; color: var(--pink-deep); }
.empty { text-align: center; font-weight: 700; padding: 1.6rem; background: #fff; border: 5px dashed var(--pink); border-radius: var(--radius); margin-bottom: 2rem; }

.frame { padding: 10px; background: #fff; border-radius: 14px; border: 5px solid var(--purple); box-shadow: var(--shadow); transform: rotate(-1.2deg); }
.art-card:nth-child(even) .frame { transform: rotate(1.2deg); }
.frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 6px; background: #fff; } /* show the whole picture, tall or wide */
.frame.big { transform: none; }
.frame.big img { aspect-ratio: auto; object-fit: contain; max-height: 80vh; margin: 0 auto; }
.art-card { background: none; border: 0; box-shadow: none; padding: 0; }
.art-card h3 { margin-top: .8rem; }

/* ----------------------------------------------------------------- pieces */
.piece-head { text-align: center; padding: clamp(1.6rem, 5vw, 2.6rem) 1.2rem 1.4rem; border-radius: 0 0 40px 40px; margin: 0 -1rem 1.6rem; }
.piece-head h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 7vw, 3rem); line-height: 1.1; margin: .5rem 0 .3rem; }
.piece-head .meta { color: inherit; opacity: .85; margin: 0; }
.piece-head .book-line { color: inherit; font-size: 1.15rem; margin: 0 0 .3rem; }
.crumbs { margin: 0; font-family: var(--display); font-weight: 500; font-size: 1rem; }
.crumbs a { color: inherit; }
.paper {
  background: #fff; border-width: 5px; border-style: solid; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1.3rem, 5vw, 2.6rem); font-size: clamp(1.3rem, 3.6vw, 1.5rem); line-height: 1.85;
}
.prose p { margin: 0 0 1.1em; }
.prose h2, .prose h3 { font-family: var(--display); line-height: 1.2; color: var(--purple-deep); }
.prose blockquote { margin: 1.2em 0; padding: .3em 1.2em; border-left: 6px solid var(--pink); background: var(--pink-soft); border-radius: 0 14px 14px 0; font-style: italic; }
.prose code { font-family: var(--body); font-weight: 800; background: var(--sun-soft); padding: 0 .3em; border-radius: 6px; }
.prose img { border-radius: 12px; margin: 1.2em auto; }
.the-end { text-align: center; font-family: var(--display); font-weight: 600; font-size: 1.4rem; color: var(--pink-deep); margin: 1.6rem 0 0; }
.art-full { margin: 0 0 1.6rem; }
.art-full figcaption { text-align: center; font-weight: 700; margin-top: .8rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin: 1.6rem 0 3rem; flex-wrap: wrap; }

.btn {
  display: inline-block; font-family: var(--display); font-weight: 600; font-size: 1.15rem; text-decoration: none; text-align: center;
  color: #fff; background: linear-gradient(180deg, var(--pink), #f0509d); padding: .8rem 1.6rem; border-radius: 999px; min-height: 48px;
  border: 4px solid #fff; box-shadow: 0 5px 0 var(--pink-deep), 0 10px 18px rgba(179, 35, 107, .25); transition: transform .15s;
}
.btn:hover { transform: translateY(-2px); color: #fff; }
.btn.small { font-size: 1rem; padding: .55rem 1.1rem; min-height: 44px; background: linear-gradient(180deg, var(--purple), #7448d8); box-shadow: 0 4px 0 var(--purple-deep); }
.back-home { margin: 1rem 0 3rem; }

/* ---------------------------------------------------------------- footer */
.site-footer { text-align: center; padding: 2.5rem 1.2rem 4rem; background: var(--purple-soft); border-top: 5px solid var(--purple); }
.motto { font-family: var(--display); font-weight: 600; font-size: 1.6rem; color: var(--pink-deep); margin: 0 0 .5rem; }
.fine { margin: .3rem auto; max-width: 60ch; font-size: 1rem; font-weight: 600; }
.fine.small { font-size: .85rem; opacity: .85; font-weight: 500; }

/* ------------------------------------------------------ twinkling sparkles */
.sparkles { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.sp { position: absolute; font-size: 1.6rem; color: var(--pink); opacity: .55; animation: twinkle 3.4s ease-in-out infinite; }
.sp:nth-child(3n) { color: var(--teal); } .sp:nth-child(3n+1) { color: var(--sun); } .sp:nth-child(3n+2) { color: var(--purple); }
.s1 { left: 4%; top: 22%; } .s2 { left: 92%; top: 18%; animation-delay: -1s; } .s3 { left: 8%; top: 52%; animation-delay: -2s; }
.s4 { left: 94%; top: 48%; animation-delay: -.5s; } .s5 { left: 3%; top: 80%; animation-delay: -1.6s; } .s6 { left: 90%; top: 78%; animation-delay: -2.6s; }
.s7 { left: 20%; top: 12%; animation-delay: -.8s; } .s8 { left: 78%; top: 10%; animation-delay: -2.2s; } .s9 { left: 14%; top: 92%; animation-delay: -1.3s; } .s10 { left: 84%; top: 92%; animation-delay: -.2s; }
@keyframes twinkle { 0%, 100% { transform: scale(.7) rotate(0); opacity: .25; } 50% { transform: scale(1.2) rotate(18deg); opacity: .8; } }
main, .site-footer { position: relative; z-index: 2; }

/* --------------------------------------------------------- small screens */
@media (max-width: 640px) {
  body { font-size: 1.2rem; }
  .site-header { gap: .5rem; }
  .site-nav { margin-left: 0; width: 100%; justify-content: center; }
  .site-nav a { font-size: .95rem; padding: .4rem .8rem; }
  .floor { grid-template-columns: 74px 1fr; padding: .9rem .8rem; gap: .8rem; }
  .floor-badge { font-size: .85rem; }
  .sparkles { display: none; }
  .pager { flex-direction: column; }
  .pager .btn { width: 100%; }
  .piece-head { margin: 0 0 1.4rem; border-radius: 0 0 32px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sp { animation: none; opacity: .4; }
  .floor, .card, .btn, .site-nav a { transition: none; }
  .floor:hover, .card:hover { transform: none; }
}
@media print {
  .site-header, .sparkles, .site-footer, .pager, .skip, .back-home { display: none !important; }
  body { background: #fff; }
  .paper { box-shadow: none; border: 1px solid #999; }
}

.page-photo { margin: 2rem 0 0; text-align: center; }
.page-photo .frame { max-width: 520px; margin: 0 auto; }
.page-photo figcaption { margin-top: .8rem; font-weight: 700; color: var(--ink-soft); }

/* On phones the nav wraps to several rows, so a floating bar would cover the page title. Let it scroll away. */
@media (max-width: 760px) {
  html { scroll-padding-top: 12px; }
  .site-header { position: static; }
}

/* Question-and-answer pieces (front matter: format: qa). Each "###" is a question, the paragraph after it is the answer. */
.qa h3 {
  display: flex; align-items: flex-start; gap: .7rem; margin: 1.6em 0 .5em; font-size: 1.3rem; line-height: 1.35; color: var(--purple-deep);
}
.qa h3:first-child { margin-top: 0; }
.qa h3::before {
  content: "Q"; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem;
  border-radius: 50%; background: var(--purple); color: #fff; font-family: var(--display); font-weight: 700; font-size: 1.1rem;
}
.qa h3 + p {
  position: relative; margin: 0 0 .4em; padding: .7rem 1rem .7rem 3.4rem; background: var(--pink-soft); border-radius: 16px; line-height: 1.6;
}
.qa h3 + p::before {
  content: "A"; position: absolute; left: .7rem; top: .65rem; display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--pink); color: #fff; font-family: var(--display); font-weight: 700; font-size: 1.1rem;
}
@media (max-width: 640px) {
  .qa h3 { font-size: 1.15rem; }
  .qa h3 + p { padding-left: 3.2rem; }
}

.prose ol { padding-left: 1.4em; } .prose li { margin: .15em 0; }
