:root {
  --ivory: #f4efe9;
  --ivory-2: #ece5de;
  --pearl: #fbf9f6;
  --ink: #393331;
  --muted: #8b817b;
  --line: rgba(79, 67, 61, 0.12);
  --glass: rgba(255, 255, 255, 0.62);
  --accent: #756663;
  --shadow: 0 18px 50px rgba(74, 60, 54, 0.1);
  --safe-top: max(16px, env(safe-area-inset-top));
  --safe-bottom: max(12px, env(safe-area-inset-bottom));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; overscroll-behavior: none; }
body {
  color: var(--ink);
  background: var(--ivory);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid rgba(100, 85, 79, 0.32); outline-offset: 3px; }
.hidden { display: none !important; }

.atelier-splash {
  width: min(100%, 520px);
  height: 100dvh;
  margin: auto;
  position: fixed;
  z-index: 500;
  inset: 0;
  overflow: hidden;
  color: #625954;
  background: #f4eee8;
  isolation: isolate;
}
.atelier-splash-image,
.atelier-splash-fragments > span {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: center top;
}
.atelier-splash-image {
  z-index: 1;
  transform: scale(1.008);
  filter: saturate(.92) contrast(.98);
  will-change: transform, opacity, filter;
}
.atelier-splash-fragments { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.atelier-splash-fragments > span {
  display: block;
  background-image: url("./assets/news/luna-atelier-splash.webp");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  filter: saturate(.92) contrast(.98);
  will-change: transform, opacity, filter;
}
.atelier-splash-fragments > span:nth-child(1) { --drift-x: -3.5%; --drift-y: -2.5%; --turn: -.45deg; clip-path: polygon(0 0,100% 0,100% 14%,77% 13%,54% 15%,29% 12%,0 14%); }
.atelier-splash-fragments > span:nth-child(2) { --drift-x: 3%; --drift-y: -1.3%; --turn: .34deg; clip-path: polygon(0 12%,29% 13%,54% 14%,78% 12%,100% 14%,100% 27%,74% 25%,48% 28%,23% 25%,0 27%); }
.atelier-splash-fragments > span:nth-child(3) { --drift-x: -2.4%; --drift-y: -.5%; --turn: -.28deg; clip-path: polygon(0 25%,23% 24%,49% 27%,75% 24%,100% 26%,100% 40%,72% 39%,48% 41%,25% 38%,0 40%); }
.atelier-splash-fragments > span:nth-child(4) { --drift-x: 3.8%; --drift-y: .2%; --turn: .42deg; clip-path: polygon(0 38%,25% 37%,48% 40%,72% 38%,100% 40%,100% 53%,76% 52%,52% 54%,27% 51%,0 53%); }
.atelier-splash-fragments > span:nth-child(5) { --drift-x: -3.1%; --drift-y: .9%; --turn: -.36deg; clip-path: polygon(0 51%,27% 50%,52% 53%,76% 51%,100% 53%,100% 66%,72% 65%,47% 67%,22% 64%,0 66%); }
.atelier-splash-fragments > span:nth-child(6) { --drift-x: 2.7%; --drift-y: 1.4%; --turn: .3deg; clip-path: polygon(0 64%,22% 63%,47% 66%,72% 64%,100% 66%,100% 79%,77% 78%,52% 80%,28% 77%,0 79%); }
.atelier-splash-fragments > span:nth-child(7) { --drift-x: -3.8%; --drift-y: 2%; --turn: -.46deg; clip-path: polygon(0 77%,28% 76%,52% 79%,77% 77%,100% 79%,100% 91%,74% 90%,49% 93%,24% 89%,0 91%); }
.atelier-splash-fragments > span:nth-child(8) { --drift-x: 3.2%; --drift-y: 2.7%; --turn: .38deg; clip-path: polygon(0 89%,24% 88%,49% 92%,74% 89%,100% 91%,100% 100%,0 100%); }
.atelier-splash-veil {
  position: absolute;
  z-index: 3;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.05), transparent 58%, rgba(244,238,232,.08));
  pointer-events: none;
}
.atelier-splash-progress {
  position: absolute;
  z-index: 4;
  right: 9%;
  bottom: calc(25px + var(--safe-bottom));
  left: 9%;
  display: grid;
  gap: 8px;
  color: rgba(75,66,61,.62);
  font-family: "Times New Roman", "Songti SC", serif;
  font-size: 7px;
  letter-spacing: .28em;
  text-align: center;
  transition: opacity .65s ease, transform .65s ease;
}
.atelier-splash-progress span { display: none; }
.atelier-splash-progress i { height: 1px; overflow: hidden; position: relative; background: rgba(82,70,64,.12); }
.atelier-splash-progress i::after { content: ""; position: absolute; inset: 0; background: rgba(82,70,64,.46); transform-origin: left; animation: atelierProgress 1.55s cubic-bezier(.2,.7,.2,1) both; }
.atelier-splash.is-dissolving { pointer-events: none; }
.atelier-splash.is-dissolving .atelier-splash-image { animation: atelierBaseDissolve 1.55s .08s cubic-bezier(.2,.68,.2,1) both; }
.atelier-splash.is-dissolving .atelier-splash-fragments > span { animation: atelierFragmentDissolve 1.75s cubic-bezier(.16,.7,.2,1) both; animation-delay: calc(var(--fragment-index, 0) * 46ms); }
.atelier-splash.is-dissolving .atelier-splash-veil { animation: atelierVeilDissolve 1.5s .18s ease both; }
.atelier-splash.is-dissolving .atelier-splash-progress { opacity: 0; transform: translateY(7px); }
@keyframes atelierProgress { from { transform: scaleX(0); opacity: .25; } to { transform: scaleX(1); opacity: 1; } }
@keyframes atelierBaseDissolve { 0% { opacity: 1; transform: scale(1.008); filter: saturate(.92) contrast(.98); } 45% { opacity: .56; } 100% { opacity: 0; transform: scale(1.035); filter: saturate(.72) blur(13px); } }
@keyframes atelierFragmentDissolve { 0% { opacity: 1; transform: translate3d(0,0,0) rotate(0); filter: saturate(.92) contrast(.98) blur(0); } 38% { opacity: .92; } 100% { opacity: 0; transform: translate3d(var(--drift-x),var(--drift-y),0) rotate(var(--turn)) scale(1.015); filter: saturate(.72) blur(8px); } }
@keyframes atelierVeilDissolve { from { opacity: 1; } to { opacity: 0; } }

.ambient { position: fixed; border-radius: 999px; filter: blur(60px); pointer-events: none; opacity: .7; }
.ambient-a { width: 50vw; height: 50vw; background: rgba(255, 219, 218, .46); top: -20vw; right: -12vw; }
.ambient-b { width: 60vw; height: 60vw; background: rgba(209, 221, 229, .28); bottom: -25vw; left: -25vw; }

.app-shell { width: min(100%, 520px); height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; position: relative; overflow: hidden; background: linear-gradient(155deg, rgba(255,255,255,.18), rgba(239,231,224,.18)); }
.topbar { height: calc(62px + var(--safe-top)); padding: var(--safe-top) 18px 8px; display: grid; grid-template-columns: 42px 1fr 86px; align-items: center; z-index: 10; }
.icon-button { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.42); border: 1px solid rgba(255,255,255,.72); box-shadow: 0 6px 22px rgba(75, 60, 53, .06); font-size: 20px; backdrop-filter: blur(12px); }
.brand-mark { font-family: "Songti SC", "STSong", serif; font-size: 17px; font-style: italic; }
.project-title { text-align: center; line-height: 1; }
.eyebrow, .project-title .eyebrow { display: block; font-size: 8px; letter-spacing: .22em; color: var(--muted); margin-bottom: 6px; }
.title-button { padding: 0; background: transparent; font-family: "Songti SC", "STSong", serif; font-size: 14px; }
.title-button span { font-family: sans-serif; font-size: 10px; margin-left: 3px; }
.history-actions { display: flex; gap: 6px; justify-content: flex-end; }

