/* Small-window policy: preserve the full desktop canvas and allow horizontal
   scrolling instead of rearranging or compressing the original blog art.
   Historical narrow-screen rules below remain inactive on purpose. */
@font-face {
  font-family: "Basiic";
  src: url("/fonts/basiic-blog-vi-v2.ttf") format("truetype");
  font-display: swap;
}
/* babyangel.net blog — the new, minimal Melody listening room. */
@font-face {
  font-family: "RainyHearts";
  src: url("/fonts/rainyhearts-vietnamese.woff2") format("woff2");
  font-display: swap;
}
:root {
  --sidebar-width: 279px;
  --lace-height: 96px;
  --ink: #896677;
  font-family: Basiic, RainyHearts, "Courier New", sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { overflow-x: auto; }
body { background: #fff0d9; overflow-x: visible; min-width: 1360px; }
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px dashed #ac7589; outline-offset: 3px;
}
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}


#main-content:focus { outline: none; }

/* Brown bow lace overlays the continuous sidebar paper. */
.blog-lace-header {
  position: relative; z-index: 5; height: var(--lace-height);
  background: url("/theme/painted-brown-bow-lace.png") left -21px
              / 450px 150px repeat-x;
  pointer-events: none;
}
.site-layout {
  display: grid; grid-template-columns: var(--sidebar-width) minmax(0,1fr);
  /* Start the grid underneath the overlapping lace so the sidebar's
     painted paper continues all the way to the browser's top edge. */
  margin-top: calc(-1 * var(--lace-height));
  min-height: 100dvh;
}
.sidebar {
  background: #fff7ec url("/assets/blog/portrait/sidebar-milk-peach-checks.jpg")
              center top / 100% auto repeat-y;
  padding: calc(var(--lace-height) + 14px) 18px 24px; min-width: 0;
  position: relative;
  z-index: 2;
  /* Match the adjacent page height, including when the virtual browser
     is short. The old 835px floor left a blank strip beside the artwork. */
  min-height: 100dvh;
}
/* The text-only return sits at the lower center of the sidebar.
   No panel, button border, icon or background. */
