:root {
  --bondi: #0095b6;
  --tangerine: #ff8a1f;
  --lime: #8fd400;
  --grape: #7b4fd6;
  --berry: #ff3d6e;
  --navy: #1b2350;
  --ink: #2a3157;
  --bubble: "Rubik Bubbles", "Jua", sans-serif;
  --tech: "Orbitron", "Jua", sans-serif;
  --pen: "Gaegu", sans-serif;
  --px: "VT323", "Galmuri11", monospace;
  /* 액체 크롬: 위는 하늘이 비치고 가운데 수평선에서 확 어두워진다 */
  --chrome: linear-gradient(180deg, #ffffff 0%, #dfe8f7 30%, #9fb0cf 48%, #3f4d78 50%, #7d8fb8 62%, #e8f0ff 82%, #ffffff 100%);
  --diecut: drop-shadow(2.5px 0 0 #fff) drop-shadow(-2.5px 0 0 #fff) drop-shadow(0 2.5px 0 #fff) drop-shadow(0 -2.5px 0 #fff) drop-shadow(0 4px 6px rgba(30, 40, 90, .25));
}

* { box-sizing: border-box; }
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body {
  margin: 0; padding: 40px 0 60px; color: var(--ink); font-family: var(--pen); overflow-x: hidden;
  background: linear-gradient(180deg, #7fc8ff 0%, #c6e6ff 38%, #f4fbff 49.6%, #e9dcff 50%, #cdb8ff 100%) fixed, #c6e6ff;
}
/* 수평선 아래로 깔리는 사이버 격자 */
body::before {
  content: ""; position: fixed; left: -50%; right: -50%; bottom: 0; height: 50vh; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.65) 1px, transparent 1px) 0 0 / 60px 60px,
    linear-gradient(0deg, rgba(255,255,255,.65) 1px, transparent 1px) 0 0 / 60px 60px;
  transform: perspective(300px) rotateX(62deg); transform-origin: 50% 0;
  -webkit-mask: linear-gradient(180deg, transparent, #000 40%); mask: linear-gradient(180deg, transparent, #000 40%);
}
button { font: inherit; color: inherit; }
::selection { background: #b5f0ff; }

/* ── 반투명 플라스틱 판 ─────────────────────────────── */
.board {
  position: relative; width: 1200px; height: 2240px; margin: 0 auto; border-radius: 34px;
  background:
    radial-gradient(circle, rgba(255,255,255,.7) 1.2px, transparent 1.6px) 0 0 / 28px 28px,
    linear-gradient(160deg, rgba(255,255,255,.62), rgba(235,244,255,.45) 40%, rgba(240,230,255,.5));
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.95), inset 0 0 0 1.5px rgba(255,255,255,.8), inset 0 -10px 30px rgba(120,140,220,.12), 0 30px 60px rgba(40, 60, 140, .25);
}

/* 크롬 버블 제목 */
.title {
  position: absolute; left: 56px; top: 40px; margin: 0; font: 400 150px/1 var(--bubble); letter-spacing: -.02em;
  color: transparent; background: var(--chrome); -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 3px var(--navy); paint-order: stroke fill;
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 6px 0 rgba(27,35,80,.25)) drop-shadow(0 0 22px rgba(130, 210, 255, .8));
  transform: rotate(-4deg);
}
.title::after { /* 반사광 별 */
  content: "✦"; position: absolute; right: -30px; top: -6px; font: 54px/1 sans-serif; color: #fff;
  -webkit-text-stroke: 0; filter: drop-shadow(0 0 8px #9fe0ff); animation: tw 2.4s ease-in-out infinite;
}
@keyframes tw { 50% { transform: scale(.55) rotate(45deg); opacity: .6; } }
.sub { position: absolute; left: 86px; top: 222px; margin: 0; font: 900 22px/1 var(--tech); letter-spacing: .18em; color: var(--navy); }
.sub b { margin-left: 10px; padding: 5px 12px; font: 700 13px/1 var(--tech); letter-spacing: .1em; color: #fff; border-radius: 999px; vertical-align: 3px; }

/* 젤 버튼: 위쪽 절반에 하이라이트가 맺힌 젤리 */
.sub b, .label span, .go, #reset {
  position: relative; background: linear-gradient(180deg, #6fd8ff, #0a8fe0 55%, #0a6fd0);
  box-shadow: inset 0 -3px 6px rgba(0,30,90,.3), inset 0 1px 0 rgba(255,255,255,.6), 0 4px 10px rgba(10,80,180,.3);
}
.sub b::before, .label span::before, .go::before, #reset::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: 2px; height: 45%; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.1)); pointer-events: none;
}

/* 투명 테이프 */
.tape { position: absolute; z-index: 3; width: 96px; height: 26px; background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 0 1px 3px rgba(30,40,90,.12); backdrop-filter: blur(2px); }

/* ── 버블 창(젤 제목 표시줄) ─────────────────────────────── */
.win { border-radius: 18px; overflow: hidden; background: rgba(255,255,255,.72); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.9), 0 12px 28px rgba(40,60,140,.22); backdrop-filter: blur(8px); }
.win-bar {
  position: relative; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  background: linear-gradient(180deg, #8fe3ff, #2aa6f0 50%, #1580dc); color: #fff; font: 700 13px/1 var(--tech); letter-spacing: .12em;
  text-shadow: 0 1px 1px rgba(0,40,100,.5);
}
.win-bar::before { content: ""; position: absolute; left: 6px; right: 6px; top: 2px; height: 13px; border-radius: 10px; background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.05)); }
.win-bar i { position: relative; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--c) 55%); box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.win-bar span { margin-left: 8px; position: relative; }

