.window {
  width: 235px;
  height: 235px;
  left: 12%;
  top: 17%;
}

.window-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 15px solid #b99775;
  background: #d7c2a8;
  border-radius: 7px;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.38), 0 12px 24px rgba(68,49,35,.14);
  position: relative;
}

.sky {
  position: absolute;
  inset: 5px;
  overflow: hidden;
  background: linear-gradient(#8fc7df, #d9edf1);
  transition: background 900ms ease;
}

.room.night .sky {
  background: linear-gradient(#202a4d, #40517a);
}

.sun, .moon {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  right: 30px;
  top: 26px;
  transition: 900ms ease;
}

.sun {
  background: #ffe09a;
  box-shadow: 0 0 35px rgba(255, 221, 141, .7);
}

.moon {
  background: #f6f2db;
  transform: translateY(160px);
  box-shadow: 0 0 32px rgba(245, 241, 219, .28);
}

.room.night .sun {
  transform: translateY(160px);
}

.room.night .moon {
  transform: translateY(0);
}

.cloud {
  position: absolute;
  width: 68px;
  height: 21px;
  border-radius: 40px;
  background: rgba(255,255,255,.64);
  transition: opacity 700ms ease;
}

.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud::before {
  width: 29px;
  height: 29px;
  left: 10px;
  top: -13px;
}

.cloud::after {
  width: 35px;
  height: 35px;
  right: 10px;
  top: -18px;
}

.cloud-a {
  left: 24px;
  top: 58px;
}

.cloud-b {
  left: 84px;
  top: 137px;
  transform: scale(.75);
}

.room.night .cloud {
  opacity: .17;
}

.stars {
  position: absolute;
  color: #fff6c7;
  opacity: 0;
  left: 25px;
  right: 25px;
  top: 20px;
  line-height: 2.8;
  word-spacing: 17px;
  font-size: 18px;
  transform: translateY(-5px);
  transition: opacity 800ms ease, transform 800ms ease;
}

.room.night .stars {
  opacity: .75;
  transform: translateY(0);
}

.window-cross {
  position: absolute;
  background: #b99775;
  z-index: 2;
}

.window-cross.vertical {
  width: 11px;
  top: 0;
  bottom: 0;
  left: calc(50% - 5px);
}

.window-cross.horizontal {
  height: 11px;
  left: 0;
  right: 0;
  top: calc(50% - 5px);
}


.clock {
  right: 12%;
  top: 16%;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: #f7efdf;
  border: 11px solid #826044;
  box-shadow: 0 10px 22px rgba(63,46,34,.14), inset 0 0 0 2px rgba(255,255,255,.5);
  display: grid;
  place-items: center;
}

.clock-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
}

.clock-face::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from -1deg,
    rgba(104, 77, 56, .62) 0deg 2deg,
    transparent 2deg 30deg
  );
  -webkit-mask: radial-gradient(circle, transparent 0 73%, #000 74% 100%);
  mask: radial-gradient(circle, transparent 0 73%, #000 74% 100%);
}

.clock-hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform: translateX(-50%) rotate(0deg);
  transform-origin: 50% 100%;
  border-radius: 999px;
  z-index: 2;
}

.clock-hour {
  width: 4px;
  height: 25%;
  background: #5d4637;
}

.clock-minute {
  width: 3px;
  height: 35%;
  background: #6f5542;
}

.clock-second {
  width: 1.5px;
  height: 38%;
  background: #b56f5d;
  transition: transform 90ms linear;
}

.clock-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6b4d39;
  box-shadow: 0 0 0 2px #eadbc7;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.shelf {
  position: absolute;
  right: 26%;
  top: auto;
  bottom: 60%;
  width: 190px;
  height: 15px;
  background: #8c664b;
  border-radius: 4px;
  box-shadow: 0 8px 12px rgba(73,48,32,.12);
}

.book {
  position: absolute;
  bottom: 13px;
  width: 18px;
  border-radius: 3px 3px 0 0;
}

