/* 실타래 의상실 — stylesheet (stage is a fixed 2000×1200 canvas scaled to fit) */
@font-face { font-family: 'Jua'; src: url('fonts/jua.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Gowun Dodum'; src: url('fonts/gowun.woff2') format('woff2'); font-display: swap; }

:root {
  --ink: #4a3426; --ink2: #8a5a3b; --cream: #fff8ec; --paper: #f3e2c9; --line: #e8cfa8;
  --pink: #d9666f; --pink-d: #a8404a; --teal: #2a9d8f; --gold: #f4b63f; --green: #46b882; --red: #e63946; --muted: #9a8572;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #3b2a20;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none; -webkit-text-size-adjust: 100%;
}
#stage {
  position: absolute; left: 0; top: 0; width: 2000px; height: 1200px; transform-origin: 0 0; overflow: hidden;
  background: var(--paper); color: var(--ink); font-family: 'Gowun Dodum', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; font-size: 28px; line-height: 1.4;
}
button, input { font-family: inherit; color: inherit; }
h1, h2, h3, h4, b.j, .j { font-family: 'Jua', 'Gowun Dodum', sans-serif; font-weight: normal; }
h3 { margin: 0 0 12px; font-size: 32px; color: var(--ink2); }
b { font-weight: bold; }
p { margin: 8px 0; }
.small { font-size: 22px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.big { font-size: 34px; }
.hidden { display: none !important; }
svg { display: block; }
svg.ico { display: inline-block; width: 1.2em; height: 1.2em; vertical-align: -0.25em; }

/* ---------- layers ---------- */
.layer { position: absolute; left: 0; top: 0; width: 2000px; height: 1200px; }
.layer-screen { z-index: 1; } .layer-overlay { z-index: 2; } .layer-modal { z-index: 3; } .layer-guide { z-index: 4; } .layer-fx { z-index: 5; } .layer-toast { z-index: 6; }
.layer-overlay, .layer-modal, .layer-guide, .layer-fx, .layer-toast { pointer-events: none; }
.layer-overlay > *, .layer-modal > *, .layer-guide > * { pointer-events: auto; }
.layer-guide.block { pointer-events: auto; background: rgba(40, 25, 15, .35); }
.layer-guide > .guide-ptr { pointer-events: none; }

/* ---------- panels & buttons ---------- */
.panel { background: var(--cream); border: 5px solid var(--line); border-radius: 30px; padding: 24px; box-shadow: 0 8px 0 rgba(90, 60, 30, .08); }
.btn {
  font-family: 'Jua', sans-serif; font-size: 32px; line-height: 1.15; padding: 14px 32px; border-radius: 999px; cursor: pointer;
  background: #fff; color: var(--ink); border: 4px solid #e0c49c; box-shadow: 0 6px 0 #d7b88c; transition: transform .08s, box-shadow .08s, background .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap; touch-action: manipulation;
}
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #d7b88c; }
.btn small { font-size: .62em; opacity: .85; }
.btn.primary { background: var(--pink); color: #fff; border-color: #c4505a; box-shadow: 0 6px 0 var(--pink-d); }
.btn.primary:active:not(:disabled) { box-shadow: 0 2px 0 var(--pink-d); }
.btn.big { font-size: 38px; padding: 18px 44px; }
.btn.huge { font-size: 48px; padding: 24px 60px; }
.btn.small { font-size: 24px; padding: 8px 20px; box-shadow: 0 4px 0 #d7b88c; border-width: 3px; }
.btn.small.primary { box-shadow: 0 4px 0 var(--pink-d); }
.btn.ghost { background: rgba(255, 255, 255, .5); box-shadow: none; }
.btn.danger { background: var(--red); color: #fff; border-color: #b52d38; box-shadow: 0 4px 0 #8f1f29; }
.btn:disabled, .btn.disabled { opacity: .42; filter: grayscale(.6); cursor: not-allowed; }
.btn-icon { width: 78px; height: 78px; padding: 0; border-radius: 50%; }
.btn-icon svg.ico { width: 44px; height: 44px; vertical-align: 0; }
.btn .ico { width: 1.1em; height: 1.1em; }
.bar { position: relative; background: #ead9c0; border-radius: 99px; height: 16px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: #59b37f; border-radius: 99px; transition: width .3s; }

/* ---------- tags & chips ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 16px; border-radius: 99px; background: var(--tc); color: #fff; font-family: 'Jua', sans-serif; font-size: 26px; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); white-space: nowrap; }
.tag i { font-style: normal; font-size: .85em; }
.tag.mini { font-size: 20px; padding: 2px 11px; }
.chip-btn { font-family: 'Jua', sans-serif; font-size: 30px; padding: 12px 10px; border-radius: 20px; border: 4px solid var(--tc); background: #fff; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: transform .1s; touch-action: manipulation; }
.chip-btn i { font-style: normal; color: var(--tc); }
.chip-btn.on { background: var(--tc); color: #fff; transform: scale(1.04); }
.chip-btn.on i { color: #fff; }
.chip-btn.right { background: var(--green); border-color: var(--green); color: #fff; }
.chip-btn.right i { color: #fff; }
.chip-btn.missed { border: 4px dashed var(--green); background: #e3f6ec; }
.chip-btn.wrong { background: #ddd; border-color: #bbb; color: #888; text-decoration: line-through; }
.chip-btn:disabled { cursor: default; }
.mini-tag { display: inline-block; font-size: 18px; color: #fff; padding: 1px 10px; border-radius: 99px; font-family: 'Jua', sans-serif; }
.mini-tag.neg { background: #a7a7a7; }
.swatch { display: inline-block; border-radius: 10px; border: 3px solid #fff; box-shadow: 0 0 0 2px #d6bf9c; vertical-align: middle; flex: none; }
.qbadge { font-family: 'Jua', sans-serif; font-size: 20px; padding: 2px 10px; border-radius: 99px; color: #fff; }
.q-s { background: #ff7a59; } .q-a { background: #f4a82a; } .q-b { background: var(--green); } .q-c { background: #8a9aab; }
.vip { display: inline-block; background: linear-gradient(135deg, #ffd95a, #f4a82a); color: #6b3e00; font-family: 'Jua', sans-serif; font-size: 18px; padding: 1px 10px; border-radius: 8px; margin-left: 8px; }

/* ---------- toast / fx ---------- */
.layer-toast { display: flex; flex-direction: column; align-items: center; padding-top: 118px; gap: 10px; }
.toast { background: rgba(74, 52, 38, .94); color: #fff; padding: 14px 34px; border-radius: 24px; font-size: 28px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); animation: toastIn .25s ease-out; transition: opacity .4s, transform .4s; max-width: 1400px; text-align: center; }
.toast b { color: #ffe08a; }
.toast.good { background: rgba(42, 157, 143, .96); }
.toast.bad { background: rgba(196, 80, 90, .96); }
.toast.note { background: rgba(91, 111, 181, .96); }
.toast.ach { background: linear-gradient(135deg, #ffd95a, #f4a82a); color: #4a2a00; }
.toast.ach b { color: #8a3b00; }
.toast.out { opacity: 0; transform: translateY(-20px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(.95); } }
.float { position: absolute; font-family: 'Jua', sans-serif; font-size: 46px; color: var(--gold); -webkit-text-stroke: 2px #8a5a3b; transform: translate(-50%, -50%); animation: floatUp 1.4s ease-out forwards; white-space: nowrap; }
.float.money { color: #ffd95a; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 0) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -30px) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -140px); } }
.spark { position: absolute; width: 18px; height: 18px; border-radius: 50%; margin: -9px; animation: spark .9s ease-out forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.dropfx { position: absolute; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); transition: left .5s ease-in, top .5s ease-in, opacity .5s; margin: -14px; }

/* ---------- modal ---------- */
.modal-wrap { position: absolute; inset: 0; background: rgba(40, 25, 15, .5); display: flex; align-items: center; justify-content: center; animation: fadeIn .18s; }
.modal-wrap.out { opacity: 0; transition: opacity .18s; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { position: relative; background: var(--cream); border: 6px solid var(--line); border-radius: 40px; padding: 36px 48px; max-width: 1880px; max-height: 1150px; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); animation: popIn .22s ease-out; min-width: 600px; }
@keyframes popIn { from { transform: scale(.9); opacity: 0; } }
.modal-title { font-family: 'Jua', sans-serif; font-size: 50px; text-align: center; margin-bottom: 18px; color: var(--ink); padding: 0 70px; }
.modal-body { font-size: 28px; }
.modal-btns { display: flex; justify-content: center; gap: 24px; margin-top: 28px; flex-wrap: wrap; }
.modal-x { position: absolute; top: 18px; right: 18px; width: 70px; height: 70px; border-radius: 50%; border: 4px solid var(--line); background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal-x svg { width: 36px; height: 36px; }

/* learn card */
.learn-item { display: flex; gap: 24px; align-items: flex-start; background: #fff; border-radius: 24px; padding: 18px 22px; margin-bottom: 14px; }
.learn-ico { flex: none; width: 120px; height: 120px; }
.learn-ico svg { width: 100%; height: 100%; }
.learn h4 { margin: 0 0 6px; font-size: 36px; color: var(--pink); }
.learn p { margin: 0; font-size: 27px; line-height: 1.55; }
.learn-how { background: #fff3d6; border-radius: 20px; padding: 18px 24px; font-size: 27px; line-height: 1.55; }
.learn-how b { color: var(--ink2); }

/* ---------- HUD ---------- */
.hud { position: absolute; left: 0; top: 0; width: 2000px; height: 100px; display: flex; align-items: center; gap: 22px; padding: 0 22px; background: linear-gradient(#fffaf2, #fbeedd); border-bottom: 5px solid var(--line); z-index: 5; }
.hud-day { display: flex; align-items: center; gap: 12px; min-width: 300px; }
.hud-day .hud-wx { width: 66px; height: 66px; }
.hud-day b { font-family: 'Jua', sans-serif; font-size: 36px; display: block; line-height: 1.1; }
.hud-day small { font-size: 22px; color: var(--muted); }
.hud-mid { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hud-clock { font-family: 'Jua', sans-serif; font-size: 34px; }
.hud-timebar { width: 520px; height: 14px; background: #ead9c0; border-radius: 99px; overflow: hidden; }
.hud-timebar i { display: block; height: 100%; background: var(--gold); width: 0; transition: width .3s; }
.hud-timebar.late i { background: var(--red); }
.hud-money { display: flex; align-items: center; gap: 8px; background: #fff; border: 4px solid var(--line); border-radius: 99px; padding: 6px 24px; font-family: 'Jua', sans-serif; font-size: 40px; min-width: 260px; justify-content: center; }
.hud-money svg { width: 44px; height: 44px; }
.hud-money small { font-size: 24px; color: var(--muted); }
.hud-rep { display: flex; align-items: center; gap: 10px; background: #fff; border: 4px solid var(--line); border-radius: 99px; padding: 6px 22px; }
.hud-rep svg { width: 44px; height: 44px; }
.hud-rep b { font-family: 'Jua', sans-serif; font-size: 26px; font-weight: normal; }
.hud-rep .bar { width: 170px; height: 12px; margin-top: 2px; }
.hud-rep .bar i { background: var(--gold); }
.hud-btns { display: flex; gap: 12px; }

/* ---------- guide (mascot) ---------- */
.guide { position: absolute; left: 30px; bottom: 30px; display: flex; align-items: flex-end; gap: 6px; z-index: 3; animation: guideIn .3s ease-out; max-width: 1100px; }
@keyframes guideIn { from { transform: translateY(40px); opacity: 0; } }
.guide > svg { width: 210px; height: 210px; flex: none; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .2)); }
.guide-bubble { position: relative; background: #fff; border: 5px solid var(--line); border-radius: 32px; padding: 20px 64px 22px 30px; font-size: 30px; line-height: 1.5; max-width: 820px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); margin-bottom: 60px; }
.guide-bubble b { color: var(--pink); }
.guide-name { font-family: 'Jua', sans-serif; color: var(--teal); font-size: 26px; }
.guide-bubble .btn { margin-top: 12px; float: right; }
.guide-x { position: absolute; top: 10px; right: 12px; width: 48px; height: 48px; border: 0; background: #f3e6d4; border-radius: 50%; font-size: 26px; cursor: pointer; }
.guide.right { left: auto; right: 30px; flex-direction: row-reverse; }
.guide.left { left: 30px; }
.guide.center { left: 50%; bottom: 140px; transform: translateX(-50%); animation: none; }
.guide-ptr { position: absolute; width: 0; height: 0; z-index: 4; }
.guide-ptr .ring { position: absolute; left: -55px; top: -55px; width: 110px; height: 110px; border-radius: 50%; border: 7px solid var(--gold); animation: ring 1.1s ease-out infinite; }
.guide-ptr .hand { position: absolute; left: 6px; top: 14px; font-size: 76px; animation: hand 1.1s ease-in-out infinite; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .3)); }
@keyframes ring { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes hand { 50% { transform: translate(-10px, -14px); } }

/* ---------- title ---------- */
.title-screen { position: absolute; inset: 0; background: #fbefe0; }
.title-bg, .title-bg svg { position: absolute; inset: 0; width: 2000px; height: 1200px; }
.title-box { position: absolute; left: 50%; top: 120px; transform: translateX(-50%); width: 1300px; text-align: center; }
.title-sub { font-family: 'Jua', sans-serif; font-size: 42px; color: var(--ink2); letter-spacing: 6px; }
.logo { font-family: 'Jua', sans-serif; font-size: 210px; margin: 0; line-height: 1.1; color: var(--ink); text-shadow: 0 10px 0 rgba(138, 90, 59, .18); }
.logo span { display: inline-block; animation: bob 2.4s ease-in-out infinite; }
.logo span:nth-child(1) { color: #e76f51; }
.logo span:nth-child(2) { color: #2a9d8f; animation-delay: .2s; }
.logo span:nth-child(3) { color: #f4a82a; animation-delay: .4s; }
.logo em { font-style: normal; font-size: 120px; }
@keyframes bob { 50% { transform: translateY(-14px) rotate(-2deg); } }
.title-desc { font-size: 32px; color: var(--ink2); margin: 6px 0 30px; }
.title-btns { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.title-btns .btn.huge { min-width: 620px; flex-direction: column; gap: 2px; }
.title-btns .btn.huge small { font-family: 'Gowun Dodum', sans-serif; font-size: 24px; }
.title-row { display: flex; gap: 16px; margin-top: 8px; }
.title-cat { position: absolute; right: 110px; bottom: 150px; width: 300px; height: 300px; animation: bob 3s ease-in-out infinite; }
.title-cat svg { width: 100%; height: 100%; }
.title-foot { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-size: 22px; color: var(--muted); }
.intro-bg { position: absolute; inset: 0; background: #fbefe0; }
.intro-wall, .intro-wall svg { position: absolute; inset: 0; width: 2000px; height: 1200px; }
.intro-wall { opacity: .75; }
.intro-shop { position: absolute; left: 610px; top: 50px; width: 780px; height: 907px; border-radius: 40px; overflow: hidden; border: 10px solid #fff; box-shadow: 0 18px 0 rgba(138, 90, 59, .18), 0 30px 60px rgba(90, 60, 40, .25); background: #fbe9d4; }
.intro-shop svg { display: block; width: 100%; height: 100%; }

/* ---------- prep ---------- */
.prep-screen { position: absolute; inset: 0; background: var(--paper); }
.prep-main { position: absolute; top: 116px; left: 18px; right: 18px; bottom: 18px; display: flex; gap: 18px; }
.prep-left { flex: 1; padding: 16px 20px; display: flex; flex-direction: column; min-width: 0; }
.prep-h { display: flex; align-items: baseline; gap: 18px; margin-bottom: 8px; }
.prep-h h2 { margin: 0; font-size: 40px; }
.prep-h small { font-size: 24px; color: var(--muted); }
.prep-side { width: 500px; display: flex; flex-direction: column; gap: 12px; }
.prep-side .panel { padding: 14px 20px; }
.forecast { display: flex; gap: 16px; align-items: center; }
.fc-ico { width: 92px; height: 92px; flex: none; }
.fc-ico svg { width: 100%; height: 100%; }
.forecast h3 { font-size: 30px; margin: 0 0 4px; }
.forecast p { font-size: 23px; margin: 0; line-height: 1.45; }
.today h3 { margin-bottom: 8px; font-size: 30px; }
.today p { font-size: 24px; margin: 4px 0; }
.today-gs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.today-g { text-align: center; background: #fff; border-radius: 16px; padding: 6px 2px; }
.today-g svg { width: 64px; height: 64px; margin: 0 auto; }
.today-g b { font-family: 'Jua', sans-serif; font-size: 21px; display: block; font-weight: normal; }
.today-g small { font-size: 16px; color: var(--muted); }
.prep-btns { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.prep-btns .btn.huge { font-size: 48px; padding: 20px 40px; }

/* ---------- workshop ---------- */
.workshop { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ws-row { display: grid; grid-template-columns: 132px 1fr 64px 1fr 64px 1fr 64px 1fr; align-items: center; gap: 4px; }
.ws-head { margin-bottom: 2px; }
.ws-h { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: 'Jua', sans-serif; font-size: 26px; color: var(--ink2); }
.ws-h svg { width: 44px; height: 44px; display: inline-block; }
.ws-lab b { font-family: 'Jua', sans-serif; font-size: 30px; display: block; font-weight: normal; letter-spacing: -1px; white-space: nowrap; }
.ws-lab small { font-size: 16px; color: var(--muted); word-break: keep-all; line-height: 1.2; display: block; }
.ws-cell { background: #fff; border: 3px solid #f0dcbe; border-radius: 20px; padding: 8px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; height: 178px; justify-content: space-between; }
.ws-ico { width: 64px; height: 64px; }
.ws-ico svg { width: 100%; height: 100%; }
.ws-name { font-family: 'Jua', sans-serif; font-size: 22px; }
.ws-count { font-size: 19px; color: var(--muted); }
.ws-count b { font-size: 24px; color: var(--ink); }
.ws-count.zero b { color: #c9b8a3; }
.ws-cell .btn.small { font-size: 21px; padding: 6px 14px; }
.ws-cell .btn.act { background: #fff3d6; }
.ws-cell .btn.act:not(:disabled) { background: var(--teal); color: #fff; border-color: #22867a; box-shadow: 0 4px 0 #1b6a61; }
.ws-buy { display: flex; gap: 4px; }
.ws-buy .btn.small { padding: 6px 10px; }
.ws-arrow { position: relative; text-align: center; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ws-arrow::before { content: '➜'; font-size: 40px; color: #d6b48a; line-height: 1; }
.ws-head .ws-arrow::before { content: ''; }
.ws-arrow span { font-size: 16px; color: var(--ink2); font-family: 'Jua', sans-serif; line-height: 1.1; word-break: keep-all; }
.ws-store { background: #fff; border-radius: 20px; padding: 12px 18px; margin-top: 4px; border: 3px solid #f0dcbe; }
.ws-store-h { display: flex; align-items: center; gap: 12px; font-size: 26px; }
.ws-store-h svg { width: 40px; height: 40px; }
.ws-store-h b { font-family: 'Jua', sans-serif; font-weight: normal; }
.ws-store-h .cap { background: #eef6ea; padding: 2px 14px; border-radius: 99px; font-size: 22px; }
.ws-store-h .cap.full { background: #ffe0e0; color: var(--red); }
.ws-store-h small { font-size: 18px; color: var(--muted); }
.ws-fabrics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; min-height: 64px; }
.fab-chip { display: flex; align-items: center; gap: 8px; background: var(--cream); border-radius: 14px; padding: 4px 14px 4px 6px; }
.fab-chip svg { width: 52px; height: 52px; }
.fab-chip b { font-family: 'Jua', sans-serif; font-size: 22px; font-weight: normal; display: block; }
.fab-chip small { font-size: 18px; color: var(--muted); }
.empty { color: var(--muted); font-size: 24px; padding: 10px; text-align: center; width: 100%; }
.ws-overlay { position: absolute; inset: 0; background: var(--paper); padding: 26px 160px 30px; display: flex; flex-direction: column; gap: 10px; animation: fadeIn .2s; }
.ws-ov-head { display: flex; align-items: center; gap: 20px; }
.ws-ov-head h2 { margin: 0; font-size: 46px; }
.ws-ov-head .mg-wait { flex: 1; justify-content: center; }
.ws-overlay .workshop { background: var(--cream); border: 5px solid var(--line); border-radius: 30px; padding: 16px 22px; }

/* struct picker */
.struct-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.struct-card { background: #fff; border: 4px solid var(--line); border-radius: 26px; padding: 18px; text-align: center; cursor: pointer; transition: transform .1s; font-size: 24px; }
.struct-card:active { transform: scale(.97); }
.sc-ico { width: 150px; height: 150px; margin: 0 auto 6px; }
.sc-ico svg { width: 100%; height: 100%; }
.struct-card h4 { margin: 0; font-size: 40px; }
.sc-cat { color: var(--muted); font-size: 21px; }
.struct-card p { font-size: 24px; margin: 8px 0; }
.sc-tags { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-bottom: 8px; }
.sc-good { font-size: 20px; color: var(--ink2); background: var(--cream); border-radius: 12px; padding: 6px; }

/* fabric picker */
.fp-req { display: flex; gap: 20px; align-items: center; background: #fff; border-radius: 24px; padding: 14px 22px; }
.fp-g { width: 130px; height: 130px; flex: none; }
.fp-g svg { width: 100%; height: 100%; }
.fp-req b { font-family: 'Jua', sans-serif; font-size: 38px; font-weight: normal; }
.fp-tags { display: flex; gap: 8px; margin: 4px 0; flex-wrap: wrap; }
.fp-tip { font-size: 23px; color: var(--ink2); margin: 4px 0 0; }
.fp-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; max-height: 600px; overflow: auto; }
.fp-card { display: flex; align-items: center; gap: 16px; background: #fff; border: 4px solid var(--line); border-radius: 22px; padding: 12px 18px; text-align: left; cursor: pointer; }
.fp-card:active { transform: scale(.98); }
.fp-ico { width: 90px; height: 90px; flex: none; }
.fp-ico svg { width: 100%; height: 100%; }
.fp-main { flex: 1; }
.fp-main b { font-family: 'Jua', sans-serif; font-size: 30px; font-weight: normal; }
.fp-main small { font-size: 21px; color: var(--muted); margin-left: 8px; }
.fp-tagrow { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.fp-fit { text-align: center; width: 110px; }
.fp-fit b { font-family: 'Jua', sans-serif; font-size: 54px; display: block; line-height: 1; font-weight: normal; }
.fp-fit small { font-size: 19px; }
.fit-a { color: var(--green); } .fit-b { color: #f4a82a; } .fit-c { color: var(--red); }

.auto-anim { background: #fff; border-radius: 30px; padding: 40px 70px; text-align: center; border: 6px solid var(--line); }
.gear-spin { width: 130px; height: 130px; margin: 0 auto 10px; animation: spin 1s linear infinite; }
.gear-spin svg { width: 100%; height: 100%; }
@keyframes spin { to { transform: rotate(360deg); } }
.auto-anim b { font-family: 'Jua', sans-serif; font-size: 36px; display: block; margin-bottom: 16px; font-weight: normal; }
.auto-anim .bar { width: 520px; height: 20px; }
.auto-anim .bar i { transition: width 1.4s linear; background: var(--teal); }

/* ---------- shop ---------- */
.shop-screen { position: absolute; inset: 0; background: #ecd6b8; }
.scene { position: absolute; left: 10px; top: 104px; width: 860px; height: 1000px; overflow: hidden; border-radius: 0 0 26px 26px; }
.scene > svg { position: absolute; left: 0; top: 0; width: 860px; height: 1000px; }
.scene > svg.shopfg { pointer-events: none; }
.actors { position: absolute; inset: 0; }
.actors.front { pointer-events: none; }
.actors.front .actor { pointer-events: auto; }
.actor { position: absolute; cursor: pointer; transition: left .9s ease-in-out, top .9s ease-in-out, width .6s, height .6s, opacity .6s; }
.actor > svg { width: 100%; height: 100%; }
.actor.fadein { animation: fadeIn .6s; }
.actor.fadeout { opacity: 0; }
.actor .pat { position: absolute; left: 22%; right: 22%; top: -6px; height: 14px; background: rgba(255, 255, 255, .85); border-radius: 99px; overflow: hidden; border: 2px solid rgba(0, 0, 0, .15); }
.actor .pat i { display: block; height: 100%; background: #59b37f; transition: width .3s; }
.actor .bub { position: absolute; right: -10px; top: -58px; background: #fff; border: 4px solid var(--line); border-radius: 22px; padding: 2px 16px; font-family: 'Jua', sans-serif; font-size: 28px; white-space: nowrap; box-shadow: 0 4px 10px rgba(0, 0, 0, .12); }
.actor .bub:empty { display: none; }
.actor .bub.alert { background: var(--gold); border-color: #c99512; color: #fff; font-size: 46px; padding: 0 22px; animation: bounce .8s infinite; }
.actor .bub.angry { background: #ffe0e0; color: var(--red); }
.actor .bub.warn { background: #fff3d6; color: #b5651d; font-size: 22px; }
.actor .bub.love { color: var(--pink); font-size: 40px; }
@keyframes bounce { 50% { transform: translateY(-12px); } }
.board { position: absolute; left: 884px; top: 112px; width: 1104px; height: 980px; display: flex; flex-direction: column; }
.board-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 10px 8px; }
.board-head h2 { margin: 0; font-size: 40px; }
.board-head span { font-size: 24px; color: var(--ink2); }
.tickets { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; }
.ticket { background: var(--cream); border: 5px solid var(--line); border-radius: 28px; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; position: relative; min-height: 0; overflow: hidden; }
.ticket.vip { border-color: #f4b63f; background: linear-gradient(#fffaf0, #fff3d6); }
.ticket.flash { animation: flash .6s; }
@keyframes flash { 30% { box-shadow: 0 0 0 10px rgba(244, 182, 63, .7); } }
.ticket.empty, .ticket.locked { border-style: dashed; background: rgba(255, 248, 236, .5); align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.ticket.empty p { font-family: 'Jua', sans-serif; font-size: 36px; margin: 0; }
.ticket.locked svg { width: 64px; height: 64px; opacity: .5; }
.ticket.locked p { font-size: 22px; margin: 0; }
.tk-head { display: flex; align-items: center; gap: 12px; }
.tk-face { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; background: #f4e3cb; flex: none; border: 3px solid #fff; }
.tk-face svg { width: 100%; height: 100%; }
.tk-who b { font-family: 'Jua', sans-serif; font-size: 32px; font-weight: normal; }
.tk-who small { font-size: 20px; color: var(--muted); margin-left: 8px; }
.tk-pat { flex: 1; height: 14px; background: #ead9c0; border-radius: 99px; overflow: hidden; margin-left: 8px; }
.btn.tk-x { width: 46px; height: 46px; flex: none; font-size: 22px; box-shadow: 0 3px 0 #d7b88c; border-width: 3px; color: #b0a090; }
.tk-pat i { display: block; height: 100%; background: #59b37f; transition: width .3s; }
.tk-body { display: flex; gap: 14px; min-height: 0; }
.tk-g { width: 140px; height: 140px; flex: none; background: #f4ead9; border-radius: 18px; }
.tk-g svg { width: 100%; height: 100%; }
.tk-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tk-gname { font-family: 'Jua', sans-serif; font-size: 32px; display: flex; align-items: center; gap: 12px; }
.tk-color { font-size: 22px; display: inline-flex; align-items: center; gap: 6px; font-family: 'Gowun Dodum', sans-serif; }
.tk-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tk-line { font-size: 19px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-pipe { display: flex; gap: 2px; margin-top: auto; }
.tk-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.tk-step i { font-style: normal; width: 32px; height: 32px; border-radius: 50%; background: #ead9c0; color: #a8927a; font-family: 'Jua', sans-serif; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.tk-step small { font-size: 15px; color: var(--muted); white-space: nowrap; }
.tk-step.done i { background: var(--green); color: #fff; }
.tk-step.cur i { background: var(--pink); color: #fff; animation: pulse 1.2s infinite; }
.tk-step.cur small { color: var(--pink); font-weight: bold; }
@keyframes pulse { 50% { transform: scale(1.18); } }
.tk-act { align-self: stretch; font-size: 32px; padding: 10px 20px; }
.tk-act.tk-deliver { background: var(--gold); border-color: #c99512; box-shadow: 0 6px 0 #a87a10; color: #fff; }
.shop-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 92px; display: flex; align-items: center; gap: 20px; padding: 0 22px; background: var(--cream); border-top: 5px solid var(--line); }
.bar-inv { flex: 1; display: flex; align-items: center; gap: 14px; font-size: 22px; overflow: hidden; white-space: nowrap; }
.bar-inv > b { font-family: 'Jua', sans-serif; font-size: 28px; font-weight: normal; }
.bar-fab { display: inline-flex; align-items: center; gap: 4px; background: #fff; border-radius: 14px; padding: 2px 12px 2px 4px; }
.bar-fab svg { width: 44px; height: 44px; }
.bar-inv .sep { width: 3px; height: 40px; background: var(--line); }
.mg-wait { display: flex; gap: 8px; align-items: center; }
.wb { font-family: 'Jua', sans-serif; font-size: 22px; background: #fff3d6; color: #8a5a3b; padding: 4px 14px; border-radius: 99px; white-space: nowrap; }
.wb.red { background: #ffe0e0; color: var(--red); animation: pulse 1.2s infinite; }
.wb.clock { background: #eef1f8; color: #4a5866; }

/* delivery */
.deliver { position: absolute; inset: 0; background: rgba(40, 25, 15, .6); display: flex; align-items: center; justify-content: center; gap: 40px; animation: fadeIn .25s; }
.deliver.out { opacity: 0; transition: opacity .2s; }
.dl-left { position: relative; width: 560px; height: 980px; }
.dl-spot { position: absolute; left: 30px; right: 30px; bottom: 50px; height: 120px; border-radius: 50%; background: radial-gradient(rgba(255, 240, 200, .9), rgba(255, 240, 200, 0) 70%); }
.dl-char { position: absolute; left: 0; top: 20px; width: 560px; height: 840px; animation: popIn .4s ease-out; }
.dl-char svg { width: 100%; height: 100%; }
.dl-name { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); background: #fff; border-radius: 99px; padding: 6px 30px; font-family: 'Jua', sans-serif; font-size: 34px; white-space: nowrap; }
.dl-card { width: 960px; background: var(--cream); border: 6px solid var(--line); border-radius: 40px; padding: 30px 44px; display: flex; flex-direction: column; gap: 14px; animation: popIn .3s ease-out; }
.dl-stars { display: flex; justify-content: center; gap: 8px; min-height: 90px; }
.dl-stars svg.ico { width: 88px; height: 88px; }
.dl-say { font-family: 'Jua', sans-serif; font-size: 40px; text-align: center; color: var(--ink); }
.dl-comment { background: #fff3d6; border-radius: 18px; padding: 10px 20px; font-size: 26px; text-align: center; }
.dl-comment b { color: var(--pink); }
.dl-bars { display: grid; gap: 8px; }
.dl-bar { display: grid; grid-template-columns: 170px 1fr 70px; align-items: center; gap: 4px 14px; }
.dl-bar span { font-family: 'Jua', sans-serif; font-size: 26px; }
.dl-bar .bar { height: 20px; }
.dl-bar .bar i { background: linear-gradient(90deg, #8ecae6, #46b882); }
.dl-bar b { font-family: 'Jua', sans-serif; font-size: 28px; text-align: right; font-weight: normal; }
.dl-bar small { grid-column: 2 / 4; font-size: 18px; color: var(--muted); margin-top: -6px; }
.dl-want { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 24px; }
.dl-tagv { display: inline-flex; align-items: center; gap: 4px; }
.dl-tagv b { font-family: 'Jua', sans-serif; font-size: 30px; font-weight: normal; }
.dl-money { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 30px; background: #fff; border-radius: 20px; padding: 14px 24px; }
.dl-money > div { display: flex; justify-content: space-between; font-size: 24px; align-items: baseline; }
.dl-money b { font-family: 'Jua', sans-serif; font-size: 30px; font-weight: normal; }
.dl-money .tot b { color: var(--teal); font-size: 40px; }
.dl-card > .btn { align-self: center; }

/* level up */
.lvup { text-align: center; }
.lv-num { font-family: 'Jua', sans-serif; font-size: 150px; color: #f4a82a; line-height: 1; text-shadow: 0 8px 0 #c97c0c33; animation: popIn .5s; }
.lv-new { background: #fff; border-radius: 24px; padding: 16px; margin-top: 10px; }
.lv-gs { display: flex; justify-content: center; gap: 24px; margin-top: 10px; }
.lv-g svg { width: 160px; height: 160px; margin: 0 auto; }
.lv-g span { font-family: 'Jua', sans-serif; font-size: 30px; }

/* ---------- minigame shell ---------- */
.mg { position: absolute; inset: 0; background: var(--paper); display: flex; flex-direction: column; animation: mgIn .22s ease-out; }
.mg.out { opacity: 0; transform: scale(.98); transition: opacity .2s, transform .2s; }
@keyframes mgIn { from { opacity: 0; transform: translateY(30px); } }
.mg-head { height: 130px; flex: none; display: flex; align-items: center; gap: 22px; padding: 0 26px; background: linear-gradient(#fffaf2, #fbeedd); border-bottom: 5px solid var(--line); }
.mg-hl { display: flex; align-items: center; gap: 14px; min-width: 430px; }
.mg-icon { width: 86px; height: 86px; flex: none; background: #fff; border-radius: 24px; padding: 6px; border: 3px solid var(--line); }
.mg-icon svg { width: 100%; height: 100%; }
.mg-step { font-size: 22px; color: var(--pink); font-family: 'Jua', sans-serif; }
.mg-title { font-family: 'Jua', sans-serif; font-size: 40px; line-height: 1.1; }
.mg-hc { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.mg-help { font-size: 29px; text-align: center; background: #fff; border-radius: 99px; padding: 6px 30px; border: 3px solid #f0dcbe; max-width: 100%; }
.mg-help b { color: var(--pink); }
.mg-prog { display: flex; align-items: center; gap: 14px; width: 640px; }
.mg-prog span { font-family: 'Jua', sans-serif; font-size: 22px; white-space: nowrap; color: var(--ink2); }
.mg-prog .bar { flex: 1; height: 16px; }
.mg-prog .bar i { background: var(--teal); }
.mg-hr { display: flex; align-items: center; gap: 12px; }
.mg-hr .mg-wait { flex-direction: column; align-items: flex-end; gap: 4px; }
.mg-body { position: relative; height: 1070px; flex: none; overflow: hidden; }
.mg-canvas { position: absolute; left: 0; top: 0; touch-action: none; }
.btn.mg-btn { position: absolute; transform: translate(-50%, -50%); }
.btn.mg-btn.pressed, .btn.mg-btn:active:not(:disabled) { transform: translate(-50%, calc(-50% + 4px)); }
.mg-note { position: absolute; background: rgba(255, 255, 255, .92); border-radius: 20px; padding: 14px 18px; font-size: 25px; border: 3px solid #f0dcbe; }
.mg-result-wrap { position: absolute; inset: 0; background: rgba(40, 25, 15, .45); display: flex; align-items: center; justify-content: center; animation: fadeIn .25s; z-index: 10; }
.mg-result { width: 940px; background: var(--cream); border: 6px solid var(--line); border-radius: 44px; padding: 36px 50px; text-align: center; animation: popIn .3s ease-out; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.mg-grade { font-family: 'Jua', sans-serif; font-size: 86px; line-height: 1; }
.mg-score { font-family: 'Jua', sans-serif; font-size: 36px; }
.mg-score b { font-size: 70px; font-weight: normal; }
.mg-scorebar { width: 600px; height: 22px; background: #ead9c0; border-radius: 99px; overflow: hidden; }
.mg-scorebar i { display: block; height: 100%; border-radius: 99px; animation: grow .8s ease-out; }
@keyframes grow { from { width: 0 !important; } }
.mg-msg { font-size: 30px; }
.mg-fact { background: #eaf4fb; border-radius: 22px; padding: 16px 24px; font-size: 25px; text-align: left; line-height: 1.55; }
.mg-fact b { color: #2e6fa8; }

/* order */
.order-stage { display: flex; height: 1070px; }
.order-left { width: 660px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 30px; background: radial-gradient(ellipse at 50% 92%, #f5d9b8 0, #f3e2c9 55%); }
.order-char { width: 600px; height: 900px; }
.order-char svg { width: 100%; height: 100%; }
.order-name { background: #fff; border-radius: 99px; padding: 6px 26px; font-size: 28px; border: 3px solid var(--line); }
.order-name b { font-family: 'Jua', sans-serif; font-size: 34px; font-weight: normal; }
.order-right { flex: 1; padding: 34px 44px 30px 10px; display: flex; flex-direction: column; gap: 20px; }
.order-bubble { position: relative; background: #fff; border: 5px solid var(--line); border-radius: 36px; padding: 20px 36px; font-size: 32px; line-height: 1.5; min-height: 200px; cursor: pointer; }
.order-bubble::before { content: ''; position: absolute; left: -34px; top: 70px; border: 18px solid transparent; border-right: 18px solid var(--line); border-width: 18px 30px 18px 0; }
.order-bubble p { margin: 4px 0; }
.order-bubble b { color: var(--pink); }
.order-slip { background: #fffdf5; border: 5px solid #e6d3b3; border-radius: 26px; padding: 18px 28px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 8px 0 rgba(90, 60, 30, .08); background-image: repeating-linear-gradient(#fffdf5 0 46px, #f3ead9 46px 48px); animation: popIn .25s; }
.slip-title { font-family: 'Jua', sans-serif; font-size: 36px; color: var(--ink2); }
.slip-row { display: flex; align-items: center; gap: 16px; }
.slip-row label { font-size: 24px; color: var(--muted); min-width: 80px; }
.slip-row.col { flex-direction: column; align-items: stretch; gap: 8px; }
.slip-row b { font-family: 'Jua', sans-serif; font-size: 32px; font-weight: normal; }
.slip-g { width: 74px; height: 74px; }
.slip-g svg { width: 100%; height: 100%; }
.slip-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.slip-foot { display: flex; justify-content: flex-end; }
.slip-result { border-radius: 18px; padding: 10px 20px; font-size: 27px; }
.slip-result.good { background: #e3f6ec; }
.slip-result.meh { background: #fff3d6; }
.slip-result b { color: var(--teal); }

/* dye */
.dye-wrap { display: flex; gap: 26px; padding: 26px; height: 1070px; }
.dye-left, .dye-right { width: 430px; display: flex; flex-direction: column; gap: 12px; }
.dye-left h3, .dye-right h3 { margin: 4px 0 0; }
.dye-target { height: 190px; border-radius: 26px; border: 6px solid #fff; box-shadow: 0 0 0 3px #d6bf9c; }
.dye-target.any { display: flex; align-items: center; justify-content: center; font-size: 110px; background: conic-gradient(#ff8fab, #ffd166, #90be6d, #4fb3d9, #b48ad6, #ff8fab); }
.dye-tname { font-family: 'Jua', sans-serif; font-size: 36px; text-align: center; }
.dye-now { height: 130px; border-radius: 26px; border: 6px solid #fff; box-shadow: 0 0 0 3px #d6bf9c; transition: background .2s; }
.dye-sim { display: flex; align-items: center; gap: 12px; font-size: 22px; }
.dye-sim .bar { flex: 1; height: 20px; }
.dye-sim b { font-family: 'Jua', sans-serif; font-size: 32px; width: 80px; text-align: right; font-weight: normal; }
.dye-tip { background: #fff3d6; border-radius: 18px; padding: 12px 16px; font-size: 22px; line-height: 1.5; margin-top: auto; }
.dye-center { flex: 1; position: relative; }
.dye-fabric { position: absolute; left: 50%; top: 30px; width: 360px; height: 400px; margin-left: -180px; border-radius: 10px 10px 30px 30px; overflow: hidden; transition: top .45s ease-in-out; cursor: pointer; z-index: 1; box-shadow: 0 10px 20px rgba(0, 0, 0, .15); touch-action: none; }
.dye-fabric > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dye-clip { position: absolute; left: -10px; right: -10px; top: 0; height: 26px; background: #8a6a4f; border-radius: 8px; }
.dye-fabric.dipping { top: 330px; }
.dye-vat { position: absolute; left: 50%; bottom: 190px; width: 620px; height: 420px; margin-left: -310px; z-index: 2; pointer-events: none; }
.dye-liquid { position: absolute; left: 22px; right: 22px; top: 70px; bottom: 22px; border-radius: 10px 10px 70px 70px; opacity: .82; transition: background .3s; }
.dye-vat-front { position: absolute; inset: 0; border: 18px solid #8a6a4f; border-top: 0; border-radius: 0 0 90px 90px; }
.dye-vat-front::before { content: ''; position: absolute; left: -36px; right: -36px; top: -14px; height: 28px; background: #a8825f; border-radius: 14px; }
.dye-drops { position: absolute; left: 0; right: 0; bottom: 128px; display: flex; justify-content: center; gap: 8px; min-height: 30px; align-items: center; }
.dye-drops i { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff; }
.dye-drops span { font-size: 22px; color: var(--muted); }
.dye-hold { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); touch-action: none; }
.btn.dye-hold.pressed, .btn.dye-hold:active:not(:disabled) { background: #b84f58; transform: translateX(-50%) translateY(4px); box-shadow: 0 2px 0 var(--pink-d); }
.dye-bottles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bottle { background: #fff; border: 4px solid var(--line); border-radius: 22px; padding: 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; touch-action: manipulation; }
.bottle svg { width: 74px; height: 100px; }
.bottle b { font-family: 'Jua', sans-serif; font-size: 28px; font-weight: normal; }
.bottle small { font-size: 18px; color: var(--muted); }
.bottle:active { transform: scale(.95) rotate(-6deg); }
.dye-right .btn { width: 100%; }
.btn.fix { background: #eaf4fb; border-color: #9cc3e0; box-shadow: 0 6px 0 #7fa9c9; font-size: 27px; white-space: normal; }
.btn.fix.done { background: #e3f6ec; border-color: var(--green); box-shadow: 0 4px 0 #2f8a5f; opacity: 1; filter: none; }
.dye-right .btn.primary { margin-top: auto; }

/* measure */
.meas-panel { position: absolute; right: 30px; top: 26px; bottom: 26px; width: 830px; display: flex; flex-direction: column; gap: 14px; }
.meas-list { display: flex; flex-direction: column; gap: 8px; }
.meas-item { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 16px; padding: 10px 20px; font-size: 26px; border: 3px solid transparent; }
.meas-item b { font-family: 'Jua', sans-serif; font-size: 30px; font-weight: normal; }
.meas-item.cur { border-color: var(--pink); background: #fff0f1; }
.meas-item.done { background: #e3f6ec; }
.meas-item.done span { color: var(--teal); font-family: 'Jua', sans-serif; }
.meas-inst { background: #fff3d6; border-radius: 20px; padding: 12px 22px; }
.meas-inst h4 { margin: 0; font-size: 36px; color: var(--ink2); }
.meas-inst p { margin: 4px 0; font-size: 26px; }
.meas-reading { font-family: 'Jua', sans-serif; font-size: 96px; text-align: center; color: var(--ink); line-height: 1.1; }
.meas-btns { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: auto; }

/* cut */
.size-wrap { display: flex; gap: 30px; padding: 40px; justify-content: center; height: 1070px; align-items: flex-start; }
.size-meas { width: 540px; display: flex; flex-direction: column; gap: 10px; }
.size-mrow { display: flex; justify-content: space-between; font-size: 30px; background: #fff; border-radius: 16px; padding: 10px 20px; }
.size-mrow b { font-family: 'Jua', sans-serif; font-size: 36px; color: var(--pink); font-weight: normal; }
.size-charts { width: 1180px; display: flex; flex-direction: column; gap: 10px; }
.size-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.size-btn { background: #fff; border: 4px solid var(--line); border-radius: 20px; padding: 10px 14px; min-width: 128px; cursor: pointer; display: flex; flex-direction: column; align-items: center; touch-action: manipulation; }
.size-btn b { font-family: 'Jua', sans-serif; font-size: 40px; font-weight: normal; }
.size-btn small { font-size: 19px; color: var(--muted); }
.size-btn.on { background: var(--pink); border-color: #c4505a; color: #fff; }
.size-btn.on small { color: #ffe3e6; }
.size-foot { display: flex; justify-content: flex-end; margin-top: auto; }
.cut-panel { position: absolute; left: 18px; top: 26px; width: 380px; display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.cut-steps { margin: 0; padding-left: 34px; font-size: 24px; }
.cut-steps li { margin: 4px 0; color: var(--muted); }
.cut-steps li.cur { color: var(--pink); font-weight: bold; }
.cut-steps li.done { color: var(--green); text-decoration: line-through; }
.cut-info { background: #fff3d6; border-radius: 18px; padding: 12px 16px; font-size: 23px; line-height: 1.5; }
.cut-rot { display: flex; flex-direction: column; gap: 12px; }

/* weave pedals */
.pedals { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 18px; }
.btn.pedal { width: 150px; height: 112px; border-radius: 22px; flex-direction: column; gap: 0; background: #8a5a3b; color: #fff; border-color: #6b4a33; box-shadow: 0 8px 0 #4d3322; padding: 0; }
.btn.pedal b { font-size: 46px; font-weight: normal; }
.btn.pedal small { font-size: 20px; opacity: .85; }
.btn.pedal.hint { animation: glow 1s infinite; background: #c9853f; }
@keyframes glow { 50% { box-shadow: 0 8px 0 #4d3322, 0 0 0 10px rgba(255, 217, 90, .8); } }
.btn.pedal.on { background: var(--teal); border-color: #22867a; transform: translateY(6px); box-shadow: 0 2px 0 #1b6a61; }

/* decor */
.decor-wrap { display: flex; gap: 22px; padding: 22px; height: 1070px; }
.decor-tray { width: 540px; overflow: auto; padding: 16px; }
.decor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.decor-tile { position: relative; background: #fff; border: 3px solid var(--line); border-radius: 18px; padding: 6px 4px 8px; text-align: center; cursor: grab; touch-action: none; }
.decor-tile svg { width: 66px; height: 66px; margin: 0 auto; }
.decor-tile b { font-family: 'Jua', sans-serif; font-size: 21px; display: block; font-weight: normal; line-height: 1.15; }
.decor-tile small { font-size: 17px; color: var(--muted); }
.decor-tile.closure { border-color: #8ecae6; }
.decor-tile.locked { opacity: .45; cursor: not-allowed; }
.dt-tags { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; margin-top: 3px; }
.dt-tags i { font-style: normal; font-size: 14px; color: #fff; padding: 0 6px; border-radius: 8px; }
.dt-type { position: absolute; top: 4px; left: 4px; font-size: 14px; background: #5d8ad6; color: #fff; border-radius: 8px; padding: 0 6px; }
.decor-board { flex: 1; display: flex; align-items: center; justify-content: center; background: radial-gradient(#fffaf2, #f3e2c9 70%); border-radius: 30px; }
.decor-garment { width: 760px; height: 760px; cursor: pointer; }
.decor-garment svg { width: 100%; height: 100%; }
.decor-info { width: 520px; display: flex; flex-direction: column; gap: 10px; }
.decor-tags { display: flex; flex-direction: column; gap: 8px; }
.dtag-row { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 16px; padding: 8px 14px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 26px; height: 26px; border-radius: 50%; background: #e5d6bf; }
.dots i.on { background: var(--gold); box-shadow: 0 0 0 3px #fff3d6; }
.decor-src { font-size: 20px; color: var(--muted); }
.decor-need { display: flex; flex-direction: column; gap: 6px; }
.need-row { font-size: 23px; padding: 8px 14px; border-radius: 14px; }
.need-row.ok { background: #e3f6ec; color: #2f7a55; }
.need-row.no { background: #ffe9e9; color: #c4505a; }
.decor-cost { font-size: 26px; margin-top: auto; text-align: right; }
.decor-cost b { font-family: 'Jua', sans-serif; font-size: 32px; font-weight: normal; }
.decor-btns { display: flex; gap: 12px; justify-content: flex-end; align-items: center; }
.decor-ghost { position: absolute; width: 96px; height: 96px; margin: -48px 0 0 -48px; pointer-events: none; z-index: 20; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .3)); }
.decor-ghost svg { width: 100%; height: 100%; }

/* ---------- summary ---------- */
.summary-screen { position: absolute; inset: 0; background: linear-gradient(#2b3a67, #4a4e7a); }
.sum-bg { position: absolute; left: 30px; top: 100px; width: 860px; height: 1000px; opacity: .9; }
.sum-bg svg { width: 100%; height: 100%; filter: brightness(.75) saturate(.8); }
.sum-card { position: absolute; right: 50px; top: 50px; bottom: 50px; width: 1040px; display: flex; flex-direction: column; padding: 30px 40px; }
.sum-card h1 { margin: 0 0 16px; font-size: 60px; text-align: center; }
.sum-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sum-num { background: #fff; border-radius: 20px; padding: 12px; text-align: center; }
.sum-num small { font-size: 22px; color: var(--muted); display: block; }
.sum-num b { font-family: 'Jua', sans-serif; font-size: 40px; display: block; font-weight: normal; }
.sum-num span { font-size: 18px; color: var(--muted); }
.sum-list { flex: 1; overflow: auto; margin: 18px 0; display: flex; flex-direction: column; gap: 8px; }
.sum-row { display: flex; align-items: center; gap: 16px; background: #fff; border-radius: 18px; padding: 6px 18px; font-size: 26px; }
.sum-row.vip { background: #fff3d6; }
.sum-face { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: #f4e3cb; }
.sum-face svg { width: 100%; height: 100%; }
.sum-row b { font-family: 'Jua', sans-serif; font-weight: normal; }
.sum-stars { display: flex; }
.sum-stars svg.ico { width: 36px; height: 36px; }
.sum-money { margin-left: auto; color: var(--teal); font-size: 32px; }
.sum-acts { display: flex; gap: 16px; justify-content: center; align-items: center; }

/* quiz */
.quiz-q { font-family: 'Jua', sans-serif; font-size: 46px; text-align: center; margin: 10px 0 0; line-height: 1.35; }
.quiz-modal .modal-btns { flex-direction: column; align-items: stretch; }
.btn.quiz-opt { font-size: 36px; justify-content: flex-start; padding: 18px 36px; }

/* upgrades */
.ups-money { font-family: 'Jua', sans-serif; font-size: 34px; text-align: right; margin-bottom: 12px; }
.ups-money svg { width: 40px; height: 40px; }
.ups-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.up-card { display: flex; align-items: center; gap: 16px; background: #fff; border: 4px solid var(--line); border-radius: 22px; padding: 12px 18px; }
.up-card.max { background: #fff9e8; }
.up-ico { width: 84px; height: 84px; flex: none; }
.up-ico svg { width: 100%; height: 100%; }
.up-main { flex: 1; }
.up-main b { font-family: 'Jua', sans-serif; font-size: 30px; font-weight: normal; }
.up-lv { display: inline-flex; gap: 6px; margin-left: 12px; vertical-align: middle; }
.up-lv i { width: 20px; height: 20px; border-radius: 50%; background: #e5d6bf; display: inline-block; }
.up-lv i.on { background: var(--gold); }
.up-main p { font-size: 22px; margin: 4px 0 0; color: var(--ink2); }

/* notebook */
.nb-prog { display: flex; align-items: center; gap: 14px; font-size: 26px; }
.nb-prog .bar { width: 420px; }
.nb-prog .bar i { background: var(--gold); }
.nb-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.btn.tab { font-size: 25px; padding: 8px 20px; box-shadow: none; border-width: 3px; }
.btn.tab small { font-size: 18px; }
.btn.tab.on { background: var(--pink); color: #fff; border-color: #c4505a; }
.nb-pane { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; height: 720px; overflow: auto; align-content: start; }
.note { display: flex; gap: 16px; background: #fff; border-radius: 22px; padding: 14px 18px; }
.note.locked { opacity: .55; }
.note-ico { width: 90px; height: 90px; flex: none; }
.note-ico svg { width: 100%; height: 100%; }
.note h4 { margin: 0 0 4px; font-size: 30px; color: var(--pink); }
.note p { margin: 0; font-size: 22px; line-height: 1.5; }
.ach { display: flex; gap: 16px; align-items: center; background: #fff; border-radius: 20px; padding: 12px 18px; }
.ach.ok { background: #fff3c4; }
.ach-ico { width: 60px; height: 60px; flex: none; }
.ach-ico svg { width: 100%; height: 100%; }
.ach b { font-family: 'Jua', sans-serif; font-size: 28px; display: block; font-weight: normal; }
.ach small { font-size: 21px; color: var(--muted); }
.ach > span { margin-left: auto; font-family: 'Jua', sans-serif; font-size: 24px; color: var(--ink2); white-space: nowrap; }

/* settings */
.set-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; border-bottom: 3px dashed #ead9c0; gap: 20px; }
.set-row > span { font-size: 30px; }
.set-row.col { flex-direction: column; align-items: stretch; }
.set-row input[type=range] { width: 440px; height: 40px; accent-color: var(--pink); }
.set-diff { display: flex; gap: 12px; }
.btn.diff { flex: 1; flex-direction: column; align-items: flex-start; white-space: normal; border-radius: 22px; padding: 12px 20px; gap: 2px; text-align: left; }
.btn.diff b { font-size: 32px; font-weight: normal; }
.btn.diff small { font-family: 'Gowun Dodum', sans-serif; font-size: 19px; opacity: 1; color: var(--muted); }
.btn.diff.on { background: var(--pink); border-color: #c4505a; color: #fff; }
.btn.diff.on small { color: #ffe3e6; }
.btn.toggle { min-width: 150px; }
.btn.toggle.on { background: var(--green); color: #fff; border-color: #2f8a5f; box-shadow: 0 4px 0 #23704b; }

/* ---------- boot / orientation ---------- */
#loading { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; color: #f3e2c9; font: 24px sans-serif; }
#rotate-hint { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(40, 25, 15, .92); color: #fff; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; font-family: 'Jua', sans-serif; padding: 24px; }
#rotate-hint .ph { font-size: 72px; animation: rot 2s ease-in-out infinite; }
#rotate-hint p { font-size: 24px; margin: 0; }
#rotate-hint button { font-family: 'Jua', sans-serif; font-size: 20px; padding: 10px 26px; border-radius: 99px; border: 0; background: #d9666f; color: #fff; }
body.portrait:not(.dismiss-rotate) #rotate-hint { display: flex; }
@keyframes rot { 50% { transform: rotate(90deg); } }
