/* 룩북 미 — 부티크 스튜디오 느낌 (파스텔 블러시 · 라벤더 · 골드) */
:root { color-scheme: only light;
  --bg: #fbf1ef; --bg2: #f6e4e6; --card: #fffaf8; --ink: #2f2437; --ink2: #5b4c63; --muted: #8f8095; --line: #eddadd; --line2: #e2c9cf;
  --rose: #e9a3b4; --rose2: #d4788f; --rose3: #b95b74; --lav: #cbbfe9; --lav2: #9d8cc9; --mint: #bfe4d7; --gold: #c99a4e; --gold2: #ecd3a0;
  --shadow: 0 6px 22px rgba(90, 50, 80, .12), 0 1px 3px rgba(90, 50, 80, .08);
  --shadowS: 0 2px 8px rgba(90, 50, 80, .10);
  --r: 18px; --tap: 44px;
  --sans: "Pretendard", "Pretendard Variable", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Didot", "Bodoni 72", "Playfair Display", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
svg { display: block; }
#app { position: fixed; inset: 0; overflow: hidden; }
.scr { position: absolute; inset: 0; display: none; opacity: 0; transition: opacity .28s ease; }
.scr.on { display: flex; }
.scr.show { opacity: 1; }
.grow { flex: 1; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--line2);
  background: var(--card); color: var(--ink); font-weight: 650; letter-spacing: -.01em; box-shadow: var(--shadowS); transition: transform .12s, box-shadow .18s, background-color .18s, border-color .18s; word-break: keep-all; }