.b1 { left: 30px; height: 62px; background: #9f6f61; }
.b2 { left: 51px; height: 48px; background: #758a83; }
.b3 { left: 73px; height: 56px; background: #d1a86e; }

.tiny-pot {
  position: absolute;
  right: 30px;
  bottom: 13px;
  width: 35px;
  height: 30px;
  background: #b87357;
  clip-path: polygon(8% 0, 92% 0, 80% 100%, 20% 100%);
}

.tiny-pot::before {
  content: "✦";
  position: absolute;
  color: #758a64;
  font-size: 35px;
  top: -34px;
  left: 1px;
}

.desk {
  position: absolute;
  left: 30%;
  right: 14%;
  top: 57%;
  height: 230px;
  z-index: 2;
}

.desk-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 74px;
  height: 28px;
  background: linear-gradient(#9b7455, #846048);
  border-radius: 8px;
  box-shadow: 0 12px 15px rgba(73,48,32,.15);
}

.desk-leg {
  position: absolute;
  width: 25px;
  top: 96px;
  height: 150px;
  background: var(--wood-dark);
  border-radius: 0 0 8px 8px;
}

.desk-leg.left { left: 44px; }
.desk-leg.right { right: 44px; }

.computer {
  left: 29%;
  top: -54px;
  width: 190px;
  height: 140px;
}

.monitor {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
}

.screen {
  position: absolute;
  left: 16px;
  top: 0;
  width: 158px;
  height: 100px;
  background: #4c433d;
  border: 8px solid #dad2c6;
  border-radius: 9px;
  box-shadow: 0 8px 15px rgba(0,0,0,.16);
  overflow: hidden;
}

.screen-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, rgba(186, 220, 205, .24), rgba(30, 42, 44, .12));
}

.screen-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(226,241,233,.72);
  font: 12px ui-monospace, monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.monitor-stand {
  position: absolute;
  width: 65px;
  height: 40px;
  background: #c9c0b3;
  left: 63px;
  top: 96px;
  clip-path: polygon(39% 0, 61% 0, 68% 70%, 100% 70%, 100% 86%, 0 86%, 0 70%, 32% 70%);
}

.lamp {
  right: 12%;
  top: -36px;
  width: 105px;
  height: 125px;
}

.lamp-shade {
  position: absolute;
  width: 75px;
  height: 42px;
  left: 16px;
  top: 6px;
  background: #d79b65;
  clip-path: polygon(17% 0, 83% 0, 100% 100%, 0 100%);
  z-index: 2;
}

.lamp-neck {
  position: absolute;
  width: 8px;
  height: 58px;
  background: #6f665f;
  left: 50px;
  top: 43px;
}

.lamp-base {
  position: absolute;
  width: 58px;
  height: 13px;
  border-radius: 50%;
  background: #665d57;
  left: 25px;
  top: 98px;
}

.lamp-glow {
  position: absolute;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  left: -24px;
  top: -12px;
  border: 2px solid rgba(255, 239, 202, .72);
  background: rgba(255, 244, 219, .11);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.18),
    0 0 16px rgba(255, 229, 174, .24);
  opacity: 0;
  transform: scale(.82);
  transition: opacity 320ms ease, transform 420ms ease;
  pointer-events: none;
  z-index: -1;
}

.room.lamp-on .lamp-glow {
  opacity: 1;
  transform: scale(1);
}

/* At night the lit area itself is enough; hide the visible glow circle. */
.room.night.lamp-on .lamp-glow {
  opacity: 0;
  transform: scale(.92);
}

.room.lamp-on .lamp-shade {
  box-shadow:
    0 0 9px rgba(255, 231, 184, .88),
    0 0 18px rgba(255, 224, 165, .32);
}

/*
  The lamp no longer paints a yellow haze over the room.
  At night, the dark ambient layer itself gets a clear circular opening,
  so the objects inside the lit area keep their original sharp colors.
*/
.room.night.lamp-on .ambient-overlay {
  -webkit-mask-image: radial-gradient(
    circle 190px at 76% 62%,
    transparent 0 62%,
    rgba(0, 0, 0, .18) 69%,
    rgba(0, 0, 0, .68) 78%,
    #000 88%
  );
  mask-image: radial-gradient(
    circle 190px at 76% 62%,
    transparent 0 62%,
    rgba(0, 0, 0, .18) 69%,
    rgba(0, 0, 0, .68) 78%,
    #000 88%
  );
}

.plant {
  left: 4%;
  top: -34px;
  width: 95px;
  height: 123px;
}