/* ── 스티커 시트 ─────────────────────────────── */
.sheet { position: absolute; left: 70px; top: 300px; width: 480px; transform: rotate(-2deg); }
.sheet-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 16px 18px 20px; }
.stk { display: grid; place-items: center; height: 74px; border-radius: 12px; background: rgba(255,255,255,.5); outline: 1px dashed #b9cdf2; outline-offset: -3px; cursor: grab; touch-action: none; }
.stk svg, .placed svg { width: 56px; height: 56px; filter: var(--diecut); pointer-events: none; }
.placed { position: absolute; z-index: 40; cursor: grab; touch-action: none; transform: rotate(var(--r, 0deg)); }
.placed svg { width: 66px; height: 66px; }
.placed.drag, .card.drag { cursor: grabbing; }
.holo-fill { fill: url(#holo); }

/* ── 폴더폰: 반투명 본다이 블루 ─────────────────────────────── */
.phone { position: absolute; left: 830px; top: 40px; width: 280px; transform: rotate(6deg); z-index: 5; }
.ph-top, .ph-bottom {
  position: relative; padding: 22px 18px;
  background: linear-gradient(120deg, rgba(120,220,245,.85), rgba(0,149,182,.78) 45%, rgba(80,200,230,.85) 70%, rgba(0,120,160,.8));
  box-shadow: inset 0 2px 0 rgba(255,255,255,.9), inset 0 0 0 2px rgba(255,255,255,.35), inset 0 -6px 14px rgba(0,60,90,.35), 0 14px 30px rgba(0, 80, 120, .35);
}
.ph-top { border-radius: 40px 40px 16px 16px; }
.ph-top::before, .ph-bottom::before { /* 플라스틱 반사 */
  content: ""; position: absolute; left: 14px; top: 6px; width: 46%; height: 60%; border-radius: 30px; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.55), rgba(255,255,255,0) 60%);
}
.ph-lcd {
  position: relative; height: 266px; padding: 10px 12px; border-radius: 10px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #d4f7a8, #a9e06a 70%, #8ccb4e);
  box-shadow: inset 0 0 0 4px #233040, inset 0 0 22px rgba(40, 90, 0, .35);
  font: 20px/1.2 var(--px); color: #1d3a10;
}
.ph-lcd::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(0,0,0,.05) 1px, transparent 1px) 0 0 / 3px 3px, linear-gradient(90deg, rgba(0,0,0,.05) 1px, transparent 1px) 0 0 / 3px 3px; }
.lcd-bar { display: flex; justify-content: space-between; font-size: 17px; padding-bottom: 4px; border-bottom: 2px solid #1d3a10; }
.lcd-tabs { display: flex; gap: 4px; margin: 8px 0; font-size: 16px; }
.lcd-tabs span { padding: 0 5px; }
.lcd-tabs span.on { background: #1d3a10; color: #b9ea7c; }
.lcd-body dl { margin: 0; display: grid; gap: 5px; }
.lcd-body dt { font-size: 15px; opacity: .7; }
.lcd-body dd { margin: 0; font-size: 21px; }
.lcd-body a { color: #1d3a10; }
.lcd-big { font-size: 58px; line-height: .9; }
.lcd-soft { position: absolute; left: 12px; right: 12px; bottom: 6px; display: flex; justify-content: space-between; font-size: 16px; }
.ph-hinge { position: relative; z-index: 2; height: 18px; margin: -4px 22px; border-radius: 9px; background: var(--chrome); box-shadow: inset 0 0 0 1px rgba(27,35,80,.3); }
.ph-bottom { border-radius: 16px 16px 44px 44px; padding: 18px 22px 30px; }
.ph-nav { position: relative; display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 8px; margin-bottom: 14px; }
.ph-nav button {
  height: 40px; border: 0; border-radius: 999px; cursor: pointer; font: 900 13px/1 var(--tech); color: var(--navy);
  background: var(--chrome); box-shadow: 0 3px 0 rgba(0,60,90,.45), inset 0 0 0 1px rgba(255,255,255,.7);
}
.ph-nav button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,60,90,.45); }
.ph-nav .ok { background: linear-gradient(180deg, #e8ffb0, #8fd400 55%, #6aae00); color: #1d3a10; }
.ph-nav button:focus-visible { outline: 2px dashed #fff; outline-offset: 2px; }
.ph-keys { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 10px; }
.ph-keys span {
  display: grid; place-items: center; height: 36px; border-radius: 12px 12px 18px 18px; font: 700 15px/1 var(--tech); color: var(--navy);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(220,240,255,.8)); box-shadow: 0 2px 0 rgba(0,60,90,.4);
}
.ph-keys small { display: block; margin-top: 2px; font: 700 7px/1 var(--tech); letter-spacing: .1em; color: #3a87a8; }
.strap { position: absolute; right: -10px; top: 26px; width: 40px; transform-origin: 50% 0; transform: rotate(var(--sw, 0deg)); transition: transform .9s cubic-bezier(.2,2.2,.4,1); }
.strap i { display: block; width: 2px; height: 70px; margin: 0 auto; background: repeating-linear-gradient(180deg, #fff 0 4px, #9fb0cf 4px 6px); }
.strap b { display: grid; place-items: center; width: 30px; height: 30px; margin: -2px auto 0; border-radius: 50%; color: #fff; font: 900 15px/1 var(--tech); background: radial-gradient(circle at 35% 30%, #fff, #ff7aa8 45%, var(--berry)); box-shadow: inset 0 -3px 5px rgba(0,0,0,.2), 0 3px 6px rgba(0,0,0,.2); }
.strap b:nth-of-type(2) { background: radial-gradient(circle at 35% 30%, #fff, #c3a4ff 45%, var(--grape)); }
.strap b.c { background: radial-gradient(circle at 35% 30%, #fff, #d4ff6a 45%, var(--lime)); color: #1d3a10; }

/* ── 라벨 ─────────────────────────────── */
.label { position: absolute; margin: 0; display: flex; align-items: center; gap: 12px; }
.label span { padding: 9px 22px 10px; border-radius: 999px; font: 900 22px/1 var(--tech); letter-spacing: .12em; color: #fff; text-shadow: 0 1px 2px rgba(0,40,100,.4); }
.label small { font: 20px/1 var(--pen); color: #5a64a0; }
.l-works { left: 60px; top: 640px; }
.l-wip { position: static; margin-bottom: 20px; }
.l-wip span { background: linear-gradient(180deg, #d9c4ff, #8b5ce8 55%, #6a3fd0); }

/* ── 작품: 반투명 캔디 플라스틱 액자 ─────────────────────────────── */
.card {
  position: absolute; width: 248px; z-index: 2; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none;
  transform: rotate(var(--r)); transition: transform .25s cubic-bezier(.3,1.6,.5,1), filter .2s;
  filter: drop-shadow(0 8px 12px rgba(30, 40, 110, .25));
}
.card:hover { transform: rotate(calc(var(--r) * .4)) scale(1.04); }
.card.drag { transition: none; transform: rotate(0) scale(1.07); filter: drop-shadow(0 20px 24px rgba(30, 40, 110, .32)); }
.card:focus-visible { outline: 3px dashed var(--navy); outline-offset: 6px; border-radius: 20px; }
.card .tape { top: -12px; left: 50%; margin-left: -48px; transform: rotate(var(--tr)); }
.frame { position: relative; padding: 12px 12px 14px; border-radius: 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 55%, white), var(--c) 60%, color-mix(in srgb, var(--c) 75%, black)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5), inset 0 -6px 12px rgba(0,0,0,.18); }
.frame::before { content: ""; position: absolute; left: 10px; right: 30%; top: 4px; height: 38%; border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0)); pointer-events: none; }
.frame.holo { background: conic-gradient(from calc(var(--hx, .5) * 360deg), #ffb3de, #fff3a6, #b5ffe1, #a8d8ff, #d6b8ff, #ffb3de); }
.shot { position: relative; overflow: hidden; border-radius: 10px; aspect-ratio: 16 / 10; background: #111; box-shadow: 0 0 0 3px rgba(255,255,255,.85); }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; pointer-events: none; }
.rk { position: absolute; inset: 0; pointer-events: none; }
.rk .nm {
  position: absolute; left: 8px; bottom: 6px; max-width: 92%; font: 400 21px/1.05 var(--bubble); color: #fff;
  -webkit-text-stroke: 5px var(--c); paint-order: stroke fill; transform: rotate(-4deg);
}
.rk .no { position: absolute; right: 8px; top: 7px; padding: 1px 6px; border-radius: 4px; font: 16px/1.1 var(--px); color: #b9ea7c; background: rgba(20,30,20,.8); }
.rk svg { position: absolute; width: 26px; height: 26px; }
.cap { margin: 8px 0 0; text-align: center; font: 700 11px/1 var(--tech); letter-spacing: .2em; color: var(--navy); }

/* ── 만드는 중: 플로피 디스크 ─────────────────────────────── */
.soon { position: absolute; left: 60px; top: 1930px; width: 620px; }
.disks { display: flex; gap: 14px; flex-wrap: wrap; }
.disk {
  position: relative; width: 88px; height: 92px; padding: 0; border: 0; border-radius: 6px; cursor: pointer;
  background: linear-gradient(135deg, color-mix(in srgb, var(--bg) 60%, white), var(--bg) 55%);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5), inset 0 -4px 8px rgba(0,0,0,.18), 0 6px 12px rgba(30,40,110,.22);
  clip-path: polygon(0 0, 92% 0, 100% 8%, 100% 100%, 0 100%); transform: rotate(var(--r)); transition: transform .25s cubic-bezier(.3,1.6,.5,1);
}
.disk:hover, .disk:focus-visible { transform: translateY(-8px) rotate(0); outline: none; }
.disk .shutter { position: absolute; left: 24%; right: 24%; top: 0; height: 30%; background: var(--chrome); border-radius: 0 0 3px 3px; box-shadow: inset 0 0 0 1px rgba(27,35,80,.25); }
.disk .shutter::after { content: ""; position: absolute; right: 18%; top: 22%; width: 18%; height: 56%; background: rgba(27,35,80,.55); border-radius: 2px; }
.disk .lbl { position: absolute; left: 9%; right: 9%; bottom: 7%; height: 50%; padding: 4px 3px; border-radius: 3px; background: #fffdf4; text-align: center; overflow: hidden; }
.disk b { display: block; font: 900 13px/1 var(--tech); color: var(--navy); }
.disk .lbl span { display: block; margin-top: 3px; font: 700 13px/1.05 var(--pen); color: #4a4f6a; word-break: keep-all; }

/* ── 아래 ─────────────────────────────── */
.foot { position: absolute; left: 740px; top: 1990px; width: 400px; text-align: right; }
.counter { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: #0d1020; box-shadow: inset 0 0 0 2px #3a4370, 0 6px 14px rgba(20,30,80,.25); }
.counter span { font: 700 11px/1 var(--tech); letter-spacing: .2em; color: #9fb0cf; }
.counter b { font: 400 30px/1 var(--px); letter-spacing: .18em; color: #7dff6a; text-shadow: 0 0 8px rgba(125,255,106,.6); }
.foot p { margin: 18px 0 14px; font: 17px/1.4 var(--pen); color: #4a5390; }
.foot a { margin-left: 10px; color: #0a6fd0; }
#reset { border: 0; padding: 9px 20px; border-radius: 999px; cursor: pointer; font: 900 12px/1 var(--tech); letter-spacing: .16em; color: #fff; }

/* ── 상세: 버블 창 ─────────────────────────────── */
dialog.note { width: min(470px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 20px; overflow: hidden; color: var(--ink); background: rgba(255,255,255,.9); box-shadow: inset 0 0 0 1.5px #fff, 0 30px 70px rgba(30, 40, 110, .4); }
dialog.note::backdrop { background: rgba(140, 190, 255, .35); backdrop-filter: blur(5px); }
dialog.note[open] { animation: pop .35s cubic-bezier(.2,1.5,.4,1); }
@keyframes pop { from { transform: scale(.88); opacity: 0; } }
.note form { position: absolute; top: 5px; right: 8px; z-index: 3; }
.note .x { width: 24px; height: 24px; border: 0; border-radius: 50%; cursor: pointer; font: 900 14px/1 var(--tech); color: #fff; background: radial-gradient(circle at 35% 30%, #ffb3c6, var(--berry) 60%); box-shadow: inset 0 -2px 3px rgba(0,0,0,.25); }
.note-body { padding: 22px 26px 26px; }
.note h2 { margin: 18px 0 8px; font: 400 34px/1.1 var(--bubble); color: transparent; background: var(--chrome); -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 2px var(--navy); paint-order: stroke fill; }
.note .kind { display: inline-block; padding: 4px 10px; border-radius: 999px; font: 700 11px/1.2 var(--tech); letter-spacing: .16em; color: #fff; background: var(--navy); }
.note .stack { margin: 12px 0 20px; font: 19px/1.4 var(--pen); }
.go { display: inline-flex; gap: 8px; align-items: center; padding: 12px 24px; border-radius: 999px; text-decoration: none; font: 900 14px/1 var(--tech); letter-spacing: .14em; color: #fff; text-shadow: 0 1px 2px rgba(0,40,100,.4); }
.go:active { transform: translateY(2px); }
.go.off { background: linear-gradient(180deg, #eef1f8, #c9d0e2); color: #6a7290; text-shadow: none; }

.spark { position: fixed; z-index: 100; pointer-events: none; font: 15px/1 sans-serif; text-shadow: 0 0 6px #fff; animation: fall .8s ease-out forwards; }
@keyframes fall { to { transform: translate(var(--dx), 30px) rotate(140deg) scale(.2); opacity: 0; } }

/* ── 좁은 화면: 끌기 없이 차례로 ─────────────────────────────── */
@media (max-width: 900px) {
  body { padding: 16px 0 40px; }
  .board { width: calc(100vw - 20px); height: auto; padding: 36px 14px 30px; display: flex; flex-direction: column; align-items: center; gap: 26px; zoom: 1 !important; }
  .title, .sub, .phone, .label, .soon, .foot { position: relative; left: auto; top: auto; }
  .title { font-size: min(96px, 24vw); }
  .title::after { font-size: 34px; right: -18px; }
  .sub { margin-top: -10px; font-size: 16px; }
  .sheet { display: none; }
  .phone { width: min(280px, 84vw); transform: rotate(2deg); }
  .l-works { align-self: flex-start; }
  .label span { font-size: 17px; white-space: nowrap; }
  .label small { display: none; }
  #cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 14px; width: 100%; }
  .card { position: relative; left: auto !important; top: auto !important; width: auto; }
  .rk .nm { font-size: 15px; -webkit-text-stroke-width: 4px; }
  .rk svg { width: 17px; height: 17px; }
  .soon { width: 100%; }
  .disks { justify-content: center; }
  .disk { width: 76px; height: 80px; }
  .foot { width: 100%; text-align: center; }
  .placed { display: none; }
}
@media (prefers-reduced-motion: reduce) { .spark { display: none; } .title::after { animation: none; } }
