.room-home .room-object[hidden]{display:none!important}
.holiday-decoration{position:absolute;inset:0;pointer-events:none;z-index:4}
.holiday-object{position:absolute;pointer-events:auto;border:0;padding:0;background-color:transparent;background-image:url("holiday-objects.webp");background-repeat:no-repeat;background-size:300% 200%;cursor:pointer;filter:drop-shadow(0 5px 5px #69452588);transition:transform .25s ease}
.holiday-object:hover{transform:translateY(-5px) scale(1.04)}
.holiday-object:focus-visible{outline:3px solid #4f704c;outline-offset:4px;border-radius:12px}
.holiday-roses,.holiday-lantern{left:29%;top:40%;width:11%;aspect-ratio:1}
.holiday-red-roses{background-position:0 0}
.holiday-valentine-card{left:35.5%;top:53%;width:44px;height:44px;background-image:none;filter:none}
.holiday-pink-roses{background-position:50% 0}
.holiday-lantern{background-position:100% 0}
.holiday-ring{left:36%;top:54%;width:44px;height:44px;background-image:none;filter:none}
.holiday-new-year{left:75%;top:59%;width:8%;aspect-ratio:1;background-position:100% 100%}
.holiday-prince{left:75%;top:53%;width:8%;aspect-ratio:1;background-position:0 100%}
.holiday-cake{left:75%;top:58%;width:8%;aspect-ratio:1;background-position:50% 100%}
.holiday-stars{position:absolute;left:50%;top:12%;color:#fff3ad;font-size:32px;text-shadow:0 0 12px #fff}
.holiday-balloons{position:absolute;left:36%;top:3%;width:35%;height:23%;background:radial-gradient(ellipse 10% 21% at 12% 37%,#fff0df 95%,transparent 100%),radial-gradient(ellipse 9% 20% at 45% 22%,#e9b2b3 95%,transparent 100%),radial-gradient(ellipse 10% 21% at 80% 39%,#e8ca8e 95%,transparent 100%);filter:drop-shadow(2px 3px 3px #725a4a77)}
.holiday-balloons::after{content:"";position:absolute;inset:37% 12% 0;background:linear-gradient(81deg,transparent 15%,#aa907c 15.5%,transparent 16%) left/33% 100% no-repeat,linear-gradient(90deg,transparent 49%,#aa907c 49.5%,transparent 50%) center/33% 100% no-repeat,linear-gradient(99deg,transparent 83%,#aa907c 83.5%,transparent 84%) right/33% 100% no-repeat;opacity:.7}
.holiday-dialog{width:min(600px,calc(100% - 24px));max-height:calc(100dvh - 30px);padding:0;border:0;background:transparent;color:#4e5e48;overflow:visible}
.holiday-dialog::backdrop{background:rgba(44,32,24,.68);backdrop-filter:blur(3px)}
.holiday-paper{max-height:calc(100dvh - 48px);overflow:auto;padding:clamp(28px,6vw,60px);background:#fff6df;border:12px solid #f1dfbd;border-radius:8px;box-shadow:0 18px 55px #261c16a6;font-family:'STKaiti','KaiTi',serif;text-align:center;line-height:1.9}
.holiday-paper h2{margin:0 0 18px;font-size:clamp(25px,4vw,40px)}
.holiday-paper p{font-size:clamp(20px,3vw,30px);margin:14px 0}
.holiday-envelope{display:block;width:min(260px,70vw);aspect-ratio:1;margin:auto;border:0;background:transparent url("holiday-objects.webp") 100% 100%/300% 200% no-repeat;cursor:pointer;font-size:0}
.holiday-envelope:focus-visible{outline:3px solid #4f704c;outline-offset:3px}
.holiday-mini-card{display:block;width:min(260px,66vw);aspect-ratio:3/2;margin:8px auto;border:1px solid #ceb992;border-radius:5px;background:linear-gradient(140deg,#fffaf0,#f0e1c0);box-shadow:2px 8px 16px #5e48394d;transform:rotate(-3deg);cursor:pointer}
.holiday-mini-card::after{content:"点开这张小卡片";color:#62735c;font:20px 'STKaiti','KaiTi',serif}
.holiday-mini-card:focus-visible{outline:3px solid #4f704c;outline-offset:3px}
.holiday-dialog.is-bubble .holiday-paper{border-radius:35px;background:#fff8e9}
.holiday-dialog.is-bubble .holiday-paper::after{content:"";display:block;width:32px;height:32px;margin:10px auto -75px;background:#fff8e9;transform:rotate(45deg)}
.holiday-dialog.is-valentine .holiday-paper p:last-child{text-align:right}
.holiday-close{position:absolute;right:-8px;top:-12px;z-index:2;width:44px;height:44px;border:0;border-radius:50%;background:#536b4d;color:white;font-size:28px;cursor:pointer}
.room-paused .holiday-object{transition:none}
@media(max-width:600px){.holiday-roses,.holiday-lantern{left:25%;top:34%;width:22%}.holiday-valentine-card{left:38%;top:40%}.holiday-ring{left:38%;top:41%}.holiday-new-year{left:80%;top:59%;width:18%}.holiday-prince{left:80%;top:51%;width:18%}.holiday-cake{left:80%;top:59%;width:18%}.holiday-stars{left:46%;top:13%}.holiday-balloons{left:20%;top:4%;width:55%;height:18%}}
@media(prefers-reduced-motion:reduce){.holiday-object{transition:none}.holiday-object:hover{transform:none}.holiday-dialog::backdrop{backdrop-filter:none}}

/* Approved holiday compositions are part of the room image. Buttons remain
   independent, transparent hotspots aligned with the objects in that image. */
.room-home[data-holiday="new-year"] .room-scene{background-image:url("holiday-room-new-year.webp")!important}
.room-home[data-holiday="valentine"] .room-scene{background-image:url("holiday-room-valentine.webp")!important}
.room-home[data-holiday="qixi"] .room-scene{background-image:url("holiday-room-qixi.webp")!important}
.room-home[data-holiday="lantern"] .room-scene{background-image:url("holiday-room-lantern.webp")!important}
.room-home[data-holiday="prince"] .room-scene{background-image:url("holiday-room-prince.webp")!important}
.room-home[data-holiday="birthday"] .room-scene{background-image:url("holiday-room-birthday.webp")!important}
.room-home[data-holiday="birthday"] .room-header h1{display:none}
.room-home[data-holiday="new-year"].new-year-opened .room-scene{background-image:url("holiday-room-new-year-opened.webp")!important}
.room-home.new-year-opened .holiday-new-year{display:none}
.holiday-object{background-image:none;filter:none;touch-action:manipulation}
.holiday-roses{left:28%;top:41%;width:12%;height:22%;aspect-ratio:auto}
.holiday-valentine-card{left:36%;top:52%;width:5%;height:10%;min-width:44px;min-height:44px}
.holiday-lantern{left:23%;top:44%;width:10%;height:20%;aspect-ratio:auto}
.holiday-ring{left:33%;top:55%;width:6%;height:9%;min-width:44px;min-height:44px}
.holiday-new-year{left:43%;top:34%;width:17%;height:20%;aspect-ratio:auto}
.holiday-prince{left:37%;top:45%;width:13%;height:15%;aspect-ratio:auto}
.holiday-cake{left:66%;top:52%;width:11%;height:17%;aspect-ratio:auto}
.room-home[data-holiday="birthday"] .object-music{width:9%}
.holiday-object:hover{transform:none}
.holiday-object:hover::after,.holiday-object:focus-visible::after{content:attr(aria-label);position:absolute;left:50%;bottom:100%;width:max-content;max-width:220px;padding:6px 10px;border-radius:8px;background:#fff8e9;color:#50654a;font:14px sans-serif;transform:translateX(-50%);box-shadow:0 3px 10px #4d392755}

/* The narrow viewport crops the room painting; keep its objects discoverable
   with small matching cutouts while preserving the same room and handlers. */
@media(max-width:700px){
  .holiday-roses,.holiday-lantern,.holiday-prince,.holiday-cake,.holiday-new-year{background-image:url("holiday-objects.webp");background-repeat:no-repeat;background-size:300% 200%;filter:drop-shadow(0 3px 5px #634f3e88)}
  .holiday-red-roses{background-position:0 0}
  .holiday-pink-roses{background-position:50% 0}
  .holiday-lantern{background-position:100% 0}
  .holiday-prince{background-position:0 100%}
  .holiday-cake{background-position:50% 100%}
  .holiday-new-year{background-position:100% 100%}
  .holiday-roses,.holiday-lantern{left:17%;top:43%;width:19%;height:auto;aspect-ratio:1}
  .holiday-valentine-card,.holiday-ring{left:35%;top:51%;width:44px;height:44px}
  .holiday-prince{left:38%;top:48%;width:18%;height:auto;aspect-ratio:1}
  .holiday-cake{left:72%;top:57%;width:17%;height:auto;aspect-ratio:1}
  .holiday-new-year{left:43%;top:36%;width:20%;height:auto;aspect-ratio:1}
  .room-home[data-holiday="birthday"] .object-music{width:16%}
}

/* The holiday painting and its buttons share one 1672:941 coordinate system. */
.room-home[data-holiday]:not([data-holiday=""]) .room-scene{background-size:contain;transform:none}
.holiday-stage{position:absolute;z-index:3;left:50%;top:50%;width:min(100vw,177.68dvh);height:min(100dvh,56.28vw);transform:translate(-50%,-50%);pointer-events:none}
.holiday-stage .room-object{pointer-events:auto}
.room-home[data-holiday]:not([data-holiday=""]) .holiday-stage .object-calendar{left:11%;top:5%;width:27%;height:39%}
.room-home[data-holiday]:not([data-holiday=""]) .holiday-stage .object-album{left:76%;right:auto;top:14%;width:12%;height:25%}
.room-home[data-holiday]:not([data-holiday=""]) .holiday-stage .object-notebook{left:35%;top:56%;width:20%;height:12%}
.room-home[data-holiday]:not([data-holiday=""]) .holiday-stage .object-music{left:58%;top:45%;width:11%;height:22%}
.room-home[data-holiday]:not([data-holiday=""]) .holiday-stage .object-bouquet{left:28%;top:41%;width:13%;height:22%}
.room-home[data-holiday="birthday"] .holiday-stage .object-music{width:10%}
.room-home[data-holiday="birthday"] .holiday-cake{left:65%;top:49%;width:10%;height:17%}
.room-home[data-holiday="prince"] .holiday-prince{left:37%;top:46%;width:13%;height:16%}
.room-home[data-holiday="new-year"] .holiday-new-year{left:43%;top:34%;width:16%;height:20%}

/* Letters and cards are physical paper, rather than generic modal panels. */
.holiday-dialog{width:min(680px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
.holiday-paper{position:relative;width:100%;max-height:calc(100dvh - 40px);overflow:auto;box-sizing:border-box;background:#f8ebcb;border:1px solid #cdb68b;border-radius:3px;box-shadow:0 14px 0 #bba379,0 20px 55px #24180f99;transform:rotate(-1deg);text-align:left}
.holiday-paper::before,.holiday-paper::after{position:absolute;color:#879073;opacity:.8;font-family:serif;pointer-events:none}
.holiday-paper::before{content:'❀  ❧';left:14px;top:8px;font-size:36px}
.holiday-paper::after{content:'❧  ❀';right:14px;bottom:6px;font-size:36px}
.holiday-paper h2{font-size:clamp(25px,4vw,38px);text-align:center;color:#52674b}
.holiday-paper p{font-size:clamp(19px,2.7vw,27px);line-height:1.85;color:#4b5b46}
.holiday-dialog[data-step="closed"] .holiday-paper{display:grid;place-items:center;min-height:280px;background:transparent;border:0;box-shadow:none;transform:none}
.holiday-dialog[data-step="closed"] .holiday-paper::before,.holiday-dialog[data-step="closed"] .holiday-paper::after{display:none}
.holiday-dialog[data-kind="valentine"]{width:min(560px,calc(100vw - 28px))}
.holiday-dialog[data-kind="valentine"] .holiday-paper{min-height:360px;padding:64px 58px 48px;background:linear-gradient(145deg,#fff9e8,#f5e4ca);border:9px double #e5cfa8;border-radius:5px;transform:rotate(-2deg)}
.holiday-dialog[data-kind="valentine"] .holiday-paper::before{content:'❀  ❦';color:#a7514c}
.holiday-dialog[data-kind="valentine"] .holiday-paper::after{content:'❦  ❀';color:#a7514c}
.holiday-dialog[data-kind="valentine"] .holiday-paper p:first-of-type{text-align:center;margin-top:45px}
.holiday-dialog[data-kind="valentine"] .holiday-paper p:last-of-type{text-align:right;margin-top:34px}
.holiday-dialog[data-kind="ring"]{width:min(500px,calc(100vw - 28px))}
.holiday-dialog[data-kind="ring"] .holiday-paper{min-height:320px;padding:66px 42px 50px;background:linear-gradient(145deg,#fff7e3,#f2dfbd);border:9px double #d3ac79;border-radius:20px;transform:rotate(-3deg)}
.holiday-dialog[data-kind="ring"] .holiday-paper h2{font-size:clamp(22px,3vw,30px)}
.holiday-dialog[data-kind="ring"] .holiday-paper p{text-align:center}
.holiday-dialog[data-kind="new-year"] .holiday-paper,.holiday-dialog[data-kind="birthday"] .holiday-paper{background:repeating-linear-gradient(0deg,transparent 0 39px,#ccb9984d 40px 41px),#fff4d9;border:8px solid #ead6ae;border-radius:2px;padding:70px clamp(32px,7vw,75px) 65px;min-height:390px}
.holiday-dialog[data-kind="birthday"] .holiday-paper p{margin:22px 0}
.holiday-dialog[data-kind="bubble"] .holiday-paper{border-radius:35px;background:#fff8e9;transform:none;text-align:center}
.holiday-close{right:-10px;top:-12px}
@media(max-width:700px){
  .holiday-stage{left:0;top:0;width:100%;height:100%;transform:none}
  .room-home[data-holiday]:not([data-holiday=""]) .room-scene{background-size:cover}
  .room-home[data-holiday]:not([data-holiday=""]) .holiday-stage .object-calendar{left:3%;top:11%;width:29%;height:34%}
  .room-home[data-holiday]:not([data-holiday=""]) .holiday-stage .object-album{left:auto;right:2%;top:12%;width:29%;height:26%}
  .room-home[data-holiday]:not([data-holiday=""]) .holiday-stage .object-notebook{left:32%;top:58%;width:27%;height:17%}
  .room-home[data-holiday]:not([data-holiday=""]) .holiday-stage .object-music{left:59%;top:49%;width:21%;height:18%}
  .room-home[data-holiday]:not([data-holiday=""]) .holiday-stage .object-bouquet{left:17%;top:43%;width:19%;height:19%}
  .room-home[data-holiday="birthday"] .holiday-cake{left:72%;top:57%;width:17%;height:auto}
  .holiday-paper{transform:none!important}
  .holiday-dialog[data-kind="valentine"] .holiday-paper,.holiday-dialog[data-kind="ring"] .holiday-paper{padding:50px 25px 35px}
}

/* Illustrated paper assets; all words remain accessible live HTML. */
.holiday-dialog[data-kind="valentine"]{width:min(580px,110dvh,calc(100vw - 28px))}
.holiday-dialog[data-kind="ring"]{width:min(460px,72dvh,calc(100vw - 28px))}
.holiday-dialog[data-kind="new-year"],.holiday-dialog[data-kind="birthday"]{width:min(540px,72dvh,calc(100vw - 28px))}
.holiday-dialog[data-kind="valentine"] .holiday-paper,.holiday-dialog[data-kind="ring"] .holiday-paper,.holiday-dialog[data-kind="new-year"] .holiday-paper,.holiday-dialog[data-kind="birthday"] .holiday-paper{min-height:0;border:0;border-radius:0;box-shadow:none;transform:none;background-repeat:no-repeat;background-size:100% 100%;overflow:auto}
.holiday-dialog[data-kind="valentine"] .holiday-paper::before,.holiday-dialog[data-kind="valentine"] .holiday-paper::after,.holiday-dialog[data-kind="ring"] .holiday-paper::before,.holiday-dialog[data-kind="ring"] .holiday-paper::after,.holiday-dialog[data-kind="new-year"] .holiday-paper::before,.holiday-dialog[data-kind="new-year"] .holiday-paper::after,.holiday-dialog[data-kind="birthday"] .holiday-paper::before,.holiday-dialog[data-kind="birthday"] .holiday-paper::after{display:none}
.holiday-dialog[data-kind="valentine"] .holiday-paper{aspect-ratio:4/3;padding:12% 12% 9%;background:url("holiday-paper-valentine.webp") center/100% 100% no-repeat}
.holiday-dialog[data-kind="valentine"] .holiday-paper p:first-of-type{margin-top:6%}
.holiday-dialog[data-kind="valentine"] .holiday-paper p:last-of-type{margin-top:6%}
.holiday-dialog[data-kind="ring"] .holiday-paper{aspect-ratio:4/5;padding:36% 11% 12%;background:url("holiday-paper-ring.webp") center/100% 100% no-repeat}
.holiday-dialog[data-kind="ring"] .holiday-paper h2{font-size:clamp(21px,3vw,29px)}
.holiday-dialog[data-kind="new-year"] .holiday-paper,.holiday-dialog[data-kind="birthday"] .holiday-paper{aspect-ratio:4/5;padding:21% 13% 14%;background:url("holiday-paper-letter.webp") center/100% 100% no-repeat}
.holiday-dialog[data-kind="new-year"] .holiday-paper h2,.holiday-dialog[data-kind="birthday"] .holiday-paper h2{margin-bottom:9%}
.holiday-dialog[data-kind="birthday"] .holiday-paper p{margin:7% 0}
.holiday-mini-card{border:0;box-shadow:none;background:transparent url("holiday-paper-ring.webp") center/contain no-repeat}
.holiday-mini-card::after{content:'打开卡片';display:grid;place-items:center;height:100%;font-size:18px}
.holiday-dialog[data-step="closed"] .holiday-paper{aspect-ratio:auto;min-height:280px;padding:10px;background:transparent;overflow:visible}
@media(max-width:700px){
  .holiday-dialog[data-kind="valentine"] .holiday-paper{padding:12% 11% 8%}
  .holiday-dialog[data-kind="ring"] .holiday-paper{padding:36% 10% 10%}
  .holiday-dialog[data-kind="new-year"] .holiday-paper,.holiday-dialog[data-kind="birthday"] .holiday-paper{padding:23% 13% 13%}
  .holiday-dialog[data-kind="valentine"] .holiday-paper p,.holiday-dialog[data-kind="ring"] .holiday-paper p,.holiday-dialog[data-kind="new-year"] .holiday-paper p,.holiday-dialog[data-kind="birthday"] .holiday-paper p{font-size:clamp(17px,4.2vw,24px)}
}
@media(min-width:701px){
  .room-home[data-holiday="birthday"]:not([data-holiday=""]) .room-scene{background-size:100% 100%}
  .room-home[data-holiday="birthday"] .holiday-stage{left:0;top:0;width:100%;height:100%;transform:none}
  .room-home[data-holiday="birthday"] .holiday-stage .room-object.object-album{
    left:94%;top:24%;width:5.2%;height:12%;
    background: url("holiday-room-new-year.webp") 85.5% 21.5% / 944% 483% no-repeat;
    border-radius:5%;box-shadow:2px 4px 7px #432a2177;
  }
  .room-home[data-holiday="birthday"] .object-album::after{right:0}
}

/* In portrait, keep the cake and music box in the visible crop.
   The stage uses the same cover dimensions and anchor as the painting. */
@media(max-width:700px) and (orientation:portrait){
  .room-home[data-holiday="birthday"] .room-scene{
    background-position:73% center!important;
  }
  .room-home[data-holiday="birthday"] .holiday-stage{
    left:73%;
    top:50%;
    width:max(100vw,177.68dvh);
    height:max(100dvh,56.28vw);
    transform:translate(-73%,-50%);
  }
  .room-home[data-holiday="birthday"] .holiday-stage .room-object{
    display:none;
  }
  .room-home[data-holiday="birthday"] .holiday-cake{
    left:64%;
    top:49%;
    width:10%;
    height:17%;
    background-image:none;
    filter:none;
  }
}
