:root {
  color-scheme: dark;
  font-family: system-ui, "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #f6e8ed;
  background: #150e1a;
  --accent: #ed9eb6;
  --muted: #b4a2b6;
  --border: #48374c;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100vh; background: radial-gradient(ellipse at 47% 0%, #27182c, #150e1a 67%); }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid #fcc0d4; outline-offset: 3px; }
button:disabled { cursor: progress; opacity: .7; }
[hidden] { display: none !important; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
svg:not(.symbols) { width: 1.25rem; height: 1.25rem; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; fill: none; flex: none; }
.app-shell { width: min(100% - 6rem, 1320px); margin-inline: auto; padding-bottom: 2rem; }
.app-header { display: flex; justify-content: space-between; align-items: center; min-height: 94px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .78rem; font-weight: 650; letter-spacing: .13em; white-space: nowrap; }
.brand-icon { display: grid; place-items: center; width: 40px; height: 40px; color: var(--accent); background: #332239; border: 1px solid #63475f; border-radius: 12px; }
.brand-icon svg { width: 23px; height: 23px; }
.camera-controls { display: flex; align-items: center; gap: 1rem; }
.camera-state { display: inline-flex; gap: .55rem; align-items: center; font-size: .875rem; color: var(--muted); }
.camera-state i { width: 7px; height: 7px; border-radius: 50%; background: #846d85; }
.camera-state[data-state="on"] i { background: #9ad5a2; box-shadow: 0 0 10px #9ad5a287; }
.camera-state[data-state="loading"] i { background: var(--accent); }
.camera-state[data-state="error"] i { background: #ee9e8b; }
.camera-toggle, .upload { display: inline-flex; justify-content: center; align-items: center; gap: .58rem; border-radius: 9px; font-size: .9rem; font-weight: 650; }
.camera-toggle { min-height: 44px; padding: .6rem .95rem; border: 1px solid #ffd0dd; background: #f3b1c4; color: #301721; box-shadow: 0 1px 8px #0003; white-space: nowrap; }
.camera-toggle:hover { background: #ffd0dd; }
.camera-toggle[aria-pressed="true"] { background: #3d293c; border-color: #8b576d; color: #f6dce7; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.experience { min-width: 0; }
.scene { position: relative; isolation: isolate; overflow: hidden; height: clamp(575px, calc(100svh - 135px), 820px); border: 1px solid #502f4b; border-radius: 19px; background: radial-gradient(ellipse at 51% 54%, #43213c 0%, #28152b 36%, #201124 68%, #1a1020 100%); }
.scene::before { content: ""; position: absolute; pointer-events: none; z-index: 1; inset: 9px; border: 1px solid #f8b4d01c; border-radius: 12px; }
.scene:fullscreen, .scene.expanded { width: 100%; height: 100%; border: 0; border-radius: 0; }
.scene.expanded { position: fixed; inset: 0; z-index: 10; }
.scene-heading { position: absolute; z-index: 2; top: clamp(1.4rem, 4.6%, 3rem); left: .65rem; right: .65rem; text-align: center; pointer-events: none; }
.greeting-mark { display: flex; justify-content: center; align-items: center; gap: .65rem; color: #efa6bc; }
.greeting-mark i { width: 35px; height: 1px; background: linear-gradient(90deg, transparent, #bc788ea3); }
.greeting-mark i:last-child { transform: scaleX(-1); }
.greeting-mark svg { width: 14px; height: 14px; }
h1 { margin: .15rem 0 .25rem; font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(3.6rem, 7.4vw, 6.8rem); letter-spacing: -.078em; line-height: 1.02; color: #fff0eb; text-shadow: 0 2px 22px #f197bc51, 0 2px 4px #130a16; }
h1 em { color: #eba6b9; font-weight: 400; }
.scene-heading p { margin: .52rem 0 0; font-size: .85rem; letter-spacing: .27em; color: #ceadbc; }
#art { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#art.dragging { cursor: grabbing; }
.scene-footer { position: absolute; z-index: 3; inset: auto 23px 22px; display: flex; justify-content: space-between; align-items: center; gap: .8rem; pointer-events: none; }
.scene-mode, .scene-tools { display: flex; gap: .6rem; align-items: center; }
.scene-mode { min-height: 38px; padding: .4rem .68rem; background: #1c1422db; border: 1px solid #f8b4d039; border-radius: 8px; color: #f1cce0; font-size: .875rem; white-space: nowrap; }
.scene-mode svg { height: 17px; width: 17px; }
.drag-note { display: inline-flex; align-items: center; gap: .38rem; color: #c0a9bd; font-size: .8125rem; }
.drag-note svg { width: 16px; height: 16px; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid #f8b4d049; border-radius: 9px; color: #f3cae1; background: #291a2bec; pointer-events: auto; }
.icon-button:hover { background: #453148; border-color: #cd8aa1; }
.controls { display: grid; gap: 16px; }
.panel { padding: 19px; min-width: 0; border-radius: 16px; border: 1px solid var(--border); background: #211828; box-shadow: 0 3px 18px #0f08121a; }
.panel-heading { display: flex; gap: .6rem; align-items: center; justify-content: space-between; }
.panel-heading h2 { margin: 0; font-size: 1.03rem; letter-spacing: .035em; font-weight: 680; }
.panel-heading > svg { width: 15px; height: 15px; color: var(--accent); }
.panel-intro { margin: .65rem 0 .95rem; color: var(--muted); font-size: .875rem; line-height: 1.65; }
.gestures { display: grid; gap: 7px; }
.gesture { display: flex; align-items: center; width: 100%; gap: 11px; text-align: left; padding: 8px 9px; min-height: 60px; border: 1px solid #48374c; background: #2a1f30; border-radius: 10px; }
.gesture:hover { background: #38273b; border-color: #885268; }
.gesture[aria-pressed="true"] { background: #432936; border-color: #a15f76; }
.gesture-icon { display: grid; place-items: center; flex: 0 0 37px; height: 37px; color: var(--accent); background: #160e1d73; border-radius: 7px; }
.gesture-icon svg { height: 21px; width: 21px; }
.gesture-label { display: grid; gap: .22rem; }
.gesture-label strong { font-weight: 650; font-size: .88rem; }
.gesture-label small { color: #c5b1c6; font-size: .79rem; }
.album-count { font-size: .8125rem; color: var(--muted); }
.thumbnails { margin: .85rem 0 .75rem; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; max-height: 126px; overflow: auto; padding: 2px 3px; scrollbar-width: thin; scrollbar-color: #91667e transparent; }
.thumbnail { overflow: hidden; aspect-ratio: 1; width: 100%; padding: 0; border-radius: 7px; border: 1px solid #845b6f; background: #39263b; }
.thumbnail:hover, .thumbnail[aria-pressed="true"] { border-color: #ffc0d3; }
.thumbnail[aria-pressed="true"] { box-shadow: 0 0 0 1px #ffc0d3; }
.thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.upload { width: 100%; padding: .65rem .5rem; background: #2d2131; border: 1px dashed #795f77; color: #f1cce0; }
.upload:hover { background: #3d2a40; border-color: #cb8ea2; }
.upload svg { width: 17px; height: 17px; }
.privacy, .album-message { color: var(--muted); line-height: 1.5; font-size: .8125rem; }
.privacy { display: flex; align-items: center; justify-content: center; gap: .45rem; margin: 0; }
.privacy-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; }
#album-logout { border: 1px solid #48374c; border-radius: 7px; background: transparent; color: #ead4e2; min-height: 36px; padding: .25rem .6rem; font-size: .8125rem; }
#album-logout:hover { background: #38273b; }
.privacy svg { width: 14px; height: 14px; }
.album-message { margin: .65rem 0 0; }
.camera-preview { position: absolute; z-index: 3; bottom: 72px; left: 23px; width: clamp(100px, 18%, 182px); overflow: hidden; border: 1px solid #e6a3b691; background: #1c1422; border-radius: 10px; box-shadow: 0 6px 22px #0006; }
.camera-preview video { display: block; width: 100%; aspect-ratio: 4/3; object-fit: contain; transform: scaleX(-1); }
.camera-preview canvas { position: absolute; inset: 0; width: 100%; aspect-ratio: 4/3; }
.camera-preview span { display: block; color: #f7d9e7; padding: .3rem .35rem; font-size: .75rem; text-align: center; }
.notice { position: absolute; z-index: 4; left: 50%; bottom: 68px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 42px); margin: 0; padding: .58rem .85rem; color: #f4d5e3; background: #352535f5; border: 1px solid #ad6f85; border-radius: 8px; font-size: .875rem; line-height: 1.5; text-align: center; }
.photo-overlay { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; background: #190b1d7a; animation: photo-in .42s cubic-bezier(.18,.76,.26,1) both; }
.featured-photo { margin: 5rem 0 0; padding: 7px; width: min(62%, 445px); min-width: min(205px, 75%); max-height: 72%; background: #f7e5e7; color: #4d2b39; border: 1px solid #f5acbe; border-radius: 5px; box-shadow: 0 0 45px #f281b375, 0 15px 40px #0008; transform: perspective(710px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) rotate(-2deg); transition: transform 130ms ease-out; touch-action: pan-y; }
.featured-photo img { display: block; width: 100%; height: min(46svh, 425px); object-fit: contain; background: #211521; }
.featured-photo figcaption { padding: .55rem .35rem .35rem; overflow-wrap: anywhere; text-align: center; font-size: .85rem; }
.photo-close { position: absolute; right: 23px; top: 23px; z-index: 4; }
.photo-tools { position: absolute; inset: auto 0 23px; display: flex; justify-content: center; gap: .45rem; pointer-events: none; }
.photo-tools button { border: 1px solid #f8b4d049; border-radius: 8px; color: #f7dcea; background: #291a2bec; padding: .45rem .65rem; font-size: .8125rem; min-height: 36px; pointer-events: auto; }
.photo-tools button:hover { background: #453148; }
.scene[data-mode="photo"] .scene-heading { opacity: .76; }
.scene[data-locked="true"] .scene-footer { display: none; }
.scene[data-locked="true"] #art { opacity: .43; touch-action: pan-y; }
.album-lock { isolation: isolate; position: absolute; z-index: 4; top: 58%; left: 50%; transform: translate(-50%, -50%); width: min(calc(100% - 2rem), 318px); display: grid; gap: .65rem; padding: 1.25rem 1.25rem 1.35rem; border: 1px solid #cf809f9c; border-radius: 16px; background: #241829f5; box-shadow: 0 10px 64px #13091c9c; }
.album-lock .lock-mark { display: grid; place-items: center; width: 38px; height: 38px; margin-inline: auto; border: 1px solid #bc789e59; border-radius: 50%; background: #4a2b44; color: #f0b1c8; }
.album-lock h2 { margin: 0 0 .25rem; text-align: center; color: #ffe2e9; font-size: 1.15rem; font-weight: 650; }
.album-lock label { display: grid; gap: .32rem; color: #cbb3c7; font-size: .875rem; }
.album-lock input { min-width: 0; border: 1px solid #674a64; border-radius: 8px; background: #160e1c; color: #fff2f3; padding: .65rem .75rem; min-height: 44px; font: inherit; font-size: 1rem; }
.album-lock input:focus-visible { outline: 2px solid #efa6bc; outline-offset: 1px; }
.album-lock button { min-height: 44px; border: 1px solid #ffd0dd; border-radius: 8px; background: #f3b1c4; color: #301721; font-weight: 650; }
.album-lock p { margin: 0; color: #ffc5d7; font-size: .83rem; line-height: 1.45; }
.touch-dock, .touch-hint { display: none; }
@keyframes photo-in { from { opacity: 0; scale: .93; } to { opacity: 1; scale: 1; } }
@media (max-width: 1120px) {
  .app-shell { width: min(100% - 3rem, 1320px); }
  .workspace { grid-template-columns: minmax(0, 1fr) 283px; gap: 15px; }
  .panel { padding: 15px; }
}
@media (max-width: 770px), (hover: none) and (pointer: coarse) {
  .app-shell { width: min(calc(100% - 1.5rem), 850px); padding-top: env(safe-area-inset-top); padding-bottom: max(1.35rem, env(safe-area-inset-bottom)); }
  .app-header { min-height: 65px; }
  .brand { gap: .55rem; font-size: .93rem; }
  .brand-icon { width: 35px; height: 35px; border-radius: 9px; }
  .brand-icon svg { width: 21px; height: 21px; }
  .camera-toggle { padding-inline: .65rem; }
  .camera-state { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .scene { height: clamp(418px, 62vh, 690px); height: clamp(418px, 62svh, 690px); border-radius: 15px; }
  .scene-heading { top: 7%; }
  .scene-heading p { font-size: .8125rem; letter-spacing: .14em; }
  .controls { display: flex; flex-direction: column; align-items: stretch; gap: 11px; }
  .album-panel { order: -1; }
  .thumbnails { display: flex; max-height: none; max-width: none; overflow-x: auto; margin-block: .7rem; padding-bottom: .35rem; scroll-snap-type: x proximity; }
  .thumbnail { flex: 0 0 54px; scroll-snap-align: start; }
  .upload { min-height: 44px; }
  .gesture-panel .panel-intro { margin-block: .45rem .7rem; }
  .gesture { min-height: 54px; }
  .scene-footer { inset: auto 15px 14px; }
  .camera-preview { left: 15px; bottom: 62px; width: clamp(111px, 25%, 164px); }
  .featured-photo img { height: min(37svh, 305px); }
  .photo-tools { bottom: 15px; }
  .photo-tools button { min-height: 42px; }
  .touch-dock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 8px; padding: 5px; border: 1px solid #48374c; border-radius: 13px; background: #211828; }
  .touch-dock button { display: grid; place-content: center; justify-items: center; gap: 3px; min-height: 49px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #e9c9df; font-size: .8125rem; }
  .touch-dock button[aria-pressed="true"] { border-color: #a76880; background: #432936; color: #ffe1ed; }
  .touch-dock button svg { width: 17px; height: 17px; }
  .touch-hint { display: block; margin: .5rem 0 0; color: #c0a9bd; text-align: center; font-size: .8125rem; }
}
@media (max-width: 520px) {
  .drag-note { display: none; }
  .photo-tools { left: 50%; right: auto; transform: translateX(-50%); white-space: nowrap; }
}
@media (pointer: coarse) and (max-height: 515px) {
  .scene { height: 355px; }
  .scene-heading { top: 5%; }
  .scene-heading h1 { font-size: 2.6rem; }
  .featured-photo { margin-top: 3rem; }
  .featured-photo img { height: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .photo-overlay { animation: none; }
  .featured-photo { transition: none; }
}