.btn:hover { border-color: var(--rose); background: #fff; }
.btn:active { transform: translateY(1px) scale(.985); box-shadow: none; }
.btn:focus-visible, .icon:focus-visible, .tool:focus-visible, .tile:focus-visible, .tab:focus-visible, .sw:focus-visible, .chip:focus-visible, .pill:focus-visible { outline: 3px solid var(--lav2); outline-offset: 2px; }
.btn.pri { background: linear-gradient(180deg, #e7899f, #d36f88); border-color: #c4637c; color: #fff; text-shadow: 0 1px 0 rgba(120, 30, 60, .25); box-shadow: 0 6px 16px rgba(211, 111, 136, .35); }
.btn.pri:hover { background: linear-gradient(180deg, #ec93a8, #d9768e); }
.btn.big { min-height: 54px; padding: 12px 30px; font-size: 17px; }
.btn.small { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--ink2); }
.btn.ghost:hover { background: rgba(255, 255, 255, .6); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon { width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--ink2); transition: background-color .15s; flex: none; }
.icon:hover { background: rgba(233, 163, 180, .18); }
.icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== 시작 화면 ===== */
#scrTitle { align-items: center; justify-content: center; background: radial-gradient(120% 80% at 50% 0%, #fff7f3 0%, #fbeaec 55%, #f3dfe8 100%); }
.titleDeco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.arch { position: absolute; border-radius: 999px 999px 0 0; }
.arch.a1 { width: min(78vw, 520px); height: 86vh; left: 50%; bottom: -6vh; transform: translateX(-50%); background: linear-gradient(180deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .25)); border: 2px solid rgba(201, 154, 78, .25); }
.arch.a2 { width: min(62vw, 400px); height: 72vh; left: 50%; bottom: -6vh; transform: translateX(-50%); border: 1.5px dashed rgba(201, 154, 78, .25); }
.spark { position: absolute; width: 14px; height: 14px; background: var(--gold2); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: tw 3.2s ease-in-out infinite; }
.spark.s1 { left: 18%; top: 22%; } .spark.s2 { right: 16%; top: 34%; width: 10px; height: 10px; animation-delay: 1.1s; } .spark.s3 { left: 24%; bottom: 20%; width: 9px; height: 9px; animation-delay: 2s; }
@keyframes tw { 0%, 100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.1); } }
.langBtn { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 14px; min-height: var(--tap); padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line2); background: rgba(255, 255, 255, .7); font-weight: 600; color: var(--ink2); z-index: 2; }
.langBtn:hover { background: #fff; }
.titleCol { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 20px; width: min(440px, 100%); }
.logo { line-height: 1; margin-bottom: 4px; }
.logoKo { font-size: clamp(40px, 11vw, 58px); font-weight: 800; letter-spacing: -.04em; color: var(--ink); }
.logoEn { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 5.4vw, 26px); color: var(--rose3); margin-top: 6px; letter-spacing: .02em; }
html[lang=en] .logoKo { font-family: var(--serif); font-style: italic; font-weight: 700; letter-spacing: -.01em; }
html[lang=en] .logoEn { font-family: var(--sans); font-style: normal; font-size: 15px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.titleMiro { width: min(200px, 44vw); height: min(250px, 30vh); margin: 14px 0 6px; animation: bob 4s ease-in-out infinite; }
.titleMiro svg { width: 100%; height: 100%; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.tagline { margin: 6px 0 22px; color: var(--ink2); font-size: 16px; word-break: keep-all; }
.menu { display: flex; flex-direction: column; gap: 12px; width: min(300px, 100%); }
.menu .btn { width: 100%; flex-direction: column; gap: 0; }
.menu .btn small { font-size: 12.5px; font-weight: 500; opacity: .9; }
.fine { color: var(--muted); font-size: 12.5px; margin: 18px 0 0; word-break: keep-all; }

/* ===== 공용 상단 막대 ===== */
.bar { display: flex; align-items: center; gap: 8px; height: 60px; padding: 0 10px; padding-top: env(safe-area-inset-top); flex: none; background: rgba(255, 250, 248, .86); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); position: relative; z-index: 5; }
.bar.plain { background: transparent; border: 0; backdrop-filter: none; }

/* ===== 인트로 ===== */
#scrIntro { flex-direction: column; background: radial-gradient(110% 70% at 50% 30%, #fff8f3, #f6e2e7 70%, #ecdcee); }
.introBody { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 0 20px 28px; }
.introMiro { width: min(230px, 52vw); height: min(300px, 38vh); }
.introMiro svg { width: 100%; height: 100%; }
.bubble { position: relative; background: #fff; border-radius: 22px; padding: 14px 18px; box-shadow: var(--shadow); border: 1.5px solid var(--line); }
.bubble.big { width: min(520px, 100%); min-height: 128px; }
.bubble.big::before { content: ""; position: absolute; top: -10px; left: 50%; width: 20px; height: 20px; background: #fff; border-left: 1.5px solid var(--line); border-top: 1.5px solid var(--line); transform: translateX(-50%) rotate(45deg); }
.bubble .who { font-size: 12.5px; font-weight: 800; color: var(--rose3); letter-spacing: .05em; margin-bottom: 4px; }
.bubble p { margin: 0; font-size: 17px; line-height: 1.6; word-break: keep-all; min-height: 3.2em; }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line2); transition: background-color .2s, width .2s; }
.dots i.on { background: var(--rose2); width: 18px; border-radius: 4px; }

/* ===== 스튜디오 ===== */
#scrStudio { flex-direction: column; background: var(--bg); }
.modeSeg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); }
.modeSeg button { min-height: 38px; min-width: 64px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; color: var(--muted); transition: background-color .2s, color .2s, box-shadow .2s; }
.modeSeg button[aria-selected=true] { background: #fff; color: var(--ink); box-shadow: var(--shadowS); }
.btn.shot { min-height: var(--tap); padding: 8px 18px; }
.stageWrap { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.stageBg { position: absolute; inset: 0; background: linear-gradient(180deg, #fdf3f0 0%, #f8e6e8 68%, #f1d9df 100%); }
.sArch { position: absolute; left: 50%; bottom: 14%; width: min(66%, 420px); height: 82%; transform: translateX(-50%); border-radius: 999px 999px 0 0; background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .35)); border: 2px solid rgba(201, 154, 78, .22); }
.sFloor { position: absolute; left: 0; right: 0; bottom: 0; height: 14%; background: linear-gradient(180deg, #ecd0d6, #e6c6ce); border-top: 1px solid rgba(201, 154, 78, .2); }
#stage { position: absolute; inset: 0; }
#stage svg { width: 100%; height: 100%; }
.rail { position: absolute; right: 8px; top: 10px; display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.tool { width: 58px; min-height: 58px; padding: 7px 2px 5px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .88); display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink2); box-shadow: var(--shadowS); transition: background-color .15s, transform .12s, opacity .2s; }
.tool:hover { background: #fff; }
.tool:active { transform: scale(.96); }
.tool:disabled { opacity: .4; cursor: default; }
.tool svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tool span { font-size: 10.5px; font-weight: 600; line-height: 1.15; text-align: center; word-break: keep-all; }
.stageBottom { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; z-index: 3; pointer-events: none; }
.pill { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 8px 18px; border-radius: 999px; border: 1.5px solid #fff; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow); font-weight: 700; color: var(--ink); transition: transform .12s, background-color .15s; }
.pill:hover { background: #fff; }
.pill:active { transform: scale(.97); }
.pill svg { width: 22px; height: 22px; fill: none; stroke: var(--rose2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pill svg .f { fill: var(--rose2); stroke: none; }
.pill.soon { color: var(--muted); cursor: default; background: rgba(255, 255, 255, .75); }
.pill.soon svg { stroke: var(--muted); }
.pill em { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--lav); color: #4b3d73; }
#scrStudio[data-mode=me] #bRandom, #scrStudio[data-mode=wear] #bSelfie { display: none; }
.miroTip { position: absolute; left: 10px; bottom: 70px; max-width: min(300px, calc(100% - 90px)); display: flex; align-items: flex-start; gap: 6px; z-index: 4; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; pointer-events: none; }
.miroTip.on { opacity: 1; transform: none; }
.miroMini { width: 38px; height: 48px; flex: none; }
.miroMini svg { width: 100%; height: 100%; }
.tipText { background: #fff; border-radius: 16px 16px 16px 4px; align-self: flex-end; padding: 8px 12px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); border: 1px solid var(--line); word-break: keep-all; line-height: 1.45; }

/* 서랍 (세로: 아래, 가로: 양옆) */
.drawer { flex: none; height: 47%; display: flex; flex-direction: column; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(90, 50, 80, .06); border-radius: 22px 22px 0 0; margin-top: -14px; position: relative; z-index: 4; padding-bottom: env(safe-area-inset-bottom); }
.paneSeg { display: flex; gap: 4px; margin: 10px 12px 0; padding: 4px; border-radius: 14px; background: var(--bg2); flex: none; }
.paneSeg button { flex: 1; min-height: 38px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; color: var(--muted); font-size: 14px; transition: background-color .2s, color .2s; }
.paneSeg button[aria-selected=true] { background: #fff; color: var(--ink); box-shadow: var(--shadowS); }
.paneSeg button:disabled { opacity: .45; cursor: default; }
.panelL, .panelR { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.drawer[data-pane=items] .panelR, .drawer[data-pane=color] .panelL { display: none; }
.tabs { display: flex; gap: 6px; padding: 10px 12px 8px; overflow-x: auto; flex: none; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 650; color: var(--ink2); font-size: 14px; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s; }
.tab:hover { border-color: var(--rose); }
.tab[aria-selected=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.grid { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 12px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; align-content: start; overscroll-behavior: contain; }
.tile { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px 6px 8px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; transition: border-color .15s, box-shadow .15s, transform .12s; min-width: 0; }
.tile:hover { border-color: var(--rose); }
.tile:active { transform: scale(.97); }
.tile[aria-pressed=true] { border-color: var(--rose2); box-shadow: 0 0 0 3px rgba(212, 120, 143, .22); }
.tile[aria-pressed=true]::after { content: ""; position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--rose2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.thumb { aspect-ratio: 1; border-radius: 12px; background: linear-gradient(180deg, #fdf6f4, #f6e8ea); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.thumb svg { width: 100%; height: 100%; }
.thumb.none svg { width: 44%; height: 44%; fill: none; stroke: var(--line2); stroke-width: 2; stroke-linecap: round; }
.tile .nm { font-size: 12.5px; font-weight: 600; text-align: center; color: var(--ink2); line-height: 1.25; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all; }
.swTile .thumb { border-radius: 50%; margin: 6px; box-shadow: inset 0 -6px 12px rgba(0, 0, 0, .12), inset 0 4px 8px rgba(255, 255, 255, .5); }

/* 색 패널 */
#colorPanel { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px 18px; overscroll-behavior: contain; }
.field { margin-bottom: 16px; }
.lbl { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 750; color: var(--ink2); margin-bottom: 8px; letter-spacing: .01em; }
.lbl .cur { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(0, 0, 0, .12); }
.lbl .val { margin-left: auto; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.panelTitle { font-size: 16px; font-weight: 800; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.panelTitle small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sws { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; }
.sw { width: 44px; height: 44px; border: 0; padding: 5px; background: transparent; border-radius: 50%; justify-self: center; }
.sw i { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .1), inset 0 -4px 6px rgba(0, 0, 0, .1); transition: transform .12s; }
.sw:hover i { transform: scale(1.08); }
.sw[aria-pressed=true] i { box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px var(--ink); }
.sw.custom { position: relative; }
.sw.custom i { background: conic-gradient(#ff7a7a, #ffd36e, #9be59b, #7ad7ff, #a78bff, #ff7ad9, #ff7a7a); }
.sw.custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 4px 14px 4px 6px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 650; font-size: 13.5px; color: var(--ink2); transition: border-color .15s, background-color .15s; }
.chip.noico { padding: 4px 14px; }
.chip:hover { border-color: var(--rose); }
.chip[aria-pressed=true] { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip .pv { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex: none; border: 1px solid rgba(0, 0, 0, .08); }
.chip .pv svg { width: 100%; height: 100%; }
.slider { margin-bottom: 14px; }
.slider input[type=range] { width: 100%; height: var(--tap); margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.slider input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--lav), var(--rose)); }
.slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: #fff; border: 2px solid var(--rose2); box-shadow: var(--shadowS); }
.slider input[type=range]::-moz-range-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--lav), var(--rose)); }
.slider input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid var(--rose2); }
.hint { font-size: 13.5px; color: var(--muted); line-height: 1.55; word-break: keep-all; background: var(--bg); border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; }
.hint b { color: var(--ink2); }

/* 모달 */
.modal { position: fixed; inset: 0; z-index: 20; display: none; align-items: flex-end; justify-content: center; background: rgba(47, 36, 55, .38); backdrop-filter: blur(3px); opacity: 0; transition: opacity .22s; }
.modal.on { display: flex; }
.modal.show { opacity: 1; }
.sheet { width: min(760px, 100%); max-height: 92%; display: flex; flex-direction: column; background: var(--card); border-radius: 24px 24px 0 0; box-shadow: var(--shadow); transform: translateY(24px); transition: transform .25s ease; padding-bottom: env(safe-area-inset-bottom); }
.modal.show .sheet { transform: none; }
.sheet.small { width: min(400px, calc(100% - 32px)); border-radius: 22px; padding: 22px; margin-bottom: auto; margin-top: auto; }
.sheet.small p { margin: 0 0 18px; font-size: 16px; line-height: 1.55; word-break: keep-all; }
.sheet .row { display: flex; gap: 10px; justify-content: flex-end; }
.sheetHead { display: flex; align-items: center; gap: 8px; padding: 12px 10px 8px 20px; border-bottom: 1px solid var(--line); flex: none; }
.sheetHead h2 { margin: 0; font-size: 18px; font-weight: 800; }
.sheetHead .count { color: var(--muted); font-weight: 600; font-size: 14px; margin-right: auto; }
.sheetHead .icon { margin-left: auto; }
.outGrid { overflow-y: auto; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.outCard { border-radius: 18px; border: 1.5px solid var(--line); background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.outCard .thumb { aspect-ratio: 3/4; border-radius: 0; }
.outCard .row { display: flex; gap: 0; border-top: 1px solid var(--line); }
.outCard .row button { flex: 1; min-height: var(--tap); border: 0; background: transparent; font-weight: 700; font-size: 13.5px; color: var(--ink2); }
.outCard .row button:first-child { color: var(--rose3); border-right: 1px solid var(--line); }
.outCard .row button:hover { background: var(--bg); }
.outEmpty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 30px 10px; word-break: keep-all; }
.photoSheet { width: min(860px, 100%); }
.photoBody { display: flex; flex-direction: column; gap: 14px; padding: 14px 18px 18px; overflow-y: auto; }
.photoPrev { position: relative; align-self: center; height: min(52vh, 560px); aspect-ratio: 9/16; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: #f6e4e6; }
.photoPrev img { width: 100%; height: 100%; display: block; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.photoSide { display: flex; flex-direction: column; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--rose2); }
.photoMsg { margin: 0; min-height: 1.4em; color: var(--rose3); font-weight: 650; word-break: keep-all; }
.photoSide .fine { margin: 0; }
.bgDot { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .08); flex: none; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 650; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 40; max-width: calc(100% - 32px); text-align: center; word-break: keep-all; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ===== 가로(PC) 배치 ===== */
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .bar { height: 64px; padding: 0 16px; }
  #scrStudio { display: none; }
  #scrStudio.on { display: grid; grid-template-columns: minmax(320px, 400px) 1fr minmax(290px, 340px); grid-template-rows: 64px minmax(0, 1fr); }
  #scrStudio .bar { grid-column: 1 / -1; }
  .stageWrap { grid-column: 2; grid-row: 2; }
  .drawer { display: contents; }
  .paneSeg { display: none; }
  .panelL, .panelR { grid-row: 2; background: var(--card); min-height: 0; }
  .panelL { grid-column: 1; border-right: 1px solid var(--line); display: flex !important; }
  .panelR { grid-column: 3; border-left: 1px solid var(--line); display: flex !important; }
  .tabs { flex-wrap: wrap; padding: 16px 16px 10px; }
  .grid { padding: 6px 16px 20px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  #colorPanel { padding: 18px 18px 24px; }
  .modal { align-items: center; }
  .sheet { border-radius: 24px; max-height: 88%; }
  .photoBody { flex-direction: row; align-items: stretch; }
  .photoPrev { height: min(70vh, 640px); }
  .photoSide { flex: 1; justify-content: center; }
}
@media (max-height: 640px) and (max-aspect-ratio: 1/1) { .drawer { height: 50%; } .tool { width: 52px; min-height: 52px; } .tool span { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ===== 2주차: 포토 스튜디오 · 셀카 ===== */
.photoSheet { width: min(980px, 100%); }
.photoBody { min-height: 0; }
.photoPrevWrap { display: flex; justify-content: center; align-items: center; flex: none; }
.photoPrev { height: min(44vh, 560px); width: auto; max-width: 100%; }
.photoPrev img { object-fit: contain; }
.busy { position: absolute; inset: 0; background: rgba(255, 250, 248, .35); opacity: 0; transition: opacity .2s; pointer-events: none; }
.busy.on { opacity: 1; }
.photoSide .field { margin-bottom: 4px; }
.photoSide .chips { gap: 6px; }
.photoSide .chip { font-size: 13.5px; }
.photoActions { display: flex; flex-wrap: wrap; gap: 8px; }
.photoActions .btn.big { flex: 1 1 180px; }
.photoActions #bTags { flex: 1 1 100%; }
.photoActions [hidden] { display: none !important; }
#mSelfie.busy .selfieActions { opacity: .5; pointer-events: none; }
.selfieSheet { width: min(560px, 100%); }
.selfieBody { padding: 14px 18px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.privacy { display: flex; gap: 10px; align-items: flex-start; background: #eef7f2; border: 1px solid #cfe8dc; border-radius: 14px; padding: 12px 14px; }
.privacy svg { width: 22px; height: 22px; flex: none; fill: none; stroke: #3b7a5e; stroke-width: 2; stroke-linecap: round; margin-top: 1px; }
.privacy p { margin: 0; font-size: 14px; line-height: 1.55; color: #2f5a45; font-weight: 600; word-break: keep-all; }
.camBox { position: relative; display: none; border-radius: 18px; overflow: hidden; background: #2f2437; aspect-ratio: 3 / 4; max-height: 46vh; align-self: center; width: auto; height: 46vh; }
.camBox.on { display: block; }
.camBox video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.camGuide { position: absolute; left: 50%; top: 46%; width: 56%; height: 58%; transform: translate(-50%, -50%); border: 3px dashed rgba(255, 255, 255, .75); border-radius: 50% 50% 46% 46%; }
.selfieMsg { margin: 0; min-height: 1.5em; font-weight: 650; color: var(--rose3); word-break: keep-all; }
.selfieResult ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.selfieResult li { display: flex; justify-content: space-between; gap: 8px; background: var(--bg); border-radius: 10px; padding: 8px 10px; font-size: 13.5px; }
.selfieResult li b { color: var(--muted); font-weight: 650; }
.sel3 { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.sel3 span { display: inline-flex; align-items: center; gap: 6px; }
.sel3 i { width: 20px; height: 20px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .12); }
.selfieActions { display: flex; flex-wrap: wrap; gap: 8px; }
.selfieActions .btn { flex: 1 1 200px; }
.selfieActions [hidden] { display: none !important; }
.fileBtn { position: relative; cursor: pointer; }
.fileBtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.btn svg .f { fill: currentColor; stroke: none; }
.pill em { background: #d9f0e6; color: #2f5a45; }
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .stageBottom { justify-content: flex-start; left: 16px; right: auto; bottom: 16px; }
  .photoPrev { height: min(78vh, 720px); }
  .photoSide { overflow-y: auto; max-height: min(78vh, 720px); padding-right: 4px; justify-content: flex-start; }
  .photoBody { overflow: hidden; }
}

/* ===== 3주차: 모드 카드 · 이야기 · 의뢰 · 테마 · 심사 · 끝 화면 · 잠금 · 음소거 ===== */
.titleMute { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 14px; z-index: 2; }
.titleMute .icon { background: rgba(255, 255, 255, .7); border: 1.5px solid var(--line2); }
.muteBtn .off { display: none; }
.muteBtn.muted .on { display: none; }
.muteBtn.muted .off { display: inline; }
.muteBtn.muted { color: var(--muted); }
.modeGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.modeCard { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 96px; padding: 10px 6px 9px; border-radius: 18px; border: 1.5px solid var(--line2); background: rgba(255, 255, 255, .88); box-shadow: var(--shadowS); color: var(--ink); transition: transform .12s, border-color .15s, background-color .15s; }
.modeCard:hover { border-color: var(--rose); background: #fff; }
.modeCard:active { transform: scale(.97); }
.modeCard svg { width: 28px; height: 28px; fill: none; stroke: var(--rose2); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.modeCard svg .f { fill: var(--rose2); stroke: none; }
.modeCard b { font-size: 15px; font-weight: 800; word-break: keep-all; }
.modeCard small { font-size: 11.5px; color: var(--muted); font-weight: 600; line-height: 1.3; text-align: center; word-break: keep-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu { width: min(380px, 100%); }
.starLine { text-align: center; font-weight: 700; color: #b9893a; min-height: 1.2em; font-size: 14px; }
.barTitle { font-weight: 800; font-size: 17px; }
#scrStory, #scrBoard { flex-direction: column; background: radial-gradient(110% 70% at 50% 20%, #fff8f3, #f6e2e7 70%, #ecdcee); }
.storyBody { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 0 18px 24px; }
.storyArt { width: min(640px, 100%); aspect-ratio: 400 / 260; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); border: 3px solid #fff; flex: none; max-height: 44vh; }
.storyArt svg { width: 100%; height: 100%; display: block; }
.storyBubble { width: min(640px, 100%); cursor: pointer; }
.storyBubble[data-who=grey] .who { color: #6e7179; }
.storyBubble[data-who=grandma] p { font-family: var(--serif); font-style: italic; }
html[lang=ko] .storyBubble[data-who=grandma] p { font-family: "Gungsuh", "궁서", "Batang", var(--serif); font-style: normal; }
.boardBody { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 24px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.boardIntro { margin: 0; color: var(--ink2); font-weight: 600; text-align: center; word-break: keep-all; max-width: 560px; }
.reqList { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; width: min(900px, 100%); }
.reqCard { position: relative; display: flex; gap: 12px; padding: 14px; border-radius: 20px; background: #fffdf8; border: 1.5px solid var(--line); box-shadow: var(--shadowS); }
.reqCard.done { background: #f6fbf8; border-color: #cfe8dc; }
.reqFace { width: 66px; height: 66px; flex: none; }
.reqFace svg { width: 100%; height: 100%; }
.reqMain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.reqName { font-weight: 800; padding-right: 56px; }
.reqAsk { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink2); word-break: keep-all; }
.reqTags, .tbTags { display: flex; flex-wrap: wrap; gap: 5px; }
.reqTags span, .tbTags span { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg2); color: var(--rose3); }
.reqTags .season, .tbTags .season { background: #e6f2fb; color: #3d6b8a; }
.reqFoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.reqFoot .btn.small { min-height: var(--tap); }
.reqStars, .jtStars { color: #e1a93c; letter-spacing: 2px; font-size: 18px; }
.stamp { position: absolute; top: 10px; right: 12px; transform: rotate(8deg); border: 2px solid #3b7a5e; color: #3b7a5e; border-radius: 8px; padding: 1px 8px; font-weight: 800; font-size: 12px; background: rgba(255, 255, 255, .7); }
.starChip { font-weight: 800; color: #b9893a; background: #fff6df; border: 1px solid #f1dca8; border-radius: 999px; padding: 6px 12px; }
.themeBar { position: absolute; left: 10px; top: 10px; z-index: 3; max-width: min(320px, calc(100% - 92px)); background: rgba(255, 255, 255, .93); border: 1.5px solid #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 9px 12px 10px; }
.themeBar[hidden] { display: none; }
.tbHead { display: flex; align-items: center; gap: 6px; }
.tbKind { font-size: 11.5px; font-weight: 800; color: var(--rose3); letter-spacing: .02em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbX { width: 36px; height: 36px; margin: -8px -8px -8px 0; border: 0; background: transparent; border-radius: 50%; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; position: relative; }
.tbX::after { content: ""; position: absolute; inset: -4px; }
.tbX svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.tbName { font-weight: 800; font-size: 16px; margin: 2px 0 6px; word-break: keep-all; }
.stageBottom { gap: 8px; flex-wrap: wrap; padding: 0 8px; }
.judgePill { background: linear-gradient(180deg, #e7899f, #d36f88); color: #fff; border-color: #fff; }
.judgePill svg { stroke: #fff; }
.judgePill svg .f { fill: #fff; }
.judgePill[hidden] { display: none; }
.judgeSheet { width: min(640px, 100%); }
.judgeBody { padding: 12px 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.jRow { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 16px; background: #fffaf8; border: 1px solid var(--line); opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; }
.jRow.in { opacity: 1; transform: none; }
.jFace { width: 58px; height: 58px; flex: none; }
.jFace svg { width: 100%; height: 100%; }
.jMain { flex: 1; min-width: 0; }
.jHead { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.jHead small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.jScore { margin-left: auto; font-weight: 800; font-size: 20px; color: var(--rose3); }
.jScore i { font-style: normal; font-size: 12px; color: var(--muted); }
.jBar { height: 7px; border-radius: 99px; background: var(--bg2); margin: 6px 0; overflow: hidden; }
.jBar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--lav), var(--rose2)); transition: width .7s ease .15s; }
.jRow.in .jBar i { width: var(--w); }
.jLine { margin: 0; font-size: 14.5px; line-height: 1.5; word-break: keep-all; }
.judgeTotal { text-align: center; opacity: 0; transform: scale(.96); transition: opacity .35s, transform .35s; }
.judgeTotal.in { opacity: 1; transform: none; }
.jtNum { font-weight: 800; font-size: 18px; }
.jtStars { font-size: 30px; }
.jtGain { color: var(--ink2); font-weight: 600; font-size: 14px; word-break: keep-all; }
.judgeUnlock { text-align: center; font-size: 13.5px; color: var(--muted); word-break: keep-all; }
.judgeUnlock.new { background: #fff6df; border: 1px solid #f1dca8; color: #7a5a1a; border-radius: 12px; padding: 8px 10px; }
.rules { background: var(--bg); border-radius: 12px; padding: 8px 12px; font-size: 13px; color: var(--ink2); }
.rules summary { cursor: pointer; font-weight: 700; min-height: var(--tap); display: flex; align-items: center; }
.rules ul { margin: 6px 0 4px; padding-left: 18px; line-height: 1.55; word-break: keep-all; }
.judgeActions { display: flex; flex-wrap: wrap; gap: 8px; }
.judgeActions .btn { flex: 1 1 160px; }
.endSheet { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.endMiro { width: 90px; height: 116px; }
.endMiro svg { width: 100%; height: 100%; }
.sheet.small p.endText { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.endActions { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.endActions .btn { width: 100%; text-decoration: none; }
.endActions [hidden] { display: none !important; }
.tile.locked .thumb { filter: grayscale(.7) opacity(.55); }
.tile .lock { position: absolute; top: 8px; left: 8px; z-index: 1; display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 5px; border-radius: 999px; background: rgba(47, 36, 55, .82); color: #ffe39a; font-size: 11.5px; font-weight: 800; }
.tile .lock svg { width: 13px; height: 13px; fill: none; stroke: #ffe39a; stroke-width: 2.2; }
@media (max-width: 420px) { .modeCard { min-height: 88px; } .modeCard b { font-size: 14px; } .titleMiro { height: min(170px, 22vh); margin: 8px 0 2px; } .tagline { margin: 4px 0 14px; } }

.verTag { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); opacity: .8; font-variant-numeric: tabular-nums; }

/* ===== v0.2: 아이템 카드 · 찜 · 색 과학 팔레트 · 퍼스널 컬러 · 소통 장치 ===== */
:root { --muted: #77687d; }
.grid > .tw { position: relative; min-width: 0; display: flex; }
.tw > .tile { flex: 1; }
.favDot { position: absolute; right: 10px; bottom: 46px; width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, .9); box-shadow: var(--shadowS); display: inline-flex; align-items: center; justify-content: center; color: #c9b9c4; z-index: 2; transition: transform .12s, color .15s; }
.favDot::after { content: ""; position: absolute; inset: -5px; }
.favDot:hover { color: var(--rose2); }
.favDot:active { transform: scale(.9); }
.favDot[aria-pressed=true] { color: #e0587c; }
.hrt { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.favDot:focus-visible, .favBig:focus-visible, .fam:focus-visible, .setBtn:focus-visible, .commBtn:focus-visible { outline: 3px solid var(--lav2); outline-offset: 2px; }
.tab.favTab { display: inline-flex; align-items: center; gap: 5px; }
.tab.favTab .hrt { width: 15px; height: 15px; color: #e0587c; }
.tab.favTab[aria-selected=true] .hrt { color: #ff9ab5; }
.tab small { font-size: 12px; opacity: .8; }
.favHint { grid-column: 1 / -1; margin: 0; }
/* 피부 표 */
.skinBox { display: flex; flex-direction: column; gap: 10px; }
.skinRow .lbl { margin-bottom: 4px; }
.skinRow .lbl small { font-weight: 600; color: var(--muted); }
.skinRow .sws { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
.skinRow .sw { width: 42px; height: 42px; padding: 4px; }
/* 색 고르기 */
.pick { display: flex; flex-direction: column; gap: 6px; }
.pick .sub, .sets .sub { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; font-size: 12.5px; font-weight: 750; color: var(--ink2); margin-top: 4px; }
.pick .sub small, .sets .sub small { font-weight: 600; color: var(--muted); font-size: 11.5px; }
.sws.rec { padding: 4px; border-radius: 14px; background: var(--bg); }
.sw { position: relative; }
.sw.suit::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 1.5px #fff; }
.fams { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.fam { aspect-ratio: 1; min-height: 34px; border: 0; padding: 4px; background: transparent; border-radius: 50%; }
.fam i { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .1); }
.fam[aria-pressed=true] i { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink); }
.chip em { font-style: normal; font-size: 11px; font-weight: 800; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: #fff1cc; color: #7a5a1a; }
.chip[aria-pressed=true] em { background: rgba(255, 255, 255, .2); color: #fff; }
/* 아이템 카드 */
.itemCard { border-radius: 18px; background: linear-gradient(180deg, #fff, #fff8f6); border: 1.5px solid var(--line); padding: 12px 12px 10px; margin-bottom: 16px; box-shadow: var(--shadowS); }
.icHead { display: flex; align-items: center; gap: 8px; }
.icHead h3 { margin: 0; font-size: 17px; font-weight: 800; flex: 1; min-width: 0; word-break: keep-all; }
.favBig { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 0 12px 0 10px; border-radius: 999px; border: 1.5px solid var(--line2); background: #fff; font-weight: 750; font-size: 13px; color: var(--ink2); flex: none; }
.favBig .hrt { color: #cdbfc8; }
.favBig[aria-pressed=true] { border-color: #f0a6ba; background: #fff0f4; color: #b0405f; }
.favBig[aria-pressed=true] .hrt { color: #e0587c; }
.icMeta { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 6px; }
.icMeta span { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg2); color: #9c4560; }
.icMeta .fab { background: #eef0fb; color: #43407a; }
.credit { font-size: 12.5px; font-weight: 750; color: #7a5a1a; background: #fff6df; border: 1px solid #f1dca8; border-radius: 10px; padding: 4px 10px; display: inline-block; margin-bottom: 6px; }
.credit.studio { color: #43407a; background: #f1f0fb; border-color: #dcd8f3; }
.tip { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0 8px; font-size: 13.5px; line-height: 1.5; color: var(--ink2); word-break: keep-all; }
.tip svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.setRow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.setBtn { display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 4px 4px 6px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; min-width: 0; transition: border-color .15s, transform .12s; }
.setBtn:hover { border-color: var(--rose); }
.setBtn:active { transform: scale(.97); }
.setBtn[hidden] { display: none; }
.setThumb { display: block; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: linear-gradient(180deg, #fdf6f4, #f3e3e7); }
.setThumb svg { width: 100%; height: 100%; }
.setNm { font-size: 11.5px; font-weight: 700; color: var(--ink2); text-align: center; line-height: 1.2; word-break: keep-all; }
/* 퍼스널 컬러 */
.pcGuess { margin: 0 0 12px; font-weight: 700; color: var(--ink); word-break: keep-all; line-height: 1.5; }
.pcCard { border-radius: 16px; background: #fff; border: 1.5px solid var(--line); padding: 10px 12px; margin-bottom: 10px; }
.pcCard p { margin: 8px 0 0; font-size: 13.5px; color: var(--ink2); line-height: 1.5; word-break: keep-all; }
.sws.pcRow { grid-template-columns: repeat(6, 1fr); gap: 6px; }
.pcRow i { display: block; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .08); }
.selfieResult .pcGuess { margin-top: 10px; font-size: 14px; background: #fff6df; border-radius: 12px; padding: 8px 12px; }
/* 시작 화면: 이번 주 챌린지 + 함께하기 */
.weekly { width: 100%; text-align: left; border-radius: 18px; padding: 10px 12px 12px; background: linear-gradient(135deg, #fff 0%, #fff4f6 60%, #f3ecff 100%); border: 1.5px solid var(--line2); box-shadow: var(--shadowS); }
.wkHead { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.wkKind { font-size: 12px; font-weight: 800; color: var(--rose3); letter-spacing: .03em; }
.wkTag { font-size: 11.5px; font-weight: 700; color: #5b4b8a; }
.wkName { font-size: 16px; font-weight: 800; margin: 2px 0 8px; word-break: keep-all; }
.wkRow { display: flex; gap: 8px; }
.wkRow .btn { flex: 1; text-decoration: none; min-height: var(--tap); }
.commRow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; }
.commBtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; padding: 6px 4px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(255, 255, 255, .8); font-size: 12px; font-weight: 750; color: var(--ink2); word-break: keep-all; line-height: 1.2; }
.commBtn:hover { border-color: var(--rose); background: #fff; }
.commBtn svg { width: 20px; height: 20px; fill: none; stroke: var(--rose2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#scrTitle { overflow-y: auto; }
#scrTitle.on { align-items: safe center; }
.titleCol { margin: auto 0; }
/* 입력칸 */
.handleRow { display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--line2); border-radius: 12px; background: #fff; padding: 0 10px; min-height: var(--tap); }
.handleRow.off { display: none; }
.handleRow .at { font-weight: 800; color: var(--muted); }
.handleRow input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--ink); min-height: 40px; outline: none; -webkit-user-select: text; user-select: text; }
.sugBody .field input, .codeOpen input { border: 1.5px solid var(--line2); border-radius: 12px; background: #fff; padding: 0 12px; min-height: var(--tap); width: 100%; font: inherit; color: var(--ink); outline: none; -webkit-user-select: text; user-select: text; }
.handleRow:focus-within, .sugBody .field input:focus, .codeOpen input:focus { border-color: var(--lav2); box-shadow: 0 0 0 3px rgba(157, 140, 201, .25); }
textarea#codeText, textarea#sugText { width: 100%; resize: none; border: 1.5px dashed var(--line2); border-radius: 12px; background: #fffdfb; padding: 10px 12px; font: 13px/1.45 ui-monospace, Consolas, monospace; color: var(--ink); word-break: break-all; -webkit-user-select: text; user-select: text; }
textarea#sugText { font-family: var(--sans); font-size: 13.5px; }
textarea[hidden] { display: none; }
.row2 { display: flex; gap: 8px; flex-wrap: wrap; }
.row2 > .btn { flex: 1 1 140px; text-decoration: none; }
.row2 > input { flex: 1 1 200px; width: auto; }
.row2 [hidden] { display: none !important; }
/* 룩 코드 · 받은 룩 · 제안 · 명예의 전당 */
.codeSheet, .lookSheet, .sugSheet, .wallSheet { width: min(720px, 100%); }
.codeBody, .lookBody, .sugBody, .wallBody { padding: 14px 18px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.codeMine { display: flex; gap: 14px; align-items: flex-start; }
.codeMine[hidden] { display: none; }
.codeThumb { width: 120px; flex: none; aspect-ratio: 3 / 5; border-radius: 16px; overflow: hidden; background: linear-gradient(180deg, #fdf3f0, #f3dfe5); }
.codeThumb svg, .lookArt svg { width: 100%; height: 100%; }
.codeSide { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.codeLead, .sugLead { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink2); word-break: keep-all; }
.codeFrom { margin: 0; font-size: 13px; font-weight: 700; color: #5b4b8a; }
.codeFrom:empty { display: none; }
.codeOpen { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.codeOpen .fine, .sugBody .fine { margin: 0; }
.lookBody { flex-direction: row; align-items: stretch; }
.lookArt { width: min(42%, 260px); flex: none; aspect-ratio: 3 / 5; border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, #fdf3f0, #f3dfe5); }
.lookSide { flex: 1; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.lookBy { margin: 0; font-size: 18px; font-weight: 800; word-break: keep-all; }
.lookBy small { font-size: 13px; font-weight: 700; color: #5b4b8a; }
.lookSide .hint { margin: 0; }
.sugBody .field { margin-bottom: 0; }
.sugRules { margin: 0; padding: 10px 12px 10px 28px; border-radius: 14px; background: var(--bg); font-size: 13.5px; line-height: 1.55; color: var(--ink2); word-break: keep-all; }
.wallGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.wallEmpty { grid-column: 1 / -1; margin: 0; text-align: center; color: var(--ink2); font-weight: 650; padding: 10px; background: #fff6df; border-radius: 14px; word-break: keep-all; }
.wallCard { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; }
.wallCard .thumb { aspect-ratio: 1; }
.wallCard b { font-size: 14px; word-break: keep-all; }
.wallCard span { font-size: 12.5px; font-weight: 700; color: #7a5a1a; }
.wallCard span.studio { color: #43407a; }
.wallCard a { font-size: 13px; font-weight: 700; color: var(--rose3); min-height: 32px; display: inline-flex; align-items: center; }
.endActions .btn svg { flex: none; }
@media (max-width: 520px) {
  .lookBody { flex-direction: column; align-items: center; }
  .lookArt { width: min(62%, 240px); }
  .codeThumb { width: 92px; }
  .favDot { width: 30px; height: 30px; bottom: 44px; right: 8px; }
}
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .titleMiro { display: none; }
  .titleCol { padding: 10px 16px; }
}
/* 시작 화면: 넓은 화면·가로 폰은 2단 (왼쪽 로고·거울, 오른쪽 메뉴) */
@media (min-width: 900px) and (min-aspect-ratio: 1/1), (min-width: 640px) and (max-height: 520px) and (min-aspect-ratio: 3/2) {
  .titleCol { width: min(920px, 100%); display: grid; grid-template-columns: 1fr minmax(340px, 400px); grid-template-areas: "logo menu" "miro menu" "tag menu" "fine menu" "ver menu"; column-gap: 48px; align-items: center; align-content: center; }
  .titleCol .logo { grid-area: logo; align-self: end; }
  .titleCol .titleMiro { grid-area: miro; justify-self: center; }
  .titleCol .tagline { grid-area: tag; margin-bottom: 6px; }
  .titleCol .menu { grid-area: menu; width: 100%; }
  .titleCol .fine { grid-area: fine; }
  .titleCol .verTag { grid-area: ver; }
  .arch.a1 { width: min(96vw, 1000px); }
  .arch.a2 { width: min(86vw, 860px); }
}
.commBtn { flex-direction: row; min-height: 46px; gap: 6px; font-size: 12.5px; }
.commBtn svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 420px) { .commBtn { flex-direction: column; gap: 2px; font-size: 11.5px; } }
.weekly { padding: 9px 12px 10px; }
.wkName { font-size: 15.5px; margin: 1px 0 7px; }
#scrTitle { scrollbar-width: thin; }
.titleCol { padding-top: calc(64px + env(safe-area-inset-top)); }
.starLine:empty { display: none; }
@media (min-width: 900px) and (min-aspect-ratio: 1/1), (min-width: 640px) and (max-height: 520px) and (min-aspect-ratio: 3/2) { .titleCol { padding-top: 24px; } }
@media (min-width: 640px) and (max-height: 520px) and (min-aspect-ratio: 3/2) { .titleCol { column-gap: 24px; grid-template-columns: 1fr minmax(320px, 380px); padding-top: 56px; } .titleCol .titleMiro { display: block; height: 120px; width: 100px; margin: 4px 0; } .modeCard { min-height: 74px; } .modeCard small { display: none; } .menu { gap: 8px; } }
/* v0.2 대비(WCAG) 보정: 흰 글자 버튼 4.5:1 이상, 보조 글자 4.5:1 이상 */
:root { --muted: #6c5d72; --rose3: #a84a64; }
.btn.pri, .judgePill { background: linear-gradient(180deg, #c25a7a, #a84664); border-color: #9e425e; text-shadow: 0 1px 0 rgba(90, 20, 45, .3); }
.btn.pri:hover { background: linear-gradient(180deg, #ca6383, #ae4c6a); }
.starLine, .starChip { color: #8a6420; }
/* 가로 폰(예: 844×390): 무대 | 서랍 나란히 — 캐릭터가 작아지지 않게 */
@media (min-width: 640px) and (max-height: 520px) and (min-aspect-ratio: 3/2) {
  #scrStudio.on { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 50%); grid-template-rows: 54px minmax(0, 1fr); }
  #scrStudio .bar { grid-column: 1 / -1; height: 54px; }
  .stageWrap { grid-column: 1; grid-row: 2; }
  .drawer { grid-column: 2; grid-row: 2; height: auto; min-height: 0; margin-top: 0; border-radius: 0; border-top: 0; border-left: 1px solid var(--line); box-shadow: none; }
  .tool { width: 48px; min-height: 48px; position: relative; } .tool span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .rail { gap: 6px; top: 6px; }
  .paneSeg { margin: 6px 10px 0; } .paneSeg button { min-height: 36px; }
  .tabs { padding: 8px 10px 6px; }
  .themeBar { max-width: calc(100% - 70px); padding: 6px 10px; } .tbTags { display: none; }
  .miroTip { bottom: 64px; }
}
.sugBody .check, .codeSide .check { font-size: 14px; line-height: 1.5; align-items: flex-start; font-weight: 650; word-break: keep-all; }
.sugBody .check input, .codeSide .check input { margin-top: 1px; flex: none; }

/* ===== v0.3: 체형 · 핏 · 가이드 · 쇼핑 모드 ===== */
.commRow { grid-template-columns: repeat(4, 1fr); }
.commBtn.shopBtn svg { stroke: var(--gold); }
.sub2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; font-size: 13px; font-weight: 800; color: var(--ink2); margin: 14px 0 8px; }
.sub2 small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.fine svg { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.linkBtn { border: 0; background: none; padding: 6px 4px; min-height: 36px; font-size: 13px; font-weight: 700; color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; }
.linkBtn.del { color: var(--rose3); }
/* 체형 탭 (왼쪽 격자 칸 전체) */
.bodyBox { grid-column: 1 / -1; min-width: 0; }
.bpHead { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 8px; }
.bpHead b { font-size: 14px; font-weight: 800; }
.bpHead small { font-size: 11.5px; color: #3b7a5e; font-weight: 700; }
.bodyBox .bpHead:not(:first-child) { margin-top: 16px; }
.profRow { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.profChip { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: var(--tap); padding: 4px 14px 4px 5px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 14px; color: var(--ink2); }
.profChip i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; background: linear-gradient(135deg, #f8dbe2, #e6dcf6); color: var(--rose3); }
.profChip[aria-pressed=true] { border-color: var(--rose2); background: #fff4f6; color: var(--ink); box-shadow: 0 0 0 3px rgba(212, 120, 143, .18); }
.profChip.add { border-style: dashed; color: var(--rose3); }
.profChip.add i { background: #fff1f4; font-size: 18px; }
.profChip:focus-visible, .typeTile:focus-visible, .linkBtn:focus-visible { outline: 3px solid var(--lav2); outline-offset: 2px; }
.profTools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.profTools input { flex: 1 1 140px; min-height: 40px; border-radius: 12px; border: 1.5px solid var(--line2); padding: 6px 12px; font: inherit; }
.typeGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.typeTile { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 4px 8px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; text-align: center; transition: border-color .15s, box-shadow .15s, transform .1s; }
.typeTile:hover { border-color: var(--rose); }
.typeTile:active { transform: scale(.97); }
.typeTile[aria-pressed=true] { border-color: var(--rose2); box-shadow: 0 0 0 3px rgba(212, 120, 143, .2); background: #fff8f9; }
.typeTile .tthumb { width: 100%; aspect-ratio: 1 / 1.05; border-radius: 12px; background: radial-gradient(90% 70% at 50% 40%, #fdf3f5, #f3e6ee); overflow: hidden; }
.typeTile .tthumb svg { width: 100%; height: 100%; }
.typeTile b { font-size: 12.5px; font-weight: 800; line-height: 1.2; margin-top: 4px; word-break: keep-all; }
.typeTile small { font-size: 10.5px; color: var(--muted); line-height: 1.25; word-break: keep-all; }
.bodyActs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.bodyActs .btn { flex: 1 1 130px; }
.bodyS .lbl { display: flex; justify-content: space-between; gap: 8px; }
.bodyS .ends { font-size: 11.5px; color: var(--muted); font-weight: 600; }
/* 체형 카드 */
.typeCard { border-radius: 18px; border: 1.5px solid var(--line); background: linear-gradient(160deg, #fff, #fbf1f6); padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--shadowS); }
.typeCard .btn { margin-top: 8px; width: 100%; }
.tcHead { display: flex; gap: 10px; align-items: center; }
.tcHead b { display: block; font-size: 16px; font-weight: 800; }
.tcHead small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tcBadge { flex: none; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font: 700 22px var(--serif); color: #fff; background: linear-gradient(135deg, #e7899f, #9d8cc9); }
.tcTips { margin: 10px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; color: var(--ink2); word-break: keep-all; }
.tcTips li + li { margin-top: 4px; }
.tcNote { margin: 10px 0 0; font-size: 13.5px; color: var(--ink2); line-height: 1.55; word-break: keep-all; }
.typeCard.small { padding: 10px 12px; }
details.more { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 4px; }
details.more > summary, details.why > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; min-height: var(--tap); align-content: center; font-weight: 800; font-size: 15px; }
details.more > summary::-webkit-details-marker, details.why > summary::-webkit-details-marker { display: none; }
details.more > summary::after, details.why > summary::after { content: "\25BE"; margin-left: auto; color: var(--rose2); transition: transform .2s; }
details[open].more > summary::after, details[open].why > summary::after { transform: rotate(180deg); }
details.more > summary small, details.why > summary small { font-size: 12px; color: var(--muted); font-weight: 600; }
details.more > summary:focus-visible, details.why > summary:focus-visible { outline: 3px solid var(--lav2); outline-offset: 2px; border-radius: 8px; }
.measGrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
.measGrid label { display: grid; grid-template-columns: 1fr auto; column-gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink2); }
.measGrid label span { grid-column: 1 / -1; }
.measGrid input, .cmRow input, .nameRow input { min-height: 42px; border-radius: 12px; border: 1.5px solid var(--line2); padding: 6px 10px; font: inherit; font-size: 16px; width: 100%; min-width: 0; background: #fff; color: var(--ink); }
.measGrid em, .cmRow em { font-style: normal; align-self: center; color: var(--muted); font-size: 12.5px; }
.measGrid input:focus, .cmRow input:focus, .nameRow input:focus, .profTools input:focus { outline: 3px solid var(--lav); border-color: var(--lav2); }
/* 왜 어울려요 */
details.why { border-radius: 16px; background: #fffdf6; border: 1.5px solid #f0e3c4; padding: 0 12px 4px; margin: 10px 0 4px; }
details.why > summary::after { color: var(--gold); }
.why ul, .whyList { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.why li, .whyList li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--ink2); word-break: keep-all; }
.wtag { flex: none; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #f3ecfb; color: #5b4c8a; margin-top: 1px; }
.c-body .wtag { background: #fde8ee; color: #9a3c58; } .c-leg .wtag { background: #e6f3ee; color: #2f6a52; } .c-neck .wtag { background: #e9f0fb; color: #35598a; }
.c-face .wtag { background: #fff0dc; color: #8a5a1a; } .c-color .wtag { background: #f3ecfb; color: #5b4c8a; } .c-alt .wtag { background: #eee; color: #555; }
.setBtn .setWhy { display: block; font-size: 10.5px; line-height: 1.3; color: var(--muted); margin-top: 1px; word-break: keep-all; }
/* 3단계 셋팅 */
.bodySheet { width: min(680px, 100%); }
.flowBody { padding: 10px 18px 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.flowDots { display: flex; gap: 6px; justify-content: center; }
.flowDots i { width: 26px; height: 6px; border-radius: 99px; background: var(--line); }
.flowDots i.on { background: var(--rose2); } .flowDots i.done { background: var(--rose); }
.flowLead { margin: 2px 0; font-size: 15.5px; font-weight: 700; line-height: 1.5; word-break: keep-all; }
.flowAlt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.flowSplit { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 14px; align-items: start; }
.flowArt { border-radius: 18px; background: radial-gradient(90% 70% at 50% 35%, #fff, #f6e4ea); aspect-ratio: 3 / 5; overflow: hidden; }
.flowArt svg { width: 100%; height: 100%; }
.cmRow, .nameRow { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.nameRow { grid-template-columns: auto 1fr; }
.flowNav { display: flex; gap: 10px; justify-content: space-between; padding: 10px 0 14px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--card); margin-top: auto; }
.flowNav .btn.pri { flex: 1; max-width: 320px; margin-left: auto; }
.flowNav .btn:disabled { opacity: .45; cursor: default; }
/* 사진 스캔 */
.scanCam { aspect-ratio: 3 / 4; }
.scanCam video { transform: none; }
.camGuide.body { width: 46%; height: 88%; top: 50%; border-radius: 40% 40% 12% 12% / 14% 14% 6% 6%; }
.scanResult .row2 { margin-top: 10px; }
.scanResult .hint { margin: 10px 0 0; }
/* 가이드 · 수업 */
.guideSheet { width: min(820px, 100%); }
.guideBody { padding: 12px 18px 22px; overflow-y: auto; }
.gSeg { display: flex; gap: 6px; margin: 0 0 4px; }
.gSeg .chip { text-decoration: none; color: var(--ink2); }
.gH { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 17px; font-weight: 800; margin: 18px 0 10px; }
.gH small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.gCards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.gCard { border-radius: 14px; border: 1.5px solid var(--line); background: #fff; padding: 10px 12px; }
.gCard p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink2); word-break: keep-all; }
.lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.lesson { position: relative; border-radius: 18px; border: 1.5px solid var(--line); background: linear-gradient(180deg, #fff, #fff8f6); padding: 12px 14px 14px; }
.lsNo { position: absolute; top: 12px; right: 14px; font: italic 700 22px var(--serif); color: var(--rose); }
.lesson h4 { margin: 0 34px 4px 0; font-size: 15.5px; font-weight: 800; word-break: keep-all; }
.lesson > p { margin: 0 0 10px; font-size: 13.5px; color: var(--ink2); line-height: 1.55; word-break: keep-all; }
.lsPair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lsPair figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.lsArt { aspect-ratio: 3 / 5; border-radius: 14px; background: radial-gradient(90% 70% at 50% 35%, #fff, #f6e9ee); overflow: hidden; }
.lsArt svg { width: 100%; height: 100%; }
.lsPair figcaption { font-size: 12.5px; font-weight: 700; text-align: center; color: var(--ink2); word-break: keep-all; min-height: 2.6em; }
.lsPair .btn { width: 100%; }
.lsList { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.6; color: var(--ink2); word-break: keep-all; }
/* 쇼핑 모드 */
.shopSheet { width: min(900px, 100%); max-height: 96%; }
.shopBody { padding: 10px 16px 18px; overflow-y: auto; }
.shopNudge { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: #fff6df; border: 1px solid #f0dfae; border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; }
.shopNudge p { margin: 0; flex: 1 1 200px; font-size: 13.5px; font-weight: 600; color: #6b5020; word-break: keep-all; }
.shopTop { display: grid; grid-template-columns: minmax(130px, 36%) 1fr; gap: 14px; align-items: start; }
.shopArt { border-radius: 18px; background: radial-gradient(90% 70% at 50% 35%, #fff, #f6e4ea); aspect-ratio: 3 / 5; overflow: hidden; }
.shopArt svg { width: 100%; height: 100%; }
.shopWhy { min-width: 0; }
.shopWhy .sub2:first-child { margin-top: 2px; }
.shopCtl { margin-top: 12px; }
.shopSw { flex-wrap: wrap; }
.pickRow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.curC { display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px ui-monospace, Consolas, monospace; color: var(--muted); }
.curC i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); }
.pickBox { margin-top: 8px; border-radius: 14px; background: #2f2437; padding: 8px; text-align: center; }
.pickBox canvas { max-width: 100%; max-height: 44vh; border-radius: 10px; cursor: crosshair; touch-action: manipulation; }
.pickBox .fine { color: #eadff0; margin: 6px 0; }
.pickBox .btn.ghost { color: #fff; }
.shopActs { margin-top: 6px; }
.shopActs .btn:disabled { opacity: .5; }
.cmpSec { margin-top: 16px; border-top: 1px solid var(--line); }
.cmpGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cmpCard { min-width: 0; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; padding: 6px 6px 0; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cmpCard b { font-size: 13px; font-weight: 800; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmpCard small { font-size: 11.5px; color: var(--muted); padding: 0 4px; }
.cmpArt { aspect-ratio: 3 / 5; border-radius: 12px; background: linear-gradient(180deg, #fff, #f4e7ec); overflow: hidden; }
.cmpArt svg { width: 100%; height: 100%; }
.cmpCard .whyList { padding: 0 2px; margin: 2px 0 6px; }
.cmpCard .whyList li { font-size: 11.5px; flex-direction: column; gap: 2px; }
.cmpBtns { display: flex; border-top: 1px solid var(--line); margin: auto -6px 0; }
.cmpBtns button { flex: 1; min-height: var(--tap); border: 0; background: transparent; font-weight: 700; font-size: 12.5px; color: var(--ink2); }
.cmpBtns button:first-child { color: var(--rose3); }
.cmpBtns button + button { border-left: 1px solid var(--line); }
.cmpBtns button:last-child { flex: 0 0 40px; }
.cmpBtns button:hover { background: var(--bg); }
/* 내 코디: 체형별 + 백업 */
.outFilter { padding: 10px 14px 0; flex: none; }
.outFilter:empty { display: none; }
.outScroll { overflow-y: auto; min-height: 0; flex: 1; }
.outScroll .outGrid { overflow: visible; }
.outCard { position: relative; }
.outWho { position: absolute; top: 6px; left: 6px; z-index: 1; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .9); border: 1px solid var(--line); color: var(--ink2); }
.backup { margin: 4px 14px 18px; padding: 14px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; display: flex; flex-direction: column; gap: 10px; }
.backup h3 { margin: 0; font-size: 15px; font-weight: 800; }
.backup textarea, .backup input[type=text] { flex: 1 1 220px; min-height: 42px; border-radius: 12px; border: 1.5px solid var(--line2); padding: 8px 10px; font: 12.5px ui-monospace, Consolas, monospace; resize: vertical; min-width: 0; }
.backup .row2 > .btn { flex: 0 0 auto; }
@media (max-width: 520px) {
  .flowSplit, .shopTop { grid-template-columns: 40% 1fr; gap: 10px; }
  .typeTile small { display: none; }
  .commRow { grid-template-columns: repeat(2, 1fr); }
  .commBtn { flex-direction: row; gap: 6px; font-size: 12.5px; min-height: 46px; }
  .lessons { grid-template-columns: 1fr; }
}
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .shopBody { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; align-items: start; }
  .shopBody > .shopNudge, .shopBody > .cmpSec, .shopBody > .fine { grid-column: 1 / -1; }
  .shopTop { grid-template-columns: 1fr; position: sticky; top: 0; }
  .shopTop .shopArt { aspect-ratio: auto; height: 52vh; }
  .shopCtl { margin-top: 0; }
}
.scanResult ul { grid-template-columns: 1fr; }
.scanResult li span { text-align: right; }
.scanResult:not(:empty) ~ .selfieActions { display: none; }
.icFit { margin-top: 8px; }
.icFit .field { margin-bottom: 8px; }
.icFit:empty { display: none; }
@media (max-width: 899px), (max-aspect-ratio: 1/1) {
  .shopTop { position: sticky; top: -10px; z-index: 2; background: var(--card); padding: 10px 0 8px; margin-top: -10px; box-shadow: 0 10px 12px -12px rgba(90, 50, 80, .35); }
  .shopTop .shopArt { aspect-ratio: auto; height: min(30vh, 300px); }
  .shopWhy .whyList li { font-size: 12.5px; line-height: 1.4; }
  .shopWhy .whyList li:nth-child(n+3) { display: none; }
  .shopWhy .sub2 { margin: 6px 0 4px; }
}
.profRow { scrollbar-width: none; }
.profRow::-webkit-scrollbar { display: none; }
@media (min-width: 900px) and (min-aspect-ratio: 1/1) { .cmpGrid { grid-template-columns: repeat(3, minmax(0, 210px)); } }
@media (min-width: 640px) and (max-height: 520px) and (min-aspect-ratio: 3/2) {
  .shopBody { display: grid; grid-template-columns: 38% 1fr; column-gap: 14px; align-items: start; }
  .shopBody > .shopNudge, .shopBody > .cmpSec, .shopBody > .fine { grid-column: 1 / -1; }
  .shopTop { grid-template-columns: 1fr; position: sticky; top: 0; margin-top: 0; padding: 0; box-shadow: none; }
  .shopTop .shopArt { height: 58vh; }
  .shopWhy .whyList li:nth-child(n+2) { display: none; }
  .shopCtl { margin-top: 0; }
  .cmpGrid { grid-template-columns: repeat(3, minmax(0, 170px)); }
  .flowArt { aspect-ratio: auto; height: 56vh; }
}
@media (min-width: 900px) and (min-aspect-ratio: 1/1), (min-width: 640px) and (max-height: 520px) and (min-aspect-ratio: 3/2) {
  .shopBody > .cmpSec { grid-column: 2; }
  .shopBody .cmpGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) and (min-aspect-ratio: 1/1), (min-width: 640px) and (max-height: 520px) and (min-aspect-ratio: 3/2) { .shopBody > .fine { grid-column: 2; } }
.typeTile .tthumb { aspect-ratio: 3 / 5; background: radial-gradient(90% 70% at 50% 35%, #fff, #f1e4ec); }

/* v0.3.2 — 사진 저장 보기 창 · 내 코디 찾기 · 좁은 폰 레일 */
.photoPrev img, .saveImgWrap img { -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; pointer-events: auto; }
#mSaveView { align-items: center; z-index: 30; }
.saveSheet { width: min(560px, 100%); height: 100%; max-height: 100%; border-radius: 0; padding: 0 0 calc(12px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) and (min-height: 560px) { .saveSheet { height: auto; max-height: 94%; border-radius: 24px; } }
.saveHow { margin: 0 16px 10px; padding: 10px 14px; border-radius: 14px; background: #fff1f4; color: var(--rose3); font-weight: 700; line-height: 1.45; word-break: keep-all; }
.saveImgWrap { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 16px; }
.saveImgWrap img { max-width: 100%; max-height: 100%; height: auto; object-fit: contain; border-radius: 12px; box-shadow: var(--shadow); display: block; }
@media (min-width: 640px) and (min-height: 560px) { .saveImgWrap img { max-height: 62vh; } }
.saveActions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 0; }
.saveActions .btn { flex: 1 1 140px; white-space: nowrap; }
.saveActions [hidden] { display: none !important; }
.myLooksBtn { flex-direction: row !important; gap: 8px !important; }
.myLooksBtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.menu [hidden] { display: none !important; }
.outHint { margin: 8px 20px 6px; font-size: 13px; color: var(--muted); line-height: 1.45; word-break: keep-all; }
.toast.act { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; }
.toastBtn { flex: none; border: 0; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 800; padding: 7px 14px; min-height: 36px; }
@keyframes toolBump { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 120, 143, .6); } 35% { transform: scale(1.12); } 100% { transform: scale(1); box-shadow: 0 0 0 14px rgba(212, 120, 143, 0); } }
.tool.bump { animation: toolBump .9s ease-out 2; border-color: var(--rose2); }
/* 세로 폰에서 무대가 낮으면(예: 360×740) 레일을 촘촘하게 — '코디 저장'·'내 코디'가 아래 알약 버튼에 가리지 않게 */
@media (max-width: 480px) and (max-aspect-ratio: 1/1) {
  .rail { gap: 5px; top: 6px; right: 6px; }
  .tool { width: 54px; min-height: 0; padding: 5px 2px 4px; border-radius: 14px; }
  .tool svg { width: 20px; height: 20px; }
  .tool span { font-size: 10px; }
}

/* v0.4 — 키 · 댄스 · 이모티콘 (무대 왼쪽 레일) · 메이크업 제목 · 이모티콘 창 */
.railL { position: absolute; left: 8px; top: 10px; display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.contest .railL { display: none; }
.tool[aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tool svg .f { fill: currentColor; stroke: none; }
@media (max-width: 480px) and (max-aspect-ratio: 1/1) { .railL { gap: 5px; top: 6px; left: 6px; } }
@media (max-height: 640px) and (max-aspect-ratio: 1/1) { .railL .tool span { display: none; } }
@media (min-width: 640px) and (max-height: 520px) and (min-aspect-ratio: 3/2) { .railL { gap: 6px; top: 6px; } .railL .tool span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
.hPop { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); width: min(360px, calc(100% - 24px)); z-index: 5; background: rgba(255, 255, 255, .97); border: 1.5px solid #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 8px 10px 10px 16px; }
.hPop[hidden] { display: none; }
.hOpen .stageBottom, .hOpen .miroTip { visibility: hidden; }
.hHead { display: flex; align-items: center; gap: 10px; }
.hHead b { font-size: 16px; font-weight: 800; }
.hVal { font-size: 13.5px; font-weight: 700; color: var(--rose3); background: #fbeef1; border-radius: 999px; padding: 3px 10px; }
.hX { margin-left: auto; }
.hRow { display: flex; align-items: center; gap: 10px; }
.hRow input { flex: 1; min-width: 0; height: var(--tap); accent-color: var(--rose2); }
.hEnd { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
@keyframes danceL { 0% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-2.2%) rotate(-1.4deg); } 60% { transform: translateY(.6%) rotate(-.4deg); } 100% { transform: translateY(0) rotate(0); } }
@keyframes danceR { 0% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-2.2%) rotate(1.4deg); } 60% { transform: translateY(.6%) rotate(.4deg); } 100% { transform: translateY(0) rotate(0); } }
#stage.bounceL svg { animation: danceL .5s ease-out; transform-origin: 50% 90%; }
#stage.bounceR svg { animation: danceR .5s ease-out; transform-origin: 50% 90%; }
.dancing .stageBg .sFloor { animation: floorGlow 1.07s ease-in-out infinite alternate; }
@keyframes floorGlow { from { filter: none; } to { filter: brightness(1.06) saturate(1.15); } }
.gridHead { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; padding: 8px 2px 0; }
.gridHead b { font-size: 15px; font-weight: 800; color: var(--ink); }
.gridHead small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stkSheet { width: min(900px, 100%); }
.stkBody { display: flex; flex-direction: column; gap: 12px; padding: 12px 18px 18px; overflow-y: auto; min-height: 0; }
.stkPrevWrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stkPrev { position: relative; width: min(64vw, 300px, 36vh); aspect-ratio: 1; border-radius: 18px; overflow: hidden; box-shadow: var(--shadowS); background-color: #fff; background-image: linear-gradient(45deg, #f3e8ec 25%, transparent 25%, transparent 75%, #f3e8ec 75%), linear-gradient(45deg, #f3e8ec 25%, transparent 25%, transparent 75%, #f3e8ec 75%); background-size: 24px 24px; background-position: 0 0, 12px 12px; }
.stkPrev img { width: 100%; height: 100%; display: block; -webkit-touch-callout: default; user-select: auto; }
.stkPrevWrap .fine { margin: 0; text-align: center; }
.stkSide .field { margin-bottom: 8px; }
.stkSide .chip { padding: 4px 14px; font-size: 14px; }
.stkTextRow { margin-top: 8px; }
.stkTextRow input { width: 100%; min-height: var(--tap); border: 1.5px solid var(--line2); border-radius: 12px; background: #fff; padding: 0 12px; font: inherit; font-size: 16px; color: var(--ink); outline: none; -webkit-user-select: text; user-select: text; }
.stkTextRow input:focus { border-color: var(--lav2); box-shadow: 0 0 0 3px rgba(157, 140, 201, .25); }
#stkCols { grid-template-columns: repeat(5, 44px); justify-content: start; }
.stkSide .photoActions [hidden] { display: none !important; }
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .stkBody { flex-direction: row; align-items: flex-start; overflow: hidden; }
  .stkPrevWrap { flex: none; position: sticky; top: 0; }
  .stkPrev { width: min(380px, 42vh); }
  .stkSide { flex: 1; min-width: 0; overflow-y: auto; max-height: 76vh; padding-right: 4px; }
}
@media (prefers-reduced-motion: reduce) { #stage.bounceL svg, #stage.bounceR svg, .dancing .stageBg .sFloor { animation: none !important; } }
@media (max-width: 480px) { .hOpen .rail { visibility: hidden; } }

/* ---------- v0.5 블링 · 이모티콘 세트 ---------- */
/* 블링 반짝이: 무대에서만 은은하게 (움직임 줄이기 설정이면 위의 전역 규칙으로 멈춤) */
#stage .twk { transform-box: fill-box; transform-origin: center; animation: twk 2.4s ease-in-out infinite; }
@keyframes twk { 0%, 100% { opacity: .2; transform: scale(.5); } 40% { opacity: 1; transform: scale(1.12); } 60% { opacity: .85; transform: scale(.92); } }
@media (prefers-reduced-motion: reduce) { #stage .twk { animation: none !important; opacity: 1; transform: none; } }
.tab.blingTab { display: inline-flex; align-items: center; gap: 5px; background: linear-gradient(135deg, #fff 0%, #fff6dc 45%, #fbe6f1 100%); border-color: #ecd3a0; }
.tab.blingTab .spk { width: 15px; height: 15px; fill: #d9a43a; }
.tab.blingTab[aria-selected=true] { background: linear-gradient(135deg, #3a2a44, #5b3a5e); border-color: #3a2a44; color: #fff; }
.tab.blingTab[aria-selected=true] .spk { fill: #ffd98a; }
.blingHint { grid-column: 1 / -1; }

.checker { background-color: #fff; background-image: linear-gradient(45deg, #f3e8ec 25%, transparent 25%, transparent 75%, #f3e8ec 75%), linear-gradient(45deg, #f3e8ec 25%, transparent 25%, transparent 75%, #f3e8ec 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.emoSheet { width: min(980px, 100%); }
.emoBody { display: flex; flex-direction: column; gap: 8px; padding: 6px 16px 18px; overflow-y: auto; min-height: 0; }
.emoLead { margin: 0; color: var(--ink2); font-size: 14px; word-break: keep-all; }
.emoTop { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.emoBgRow { display: flex; align-items: center; gap: 8px; }
.emoBgRow .lbl { margin: 0; }
.emoBgRow .chip { min-height: 38px; padding: 2px 14px; font-size: 13.5px; }
.emoActs { display: flex; flex-wrap: wrap; gap: 8px; }
.emoActs .btn { min-height: 46px; }
.emoActs .btn:disabled { opacity: .6; }
.emoAllHint { margin: 0; }
.emoQuick { margin: 0; color: var(--ink2); }
.emoEscape { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.emoEscape p { margin: 0; flex: 1 1 200px; }
.emoEscape [hidden], .emoActs [hidden] { display: none !important; }
.emoOneActs { margin-top: 2px; }
.emoProg { height: 6px; border-radius: 3px; background: var(--bg2); overflow: hidden; }
.emoProg[hidden] { display: none; }
.emoProg i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--rose), var(--rose2)); transition: width .25s; }
#emoMsg { margin: 0; min-height: 1.2em; font-size: 13.5px; }
.emoGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.emoT { position: relative; padding: 0; border: 1.5px solid var(--line); border-radius: 14px; aspect-ratio: 1; overflow: hidden; cursor: pointer; transition: border-color .15s, transform .12s;
  background-color: #fff; background-image: linear-gradient(45deg, #f6eef1 25%, transparent 25%, transparent 75%, #f6eef1 75%), linear-gradient(45deg, #f6eef1 25%, transparent 25%, transparent 75%, #f6eef1 75%); background-size: 12px 12px; background-position: 0 0, 6px 6px; }
.emoT:hover { border-color: var(--rose); }
.emoT:active { transform: scale(.97); }
.emoT:focus-visible { outline: 3px solid var(--lav2); outline-offset: 2px; }
.emoT img { width: 100%; height: 100%; display: block; object-fit: contain; }
.emoT.wait img { visibility: hidden; }
.emoT.wait::after { content: ""; position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(circle, rgba(233, 163, 180, .35), rgba(233, 163, 180, 0) 70%); animation: emoPulse 1.1s ease-in-out infinite; }
@keyframes emoPulse { 0%, 100% { opacity: .4; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }
.gifB { position: absolute; top: 5px; left: 5px; font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; background: rgba(47, 36, 55, .82); color: #fff; }
.emoHelp { border: 1.5px solid var(--line); border-radius: 14px; background: #fff; padding: 4px 14px; font-size: 14px; color: var(--ink2); }
.emoHelp summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 750; color: var(--ink); cursor: pointer; }
.emoHelp ol { margin: 4px 0 8px; padding-left: 20px; }
.emoHelp li { margin: 4px 0; word-break: keep-all; }
.emoHelp p { margin: 6px 0; word-break: keep-all; }
.emoHelp .honest { font-size: 13px; color: var(--muted); }
.emoOneSheet { width: min(560px, 100%); }
.emoOneBody { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 16px 18px; overflow-y: auto; min-height: 0; }
.emoNav { display: flex; align-items: center; justify-content: center; gap: 6px; }
.emoBig { position: relative; width: min(66vw, 320px, 40vh); aspect-ratio: 1; border-radius: 18px; overflow: hidden; box-shadow: var(--shadowS);
  background-color: #fff; background-image: linear-gradient(45deg, #f3e8ec 25%, transparent 25%, transparent 75%, #f3e8ec 75%), linear-gradient(45deg, #f3e8ec 25%, transparent 25%, transparent 75%, #f3e8ec 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.emoBig img { width: 100%; height: 100%; display: block; -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; pointer-events: auto; }
.emoBig.busy .busy { opacity: 1; }
.navBtn { border: 1.5px solid var(--line); background: #fff; box-shadow: var(--shadowS); }
.navBtn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink2); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.emoIdx { margin: 0; text-align: center; font-weight: 700; color: var(--muted); font-size: 13px; }
.emoOneHow, #emoGifNote { margin: 0; text-align: center; }
.emoOneBody .field { margin: 6px 0 0; }
.emoCapRow { display: flex; gap: 8px; align-items: center; margin-top: 0; }
.emoCapRow input { flex: 1; min-width: 0; }
.emoCapRow .btn { flex: none; }
#emoOneMsg { margin: 2px 0; min-height: 1.2em; }

/* 다크 모드 폰: 삼성 인터넷은 이 미디어 쿼리가 있는 사이트를 '어두운 화면 지원'으로 보고 강제로 어둡게 칠하지 않는다. 게임 색은 그대로 둔다. */
@media (prefers-color-scheme: dark) {
  :root { color-scheme: only light; }
  html, body { background: var(--bg); color: var(--ink); }
}