.pot {
  position: absolute;
  bottom: 13px;
  left: 22px;
  width: 53px;
  height: 47px;
  background: linear-gradient(#c57f61, #a7634e);
  clip-path: polygon(7% 0, 93% 0, 79% 100%, 21% 100%);
  z-index: 2;
}

.plant-crown {
  position: absolute;
  left: 17px;
  bottom: 54px;
  width: 64px;
  height: 62px;
  transform-origin: 50% 100%;
  transition: transform 350ms cubic-bezier(.2,.8,.2,1);
}

.stem {
  position: absolute;
  width: 5px;
  height: 48px;
  background: #5f7a55;
  left: 30px;
  bottom: 0;
  border-radius: 3px;
  transform-origin: bottom;
}

.leaf {
  position: absolute;
  width: 25px;
  height: 13px;
  border-radius: 100% 0 100% 0;
  background: #6f9364;
  opacity: 0;
  transform: scale(.2);
  transition: 300ms ease;
}

.leaf-1 { left: 10px; top: 27px; transform: rotate(25deg) scale(.2); }
.leaf-2 { right: 6px; top: 20px; transform: rotate(150deg) scale(.2); }
.leaf-3 { left: 12px; top: 7px; transform: rotate(12deg) scale(.2); }
.leaf-4 { right: 7px; top: 3px; transform: rotate(165deg) scale(.2); }

.flower {
  position: absolute;
  font-size: 21px;
  color: #d88b95;
  opacity: 0;
  transform: scale(.1);
  transition: 300ms ease;
}

.flower-1 { left: 3px; top: -12px; }
.flower-2 { right: 0; top: -6px; color: #e4b26e; }

.level-0 .stem { transform: scaleY(.45); }
.level-1 .stem { transform: scaleY(.68); }
.level-1 .leaf-1 { opacity: 1; transform: rotate(25deg) scale(1); }

.level-2 .stem { transform: scaleY(.88); }
.level-2 .leaf-1 { opacity: 1; transform: rotate(25deg) scale(1); }
.level-2 .leaf-2 { opacity: 1; transform: rotate(150deg) scale(1); }
.level-2 .leaf-3 { opacity: .82; transform: rotate(12deg) scale(.8); }

.level-3 .leaf { opacity: 1; }
.level-3 .leaf-1 { transform: rotate(25deg) scale(1); }
.level-3 .leaf-2 { transform: rotate(150deg) scale(1); }
.level-3 .leaf-3 { transform: rotate(12deg) scale(1); }
.level-3 .leaf-4 { transform: rotate(165deg) scale(1); }
.level-3 .flower { opacity: 1; transform: scale(1); }

.notebook {
  left: 18%;
  top: 25px;
  width: 78px;
  height: 62px;
}

.notebook-cover {
  position: absolute;
  width: 63px;
  height: 46px;
  left: 8px;
  top: 2px;
  background: #c79278;
  border-radius: 4px 7px 7px 4px;
  transform: rotate(-7deg);
  box-shadow: 0 7px 10px rgba(63,45,34,.13);
}

.note-lines {
  position: absolute;
  inset: 9px 10px;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.55) 0 2px, transparent 2px 8px);
}

