/* 聖誕限定：手機版（≤640px）裝飾與配色。節後和 xmas-home.css、xmas-home.js 一起刪。
   版面規則同 xmas-home.css：每個裝飾都掛在它裝飾的元素裡，position:absolute，用該元素自己的尺寸對位；不量測、不用 fixed、不擋點擊。
   桌機維持 xmas-home.css 的樣子（這裡新增的圖在桌機一律 display:none）。 */

/* 行銷 Nano Banana 禮物 PNG（流程第 2、4 步與拍立得右下）*/
img.xmas-d.xmas-gift-png{width:54px;height:auto;object-fit:contain;filter:drop-shadow(0 2px 2px rgba(59,47,40,.25))}

/* 桌機不顯示的新增圖 */
img.xmas-d.xmas-bn,
img.xmas-d.xmas-gift-png,
img.xmas-d.xmas-pola-flake,
img.xmas-d.xmas-leather-flake,
.xmas-flakes--img .xmas-flake--e,
.xmas-flakes--img .xmas-flake--f,
.xmas-flakes--img .xmas-flake--g{display:none}

@media (max-width:640px){

  /* ---------- 1. 橫幅：左花圈、右鈴鐺（都在橫幅內，不再從橫幅垂到頂欄）---------- */
  .xmas-banner{font-size:13px;letter-spacing:.06em}
  .xmas-banner img.xmas-bells{display:none}
  img.xmas-d.xmas-bn{display:block}
  .xmas-banner img.xmas-bn--wreath{left:12px;top:50%;width:32px;transform:translateY(-50%);z-index:2}
  .xmas-banner img.xmas-bn--bells{top:3px;width:22px;height:34px;object-fit:cover;object-position:50% 100%;transform-origin:50% 0;animation:xmas-swing 5s ease-in-out infinite}
  .xmas-banner img.xmas-bn--bells-a{right:14px}
  .xmas-banner img.xmas-bn--bells-b{right:42px;animation-delay:1.1s}
  .xmas-banner a{padding:0 52px}

  /* ---------- 2. 主視覺：logo 放大，花圈在標題左下、冬青在標題右側，雪花在鴿子兩側 ---------- */
  .hero__brand{--w:min(236px,66%)}
  img.xmas-d.xmas-wreath{width:calc(var(--w)*.30);left:calc(var(--x0) - var(--w)*.15);top:calc(var(--w)*.70)}
  img.xmas-d.xmas-holly{width:calc(var(--w)*.34);left:calc(var(--x0) + var(--w)*.86);top:calc(var(--w)*.72)}
  .xmas-flakes{inset:0 0 auto 0;width:auto;height:150px}
  .xmas-flakes--img .xmas-flake{display:block;opacity:.95}
  .xmas-flakes--img .xmas-flake--a{width:30px;left:80%;top:10px}
  .xmas-flakes--img .xmas-flake--c{width:24px;left:90%;top:56px}
  .xmas-flakes--img .xmas-flake--d{width:16px;left:76%;top:96px}
  .xmas-flakes--img .xmas-flake--b{width:26px;left:8%;top:24px}
  .xmas-flakes--img .xmas-flake--e{width:18px;left:20%;top:70px}
  .xmas-flakes--img .xmas-flake--f{width:18px;left:5%;top:84px}
  .xmas-flakes--img .xmas-flake--g{width:18px;left:22%;top:10px}

  /* ---------- 3. 拍立得：固定聖誕照片、不傾斜；上緣蝴蝶結、左下松枝、右下禮物、少量雪花 ---------- */
  .hero-pola{transform:none}
  .hero-pola::before{display:none}
  .hero-pola__cap{justify-content:center;padding-right:0}
  img.xmas-d.xmas-bow{width:22%;left:50%;top:-9%;transform:translateX(-50%) rotate(-4deg);z-index:4}
  img.xmas-d.xmas-corner--pola{width:38%;left:-9%;bottom:-6%}
  img.xmas-d.xmas-gift--pola{display:block;width:58px;right:-6%;bottom:-7%;transform:rotate(8deg);transform-origin:100% 100%}
  img.xmas-d.xmas-pola-flake{display:block}
  img.xmas-d.xmas-pola-flake--1{width:22px;right:-3%;top:8%}
  img.xmas-d.xmas-pola-flake--2{width:18px;right:3%;top:20%}
  img.xmas-d.xmas-pola-flake--3{width:17px;left:-3%;top:34%}

  /* ---------- 4. 流程小圖示：1、3 戴聖誕帽，2 咖啡金禮物、4 綠色禮物 ---------- */
  .journey__step.xmas-step--gift img.xmas-hat--ico{display:none}
  img.xmas-d.xmas-gift--step{
    display:block;
    width:56px;
    left:calc(var(--cx) - var(--ico)*.62);
    top:calc(var(--ico)*-.22);
    transform:rotate(-8deg);
    z-index:4;
  }

  /* ---------- 6. 方案卡：聖誕限定＝酒紅框、金邊；標準＝白框（等行銷新圖再加角飾）---------- */
  .xmas-plan{
    background:#602836 var(--noise);
    box-shadow:0 8px 18px rgba(59,47,40,.28), inset 0 0 0 2px rgba(201,162,87,.85);
    padding:16px 16px 14px;
  }
  .xmas-plan .polaroid__photo{box-shadow:0 0 0 3px #F6E7DA}
  .xmas-plan .polaroid__name{color:#F8EBDD}
  .xmas-plan .polaroid__name b{color:#F3D98B}
  .xmas-plan .polaroid__desc{color:#EBDAC6}
  .xmas-plan:has(input:checked) .polaroid__name::after{background:#C9A257;color:#3B2A10}
  .xmas-plan:has(input:focus-visible){outline:3px solid #C9A257;outline-offset:3px}

  /* ---------- 7. 訂單摘要：金色雪花在左下（球仍掛在上緣）---------- */
  img.xmas-d.xmas-leather-flake{display:block;left:14px;bottom:3px;width:26px;z-index:5;filter:drop-shadow(0 1px 2px rgba(0,0,0,.35))}

  /* ---------- 8. 表單分組配色：收件人＝酒紅；訂購人聯絡方式、信封寄件人＝深綠 ---------- */
  .form > fieldset:nth-of-type(1) legend,
  .form > fieldset:nth-of-type(1) .field > label{color:#7A2E3A}
  .form > fieldset:nth-of-type(2) legend,
  .form > fieldset:nth-of-type(2) .field > label,
  .form > fieldset:nth-of-type(3) legend,
  .form > fieldset:nth-of-type(3) .field > label{color:#1F4A33}
  .form > fieldset legend{font-weight:700}
}

/* ---------- 行銷 Nano Banana 新圖：logo 已畫帽（隱藏用 CSS 疊的帽子）---------- */
.xmas-logo-baked img.xmas-hat--hero{display:none}
.xmas-mark-baked img.xmas-hat--brand,.xmas-mark-baked img.xmas-hat--foot{display:none}
img.xmas-d.xmas-plandeco,span.xmas-plandeco{display:none}

@media (max-width:640px){
  /* 頂欄小 logo：帽子畫在圖上，28px 會縮成一小塊紅，放到 34px 才讀得出帽子 */
  .brand img{height:34px}

  /* 5. 寫信區：雪松 bokeh 背景（9:16 單張，上下接續重複；卡片蓋在上面）*/
  #write{background:#F6EFE3 url("../img/xmas/d2-write-bg-m.webp") top center/100% auto repeat-y}

  #write>h2,#write>h2+p{text-shadow:0 0 6px #F6EFE3,0 0 3px #F6EFE3,0 0 10px #F6EFE3}

  /* 6. 方案卡裝飾 */
  .polaroid.xmas-plan--art{padding-bottom:34px}
  .polaroid.xmas-plan--art:not(.xmas-plan){padding-bottom:12px}
  img.xmas-d.xmas-plandeco,span.xmas-plandeco{display:block;position:absolute;pointer-events:none;z-index:4}
  img.xmas-d.xmas-plandeco{height:auto}
  .xmas-plandeco--tl{left:-14px;top:-16px;width:112px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.28))}
  .xmas-plandeco--tr{right:-10px;top:-16px;width:50px;transform:rotate(10deg);filter:drop-shadow(0 2px 2px rgba(0,0,0,.3))}
  .xmas-plandeco--ribbon{left:4%;bottom:-14px;width:92%;filter:drop-shadow(0 2px 2px rgba(0,0,0,.3))}
  span.xmas-plandeco--tag{right:21%;top:-26px;width:44px;height:102px;filter:drop-shadow(0 2px 2px rgba(0,0,0,.3))}
  span.xmas-plandeco--tag img{display:block;width:100%;height:100%}
  span.xmas-plandeco--tag b{position:absolute;left:0;right:0;top:65%;writing-mode:vertical-rl;text-orientation:upright;margin:0 auto;width:1.1em;font:700 13px/1.15 var(--serif);letter-spacing:.12em;color:#F6E7C7;text-shadow:0 1px 1px rgba(0,0,0,.35)}
  .xmas-plan.xmas-plan--art .xmas-badge{top:auto;right:auto;left:10px;bottom:10px}
  img.xmas-plandeco--corner{right:-12px;top:-14px;width:108px;filter:drop-shadow(0 2px 3px rgba(59,47,40,.22))}
}

@media (prefers-reduced-motion:reduce){
  .xmas-banner img.xmas-bn--bells{animation:none !important}
}