.sidebar-back-neverland {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: block;
  width: max-content;
  max-width: calc(100% - 20px);
  color: #8a583b;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  font: 14px/1.25 Basiic,RainyHearts,"Courier New",sans-serif;
  text-decoration: none;
  white-space: nowrap;
}
.sidebar-back-neverland:hover { text-decoration: underline; }
.sidebar-back-neverland:focus-visible { outline: 2px dashed #ac7589; outline-offset: 4px; }
.portrait-frame {
  position: relative; width: 180px; height: 180px;
  display: grid; place-items: center; margin: 20px auto 23px;
}
.portrait-frame::after {
  content: ""; position: absolute; inset: -11.111111%;
  background: url("/assets/blog/portrait/avatar-melody-clear-frame.png") center / contain no-repeat;
  pointer-events: none; z-index: 2;
}
.portrait-frame img {
  display: block; position: relative; z-index: 1;
  width: 84.444444%; height: 84.444444%; object-fit: cover;
  object-position: center; border-radius: 50%; transform: translateY(2px);
}

/* The painted scene is a real player, not a screenshot of controls. */
main {
  position: relative; min-width: 0; margin-top: calc(var(--lace-height) - 36px);
  height: calc(100dvh - 60px);
}
.music-room {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  isolation: isolate; background: #ffedd2;
}
.music-room > .desk-painting {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: url("/theme/atelier-scene-8e71f4c2b9d6.jpg") center / 100% 100% no-repeat;
  pointer-events: none; user-select: none;
}
.scene-cutout {
  position: absolute; z-index: 3; overflow: hidden;
  padding: 0; margin: 0; border: 0; background: transparent;
  box-shadow: none; transform-origin: 50% 90%;
}
.scene-cutout > .cutout-painting {
  display: block; position: absolute; max-width: none;
  background-position: center; background-size: 100% 100%;
  background-repeat: no-repeat; user-select: none; pointer-events: none;
}
.radio-sway {
  pointer-events: none;
  /* Pivot at the radio's feet inside the padded painting. */
  transform-origin: 50% 86.36%;
}
.radio-sway > .cutout-painting { visibility: hidden; }
.radio-sway > .radio-button { pointer-events: auto; }
@media (prefers-reduced-motion: no-preference) {
  .music-room.is-playing .radio-sway {
    mask: url("/theme/radio-sway-mask.png") center / 100% 100% no-repeat;
    animation: radio-sway 1.4s ease-in-out infinite;
  }
  .music-room.is-playing .radio-sway > .cutout-painting { visibility: visible; }
}
@keyframes radio-sway {
  0%, 100% { transform: none; }
  25% { transform: translateY(-1px) rotate(-.20deg); }
  70% { transform: translateY(-1.8px) rotate(.23deg); }
}
.radio-button {
  cursor: pointer;
  /* Silhouette traced along the original painting, including the two
     inward corners where the lid meets the body. Percentages refer to
     the existing 12%/35%/29.5%/40% radio cutout, not to the whole room.
     This prevents brightened wallpaper from appearing beside the lid. */
  clip-path: polygon(1.916% 59.473%, 2.357% 58.740%, 2.357% 56.055%, 3.460% 52.393%, 4.123% 51.660%, 4.785% 49.707%, 5.447% 49.463%, 5.667% 48.242%, 6.550% 47.266%, 6.992% 47.266%, 9.198% 44.336%, 11.626% 42.871%, 12.730% 41.650%, 13.392% 41.650%, 13.612% 41.162%, 18.688% 38.721%, 18.688% 37.744%, 17.364% 37.256%, 16.481% 36.279%, 14.495% 36.035%, 14.054% 35.059%, 13.392% 34.814%, 13.392% 33.594%, 14.054% 33.350%, 14.054% 32.373%, 12.288% 28.711%, 12.288% 26.270%, 12.950% 22.119%, 13.833% 22.119%, 14.054% 21.631%, 15.599% 21.143%, 16.923% 18.701%, 18.026% 17.725%, 18.026% 17.236%, 19.571% 16.260%, 19.571% 15.527%, 20.012% 15.527%, 22.219% 13.086%, 23.102% 12.842%, 24.868% 10.400%, 26.633% 9.668%, 27.957% 8.447%, 29.061% 8.203%, 30.164% 7.227%, 30.164% 6.738%, 31.488% 6.494%, 32.812% 5.518%, 34.137% 5.518%, 35.240% 4.541%, 37.226% 4.541%, 38.550% 3.809%, 40.978% 3.564%, 45.392% 2.100%, 48.702% 1.855%, 48.923% 1.123%, 52.895% 0.391%, 56.647% 0.391%, 65.475% 1.367%, 69.227% 3.320%, 73.861% 5.029%, 79.820% 11.133%, 80.923% 14.551%, 81.144% 17.725%, 81.806% 17.725%, 81.806% 19.678%, 81.144% 19.678%, 81.144% 20.166%, 80.261% 21.143%, 80.261% 22.119%, 79.820% 22.119%, 79.820% 22.852%, 79.379% 22.852%, 79.158% 23.828%, 78.275% 24.316%, 78.275% 25.049%, 77.613% 25.049%, 77.613% 25.537%, 77.172% 25.537%, 76.951% 26.025%, 76.289% 27.979%, 75.406% 29.932%, 74.082% 31.641%, 72.096% 33.838%, 74.082% 35.303%, 77.834% 36.523%, 79.599% 37.744%, 80.261% 37.744%, 82.910% 39.453%, 84.896% 40.186%, 85.558% 40.918%, 85.558% 41.406%, 87.103% 42.871%, 87.103% 43.359%, 88.427% 44.580%, 88.427% 45.068%, 89.751% 46.289%, 89.751% 46.777%, 91.296% 48.242%, 91.296% 48.730%, 92.179% 49.707%, 93.944% 55.566%, 93.944% 57.031%, 94.606% 58.984%, 94.827% 63.135%, 94.386% 64.600%, 94.165% 71.680%, 93.061% 76.074%, 91.296% 79.736%, 89.751% 81.689%, 87.544% 83.154%, 84.234% 84.131%, 81.144% 85.107%, 79.379% 85.596%, 73.199% 87.061%, 63.047% 88.770%, 47.599% 90.234%, 36.564% 90.479%, 30.606% 90.234%, 21.116% 89.990%, 20.674% 89.502%, 20.012% 89.502%, 19.792% 89.014%, 14.936% 87.549%, 14.936% 87.061%, 11.405% 85.596%, 10.743% 84.619%, 10.302% 84.619%, 7.874% 82.178%, 7.433% 82.178%, 2.357% 73.145%, 1.916% 67.773%);
  /* Fade the lit copy into the painting before it reaches the hit area's edge. */
  mask: url("/theme/radio-light-mask.png") center / 100% 100% no-repeat;
  transition: filter .16s ease;
}
.radio-button:focus-visible { outline: 0; }
.record-motion {
  pointer-events: none; clip-path: ellipse(50% 50% at 50% 50%);
  transform: skewY(-1.7deg); transform-origin: center;
  background: #ffe6b8;
}
.record-plane {
  position: absolute; inset: 0; transform-origin: 50% 50%;
  animation: painted-record-turn 5s linear infinite paused;
}
.record-ink {
  position: absolute; inset: 0;
  transform: translate(-1.56%,-2.71%) scaleY(.75);
  transform-origin: center;
  /* Fade out the photographed rim before rotation. Only flower ink turns;
     the matching cream platter below covers the original stationary ink. */
  mask-image: radial-gradient(ellipse closest-side, #000 72%, #000 84%, transparent 97%);
}
.record-ink > .cutout-painting {
  display: block; position: absolute; max-width: none;
  background-position: center; background-size: 100% 100%;
  background-repeat: no-repeat; pointer-events: none; user-select: none;
}
.music-room.is-playing .record-plane { animation-play-state: running; }
@keyframes painted-record-turn {
  from { transform: scaleY(var(--record-perspective,.33)) rotate(0turn) scaleY(var(--record-unflatten,3.03)) skewY(1.7deg); }
  to { transform: scaleY(var(--record-perspective,.33)) rotate(1turn) scaleY(var(--record-unflatten,3.03)) skewY(1.7deg); }
}
.bunny-motion {
  pointer-events: none; clip-path: ellipse(47% 48% at 50% 51%);
  animation: bunny-rest 5s ease-in-out infinite;
}
.flowers-motion {
  pointer-events: none; clip-path: ellipse(46% 49% at 51% 49%);
  animation: flower-breeze 7s ease-in-out infinite;
}
.music-room.is-playing .bunny-motion { animation: bunny-listen 2.4s ease-in-out infinite; }
.track-button {
  position: absolute; z-index: 9;
  display: grid; place-items: center;
  width: 3%; height: 4.4%; padding: 0; margin: 0;
  transform: translate(-50%,-50%);
  border: 0; border-radius: 50%; background: transparent;
  color: #a3654c;
  font: 700 clamp(12px, 1.55vw, 23px)/1 Georgia, serif;
  text-align: center;
  text-shadow: 0 1px 0 #fff3c482;
  -webkit-tap-highlight-color: transparent;
}
.track-button svg { width: 43%; height: 57%; overflow: visible; pointer-events: none; }
.track-button:active svg { transform: translateY(1px); }
.track-button:hover { color: #784a39; }
.track-button:focus-visible {
  background: #fff3bd33; outline: 2px dashed #fff7d5; outline-offset: 2px;
}
.desk-dodo-trail {
  position: absolute; left: 64%; top: 65%; z-index: 4;
  width: 6.6%; height: 7.5%; pointer-events: none;
  animation: desk-dodo-stroll 21s linear infinite;
}
.desk-dodo-duo {
  display: flex; align-items: flex-end; width: 100%; height: 100%;
  padding: 0; border: 0; background: transparent;
  pointer-events: auto; cursor: pointer;
  transform-origin: 50% 100%;
  animation: desk-dodo-facing 21s steps(1,end) infinite;
}
.desk-dodo {
  display: block; width: 60%; height: 100%; flex: 0 0 60%;
  object-fit: contain; object-position: center bottom;
  image-rendering: pixelated; user-select: none; -webkit-user-drag: none;
}
.desk-yarn { display: block; width: 40%; flex: 0 0 40%; margin: 0 0 1px -2%; }
.desk-yellow-yarn { display: block; width: 100%; height: auto; overflow: visible; }
.desk-yarn-roll {
  transform-origin: 13px 13px; transform-box: view-box;
  animation: desk-yarn-roll 1.6s linear infinite;
}
.desk-dodo-bubble {
  position: absolute; bottom: calc(100% + 7px); left: 50%;
  width: 168px; padding: 9px 11px;
  border: 1.5px solid #d7b58d; border-radius: 13px 15px 12px 14px;
  background: #fff3db; color: #916a50;
  font: 15px/1.35 Basiic,RainyHearts,sans-serif;
  text-align: center; text-transform: lowercase;
  box-shadow: 0 2px 3px #8a644a16;
  opacity: 0; transform: translate(-50%,4px);
  transition: opacity .2s ease, transform .2s ease;
}
.desk-dodo-bubble::after {
  content: ""; position: absolute; bottom: -6px; left: calc(50% - 5px);
  width: 10px; height: 10px; background: #fff3db;
  border-right: 1.5px solid #d7b58d; border-bottom: 1.5px solid #d7b58d;
  transform: rotate(45deg);
}
.desk-dodo-bubble.is-visible { opacity: 1; transform: translate(-50%,0); }
/* Both Dodo and the trailing yarn stay above the small rabbit's ears,
   with the left turn clear of the mug and open notebook. */
@keyframes desk-dodo-stroll {
  0% { left: 64%; top: 65%; }
  38% { left: 83%; top: 63%; }
  43% { left: 85%; top: 64%; }
  45% { left: 85%; top: 65%; }
  83% { left: 67%; top: 66%; }
  95% { left: 64%; top: 66%; }
  100% { left: 64%; top: 65%; }
}
@keyframes desk-dodo-facing {
  0% { transform: scaleX(-1); }
  45% { transform: scaleX(1); }
  100% { transform: scaleX(-1); }
}
@keyframes desk-yarn-roll { from { transform: rotate(0turn); } to { transform: rotate(-1turn); } }
.dreamlog-is-open .desk-dodo-trail,.dreamlog-is-open .desk-dodo-duo,
.dreamlog-is-open .desk-yarn-roll { animation-play-state: paused; }
.dreamlog-is-open .desk-dodo-bubble { opacity: 0; }
.painted-effects {
  position: absolute; inset: 0; z-index: 5;
  pointer-events: none; overflow: hidden;
}
.speaker-pulse {
  position: absolute; width: 5.5%; height: 8%;
  border: 2px solid #ffe5a0; border-radius: 50%;
  transform: translate(-50%,-50%); opacity: 0;
}
.music-room.is-playing .speaker-pulse { animation: speaker-pulse .85s ease-out infinite; }
.music-room.is-playing .speaker-right { animation-delay: .3s; }
.floating-note {
  position: absolute; opacity: 0; transform: translateY(0);
  font: clamp(16px,2vw,28px)/1 Georgia,serif; color: #bc8190;
}
.music-room.is-playing .floating-note { animation: note-rise 4s ease-out infinite; }
.sun-mote {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: #fff9d6; box-shadow: 0 0 5px #fff6b7;
  animation: mote-glow 5s ease-in-out infinite; opacity: .3;
}
.window-clouds {
  position: absolute; left: 0; top: 1%;
  width: 21%; height: 32%; overflow: hidden;
}
.window-clouds i {
  position: absolute; top: 14%; left: -35%; width: 28%; height: 7%;
  border-radius: 50%; background: #ffffffe0; filter: blur(1px);
  box-shadow: 8px -4px 0 1px #ffffffe0, -7px 1px 0 #ffffffe0;
  animation: cloud-drift 30s linear infinite;
}
.window-clouds i + i {
  top: 55%; animation-duration: 42s; animation-delay: -22s; opacity: .65;
}
@keyframes bunny-rest {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.007) translateY(-.5px); }
}
@keyframes bunny-listen {
  0%,100% { transform: rotate(-.35deg) scale(1.007); }
  50% { transform: rotate(.45deg) translateY(-1px) scale(1.013); }
}
@keyframes flower-breeze {
  0%,100% { transform: rotate(-.3deg); }
  50% { transform: rotate(.45deg); }
}
@keyframes speaker-pulse {
  0% { transform: translate(-50%,-50%) scale(.86); opacity: .28; }
  100% { transform: translate(-50%,-50%) scale(1.25); opacity: 0; }
}
@keyframes note-rise {
  0% { transform: translate(0,10px) rotate(-8deg); opacity: 0; }
  20% { opacity: .75; }
  85% { opacity: .6; }
  100% { transform: translate(12px,-75px) rotate(10deg); opacity: 0; }
}
@keyframes mote-glow {
  0%,100% { opacity: .1; transform: translateY(0) scale(.6); }
  50% { opacity: .65; transform: translateY(-8px) scale(1); }
}
@keyframes cloud-drift { from { left: -35%; } to { left: 115%; } }

@media (max-width: 0px) {
  :root { --lace-height: 76px; }
  .blog-lace-header {
    background-size: 360px 120px; background-position: left -17px;
  }
  .site-layout { display: flex; flex-direction: column; }
  .sidebar {
    padding: calc(var(--lace-height) + 5px) 12px 7px;
    background-size: var(--sidebar-width) auto;
  }
  .portrait-frame { width: 110px; height: 110px; margin: 6px auto 13px; }
  main {
    height: auto; margin-top: 0; width: 100%;
  }
  .music-room { height: auto; aspect-ratio: 3 / 2; }
  .music-room > .desk-painting { height: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .record-plane, .bunny-motion, .flowers-motion, .painted-effects *,
  .desk-dodo-trail, .desk-dodo-duo, .desk-yarn-roll {
    animation: none !important;
  }
}

/* dreamlog: a paper journal that unfolds on top of the painted room */
.diary-hotspot {
  /* Follow only the pink cover and its bookmark, leaving the paper and desk clear. */
  position: absolute;
  left: 30%;
  top: 74%;
  width: 19%;
  height: 23.5%;
  z-index: 8;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  cursor: pointer;
  clip-path: polygon(44.27% 3.42%, 54.21% 3.42%, 70.31% 5.92%, 86.76% 9.66%, 96.01% 13.40%, 98.07% 16.31%, 93.27% 30.85%, 84.70% 57.45%, 75.79% 81.55%, 74.08% 84.87%, 71.00% 87.78%, 67.23% 89.44%, 57.98% 89.03%, 50.44% 87.37%, 29.88% 82.80%, 26.80% 94.02%, 25.08% 99.00%, 23.37% 98.59%, 19.60% 93.18%, 18.23% 94.02%, 13.77% 95.68%, 12.75% 94.43%, 15.83% 81.55%, 7.26% 80.72%, 2.47% 75.73%, 1.78% 74.07%, 1.78% 70.33%, 7.61% 57.86%, 23.37% 32.93%, 37.42% 11.32%, 41.87% 5.09%);
  backdrop-filter: brightness(1);
  transition: backdrop-filter .22s ease, background-color .22s ease;
}
.diary-hotspot:hover, .diary-hotspot:focus-visible {
  background: #fff8d20a;
  backdrop-filter: brightness(1.10) saturate(1.02);
  color: inherit;
  transform: none;
  filter: none;
}
.diary-hotspot:active { backdrop-filter: brightness(1.14); }
.diary-hotspot:focus-visible {
  /* Subtle keyboard-only focus indicator, without moving the artwork. */
  outline: 2px dashed #ad8491;
  outline-offset: 2px;
}
.dreamlog-overlay {
  position: fixed; inset: 60px 0 0 var(--sidebar-width); z-index: 40;
  display: grid; place-items: center; padding: 16px;
  isolation: isolate; /* no full-screen fade repaint on every opening */
}
.dreamlog-is-open { overflow: hidden; }
.dreamlog-backdrop {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; padding: 0; border-radius: 0; cursor: default;
  background: transparent; /* click outside to close, without dimming the room */
}
.dreamlog-book {
  position: relative; z-index: 1; display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  width: min(98%,1100px); height: min(96%,735px);
  min-width: 0; min-height: 260px;
  background: transparent url("/theme/KawaiiNotebook.png") center / 100% 100% no-repeat;
  border-radius: 5%; /* keep the notebook art without a costly alpha shadow */
  text-transform: lowercase;
}
.dreamlog-photo-page, .dreamlog-page {
  position: relative; min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
}
.dreamlog-photo-page { padding: 6% 9% 11% 10%; }
.dreamlog-page { padding: clamp(80px,9vw,112px) 12% 11% 10%; }
.dreamlog-close {
  position: absolute; right: 2.5%; top: 2%; z-index: 5;
  display: grid; place-items: center; width: 32px; height: 32px;
  padding: 0; border: 0; background: transparent;
  color: #a56f59; font: 28px/1 Georgia,serif;
}
.dreamlog-close:hover { color: #704e39; }
.dreamlog-photo-heading {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; margin: 0 0 14px;
}
.dreamlog-photo-heading h2 {
  margin: 0; font: normal clamp(24px,2.7vw,34px)/1.2 Basiic,RainyHearts,cursive; color: #ae7769;
}
.dreamlog-index-toggle {
  padding: 5px 0; border: 0; border-bottom: 1px dashed #cc9c80;
  background: transparent; color: #a67b62; font-size: 15px;
}
.dreamlog-photo-scroll, .dreamlog-page-scroll {
  min-height: 0; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain;
  scrollbar-color: #d8ad8b transparent; scrollbar-width: thin; outline-offset: 2px;
}
/* Scrapbook photo placement: photos belong to the page, not its center. */
.dreamlog-photo-scroll {
  display: flex; flex-direction: column;
  padding: 14px 9px 12px;
}
.dreamlog-photo-grid {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
  align-items: start; gap: 15px 12px; width: 100%;
}
.dreamlog-feature-photo[hidden] { display:none!important; }

.dreamlog-photo-grid[data-view="single"],
.dreamlog-photo-grid[data-view="carousel"] {
  position: relative;
  grid-template-columns: minmax(0,1fr);
  justify-items: start;
  align-content: start;
  margin: 36px 0 0;
}
.dreamlog-photo-grid[data-view="single"]::before,
.dreamlog-photo-grid[data-view="carousel"]::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 36%;
  top: -9px;
  width: 66px;
  height: 20px;
  transform: rotate(-7deg);
  background: repeating-linear-gradient(90deg,#f4c6b0c4 0 11px,#f7d4bed6 11px 22px);
  box-shadow: 0 1px 3px #ab846a18;
  pointer-events: none;
}
.dreamlog-photo-grid img {
  display: block; width: 100%; height: auto; max-height: 230px;
  object-fit: contain; background: #fff9e9;
  padding: 6px 6px 15px; border-radius: 2px;
  box-shadow: 1px 3px 5px #9d6d4b24; transform: rotate(-1.3deg);
}
.dreamlog-photo-grid img:nth-child(even) { transform: rotate(1.2deg); }
.dreamlog-photo-grid[data-view="single"] img,
.dreamlog-photo-grid[data-view="carousel"] img {
  width: min(95%, 415px);
  max-height: 420px;
  transform: rotate(-2deg);
}
.dreamlog-photo-carousel {
  position: relative;
  width: min(95%, 415px);
}
/* Video clips in mixed-photo Dreamlog entries use the same scrapbook frame. */
.dreamlog-photo-carousel .dreamlog-gallery-video {
  display: block;
  width: 100%;
  max-height: min(420px, 56vh);
  object-fit: contain;
  background: #fff9e9;
  padding: 6px 6px 15px;
  border-radius: 2px;
  box-shadow: 1px 3px 5px #9d6d4b24;
  transform: rotate(-2deg);
}
.dreamlog-photo-carousel img {
  display: block;
  width: 100% !important;
  max-height: min(420px,56vh);
  transform: rotate(-2deg);
}
/* Tall diary images should have a frame that follows the actual photo,
   not a 415px-wide panel full of empty cream space. Preserve every pixel. */
.dreamlog-photo-grid[data-view="single"] img.dreamlog-portrait-photo,
.dreamlog-photo-carousel img.dreamlog-portrait-photo {
  width: auto !important;
  height: auto;
  max-width: min(95%,415px);
  max-height: min(450px,58vh);
  justify-self: center;
  margin-inline: auto;
  object-fit: contain;
}
/* Remove the big blue click outline while retaining visible keyboard focus. */
.dreamlog-photo-scroll:focus:not(:focus-visible),
.dreamlog-page-scroll:focus:not(:focus-visible) {
  outline: none;
}
.dreamlog-photo-scroll:focus-visible,
.dreamlog-page-scroll:focus-visible {
  outline: 2px dashed #d5a5ae;
  outline-offset: -2px;
}
.dreamlog-photo-arrow {
  position: absolute;
  top: 48%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 38px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid #e7cbb5;
  border-radius: 999px;
  background: #fff9e9ee;
  color: #a57465;
  box-shadow: 0 2px 6px #94735b30;
  font: 24px/1 Georgia,serif;
}
.dreamlog-photo-arrow-prev { left: -10px; }
.dreamlog-photo-arrow-next { right: -10px; }
.dreamlog-photo-arrow:hover {
  background: #fce5df;
  color: #895e50;
}
.dreamlog-photo-arrow:focus-visible {
  outline: 2px dashed #ad8491;
  outline-offset: 2px;
}
.dreamlog-photo-position {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -24px;
  color: #a78372;
  font: 13px/1.3 Basiic,RainyHearts,sans-serif;
  text-align: center;
}
.dreamlog-photo-note {
  display: block; color: #b68f74; text-align: center; margin-top: 14px; font-size: 14px;
}
.dreamlog-page-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  flex: 0 0 auto;
  gap: 6px;
  margin: 0 0 14px;
  color: #a88061;
}
.dreamlog-page-label { font-size: clamp(16px,1.8vw,21px); }
.dreamlog-post-date {
  align-self: flex-end;
  padding-right: 6px;
  font: 16px/1.35 Basiic,RainyHearts,"Courier New",sans-serif;
  color: #a77a63;
}
/* Faint ruled paper keeps even one-line memories looking handwritten.
   The writing begins near the top; long entries scroll independently. */
.dreamlog-page-scroll {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  margin: 0;
  padding: 0 8px 12px 4px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 26px,
    #c99f881c 27px,
    transparent 28px
  );
}
.dreamlog-post-caption {
  margin: 0;
  color: #8f624c;
  font: clamp(13px,1.2vw,15px)/28px Basiic,RainyHearts,"Courier New",sans-serif;
  text-align: justify;
  text-align-last: left;
  text-justify: inter-word;
  overflow-wrap: anywhere;
  white-space: normal;
}
.dreamlog-post-caption strong { color: #a76f62; font-weight: normal; }
.dreamlog-inline-icon {
  width: 23px; height: 23px; object-fit: contain;
  display: inline-block; vertical-align: middle; margin: 0 2px;
}
.dreamlog-heart { color: #c78285; }
.dreamlog-page-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 7px; padding-top: 14px; color: #b0876c; font-size: 14px;
}
.dreamlog-page-controls button {
  border: 0; padding: 5px 0; background: transparent; color: #9c7057; font-size: 17px;
}
.dreamlog-page-controls button:hover:not(:disabled) { color: #c07d75; }
.dreamlog-page-controls button:disabled { opacity: .3; cursor: default; }
.dreamlog-index {
  position: absolute; top: 15%; left: 9%; right: 8%; bottom: 16%; z-index: 4;
  padding: 9px; background: #fff3dcef; border: 2px solid #e6ba94; border-radius: 10px;
  box-shadow: 0 5px 15px #9e6d4d26;
}
.dreamlog-entry-list {
  display: flex; flex-direction: column; gap: 7px; height: 100%;
  overflow: auto; overscroll-behavior: contain;
  scrollbar-color: #d8ad8b transparent; scrollbar-width: thin;
}
.dreamlog-entry-button {
  display: flex; flex: 0 0 auto; gap: 9px; align-items: center; text-align: left;
  width: 100%; min-height: 56px; padding: 6px; border: 0; border-radius: 6px;
  background: transparent; color: #9c7558;
}
.dreamlog-entry-button img { width: 40px; height: 40px; object-fit: cover; border-radius: 3px; }
.dreamlog-list-copy { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.dreamlog-entry-button time { font-size: 14px; }
.dreamlog-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.dreamlog-entry-button:hover,.dreamlog-entry-button[aria-current="true"] { background: #edc4a94a; }
@keyframes dreamlog-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dreamlog-open {
  from { opacity: .6; transform: translateY(8px) scale(.96); }
  to { opacity: 1; transform: none; }
}
/* Let the paper read naturally on a narrower viewport too. */
@media (max-width: 0px) {
  .dreamlog-overlay { inset: 0; padding: 8px; }
  .dreamlog-book { width: min(100%,640px); height: min(90dvh,735px); }
  .dreamlog-photo-page { padding: 9% 7% 11% 9%; }
  .dreamlog-page { padding: clamp(48px,8vw,75px) 9% 12% 9%; }
  .dreamlog-photo-grid[data-view="single"],
  .dreamlog-photo-grid[data-view="carousel"] { margin-top: 15px; }
  .dreamlog-photo-grid[data-view="single"] img,
  .dreamlog-photo-carousel img { max-height: 260px; }
  .dreamlog-photo-arrow { width: 28px; height: 34px; font-size: 21px; }
  .dreamlog-photo-position { bottom: -21px; font-size: 12px; }
  .dreamlog-post-caption { font-size: clamp(11px,2vw,13px); line-height: 24px; }
  .dreamlog-page-scroll {
    background: repeating-linear-gradient(to bottom,transparent 0 30px,#c99f881c 31px,transparent 32px);
  }
  .dreamlog-post-date { font-size: clamp(15px,3.3vw,20px); }
  .dreamlog-photo-grid[data-view="single"]::before,
  .dreamlog-photo-grid[data-view="carousel"]::before { width: 42px; height: 15px; top: -7px; }
}

@media (prefers-reduced-motion: reduce) {
  .dreamlog-overlay,.dreamlog-book { animation: none; }
}




/* Strawberry milk, butter, peach and lilac candy lettering, like a sweet
   Y2K blog. Every consecutive word keeps its own distinct ink color.
   A delicate warm shadow adds definition without turning the pastel dark. */
.candy-word {
  color: var(--candy-ink, inherit);
  text-shadow: 0 .5px 0 #8b675a45, 0 0 .35px #886b6730;
}
.candy-ink-0 { --candy-ink: #dd84ad; } /* strawberry milk pink */
.candy-ink-1 { --candy-ink: #d0aa4f; } /* butter yellow */
.candy-ink-2 { --candy-ink: #b29ad3; } /* lilac milk */
.candy-ink-3 { --candy-ink: #dc9868; } /* peach orange */
.candy-ink-4 { --candy-ink: #e48eb9; } /* cotton-candy pink */
.candy-ink-5 { --candy-ink: #88b19a; } /* pistachio milk */
.candy-ink-6 { --candy-ink: #d8b55e; } /* vanilla honey yellow */
.candy-ink-7 { --candy-ink: #e18bb0; } /* pink marshmallow */
.candy-ink-8 { --candy-ink: #85b1c5; } /* blueberry milk */
.candy-ink-9 { --candy-ink: #dfa177; } /* apricot cream */
.candy-ink-10 { --candy-ink: #c19dbd; } /* rose lilac milk */
.candy-ink-11 { --candy-ink: #cfa955; } /* custard yellow */

/* Give the small notebook labels more sunshine and pink than blue or purple. */
.dreamlog-index-toggle { color: #dd84ad; }
.dreamlog-index-toggle:hover { color: #dc9868; }
.dreamlog-post-date { color: #dc9868; }
#dreamlog-counter { color: #e18bb0; }
.dreamlog-page-controls #dreamlog-prev { color: #d8b55e; }
.dreamlog-page-controls #dreamlog-next { color: #dd84ad; }
.dreamlog-photo-position { color: #d0aa4f; }
.dreamlog-entry-button:nth-child(12n + 1) time { color: #dd84ad; }
.dreamlog-entry-button:nth-child(12n + 2) time { color: #d0aa4f; }
.dreamlog-entry-button:nth-child(12n + 3) time { color: #b29ad3; }
.dreamlog-entry-button:nth-child(12n + 4) time { color: #dc9868; }
.dreamlog-entry-button:nth-child(12n + 5) time { color: #e48eb9; }
.dreamlog-entry-button:nth-child(12n + 6) time { color: #88b19a; }
.dreamlog-entry-button:nth-child(12n + 7) time { color: #d8b55e; }
.dreamlog-entry-button:nth-child(12n + 8) time { color: #e18bb0; }
.dreamlog-entry-button:nth-child(12n + 9) time { color: #85b1c5; }
.dreamlog-entry-button:nth-child(12n + 10) time { color: #dfa177; }
.dreamlog-entry-button:nth-child(12n + 11) time { color: #c19dbd; }
.dreamlog-entry-button:nth-child(12n + 12) time { color: #cfa955; }

/* Keep every piece of the home painting in the same warmer, deeper palette.
   Tone the paint itself so controls, notes, and diary contents stay clear. */
.music-room { --room-paint-tone: brightness(.93) saturate(1.10); }
.music-room > .desk-painting,
.music-room .cutout-painting,
.music-room .record-motion { filter: var(--room-paint-tone); }
/* The record includes a cream platter as well as painted flower ink. Apply
   the palette once to both, rather than darkening its ink a second time. */
.music-room .record-motion .cutout-painting { filter: none; }
.radio-button:hover { filter: brightness(1.12) saturate(1.02); }
.radio-button:focus-visible { filter: brightness(1.12) saturate(1.02); }
/* While the radio actually plays, its painted silhouette stays bright even
   when the pointer leaves. The same CSS works in the full blog and the
   virtual computer's scaled browser; no rectangular glow layer is added. */
.music-room.is-playing .radio-button {
  filter: brightness(1.16) saturate(1.05);
}
.music-room.is-playing .radio-button:hover,
.music-room.is-playing .radio-button:focus-visible {
  filter: brightness(1.19) saturate(1.06);
}
.diary-hotspot:hover, .diary-hotspot:focus-visible {
  backdrop-filter: brightness(1.14) saturate(1.02);
}
.diary-hotspot:active { backdrop-filter: brightness(1.18) saturate(1.02); }

/* Fresh rose paint only; cream, cocoa, and the character's white fur retain
   their source colours. The source frame and painting remain untouched. */
.portrait-frame::after {
  /* The new frame already carries its intended pink color. */
  filter: none;
}
.diary-pink-paint {
  z-index: 7;
  pointer-events: none;
  clip-path: polygon(44.27% 3.42%, 54.21% 3.42%, 70.31% 5.92%, 86.76% 9.66%, 96.01% 13.40%, 98.07% 16.31%, 93.27% 30.85%, 84.70% 57.45%, 75.79% 81.55%, 74.08% 84.87%, 71.00% 87.78%, 67.23% 89.44%, 57.98% 89.03%, 50.44% 87.37%, 29.88% 82.80%, 26.80% 94.02%, 25.08% 99.00%, 23.37% 98.59%, 19.60% 93.18%, 18.23% 94.02%, 13.77% 95.68%, 12.75% 94.43%, 15.83% 81.55%, 7.26% 80.72%, 2.47% 75.73%, 1.78% 74.07%, 1.78% 70.33%, 7.61% 57.86%, 23.37% 32.93%, 37.42% 11.32%, 41.87% 5.09%);
}
.music-room .diary-pink-paint > .cutout-painting {
  filter: url("/theme/fresh-pink-paint.svg#fresh-pink") var(--room-paint-tone);
}

/* Restore the original pink Hello Kitty cursor.
   The repo currently has only the 120px (3x) PNG, not the previously
   referenced 1x/2x files. Use its 3x density to display at 40 CSS pixels,
   with a direct PNG fallback for browsers without image-set support. */
html, body, body * {
  cursor: url("/assets/blog/ui/hello-kitty-pink-clear-cursor-3x.png") 3 3, auto !important;
  cursor: -webkit-image-set(url("/assets/blog/ui/hello-kitty-pink-clear-cursor-3x.png") 3x) 1 1, auto !important;
  cursor: image-set(url("/assets/blog/ui/hello-kitty-pink-clear-cursor-3x.png") 3x) 1 1, auto !important;
}

/* Preserve the left vertical sidebar at narrow widths. The content may adapt,
   but browser resizing must never turn the navigation into a horizontal header. */
@media (max-width: 0px) {
  .site-layout {
    display: grid;
    grid-template-columns: clamp(154px,26vw,200px) minmax(0,1fr);
    align-items: start;
    min-height: 100dvh;
  }
  .sidebar {
    display: block;
    min-width: 0;
    min-height: 100dvh;
    padding: calc(var(--lace-height) + 10px) 10px 18px;
    background-size: 100% auto;
  }
  .sidebar .portrait-frame {
    width: clamp(112px,16vw,155px);
    height: clamp(112px,16vw,155px);
    margin: 9px auto 18px;
  }
  #main-content {
    width: 100%;
    min-width: 0;
    height: calc(100dvh - 60px);
    min-height: 460px;
    margin-top: calc(var(--lace-height) - 36px);
  }
  #main-content > .music-room {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
  }
}
@media (max-width: 0px) {
  .site-layout { grid-template-columns: 142px minmax(0,1fr); }
  .sidebar { padding-left: 7px; padding-right: 7px; }
  .sidebar .portrait-frame { width: 106px; height: 106px; }
}

/* The original painted room occupies the complete desktop-height canvas.
   At narrow browser widths the whole 1360px page scrolls horizontally;
   no small aspect-ratio panel or empty lower half is introduced. */
.site-layout { min-width: 1360px; }
.blog-lace-header { min-width: 1360px; }
@media (max-width: 1360px) {
  #main-content { min-height: 720px; }
  #main-content > .music-room { width: 100%; height: 100%; aspect-ratio: auto; }
}

/* Tactile feedback for small controls; illustrated scene geometry is unchanged. */
.sidebar-back-neverland{transition:transform .18s ease,color .18s ease}
.sidebar-back-neverland:is(:hover,:focus-visible){color:#754832;transform:translate(-50%,-2px)}
.sidebar-back-neverland:active{transform:translate(-50%,1px)}
.track-button svg{transition:transform .16s ease}
.track-button:is(:hover,:focus-visible) svg{transform:scale(1.10)}
.track-button:active svg{transform:translateY(1px) scale(.94)}
.dreamlog-page-controls button:not(:disabled){transition:transform .16s ease,color .16s ease}
.dreamlog-page-controls button:not(:disabled):is(:hover,:focus-visible){transform:translateY(-1px)}
.dreamlog-page-controls button:not(:disabled):active{transform:translateY(1px) scale(.97)}
.dreamlog-entry-button{transition:transform .16s ease,background-color .16s ease}
.dreamlog-entry-button:hover{transform:translateX(2px)}
.dreamlog-entry-button:active{transform:translateX(1px) scale(.995)}
@media(prefers-reduced-motion:reduce){
 .sidebar-back-neverland,.track-button svg,.dreamlog-page-controls button,.dreamlog-entry-button{transition:none}
 .sidebar-back-neverland:is(:hover,:focus-visible,:active){transform:translateX(-50%)}
 .track-button:is(:hover,:focus-visible,:active) svg,.dreamlog-page-controls button:is(:hover,:active),.dreamlog-entry-button:is(:hover,:active){transform:none}
}


/* On touch screens, keep the full two-page desktop spread even in portrait.
   Scale the artwork proportionally to fit the phone instead of compressing
   one page into a narrow strip or stacking the two pages. */
@media (max-width: 950px) and (hover: none) and (pointer: coarse) {
  html:has(body.dreamlog-is-open) { overflow: hidden; }
  .dreamlog-overlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    padding: max(8px, env(safe-area-inset-top)) 6px max(8px, env(safe-area-inset-bottom));
    box-sizing: border-box;
    overflow: hidden;
    background: transparent;
    z-index: 1000;
  }
  .dreamlog-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: transparent;
  }
  .dreamlog-book {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
    flex: none;
    width: min(100%, 1100px);
    height: auto;
    min-width: 0;
    min-height: 0;
    max-height: calc(100dvh - 32px);
    aspect-ratio: 1100 / 735;
    margin: 0 auto;
    border-radius: 0;
    overflow: visible;
    background: transparent url("/theme/KawaiiNotebook.png") center / 100% 100% no-repeat;
  }
  .dreamlog-photo-page,
  .dreamlog-page {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    aspect-ratio: auto;
    box-sizing: border-box;
    overflow: hidden;
    background: none;
  }
  .dreamlog-photo-page { padding: 11% 10% 12% 11%; }
  .dreamlog-page { padding: 12% 12% 9% 9%; }
  .dreamlog-close {
    position: absolute;
    top: 1%;
    right: 2%;
    align-self: auto;
    width: 30px;
    height: 30px;
    margin: 0;
    z-index: 9;
    font-size: 26px;
  }
  .dreamlog-photo-heading {
    min-height: 0;
    margin: 0 0 3px;
  }
  .dreamlog-index-toggle { font-size: clamp(9px, 1.9vw, 13px); padding: 2px 0; }
  .dreamlog-photo-scroll,
  .dreamlog-page-scroll {
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  .dreamlog-photo-scroll { padding: 5px 5px 12px; }
  .dreamlog-photo-grid[data-view="single"],
  .dreamlog-photo-grid[data-view="carousel"] {
    margin-top: 12px;
    justify-items: center;
  }
  .dreamlog-photo-grid[data-view="single"] img,
  .dreamlog-photo-carousel img,
  .dreamlog-photo-carousel .dreamlog-gallery-video {
    max-height: min(25dvh, 240px);
    padding: 3px 3px 7px;
  }
  .dreamlog-photo-grid[data-view="single"] img { width: min(100%, 260px); }
  .dreamlog-photo-carousel { width: 100%; }
  .dreamlog-photo-grid[data-view="single"] img.dreamlog-portrait-photo,
  .dreamlog-photo-carousel img.dreamlog-portrait-photo {
    max-width: 100%;
    max-height: min(25dvh, 240px);
  }
  .dreamlog-photo-arrow { width: 23px; height: 27px; font-size: 18px; }
  .dreamlog-photo-arrow-prev { left: -8px; }
  .dreamlog-photo-arrow-next { right: -8px; }
  .dreamlog-photo-position { bottom: -17px; font-size: 9px; }
  .dreamlog-photo-grid[data-view="single"]::before,
  .dreamlog-photo-grid[data-view="carousel"]::before {
    top: -6px; width: 32px; height: 12px;
  }
  .dreamlog-page-heading { margin: 0 0 5px; gap: 0; }
  .dreamlog-post-date { font-size: clamp(9px, 1.9vw, 14px); padding-right: 1px; }
  .dreamlog-post-caption {
    font-size: clamp(8px, 1.9vw, 12px);
    line-height: 1.55;
    text-align: left;
    overflow-wrap: anywhere;
  }
  .dreamlog-page-scroll { padding: 0 3px 5px 0; }
  .dreamlog-page-controls { padding-top: 4px; gap: 2px; font-size: 10px; }
  .dreamlog-page-controls button {
    min-height: 27px;
    font-size: clamp(10px, 1.8vw, 13px);
  }
  .dreamlog-index { top: 17%; left: 7%; right: 7%; bottom: 11%; padding: 4px; }
  .dreamlog-entry-list { gap: 2px; }
  .dreamlog-entry-button { gap: 4px; min-height: 32px; padding: 2px; }
  .dreamlog-entry-button img { width: 25px; height: 25px; }
  .dreamlog-entry-button time { font-size: 10px; }
  .dreamlog-preview { font-size: 9px; }
}


/* Tablet touch browsers: leave the painted room visible behind the diary.
   Keep the click-to-close backdrop, but remove its dark translucent tint.
   This also overrides the separate overlay tint used below 950px. */
@media (min-width: 700px) and (any-pointer: coarse) {
  .dreamlog-overlay,
  .dreamlog-backdrop {
    background-color: transparent;
  }
}

.sidebar:has([data-widget-guide]) { padding-bottom: 48px; }
.sidebar .painted-room-nav a[data-widget-guide]::before {
  background-image: url("/assets/blog/ui/pompompurin-guide.png");
  image-rendering: pixelated;
}

/* Keep Japanese kaomoji eyes intact in the June 4 Dreamlog caption.
   The site's pixel font does not cover every kana/symbol glyph. */
.dreamlog-post-caption .diary-kaomoji {
  font-family:"Hiragino Sans","Hiragino Kaku Gothic ProN","Noto Sans JP","Yu Gothic","Arial Unicode MS",sans-serif;
  font-size:0.96em;
  font-variant-ligatures:none;
  letter-spacing:0;
  white-space:nowrap;
  display:inline-block;
}
