/* PLAYORA 옷입히기 */
:root {
  --plum: #4b2a45; --plum-2: #573351; --plum-3: #6a4264; --plum-line: #7c5776;
  --d-ink: #fbf3ee; --d-ink-2: #e6cfdc; --d-ink-3: #bf9db3;
  --paper: #fbf6ee; --paper-2: #f4ebde; --paper-3: #ebdfcd; --p-ink: #3a2a35; --p-ink-2: #6c5864; --p-ink-3: #9a8791; --p-line: #e3d6c5;
  --acc: #f0724f; --acc-2: #d65a39; --acc-ink: #3d1408;
  --mint: #47a86b; --gold: #f2c14e; --bad: #e0564a; --rose: #e2658e;
  --page: #f8f2ea; --page-ink: #2c2229; --page-2: #6a5a63; --page-line: #e4d8ca;
  --f-body: "IBM Plex Sans KR", "Pretendard", system-ui, -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --f-disp: "Jua", "IBM Plex Sans KR", "Malgun Gothic", sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r1: 8px; --r2: 12px; --r3: 16px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@supports (color: oklch(0 0 0)) {
  :root {
    --plum: oklch(0.34 0.065 345); --plum-2: oklch(0.38 0.07 344); --plum-3: oklch(0.44 0.072 343); --plum-line: oklch(0.51 0.068 342);
    --d-ink: oklch(0.97 0.012 40); --d-ink-2: oklch(0.88 0.035 345); --d-ink-3: oklch(0.74 0.05 345);
    --paper: oklch(0.975 0.012 75); --paper-2: oklch(0.945 0.02 75); --paper-3: oklch(0.905 0.028 75); --p-ink: oklch(0.3 0.03 345); --p-ink-2: oklch(0.48 0.03 345); --p-line: oklch(0.88 0.026 75);
    --acc: oklch(0.7 0.16 40); --acc-2: oklch(0.62 0.16 38);
    --page: oklch(0.965 0.013 70); --page-line: oklch(0.89 0.022 70);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--page); color: var(--page-ink); font: 400 16px/1.7 var(--f-body); word-break: keep-all; overflow-wrap: anywhere; }
button { font: inherit; color: inherit; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: 0.38; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- 페이지 머리 */
.mast { display: flex; align-items: baseline; gap: var(--s4); padding: var(--s3) clamp(var(--s4), 3vw, var(--s6)); border-bottom: 1px solid var(--page-line); }
.mast-brand { text-decoration: none; font-size: 14px; color: var(--page-2); white-space: nowrap; }
.mast-brand b { font-weight: 700; letter-spacing: 0.1em; color: var(--page-ink); margin-right: 6px; }
.mast-more { margin-left: auto; font-size: 14px; color: var(--page-2); white-space: nowrap; }
.head { max-width: 1240px; margin: 0 auto; padding: var(--s4) clamp(var(--s3), 3vw, var(--s6)) var(--s3); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4); }
.head h1 { margin: 0; font: 400 clamp(32px, 4.2vw, 46px)/1.1 var(--f-disp); letter-spacing: 0.01em; color: var(--plum); }
.head p { margin: 0; color: var(--page-2); font-size: 15px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(0px, 2vw, var(--s5)); }

/* ---------------------------------------------------------------- 게임 무대 */
.du { position: relative; width: 100%; height: clamp(560px, calc(100svh - 132px), 860px); background: var(--plum); color: var(--d-ink); overflow: hidden; border-radius: var(--r2);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; font: 400 14px/1.45 var(--f-body); }
@media (max-width: 640px) { .du { border-radius: 0; height: calc(100svh - 96px); min-height: 560px; } .head { padding-top: var(--s3); } .head p { display: none; } }
html.embed, html.embed body { height: 100%; overflow: hidden; background: var(--plum); }
html.embed .mast, html.embed .head, html.embed .about, html.embed .foot { display: none !important; }
html.embed .wrap { padding: 0; max-width: none; }
html.embed .du { position: fixed; inset: 0; width: auto; height: auto; min-height: 0; border-radius: 0; }
.du:fullscreen { border-radius: 0; }
.du button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.nojs { padding: var(--s6); text-align: center; }
.du canvas { display: block; }

/* 위 막대 */
.bar { position: absolute; top: 0; left: 0; right: 0; height: 46px; z-index: 6; display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s2) 0 var(--s3); background: var(--plum); border-bottom: 1px solid rgba(0, 0, 0, 0.25); }
.du.short .bar { height: 40px; }
.bar-l { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 1; overflow: hidden; }
.bar-t { font: 400 21px/1 var(--f-disp); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--d-ink); min-width: 0; letter-spacing: 0.01em; }
.du.short .bar-t, .du.narrow .bar-t { font-size: 19px; }
.bar-m { color: var(--d-ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.du.tiny .bar-m { display: none; }
.bar-r { display: flex; align-items: center; gap: 6px; flex: none; }
.tb { height: 34px; padding: 0 10px; gap: 5px; border-radius: var(--r1); border: 1px solid var(--plum-line); background: transparent; color: var(--d-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.tb.icon { width: 36px; padding: 0; }
.du.short .tb { height: 30px; } .du.short .tb.icon { width: 32px; }
.tb svg { width: 18px; height: 18px; flex: none; }
.tb:hover { border-color: var(--d-ink-3); background: rgba(255, 255, 255, 0.06); }
.tb.back { padding: 0 10px 0 8px; }
.du.narrow .tb.back span { display: none; } .du.narrow .tb.back { width: 36px; padding: 0; }
.view { position: absolute; top: 46px; left: 0; right: 0; bottom: 0; }
.du.short .view { top: 40px; }

/* ---------------------------------------------------------------- 처음 화면 */
.vh { background: var(--paper); color: var(--p-ink); }
.hm { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr); }
.du.port .hm { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
.hm-art { position: relative; min-height: 0; overflow: hidden; }
.hm-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hm-tag { position: absolute; left: var(--s3); top: var(--s3); padding: 4px 12px; border-radius: 14px; background: rgba(255, 253, 248, 0.92); color: var(--p-ink); font-size: 12.5px; font-weight: 600; box-shadow: 0 2px 8px -4px rgba(0, 0, 0, 0.4); max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-side { min-width: 0; padding: var(--s5) clamp(var(--s4), 3vw, var(--s6)); display: flex; flex-direction: column; justify-content: center; gap: var(--s3); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.du.port .hm-side { padding: var(--s3) var(--s3) var(--s4); gap: var(--s2); justify-content: flex-start; }
.hm-t { margin: 0; font: 400 clamp(34px, 5vw, 54px)/1 var(--f-disp); color: var(--plum); letter-spacing: 0.01em; }
html:not(.embed) .hm-t { display: none; }
.du.port .hm-t { font-size: 30px; }
.hm-d { margin: 0; color: var(--p-ink-2); font-size: 14.5px; max-width: 30em; }
.du.port .hm-d, .du.short .hm-d { display: none; }
.du.short .hm-t { font-size: 32px; }
.du.land.short .hm-side { padding: var(--s3) var(--s4); gap: var(--s2); }
.du.land.short .mode { padding: 6px 12px 6px 8px; }
.du.land.short .mode .mi { width: 36px; height: 36px; }
.modes { display: grid; gap: var(--s2); }
.du.port .modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mode { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: var(--s3); align-items: center; text-align: left; padding: 10px 14px 10px 10px; border-radius: var(--r3); border: 0; background: #fff; color: var(--p-ink); box-shadow: 0 1px 0 var(--p-line), 0 6px 16px -12px rgba(75, 42, 69, 0.6); white-space: normal; transition: transform 0.14s var(--ease); }
.mode:hover { transform: translateX(3px); }
.mode .mi { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.mode .mi svg { width: 24px; height: 24px; }
.mode b { font: 400 21px/1.2 var(--f-disp); letter-spacing: 0.01em; }
.mode span { font-size: 13px; color: var(--p-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-free .mi { background: var(--acc); color: #fff; }
.m-salon .mi { background: #88d4be; color: #1d4a3c; }
.m-mis .mi { background: var(--gold); color: #4a3507; }
.m-free { border-left: 5px solid var(--acc); } .m-salon { border-left: 5px solid #88d4be; } .m-mis { border-left: 5px solid var(--gold); }
.du.port .mode { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; justify-items: center; text-align: center; padding: 10px 6px; border-left: 0; border-top: 5px solid; row-gap: 2px; }
.du.port .m-free { border-top-color: var(--acc); } .du.port .m-salon { border-top-color: #88d4be; } .du.port .m-mis { border-top-color: var(--gold); }
.du.port .mode .mi { grid-row: auto; width: 38px; height: 38px; }
.du.port .mode b { font-size: 17px; white-space: nowrap; }
.du.port .mode span { white-space: normal; font-size: 12px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; }
.du.port.tiny .mode span { display: none; }
.alb { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 20px; border: 1.5px solid var(--p-line); background: var(--paper); color: var(--p-ink); font-weight: 600; font-size: 14px; }
.alb svg { width: 18px; height: 18px; }
.alb b { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--plum); color: #fff; font-size: 12px; display: inline-grid; place-items: center; }
.du.port .alb { align-self: stretch; justify-content: center; }

/* ---------------------------------------------------------------- 꾸미기 */
.vd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 47%); background: var(--paper); }
.du.port .vd { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) var(--panelH, 46%); }
.du.port.short .vd { --panelH: 50%; }
.stage { position: relative; min-height: 0; min-width: 0; overflow: hidden; background: #e9dfd1; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.stage.has-st canvas { touch-action: none; }
.stage canvas.del { cursor: no-drop; }
.tools { position: absolute; top: 6px; right: 6px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.fb { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 253, 248, 0.94); color: var(--plum); display: grid; place-items: center; padding: 0; box-shadow: 0 2px 8px -3px rgba(40, 20, 40, 0.5); transition: transform 0.1s; }
.fb svg { width: 21px; height: 21px; }
.fb:active:not(:disabled) { transform: scale(0.92); }
.fb:disabled { opacity: 0.45; }
.fb.saved { background: var(--rose); color: #fff; }
.du.narrow .fb { width: 36px; height: 36px; } .du.narrow .fb svg { width: 19px; height: 19px; }
.flash { position: absolute; inset: 0; background: #fff; z-index: 3; pointer-events: none; animation: flash 0.38s ease-out forwards; }
@keyframes flash { from { opacity: 0.9; } to { opacity: 0; } }
/* 미션 체크 카드 */
.mis { position: absolute; left: 8px; top: 8px; z-index: 2; width: min(250px, calc(100% - 64px)); background: rgba(255, 253, 248, 0.95); color: var(--p-ink); border-radius: var(--r2); box-shadow: 0 6px 18px -10px rgba(40, 20, 40, 0.7); overflow: hidden; }
.mis-h { width: 100%; display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; border: 0; background: var(--gold); color: #4a3507; text-align: left; }
.mis-h b { font: 400 17px/1.2 var(--f-disp); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mis-h span { margin-left: auto; font-size: 12.5px; font-weight: 700; }
.mis-l { list-style: none; margin: 0; padding: 6px 10px 2px; display: grid; gap: 3px; max-height: 40vh; overflow: auto; }
.mis-l li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 6px; align-items: center; font-size: 12.5px; line-height: 1.35; color: var(--p-ink-2); }
.mis-l li i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--p-ink-3); display: grid; place-items: center; }
.mis-l li i svg { width: 12px; height: 12px; }
.mis-l li.ok { color: var(--p-ink); } .mis-l li.ok i { background: var(--mint); border-color: var(--mint); color: #fff; }
.mis-l li.bn span { color: var(--p-ink-3); } .mis-l li.bn.ok span { color: var(--p-ink-2); }
.mis-go { margin: 6px 10px 10px; width: calc(100% - 20px); height: 38px; border-radius: 19px; border: 0; background: var(--p-line); color: var(--p-ink-2); font-weight: 700; font-size: 14px; }
.mis-go.ready { background: var(--acc); color: var(--acc-ink); box-shadow: 0 3px 0 var(--acc-2); animation: glow 1.2s var(--ease) infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 4px rgba(242, 193, 78, 0.8), 0 3px 0 var(--acc-2); } }
.mis.fold .mis-l, .mis.fold .mis-go:not(.ready) { display: none; }
.du.port .mis { width: min(220px, calc(100% - 60px)); }
.du.port .mis-l { max-height: 22vh; }

/* 아래 판 */
.panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--paper); color: var(--p-ink); border-left: 1px solid var(--p-line); }
.du.port .panel { border-left: 0; border-top: 1px solid var(--p-line); }
.tabs { flex: none; display: flex; gap: 2px; padding: 6px 6px 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; background: var(--paper-2); border-bottom: 1px solid var(--p-line); }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; height: 36px; padding: 0 12px; border: 0; border-radius: 10px 10px 0 0; background: transparent; color: var(--p-ink-2); font-weight: 600; font-size: 14px; }
.tab.on { background: var(--paper); color: var(--plum); box-shadow: 0 -2px 0 var(--acc) inset, 0 1px 0 var(--paper); }
.du.land:not(.narrow):not(.short) .tabs { flex-wrap: wrap; overflow: visible; row-gap: 2px; }
.sub { flex: none; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 8px; border-bottom: 1px solid var(--p-line); }
.hint { margin: 0; font-size: 12.5px; color: var(--p-ink-2); line-height: 1.4; flex: 1; min-width: 0; }
.fname { flex: none; max-width: 7.5em; font-size: 12.5px; font-weight: 700; color: var(--p-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.du.narrow .fname { display: none; }
.seg { flex: none; display: inline-flex; background: var(--paper-3); border-radius: 17px; padding: 2px; }
.sg { height: 30px; padding: 0 10px; border: 0; border-radius: 15px; background: transparent; color: var(--p-ink-2); font-size: 13px; font-weight: 600; }
.sg.on { background: #fff; color: var(--plum); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.chips { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; padding: 2px 2px 4px; touch-action: pan-x; }
.cp { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.cp.sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: var(--sw); box-shadow: 0 0 0 1.5px var(--p-line); padding: 0; }
.cp.sw.on { box-shadow: 0 0 0 2.5px var(--plum); transform: scale(1.06); }
.cp.tx { height: 32px; padding: 0 12px; border-radius: 16px; border: 1.5px solid var(--p-line); background: #fff; color: var(--p-ink); font-size: 13px; font-weight: 600; }
.cp.tx.on { border-color: var(--plum); background: var(--plum); color: #fff; }
.cp.tx svg { width: 16px; height: 16px; }
.cp.off { flex: none; color: var(--bad); border-color: color-mix(in oklab, var(--bad) 35%, var(--p-line)); }
.sep { flex: none; width: 1px; height: 24px; background: var(--p-line); }
.grid { flex: 1; min-height: 0; display: grid; gap: 6px; padding: 8px; align-content: start; overscroll-behavior: contain; scrollbar-width: thin; --tile: 88px; }
.du.port .grid { grid-auto-flow: column; grid-template-rows: repeat(var(--rows, 2), var(--tile)); grid-auto-columns: max-content; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; align-content: center; }
.du.land .grid { grid-template-columns: repeat(auto-fill, minmax(var(--tile), 1fr)); overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; touch-action: pan-y; }
.it { position: relative; display: flex; flex-direction: column; align-items: stretch; padding: 4px 4px 3px; border-radius: var(--r2); border: 1.5px solid var(--p-line); background: #fff; color: var(--p-ink); min-width: 0; white-space: normal; transition: transform 0.12s var(--ease), border-color 0.12s; touch-action: inherit; }
.du.port .it { width: var(--tile); height: var(--tile); }
.du.land .it { aspect-ratio: 1 / 1.06; }
.it canvas { flex: 1; min-height: 0; width: 100%; border-radius: 8px; background: var(--paper); pointer-events: none; }
.it .nm { flex: none; font-size: 12px; line-height: 16px; height: 16px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-top: 1px; }
.it:hover { border-color: var(--p-ink-3); }
.it.on { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc) inset; }
.it .ck { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--acc); color: #fff; display: grid; place-items: center; }
.it .ck svg { width: 13px; height: 13px; }
.gh { font-size: 12px; font-weight: 700; color: var(--p-ink-2); }
.du.land .gh { grid-column: 1 / -1; padding: 6px 2px 0; }
.du.port .gh { grid-row: 1 / -1; writing-mode: vertical-rl; text-orientation: upright; letter-spacing: 0.08em; display: grid; place-items: center; width: 22px; border-radius: 11px; background: var(--paper-2); }
.ghost { position: fixed; left: 0; top: 0; z-index: 50; width: 80px; height: 80px; border-radius: 14px; background: rgba(255, 253, 248, 0.9); box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.45); pointer-events: none; }
.ghost canvas { width: 100%; height: 100%; }

/* ---------------------------------------------------------------- 미용실 */
.vs { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; background: #efe6dc; }
.s-hud { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: var(--paper); color: var(--p-ink); border-bottom: 1px solid var(--p-line); min-width: 0; }
.order { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border-radius: 14px; border: 1.5px solid var(--p-line); background: #fff; color: var(--p-ink); text-align: left; white-space: normal; }
.order canvas { width: 48px; height: 48px; border-radius: 10px; flex: none; }
.o-t { display: flex; flex-wrap: wrap; gap: 3px 4px; min-width: 0; }
.o-t b, .bw b { font-size: 12.5px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: var(--paper-2); white-space: nowrap; }
.s-info { flex: none; display: flex; align-items: center; gap: 8px; }
.s-n { font-size: 13px; font-weight: 700; white-space: nowrap; }
.s-time i { display: block; position: relative; width: 70px; height: 10px; border-radius: 5px; background: var(--paper-3); overflow: hidden; }
.s-time u { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: var(--mint); border-radius: 5px; }
.s-time.low u { background: var(--bad); }
.s-st { display: inline-flex; align-items: center; gap: 3px; color: #c9930f; font-size: 14px; }
.s-st svg { width: 17px; height: 17px; }
.du.narrow .s-info { flex-direction: column; align-items: flex-end; gap: 3px; }
.du.narrow .s-time i { width: 60px; }
.s-stage { position: relative; min-height: 0; overflow: hidden; }
.s-stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: none; }
.bubble { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 3; width: min(300px, calc(100% - 24px)); padding: 10px 12px 8px; border-radius: 18px; background: #fffdf8; color: var(--p-ink); box-shadow: 0 10px 26px -12px rgba(40, 20, 40, 0.7); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; animation: pop 0.35s var(--ease); }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -10px; margin-left: -10px; border: 10px solid transparent; border-bottom: 0; border-top-color: #fffdf8; }
@keyframes pop { from { transform: translateX(-50%) scale(0.85); opacity: 0; } }
.bq { margin: 0; font-weight: 700; font-size: 14px; line-height: 1.4; }
.bubble canvas { border-radius: 12px; background: var(--paper); }
.bw { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.bw b.ok { background: #d6efdd; color: #1f6b3b; } .bw b.mid { background: #fbecc4; color: #7a5a06; } .bw b.no { background: #f8d6d2; color: #8a2a20; }
.bh { font-size: 12px; color: var(--p-ink-3); }
.bubble.react { top: auto; bottom: 12px; }
.bubble.react::after { display: none; }
.du.short .bubble canvas { display: none; }
.s-ctx { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 48px; padding: 6px 8px; background: var(--paper); color: var(--p-ink); border-top: 1px solid var(--p-line); }
.s-ctx .chips { flex: 1; }
.cp.un { margin-left: auto; flex: none; }
.cp.un svg { width: 16px; height: 16px; }
.du.narrow .cp.un span { display: none; } .du.narrow .cp.un { width: 40px; padding: 0; }
.s-dock { display: flex; align-items: center; gap: 4px; height: 62px; padding: 0 6px; background: var(--plum); }
.du.short .s-dock { height: 54px; }
.db { flex: 1 1 0; min-width: 44px; height: 50px; border-radius: var(--r2); border: 1px solid var(--plum-line); background: var(--plum-2); color: var(--d-ink); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 12px; font-weight: 600; padding: 0 2px; }
.db svg { width: 21px; height: 21px; flex: none; }
.db.on { background: var(--d-ink); color: var(--plum); border-color: var(--d-ink); }
.du.short .db { height: 44px; }
.fin { flex: 0 0 auto; min-width: 76px; height: 50px; padding: 0 12px; border-radius: 25px; border: 0; background: var(--acc); color: var(--acc-ink); display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 15px; font-weight: 700; box-shadow: 0 3px 0 var(--acc-2); }
.fin svg { width: 19px; height: 19px; }
.fin:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--acc-2); }
.du.short .fin { height: 44px; }
.du.tiny .fin span { display: none; } .du.tiny .fin { min-width: 50px; }
.ruler { display: none; }
/* 가로 화면: 도구를 오른쪽 세로 줄로 */
.du.land .vs { grid-template-columns: minmax(0, 1fr) 92px; grid-template-rows: auto minmax(0, 1fr) auto; }
.du.land .s-hud { grid-column: 1; grid-row: 1; }
.du.land .s-stage { grid-column: 1; grid-row: 2; }
.du.land .s-ctx { grid-column: 1; grid-row: 3; }
.du.land .s-dock { grid-column: 2; grid-row: 1 / span 3; flex-direction: column; height: auto; padding: 6px; gap: 6px; }
.du.land .db { flex: 1 1 0; width: 100%; min-height: 36px; max-height: 66px; height: auto; }
.du.land .fin { width: 100%; min-width: 0; flex: none; height: 50px; padding: 0 4px; font-size: 14px; }
.du.land.short .db { min-height: 32px; } .du.land.short .db svg { width: 19px; height: 19px; }
.du.land.short .order canvas { width: 40px; height: 40px; }
.du.land.short .s-hud { padding: 4px 8px; }

/* ---------------------------------------------------------------- 창 */
.modal { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: var(--s3); background: rgba(35, 18, 32, 0.55); opacity: 0; transition: opacity 0.2s; }
.modal.on { opacity: 1; }
.card { position: relative; width: min(500px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; background: var(--paper); color: var(--p-ink); border-radius: var(--r3); padding: var(--s4) var(--s5) var(--s4); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8); transform: translateY(10px) scale(0.98); transition: transform 0.3s var(--ease); -webkit-user-select: text; user-select: text; }
.card.wide { width: min(760px, 100%); }
.modal.on .card { transform: none; }
.du.narrow .card { padding: var(--s3) var(--s4); }
.card h3 { margin: 0 0 6px; font: 400 25px/1.25 var(--f-disp); padding-right: 40px; color: var(--plum); letter-spacing: 0.01em; }
.card h3 small { font: 600 13px/1 var(--f-body); color: var(--p-ink-2); margin-left: 6px; }
.card .x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--paper-2); display: grid; place-items: center; padding: 0; z-index: 1; }
.card .x svg { width: 18px; height: 18px; }
.kick { margin: 0 0 4px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--acc-2); }
.kick svg { width: 16px; height: 16px; }
.lead { margin: 0 0 var(--s3); font-size: 15px; line-height: 1.6; }
.note { margin: var(--s3) 0 0; font-size: 13px; color: var(--p-ink-2); line-height: 1.55; }
.cond { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cond li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r2); background: #fff; border: 1px solid var(--p-line); font-size: 14.5px; }
.cond li.rq { border-left: 4px solid var(--acc); }
.cond li.bn { border-left: 4px solid var(--gold); color: var(--p-ink-2); }
.cond li b { font-size: 12px; padding: 0 7px; border-radius: 9px; background: var(--gold); color: #4a3507; line-height: 20px; }
.how { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: 6px; }
.how li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 14px; line-height: 1.5; }
.how li i { width: 34px; height: 34px; border-radius: 50%; background: var(--paper-2); color: var(--plum); display: grid; place-items: center; }
.how li i svg { width: 19px; height: 19px; }
.unl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: var(--s2) 0; padding: 8px 10px; border-radius: var(--r2); background: #fff6dc; font-size: 13.5px; }
.unl b { color: #7a5a06; margin-right: 4px; }
.unl span { padding: 1px 9px; border-radius: 10px; background: #fff; border: 1px solid #f0dca0; font-weight: 600; }
.mb { display: flex; gap: var(--s2); margin-top: var(--s4); flex-wrap: wrap; }
.btn { height: 42px; padding: 0 16px; border-radius: 21px; border: 1.5px solid var(--p-line); background: #fff; color: var(--p-ink); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.pri { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); box-shadow: 0 3px 0 var(--acc-2); }
.btn:hover { border-color: var(--p-ink-3); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.icon { width: 34px; padding: 0; }
.btn.sure { background: var(--bad); border-color: var(--bad); color: #fff; }
.ph { margin: var(--s2) 0 0; display: flex; justify-content: center; }
.ph img { display: block; max-width: 100%; max-height: min(52vh, 420px); border-radius: var(--r2); box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.5); }
.du.short .ph img { max-height: 34vh; }
.empty { margin: var(--s3) 0 0; color: var(--p-ink-2); }
.al { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: var(--s2); }
.al li { display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: var(--r2); background: #fff; border: 1px solid var(--p-line); }
.al canvas { width: 100%; aspect-ratio: 3 / 4; border-radius: 8px; background: var(--paper-2); }
.al-d { font-size: 12px; color: var(--p-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-b { display: flex; gap: 4px; }
.al-b .btn.pri { flex: 1; min-width: 0; }
.mlist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s3); }
.done { text-align: center; }
.done h3 { padding: 0 30px; }
.big-st { margin: var(--s2) 0; }
.st { display: inline-flex; gap: 1px; color: var(--p-line); }
.st i { display: inline-flex; width: 16px; height: 16px; }
.st i svg { width: 100%; height: 100%; }
.st i.on { color: var(--gold); }
.st.big { gap: 6px; }
.st.big i { width: 44px; height: 44px; animation: starIn 0.5s var(--ease) both; }
.st.big i:nth-child(2) { animation-delay: 0.12s; } .st.big i:nth-child(3) { animation-delay: 0.24s; }
.bubble .st.big i { width: 32px; height: 32px; }
@keyframes starIn { from { transform: scale(0.3) rotate(-30deg); opacity: 0; } }
.done .mb { justify-content: center; }
.dayst { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; margin: var(--s2) 0; }
.dayst > span { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; color: var(--p-ink-2); }
.dayst small { font-size: 12px; }
.toast { position: absolute; top: 58px; left: 50%; z-index: 30; transform: translate(-50%, -8px); max-width: calc(100% - 24px); padding: 8px 16px; border-radius: 18px; background: rgba(40, 22, 36, 0.94); color: #fff; font-size: 13.5px; font-weight: 600; text-align: center; white-space: normal; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.25s var(--ease); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- 소개 글 */
.about { max-width: 1240px; margin: 0 auto; padding: var(--s7) clamp(var(--s4), 4vw, var(--s7)) var(--s6); display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(220px, 0.8fr); gap: var(--s7); }
.about-main { min-width: 0; }
.about h2 { margin: var(--s6) 0 var(--s2); font: 400 28px/1.3 var(--f-disp); color: var(--plum); letter-spacing: 0.01em; }
.about h2:first-child { margin-top: 0; }
.about h3 { margin: var(--s4) 0 var(--s1); font-size: 17px; font-weight: 700; }
.about p, .about li { font-size: 16px; color: var(--page-ink); }
.about p { margin: 0 0 var(--s3); }
.about ul, .about ol { margin: 0 0 var(--s3); padding-left: 1.3em; }
.about li { margin-bottom: 6px; }
.about strong { font-weight: 600; }
.about dl { margin: 0; }
.about dt { margin-top: var(--s4); font-weight: 600; }
.about dd { margin: 4px 0 0; color: var(--page-2); }
.about-side { min-width: 0; font-size: 14px; color: var(--page-2); }
.about-side h3 { margin: 0 0 var(--s2); font: 400 22px/1.3 var(--f-disp); color: var(--plum); }
.keytab { width: 100%; border-collapse: collapse; margin-bottom: var(--s5); font-size: 14px; }
.keytab th { text-align: left; font-weight: 500; padding: 6px var(--s2) 6px 0; color: var(--page-2); width: 50%; }
.keytab td { padding: 6px 0; font-weight: 600; color: var(--page-ink); }
.keytab tr + tr th, .keytab tr + tr td { border-top: 1px solid var(--page-line); }
.more { margin-top: var(--s5); font-size: 14px; color: var(--page-2); line-height: 1.9; }
.more a { white-space: nowrap; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; padding-top: var(--s6); gap: var(--s5); } }
.foot { border-top: 1px solid var(--page-line); padding: var(--s5) clamp(var(--s4), 4vw, var(--s7)) var(--s6); font-size: 13px; color: var(--page-2); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); max-width: 1240px; margin: 0 auto; }
.foot a { color: var(--page-2); white-space: nowrap; }
.foot p { flex-basis: 100%; margin: var(--s2) 0 0; }

@media (prefers-reduced-motion: reduce) {
  .du *, .du *::before, .du *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
