:root {
  --ink:#30372f; --jade:#2e483c; --soft:#65695c; --red:#914539; --line:#d8d2c3; --paper:#faf3e5;
  --sans:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  --song:"Songti SC","Noto Serif CJK SC","Source Han Serif SC",SimSun,Georgia,serif;
  --active-hand:var(--song);
  color:var(--ink); background:#efeae0; font:15px/1.5 var(--sans); color-scheme:light;
}
* { box-sizing:border-box; } html,body { overscroll-behavior-y:contain; overscroll-behavior-x:none; } body,figure,p,h1,h2,h3 { margin:0; } button,input,textarea,a { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; } button,input,textarea { font:inherit; color:inherit; } button:disabled { cursor:default; opacity:.42; }
button,a { touch-action:manipulation; } a { color:var(--jade); } button { background:none; border:0; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible { outline:2px solid #647e68; outline-offset:3px; }
[hidden],.symbols { display:none!important; } .sr { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
svg:not(.symbols):not(.bouquet-svg) { display:block; width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.55; stroke-linecap:round; stroke-linejoin:round; flex:none; }

.topbar {
  min-height:58px; padding:6px clamp(15px,2.4vw,42px);
  display:grid; align-items:center; grid-template-columns:1fr auto 1fr; gap:10px;
  border-bottom:1px solid var(--line);
  background:rgba(253, 250, 243, 0.88);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  position:sticky; top:0; z-index:4;
}
.back,.primary,.secondary,#try,.rail button,.steps,.stage-actions,.url-row { display:flex; align-items:center; justify-content:center; }
.topbar-left { justify-self:start; display:flex; align-items:center; gap:8px; min-width:0; }
.back { text-decoration:none; gap:4px; min-height:42px; color:#464d43; font-size:14px; white-space:nowrap; }
.history-btn {
  display:inline-flex; align-items:center; gap:5px; min-height:32px; padding:0 10px;
  border-radius:999px; border:1px solid #cfc7b6; background:#f7f3e8; color:#3d4a41;
  font-size:12.5px; white-space:nowrap;
}
.history-btn span {
  display:inline-grid; place-items:center; min-width:18px; height:18px; padding:0 5px;
  border-radius:999px; background:var(--jade); color:#fffdf4; font-size:11px; font-variant-numeric:tabular-nums;
}
.history-btn:hover { background:#e8eee3; border-color:#9bb09d; }
.back svg { width:15px; }.steps { gap:8px; }.steps button { min-height:42px; font-size:14px; color:#73796c; padding:0 8px; }
.steps [aria-current] { color:var(--jade); font-weight:650; }.steps span { width:22px; height:1px; background:#c8cdc0; }
.primary,.secondary { gap:8px; min-height:42px; border-radius:999px; padding:0 19px; font-size:14px; font-weight:550; }
.primary { background:var(--jade); color:#fffdf4; box-shadow:0 3px 10px rgba(46,72,60,0.2); }.primary:hover { background:#405c4f; }
.secondary { background:#fffcf6; border:1px solid #c9c4b4; }.secondary:hover{background:#f2eee4;}
.topbar .primary { justify-self:end; }.topbar .primary svg { width:15px; }

#editor { display:grid; grid-template-columns:72px minmax(0,1fr) clamp(252px,23vw,332px); min-height:calc(100svh - 58px); }
.rail {
  background:rgba(250, 246, 237, 0.86); border-right:1px solid var(--line);
  padding:19px 7px; display:flex; align-items:stretch; gap:6px; flex-direction:column;
}
.rail button { gap:5px; flex-direction:column; min-height:61px; font:12px var(--sans); color:#596054; border-radius:10px; }
.rail button svg { width:21px; height:21px; }.rail button[aria-pressed=true] { color:var(--jade); background:#dfe7da; font-weight:550; }
.rail button:hover,.part-item:hover,.template-item:hover { background:#ece8dc; }

/* Warm sunlit wood & linen writing desk stage */
.writing-stage {
  --stock:#faf3e5; position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center;
  min-width:0; gap:clamp(16px,3.2vh,34px); padding:32px clamp(18px,3vw,52px); overflow:hidden;
  background:
    radial-gradient(ellipse 68% 52% at 38% 30%, rgba(255, 252, 244, 0.92) 0%, transparent 66%),
    repeating-linear-gradient(95deg, rgba(142, 112, 74, 0.022) 0 2px, transparent 2px 8px),
    radial-gradient(ellipse at 50% 48%, #f6f1e6 20%, #e7dfd0 100%);
}
.stage-title { display:flex; align-items:center; gap:10px; }
.seal-mark { display:grid; place-items:center; width:24px; height:26px; border:3px double #efe0c9; border-radius:3px 1px 3px 1px; outline:1px solid #a34538; background:#a34538; color:#fff1d8; rotate:-3deg; font:normal 15px/1 var(--song); }
.stage-title h1 { font:550 clamp(22px,2.2vw,31px)/1.35 var(--song); letter-spacing:.07em; }

.folio { position:relative; isolation:isolate; width:min(100%,825px); display:grid; grid-template-columns:.94fr 1.06fr; box-shadow:2px 14px 28px -8px rgba(72, 52, 28, 0.22), 0 2px 5px rgba(72, 52, 28, 0.08); }
.left-leaf,.right-leaf { position:relative; min-width:0; background-color:var(--stock); border:1px solid #d6c8b0; border-bottom:3px double #c6b9a2; }
.left-leaf { display:flex; align-items:center; justify-content:center; flex-direction:column; gap:22px; padding:24px 18px; border-radius:4px 1px 1px 4px; box-shadow:inset -14px 1px 20px -18px #685033; background-image:linear-gradient(90deg,#877b5d0d,transparent 10%,transparent 85%,#79664018); }
.right-leaf {
  display:flex; flex-direction:column; padding:clamp(20px,2.6vw,44px); padding-left:clamp(22px,3vw,46px);
  min-height:clamp(385px,54vh,535px); border-left:0; border-radius:1px 5px 5px 1px;
  box-shadow:inset 14px 1px 18px -17px #6b5236;
  background-image:linear-gradient(92deg,#7c624424,transparent 5%,transparent 93%,#fff5);
}
.left-leaf::after,.right-leaf::after { content:""; pointer-events:none; position:absolute; inset:0; z-index:0; opacity:.22; background:repeating-linear-gradient(7deg,transparent 0 3px,#a3987a16 3px 4px); }
.left-leaf>* , .right-leaf>* { z-index:1; }

.art-mount { position:relative; width:min(72%,208px); aspect-ratio:5/7; background:var(--image) center/cover; border:1px solid #775d3a36; rotate:-3deg; box-shadow:1px 2px 0 #c0ac8d,1px 8px 12px #69503835; }
.art-mount[data-shape="003"] { width:89%; aspect-ratio:1.5; box-shadow:0 1px 0 #b4a185,2px 7px 11px #6950383b; }
.art-fold { position:absolute; inset:0; filter:drop-shadow(0 2px 1px #69583e78); }
.art-fold::after { content:""; position:absolute; inset:0; clip-path:polygon(0 0,100% 0,100% 3%,50% 60%,0 3%); background:linear-gradient(130deg,#fff3,#a38a6817),var(--image) center/cover; }
.art-wax { width:20%; position:absolute; top:58%; left:50%; transform:translate(-50%,-50%); filter:drop-shadow(1px 2px 1px #573c3266); }
.art-to { position:absolute; right:8%; bottom:10%; color:#624237; font:500 clamp(10px,1.15vw,16px) var(--active-hand); }
.art-mount[data-shape="004"] { aspect-ratio:5/7.7; }.art-mount[data-shape="004"]::after { content:attr(data-theme-title); position:absolute; bottom:7%; width:100%; color:#f6dfa1; text-align:center; letter-spacing:.15em; font:500 16px var(--active-hand); }
.art-mount[data-shape="005"],.art-mount[data-shape="007"] { aspect-ratio:4/5; }
.art-mount[data-shape="006"] { aspect-ratio:5/7; }
.art-mount[data-shape="008"] {
  width:min(84%,236px); aspect-ratio:4/5; rotate:0deg; padding:6px;
  background:radial-gradient(ellipse at 50% 40%,#fdf9ef,#ece2cd); border-radius:6px;
}
.art-mount[data-shape="008"] .bouquet-svg { width:100%; height:100%; display:block; overflow:visible; }
.art-mount[data-shape="008"] .bouquet-stem { cursor:pointer; outline:none; }
.art-mount[data-shape="008"] .bouquet-stem:hover .flower-head,
.art-mount[data-shape="008"] .bouquet-stem.active .flower-head { filter:drop-shadow(0 0 6px rgba(196,86,58,0.58)); }
.art-mount[data-shape="008"] .stem-dew { fill:#e5b253; stroke:#fff9ea; stroke-width:1.4; opacity:.85; }
.art-mount[data-shape="008"] .bouquet-stem.active .stem-dew { fill:#c24b3a; opacity:1; }
.art-mount[data-shape="photo"] { width:80%; max-width:250px; aspect-ratio:1.1; border:6px solid #fffcf4; border-bottom-width:19px; rotate:3deg; }
.left-leaf figcaption { max-width:100%; text-align:center; overflow-wrap:anywhere; color:#675d4c; font:13px/1.65 var(--song); letter-spacing:.07em; }

.folio-line { display:flex; align-items:center; justify-content:space-between; gap:8px; font:11px/1.5 var(--sans); letter-spacing:.08em; color:#766b59; border-bottom:1px solid #ab997a58; padding-bottom:8px; }
.budget-hint { margin-left:auto; font-variant-numeric:tabular-nums; color:#8a7d68; letter-spacing:.04em; }
.budget-hint[data-warn] { color:#9c3b2e; font-weight:600; }

.address,.signature,.subtitle-field { display:flex; align-items:center; gap:8px; min-width:0; color:#82624c; font:15px/1.5 var(--active-hand); }
.address { margin-top:clamp(14px,2.1vh,26px); }.address input { font-weight:500; color:#6c2e2b; }
.signature { justify-content:flex-end; margin-top:13px; }.signature input { text-align:right; }
.live-seal {
  flex:none; display:inline-grid; place-items:center;
  min-width:23px; height:23px; padding:1px 4px;
  border:1.5px solid rgba(168, 44, 36, 0.82); border-radius:2px;
  color:rgba(168, 44, 36, 0.88); background:rgba(184, 52, 40, 0.06);
  font:500 10px/1 var(--song); font-style:normal; rotate:-4deg;
}
.right-leaf { position:relative; }
.live-corner-sticker {
  position:absolute; top:10px; right:12px; width:34px; height:34px; pointer-events:none; opacity:.82; z-index:2;
  background-position:center; background-repeat:no-repeat; background-size:contain;
}
.live-corner-sticker[data-sticker="ginkgo"] {
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M18 35 Q20 26 22 20 M22 20 C12 18 7 10 11 5 C15 8 18 11 22 8 C26 11 29 8 33 5 C36 11 31 19 22 20 Z' fill='%23d4a44a' fill-opacity='0.78' stroke='%239c7026' stroke-width='1.2'/%3E%3C/svg%3E");
}
.live-corner-sticker[data-sticker="rose"] {
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M14 34 Q20 24 22 18' stroke='%236b7c58' stroke-width='1.5' fill='none'/%3E%3Ccircle cx='23' cy='14' r='8' fill='%23c46b6e' fill-opacity='0.82'/%3E%3Cpath d='M19 13 Q23 9 27 14 Q23 18 19 13 Z' fill='%239b3f44' fill-opacity='0.65'/%3E%3C/svg%3E");
}
.live-corner-sticker[data-sticker="goldleaf"] {
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpolygon points='10,6 28,4 34,14 24,20' fill='%23dfb45a' fill-opacity='0.72'/%3E%3Cpolygon points='20,18 33,19 35,28 24,25' fill='%23c9953b' fill-opacity='0.65'/%3E%3Cpolygon points='12,15 19,14 16,22' fill='%23f0cf7d' fill-opacity='0.8'/%3E%3C/svg%3E");
}
.live-hand-sign { display:inline-flex; align-items:center; flex:none; }
.live-hand-sign svg { width:72px; height:28px; overflow:visible; }
.live-hand-sign path { fill:none; stroke-width:3.2; stroke-linecap:round; stroke-linejoin:round; }
.right-leaf input,.right-leaf textarea {
  background:transparent; color:#3d3228; border:1px solid transparent; border-radius:3px;
  min-width:0; padding:3px 4px; min-height:30px;
  font:500 clamp(17px,1.48vw,21px)/1.72 var(--active-hand);
}
.right-leaf input { width:100%; }.right-leaf label>span:not(.sr){flex:none;}
.right-leaf input:hover,.right-leaf textarea:hover { border-color:#a896764d; }.right-leaf :is(input,textarea):focus { background:#fffdf545; outline:1px solid #8b9b7e; }
.written-body { display:block; flex:1; min-height:125px; margin:10px -4px 0; }
.written-body textarea { display:block; width:100%; min-height:0; overflow:hidden; resize:none; line-height:1.82; }
.subtitle-field { margin-top:6px; }.subtitle-field input { font-size:17px; color:#865647; }.subtitle-field span { font-size:12px; font-family:var(--sans); }

.stage-actions { gap:6px; padding:4px 6px; background:rgba(253,251,245,0.92); backdrop-filter:blur(6px); border:1px solid #d1ccbe; border-radius:999px; box-shadow:0 4px 14px #463b2912; font:13px var(--sans); }
.page-turn { display:flex; align-items:center; padding-right:5px; border-right:1px solid var(--line); }.page-turn span { padding:0 4px; font-variant-numeric:tabular-nums; }.page-turn button,#try { min-height:38px; border-radius:999px; }
.page-turn button { display:grid; place-items:center; width:34px; }.page-turn svg { width:14px; }#try { gap:7px; padding:0 14px; }#try:hover,.page-turn button:not(:disabled):hover { background:#e6e8dc; }

.inspector { min-width:0; padding:26px clamp(16px,2vw,26px); border-left:1px solid var(--line); background:rgba(251, 249, 242, 0.9); overflow-y:auto; }
.inspector h2 { font:600 20px/1.45 var(--song); margin-bottom:6px; }
.help,.panel-intro { color:var(--soft); font:13px/1.68 var(--sans); overflow-wrap:anywhere; }.panel-intro { margin:0 0 18px; }
.part-list,.template-list { display:grid; gap:6px; }.part-item,.template-item { text-align:left; display:flex; align-items:center; gap:11px; min-height:46px; width:100%; padding:6px 10px; border:1px solid transparent; border-radius:8px; line-height:1.35; }
.part-item[aria-pressed=true],.template-item[aria-pressed=true] { background:#e6ede2; border-color:#b8c6b2; }
.part-item i { font:italic 14px Georgia,serif; color:#6c7463; }.part-item span,.template-item span { font-size:14px; overflow-wrap:anywhere; }
.template-item img { width:33px; height:40px; object-fit:cover; border:1px solid #ac9a7f50; border-radius:2px; }.template-item { min-height:52px; }

.panel-item { border-top:1px solid var(--line); padding-top:14px; margin-top:18px; }
.panel-item h3 { font-size:13px; color:#5b6054; letter-spacing:.04em; margin-bottom:9px; }
.papers { display:flex; gap:6px; flex-wrap:wrap; }
.papers button { min-height:38px; padding:4px 9px; border:1px solid transparent; border-radius:999px; display:flex; align-items:center; gap:5px; font-size:13px; background:#f5f2e9; }
.papers [aria-pressed=true] { border-color:#7f9479; background:#eaf0e6; }
.swatch { width:14px; height:14px; border-radius:50%; border:1px solid #7c786641; background:var(--chip); }

/* Font switcher & poetic inspiration chips */
.font-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.font-chip {
  display:grid; justify-items:center; gap:2px; padding:7px 4px;
  border:1px solid #d5cebe; border-radius:8px; background:#faf7ef;
  transition:border-color .18s ease, background-color .18s ease;
}
.font-chip strong { font-size:16px; font-weight:500; line-height:1.3; color:#3d3228; }
.font-chip small { font-size:11px; color:#6d6a5e; }
.font-chip[aria-pressed=true] { border-color:#72886d; background:#e8efe4; box-shadow:inset 0 0 0 1px #72886d; }

.phrase-list { display:grid; gap:6px; }
.phrase-chip {
  text-align:left; padding:8px 10px; border-radius:8px;
  border:1px solid #dbd4c5; background:#faf7ef; color:#4b4338;
  font:12.5px/1.55 var(--sans); transition:background-color .16s ease, border-color .16s ease;
}
.phrase-chip:hover { background:#f0ece0; border-color:#bfb5a0; }

.image-choice { display:grid; gap:9px; }.image-choice img { width:100%; max-height:170px; object-fit:contain; background:#efece2; border-radius:6px; }
.upload-label { position:relative; cursor:pointer; display:grid; place-items:center; min-height:42px; border:1px solid #b9c4b4; border-radius:8px; background:#f5f7ef; font-size:14px; }
.upload-label:focus-within{outline:2px solid #647e68}.upload-label input { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; }
.text-button { color:var(--jade); font:14px var(--sans); text-decoration:underline; text-underline-offset:4px; padding:7px; min-height:40px; }

/* Packaging & translucent vellum envelope with wax seal customization */
#package {
  display:grid; grid-template-columns:minmax(0,1.06fr) minmax(280px,.94fr); min-height:calc(100svh - 58px);
  gap:clamp(32px,7vw,120px); align-content:center; align-items:center;
  padding:46px max(7vw,calc((100vw - 1170px)/2));
  background:radial-gradient(ellipse at 28% 35%,#fcf9ef,#e8e1d2 82%);
}
.mail-art { display:grid; justify-items:center; gap:14px; width:100%; min-height:260px; }
.envelope {
  --wax-filter:hue-rotate(0deg) saturate(1) brightness(1);
  width:min(100%,500px); aspect-ratio:1.52; position:relative; isolation:isolate; overflow:hidden;
  background:linear-gradient(145deg,rgba(246,238,224,0.86),rgba(238,226,206,0.92) 60%,rgba(226,210,186,0.9));
  rotate:-4deg; border:1px solid #cbb99d; border-radius:4px;
  box-shadow:2px 3px #cbb89e, 6px 24px 36px -12px rgba(84, 62, 38, 0.34);
}
/* Translucent vellum inner card silhouette glowing softly through the envelope */
.vellum-peek {
  position:absolute; inset:10% 14%; z-index:0;
  background:var(--peek) center/cover no-repeat;
  filter:blur(9px) saturate(0.95); opacity:0.34; transform:rotate(2deg);
  border-radius:3px; pointer-events:none;
}
.envelope::before {
  content:""; position:absolute; inset:0; z-index:1; pointer-events:none;
  background:
    linear-gradient(32deg,transparent 46%,#9d866433 46.4%,rgba(244,235,218,0.72) 47%,transparent 47.4%) left bottom/54% 80% no-repeat,
    linear-gradient(-32deg,transparent 46%,#9d866433 46.4%,rgba(244,235,218,0.72) 47%,transparent 47.4%) right bottom/54% 80% no-repeat;
}
.env-flap { position:absolute; inset:0; z-index:2; filter:drop-shadow(0 2px 2px #7c6a5255); pointer-events:none; }
.env-flap::before {
  content:""; position:absolute; inset:0;
  background:linear-gradient(155deg,rgba(250,243,230,0.92),rgba(226,209,184,0.88));
  clip-path:polygon(0 0,100% 0,55% 55%,50% 58%,45% 55%);
}
.wax-press {
  position:absolute; z-index:4; width:20%; aspect-ratio:1; top:55%; left:50%;
  transform:translate(-50%,-50%) rotate(6deg); padding:0; border:0; border-radius:50%;
  background:transparent; cursor:pointer;
}
.mail-wax {
  display:block; width:100%; height:100%; object-fit:contain;
  filter:var(--wax-filter) drop-shadow(1px 4px 4px rgba(82, 48, 32, 0.44));
  transition:transform .22s cubic-bezier(.22,1.3,.36,1), filter .25s ease;
}
.wax-press:hover .mail-wax { transform:scale(1.06); }
.envelope[data-pressing="true"] .mail-wax { transform:scale(0.93) rotate(-3deg); }
.wax-ripple {
  position:absolute; inset:-6%; border-radius:50%; pointer-events:none; opacity:0;
  border:2px solid rgba(182, 132, 68, 0.55);
}
.envelope[data-stamped="true"] .mail-wax { animation:wax-stamp 360ms cubic-bezier(.2,1.35,.35,1); }
.envelope[data-stamped="true"] .wax-ripple { animation:wax-ring 520ms ease-out; }
@keyframes wax-stamp {
  0% { transform:scale(1.28) rotate(-8deg); }
  55% { transform:scale(0.93) rotate(2deg); }
  100% { transform:scale(1) rotate(0deg); }
}
@keyframes wax-ring {
  0% { opacity:0.85; transform:scale(0.84); }
  100% { opacity:0; transform:scale(1.48); }
}
.wax-caption { font:12.5px var(--sans); color:#6d6558; letter-spacing:.04em; text-align:center; }

.postage { position:absolute; z-index:3; top:7%; right:4%; width:10.5%; aspect-ratio:4/5; padding:3px; border:2px dotted #cabca2; background:#fff5de; rotate:4deg; box-shadow:0 1px 2px #846e4f40; }
.postage img { width:100%; height:100%; object-fit:cover; display:block; }
.postmark { position:absolute; z-index:3; top:9%; right:12%; display:grid; align-content:center; width:13%; aspect-ratio:1; border:3px double #9e4b3d8c; border-radius:50%; padding-left:.1em; text-align:center; color:#944639; rotate:13deg; font:normal clamp(9px,1vw,14px)/1.1 var(--song); letter-spacing:.12em; }
.mail-to,.mail-from { position:absolute; z-index:3; bottom:15%; right:9%; max-width:82%; font:500 clamp(17px,2.2vw,29px) var(--active-hand); color:#4c382c; overflow-wrap:anywhere; }
.mail-from { bottom:6%; font-size:14px; color:#725c46; }

.delivery { max-width:480px; }
.edition { color:var(--red); text-transform:uppercase; font:13px/1.5 Georgia,serif; letter-spacing:.13em; }
.delivery h1 { font:550 clamp(28px,4vw,52px)/1.35 var(--song); letter-spacing:.04em; margin:4px 0 10px; }
#delivery-title { color:#555d51; margin-bottom:16px; }
.wax-picker { display:flex; align-items:center; gap:9px; margin:12px 0 4px; flex-wrap:wrap; }
.wax-label { font-size:13px; color:#5e6256; margin-right:4px; }
.wax-dot {
  width:28px; height:28px; border-radius:50%; padding:0;
  background:radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--wax-hex) 72%, white), var(--wax-hex));
  border:2px solid rgba(255,252,245,0.85);
  box-shadow:0 2px 5px rgba(56,36,24,0.22);
  transition:transform .16s ease, box-shadow .16s ease;
}
.wax-dot[aria-pressed="true"] { transform:scale(1.16); box-shadow:0 0 0 2px var(--jade), 0 3px 8px rgba(56,36,24,0.28); }
.wax-motif {
  position:absolute; inset:20%; border-radius:50%; display:grid; place-items:center; pointer-events:none;
}
.wax-motif::after {
  content:""; width:86%; height:86%; display:block;
  background-position:center; background-repeat:no-repeat; background-size:contain;
}
.envelope[data-motif]:not([data-motif="rose"]) .wax-motif {
  background:radial-gradient(circle at 38% 34%, #b53a36, #7b1d1c 74%, #5e1414);
  box-shadow:inset 0 2px 4px rgba(32,10,8,0.58), inset 0 -1px 2px rgba(255,220,210,0.18), 0 0 0 2px rgba(68,16,14,0.4);
  filter:var(--wax-filter);
}
.envelope[data-motif="magnolia"] .wax-motif::after {
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Ccircle cx='24' cy='24' r='20.5' fill='none' stroke='%23460d0e' stroke-width='1.1' opacity='0.55'/%3E%3Ccircle cx='24' cy='23.3' r='20.5' fill='none' stroke='%23f4c2b8' stroke-width='0.75' opacity='0.45'/%3E%3Cg transform='translate(0.7,1.3)' fill='%233d090a' stroke='%233d090a' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round' opacity='0.68'%3E%3Cpath d='M24 10 C28.5 14 28.5 23 24 29 C19.5 23 19.5 14 24 10 Z'/%3E%3Cpath d='M15.5 15 C20 15.5 23 22 24 29 C18 26 14 20 15.5 15 Z'/%3E%3Cpath d='M32.5 15 C28 15.5 25 22 24 29 C30 26 34 20 32.5 15 Z'/%3E%3Cpath d='M11.5 24 C16 23 20.5 25.5 24 29 C18.5 30.5 13 28.5 11.5 24 Z'/%3E%3Cpath d='M36.5 24 C32 23 27.5 25.5 24 29 C29.5 30.5 35 28.5 36.5 24 Z'/%3E%3Cpath d='M24 29 Q21 34 15 37.5' fill='none' stroke-width='1.9'/%3E%3Cpath d='M25.5 32 Q30.5 31.2 32.5 34.2 Q28.2 36 25.5 32 Z'/%3E%3C/g%3E%3Cg fill='%23cc5d55' stroke='%23f7cfc4' stroke-width='0.95' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.5 24 C16 23 20.5 25.5 24 29 C18.5 30.5 13 28.5 11.5 24 Z'/%3E%3Cpath d='M36.5 24 C32 23 27.5 25.5 24 29 C29.5 30.5 35 28.5 36.5 24 Z'/%3E%3Cpath d='M15.5 15 C20 15.5 23 22 24 29 C18 26 14 20 15.5 15 Z'/%3E%3Cpath d='M32.5 15 C28 15.5 25 22 24 29 C30 26 34 20 32.5 15 Z'/%3E%3Cpath d='M24 10 C28.5 14 28.5 23 24 29 C19.5 23 19.5 14 24 10 Z' fill='%23d96e66'/%3E%3Cpath d='M24 29 Q21 34 15 37.5' fill='none' stroke='%23f4c6ba' stroke-width='1.7'/%3E%3Cpath d='M25.5 32 Q30.5 31.2 32.5 34.2 Q28.2 36 25.5 32 Z'/%3E%3C/g%3E%3C/svg%3E");
}
.envelope[data-motif="snow"] .wax-motif::after {
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Ccircle cx='24' cy='24' r='20.5' fill='none' stroke='%23460d0e' stroke-width='1.1' opacity='0.55'/%3E%3Ccircle cx='24' cy='23.3' r='20.5' fill='none' stroke='%23f4c2b8' stroke-width='0.75' opacity='0.45'/%3E%3Cg transform='translate(0.7,1.2)' fill='none' stroke='%233d090a' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round' opacity='0.7'%3E%3Cpath d='M24 9.5 V38.5 M20.8 13.4 L24 16.2 L27.2 13.4 M20.8 34.6 L24 31.8 L27.2 34.6'/%3E%3Cpath d='M24 9.5 V38.5 M20.8 13.4 L24 16.2 L27.2 13.4 M20.8 34.6 L24 31.8 L27.2 34.6' transform='rotate(60 24 24)'/%3E%3Cpath d='M24 9.5 V38.5 M20.8 13.4 L24 16.2 L27.2 13.4 M20.8 34.6 L24 31.8 L27.2 34.6' transform='rotate(120 24 24)'/%3E%3Cpolygon points='24,19.8 27.6,21.9 27.6,26.1 24,28.2 20.4,26.1 20.4,21.9' fill='%233d090a'/%3E%3C/g%3E%3Cg fill='none' stroke='%23f6cdc2' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M24 9.5 V38.5 M20.8 13.4 L24 16.2 L27.2 13.4 M20.8 34.6 L24 31.8 L27.2 34.6'/%3E%3Cpath d='M24 9.5 V38.5 M20.8 13.4 L24 16.2 L27.2 13.4 M20.8 34.6 L24 31.8 L27.2 34.6' transform='rotate(60 24 24)'/%3E%3Cpath d='M24 9.5 V38.5 M20.8 13.4 L24 16.2 L27.2 13.4 M20.8 34.6 L24 31.8 L27.2 34.6' transform='rotate(120 24 24)'/%3E%3Cpolygon points='24,19.8 27.6,21.9 27.6,26.1 24,28.2 20.4,26.1 20.4,21.9' fill='%23d66b63'/%3E%3C/g%3E%3C/svg%3E");
}
.envelope[data-motif="knot"] .wax-motif::after {
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Ccircle cx='24' cy='24' r='20.5' fill='none' stroke='%23460d0e' stroke-width='1.1' opacity='0.55'/%3E%3Ccircle cx='24' cy='23.3' r='20.5' fill='none' stroke='%23f4c2b8' stroke-width='0.75' opacity='0.45'/%3E%3Cg transform='translate(0.7,1.3)' fill='none' stroke='%233d090a' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round' opacity='0.72'%3E%3Cpath d='M24 15 L33 24 L24 33 L15 24 Z M19.5 19.5 L28.5 28.5 M28.5 19.5 L19.5 28.5'/%3E%3Cpath d='M21.4 16 C20 10.5 28 10.5 26.6 16 M21.4 32 C20 37.5 28 37.5 26.6 32 M16 21.4 C10.5 20 10.5 28 16 26.6 M32 21.4 C37.5 20 37.5 28 32 26.6'/%3E%3Cpath d='M17 19.8 C13.6 17 17 13.6 19.8 17 M28.2 17 C31 13.6 34.4 17 31 19.8 M31 28.2 C34.4 31 31 34.4 28.2 31 M19.8 31 C17 34.4 13.6 31 17 28.2'/%3E%3Cpath d='M24 10.8 V8.2 M22.5 36.2 L20.8 40.8 M24 36.4 V41.2 M25.5 36.2 L27.2 40.8' stroke-width='1.8'/%3E%3C/g%3E%3Cg fill='none' stroke='%23f5c8bc' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M24 15 L33 24 L24 33 L15 24 Z M19.5 19.5 L28.5 28.5 M28.5 19.5 L19.5 28.5'/%3E%3Cpath d='M21.4 16 C20 10.5 28 10.5 26.6 16 M21.4 32 C20 37.5 28 37.5 26.6 32 M16 21.4 C10.5 20 10.5 28 16 26.6 M32 21.4 C37.5 20 37.5 28 32 26.6'/%3E%3Cpath d='M17 19.8 C13.6 17 17 13.6 19.8 17 M28.2 17 C31 13.6 34.4 17 31 19.8 M31 28.2 C34.4 31 31 34.4 28.2 31 M19.8 31 C17 34.4 13.6 31 17 28.2'/%3E%3Cpath d='M24 10.8 V8.2 M22.5 36.2 L20.8 40.8 M24 36.4 V41.2 M25.5 36.2 L27.2 40.8' stroke-width='1.45'/%3E%3C/g%3E%3C/svg%3E");
}
.motif-picker { display:flex; align-items:center; gap:7px; margin:10px 0 4px; flex-wrap:wrap; }
.motif-chip {
  min-height:30px; padding:0 10px; border-radius:999px;
  border:1px solid #d2cab9; background:#faf7ef; font-size:12.5px; color:#524b40;
}
.motif-chip[aria-pressed="true"] { border-color:var(--jade); background:#e8efe4; color:var(--jade); font-weight:550; }
.postmark-field { display:flex; align-items:center; gap:10px; margin:10px 0 2px; font-size:13px; color:#5e6256; }
.postmark-field input {
  width:136px; padding:5px 10px; border:1px solid #cfc6b4; border-radius:8px;
  background:#fffdf7; font-size:13px; color:var(--ink);
}
.wish-input {
  width:100%; padding:8px 10px; border:1px solid #d5cebe; border-radius:8px;
  background:#faf7ef; font-size:13px; color:var(--ink);
}

.delivery-methods { display:grid; gap:9px; margin:18px 0 9px; }.delivery-methods button { min-height:46px; }
#share-result { margin:17px 0 4px; }#share-result label { font-size:13px; } .url-row { margin:5px 0 8px; }
.url-row input { width:100%; min-width:0; padding:9px 11px; background:#fffdf7; border:1px solid #c4c9bb; border-radius:8px 0 0 8px; }
.url-row button { align-self:stretch; flex:none; background:#e0e7d9; padding:0 14px; border-radius:0 8px 8px 0; min-width:5em; }
.share-quick-actions { display:flex; flex-wrap:wrap; gap:7px; margin:9px 0 10px; }
.share-chip {
  display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:0 12px;
  border-radius:999px; border:1px solid #c9c3b3; background:#fffcf6; color:#394238;
  font-size:13px; text-decoration:none;
}
.share-chip:hover { background:#ece8dc; }
.share-chip.primary-chip { background:var(--jade); border-color:var(--jade); color:#fffdf4; font-weight:550; }
.share-chip.primary-chip:hover { background:#405c4f; }
.qr-card-box {
  margin-top:12px; padding:12px; border:1px solid #d7cebc; border-radius:12px;
  background:rgba(255,252,245,.82); display:grid; grid-template-columns:126px minmax(0,1fr); gap:12px; align-items:center;
}
.qr-card-box img { display:block; width:100%; height:auto; border-radius:8px; border:1px solid #ded4c1; box-shadow:0 4px 12px rgba(64,46,28,.12); }
.qr-card-meta { display:grid; gap:8px; justify-items:start; min-width:0; }
@media(max-width:420px) {
  .topbar { grid-template-columns:auto 1fr auto; gap:4px; padding:5px 8px; }
  .topbar-left { gap:4px; }
  .back { font-size:13px; gap:2px; }
  .steps { gap:2px; }
  .steps span { width:8px; }
  .steps button { padding:0 4px; font-size:13px; }
  .topbar .primary { padding:0 10px; font-size:13px; gap:3px; }
  .qr-card-box { grid-template-columns:1fr; justify-items:center; text-align:center; }
  .qr-card-box img { width:min(200px,78%); }
  .qr-card-meta { justify-items:center; }
  .history-btn { padding:0 7px; font-size:11.5px; gap:3px; min-height:28px; }
}
#visit { font-size:13px; }#return-edit { margin-top:9px; padding-left:0; }
#notice { position:fixed; z-index:5; bottom:max(15px,env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); max-width:min(92vw,540px); width:max-content; background:#2f4135; color:#fffdf4; padding:9px 16px; box-shadow:0 4px 16px #282d2645; border-radius:999px; font-size:13px; }
#notice[data-error]{background:#814236;}

@media(min-width:1500px){.writing-stage{gap:38px}.folio{width:min(100%,900px)}}
@media(max-width:1050px) and (min-width:761px){#editor{grid-template-columns:60px minmax(0,1fr) 225px}.writing-stage{padding:26px 15px}.right-leaf{padding:22px 17px}.left-leaf{padding:15px 8px}.stage-title h1{font-size:23px}.inspector{padding:22px 13px}.art-mount{width:81%}}
@media(max-width:760px){
 .topbar{min-height:53px;padding:5px 12px}.steps{gap:2px}.steps span{width:14px}.topbar .primary{min-height:38px;padding:0 13px}
 #editor{display:flex;flex-direction:column;min-height:calc(100svh - 53px)}
 .rail{order:1;flex-direction:row;justify-content:center;padding:5px 10px;border:0;border-block:1px solid var(--line)}
 .rail button{min-width:0;flex:1;max-width:100px;min-height:40px;flex-direction:row;font-size:13px;gap:6px}.rail button svg{width:17px;height:17px}
 .writing-stage{order:0;padding:18px 12px 14px;gap:12px}.stage-title{gap:8px}.stage-title h1{font-size:21px}.seal-mark{width:20px;height:22px;font-size:14px}
 .folio{max-width:570px;grid-template-columns:minmax(0,.68fr) minmax(0,1fr)}.right-leaf{min-height:290px;padding:18px 14px}.left-leaf{padding:14px 7px;gap:12px}
 .art-mount{width:81%}.left-leaf figcaption{letter-spacing:0;font-size:11px}.art-mount[data-shape="003"]{width:91%}
 .address{margin-top:9px}.written-body{min-height:98px;margin-top:4px}.written-body textarea{font-size:17px;line-height:1.72}.signature{margin-top:4px}.right-leaf input{font-size:17px;line-height:1.45}
 .stage-actions{padding:3px 6px}.page-turn button,#try{min-height:37px}
 .inspector{order:2;padding:16px max(16px,calc((100vw - 560px)/2)) 28px;border:0}.inspector h2{font-size:19px}.panel-intro{margin-bottom:11px}.part-list,.template-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 #package{min-height:calc(100svh - 53px);grid-template-columns:1fr;gap:20px;justify-items:center;padding:28px 20px}.mail-art{min-height:0}.envelope{width:min(78vw,350px)}.delivery{width:min(100%,460px)}.delivery h1{font-size:31px}.delivery-methods{margin-top:14px}
}
@media(max-width:510px){
 .folio{display:block;width:min(100%,410px)}.left-leaf{height:66px;flex-direction:row;justify-content:flex-start;gap:15px;padding:8px 19px;background-color:#ece3d0;border:1px solid #d5c9b4;border-bottom:0;border-radius:4px 4px 0 0;box-shadow:none}
 .art-mount,.art-mount[data-shape="003"],.art-mount[data-shape="004"],.art-mount[data-shape="005"],.art-mount[data-shape="008"],.art-mount[data-shape="photo"]{width:auto;height:46px;flex:none}.art-mount[data-shape="photo"]{border-width:2px;border-bottom-width:4px}
 .art-to,.art-mount[data-shape="004"]::after{display:none}.left-leaf figcaption{font-size:13px}.right-leaf{border:1px solid #d5c9b4;border-bottom:3px double #c8bda8;border-radius:0 0 4px 4px;min-height:258px;padding:13px 19px 12px;box-shadow:inset 0 9px 12px -13px #775b36}
 .folio-line{padding-bottom:5px}.written-body{min-height:92px}.right-leaf textarea{font-size:16.5px}.signature input{max-width:72%}
}
@media(max-width:350px){.stage-title h1{font-size:19px}.writing-stage{padding:12px 8px;gap:9px}.left-leaf{height:53px}.left-leaf .art-mount{height:36px}.right-leaf{padding:11px 13px}.steps button{padding:0 5px}.part-item{padding:6px}.topbar .primary{gap:2px}.font-chip strong{font-size:14px}}
@media(prefers-reduced-motion:no-preference){.folio,.envelope{animation:unfold .32s ease-out}@keyframes unfold{from{opacity:.4;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}}

@supports (field-sizing:content) { .written-body textarea { field-sizing:content; } }
.left-leaf,.right-leaf { transition:background-color var(--motion-content); }
#part-number,#page-count { font-variant-numeric:tabular-nums; }
#field-error { color:#903d33; font:13px/1.55 var(--sans); margin-block:4px; }
.right-leaf [aria-invalid=true] { border-color:#a44b3d; }
[aria-busy=true] { cursor:progress; }
@media(prefers-reduced-motion:no-preference) {
  @view-transition { navigation:auto; }
  :root { view-transition-name:none; }
  .art-mount { view-transition-name:gift-cover; }
  ::view-transition-group(gift-cover) { animation-duration:var(--motion-content); animation-timing-function:var(--motion-ease); }
}
@media(prefers-color-scheme:dark) {
  :root { --ink:#eee7d9; --soft:#c7bdad; --line:#59564b; --red:#e7ab97; --jade:#a8ceaf; }
  .topbar,.rail,.inspector,.stage-actions,.secondary,.url-row input,.upload-label,.font-chip,.phrase-chip,.papers button,.motif-chip,.postmark-field input,.wish-input { background:#2d2a25; color:#eee7d9; border-color:var(--line); }
  .font-chip strong,.phrase-chip { color:#eee7d9; }
  .font-chip small,.wax-caption,.wax-label,.postmark-field { color:#c7bdad; }
  .writing-stage,#package { background:radial-gradient(ellipse at 45% 40%,#3e3830,#211f1b 80%); }
  .back,.steps button,.rail button,#delivery-title,.text-button,.part-item i { color:var(--soft); }
  .stage-actions button,.page-turn,#try { color:var(--ink); }
  .primary,.primary:hover { color:#172619; background:#adccaf; }
  .rail button[aria-pressed=true],.part-item[aria-pressed=true],.template-item[aria-pressed=true],.font-chip[aria-pressed=true],.papers [aria-pressed=true],.motif-chip[aria-pressed=true],
  .rail button:hover,.part-item:hover,.template-item:hover,.secondary:hover,.phrase-chip:hover,.url-row button { background:#3e4940; color:#f3eee4; }
  .folio,.mail-art { color:#463b31; color-scheme:light; }
  .topbar :focus-visible,.inspector :focus-visible,.delivery :focus-visible { outline-color:#b5d2b9; }
  .chip-mini,.ink-chip,.voice-btn,.lock-fields input { background:#2d2a25; color:#eee7d9; border-color:var(--line); }
  .chip-mini[aria-pressed=true],.ink-chip[aria-pressed=true],.voice-btn[aria-pressed=true] { background:#3e4940; color:#f3eee4; border-color:#8cb291; }
  .sign-pad { background:#faf6ec; border-color:var(--line); }
  .lock-details { border-color:var(--line); color:var(--soft); }
  .lock-details summary { color:var(--ink); }
}
.image-choice img.pannable { cursor:grab; touch-action:none; }
.photo-tune { display:grid; gap:7px; padding-top:4px; }
.tune-label { font-size:12px; color:#5b6054; }
.filter-pills { display:flex; gap:5px; flex-wrap:wrap; }
.chip-mini {
  min-height:30px; padding:0 10px; border-radius:999px;
  border:1px solid #d2cab9; background:#faf7ef; font-size:12px; color:#524b40;
}
.chip-mini[aria-pressed=true] { border-color:var(--jade); background:#e8efe4; color:var(--jade); font-weight:550; }
.sign-pad-wrap { display:grid; gap:7px; }
.sign-toolbar { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.sign-inks { display:flex; gap:6px; }
.ink-chip {
  min-height:30px; padding:0 9px; border-radius:999px; display:inline-flex; align-items:center; gap:5px;
  border:1px solid #d2cab9; background:#faf7ef; font-size:12px; color:#524b40;
}
.ink-chip[aria-pressed=true] { border-color:var(--jade); background:#e8efe4; color:var(--jade); }
.ink-dot { width:10px; height:10px; border-radius:50%; }
.sign-clear { padding:2px 6px; min-height:30px; font-size:12.5px; }
.sign-pad {
  display:block; width:100%; height:auto; aspect-ratio:360 / 140;
  border:1px dashed #c8bca4; border-radius:8px; background:#fffcf4;
  touch-action:none; cursor:crosshair;
}
.voice-recorder { display:grid; gap:6px; }
.voice-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.voice-btn {
  min-height:36px; padding:0 14px; border-radius:999px;
  border:1px solid #c3b8a2; background:#faf7ef; font-size:13px; color:#4f3e32;
}
.voice-btn[aria-pressed=true] { border-color:#9e3c32; background:#9e3c32; color:#fff8ee; }
.lock-details {
  margin:12px 0 4px; padding:10px 12px; border:1px solid #d8ceba; border-radius:10px;
  background:rgba(255,252,244,0.65); font-size:13px; color:#5e6256;
}
.lock-details summary { cursor:pointer; font-weight:550; color:#45493e; }
.lock-fields { display:grid; gap:8px; margin-top:10px; }
.lock-fields label { display:grid; gap:4px; font-size:12.5px; }
.lock-fields input {
  width:100%; min-width:0; padding:7px 10px; border:1px solid #cfc6b4; border-radius:8px;
  background:#fffdf7; font-size:13px; color:var(--ink);
}
.illustration-list {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0 18px;}
.illustration-choice {display:grid;justify-items:center;gap:4px;padding:7px 5px;border:1px solid #cdbfa7;border-radius:6px;background:#fbf3e2;color:#594636;font:14px/1.5 var(--song);}
.illustration-choice img,.blank-paper {display:block;width:100%;height:50px;object-fit:contain;mix-blend-mode:multiply;}
.illustration-choice[aria-pressed=true] {border-color:#853b30;box-shadow:inset 0 0 0 1px #853b30;}
.blank-paper {background:linear-gradient(145deg,#f6edda,#fffaf1);border:1px solid #d8c9ae;}
.illustration-on-paper {display:block;align-self:center;width:95%;padding:0;border:0;background:transparent;cursor:pointer;mix-blend-mode:multiply;}
.illustration-on-paper img {display:block;width:100%;height:clamp(58px,10vh,104px);object-fit:contain;}

/* Florist studio workbench (008 瓶中一束花) */
.flower-palette { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.flower-add-chip {
  display:flex; align-items:center; gap:7px; min-height:36px; padding:5px 9px;
  border:1px solid #d4cbb9; border-radius:8px; background:#faf7ef;
  font-size:12.5px; color:#453d34; text-align:left;
  transition:background-color .16s ease, border-color .16s ease;
}
.flower-add-chip:hover:not(:disabled) { background:#eaf0e6; border-color:#7f9479; }
.flower-dot { width:10px; height:10px; border-radius:50%; flex:none; border:1px solid rgba(60,42,26,.22); }
.stem-roster { display:grid; gap:6px; }
.stem-row {
  display:flex; align-items:center; gap:6px; padding:6px 8px;
  border:1px solid #dbd3c3; border-radius:8px; background:#faf7ef;
}
.stem-row[data-active="true"] { border-color:#7f9479; background:#eaf0e6; }
.stem-row-label { display:flex; align-items:center; gap:6px; flex:1; min-width:0; font-size:12.5px; color:#3d352c; text-align:left; padding:2px 0; }
.stem-row-actions { display:flex; align-items:center; gap:3px; flex:none; }
.stem-ctrl-btn {
  min-width:26px; height:26px; padding:0 6px; border-radius:6px;
  border:1px solid #cfc6b4; background:#fffdf7; color:#544b40; font-size:11.5px;
}
.stem-ctrl-btn:hover:not(:disabled) { background:#e6ede2; border-color:#7f9479; color:var(--jade); }
.florist-shortcut {
  width:100%; min-height:38px; margin-top:10px; padding:6px 12px; border-radius:8px;
  border:1px dashed #8ca18a; background:#f2f6ef; color:var(--jade); font-size:13px;
}
.florist-shortcut:hover { background:#e5eee1; }
@media(prefers-color-scheme:dark) {
  .flower-add-chip,.stem-row,.stem-ctrl-btn,.florist-shortcut,.history-btn,.share-chip,.qr-card-box { background:#2d2a25; color:#eee7d9; border-color:var(--line); }
  .share-chip.primary-chip { background:#adccaf; border-color:#adccaf; color:#172619; }
  .history-btn span { background:#adccaf; color:#172619; }
  .stem-row[data-active="true"],.flower-add-chip:hover:not(:disabled),.stem-ctrl-btn:hover:not(:disabled),.florist-shortcut:hover,.history-btn:hover,.share-chip:hover { background:#3e4940; color:#f3eee4; border-color:#8cb291; }
  .stem-row-label { color:#eee7d9; }
}

:root {
  --motion-press:90ms; --motion-quick:140ms; --motion-content:200ms; --motion-object:360ms;
  --motion-ease:cubic-bezier(.22,.78,.24,1);
}
:where(.dock,.shelf-dock,.picker,.rail,.steps,.stage-actions,.viewer-bar,.delivery,.inspector,.topbar,.frost-controls) :is(button,a),
:where(.return-room,.action-key,.upload-label) {
  transition:scale var(--motion-quick) var(--motion-ease), background-color var(--motion-quick), color var(--motion-quick), border-color var(--motion-quick);
}
@media (prefers-reduced-motion:no-preference) {
  :where(.dock,.shelf-dock,.picker,.rail,.steps,.stage-actions,.viewer-bar,.delivery,.inspector,.topbar,.frost-controls) :is(button:enabled,a):active,
  :where(.return-room,.action-key,.upload-label):active { scale:.975; transition-duration:var(--motion-press); }
}
@media (prefers-color-scheme:dark) {
  :root {
    color-scheme:dark; --night:#201e1b; --panel:#2d2a25; --night-text:#eee7d9;
    --night-muted:#c7bdad; --night-line:#5c564c; --night-selected:#3e4940;
    background:var(--night); color:var(--night-text);
  }
  .desk,.shelf { background:radial-gradient(ellipse at 48% 35%,#3a342c,var(--night) 76%); }
  .masthead,.masthead .imprint p,.selection,.position,.shelf .experience,.desk .gesture-hint,.desk .back-shelf,.found-count { color:var(--night-muted); }
  .masthead h1,.selection { color:var(--night-text); }
  .dock,.shelf-dock,.picker button,.gift-viewer,.viewer-bar,.viewer-bar button,.shelf-dock .open-gift {
    color:var(--night-text); background-color:var(--panel); border-color:var(--night-line);
  }
  .shelf-dock .miniatures,.viewer-bar .leave { border-color:var(--night-line); }
  .dock button:hover,.dock a:hover,.picker button:hover,.open-gift:hover { background-color:var(--night-selected); }
  .miniatures button[aria-pressed=true]::after { background:#e6ae94; }
  .gift-viewer iframe { background:var(--night); color-scheme:dark; }
  .letter-sheet,.photo-face,.back,.finding,.keepsake,.gc-fallback { color-scheme:light; color:#46382d; }
  .desk :focus-visible,.shelf :focus-visible { outline-color:#deaf88; }
}
[data-armed] { outline:1px solid #ebc28d; outline-offset:-1px; }
@media(prefers-reduced-motion:reduce) {
  .dock :is(a,button),.tilt-plane,.room-prop :is(.drawer-face,.lid),.fan,.shelf-stage.dragging .sample { transition-duration:0s!important; }
}