.studio { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 4px 16px 8px; position: relative; }
.studio-meta { display: flex; justify-content: space-between; align-items: end; padding: 2px 3px 8px; }
.studio-step, .panel-heading span, .sheet-title-row span, .completion-copy > span, .realize-hero > span, .gallery-heading > span { font-size: 8px; letter-spacing: .2em; color: #958a84; }
.studio-meta h1 { font-family: "Songti SC", "STSong", serif; font-weight: 500; font-size: 18px; margin: 4px 0 0; }
.sound-toggle { background: transparent; color: var(--muted); font-size: 10px; padding: 7px 0; }
.sound-toggle span { margin-right: 4px; }

.mode-switcher { align-self: center; display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border-radius: 999px; background: rgba(255,255,255,.38); border: 1px solid rgba(255,255,255,.62); backdrop-filter: blur(12px); }
.mode-button { min-width: 54px; padding: 7px 12px; border-radius: 999px; background: transparent; color: #948983; font-size: 10px; transition: .35s ease; }
.mode-button.active { color: #4f4642; background: rgba(255,255,255,.78); box-shadow: 0 5px 16px rgba(77, 62, 56, .08); }

.stage-wrap { flex: 1; min-height: 250px; position: relative; display: grid; place-items: center; touch-action: none; }
.stage-wrap.drawing-active { cursor: crosshair; }
.focus-hint { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font-size: 9px; color: #9a908a; white-space: nowrap; transition: .3s; }
.nail-stage { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; gap: 20px; position: relative; perspective: 900px; transition: .7s cubic-bezier(.22,.8,.24,1); }
.hand { position: relative; width: min(43%, 190px); height: 190px; transition: .65s cubic-bezier(.22,.8,.24,1); }
.nail-stage.ten-mode { gap: var(--set-gap, 34px); }
.nail-stage.ten-mode .hand { width: min(40%, 180px); }
.nail-stage.ten-mode .hand-left { transform: scale(var(--set-scale, 1)); }
.nail-stage.ten-mode .hand-right { transform: scaleX(-1) scale(var(--set-scale, 1)); }
.nail { --nail-color: #d9bdad; --cat-angle: 25deg; --cat-x: 50%; --cat-y: 48%; --cat-width: 22%; position: absolute; width: 38px; height: 78px; transform-origin: center bottom; border-radius: 48% 48% 42% 42% / 38% 38% 16% 16%; background: var(--nail-color); box-shadow: inset 7px 1px 11px rgba(255,255,255,.46), inset -6px -4px 13px rgba(99,68,62,.13), 0 9px 20px rgba(81,62,56,.12); border: 1px solid rgba(255,255,255,.64); overflow: hidden; transition: left .65s cubic-bezier(.22,.8,.24,1), top .65s cubic-bezier(.22,.8,.24,1), transform .65s cubic-bezier(.22,.8,.24,1), width .65s cubic-bezier(.22,.8,.24,1), height .65s cubic-bezier(.22,.8,.24,1), border-radius .65s ease, opacity .45s ease, filter .45s ease, background .55s ease; will-change: transform; touch-action: none; }
.nail::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, rgba(255,255,255,.35), transparent 34%, rgba(255,255,255,.08) 68%, rgba(255,255,255,.2)); pointer-events: none; z-index: 6; }
.nail::after { content: ""; position: absolute; width: var(--cat-width); height: 150%; left: var(--cat-x); top: var(--cat-y); transform: translate(-50%, -50%) rotate(var(--cat-angle)); background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), rgba(255,255,255,.92), rgba(208,229,231,.44), transparent); filter: blur(5px); opacity: var(--cat-opacity, 0); mix-blend-mode: screen; transition: opacity .5s, width .3s; pointer-events: none; z-index: 5; }
.texture-layer { position: absolute; inset: 0; z-index: 1; border-radius: inherit; background-color: var(--nail-color); background-image: var(--nail-texture, none); background-position: center; background-size: var(--texture-size, 100% 100%); background-repeat: no-repeat; filter: hue-rotate(var(--texture-hue, 0deg)) saturate(var(--texture-saturation, 1)) brightness(var(--texture-brightness, 1)); transform: translateZ(0); backface-visibility: hidden; }
.nail-stage.single-mode .nail.focused .texture-layer { background-size: var(--texture-size, 100% 100%); image-rendering: auto; }
.nail[data-material="jelly"] { background: color-mix(in srgb, var(--nail-color) 68%, transparent); backdrop-filter: blur(5px); }
.nail[data-material="pearl"] { background: radial-gradient(circle at 25% 18%, rgba(255,255,255,.86), transparent 28%), linear-gradient(135deg, #e9dbd8, var(--nail-color) 45%, #c5d4d7 115%); }
.nail[data-material="glitter"] { background-color: var(--nail-color); background-image: radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.4px), radial-gradient(circle, rgba(255,218,185,.7) 0 1px, transparent 1.5px); background-size: 8px 8px, 13px 13px; background-position: 0 0, 4px 3px; }
.nail[data-material="metal"] { background: linear-gradient(110deg, #807c7c, #f9f8f4 22%, #a6a0a0 44%, #faf4ec 64%, #797778); }
.nail[data-material="cat"] { --cat-opacity: .85; background: radial-gradient(circle at 70% 15%, rgba(255,255,255,.38), transparent 28%), var(--nail-color); }
.nail[data-material="blank"] { background: rgba(195,202,204,.76); box-shadow: inset 7px 1px 12px rgba(255,255,255,.56), inset -5px -4px 12px rgba(75,88,91,.13), 0 9px 20px rgba(69,74,75,.1); }
.nail[data-material="blank"] .texture-layer { background: linear-gradient(108deg, rgba(255,255,255,.4), transparent 34%, rgba(151,164,167,.14) 72%, rgba(255,255,255,.16)), #c3cacc; opacity: .86; filter: none; }

.nail.shape-round { width: 39px; height: 66px; border-radius: 48% 48% 43% 43% / 35% 35% 18% 18%; }
.nail.shape-square { width: 40px; height: 70px; border-radius: 18% 18% 36% 36% / 10% 10% 16% 16%; }
.nail.shape-squoval { width: 40px; height: 73px; border-radius: 29% 29% 38% 38% / 16% 16% 16% 16%; }
.nail.shape-almond { width: 39px; height: 82px; border-radius: 50% 50% 41% 41% / 44% 44% 13% 13%; }
.nail.shape-oval { width: 40px; height: 78px; border-radius: 50% 50% 42% 42% / 35% 35% 14% 14%; }
.nail.shape-ballerina { width: 39px; height: 84px; border-radius: 20% 20% 38% 38% / 7% 7% 13% 13%; clip-path: polygon(26% 0, 74% 0, 93% 80%, 88% 100%, 12% 100%, 7% 80%); }
.nail.shape-stiletto { width: 39px; height: 90px; border-radius: 50% 50% 42% 42% / 64% 64% 10% 10%; clip-path: polygon(50% 0, 86% 42%, 94% 88%, 84% 100%, 16% 100%, 6% 88%, 14% 42%); }
.nail.shape-long { width: 38px; height: 102px; border-radius: 50% 50% 42% 42% / 70% 70% 9% 9%; clip-path: polygon(50% 0, 84% 43%, 94% 90%, 84% 100%, 16% 100%, 6% 90%, 16% 43%); }
.nail.shape-long-square { width: 39px; height: 102px; border-radius: 13% 13% 28% 28% / 5% 5% 10% 10%; }
.nail.shape-ultra-stiletto { width: 37px; height: 108px; border-radius: 50% 50% 35% 35% / 78% 78% 8% 8%; clip-path: polygon(50% 0, 80% 36%, 94% 92%, 84% 100%, 16% 100%, 6% 92%, 20% 36%); }
.nail.shape-soft-stiletto { width: 38px; height: 96px; border-radius: 50% 50% 38% 38% / 63% 63% 10% 10%; clip-path: polygon(50% 0, 85% 40%, 94% 90%, 84% 100%, 16% 100%, 6% 90%, 15% 40%); }
.nail.shape-point-almond { width: 39px; height: 91px; border-radius: 50% 50% 40% 40% / 54% 54% 11% 11%; }
.nail.shape-long-almond { width: 39px; height: 91px; border-radius: 50% 50% 41% 41% / 48% 48% 12% 12%; }
.nail.shape-coffin { width: 40px; height: 91px; border-radius: 16% 16% 34% 34% / 5% 5% 12% 12%; clip-path: polygon(24% 0, 76% 0, 94% 82%, 87% 100%, 13% 100%, 6% 82%); }
.nail.shape-long-oval { width: 40px; height: 91px; border-radius: 50% 50% 42% 42% / 40% 40% 13% 13%; }
.nail.shape-short-oval { width: 41px; height: 72px; border-radius: 50% 50% 43% 43% / 34% 34% 16% 16%; }
.nail.asset-shape { width:var(--shape-width,39px); height:var(--shape-height,82px); aspect-ratio:var(--shape-ratio,.48); border:0; border-radius:0; clip-path:none; -webkit-mask-image:var(--shape-mask); mask-image:var(--shape-mask); -webkit-mask-mode:alpha; mask-mode:alpha; -webkit-mask-position:center; mask-position:center; -webkit-mask-size:100% 100%; mask-size:100% 100%; -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat; filter:drop-shadow(0 9px 12px rgba(81,62,56,.12)); }

.hand-left .nail:nth-child(1), .hand-right .nail:nth-child(5) { left: var(--thumb-left, -2%); top: 75px; transform: rotate(-54deg) scale(1.08); }
.hand-left .nail:nth-child(2), .hand-right .nail:nth-child(4) { left: 22%; top: 38px; transform: rotate(-21deg) scale(.92); }
.hand-left .nail:nth-child(3), .hand-right .nail:nth-child(3) { left: 44%; top: 18px; transform: rotate(-4deg); }
.hand-left .nail:nth-child(4), .hand-right .nail:nth-child(2) { left: 64%; top: 36px; transform: rotate(14deg) scale(.88); }
.hand-left .nail:nth-child(5), .hand-right .nail:nth-child(1) { left: var(--pinky-left, 74%); top: 73px; transform: rotate(29deg) scale(.68); }
.hand-right { transform: scaleX(-1); }
.hand-right .nail { transform: scaleX(-1); }
.hand-right .nail:nth-child(1) { transform: rotate(29deg) scale(.68) scaleX(-1); }
.hand-right .nail:nth-child(2) { transform: rotate(14deg) scale(.88) scaleX(-1); }
.hand-right .nail:nth-child(3) { transform: rotate(-4deg) scaleX(-1); }
.hand-right .nail:nth-child(4) { transform: rotate(-21deg) scale(.92) scaleX(-1); }
.hand-right .nail:nth-child(5) { transform: rotate(-54deg) scale(1.08) scaleX(-1); }

.nail-stage.five-mode .hand-right { opacity: 0; width: 0; transform: translateX(120px) scaleX(-1); pointer-events: none; }
.nail-stage.five-mode .hand-left { width: 245px; transform: scale(1.17); }
.nail-stage.single-mode .hand { width: 100%; height: 100%; transform: none; }
.nail-stage.single-mode .hand-right { position: absolute; inset: 0; }
.nail-stage.single-mode .nail { opacity: .08; filter: blur(1px); pointer-events: none; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.5); }
.nail-stage.single-mode .nail.focused { opacity: 1; filter: none; pointer-events: auto; width: 116px; height: 235px; transform: translate(-50%, -50%) scale(var(--focus-scale, 1)); z-index: 20; box-shadow: inset 20px 3px 30px rgba(255,255,255,.52), inset -12px -8px 25px rgba(99,68,62,.14), 0 30px 70px rgba(76,57,51,.18); }
.nail-stage.single-mode .nail.focused.asset-shape { width:auto; height:min(235px,calc(var(--shape-height,82px) * 2.35)); aspect-ratio:var(--shape-ratio,.48); filter:drop-shadow(0 30px 35px rgba(76,57,51,.18)); }
.back-to-set { position: absolute; bottom: 5px; padding: 8px 15px; border-radius: 999px; background: rgba(255,255,255,.5); color: var(--muted); backdrop-filter: blur(10px); font-size: 10px; z-index: 30; }
.precision-tip { position: absolute; top: 10px; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.42); font-size: 9px; color: var(--muted); }
.nail-stage.single-mode ~ .back-to-set { left: 8px; right: auto; bottom: 8px; }
.nail-stage.single-mode ~ .precision-tip { left: 8px; right: auto; top: 8px; }
.precision-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #8fb9b6; box-shadow: 0 0 8px #8fb9b6; margin-right: 5px; }
.canvas-clear-button { position: absolute; z-index: 34; top: 9px; right: 2px; min-width: 58px; padding: 8px 11px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; color: #796965; background: rgba(255,255,255,.68); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 9px 24px rgba(76,59,53,.1); backdrop-filter: blur(16px); font-size: 9px; }
.canvas-clear-button span { color: #9a7770; font-size: 14px; line-height: 1; }
.canvas-clear-button b { font-weight: 500; letter-spacing: .04em; }
.nail-stage.single-mode ~ .canvas-clear-button { opacity: .7; }

.nail-decoration { position: absolute; left: 50%; top: 45%; width: var(--decor-size, 34%); aspect-ratio: 1; transform: translate(-50%, -50%) rotate(var(--rotation, 0deg)); display: grid; place-items: center; z-index: 10; filter: drop-shadow(0 3px 3px rgba(54,42,38,.22)); touch-action: none; animation: jewelDrop .45s cubic-bezier(.2,1.6,.4,1); }
.nail-decoration.selected { filter: drop-shadow(0 0 4px rgba(255,255,255,.9)) drop-shadow(0 3px 5px rgba(54,42,38,.25)); outline: 1px dashed rgba(90,75,69,.5); outline-offset: 4px; border-radius: 50%; }
.nail-decoration .gem { width: 100%; height: 100%; display: grid; place-items: center; }
.gem.crystal { clip-path: polygon(50% 0, 90% 24%, 100% 65%, 50% 100%, 0 65%, 10% 24%); background: linear-gradient(145deg, #fff, #bad2d7 35%, #fff 58%, #c6a6c7); border: 1px solid rgba(255,255,255,.9); }
.gem.pearl { border-radius: 50%; background: radial-gradient(circle at 30% 25%, #fff, #f6ede2 42%, #c9c0b8 100%); box-shadow: inset -2px -2px 5px rgba(120,100,90,.2); }
.gem.moon { font-size: 22px; color: #d7c08b; text-shadow: 0 1px 2px #fff; }
.gem.star { font-size: 22px; color: #e4d6bd; text-shadow: 0 1px 2px #8e7b68; }
.gem.bow { font-size: 20px; color: #d6d0ca; }
.gem.flower { font-size: 21px; filter: grayscale(.25); }
.gem.chain { width: 100%; height: 6px; border: 2px dotted #c7b37f; border-radius: 999px; }
.gem.asset { width: 100%; height: 100%; }
.gem.asset img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.gem.asset.tintable { position: relative; isolation: isolate; }
.gem.asset.tintable img { position: relative; z-index: 0; }
.gem.asset.tintable::after { content: ""; position: absolute; z-index: 1; inset: 0; background: var(--decor-color, #fff); opacity: var(--decor-tint-opacity, 0); mix-blend-mode: color; -webkit-mask-image: var(--gem-mask); mask-image: var(--gem-mask); -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; pointer-events: none; }
@keyframes jewelDrop { from { opacity: 0; transform: translate(-50%, -70%) scale(.3) rotate(-8deg); } to { opacity: 1; } }

.french-layer { position: absolute; inset: 0; pointer-events: none; z-index: 4; opacity: 0; transition: opacity .35s; }
.french-layer.active { opacity: 1; }
.french-layer.classic { background: linear-gradient(to bottom, #f8f5ef var(--french-height, 38%), transparent calc(var(--french-height, 38%) + 1%)); }
.french-layer.metallic { background: linear-gradient(to bottom, #d5c6a6 var(--french-height, 32%), transparent calc(var(--french-height, 32%) + 1%)); }
.french-layer.diagonal { background: linear-gradient(150deg, #f7f3ed 0 32%, transparent 33%); }
.french-layer.deepv { background: linear-gradient(145deg, transparent 0 34%, #f8f5ef 35% 48%, transparent 49%), linear-gradient(215deg, transparent 0 34%, #f8f5ef 35% 48%, transparent 49%); }
.drawing-layer { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; overflow: hidden; pointer-events: none; }
.drawing-stroke-depth { stroke: #564b47; opacity: .17; }
.drawing-stroke-main { opacity: .94; filter: drop-shadow(.2px .35px .28px rgba(48,35,31,.18)); }
.drawing-stroke-gloss { stroke: rgba(255,255,255,.84); opacity: .42; mix-blend-mode: screen; }

/* The outer nail is an unmasked object stage; only its surface clips polish and line work. */
.nail { padding: 0; overflow: visible; background: transparent; border: 0; box-shadow: none; }
.nail::before, .nail::after { content: none; }
.nail[data-material] { background: transparent; box-shadow: none; backdrop-filter: none; }
.nail-surface { position: absolute; inset: 0; display: block; overflow: hidden; border-radius: inherit; background: var(--nail-color); border: 1px solid rgba(255,255,255,.64); box-shadow: inset 7px 1px 11px rgba(255,255,255,.46), inset -6px -4px 13px rgba(99,68,62,.13), 0 9px 20px rgba(81,62,56,.12); pointer-events: none; }
.nail-surface::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, rgba(255,255,255,.35), transparent 34%, rgba(255,255,255,.08) 68%, rgba(255,255,255,.2)); pointer-events: none; z-index: 8; }
.nail-surface::after { content: ""; position: absolute; width: var(--cat-width); height: 150%; left: var(--cat-x); top: var(--cat-y); transform: translate(-50%, -50%) rotate(var(--cat-angle)); background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), rgba(255,255,255,.92), rgba(208,229,231,.44), transparent); filter: blur(5px); opacity: var(--cat-opacity, 0); mix-blend-mode: screen; transition: opacity .5s, width .3s; pointer-events: none; z-index: 7; }
.nail.asset-shape { -webkit-mask-image: none; mask-image: none; overflow: visible; filter: drop-shadow(0 9px 12px rgba(81,62,56,.12)); }
.nail.asset-shape .nail-surface { border: 0; border-radius: 0; -webkit-mask-image: var(--shape-mask); mask-image: var(--shape-mask); -webkit-mask-mode: alpha; mask-mode: alpha; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.nail[data-material="jelly"] .nail-surface { background: color-mix(in srgb, var(--nail-color) 68%, transparent); backdrop-filter: blur(5px); }
.nail[data-material="pearl"] .nail-surface { background: radial-gradient(circle at 25% 18%, rgba(255,255,255,.86), transparent 28%), linear-gradient(135deg, #e9dbd8, var(--nail-color) 45%, #c5d4d7 115%); }
.nail[data-material="glitter"] .nail-surface { background-color: var(--nail-color); background-image: radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.4px), radial-gradient(circle, rgba(255,218,185,.7) 0 1px, transparent 1.5px); background-size: 8px 8px, 13px 13px; background-position: 0 0, 4px 3px; }
.nail[data-material="metal"] .nail-surface { background: linear-gradient(110deg, #807c7c, #f9f8f4 22%, #a6a0a0 44%, #faf4ec 64%, #797778); }
.nail[data-material="cat"] .nail-surface { background: radial-gradient(circle at 70% 15%, rgba(255,255,255,.38), transparent 28%), var(--nail-color); }
.nail[data-material="blank"] .nail-surface { background: rgba(195,202,204,.76); box-shadow: inset 7px 1px 12px rgba(255,255,255,.56), inset -5px -4px 12px rgba(75,88,91,.13), 0 9px 20px rgba(69,74,75,.1); }
.dot-layer, .french-layer, .drawing-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.dot-layer { z-index: 3; }
.dot-layer circle { transform-box:fill-box; transform-origin:center; }
.dot-main { filter:none; }
.nail.dots-editing .dot-layer { pointer-events:auto; }
.nail.dots-editing .dot-main { pointer-events:all; cursor:grab; }
.nail.dots-editing .dot-main:active { cursor:grabbing; }
.french-layer { z-index: 4; opacity: 1; background: none; transition: opacity .35s; filter: drop-shadow(0 .3px .25px rgba(63,45,39,.1)); }
.drawing-layer { z-index: 5; }
.drawing-stroke-main { opacity: .88; }
.nail-stage.single-mode .nail.focused { box-shadow: none; }
.nail-stage.single-mode .nail.focused .nail-surface { box-shadow: inset 20px 3px 30px rgba(255,255,255,.52), inset -12px -8px 25px rgba(99,68,62,.14), 0 30px 70px rgba(76,57,51,.18); }

.quick-tools { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 3px; }
.quick-tool { padding: 6px 2px; background: transparent; color: #7f746e; font-size: 10px; }
.quick-tool span { margin-right: 5px; color: #9f8f7c; }
.quick-tool b { display: inline-grid; place-items: center; min-width: 15px; height: 15px; border-radius: 8px; background: rgba(255,255,255,.6); font-size: 8px; }

.material-dock { flex: 0 0 390px; background: rgba(247,244,240,.86); border: 1px solid rgba(255,255,255,.75); border-bottom: 0; border-radius: 28px 28px 0 0; backdrop-filter: blur(28px); box-shadow: 0 -18px 50px rgba(77,62,56,.08); display: flex; flex-direction: column; overflow: hidden; z-index: 20; }
.dock-handle, .sheet-handle { align-self: center; width: 34px; height: 3px; border-radius: 4px; background: rgba(86,72,66,.18); margin: 8px auto 5px; }
.dock-tabs { display: grid; grid-template-columns: repeat(4,1fr); padding: 0 16px; border-bottom: 1px solid var(--line); }
.dock-tab { height: 46px; position: relative; background: transparent; color: #9a908a; font-size: 10px; }
.dock-tab span { display: block; font-size: 16px; line-height: 1.1; margin-bottom: 2px; }
.dock-tab.active { color: #4b423e; }
.dock-tab.active::after { content: ""; position: absolute; width: 22px; height: 1px; background: #756763; left: 50%; bottom: -1px; transform: translateX(-50%); }
.dock-content { flex: 1; min-height: 0; overflow: hidden; }
.tool-panel { display: none; height: 100%; padding: 12px 18px 24px; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tool-panel.active { display: block; }
.tool-panel::-webkit-scrollbar { display: none; }
.tool-panel[data-panel-content="structure"] { overflow-y: auto; overscroll-behavior-y: contain; }
.tool-panel[data-panel-content="decor"] { overflow-y: auto; overscroll-behavior-y: contain; }
.panel-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 10px; }
.panel-heading h2, .sheet-title-row h2 { font-family: "Songti SC", "STSong", serif; font-weight: 500; font-size: 16px; margin: 3px 0 0; }
.text-button { padding: 6px 0; background: transparent; color: #81756f; font-size: 10px; }
.horizontal-scroll { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 2px 2px 8px; }
.horizontal-scroll::-webkit-scrollbar { display: none; }
.structure-mode-switch { display:grid; grid-template-columns:repeat(3,1fr); gap:4px; padding:4px; margin-bottom:10px; border-radius:999px; background:rgba(234,226,220,.7); }
.structure-mode-switch button { padding:8px 5px; border-radius:999px; background:transparent; color:var(--muted); font-size:9px; }
.structure-mode-switch button.active { color:#4d433f; background:rgba(255,255,255,.82); box-shadow:0 5px 14px rgba(74,58,52,.07); }
.structure-section { display:none; animation:structureIn .35s ease; }
.structure-section.active { display:block; }
@keyframes structureIn { from { opacity:0; transform:translateY(4px); } }
.structure-apply-card { width:100%; min-height:58px; display:grid; grid-template-columns:40px 1fr auto; align-items:center; gap:9px; padding:9px 11px; border-radius:17px; text-align:left; background:rgba(255,255,255,.48); border:1px solid rgba(255,255,255,.72); }
.structure-apply-card.active { background:rgba(255,255,255,.82); box-shadow:0 8px 20px rgba(75,58,52,.07); }
.structure-apply-card .dot-sample { width:38px; height:38px; display:grid; place-items:center; border-radius:50%; background:#d7c3b9; color:#fffaf4; font:13px/1.05 Georgia,serif; letter-spacing:.1em; }
.structure-apply-card b,.structure-apply-card small { display:block; }
.structure-apply-card b { font-size:9px; font-weight:600; }
.structure-apply-card small { margin-top:3px; color:var(--muted); font-size:7px; }
.structure-apply-card i { color:#7c6e68; font-size:8px; font-style:normal; }
.structure-control-card { padding:10px; margin-top:8px; border-radius:17px; background:rgba(255,255,255,.4); border:1px solid rgba(255,255,255,.62); }
.control-title { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.control-title b,.control-title small { display:block; }
.control-title b { font-size:9px; font-weight:600; }
.control-title small { margin-top:2px; color:var(--muted); font-size:7px; }
.control-title button { padding:6px 8px; border-radius:999px; background:rgba(236,228,222,.8); color:#796b65; font-size:7px; }
.structure-color-row { display:flex; align-items:center; gap:8px; margin-top:9px; }
.structure-color-row button { width:25px; height:25px; padding:0; border-radius:50%; background:var(--structure-color); border:2px solid rgba(255,255,255,.88); box-shadow:0 0 0 1px rgba(80,65,59,.12),inset 0 1px 3px rgba(255,255,255,.7); }
.structure-color-row button.active { box-shadow:0 0 0 2px #8b7c75,inset 0 1px 3px rgba(255,255,255,.7); }
.structure-color-row .smart-color { width:44px; border-radius:999px; color:#665a55; background:linear-gradient(90deg,#fffaf4 50%,#6d5148 50%); font-size:5px; letter-spacing:.08em; text-shadow:0 1px 2px white; }
.structure-custom-color { display:flex; align-items:center; gap:8px; width:max-content; margin-top:9px; color:var(--muted); font-size:7px; }
.structure-custom-color input { width:26px; height:26px; padding:2px; border:1px solid rgba(93,76,68,.12); border-radius:50%; background:white; }
.structure-slider { display:block; margin-top:10px; }
.structure-slider > span { display:flex; justify-content:space-between; color:#786a65; font-size:8px; }
.structure-slider input { width:100%; accent-color:#8a7a73; margin-top:6px; }
.structure-note { margin:1px 2px 8px; color:var(--muted); font-size:7px; line-height:1.5; }
.french-style-list { gap:7px; padding-bottom:5px; }
.french-style-card { flex:0 0 61px; height:83px; padding:6px; border-radius:16px; background:rgba(255,255,255,.42); border:1px solid rgba(255,255,255,.65); }
.french-style-card.active { background:rgba(255,255,255,.86); box-shadow:0 7px 18px rgba(70,53,48,.08); outline:1px solid rgba(110,91,82,.16); }
.french-style-card svg { display:block; width:33px; height:51px; margin:0 auto 4px; border-radius:50% 50% 42% 42% / 35% 35% 14% 14%; background:#d7beb3; overflow:hidden; box-shadow:inset 4px 1px 6px rgba(255,255,255,.4); }
.french-style-card small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:7px; }
.french-gel-palette { display:grid; grid-template-rows:repeat(2, 66px); grid-auto-flow:column; grid-auto-columns:52px; gap:7px; min-height:139px; margin-top:9px; padding:2px 2px 6px; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x proximity; }
.french-gel-chip { width:52px; height:66px; padding:4px 3px 3px; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:4px; border-radius:15px; color:#776a65; background:rgba(255,255,255,.34); border:1px solid rgba(255,255,255,.58); scroll-snap-align:start; transition:transform .24s ease, background .24s ease, box-shadow .24s ease; }
.french-gel-chip:active { transform:scale(.97); }
.french-gel-chip.active { color:#4e4541; background:rgba(255,255,255,.9); box-shadow:0 7px 17px rgba(74,57,52,.1), 0 0 0 1px rgba(113,94,85,.14); }
.french-gel-swatch { position:relative; isolation:isolate; display:block; width:31px; height:45px; flex:0 0 45px; overflow:hidden; border-radius:50%; background-color:var(--french-gel-color, #e1dcd6); background-image:var(--french-gel-image); background-position:center; background-size:145% auto; background-repeat:no-repeat; border:1px solid rgba(255,255,255,.7); box-shadow:inset 5px 1px 7px rgba(255,255,255,.22), inset -3px -3px 7px rgba(67,48,42,.1), 0 3px 7px rgba(60,45,40,.09); }
.french-gel-swatch::after { content:""; position:absolute; inset:0; border-radius:inherit; background:linear-gradient(112deg, rgba(255,255,255,.3), transparent 31%, rgba(255,255,255,.03) 68%, rgba(255,255,255,.16)); pointer-events:none; }
.french-gel-chip small { display:block; width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:6px; line-height:1; }
.shape-card { flex: 0 0 70px; height: 93px; padding: 8px 6px; border-radius: 18px; background: rgba(255,255,255,.35); border: 1px solid rgba(255,255,255,.55); color: #827770; transition: .3s; }
.shape-card.active { background: rgba(255,255,255,.82); color: #493f3c; box-shadow: 0 9px 26px rgba(74,58,52,.08); border-color: rgba(155,137,128,.24); }
.shape-preview { display: block; width: 33px; height: 51px; object-fit: contain; margin: 0 auto 5px; filter: drop-shadow(0 5px 6px rgba(80,62,55,.1)); }
.shape-card small { display: block; font-size: 9px; }
.shape-card em { font-style: normal; display: block; font-size: 7px; color: #aaa09a; margin-top: 2px; }
.filter-chip { flex: 0 0 auto; padding: 6px 11px; border-radius: 999px; background: transparent; color: #988d87; font-size: 9px; border: 1px solid rgba(125,108,100,.09); }
.filter-chip.active { color: #4f4641; background: rgba(255,255,255,.75); border-color: rgba(126,109,101,.16); }
.catalog-count { font-size: 7px !important; letter-spacing: .12em !important; padding-bottom: 5px; }
.swatch-list { display: grid; grid-template-rows: repeat(2, 78px); grid-auto-flow: column; grid-auto-columns: 58px; gap: 7px; min-height: 163px; padding-bottom: 5px; }
.swatch { width: 58px; height: 78px; padding: 4px 4px 2px; border-radius: 17px; background: transparent; border: 1px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; overflow: visible; }
.swatch.active { border-color: rgba(108,93,85,.22); background: rgba(255,255,255,.72); box-shadow: 0 7px 18px rgba(76,59,53,.07); }
.swatch-color { position: relative; isolation: isolate; flex: 0 0 54px; display: block; width: 40px; height: 54px; margin: 0 auto; overflow: hidden; border-radius: 50%; background: var(--swatch-base, #d8c6c4); border: 1px solid rgba(255,255,255,.64); box-shadow: inset 5px 1px 8px rgba(255,255,255,.24), inset -4px -3px 8px rgba(67,48,42,.11), 0 4px 8px rgba(60,45,40,.1); }
.swatch-color img { position: absolute; z-index: 0; inset: 0; display: block; width: 100%; height: 100%; object-fit: fill; }
.swatch-color::after { content: ""; position: absolute; z-index: 1; inset: 0; border-radius: inherit; background: linear-gradient(112deg, rgba(255,255,255,.34), transparent 31%, rgba(255,255,255,.04) 68%, rgba(255,255,255,.18)); pointer-events: none; }
.swatch small { position: relative; z-index: 2; display: block; width: 100%; flex: 0 0 auto; font-size: 7px; line-height: 1.05; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.color-detail-button { width: 100%; min-height: 37px; padding: 5px 9px; border-radius: 13px; display: flex; align-items: center; justify-content: space-between; text-align: left; background: rgba(255,255,255,.48); border: 1px solid rgba(255,255,255,.72); }
.color-detail-button span b { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; font-weight: 500; }
.color-detail-button span small { display: block; color: var(--muted); font-size: 7px; margin-top: 2px; }
.color-detail-button i { font-style: normal; color: #786c67; font-size: 8px; }
.draw-entry-button { width: 100%; min-height: 43px; margin: -2px 0 7px; padding: 7px 10px; display: grid; grid-template-columns: 29px 1fr auto; align-items: center; gap: 8px; text-align: left; color: #5d514c; border-radius: 15px; border: 1px solid rgba(255,255,255,.78); background: linear-gradient(120deg, rgba(255,255,255,.72), rgba(236,226,221,.58)); box-shadow: 0 7px 20px rgba(77,61,55,.06); transition: background .3s ease, box-shadow .3s ease, transform .3s ease; }
.draw-entry-button:active { transform: scale(.99); }
.draw-entry-button.active { color: white; border-color: rgba(126,108,100,.15); background: linear-gradient(120deg, #786963, #a39088); box-shadow: 0 9px 24px rgba(86,67,61,.17); }
.draw-entry-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; font-family: Georgia, serif; font-size: 16px; background: rgba(255,255,255,.68); color: #74645e; }
.draw-entry-button.active .draw-entry-icon { background: rgba(255,255,255,.2); color: white; }
.draw-entry-button span b { display: block; font-size: 9px; font-weight: 500; }
.draw-entry-button span small { display: block; margin-top: 2px; color: #9a8d87; font-size: 7px; }
.draw-entry-button.active span small { color: rgba(255,255,255,.72); }
.draw-entry-button i { font-style: normal; color: #796b65; font-size: 8px; }
.draw-entry-button.active i { color: white; }
.drawing-controls { padding: 8px 9px; margin: -1px 0 6px; border-radius: 15px; background: rgba(255,255,255,.54); border: 1px solid rgba(255,255,255,.72); }
.drawing-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drawing-status b { display: block; font-size: 8px; font-weight: 500; }
.drawing-status small { display: block; margin-top: 2px; color: var(--muted); font-size: 7px; }
.drawing-status > div { display: flex; gap: 5px; }
.drawing-status button { padding: 6px 8px; border-radius: 999px; background: rgba(244,239,235,.9); color: #746762; font-size: 7px; }
.drawing-status button:last-child { background: #756762; color: white; }
.drawing-options { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 7px; margin-top: 7px; }
.draw-color-palette { display: flex; gap: 5px; }
.draw-color-palette button { width: 25px; height: 25px; padding: 5px; border-radius: 50%; background: rgba(255,255,255,.72); box-shadow: inset 0 0 0 1px rgba(102,86,80,.08); }
.draw-color-palette button::after { content: ""; display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--draw-color); box-shadow: 0 1px 4px rgba(58,45,41,.18); }
.draw-color-palette button.active { box-shadow: 0 0 0 1px #766963, 0 0 0 3px rgba(255,255,255,.8); }
.custom-draw-color { width: 34px; height: 25px; position: relative; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.7); overflow: hidden; }
.custom-draw-color input { position: absolute; inset: -7px; width: 48px; height: 40px; border: 0; padding: 0; }
.custom-draw-color span { position: relative; pointer-events: none; padding: 3px; border-radius: 5px; background: rgba(255,255,255,.72); color: #655a56; font-size: 6px; }
.custom-draw-color.active { box-shadow: 0 0 0 1px #766963, 0 0 0 3px rgba(255,255,255,.8); }
.draw-style-toggle { justify-self: end; display: grid; grid-template-columns: 1fr 1fr; padding: 2px; border-radius: 999px; background: rgba(232,224,219,.72); }
.draw-style-toggle button { min-width: 48px; padding: 5px 6px; border-radius: 999px; background: transparent; color: #8e827c; font-size: 7px; }
.draw-style-toggle button.active { background: rgba(255,255,255,.92); color: #4f4642; box-shadow: 0 3px 8px rgba(65,51,46,.08); }
.range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 3px; }
.range-row.drawing-range { grid-template-columns: 1fr; }
.range-row label { font-size: 8px; color: var(--muted); }
.range-row label > span { display: flex; justify-content: space-between; }
.range-row output { color: #665a55; }
.range-row input:disabled { opacity: .3; }
input[type="range"] { width: 100%; accent-color: #8b7971; height: 3px; margin-top: 7px; }
.decor-list { display: grid; grid-template-rows: repeat(2, 62px); grid-auto-flow: column; grid-auto-columns: 62px; gap: 6px; min-height: 130px; }
.decor-card { width: 62px; height: 62px; border-radius: 17px; background: rgba(255,255,255,.47); border: 1px solid rgba(255,255,255,.62); display: flex; flex-direction: column; align-items: center; justify-content: center; touch-action: none; }
.decor-card .gem { width: 29px; height: 29px; margin-bottom: 6px; }
.decor-card small { width: 54px; font-size: 8px; color: #81756f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.decor-card-wrap { position: relative; width: 62px; height: 62px; }
.custom-decor-remove { position: absolute; z-index: 3; top: -3px; right: -3px; width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; color: #756863; background: rgba(255,255,255,.9); border: 1px solid rgba(110,92,84,.12); box-shadow: 0 4px 12px rgba(68,53,47,.12); font-size: 11px; }
.empty-decor-note { grid-row: 1 / -1; width: 172px; height: 94px; align-self: center; padding: 14px; display: grid; grid-template-columns: 30px 1fr; align-content: center; column-gap: 8px; border-radius: 20px; color: #796b66; background: rgba(255,255,255,.43); border: 1px dashed rgba(113,93,85,.17); }
.empty-decor-note > span { grid-row: 1 / span 2; width: 29px; height: 29px; display: grid; place-items: center; align-self: center; border-radius: 50%; background: rgba(255,255,255,.74); font-size: 14px; }
.empty-decor-note b { align-self: end; font-size: 8px; font-weight: 500; }
.empty-decor-note small { align-self: start; margin-top: 3px; color: #9a8d87; font-size: 7px; }
.sticker-upload-entry { width: 100%; min-height: 48px; margin: 0 0 8px; padding: 7px 10px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; text-align: left; border-radius: 17px; color: #5f5450; background: linear-gradient(115deg, rgba(255,255,255,.8), rgba(244,235,231,.7)); border: 1px solid rgba(255,255,255,.86); box-shadow: 0 8px 20px rgba(74,56,50,.07), inset 0 1px rgba(255,255,255,.8); }
.sticker-upload-entry > span:nth-child(2) { min-width: 0; }
.sticker-upload-entry b { display: block; font-family: "Songti SC", "STSong", serif; font-size: 11px; font-weight: 500; }
.sticker-upload-entry small { display: block; margin-top: 3px; color: #948780; font-size: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticker-upload-entry > i { font-style: normal; font-size: 14px; color: #9e8d86; }
.sticker-upload-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #665a56; background: radial-gradient(circle at 30% 25%, #fff, rgba(226,211,207,.72)); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 5px 13px rgba(75,58,53,.1); font-size: 16px; }
.drag-copy { text-align: center; font-size: 8px; color: #a0958f; margin: 3px 0 0; }
.object-adjustments { margin: 0 2px 7px; padding: 7px 9px; border-radius: 15px; background: rgba(255,255,255,.62); border: 1px solid rgba(255,255,255,.76); transition: opacity .3s ease, background .3s ease; }
.object-adjustments.disabled { opacity: .64; background: rgba(255,255,255,.38); }
.object-adjustment-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.object-adjustment-heading b, .object-color-control b { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; font-weight: 500; }
.object-adjustment-heading small, .object-color-control small { display: block; color: var(--muted); font-size: 7px; margin-top: 2px; }
.object-slider-stack { display: grid; gap: 2px; }
.object-slider-stack label { min-height: 31px; display: grid; grid-template-columns: 32px 40px 1fr; align-items: center; gap: 4px; }
.object-slider-stack label > span, .object-slider-stack output { font-size: 8px; color: #6f625d; }
.object-slider-stack input { height: 30px; margin: 0; touch-action: pan-x; accent-color: #796963; }
.object-slider-stack input:disabled { opacity: .42; }
.object-color-control { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 6px; margin-top: 5px; padding-top: 7px; border-top: 1px solid rgba(94,78,71,.1); }
.decor-color-palette { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.decor-color-palette button, .decor-custom-color { position: relative; flex: 0 0 23px; width: 23px; height: 23px; border-radius: 50%; border: 1px solid rgba(95,79,72,.13); background: var(--decor-swatch, #fff); box-shadow: inset 0 1px 3px rgba(255,255,255,.72); }
.decor-color-palette button[data-decor-tint="clear"] { background: linear-gradient(135deg, #fff 0 45%, #c9d5dd 46% 53%, #fff 54%); }
.decor-color-palette button.active, .decor-custom-color.active { box-shadow: 0 0 0 1px #756762, 0 0 0 3px rgba(255,255,255,.86); }
.decor-custom-color { overflow: hidden; display: grid; place-items: center; background: conic-gradient(#ef98ac, #f1cb73, #8dc6b3, #7fa8df, #b08cd1, #ef98ac); }
.decor-custom-color input { position: absolute; inset: -7px; width: 38px; height: 38px; opacity: 0; cursor: pointer; }
.decor-custom-color i { position: relative; pointer-events: none; width: 13px; height: 13px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.82); color: #655a56; font-style: normal; font-size: 9px; }
.dock-footer { height: calc(58px + var(--safe-bottom)); padding: 8px 16px var(--safe-bottom); display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--line); }
.autosave { flex: 1; font-size: 8px; color: #938983; white-space: nowrap; }
.autosave i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #91a99a; margin-right: 5px; box-shadow: 0 0 8px rgba(105,140,117,.5); }
.finish-button { min-width: 184px; padding: 13px 17px; border-radius: 999px; display: flex; justify-content: space-between; color: white; background: linear-gradient(120deg, #625652, #8d7e79); box-shadow: 0 10px 25px rgba(79,64,59,.22); font-family: "Songti SC", "STSong", serif; font-size: 12px; }

.sheet-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(69,55,49,.2); backdrop-filter: blur(4px); }
.bottom-sheet { position: fixed; z-index: 70; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 520px); max-height: 76dvh; overflow-y: auto; padding: 0 20px calc(20px + var(--safe-bottom)); border-radius: 30px 30px 0 0; background: rgba(248,245,241,.96); box-shadow: 0 -25px 70px rgba(63,49,44,.2); animation: sheetUp .45s cubic-bezier(.18,.9,.28,1); }
@keyframes sheetUp { from { transform: translate(-50%, 100%); } }
.sticker-editor-screen { position: fixed; z-index: 135; inset: 0; width: min(100%, 520px); height: 100dvh; margin: auto; display: grid; grid-template-rows: auto auto minmax(180px, 1fr) minmax(280px, 42dvh); overflow: hidden; color: var(--ink); background: radial-gradient(circle at 84% 8%, rgba(237,211,213,.45), transparent 28%), radial-gradient(circle at 8% 46%, rgba(204,220,225,.3), transparent 30%), linear-gradient(155deg, #f8f4ef, #ede5df); animation: screenIn .55s cubic-bezier(.2,.85,.2,1); }
.sticker-editor-header { padding: var(--safe-top) 18px 6px; display: grid; grid-template-columns: 42px 1fr 54px; align-items: center; }
.sticker-editor-header > div { text-align: center; }
.sticker-editor-header span { display: block; margin-bottom: 4px; color: #968a84; font-size: 7px; letter-spacing: .22em; }
.sticker-editor-header h2 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: 16px; font-weight: 500; }
.sticker-reset-button { justify-self: end; padding: 8px 9px; border-radius: 999px; color: #81736d; background: rgba(255,255,255,.48); border: 1px solid rgba(255,255,255,.75); font-size: 8px; }
.sticker-editor-intro { padding: 4px 24px 5px; text-align: center; }
.sticker-editor-intro > span { color: #aa9a92; font-size: 7px; letter-spacing: .2em; }
.sticker-editor-intro p { max-width: 340px; margin: 5px auto 0; color: #8d817b; font-size: 8px; line-height: 1.5; }
.sticker-canvas-stage { min-height: 0; padding: 6px 18px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; overflow: hidden; }
.sticker-canvas-frame { position: relative; flex: 0 0 auto; width: 240px; height: 240px; max-width: 100%; max-height: 100%; overflow: hidden; border-radius: 26px; background-color: #eee9e4; background-image: linear-gradient(45deg, rgba(170,159,153,.16) 25%, transparent 25%), linear-gradient(-45deg, rgba(170,159,153,.16) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(170,159,153,.16) 75%), linear-gradient(-45deg, transparent 75%, rgba(170,159,153,.16) 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; border: 1px solid rgba(255,255,255,.86); box-shadow: 0 18px 48px rgba(76,60,54,.14), inset 0 0 0 1px rgba(118,99,91,.04); touch-action: none; }
.sticker-canvas-frame canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }
#sticker-guide-canvas { pointer-events: none; }
.sticker-canvas-status { min-height: 14px; padding: 4px 10px; border-radius: 999px; color: #857873; background: rgba(255,255,255,.52); border: 1px solid rgba(255,255,255,.7); font-size: 7px; }
.sticker-editor-controls { min-height: 0; padding: 10px 18px calc(15px + var(--safe-bottom)); overflow-y: auto; overscroll-behavior-y: contain; border-radius: 28px 28px 0 0; background: rgba(248,245,241,.88); border: 1px solid rgba(255,255,255,.82); border-bottom: 0; box-shadow: 0 -15px 45px rgba(74,57,51,.08); backdrop-filter: blur(28px); -webkit-overflow-scrolling: touch; }
.sticker-tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.sticker-tool-grid button { min-width: 0; padding: 8px 2px 7px; border-radius: 15px; color: #887b75; background: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.72); }
.sticker-tool-grid button span, .sticker-tool-grid button b { display: block; }
.sticker-tool-grid button span { height: 16px; font-size: 14px; }
.sticker-tool-grid button b { margin-top: 3px; font-size: 7px; font-weight: 500; white-space: nowrap; }
.sticker-tool-grid button.active { color: white; background: linear-gradient(145deg, #6a5d59, #92817b); box-shadow: 0 7px 18px rgba(83,65,59,.16); }
.sticker-tool-note { min-height: 42px; margin: 7px 0; padding: 7px 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 15px; background: rgba(255,255,255,.54); }
.sticker-tool-note b { display: block; font-size: 8px; font-weight: 500; }
.sticker-tool-note small { display: block; max-width: 265px; margin-top: 2px; color: #978b85; font-size: 7px; line-height: 1.4; }
.sticker-tool-note > div { display: flex; gap: 4px; }
.sticker-tool-note button { width: 29px; height: 29px; border-radius: 50%; color: #746762; background: rgba(255,255,255,.76); border: 1px solid rgba(114,94,86,.08); }
.sticker-tool-note button:disabled { opacity: .28; }
.sticker-control-stack { display: grid; gap: 5px; }
.sticker-control-stack label { min-height: 34px; padding: 5px 9px; display: grid; grid-template-columns: 86px 1fr; align-items: center; gap: 8px; border-radius: 14px; background: rgba(255,255,255,.4); }
.sticker-control-stack label > span { display: flex; justify-content: space-between; color: #7f716c; font-size: 8px; }
.sticker-control-stack input { margin: 0; height: 28px; touch-action: pan-x; }
.sticker-name-field { min-height: 38px; margin-top: 6px; padding: 5px 9px; display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 8px; border-radius: 14px; background: rgba(255,255,255,.52); }
.sticker-name-field span { color: #8c7f79; font-size: 8px; }
.sticker-name-field input { min-width: 0; border: 0; border-bottom: 1px solid rgba(103,84,76,.1); padding: 5px 2px; outline: 0; background: transparent; font-family: "Songti SC", "STSong", serif; font-size: 11px; }
.sticker-save-button { width: 100%; min-height: 47px; margin-top: 8px; padding: 9px 14px; display: grid; grid-template-columns: 1fr auto; text-align: left; border-radius: 999px; color: white; background: linear-gradient(120deg, #5f5450, #8c7a75); box-shadow: 0 12px 28px rgba(75,59,54,.2); }
.sticker-save-button span, .sticker-save-button small { grid-column: 1; }
.sticker-save-button span { font-family: "Songti SC", "STSong", serif; font-size: 11px; }
.sticker-save-button small { margin-top: 2px; color: rgba(255,255,255,.66); font-size: 7px; }
.sticker-save-button b { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 14px; font-weight: 400; }
.sheet-title-row { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 18px; }
.size-presets { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.size-option { padding: 16px 6px; border-radius: 18px; background: rgba(255,255,255,.58); border: 1px solid rgba(95,78,71,.08); }
.size-option strong { display: block; font-family: "Songti SC", "STSong", serif; font-size: 18px; }
.size-option small { color: var(--muted); font-size: 7px; }
.size-option.active { background: #6e605b; color: white; }
.size-option.active small { color: #ddd3ce; }
.professional-size { width: 100%; margin: 12px 0; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.55); display: grid; grid-template-columns: 1fr auto; text-align: left; }
.professional-size span, .professional-size small { grid-column: 1; }
.professional-size small { color: var(--muted); font-size: 8px; margin-top: 3px; }
.professional-size b { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 18px; font-weight: 400; }
.finger-sizes { display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; margin: 12px 0; }
.finger-sizes label { font-size: 7px; color: var(--muted); text-align: center; }
.finger-sizes select { width: 100%; margin-top: 5px; border: 0; border-radius: 12px; padding: 9px 4px; background: white; text-align: center; }
.primary-sheet-button, .secondary-action, .submit-design { width: 100%; padding: 14px 18px; border-radius: 999px; background: #6b5d59; color: white; margin-top: 8px; }
.cat-presets { display: flex; gap: 8px; overflow-x: auto; }
.cat-preset { flex: 0 0 76px; padding: 12px 6px; border-radius: 16px; background: rgba(255,255,255,.55); font-size: 9px; }
.cat-preset.active { background: #6d5f5b; color: white; }
.slider-stack { margin: 18px 0; display: grid; gap: 16px; }
.slider-stack label { display: grid; grid-template-columns: 1fr auto; font-size: 10px; }
.slider-stack output { color: var(--muted); }
.slider-stack input { grid-column: 1 / -1; }
.sheet-note { color: #978c86; font-size: 9px; text-align: center; line-height: 1.6; }
.color-editor-preview { display: flex; align-items: center; gap: 18px; padding: 2px 16px 16px; }
.color-editor-preview .nail { position: relative; flex: 0 0 54px; width: 54px; height: 105px; box-shadow: inset 8px 2px 14px rgba(255,255,255,.45), 0 12px 24px rgba(68,50,45,.14); }
.color-editor-preview .nail.asset-shape { flex-basis:auto; width:auto; height:105px; aspect-ratio:var(--shape-ratio,.48); }
.color-editor-preview strong { display: block; font-family: "Songti SC", "STSong", serif; font-size: 15px; }
.color-editor-preview small { display: block; max-width: 190px; color: var(--muted); font-size: 8px; margin-top: 6px; line-height: 1.6; }
.color-spectrum { --spectrum-hue: 340; height: 155px; position: relative; border-radius: 20px; background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(var(--spectrum-hue),100%,50%)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 10px 25px rgba(68,52,46,.08); touch-action: none; }
.color-spectrum i { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; border: 2px solid white; border-radius: 50%; transform: translate(-50%,-50%); box-shadow: 0 1px 5px rgba(0,0,0,.35); pointer-events: none; }
.hue-strip { position: relative; margin: 13px 1px 8px; height: 20px; }
.hue-strip i { position: absolute; inset: 6px 0; border-radius: 999px; background: linear-gradient(90deg,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00); }
.hue-strip input { position: absolute; inset: 0; width: 100%; opacity: .01; }
.compact-sliders { gap: 11px; margin: 12px 0; }
.sheet-button-row { display: grid; grid-template-columns: 1fr 1.35fr; gap: 8px; }
.sheet-button-row .secondary-action, .sheet-button-row .primary-sheet-button { margin: 0; }
.confirm-sheet { padding-top: 0; text-align: center; }
.confirm-sheet .sheet-handle { margin-bottom: 18px; }
.confirm-sheet > span { display: block; color: #a0928c; font-size: 8px; letter-spacing: .23em; }
.confirm-sheet h2 { margin: 8px 0 7px; font-family: "Songti SC", "STSong", serif; font-size: 21px; font-weight: 500; }
.confirm-sheet p { max-width: 330px; margin: 0 auto 20px; color: #8e817b; font-size: 10px; line-height: 1.75; }
.confirm-sheet-icon { width: 48px; height: 48px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; color: #8a716b; background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(224,211,205,.62)); box-shadow: 0 12px 28px rgba(82,63,57,.1); font-size: 19px; }
.danger-sheet-button { background: linear-gradient(120deg, #745e59, #9b7770); }
.layers-list { display: grid; gap: 8px; }
.layer-item { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; padding: 12px; border-radius: 17px; background: rgba(255,255,255,.58); }
.layer-icon { width: 27px; height: 27px; border-radius: 9px; background: #e6d6ce; display: grid; place-items: center; font-size: 11px; }
.layer-item strong { font-size: 10px; font-weight: 500; }
.layer-item small { display: block; color: var(--muted); font-size: 7px; margin-top: 2px; }
.layer-item button { background: transparent; color: var(--muted); }

.completion-screen, .save-screen, .realize-screen, .success-screen, .gallery-screen { position: fixed; z-index: 100; inset: 0; width: min(100%, 520px); margin: auto; overflow-y: auto; background: linear-gradient(155deg, #f7f3ee, #ece4dd); animation: screenIn .65s cubic-bezier(.2,.85,.2,1); }
.app-shell, .completion-screen, .save-screen, .realize-screen, .success-screen, .gallery-screen { -webkit-user-select:none; user-select:none; }
input, textarea { -webkit-user-select:text; user-select:text; }
.decor-construction-note { grid-column:1/-1; min-height:172px; margin:8px 0; border:1px solid rgba(255,255,255,.82); border-radius:28px; background:linear-gradient(145deg,rgba(255,255,255,.7),rgba(232,222,218,.62)); display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; box-shadow:0 18px 45px rgba(90,70,63,.08); }
.decor-construction-note span { font-size:8px; letter-spacing:.32em; color:#a39690; }
.decor-construction-note b { margin:15px 0 7px; font-family:"Songti SC","STSong",serif; font-size:17px; font-weight:500; color:#4d4541; }
.decor-construction-note small { color:#9b8e88; font-size:9px; }
@keyframes screenIn { from { opacity: 0; transform: translateY(16px) scale(.985); } }
.completion-header { height: calc(60px + var(--safe-top)); padding: var(--safe-top) 18px 7px; display: flex; justify-content: space-between; align-items: center; }
.completion-header > span { font-size: 8px; letter-spacing: .23em; color: var(--muted); }
.completion-header > i { width: 38px; }
.completion-glow { position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(227,211,218,.8); filter: blur(75px); top: 110px; left: 50%; transform: translateX(-50%); }
.completion-screen .completion-glow,
.completion-screen .completion-header,
.completion-screen .completion-copy,
.completion-screen .work-card,
.completion-screen .completion-actions { opacity: 0; }
.completion-screen .completion-header,
.completion-screen .completion-copy,
.completion-screen .work-card,
.completion-screen .completion-actions { transform: translateY(14px); filter: blur(7px); }
.completion-screen.is-revealed .completion-glow { animation: completionGlowIn 1.8s ease-out .08s both; }
.completion-screen.is-revealed .completion-header { animation: completionReveal .8s cubic-bezier(.2,.75,.25,1) .08s both; }
.completion-screen.is-revealed .completion-copy { animation: completionReveal .95s cubic-bezier(.2,.75,.25,1) .2s both; }
.completion-screen.is-revealed .work-card { animation: completionReveal 1s cubic-bezier(.2,.75,.25,1) 1.12s both; }
.completion-screen.is-revealed .completion-actions { animation: completionReveal 1s cubic-bezier(.2,.75,.25,1) 1.28s both; }
@keyframes completionReveal { to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes completionGlowIn { from { opacity: 0; transform: translateX(-50%) scale(.62); } to { opacity: .9; transform: translateX(-50%) scale(1); } }
.completion-copy { text-align: center; position: relative; padding: 18px 24px 4px; }
.completion-copy h2, .realize-hero h2, .success-screen h2, .gallery-heading h2 { font-family: "Songti SC", "STSong", serif; font-size: 25px; font-weight: 500; margin: 8px 0; }
.completion-copy p, .realize-hero p, .success-screen > p, .gallery-heading p { color: var(--muted); font-size: 10px; line-height: 1.7; }
.final-art { width: auto; height: 255px; margin: 0 16px; position: relative; display: flex; justify-content: center; align-items: center; gap: 15px; }
.final-art.nail-stage.ten-mode { gap: var(--set-gap, 18px); }
.final-art .hand { width: 43%; }
.completion-screen .final-art .nail { opacity: 0; will-change: opacity, translate; }
.final-art .texture-layer { transform: none; backface-visibility: visible; image-rendering: auto; }
.final-art .nail.asset-shape { filter: none; }
.final-art .nail-surface { box-shadow: inset 7px 1px 11px rgba(255,255,255,.46), inset -6px -4px 13px rgba(99,68,62,.13), 0 9px 18px rgba(81,62,56,.14); }
.completion-screen.is-revealed .final-art .nail { animation: completionNailIn .9s cubic-bezier(.18,.82,.22,1) calc(.38s + var(--nail-index) * .06s) both; }
@keyframes completionNailIn { from { opacity: 0; translate: 0 13px; scale: .92; } to { opacity: 1; translate: 0 0; scale: 1; } }
.work-card { margin: 0 18px; padding: 17px; border-radius: 24px; background: rgba(255,255,255,.58); border: 1px solid rgba(255,255,255,.8); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.work-card > label { color: var(--muted); font-size: 8px; }
.name-field { display: flex; border-bottom: 1px solid var(--line); }
.name-field input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 0 10px; font-family: "Songti SC", "STSong", serif; font-size: 20px; }
.name-field button { background: transparent; color: #9b8779; }
.work-meta { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; padding-top: 13px; }
.work-meta span { display: block; color: var(--muted); font-size: 7px; }
.work-meta strong { display: block; margin-top: 4px; font-size: 9px; font-weight: 500; }
.completion-actions { padding: 12px 18px calc(18px + var(--safe-bottom)); }

.save-screen { z-index: 130; padding-bottom: calc(24px + var(--safe-bottom)); background: radial-gradient(circle at 50% 24%, rgba(255,255,255,.92), transparent 30%), linear-gradient(160deg,#f9f6f2,#eee5de); }
.save-screen-copy { padding: 15px 28px 18px; text-align:center; }
.save-screen-copy > span { color:#a09189; font-size:7px; letter-spacing:.28em; }
.save-screen-copy h2 { margin:10px 0 7px; font-family:"Songti SC","STSong",serif; font-size:25px; font-weight:500; }
.save-screen-copy p { max-width:360px; margin:0 auto; color:var(--muted); font-size:10px; line-height:1.75; }
.save-preview-frame { position:relative; width:calc(100% - 76px); max-width:360px; aspect-ratio:27/38; margin:0 auto; overflow:hidden; border-radius:28px; background:rgba(255,255,255,.5); border:1px solid rgba(255,255,255,.9); box-shadow:0 24px 60px rgba(75,57,50,.14); }
.save-preview-frame img { width:100%; height:100%; display:block; object-fit:cover; opacity:0; transition:opacity .45s ease; }
.save-preview-frame.ready img { opacity:1; }
.save-preview-loading { position:absolute; inset:0; display:grid; place-content:center; gap:13px; text-align:center; color:#9b8d86; font-size:9px; letter-spacing:.12em; }
.save-preview-loading i { width:28px; height:28px; margin:auto; border-radius:50%; border:1px solid rgba(115,93,84,.2); border-top-color:#8f7b72; animation:saveSpin .9s linear infinite; }
.save-preview-frame.ready .save-preview-loading { display:none; }
@keyframes saveSpin { to { transform:rotate(1turn); } }
.save-screen-status { min-height:18px; margin:12px 24px 7px; color:#8f817a; text-align:center; font-size:9px; }
.save-screen-actions { display:grid; gap:8px; padding:0 24px; }
.save-screen-actions button { width:100%; min-height:48px; border-radius:24px; }
.save-photo-button { display:flex; align-items:center; justify-content:space-between; padding:0 20px; color:#fff; background:linear-gradient(115deg,#675955,#8e7c76); box-shadow:0 14px 32px rgba(82,63,56,.2); }
.save-photo-button:disabled, .save-screen-actions .secondary-action:disabled { opacity:.45; cursor:wait; }
.save-screen-note { margin:12px 30px 0; color:#9b8e88; text-align:center; font-size:8px; line-height:1.65; }

.export-card {
  position: fixed;
  z-index: 1;
  left: 50%;
  top: 0;
  width: 540px;
  height: 760px;
  overflow: hidden;
  padding: 48px 38px 34px;

  color: #4d423d;

  background:
    radial-gradient(
      circle at 72% 17%,
      rgba(255,255,255,.94),
      transparent 27%
    ),
    linear-gradient(
      155deg,
      #faf7f3 0%,
      #eee5de 68%,
      #e6dad2 100%
    );

  isolation: isolate;

  transform: translateX(-50%);

  pointer-events: none;

  opacity: 1;
  visibility: visible;

  -webkit-user-select: none;
  user-select: none;
}
.export-card::before,
.export-card::after { content:""; position:absolute; z-index:-1; border:1px solid rgba(112,91,80,.12); border-radius:50%; }
.export-card::before { width:360px; height:360px; right:-170px; top:-155px; }
.export-card::after { width:300px; height:300px; left:-170px; bottom:-160px; }
.export-card-orbit { position:absolute; z-index:-1; inset:88px 34px auto; height:410px; border-radius:48%; background:radial-gradient(circle,rgba(255,255,255,.7),transparent 68%); filter:blur(4px); }
.export-card-header { display:flex; align-items:flex-end; justify-content:space-between; border-bottom:1px solid rgba(94,76,67,.16); padding-bottom:15px; }
.export-card-header span { font-family:Georgia,"Times New Roman",serif; font-size:22px; letter-spacing:.24em; }
.export-card-header small { font-size:8px; letter-spacing:.3em; color:#988a83; }
.export-stage { width:464px; height:310px; margin:22px auto 0; display:flex; align-items:center; justify-content:center; }
.export-stage.nail-stage.ten-mode { gap:var(--set-gap,18px); }
.export-stage .hand { width:43%; }
.export-stage .nail,
.export-stage .nail-decoration { animation:none !important; transition:none !important; opacity:1 !important; }
.export-stage .nail.selected,
.export-stage .nail-decoration.selected { outline:0; }
.export-stage .texture-layer { transform:none; backface-visibility:visible; image-rendering:auto; }
.export-card-copy { text-align:center; margin-top:-2px; }
.export-card-copy > span { display:block; font-size:8px; letter-spacing:.32em; color:#a09189; }
.export-card-copy h2 { margin:14px 0 5px; font-family:Georgia,"Times New Roman",serif; font-size:34px; font-weight:400; letter-spacing:.02em; }
.export-card-copy p { margin:0; color:#9a8b83; font-family:Georgia,"Times New Roman",serif; font-size:11px; font-style:italic; letter-spacing:.04em; }
.export-card-footer { position:absolute; left:38px; right:38px; bottom:29px; min-height:82px; display:flex; align-items:flex-end; justify-content:space-between; border-top:1px solid rgba(94,76,67,.16); padding-top:14px; }
.export-card-footer img { width:94px; height:66px; object-fit:contain; object-position:left center; filter:contrast(.82); }
.export-card-footer div { display:grid; gap:5px; text-align:right; }
.export-card-footer strong { font-family:Georgia,"Times New Roman",serif; font-size:14px; font-weight:400; letter-spacing:.14em; }
.export-card-footer small { color:#a1938b; font-size:8px; letter-spacing:.18em; }
.secondary-action { background: rgba(255,255,255,.52); color: #746762; border: 1px solid rgba(255,255,255,.75); }
.realize-button { width: 100%; margin-top: 9px; padding: 14px 17px; border-radius: 22px; display: grid; grid-template-columns: 1fr auto; text-align: left; color: white; background: linear-gradient(120deg, #5d504c, #897873); box-shadow: 0 13px 30px rgba(67,53,48,.24); }
.realize-button span { font-family: "Songti SC", "STSong", serif; font-size: 15px; }
.realize-button small { grid-column: 1; font-size: 7px; letter-spacing: .15em; opacity: .7; margin-top: 3px; }
.realize-button b { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 20px; font-weight: 400; }

.realize-screen { background: #f5f0ea; }
.realize-hero { padding: 8px 24px 18px; text-align: center; }
.mini-art { height: 150px; transform: scale(.62); margin: -24px 0 -18px; position: relative; display: flex; justify-content: center; gap: 18px; }
.mini-art .hand { flex: 0 0 190px; }
.process-list { margin: 0 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.process-list > div { display: grid; grid-template-columns: 38px 1fr; gap: 8px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.process-list > div:last-child { border: 0; }
.process-list b { font-family: "Songti SC", "STSong", serif; color: #a89991; font-weight: 400; }
.process-list strong { font-size: 10px; }
.process-list small { display: block; color: var(--muted); font-size: 8px; margin-top: 3px; }
.booking-form { padding: 16px 18px calc(20px + var(--safe-bottom)); display: grid; gap: 11px; }
.booking-form label { display: grid; gap: 5px; font-size: 8px; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.booking-form input, .booking-form textarea { width: 100%; border: 1px solid rgba(111,93,84,.1); border-radius: 14px; padding: 11px 12px; background: rgba(255,255,255,.62); resize: none; font-size: 11px; }
.consent { grid-template-columns: 16px 1fr !important; align-items: center; }
.consent input { padding: 0; }
.submit-design { margin-top: 4px; display: flex; justify-content: space-between; }

.success-screen { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 30px; }
.success-mark { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.62); box-shadow: 0 20px 50px rgba(70,55,49,.12); margin-bottom: 28px; }
.success-mark span { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #9c8b84; font-size: 22px; }
.success-screen > p { max-width: 310px; }
.status-card { width: 100%; margin: 24px 0; padding: 18px; border-radius: 22px; background: rgba(255,255,255,.55); text-align: left; }
.status-card span, .status-card small { display: block; color: var(--muted); font-size: 8px; }
.status-card strong { display: block; font-size: 12px; margin: 8px 0; }
.status-card i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #c49f67; box-shadow: 0 0 8px #c49f67; margin-right: 6px; }
.success-screen .primary-sheet-button { max-width: 320px; }

.gallery-screen { padding-bottom: var(--safe-bottom); }
.gallery-heading { padding: 28px 22px 15px; }
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; padding: 0 16px 30px; }
.gallery-card { min-height: 216px; padding: 10px; border-radius: 22px; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.8); box-shadow: 0 10px 26px rgba(72,58,52,.07); }
.gallery-thumb { height: 135px; border-radius: 16px; background: linear-gradient(145deg, #e9ddd6, #f8f4ef); position: relative; overflow: hidden; }
.gallery-thumb .nail { left: 50%; top: 50%; transform: translate(-50%,-50%) scale(.82); }
.gallery-thumb .nail.asset-shape { filter:none; }
.gallery-card h3 { font-family: "Songti SC", "STSong", serif; font-size: 12px; margin: 10px 3px 4px; }
.gallery-card p { font-size: 7px; color: var(--muted); margin: 0 3px; line-height: 1.5; }
.gallery-card footer { display: flex; justify-content: space-between; align-items: center; margin: 10px 3px 0; }
.gallery-card footer span { font-size: 7px; color: var(--muted); }
.gallery-card footer button { background: transparent; font-size: 8px; color: #6f625d; }
.gallery-header-actions { display: flex; align-items: center; gap: 7px; }
.luna-world-button { min-width: 78px; padding: 7px 11px; border-radius: 999px; color: #fff; background: linear-gradient(120deg, #655957, #927773); box-shadow: 0 9px 25px rgba(75,56,52,.16); }
.luna-world-button span { display: block; font-family: "Songti SC", "STSong", serif; font-size: 10px; }
.luna-world-button small { display: block; margin-top: 2px; color: #e4d8d4; font-size: 6px; letter-spacing: .08em; }
.gallery-screen .completion-header { padding-right: 12px; }

.toast { position: fixed; z-index: 150; left: 50%; bottom: calc(25px + var(--safe-bottom)); transform: translate(-50%, 20px); padding: 10px 15px; border-radius: 999px; background: rgba(57,49,46,.88); color: white; font-size: 9px; opacity: 0; pointer-events: none; transition: .35s; backdrop-filter: blur(10px); white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 680px) {
  body { background: #d9d1cb; }
  .app-shell, .completion-screen, .realize-screen, .success-screen, .gallery-screen { box-shadow: 0 0 70px rgba(59,46,41,.18); }
}

@media (max-height: 720px) {
  .material-dock { flex-basis: 350px; }
  .stage-wrap { min-height: 205px; }
  .hand { height: 165px; transform: scale(.86); }
  .hand-right { transform: scaleX(-1) scale(.86); }
  .studio-meta { display: none; }
  .tool-panel { padding-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .atelier-splash-progress i::after,
  .atelier-splash.is-dissolving .atelier-splash-image,
  .atelier-splash.is-dissolving .atelier-splash-fragments > span,
  .atelier-splash.is-dissolving .atelier-splash-veil { animation-duration: .01ms; animation-delay: 0s; }
  .completion-screen.is-revealed .completion-glow,
  .completion-screen.is-revealed .completion-header,
  .completion-screen.is-revealed .completion-copy,
  .completion-screen.is-revealed .final-art .nail,
  .completion-screen.is-revealed .work-card,
  .completion-screen.is-revealed .completion-actions { animation-duration: .01ms; animation-delay: 0s; }
}

/* 2026-08-25 · Luna identity refinement */
html, body { width:100%; max-width:100%; touch-action:pan-y; }
button, a, input, textarea { touch-action:manipulation; }
.app-shell { touch-action:pan-y; }
.topbar { grid-template-columns:46px 1fr 86px; padding-inline:16px; }
.brand-button { width:42px; height:42px; overflow:hidden; background:rgba(255,252,248,.64); }
.brand-mark-image { width:33px; height:33px; object-fit:contain; object-position:center; transform:none; pointer-events:none; }
.project-title { min-width:0; display:grid; place-items:center; }
.atelier-wordmark { width:148px; height:42px; display:block; object-fit:contain; }
.project-title .title-button { display:none; }
.dock-tab { height:52px; font-size:11px; font-weight:500; }
.dock-tab span { font-size:18px; margin-bottom:3px; }

.gallery-screen .completion-header { display:grid; grid-template-columns:44px minmax(0,1fr) 116px; min-height:72px; padding-right:10px; }
.archive-wordmark { width:132px; height:44px; justify-self:center; object-fit:contain; filter:contrast(1.08); }
.gallery-header-actions { justify-content:flex-end; }
.luna-world-button {
  width: 104px;
  height: auto;
  aspect-ratio: 1774 / 887;
  min-width: 0;
  padding: 0;
  position: relative;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.luna-world-button::before {
  content: none;
}

.luna-world-button img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
  transform: none;
  filter:
    drop-shadow(0 0 3px rgba(255, 247, 234, .72))
    drop-shadow(0 0 8px rgba(246, 224, 214, .38));
  animation: lunaPlaqueGlow 3.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes lunaPlaqueGlow {
  0%, 100% {
    filter:
      drop-shadow(0 0 2px rgba(245, 236, 222, .58))
      drop-shadow(0 0 6px rgba(234, 219, 197, .30))
      drop-shadow(0 0 12px rgba(227, 205, 181, .16));
  }

  50% {
    filter:
      drop-shadow(0 0 4px rgba(255, 249, 238, .92))
      drop-shadow(0 0 10px rgba(248, 229, 211, .52))
      drop-shadow(0 0 18px rgba(234, 211, 187, .30));
  }
}

.gallery-grid { gap:22px 16px; padding:8px 18px 36px; }
.gallery-card { min-height:216px; padding:12px; position:relative; isolation:isolate; overflow:visible; border:0; border-radius:20px; background:rgba(255,253,249,.83); box-shadow:0 12px 28px rgba(72,58,52,.08); }
.gallery-card::after { content:""; position:absolute; inset:-14px -7px; z-index:3; background:url("./assets/brand-ui/archive-frame.png") center/100% 100% no-repeat; filter:drop-shadow(0 7px 11px rgba(103,78,60,.08)); pointer-events:none; }
.gallery-card > * { position:relative; z-index:2; }
.gallery-thumb { background:#ece3dc; }

@media (max-width:380px) {
  .gallery-screen .completion-header { grid-template-columns:42px minmax(0,1fr) 108px; }
  .archive-wordmark { width:110px; }
  .luna-world-button { width:96px; }
  .gallery-grid { gap:20px 13px; padding-inline:15px; }
  .gallery-card { padding:10px; }
}

@media (max-width:350px) {
  .gallery-screen .completion-header { grid-template-columns:38px minmax(0,1fr) 96px; padding-inline:8px; }
  .archive-wordmark { width:98px; }
  .luna-world-button { width:88px; }
}

@media (prefers-reduced-motion:reduce) {
  .luna-world-button img { animation:none; }
}

/* ==================================================
   LUNA MONOGRAM · VISUAL CENTER FIX
   2026-08-28
================================================== */

.brand-mark-image {
  transform: translate(0.5px, 1px);
}


/* ==================================================
   LUNA EXPORT · GEOMETRY FIX
   2026-08-28
================================================== */

/*
  export-card 是独立的 540 × 760 画布。
  禁止使用 left:50% / translateX(-50%) 一类网页居中方式，
  否则 html-to-image 会把这部分位移一起算进 PNG。
*/
#export-card.export-card {
  width:540px !important;
  height:760px !important;

  position:fixed !important;

  left:0 !important;
  right:auto !important;
  top:0 !important;
  bottom:auto !important;

  margin:0 !important;

  transform:none !important;
  translate:none !important;

  box-sizing:border-box !important;
}

/*
  它只是截图源，不应该影响实际网页排版。
*/
#export-card {
  pointer-events:none !important;
}

/*
  保存页面只负责完整展示生成好的 PNG。
  手机与电脑都以完整图片为准，不裁切。
*/
#save-preview-frame {
  overflow:hidden;
}

#save-preview-image {
  display:block;
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  margin:0 auto;

  object-fit:contain;
  object-position:center center;
}


/* ==================================================
   LUNA SAVE SCREEN · DESKTOP DISPLAY FIX
   2026-08-28
   只修电脑端界面，不改变 PNG 导出尺寸
================================================== */

/*
  export-card 只是给 html-to-image 截图使用，
  正常页面里绝对不能被用户看到。
*/
#export-card,
.export-card {
  position: fixed !important;
  left: -10000px !important;
  top: 0 !important;

  width: 540px !important;
  height: 760px !important;

  margin: 0 !important;

  pointer-events: none !important;
  z-index: -9999 !important;
}


/*
  电脑端保存页占满整个浏览器，
  不再保持一个手机宽度的竖条。
*/
@media (min-width: 760px) {

  #save-screen {
    position: fixed !important;
    inset: 0 !important;

    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;

    margin: 0 !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    z-index: 200 !important;
  }

  /*
    保存页真正的内容仍保持阅读宽度，
    但整个页面背景铺满桌面。
  */
  #save-screen > * {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }

  #save-preview-frame {
    width: min(540px, calc(100vw - 80px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  #save-preview-image {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;

    object-fit: contain !important;
    object-position: center !important;
  }
}


/* ==================================================
   LUNA EXPORT CARD · STRICT DOM ISOLATION
   2026-08-28
================================================== */

/*
  高清作品卡只用于 html-to-image 截图。
  它不能参与正常网站的页面布局。
*/
#export-card.export-card {
  position: fixed !important;

  width: 540px !important;
  height: 760px !important;

  left: -10000px !important;
  top: 0 !important;
  right: auto !important;
  bottom: auto !important;

  margin: 0 !important;

  /*
    不使用 display:none / visibility:hidden，
    否则 html-to-image 无法正常截图。
  */
  display: block !important;
  visibility: visible !important;

  pointer-events: none !important;

  z-index: -99999 !important;

  transform: none !important;
  transform-origin: top left !important;

  overflow: hidden !important;

  contain: layout paint style;
}

/*
  导出十指区域必须拥有稳定的实际尺寸，
  否则 getBoundingClientRect() 在 Safari 上可能得到 0。
*/
#export-art.export-stage,
#export-card #export-art {
  display: block !important;
  position: relative !important;

  width: 100% !important;

  min-width: 0 !important;
  min-height: 210px !important;

  overflow: visible !important;
}


/* ==================================================
   LUNA EXPORT CARD · DEFINITIVE HIDDEN SOURCE FIX
   2026-08-28
================================================== */

/*
  #export-card 只是 html-to-image 的截图源。

  注意：
  之前 #export-card.export-card { left:0 !important; }
  的 specificity 高于后来的 #export-card { left:-10000px !important; }，
  所以导出卡实际上一直显示在真实网页中。

  这里使用完全相同、并且位于文件最后的高优先级选择器，
  确保截图源永远不会进入用户可见区域。
*/
html body #export-card.export-card {
  position:fixed !important;

  left:-10000px !important;
  right:auto !important;
  top:0 !important;
  bottom:auto !important;

  width:540px !important;
  min-width:540px !important;
  max-width:540px !important;

  height:760px !important;
  min-height:760px !important;
  max-height:760px !important;

  margin:0 !important;

  transform:none !important;
  translate:none !important;

  opacity:1 !important;
  visibility:visible !important;

  pointer-events:none !important;

  z-index:-2147483647 !important;

  box-sizing:border-box !important;
}

/*
  防止这个内部截图节点对真实页面宽度和滚动区域产生影响。
*/
html,
body {
  overflow-x:hidden;
}


/* ==================================================
   LUNA EXPORT · CAPTURE MODE
   2026-08-28
================================================== */

/*
  平时截图源完全移出可视区。
*/
html body #export-card.export-card {
  position:fixed !important;

  left:-10000px !important;
  top:0 !important;

  width:540px !important;
  min-width:540px !important;
  max-width:540px !important;

  height:760px !important;
  min-height:760px !important;
  max-height:760px !important;

  margin:0 !important;
  transform:none !important;
  translate:none !important;

  opacity:1 !important;
  visibility:visible !important;

  pointer-events:none !important;
  z-index:-1 !important;

  box-sizing:border-box !important;
}

/*
  只有 html-to-image 真正截图的几百毫秒，
  才把它放回一个正常的 540 × 760 坐标系。

  保存页面本身 z-index 很高，因此用户不会看到它。
*/
html body #export-card.export-card.is-capturing {
  left:0 !important;
  right:auto !important;
  top:0 !important;

  z-index:0 !important;

  opacity:1 !important;
  visibility:visible !important;

  transform:none !important;
  translate:none !important;
}


/* ==================================================
   LUNA EXPORT · SAFE FLEX RESTORE
   2026-08-28
================================================== */

html body #export-card #export-art.export-stage {
  display:flex !important;
  flex-direction:row !important;
  justify-content:center !important;
  align-items:center !important;

  width:464px !important;
  height:310px !important;

  min-width:464px !important;
  min-height:310px !important;

  margin:22px auto 0 !important;
}

html body #export-card #export-art.export-stage .hand {
  position:relative !important;
  flex:0 0 43% !important;
  width:43% !important;
  height:190px !important;
}




/* ==================================================
   BRAND GEL TEXTURE FIT
   图片型甲油胶素材品牌校准
   ================================================== */

.texture-layer {
  inset: 0;
  background-size:
    var(
      --texture-size,
      100% 100%
    );
  background-position: center;
  background-repeat: no-repeat;
}

/*
  单甲模式不能恢复成 100% 100%，
  否则品牌修正会在放大编辑时消失。
*/
.nail-stage.single-mode
.nail.focused
.texture-layer {
  inset: 0;
  background-size:
    var(
      --texture-size,
      100% 100%
    );
  image-rendering: auto;
}


/* ==================================================
   碎钻胶效果提示
   ================================================== */

.flash-gel-notice {
  position: fixed;
  left: 50%;
  bottom:
    calc(
      22px +
      env(
        safe-area-inset-bottom,
        0px
      )
    );

  width:
    min(
      calc(100vw - 32px),
      430px
    );

  display: flex;
  align-items: flex-start;
  gap: 9px;

  padding:
    11px 14px;

  border:
    1px solid
    rgba(
      255,
      255,
      255,
      .76
    );

  border-radius: 18px;

  background:
    rgba(
      247,
      242,
      237,
      .92
    );

  box-shadow:
    0 14px 36px
    rgba(
      83,
      68,
      61,
      .13
    );

  backdrop-filter:
    blur(18px);

  -webkit-backdrop-filter:
    blur(18px);

  color: #786d67;

  font-size: 10px;
  line-height: 1.65;

  letter-spacing: .01em;

  opacity: 0;

  transform:
    translate(
      -50%,
      12px
    );

  filter: blur(4px);

  pointer-events: none;

  z-index: 2147483000;

  transition:
    opacity .38s ease,
    transform .48s
      cubic-bezier(
        .2,
        .75,
        .25,
        1
      ),
    filter .38s ease;
}

.flash-gel-notice.is-visible {
  opacity: 1;

  transform:
    translate(
      -50%,
      0
    );

  filter: blur(0);
}

.flash-gel-notice-dot {
  flex: 0 0 auto;

  width: 6px;
  height: 6px;

  margin-top: 5px;

  border-radius: 50%;

  background:
    rgba(
      184,
      153,
      139,
      .82
    );

  box-shadow:
    0 0 9px
    rgba(
      184,
      153,
      139,
      .4
    );
}

@media (
  max-width: 560px
) {
  .flash-gel-notice {
    bottom:
      calc(
        16px +
        env(
          safe-area-inset-bottom,
          0px
        )
      );

    width:
      calc(
        100vw - 28px
      );

    font-size: 9.5px;
  }
}


/* ==================================================
   BRAND GEL SWATCH PREVIEW FIT
   素材选择区图片型甲油胶校准
   只影响工作室素材缩略图，不影响美甲图鉴
   ================================================== */

/*
  图片素材保持中心。
  overflow 由现有 swatch-color 展示框负责裁切。
*/
.swatch-color img {
  transform-origin: center center;
}


/* 燕翎
   素材略偏方：
   主要整体扩大，纵向只额外增加一点。
*/
.swatch[data-brand="燕翎"]
.swatch-color img {
  transform:
    scaleX(1.10) scaleY(1.14);
}


/* 末町
   本身最接近目标，只轻微扩大。
*/
.swatch[data-brand="末町"]
.swatch-color img {
  transform:
    scaleX(1.13) scaleY(1.16);
}


/* enoi
   有效素材偏圆：
   整体放大，并做很轻的纵向补偿。
*/
.swatch[data-brand="enoi"]
.swatch-color img {
  transform:
    scaleX(1.30) scaleY(1.50);
}


/* Mao·Gel
   当前透明/外围空间最大，
   主要通过放大解决，辅以轻微纵向补偿。
*/
.swatch[data-brand="Mao·Gel"]
.swatch-color img {
  transform:
    scaleX(1.36) scaleY(1.46);
}



/* ==================================================
   HERMES SWATCH REFLECTION
   Hermès 色板本身已有明暗，不再叠加通用人工反光
   ================================================== */

.swatch[data-brand*="Hermès"] .swatch-color::after,
.swatch[data-brand*="爱马仕"] .swatch-color::after {
  display: none;
}


/* ==================================================
   HERMES SWATCH REFLECTION
   Hermès 色板本身已有明暗，不再叠加通用人工反光
   ================================================== */

.swatch[data-brand*="Hermès"] .swatch-color::after,
.swatch[data-brand*="爱马仕"] .swatch-color::after {
  display: none;
}


/* ==================================================
   HERMES SOLID COLOUR
   Hermès PNG 自带硬边反光，工作室改用提取色值展示
   ================================================== */

.swatch[data-brand="Hermès 爱马仕"] .swatch-color img {
  display: none;
}

/* Hermès 不再额外叠加工作室通用高光 */
.swatch[data-brand="Hermès 爱马仕"] .swatch-color::after {
  display: none;
}


/* ==================================================
   NAIL POLISH SOURCE NOTICE
   官网图片取色说明
   ================================================== */

.polish-source-notice {
  position: fixed;
  z-index: 1200;

  left: 50%;
  bottom: 24px;

  width: min(390px, calc(100vw - 34px));

  display: flex;
  align-items: flex-start;
  gap: 9px;

  padding: 11px 14px;

  color: #71645f;
  font-size: 9.5px;
  line-height: 1.65;
  letter-spacing: .02em;

  border: 1px solid rgba(255,255,255,.8);
  border-radius: 16px;

  background:
    rgba(255, 252, 249, .91);

  box-shadow:
    0 12px 34px rgba(75, 57, 50, .12);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  pointer-events: none;

  opacity: 0;
  transform:
    translate(-50%, 9px)
    scale(.985);

  transition:
    opacity .38s ease,
    transform .46s cubic-bezier(.22,.8,.24,1);
}

.polish-source-notice.show {
  opacity: 1;
  transform:
    translate(-50%, 0)
    scale(1);
}

.polish-source-notice-dot {
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  margin-top: 5px;

  border-radius: 50%;

  background:
    rgba(170, 137, 120, .82);

  box-shadow:
    0 0 8px
    rgba(170, 137, 120, .32);
}

@media (max-width: 560px) {
  .polish-source-notice {
    bottom:
      calc(
        16px +
        env(safe-area-inset-bottom, 0px)
      );

    width: calc(100vw - 28px);

    font-size: 9.5px;
  }
}


/* ==================================================
   NAIL POLISH SOURCE NOTICE
   官网图片取色说明
   ================================================== */

.polish-source-notice {
  position: fixed;
  z-index: 1200;

  left: 50%;
  bottom: 24px;

  width: min(390px, calc(100vw - 34px));

  display: flex;
  align-items: flex-start;
  gap: 9px;

  padding: 11px 14px;

  color: #71645f;
  font-size: 9.5px;
  line-height: 1.65;
  letter-spacing: .02em;

  border: 1px solid rgba(255,255,255,.8);
  border-radius: 16px;

  background:
    rgba(255, 252, 249, .91);

  box-shadow:
    0 12px 34px rgba(75, 57, 50, .12);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  pointer-events: none;

  opacity: 0;
  transform:
    translate(-50%, 9px)
    scale(.985);

  transition:
    opacity .38s ease,
    transform .46s cubic-bezier(.22,.8,.24,1);
}

.polish-source-notice.show {
  opacity: 1;
  transform:
    translate(-50%, 0)
    scale(1);
}

.polish-source-notice-dot {
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  margin-top: 5px;

  border-radius: 50%;

  background:
    rgba(170, 137, 120, .82);

  box-shadow:
    0 0 8px
    rgba(170, 137, 120, .32);
}

@media (max-width: 560px) {
  .polish-source-notice {
    bottom:
      calc(
        16px +
        env(safe-area-inset-bottom, 0px)
      );

    width: calc(100vw - 28px);

    font-size: 9.5px;
  }
}


/* ==================================================
   POLKA DOT · TRUE ROUND SURFACE + MANUAL EDITOR
   2026-08-28
   ================================================== */

/*
 * SVG 本身会跟随甲型非等比缩放。
 * 真圆补偿由 syncRoundDots() 根据实际宽高计算。
 */
.dot-layer .dot-main {
  transform-box: fill-box;
  transform-origin: center;
  filter: none;
  transition:
    opacity .18s ease,
    filter .18s ease;
}

/* 编辑状态 */
.nail.dots-editing .dot-layer {
  pointer-events: auto;
}

.nail.dots-editing .dot-main {
  pointer-events: all;
  cursor: grab;
}

/*
 * 不用 stroke，因为 stroke 本身也会受 SVG 比例影响。
 * 用 drop-shadow 做一个很轻的选择提示。
 */
.nail.dots-editing .dot-main.is-selected {
  filter:
    drop-shadow(0 0 .9px rgba(255,255,255,.96))
    drop-shadow(0 0 1.8px rgba(111,86,78,.55));
}

.nail.dots-editing .dot-main:active {
  cursor: grabbing;
}


/* ---------- 精细调整控制区 ---------- */

.dot-edit-controls {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(93,75,68,.10);
}

.dot-edit-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.dot-edit-heading > span {
  min-width: 0;
}

.dot-edit-heading b {
  display: block;
  color: #5e514c;
  font-size: 10px;
  font-weight: 500;
}

.dot-edit-heading small {
  display: block;
  margin-top: 4px;
  color: #9a8c85;
  font-size: 7px;
  line-height: 1.5;
}

.dot-edit-heading > button {
  flex: 0 0 auto;
  min-width: 74px;
  padding: 8px 11px;
  border: 1px solid rgba(105,84,76,.12);
  border-radius: 999px;
  color: #766760;
  background: rgba(255,255,255,.64);
  font-size: 8px;
  transition:
    background .25s ease,
    color .25s ease,
    opacity .25s ease;
}

.dot-edit-heading > button.active {
  color: #fff;
  background: #75645e;
  border-color: #75645e;
}

.dot-edit-heading > button:disabled {
  opacity: .38;
}

.dot-selected-controls {
  margin-top: 11px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 15px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.82);
}

.dot-selected-controls.hidden {
  display: none;
}

.dot-selected-controls > span {
  color: #83746e;
  font-size: 8px;
}

.dot-selected-controls > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot-selected-controls button {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #685a55;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(101,81,74,.10);
  font-size: 14px;
}

.dot-selected-controls .dot-delete-button {
  width: auto;
  min-width: 44px;
  border-radius: 999px;
  color: #9b716d;
  font-size: 8px;
}

/* 2026-08-28 · selected dot delete-only controls */
#dot-selected-controls .structure-slider {
  display: none !important;
}

#dot-selected-controls {
  justify-content: flex-end;
}

#dot-selected-controls .dot-delete-button {
  margin-left: auto;
}

/* 2026-08-28 · studio hero title refinement */
.studio-meta h1 {
  font-family:"Songti SC","STSong","Noto Serif CJK SC",serif;
  font-size:clamp(16px, 1.75vw, 21px);
  font-weight:400;
  line-height:1.08;
  letter-spacing:.12em;

  color:rgba(91, 78, 73, .56);
  opacity:0;
  filter:blur(5px);
  transform:translateY(-14px) scale(.985);
  animation:studioTitleCloudIn 1.25s cubic-bezier(.18,.72,.2,1) .12s forwards;
}


@keyframes studioTitleCloudIn {
  0% {
    opacity:0;
    filter:blur(7px);
    transform:translateY(-18px) scale(.98);
  }

  45% {
    opacity:.58;
    filter:blur(2.8px);
  }

  100% {
    opacity:1;
    filter:blur(0);
    transform:translateY(0) scale(1);
  }
}

@media(prefers-reduced-motion:reduce) {
  .studio-meta h1 {
    opacity:1;
    filter:none;
    transform:none;
    animation:none;
  }
}

/* 2026-08-28 · gallery title typography refinement */
.gallery-heading h2 {
  font-family:"STSongti-SC-Light","STSongti-SC","Songti SC","STSong","Noto Serif CJK SC",serif;
  font-size:clamp(22px, 3.4vw, 28px);
  font-weight:300;
  line-height:1.12;
  letter-spacing:.14em;
  color:rgba(78,65,61,.76);
  -webkit-font-smoothing:antialiased;
}

@media(max-width:520px) {
  .gallery-heading h2 {
    font-size:21px;
    font-weight:300;
    letter-spacing:.16em;
  }
}

/* 2026-08-28 · gallery subtitle softer */
.gallery-heading p {
  color:rgba(105,91,86,.48);
}

/* ==================================================
   LUNA FRENCH 2.0 · CUSTOM FILL
   ================================================== */

.french-custom-fill-row {
  margin-top: 8px;
}

.french-custom-fill {
  width: 100%;
  min-height: 48px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border-radius: 16px;
  color: #746762;
  background: rgba(255,255,255,.42);
  border: 1px solid rgba(255,255,255,.68);
  transition:
    background .22s ease,
    box-shadow .22s ease,
    transform .18s ease;
}

.french-custom-fill > span:first-child {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.62);
  color: #9d8881;
}

.french-custom-fill > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.french-custom-fill b {
  font-size: 9px;
  font-weight: 500;
}

.french-custom-fill small {
  color: #9a8c85;
  font-size: 7px;
}

.french-custom-fill.active {
  background: rgba(255,255,255,.9);
  box-shadow:
    0 7px 18px rgba(70,53,48,.08),
    0 0 0 1px rgba(110,91,82,.13);
}

.french-custom-fill.active > span:first-child {
  background: #75635f;
  color: #fff;
}

.french-custom-fill-status {
  display: block;
  min-height: 14px;
  margin: 5px 4px 0;
  color: #8f817b;
  font-size: 7px;
  letter-spacing: .02em;
}


/* ==================================================
   LUNA CAT EYE 2.0
   Dynamic magnetic light field
   ================================================== */

.nail[data-material="cat"] {
  position: absolute;
  isolation: isolate;
}

/*
 * Disable the legacy duplicated cat-eye strip.
 * Cat Eye 2.0 is rendered only on .nail-surface.
 */
.nail[data-material="cat"]::after {
  display: none;
}

.nail[data-material="cat"] .nail-surface {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}

/*
 * MAIN MAGNETIC FIELD
 *
 * Wide halo + luminous magnetic core.
 * x/y follow finger movement.
 * angle / width / opacity remain user-adjustable.
 */
.nail[data-material="cat"] .nail-surface::after {
  content: "";
  position: absolute;

  left: var(--cat-x, 50%);
  top: var(--cat-y, 48%);

  width: var(--cat-width, 34%);
  height: 165%;

  transform:
    translate(-50%, -50%)
    rotate(var(--cat-angle, 25deg));

  transform-origin: 50% 50%;

  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,0) 0%,
      rgba(210,226,231,.02) 12%,
      rgba(216,235,239,.12) 27%,
      rgba(235,248,250,.34) 40%,
      rgba(255,255,255,.94) 49%,
      rgba(255,255,255,1) 50%,
      rgba(230,245,247,.58) 55%,
      rgba(205,226,231,.17) 70%,
      rgba(255,255,255,0) 100%
    );

  filter:
    blur(3.2px)
    saturate(1.08);

  opacity: var(--cat-opacity, 0);

  mix-blend-mode: screen;

  pointer-events: none;
  z-index: 7;

  transition:
    width .22s ease,
    opacity .22s ease,
    filter .22s ease;
}

/*
 * Secondary magnetic halo.
 *
 * This prevents the effect from looking like
 * a painted white stripe.
 */
.nail[data-material="cat"] .nail-surface::before {
  content: "";
  position: absolute;

  left: var(--cat-x, 50%);
  top: var(--cat-y, 48%);

  width: calc(var(--cat-width, 34%) * 1.85);
  height: 175%;

  transform:
    translate(-50%, -50%)
    rotate(var(--cat-angle, 25deg));

  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(178,205,213,.04) 18%,
      rgba(211,234,239,.16) 37%,
      rgba(236,250,252,.30) 50%,
      rgba(211,234,239,.12) 64%,
      transparent 100%
    );

  filter: blur(9px);

  opacity:
    calc(var(--cat-opacity, 0) * .72);

  mix-blend-mode: screen;

  pointer-events: none;
  z-index: 6;
}


/* ==================================================
   STRAIGHT / DIAGONAL
   ================================================== */

.nail[data-material="cat"][data-cat-preset="直线猫眼"]
.nail-surface::after,

.nail[data-material="cat"][data-cat-preset="斜线猫眼"]
.nail-surface::after {
  border-radius: 50%;
}


/* ==================================================
   WIDE LIGHT
   Soft, broad magnetic reflection.
   ================================================== */

.nail[data-material="cat"][data-cat-preset="宽光猫眼"]
.nail-surface::after {
  width: var(--cat-width);
  filter: blur(7px);
  opacity:
    calc(var(--cat-opacity, 0) * .92);

  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(205,229,235,.08) 15%,
      rgba(231,247,249,.32) 34%,
      rgba(255,255,255,.80) 50%,
      rgba(225,241,245,.30) 68%,
      transparent 100%
    );
}

.nail[data-material="cat"][data-cat-preset="宽光猫眼"]
.nail-surface::before {
  width: calc(var(--cat-width) * 2.05);
  filter: blur(12px);
}


/* ==================================================
   ROUND CAT EYE
   Radial magnetic pool instead of a stripe.
   ================================================== */

.nail[data-material="cat"][data-cat-preset="圆形猫眼"]
.nail-surface::after {
  width: var(--cat-width);
  height: var(--cat-width);

  transform:
    translate(-50%, -50%);

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(255,255,255,.98) 0%,
      rgba(244,253,255,.78) 15%,
      rgba(219,239,244,.42) 33%,
      rgba(190,217,224,.15) 55%,
      transparent 76%
    );

  filter: blur(4px);
}

.nail[data-material="cat"][data-cat-preset="圆形猫眼"]
.nail-surface::before {
  width: calc(var(--cat-width) * 1.7);
  height: calc(var(--cat-width) * 1.7);

  transform:
    translate(-50%, -50%);

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(235,249,252,.25),
      rgba(205,230,236,.10) 40%,
      transparent 72%
    );

  filter: blur(9px);
}


/* ==================================================
   SPOT / 聚光猫眼
   Small intense magnetic focus.
   ================================================== */

.nail[data-material="cat"][data-cat-preset="聚光猫眼"]
.nail-surface::after {
  width: var(--cat-width);
  height: calc(var(--cat-width) * 1.25);

  transform:
    translate(-50%, -50%);

  border-radius: 50%;

  background:
    radial-gradient(
      ellipse,
      rgba(255,255,255,1) 0%,
      rgba(247,253,255,.92) 12%,
      rgba(220,240,245,.54) 30%,
      rgba(184,214,222,.16) 54%,
      transparent 74%
    );

  filter:
    blur(3px)
    saturate(1.12);
}

.nail[data-material="cat"][data-cat-preset="聚光猫眼"]
.nail-surface::before {
  width: calc(var(--cat-width) * 1.8);
  height: calc(var(--cat-width) * 2);

  transform:
    translate(-50%, -50%);

  border-radius: 50%;

  background:
    radial-gradient(
      ellipse,
      rgba(235,250,253,.22),
      transparent 70%
    );

  filter: blur(10px);
}


/* ==================================================
   FRENCH CAT EYE
   Crescent smile close to the free edge.
   ================================================== */

.nail[data-material="cat"][data-cat-preset="法式猫眼"]
.nail-surface::after {
  left: var(--cat-x, 50%);
  top: var(--cat-y, 78%);

  width: 94%;
  height: 48%;

  transform:
    translate(-50%, -50%);

  border-radius:
    0 0 50% 50%
    / 0 0 70% 70%;

  background:
    radial-gradient(
      ellipse at 50% 0%,
      transparent 43%,
      rgba(205,230,236,.18) 48%,
      rgba(244,253,255,.82) 54%,
      rgba(255,255,255,.94) 57%,
      rgba(215,237,242,.26) 64%,
      transparent 74%
    );

  filter: blur(3px);
}

.nail[data-material="cat"][data-cat-preset="法式猫眼"]
.nail-surface::before {
  display: none;
}


/* ==================================================
   CROSS CAT EYE
   Main beam + perpendicular secondary beam.
   ================================================== */

.nail[data-material="cat"][data-cat-preset="十字猫眼"]
.nail-surface::after {
  width: var(--cat-width);

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(218,238,243,.18) 34%,
      rgba(255,255,255,.96) 49%,
      rgba(255,255,255,1) 50%,
      rgba(218,238,243,.16) 66%,
      transparent
    );

  filter: blur(3px);
}

.nail[data-material="cat"][data-cat-preset="十字猫眼"]
.nail-surface::before {
  width: var(--cat-width);
  height: 165%;

  transform:
    translate(-50%, -50%)
    rotate(calc(var(--cat-angle, 45deg) + 90deg));

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(220,239,243,.10) 32%,
      rgba(248,254,255,.78) 49%,
      rgba(255,255,255,.86) 50%,
      rgba(220,239,243,.10) 68%,
      transparent
    );

  filter: blur(4px);

  opacity:
    calc(var(--cat-opacity, 0) * .72);
}


/* Finger movement should feel immediate. */
.nail[data-material="cat"].focused
.nail-surface::after,

.nail[data-material="cat"].focused
.nail-surface::before {
  transition:
    width .16s ease,
    opacity .16s ease,
    filter .16s ease;
}


.cat-magnet-hint {
  margin: 4px 0 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 16px;
  background: rgba(255,255,255,.36);
  border: 1px solid rgba(255,255,255,.62);
  color: #746762;
}

.cat-magnet-hint > span:first-child {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.62);
}

.cat-magnet-hint > span:last-child {
  display: grid;
  gap: 2px;
}

.cat-magnet-hint b {
  font-size: 9px;
  font-weight: 500;
}

.cat-magnet-hint small {
  color: #968881;
  font-size: 7px;
}


/* LUNA CAT EYE · PLAY WITH LIGHT */

.cat-magnet-workbench {
  margin-top: 18px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(65, 56, 51, .09);
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 0%, rgba(255,255,255,.9), transparent 34%),
    rgba(246, 242, 237, .72);
}

.cat-magnet-workbench.hidden {
  display: none;
}

.cat-magnet-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.cat-magnet-title {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.cat-spark {
  font-size: 16px;
  line-height: 1.35;
}

.cat-magnet-title b {
  display: block;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: .01em;
}

.cat-magnet-title small {
  display: block;
  margin-top: 5px;
  color: rgba(58, 50, 46, .56);
  font-size: 12px;
  line-height: 1.45;
}

.cat-live-dot {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  color: rgba(58, 50, 46, .55);
  font-size: 10px;
  letter-spacing: .08em;
}

.cat-presets-inline {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 1px 1px 11px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cat-presets-inline::-webkit-scrollbar {
  display: none;
}

.cat-presets-inline .cat-preset {
  flex: 0 0 auto;
  min-width: 68px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(65, 56, 51, .08);
  border-radius: 999px;
  background: rgba(255,255,255,.66);
  color: rgba(54, 47, 43, .72);
  font-size: 12px;
  white-space: nowrap;
}

.cat-presets-inline .cat-preset.active {
  border-color: transparent;
  background: #74665f;
  color: #fff;
  box-shadow: 0 5px 14px rgba(55, 45, 40, .12);
}

.cat-inline-sliders {
  display: grid;
  gap: 4px;
  padding-top: 3px;
}

.cat-inline-sliders label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 12px;
  padding: 8px 2px;
}

.cat-inline-sliders label > span {
  font-size: 12px;
  color: rgba(54, 47, 43, .64);
}

.cat-inline-sliders output {
  font-size: 11px;
  color: rgba(54, 47, 43, .48);
  font-variant-numeric: tabular-nums;
}

.cat-inline-sliders input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  height: 18px;
  margin: 0;
  background: transparent;
  accent-color: #74665f;
}

@media (max-width: 640px) {
  .cat-magnet-workbench {
    margin-top: 14px;
    padding: 16px 14px 14px;
    border-radius: 21px;
  }

  .cat-magnet-title b {
    font-size: 16px;
  }

  .cat-presets-inline .cat-preset {
    min-width: 64px;
    height: 34px;
    padding-inline: 12px;
  }
}



/* =========================================================
   LUNA CAT EYE · FRENCH SMILE 2.2

   --cat-width now means FRENCH DEPTH:
   narrow = shallow tip
   wide   = smile rises farther up the nail

   French is always horizontally centered.
   ========================================================= */


/* Main French magnetic smile */
.nail[data-material="cat"][data-cat-preset="法式猫眼"]
.nail-surface::after {
  content: "";

  position: absolute;

  /*
   * Always mathematically centered.
   * French mode deliberately ignores --cat-x.
   */
  left: 50% !important;
  right: auto !important;

  bottom: 3.5% !important;
  top: auto !important;

  width: 88% !important;

  /*
   * This is the important change.
   *
   * --cat-width = 8%  -> shallow French
   * --cat-width = 30% -> medium French
   * --cat-width = 60% -> deep French
   *
   * So the existing 光带宽度 slider now controls
   * how far the whole smile rises upward.
   */
  height: clamp(
    22%,
    calc(var(--cat-width, 22%) + 15%),
    78%
  ) !important;

  box-sizing: border-box;

  /*
   * Keep the actual luminous edge fairly delicate.
   * Width slider no longer makes the white edge chunky.
   */
  border-left: 3.2px solid rgba(255,255,255,.52) !important;
  border-right: 3.2px solid rgba(255,255,255,.52) !important;
  border-bottom: 4px solid rgba(255,255,255,.79) !important;
  border-top: 0 solid transparent !important;

  border-radius:
    47% 47% 53% 53%
    /
    38% 38% 62% 62% !important;

  /*
   * Ends begin almost invisible and progressively strengthen.
   * This gives the hairline finish on both sides.
   */
  -webkit-mask-image:
    linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0,0,0,.015) 7%,
      rgba(0,0,0,.055) 15%,
      rgba(0,0,0,.16) 26%,
      rgba(0,0,0,.38) 39%,
      rgba(0,0,0,.68) 54%,
      rgba(0,0,0,.92) 70%,
      #000 83%,
      #000 100%
    ) !important;

  mask-image:
    linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0,0,0,.015) 7%,
      rgba(0,0,0,.055) 15%,
      rgba(0,0,0,.16) 26%,
      rgba(0,0,0,.38) 39%,
      rgba(0,0,0,.68) 54%,
      rgba(0,0,0,.92) 70%,
      #000 83%,
      #000 100%
    ) !important;

  /*
   * No hard white French outline.
   * Only a soft magnetic reflection.
   */
  filter:
    blur(.7px)
    drop-shadow(0 1px 2px rgba(255,255,255,.19))
    drop-shadow(0 2px 5px rgba(255,255,255,.10))
    !important;

  opacity: var(--cat-opacity, .78);

  /*
   * Critical:
   * remove generic cat-eye translate/rotation completely.
   */
  transform: translateX(-50%) !important;
  transform-origin: 50% 100% !important;

  pointer-events: none;
}


/* Soft outer magnetic halo */
.nail[data-material="cat"][data-cat-preset="法式猫眼"]::after {
  content: "";

  position: absolute;

  left: 50% !important;
  right: auto !important;

  bottom: 1% !important;
  top: auto !important;

  width: 93% !important;

  height: clamp(
    25%,
    calc(var(--cat-width, 22%) + 19%),
    82%
  ) !important;

  box-sizing: border-box;

  border-left: 7px solid rgba(255,255,255,.045) !important;
  border-right: 7px solid rgba(255,255,255,.045) !important;
  border-bottom: 9px solid rgba(255,255,255,.085) !important;
  border-top: 0 solid transparent !important;

  border-radius:
    47% 47% 53% 53%
    /
    38% 38% 62% 62% !important;

  -webkit-mask-image:
    linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0,0,0,.02) 14%,
      rgba(0,0,0,.13) 31%,
      rgba(0,0,0,.45) 49%,
      rgba(0,0,0,.82) 68%,
      #000 86%,
      #000 100%
    ) !important;

  mask-image:
    linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0,0,0,.02) 14%,
      rgba(0,0,0,.13) 31%,
      rgba(0,0,0,.45) 49%,
      rgba(0,0,0,.82) 68%,
      #000 86%,
      #000 100%
    ) !important;

  filter: blur(5px) !important;

  opacity: calc(var(--cat-opacity, .78) * .62);

  transform: translateX(-50%) !important;

  pointer-events: none;
}


/*
 * REMOVE the extra centre-brightening layer from French mode.
 *
 * French should read as one continuous magnetic smile,
 * rather than centre-bright / side-dark.
 */
.nail[data-material="cat"][data-cat-preset="法式猫眼"]
.nail-surface {
  background-image: none !important;
}



/* =========================================================
   LUNA · FREE CAT MAGNET
   interactive magnetic-particle field
   ========================================================= */

.cat-magnet-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.cat-free-magnet {
  appearance: none;
  border: 1px solid rgba(65, 56, 51, .10);
  background: rgba(255,255,255,.72);
  color: rgba(54,47,43,.66);
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font: inherit;
  font-size: 10px;
  letter-spacing: .02em;
  white-space: nowrap;
  cursor: pointer;
}

.cat-free-magnet.active {
  background: #74665f;
  border-color: #74665f;
  color: #fff;
  box-shadow:
    0 4px 12px rgba(67,54,48,.13);
}


/*
 * Kill only the duplicate OUTER legacy cat strip
 * while free magnet mode is active.
 *
 * Presets remain completely untouched.
 */
.nail[data-material="cat"][data-cat-manual="1"]::after {
  display: none !important;
}


/*
 * One magnetic field.
 *
 * At the edge:
 *   --magnet-band ≈ 58%
 *   light is broad and dispersed.
 *
 * As the magnet moves inward:
 *   --magnet-band → ≈ 12%
 *   particles visually gather into a narrow line.
 */
.nail[data-material="cat"][data-cat-manual="1"]
.nail-surface::after {
  content: "";

  display: block !important;
  position: absolute;

  left: var(--magnet-x, 50%) !important;
  top: var(--magnet-y, 50%) !important;

  width: 155% !important;
  height: var(--magnet-band, 42%) !important;

  border: 0 !important;
  border-radius: 50% !important;

  background:
    linear-gradient(
      to bottom,

      transparent 0%,

      rgba(255,255,255,.015) 18%,

      rgba(255,255,255,.065) 32%,

      rgba(255,255,255,.20)
        calc(50% - var(--magnet-core, 10%)),

      rgba(255,255,255,.72) 49%,

      rgba(255,255,255,.91) 50%,

      rgba(255,255,255,.72) 51%,

      rgba(255,255,255,.20)
        calc(50% + var(--magnet-core, 10%)),

      rgba(255,255,255,.065) 68%,

      rgba(255,255,255,.015) 82%,

      transparent 100%
    ) !important;

  -webkit-mask-image:
    radial-gradient(
      ellipse at center,
      #000 0%,
      rgba(0,0,0,.98) 45%,
      rgba(0,0,0,.65) 69%,
      transparent 100%
    ) !important;

  mask-image:
    radial-gradient(
      ellipse at center,
      #000 0%,
      rgba(0,0,0,.98) 45%,
      rgba(0,0,0,.65) 69%,
      transparent 100%
    ) !important;

  filter:
    blur(1.15px)
    drop-shadow(
      0 0 7px rgba(255,255,255,.18)
    ) !important;

  opacity:
    calc(var(--cat-opacity, .78) * .94)
    !important;

  transform:
    translate(-50%, -50%)
    rotate(var(--magnet-angle, 0deg))
    !important;

  transform-origin: 50% 50% !important;

  pointer-events: none;
  will-change:
    left,
    top,
    height,
    transform;
}


/*
 * On a touch device the nail itself becomes the magnet surface.
 */
.nail[data-material="cat"][data-cat-manual="1"] {
  cursor: crosshair;
  touch-action: none;
}


/* TEMP: hide unfinished free cat magnet UI, keep implementation for later */
#cat-free-magnet {
  display: none !important;
}


/* LUNA TOPBAR · TRUE CENTER WORDMARK */
.topbar {
  position: relative;
}

.topbar .atelier-wordmark {
  position: absolute !important;
  left: 50% !important;
  top: 18px !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
}

/* LUNA TOPBAR · TRUE HORIZONTAL CENTER WORDMARK */
.topbar {
  position: relative;
}

.topbar .atelier-wordmark {
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* MOBILE HEIGHT FIX · keep Sound toggle visible */
@media (max-height: 720px) {
  .studio-meta {
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
    padding: 0 3px 4px;
    min-height: 28px;
  }

  .studio-meta > div:first-child {
    display: none;
  }

  .sound-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    white-space: nowrap;
  }
}


/* ==================================================
   LUNA EXPORT · ISOLATE FROM MOBILE HAND SCALING
   ================================================== */

html body #export-card #export-art.export-stage .hand-left {
  transform: none !important;
}

html body #export-card #export-art.export-stage .hand-right {
  transform: scaleX(-1) !important;
}


/* ==================================================
   LUNA EXPORT · VISIBLE ART SNAPSHOT
   The export card no longer renders another nail stage.
   ================================================== */

html body #export-card #export-art.export-stage {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 464px !important;
  height: 310px !important;

  margin: 22px auto 0 !important;

  overflow: visible !important;
}

html body #export-card #export-art #export-art-snapshot {
  display: block !important;

  width: 100% !important;
  height: 100% !important;

  object-fit: contain !important;
  object-position: center center !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;

  transform: none !important;

  filter: none !important;

  opacity: 1 !important;
}

/*
  export-art no longer contains live .hand / .nail nodes.
  Old export hand layout rules are therefore intentionally irrelevant.
*/
