  .polaroid-standalone { margin: 0; background: #e7ddcd; }
  .polaroid-standalone > #polaroid-preview { width: 100%; height: 100vh; height: 100dvh; }
  .polaroid-root, .polaroid-root *, .polaroid-root *::before, .polaroid-root *::after { box-sizing: border-box; }
  .polaroid-root {
    --polaroid-ink: #3e2d24;
    --polaroid-red: #8d3e36;
    --polaroid-script: "Kaiti SC", "STKaiti", "KaiTi", "楷体", cursive;
    position: relative; width: 100%; height: 100%; min-height: 0; display: grid;
    overflow: hidden; color: var(--polaroid-ink); isolation: isolate;
    font: 16px/1.45 system-ui, sans-serif;
  }
  .polaroid-root [hidden] { display: none !important; }
  .polaroid-root button { font: inherit; color: inherit; }
  .polaroid-screen {
    position: relative; min-width: 0; min-height: 0; overflow: hidden;
    background: linear-gradient(rgb(34 27 34 / var(--polaroid-ambient, 0)), rgb(34 27 34 / var(--polaroid-ambient, 0))),
      radial-gradient(ellipse at center, #dfd2bd, #eee6db);
  }
  .polaroid-stage {
    position: absolute; left: 50%; top: 50%; transform-origin: center;
    overflow: hidden; isolation: isolate; user-select: none; -webkit-user-select: none;
    font-family: var(--polaroid-script); background-color: #f0e2cd;
    background-size: cover; background-position: center;
    box-shadow: 0 0 54px #4b352921;
  }
  .polaroid-stage::before {
    content: ""; position: absolute; inset: 19px; pointer-events: none;
    border: 1px solid #76523924; z-index: 1;
  }
  .polaroid-stage img { display: block; pointer-events: none; user-select: none; }
  .polaroid-ribbon, .polaroid-camera { position: absolute; object-fit: contain; pointer-events: none; }
  .polaroid-ribbon { z-index: 20; filter: drop-shadow(1px 5px 3px #56380933); }
  .polaroid-stage .polaroid-camera { pointer-events: auto; }
  .polaroid-camera { z-index: 9; filter: drop-shadow(8px 16px 12px #3a2b2547); }
  .polaroid-copy { position: absolute; z-index: 2; left: 141px; top: 181px; width: 740px; pointer-events: none; }
  .polaroid-title { margin: 0; font: 700 100px/1.15 var(--polaroid-script); letter-spacing: .025em; white-space: pre-wrap; }
  .polaroid-title::after {
    content: ""; display: block; width: 120px; height: 8px; margin: 7px 0 0 5px;
    border-top: 3px solid #a34e40; border-radius: 52%; transform: rotate(-3deg); opacity: .74;
  }
  .polaroid-stage[data-phase="decorate"] .polaroid-copy,
  .polaroid-stage[data-phase="scissors"] .polaroid-copy,
  .polaroid-stage[data-phase="final"] .polaroid-copy { top: 151px; }
  .polaroid-stage[data-phase="decorate"] .polaroid-title,
  .polaroid-stage[data-phase="scissors"] .polaroid-title,
  .polaroid-stage[data-phase="final"] .polaroid-title { font-size: 80px; }
  .polaroid-hint {
    display: flex; align-items: center; gap: 15px; position: absolute; z-index: 4;
    top: 344px; left: 147px; margin: 0; max-width: 690px; white-space: pre-wrap; pointer-events: none;
    font: 700 36px/1.35 var(--polaroid-script); color: var(--polaroid-red);
  }
  .polaroid-title[data-multiline] { font-size: 66px; line-height: .98; }
  .polaroid-stage[data-phase="decorate"] .polaroid-title[data-multiline],
  .polaroid-stage[data-phase="scissors"] .polaroid-title[data-multiline],
  .polaroid-stage[data-phase="final"] .polaroid-title[data-multiline] { font-size: 59px; line-height: .95; }
  .polaroid-stage[data-phase="decorate"] .polaroid-hint[data-multiline] {
    font-size: 27px; line-height: 1.22; top: 469px;
  }
  .polaroid-hint::before, .polaroid-footer::before {
    content: "✦"; flex: none; color: var(--polaroid-red); font: 20px/1 Georgia, serif;
  }
  .polaroid-stage[data-phase="decorate"] .polaroid-hint,
  .polaroid-stage[data-phase="scissors"] .polaroid-hint { left: 866px; top: 473px; }
  .polaroid-stage[data-phase="scissors"] .polaroid-hint { left: 916px; top: 557px; }
  .polaroid-footer {
    position: absolute; z-index: 3; left: 143px; bottom: 48px; max-width: 750px; display: flex; align-items: center; gap: 11px;
    margin: 0; padding: 10px 18px; background: #fff7eab8; color: #654738;
    font: 700 23px/1.25 var(--polaroid-script); white-space: pre-wrap;
    box-shadow: 0 2px 5px #60422b0e; transform: rotate(-1.4deg);
  }
  .polaroid-footer::before { font-size: 14px; }
  .polaroid-paper {
    position: absolute; z-index: 6; transform-origin: top left; isolation: isolate;
    filter: drop-shadow(8px 15px 12px #4a342844);
  }
  .polaroid-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
  .polaroid-window {
    position: absolute; overflow: hidden; background: #ebd6bf;
  }
  .polaroid-portrait { display: block; width: 100%; height: 100%; }
  .polaroid-negative { position: absolute; inset: 0; background: linear-gradient(132deg,#25221e,#11100f 70%); pointer-events: none; }
  .polaroid-attached { position: absolute; inset: 0; pointer-events: none; }
  .polaroid-attached img { position: absolute; max-width: none; max-height: none; }
  .polaroid-anchor-ring {
    position: absolute; border: 2px dashed #a44637; border-radius: 50%; color: #a44637;
  }
  .polaroid-anchor-ring::after {
    content: ""; position: absolute; top: 50%; left: 50%; width: 9px; height: 9px;
    background: currentColor; border: 1px solid white; border-radius: 50%; transform: translate(-50%, -50%);
  }
  .polaroid-activate {
    position: absolute; z-index: 2; inset: 0; width: 100%; background: transparent; border: 0; cursor: pointer; touch-action: manipulation;
  }
  .polaroid-activate:focus-visible, .polaroid-prop:focus-visible, .polaroid-scissors:focus-visible {
    outline: 4px dashed #8d3e36; outline-offset: 6px; border-radius: 10px;
  }
  .polaroid-hand {
    position: absolute; z-index: 10; width: 58px; height: 63px; pointer-events: none;
    filter: drop-shadow(2px 4px 2px #4a2c252d);
    animation: polaroid-point 1.65s ease-in-out infinite;
  }
  @keyframes polaroid-point { 0%, 100% { transform: translateY(0) rotate(-10deg); } 50% { transform: translateY(-12px) rotate(-14deg); } }
  .polaroid-tray {
    position: absolute; z-index: 5; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    left: 864px; top: 541px; width: 606px; height: 239px; padding: 9px 19px 6px;
    background: linear-gradient(155deg, #f9eddad9, #f2e3cbd9); border: 1px solid #916f4c4d;
    border-radius: 7px 12px 9px 13px / 12px 7px 11px 7px;
    box-shadow: 1px 7px 14px #7350381a;
  }
  .polaroid-tray::before { content: ""; position: absolute; inset: 9px; border: 1px dashed #86604447; border-radius: 5px; pointer-events: none; }
  .polaroid-tray::after {
    content: ""; position: absolute; z-index: 0; width: 105px; height: 30px; top: -12px; right: 39px;
    background: #d5ad7170; transform: rotate(7deg);
    clip-path: polygon(2% 0,97% 4%,100% 25%,97% 48%,100% 66%,97% 100%,0 95%,2% 62%,0 45%,2% 24%);
    pointer-events: none;
  }
  .polaroid-prop {
    position: relative; z-index: 1; display: grid; grid-template-rows: 171px 27px;
    justify-items: center; align-content: center;
    padding: 0; border: 0; background: transparent; cursor: grab; touch-action: none; min-width: 0;
  }
  .polaroid-prop:disabled { cursor: default; }
  .polaroid-prop img { align-self: center; width: 100%; height: 100%; object-fit: contain; max-width: 137px; max-height: 144px; filter: drop-shadow(2px 5px 4px #51322035); }
  .polaroid-prop[data-prop="hat1"] img { transform: rotate(-8deg); }
  .polaroid-prop[data-prop="hat2"] img { transform: rotate(8deg); }
  .polaroid-prop[data-prop="hat3"] img { transform: rotate(-4deg); }
  .polaroid-prop[data-prop="hat4"] img { transform: rotate(5deg); }
  .polaroid-prop span { font: 700 23px/1.1 var(--polaroid-script); color: #634931; }
  .polaroid-drag { position: absolute; z-index: 15; pointer-events: none; object-fit: contain; filter: drop-shadow(4px 10px 6px #472f2554); }
  .polaroid-contour { position: absolute; overflow: visible; pointer-events: none; }
  .polaroid-scissors {
    position: absolute; z-index: 12; display: grid; place-items: center; width: 120px; height: 87px;
    padding: 0; border: 0; background: transparent; cursor: pointer; touch-action: manipulation;
    filter: drop-shadow(2px 3px 2px #63392c38);
  }
  .polaroid-scissors:disabled { pointer-events: none; }
  .polaroid-scissors svg { width: 100%; height: 100%; overflow: visible; pointer-events: none; }
  .polaroid-scissors[data-cutting] { padding: 9px; }
  .polaroid-scissors[data-cutting] .polaroid-blade { transform-origin: 43px 34px; animation: polaroid-snipping .22s ease-in-out infinite alternate; }
  .polaroid-scissors[data-cutting] .polaroid-blade + .polaroid-blade { animation-direction: alternate-reverse; }
  @keyframes polaroid-snipping { from { rotate: -6deg; } to { rotate: 6deg; } }
  .polaroid-sticker { position: absolute; z-index: 8; transform-origin: center; filter: drop-shadow(7px 14px 10px #543c3640); pointer-events: none; }
  .polaroid-sticker canvas { display: block; width: 100%; height: 100%; }
  .polaroid-sticker[data-floating] canvas { animation: polaroid-float 3.2s ease-in-out infinite; }
  @keyframes polaroid-float { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-13px) rotate(1deg); } }
  .polaroid-glints { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
  .polaroid-glints i { position: absolute; color: #a66e42; font: 41px/1 Georgia,serif; }
  .polaroid-glints i:nth-child(1) { left: 34%; top: 42%; }
  .polaroid-glints i:nth-child(2) { left: 66%; top: 37%; font-size: 32px; color: #994638; }
  .polaroid-glints i:nth-child(3) { left: 63%; top: 68%; font-size: 21px; }
  .polaroid-copy { transition: opacity .35s ease-out; }
  .polaroid-stage[data-phase="celebration"] .polaroid-copy { opacity: 0; }
  .polaroid-celebration { position: absolute; inset: 0; pointer-events: none; }
  .polaroid-cake, .polaroid-cake-shadow, .polaroid-cake-contact,
  .polaroid-night, .polaroid-celebration-line, .polaroid-toast,
  .polaroid-fireworks, .polaroid-greeting { position: absolute; }
  .polaroid-cake { z-index: 6; object-fit: contain; filter: drop-shadow(9px 12px 9px #5b433936); }
  .polaroid-cake-shadow {
    z-index: 4; border-radius: 50%; background: #61432d65; filter: blur(17px);
  }
  .polaroid-cake-contact { z-index: 7; border-radius: 50%; background: #644d39a1; filter: blur(2.7px); }
  .polaroid-cake-contact[data-guide] {
    background: #fff1d833; border: 2px dashed #91613dba; filter: none;
  }
  .polaroid-sticker[data-topper] canvas { position: relative; z-index: 1; }
  .polaroid-skewer {
    position: absolute; z-index: 0; overflow: hidden; border-radius: 3px 3px 0 0;
    background: repeating-linear-gradient(91deg, #76512933 0 1px, transparent 1px 3px),
      linear-gradient(90deg, #a4723c, #f3d6a0 41%, #d2a76f 72%, #996d40);
    clip-path: polygon(5% 0,96% 0,91% 92%,50% 100%,8% 92%);
  }
  .polaroid-skewer[data-inserted] { clip-path: none; border-radius: 2px; }
  .polaroid-topper-hit, .polaroid-light-hit, .polaroid-toast {
    padding: 0; border: 0; background: transparent; pointer-events: auto; touch-action: none;
  }
  .polaroid-topper-hit {
    position: absolute; z-index: 2; left: 0; top: 0; width: 100%; cursor: grab;
  }
  .polaroid-topper-hit[data-dragging], .polaroid-toast[data-dragging] { cursor: grabbing; }
  .polaroid-light-hit { position: absolute; z-index: 21; inset: 0; display: block; cursor: pointer; }
  .polaroid-night {
    z-index: 23; inset: 0; background:
      radial-gradient(ellipse var(--polaroid-spot-w) var(--polaroid-spot-h) at var(--polaroid-spot-x) var(--polaroid-spot-y),
        rgb(44 27 23 / var(--polaroid-spot-core)) 0%,
        rgb(41 28 30 / var(--polaroid-spot-mid)) 47%,
        rgb(34 27 34 / var(--polaroid-spot-outer)) 100%);
  }
  .polaroid-celebration-line {
    z-index: 25; margin: 0; text-align: center; white-space: pre-wrap;
    color: #542f27; font: 700 43px/1.24 var(--polaroid-script);
  }
  .polaroid-celebration-line[data-secondary] { color: #735140; font-size: 27px; }
  .polaroid-celebration[data-night] .polaroid-celebration-line {
    color: #f6dec0; text-shadow: 0 3px 8px #231418bb;
  }
  .polaroid-toast {
    z-index: 26; cursor: grab; transform-origin: center;
    filter: brightness(.9) saturate(.9) drop-shadow(6px 13px 14px #1b111bad);
  }
  .polaroid-toast:disabled { pointer-events: none; }
  .polaroid-toast img { width: 100%; height: 100%; object-fit: contain; }
  .polaroid-fireworks { z-index: 27; inset: 0; width: 100%; height: 100%; }
  .polaroid-greeting {
    z-index: 28; margin: 0; text-align: center; white-space: pre-wrap; pointer-events: none;
    color: #fff3dd; text-shadow: 0 3px 15px #211218a8;
    font: 400 67px/1.15 Georgia, "Times New Roman", var(--polaroid-script);
  }
  .polaroid-greeting[data-subtitle] { color: #f4d3a6; font: 700 53px/1.2 var(--polaroid-script); }
  .polaroid-root .polaroid-greeting-hint {
    position: absolute; z-index: 28; right: 5%; bottom: 6%; max-width: 42%; margin: 0;
    padding: 11px 18px; transform: rotate(-2deg); border: 1px solid #8e69463d;
    border-radius: 4px 3px 5px 4px; background: linear-gradient(165deg, #fff6e1, #ead5b8);
    color: #5d3a2e; box-shadow: 2px 5px 9px #1e131b65;
    font: 700 30px/1.27 var(--polaroid-script); white-space: pre-wrap;
  }
  .polaroid-root button.polaroid-greeting-hint { cursor: pointer; pointer-events: auto; touch-action: manipulation; }
  .polaroid-root button.polaroid-greeting-hint:hover { transform: rotate(-1deg) translateY(-2px); }
  .polaroid-root button.polaroid-greeting-hint:focus-visible { outline: 3px dashed #ffeecc; outline-offset: 4px; }
  .polaroid-topper-hit:focus-visible, .polaroid-light-hit:focus-visible, .polaroid-toast:focus-visible {
    outline: 3px dashed #aa7645; outline-offset: -3px; border-radius: 14px;
  }
  .polaroid-toast:focus-visible { outline-color: #ffeecc; }
  .polaroid-stage[data-paused] * { animation-play-state: paused !important; }
  .polaroid-sr {
    position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }

  .polaroid-root[data-debug] { grid-template-columns: minmax(0,1fr) minmax(310px,350px); }
  .polaroid-debug {
    z-index: 22; min-height: 0; overflow: auto; overscroll-behavior: contain;
    padding: 16px; background: #fbf5eb; border-inline-start: 1px solid #caba9e;
    font: 14px/1.45 system-ui,sans-serif; color: #392d25;
  }
  .polaroid-debug h2 { font-size: 20px; margin: 0 0 9px; }
  .polaroid-debug h3 { font-size: 14px; margin: 9px 0 6px; }
  .polaroid-debug details { border-top: 1px solid #dfd1bd; padding: 9px 0; }
  .polaroid-debug summary { font-weight: 650; cursor: pointer; }
  .polaroid-debug button, .polaroid-debug input:not([type="range"]):not([type="file"]), .polaroid-debug textarea {
    border: 1px solid #c8b89e; border-radius: 4px; background: #fffaf3; padding: 5px 7px;
  }
  .polaroid-debug button { cursor: pointer; min-height: 32px; }
  .polaroid-debug button:hover, .polaroid-debug button[aria-current="step"] { background: #ead9c2; }
  .polaroid-debug button:disabled { opacity: .55; cursor: default; }
  .polaroid-debug textarea { resize: vertical; width: 100%; font: inherit; }
  .polaroid-debug input { min-width: 0; font: inherit; accent-color: #914537; }
  .polaroid-debug :focus-visible { outline: 2px solid #914537; outline-offset: 2px; }
  .polaroid-debug-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 6px 0; }
  .polaroid-debug-field { display: grid; gap: 5px; margin: 8px 0; }
  .polaroid-debug-field input[type="file"] { max-width: 100%; }
  .polaroid-debug-range { display: grid; grid-template-columns: 88px minmax(50px,1fr) 68px; align-items: center; gap: 6px; margin: 6px 0; }
  .polaroid-debug-status { margin: 8px 0; min-height: 20px; color: #6b4a34; overflow-wrap: anywhere; }
  .polaroid-debug-status[data-error] { color: #9b302b; }
  .polaroid-debug .polaroid-debug-help { color: #654e3d; margin: 6px 0; }
  @media (max-width: 660px) and (orientation: portrait) {
    .polaroid-root[data-debug] { grid-template-columns: 1fr; grid-template-rows: minmax(180px, 41%) minmax(0,1fr); }
    .polaroid-debug { border-inline-start: 0; border-top: 1px solid #caba9e; }
  }
  @media (prefers-reduced-motion: reduce) {
    .polaroid-hand, .polaroid-sticker[data-floating] canvas, .polaroid-scissors[data-cutting] .polaroid-blade { animation: none; }
  }
