/* 2000년대 옷 입히기 게임 창 느낌 (style.css 위에 덮어씀) */
body { background: radial-gradient(#ffffff 3px, transparent 4px) 0 0/28px 28px, #bfe6ff; color: #4a0a33; }
.marquee { background: linear-gradient(180deg,#ffd9ef,#ff8fcb); color: #7a0a50; border-bottom: 2px solid #fff; }
header { background: linear-gradient(180deg,#fff,#ffd3ec); border-bottom: 2px solid #f78ac6; }
#progress li { border-color: #f78ac6; background: linear-gradient(180deg,#fff,#ffe0f1); color: #7a0a50; }
#progress li.on { background: linear-gradient(180deg,#ff8fd0,#e8147f); color: #fff; border-color: #fff; }

main { margin: 16px; padding: 46px 14px 14px; position: relative; background: #ffd3ec; border: 3px solid #f78ac6; border-radius: 16px 16px 10px 10px; box-shadow: inset 0 0 0 2px #fff, 0 16px 36px #b0307a40; }
main::before { content: "♥ dallang_studio.exe"; position: absolute; left: 0; right: 0; top: 0; padding: 7px 16px; font: 800 .9rem "Courier New", monospace; color: #7a0a50; background: linear-gradient(180deg,#fff,#ffb7de); border-bottom: 2px solid #f78ac6; border-radius: 13px 13px 0 0; }
main::after { content: "— ▢ ✕"; position: absolute; right: 16px; top: 7px; font-weight: 900; color: #c4158a; letter-spacing: .3em; }

.stage, .panel { border: 2px solid #f78ac6; border-radius: 12px; box-shadow: inset 0 0 0 3px #fff; }
.stage { background: radial-gradient(#ffffffc0 5px, transparent 6px) 0 0/34px 34px, var(--stage); }
.panel { background: radial-gradient(#ffd3ec 4px, transparent 5px) 0 0/30px 30px, #fff; }
h1 { color: #c4158a; text-shadow: 2px 2px 0 #fff; }
.btn { border: 2px solid #fff; background: linear-gradient(180deg,#ffb3de,#ff4fae 50%,#e8147f); box-shadow: inset 0 3px 5px #ffffffa0, 0 6px 14px #e8147f55; }
.btn.ghost { background: linear-gradient(180deg,#fff,#e4e6ef); color: #4a0a33; }
.chip { border-color: #f78ac6; background: linear-gradient(180deg,#fff,#ffe0f1); }
.chip[aria-pressed="true"] { background: linear-gradient(180deg,#ff8fd0,#e8147f); color: #fff; }
.part { border-radius: 50%; border: 5px solid #ff9ad0; background: radial-gradient(#fff 3px, transparent 4px) 0 0/14px 14px, #ffe3f3; box-shadow: 0 4px 10px #b0307a40; }
.swatch { border: 3px solid #fff; box-shadow: 0 0 0 2px #f78ac6, inset 0 6px 8px #ffffff90; }
#hint { border-color: #f78ac6; border-radius: 40% 40% 40% 40% / 60% 60% 60% 60%; }
@media (max-width: 760px) { main { margin: 8px; padding: 42px 8px 8px; } }

.designs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.design { cursor: pointer; padding: 6px 4px; border: 2px solid #f78ac6; border-radius: 14px; background: #fff; font: 800 .72rem/1.3 inherit; color: #7a0a50; }
.design img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
.design span { display: block; font-size: .7rem; }
.design[aria-pressed="true"] { background: #ffd3ec; border-color: #e8147f; box-shadow: 0 0 0 3px #ff8fcb; }
@media (max-width: 420px) { .designs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 옛 Y2K × 지금: 오로라, 모눈, 필름 노이즈, 유리 창, 픽셀 커서 */
:root { --mono: "DOS Gothic", "Cascadia Mono", Consolas, "Courier New", monospace; --line: #3a0a2b24; }

html { background: #f6f1ff; }
body { background: transparent !important; isolation: isolate;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='28' shape-rendering='crispEdges'%3E%3Cpath d='M2 2h4v2h2v2h2v2h2v2h2v2h2v2h2v4h-6v2h2v4h2v2h-6v-4h-2v-2H8v2H6v2H2z' fill='%23ff2f9e' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") 2 2, auto; }

/* 천천히 흐르는 오로라 */
body::before { content: ""; position: fixed; inset: -25vmax; z-index: -2; pointer-events: none;
  background:
    radial-gradient(36vmax 36vmax at 28% 30%, #ff9ad8 0, transparent 68%),
    radial-gradient(34vmax 34vmax at 74% 28%, #a9dcff 0, transparent 68%),
    radial-gradient(32vmax 32vmax at 66% 74%, #e4ff8a 0, transparent 66%),
    radial-gradient(38vmax 38vmax at 24% 76%, #c9b2ff 0, transparent 68%),
    #fbf6ff;
  animation: aura 22s ease-in-out infinite alternate; }
@keyframes aura { to { transform: translate(6vmax, -4vmax) rotate(12deg); } }

/* 옛 웹의 모눈 + 필름 노이즈 */
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .05 0 0 0 0 .2 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  background-size: 44px 44px, 44px 44px, 180px 180px; }

header { background: #ffffff99; backdrop-filter: blur(16px); }
main { background: #ffffff80; backdrop-filter: blur(18px) saturate(1.3); }
#progress, .panel h2, #hint { font-family: var(--mono); }
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

/* 배경은 낮추고 키링이 먼저 보이게 */
.stage { background: radial-gradient(60% 55% at 50% 42%, #ffffff 0, #ffffffcc 35%, transparent 100%), color-mix(in srgb, var(--stage) 22%, #fff); }
.panel { background: #fff; }
#canvas { filter: drop-shadow(0 16px 18px #5a104345); }
.part { background: #fff6fb; border-width: 3px; }
.knot-info { margin: 14px 0 6px; padding: 12px 16px; border: 2px dashed #f78ac6; border-radius: 14px; background: #fff6fb; font-weight: 700; line-height: 1.7; }

:root { --mono: Consolas, "Cascadia Mono", "Gowun Dodum", "Malgun Gothic", monospace; }

/* 완성 화면 꾸미기 */
body[data-step="share"] #canvas, body[data-step="gift"] #canvas { filter: none; }
.sticker-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.sticker-btn { aspect-ratio: 1; padding: 2px; border: 2px solid #f78ac6; border-radius: 16px; background: #fff6fb; cursor: pointer; transition: transform .15s; }
.sticker-btn:hover { transform: translateY(-3px) rotate(-3deg); }
.sticker-btn:disabled { opacity: .35; cursor: default; }
.sticker-btn canvas { width: 100%; height: 100%; cursor: pointer; filter: none; }
.chip:disabled { opacity: .35; cursor: default; }
/* 반짝이 이름표 입력칸 */
.name-field { position: relative; margin-bottom: 10px; padding: 5px; border-radius: 99px; background: linear-gradient(110deg,#ff3ea5,#ffd6f0 20%,#b8a1ff 40%,#e8fbff 55%,#35d6e8 72%,#ff8fd0 88%,#ff3ea5) 0 0/220% 100%; box-shadow: 0 6px 18px #ff2f9e55; animation: shimmer 4s linear infinite; }
.name-field::before, .name-field::after { content: "✦"; position: absolute; color: #fff; text-shadow: 0 0 4px #ff2f9e, 0 0 10px #ff2f9e; pointer-events: none; animation: twinkle 1.4s ease-in-out infinite alternate; }
.name-field::before { left: -4px; top: -12px; font-size: 1.5rem; }
.name-field::after { right: 6px; bottom: -10px; font-size: 1.1rem; animation-delay: -.7s; }
.name-field input[type="text"] { display: block; min-height: 52px; padding: 8px 20px; border: 2px solid #fff; border-radius: 99px; background: #fff; font-size: 1.25rem; color: #b0106c; text-align: center; }
@keyframes shimmer { to { background-position: -220% 0; } }
@keyframes twinkle { to { scale: .6; opacity: .5; } }
.share-actions { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { .name-field, .name-field::before, .name-field::after { animation: none; } }
/* 모바일: 꾸미는 동안 그림이 위에 계속 보이게 */
@media (max-width: 760px) { body[data-step="share"] .stage { position: sticky; top: 6px; z-index: 5; } body[data-step="share"] #canvas { height: 42vh; } }
