/* Her blog, in her own colours. Only the /blog pages load this (src/blog.js), after app.css.
   The rest of christabel.app keeps its editorial look. Her blog is the streamer's own room, so it
   wears her stream's identity: the overlay's pinks on plum-black (christabel-stardew
   stage/stage.html), her e-girl ghost stickers, a pixel heart in the colour of her mood after each
   title where the site puts one of her dots, and lowercase headings. The colour tokens are the
   site's own, set again here, so the nav, the band of her dots, the rules and the footer follow. */

:root.her-blog {
  --page: #fff4f9;
  --ink: #22091b;
  --muted: #7d4768;
  --line: #f6bfd8;
  --surface: #ffe3ef;
  /* Her five colours, made sweeter: the mood a post was written in picks one. */
  --rose: #ff3d9a;
  --amber: #f2a900;
  --violet: #a46bff;
  --teal: #13b48f;
  --coral: #ff6a5e;
  --focus: #c42a6f;
  --press: #c42a6f;
}
/* Lights off: the plum-black of her overlay, the same pinks a little brighter. */
:root.her-blog[data-lights="off"] {
  --page: #140912;
  --ink: #ffeef7;
  --muted: #e6a9cb;
  --line: #45213f;
  --surface: #241124;
  --rose: #ff74b8;
  --amber: #ffd166;
  --violet: #c7a1ff;
  --teal: #5fe3c0;
  --coral: #ff8f7d;
  --focus: #ff9ccf;
  --press: #ff9ccf;
}
@media (prefers-color-scheme: dark) {
  :root.her-blog:not([data-lights]) {
    --page: #140912;
    --ink: #ffeef7;
    --muted: #e6a9cb;
    --line: #45213f;
    --surface: #241124;
    --rose: #ff74b8;
    --amber: #ffd166;
    --violet: #c7a1ff;
    --teal: #5fe3c0;
    --coral: #ff8f7d;
    --focus: #ff9ccf;
    --press: #ff9ccf;
  }
}
:root.her-blog { background: var(--page); }
.her-blog ::selection { background: var(--rose); color: #fff; }

/* Lowercase, the way she types. Her posts' own text keeps the case she wrote it in. */
.her-blog .blog-head h1, .her-blog .blog h2, .her-blog .post-head h1, .her-blog .lost h1,
.her-blog .post-steps strong, .her-blog .chapter-name, .her-blog .chapter-note, .her-blog .blog-when, .her-blog .post-side { text-transform: lowercase; }

/* The pixel heart after a title, in the colour of how she felt; the same heart marks a mood. */
.heart { display: inline-block; width: .5em; height: calc(.5em * 6 / 7); margin-left: .16em; color: var(--rose); fill: currentColor; }
.heart.teal { color: var(--teal); } .heart.coral { color: var(--coral); } .heart.amber { color: var(--amber); } .heart.violet { color: var(--violet); }
.blog-key .heart, .post-side .heart, .post-sign .heart { width: 14px; height: 12px; margin: 0 7px 0 0; }

/* Her stickers: the ghost from her stream, a reaction for each mood, slapped on at an angle. Each
   plays twice and rests; with reduced motion asked for, the page shows a still of it instead. */
.sticker { display: block; flex: none; width: 96px; height: 96px; transform: rotate(-6deg); transition: transform .45s var(--ease); }
.sticker img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.sticker.big { width: 192px; height: 192px; transform: rotate(7deg); }

/* The index: hello, then her posts down a stitched line, each with the sticker of its mood. */
.blog-hello { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 36px); }
.blog-hello h1 { flex: 0 1 auto; }
.her-blog .blog-list { border-top: 3px solid var(--rose); }
.her-blog .blog-entry { align-items: start; border-bottom: 2px dashed var(--line); }
.blog-tag { display: flex; flex-direction: column; gap: 14px; }
.blog-entry:nth-child(even) .sticker { transform: rotate(5deg); }
.blog-entry:hover .sticker, .blog-entry:focus-within .sticker { transform: rotate(-11deg) scale(1.08); }
.her-blog .blog h2 a:hover, .her-blog .blog h2 a:focus-visible { text-decoration: underline wavy var(--rose) 2px; text-underline-offset: 9px; }
.her-blog .blog-key .mood { color: var(--ink); }

/* One post: her sticker over the record of the moment, and her sign-off with a heart. */
.post-aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 22px; }
.her-blog .post-side { position: static; }
.post-aside .sticker.big { margin-left: -12px; }
.her-blog .post-text .post-sign { display: flex; align-items: baseline; }
.her-blog .post-steps { border-top: 3px solid var(--rose); }
.her-blog .lost .sticker { margin-bottom: 18px; }

@media (max-width: 999px) {
  .blog-hello { align-items: flex-start; }
  .sticker.big { width: 96px; height: 96px; }
  .blog-tag { flex-direction: row; align-items: center; gap: 12px; }
  .blog-tag .sticker { width: 48px; height: 48px; }
  .blog-tag .sticker img { image-rendering: auto; }
  .post-aside { position: static; flex-direction: row; align-items: center; gap: 16px; }
  .post-aside .sticker.big { margin-left: 0; }
  .post-aside .post-side { flex: 1; }
}
@media (max-width: 520px) {
  .blog-hello { flex-direction: column-reverse; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .sticker { transition: none; }
}