.rug {
  position: absolute;
  width: 44%;
  height: 100px;
  left: 30%;
  bottom: 8%;
  z-index: 1;
  border-radius: 50%;
  background: radial-gradient(ellipse, #9d7c65 0 57%, #8b6d5a 58% 70%, transparent 71%);
  opacity: .7;
}

.cat {
  --cat-scale: 1;
  position: absolute;
  left: 11%;
  bottom: 7%;
  width: 130px;
  height: 80px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  opacity: 0;
  transform: scale(var(--cat-scale)) translateY(14px);
  transform-origin: bottom left;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 500ms ease, transform 500ms ease;
  z-index: 5;
}

.cat.visible {
  opacity: 1;
  transform: scale(var(--cat-scale)) translateY(0);
  pointer-events: auto;
}

.cat:focus-visible {
  outline: 3px solid rgba(90, 126, 173, .45);
  outline-offset: 6px;
  border-radius: 45%;
}

.cat-body {
  position: absolute;
  width: 86px;
  height: 48px;
  border-radius: 52% 48% 44% 47%;
  background: #6e665e;
  left: 28px;
  bottom: 3px;
}

.cat-head {
  position: absolute;
  width: 50px;
  height: 47px;
  border-radius: 48%;
  background: #746b62;
  left: 3px;
  bottom: 18px;
}

.ear {
  position: absolute;
  width: 20px;
  height: 22px;
  background: #746b62;
  top: -8px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.ear-l { left: 4px; transform: rotate(-12deg); }
.ear-r { right: 4px; transform: rotate(12deg); }

.eye {
  position: absolute;
  width: 4px;
  height: 5px;
  background: #181716;
  border-radius: 50%;
  top: 21px;
}
.eye-l { left: 14px; }
.eye-r { right: 14px; }

.cat-tail {
  position: absolute;
  width: 46px;
  height: 16px;
  border: 9px solid #6e665e;
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 90% 0 0;
  right: -3px;
  bottom: 27px;
  transform: rotate(12deg);
}


/* Small room object shown only while the embedded YouTube playlist is actually playing. */
.youtube-playing-object {
  position: absolute;
  left: calc(29% - 54px);
  top: 38px;
  width: 42px;
  height: 36px;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transform: translateY(5px) scale(.82);
  transition: opacity 240ms ease, transform 320ms cubic-bezier(.2,.8,.2,1);
}

.youtube-playing-object.is-playing {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.youtube-playing-object:focus-visible {
  outline: 2px solid rgba(119, 149, 133, .55);
  outline-offset: 5px;
  border-radius: 50%;
}

@media (hover: hover) and (pointer: fine) {
  .youtube-playing-object.is-playing:hover {
    transform: translateY(-2px) scale(1.06);
  }
}

.mini-record {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #d8a86b 0 3px, #47423f 4px 7px, #2c2b2a 8px 11px, #514b47 12px 13px, #282726 14px 100%);
  box-shadow: 0 5px 10px rgba(48,38,31,.18);
}

.youtube-playing-object.is-playing .mini-record {
  animation: little-record-spin 3.8s linear infinite;
}

.mini-note {
  position: absolute;
  right: 0;
  top: -2px;
  color: #8d765f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1;
  text-shadow: 0 2px 5px rgba(54,42,33,.12);
}

.youtube-playing-object.is-playing .mini-note {
  animation: little-note-float 1.8s ease-in-out infinite;
}

@keyframes little-record-spin {
  to { transform: rotate(360deg); }
}

@keyframes little-note-float {
  0%, 100% { transform: translateY(1px) rotate(-4deg); opacity: .72; }
  50% { transform: translateY(-4px) rotate(3deg); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .youtube-playing-object.is-playing .mini-record,
  .youtube-playing-object.is-playing .mini-note {
    animation: none;
  }
}

/* A small frame carrying one anonymous sentence from mannam.cc. */
.passed-heart-frame {
  left: 42%;
  top: auto;
  bottom: 60%;
  width: 150px;
  min-height: 155px;
  padding: 8px;
  border: 0;
  border-radius: 5px;
  background: linear-gradient(135deg, #74533d, #9d7657 52%, #684936);
  box-shadow: 0 10px 20px rgba(64, 45, 32, .16), inset 0 0 0 2px rgba(255,255,255,.10);
  transform: rotate(.5deg);
  text-align: left;
  overflow: visible;
}

.passed-heart-frame:hover {
  transform: translateY(-3px) rotate(-.35deg);
}

.passed-heart-paper {
  display: flex;
  min-height: 139px;
  padding: 10px 10px 9px;
  flex-direction: column;
  background: #f8f1e4;
  border: 1px solid rgba(104, 78, 56, .18);
  box-shadow: inset 0 0 18px rgba(122, 90, 60, .05);
}

.passed-heart-title {
  display: block;
  margin-bottom: 7px;
  color: #8a6a52;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: normal;
  line-height: 1.22;
}

.passed-heart-text {
  display: -webkit-box;
  flex: 1 1 auto;
  overflow: hidden;
  color: #4c433c;
  font-family: Georgia, "Times New Roman", "Noto Serif KR", serif;
  font-size: 11.5px;
  line-height: 1.46;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.passed-heart-text::before {
  content: "“";
  color: #b38b70;
}

.passed-heart-text::after {
  content: "”";
  color: #b38b70;
}

.passed-heart-source {
  display: block;
  margin-top: 5px;
  color: rgba(91, 73, 61, .46);
  font-size: 7px;
  line-height: 1;
  letter-spacing: .03em;
  text-align: center;
  white-space: nowrap;
}

.passed-heart-frame.is-loading .passed-heart-paper {
  opacity: .62;
}

.passed-heart-frame.is-empty .passed-heart-text {
  color: rgba(76, 67, 60, .58);
  font-family: inherit;
  font-style: italic;
}

.room.night .passed-heart-frame {
  box-shadow: 0 10px 22px rgba(10, 14, 25, .20), inset 0 0 0 2px rgba(255,255,255,.06);
}
