@font-face {
  font-family: 'Pretendard Variable';
  src: url('../vendor/PretendardVariable.woff2') format('woff2-variations');
  font-weight: 45 920;
  font-display: swap;
}

:root {
  --bg-top: #E9E4F5;
  --bg-bottom: #DCEBEE;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --text: #2C2A3A;
  --sub: #8B879C;
  --line: rgba(44, 42, 58, 0.08);
  --accent: #EE8C9C;
  --accent-press: #D96A7E;
  --accent-soft: rgba(238, 140, 156, 0.14);
  --shadow: 0 12px 32px rgba(60, 50, 90, 0.10);
  --r-card: 28px;
  --r-cell: 16px;
  --pad: 24px;
  --spring: cubic-bezier(0.22, 1.12, 0.36, 1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  font-size: 16px; font-weight: 500; line-height: 1.45; letter-spacing: -0.01em;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%) fixed;
  overflow: hidden; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  touch-action: manipulation;
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
input, textarea { font: inherit; color: inherit; -webkit-user-select: text; user-select: text; }
svg.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* 글 단계 다섯 개 */
.t-num { font-size: 44px; font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; }
.t-title { font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; }
.t-body { font-size: 16px; font-weight: 500; }
.t-btn { font-size: 16px; font-weight: 600; }
.t-small { font-size: 13px; font-weight: 500; color: var(--sub); }

#app { position: fixed; inset: 0; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; touch-action: none; transition: opacity .35s var(--ease); }
#scene.off { opacity: 0; pointer-events: none; }
#backdrop { position: fixed; inset: 0; z-index: 0; background: #E9D5B8; transition: opacity .35s var(--ease); }
#backdrop.off { opacity: 0; }
#glassfront { position: fixed; inset: 0; z-index: 0; pointer-events: none; transition: opacity .35s var(--ease); }
#glassfront.off { opacity: 0; }
#glassfront .sky-layer { position: absolute; inset: 0; background: center center / cover no-repeat; opacity: 0; transition: opacity 1.2s var(--ease); }
#glassfront .sky-layer.on { opacity: 1; }
.sky-dark #view-today .top { color: #FFFFFF; text-shadow: 0 1px 8px rgba(20, 20, 40, 0.35); }
.sky-dark #view-today .top .sub, .sky-dark #view-today .top .icon-btn { color: rgba(255, 255, 255, 0.86); }
#backdrop .sky-layer { position: absolute; inset: 0; background: center center / cover no-repeat; opacity: 0; transition: opacity 1.2s var(--ease); }
#backdrop .sky-layer.on { opacity: 1; }
#flat { position: fixed; z-index: 0; display: none; }
#flat.on { display: block; }
#flat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  -webkit-mask-image: radial-gradient(closest-side, #000 82%, transparent 100%); mask-image: radial-gradient(closest-side, #000 82%, transparent 100%);
  opacity: 0; transition: opacity .4s var(--ease); }
#flat img.on { opacity: 1; }

/* 화면 */
.view { position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column;
  padding: calc(var(--sat) + 12px) var(--pad) calc(var(--sab) + var(--tabbar-h) + 16px);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .4s var(--ease), visibility 0s .3s; }
.view.on { opacity: 1; visibility: visible; transform: none; transition: opacity .3s var(--ease), transform .4s var(--ease); }
.view.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; display: block; }
.view.scroll::-webkit-scrollbar { display: none; }
#view-today { pointer-events: none; }
#view-today > * { pointer-events: auto; }
#view-today #hero { pointer-events: none; }

.top { display: flex; align-items: flex-start; justify-content: space-between; min-height: 56px; }
.top .sub { margin-top: 2px; }
.icon-row { display: flex; gap: 4px; margin-right: -12px; }
.icon-btn { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 999px; color: var(--text); transition: transform .2s var(--spring), background .2s; }
.icon-btn:active { transform: scale(0.9); background: rgba(255,255,255,.5); }
.icon-btn .dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transform: translate(10px, -10px); }

#hero { flex: 1; min-height: 200px; }
.today-bottom { display: flex; flex-direction: column; gap: 16px; }
.slot { min-height: 24px; text-align: center; position: relative; }
.slot .line { color: var(--text); opacity: .86; transition: opacity .3s; }
.nudge { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: 4px; row-gap: 2px; animation: rise .45s var(--spring); }
.nudge .sub { flex-basis: 100%; color: var(--sub); }
.nudge .acts { display: inline-flex; gap: 2px; }
.nudge .link { font-size: 16px; font-weight: 600; line-height: 1; padding: 6px 8px; min-height: 32px; color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.nudge .link.no { font-weight: 500; color: var(--sub); text-decoration: none; }
.actions { display: flex; gap: 12px; }

.btn { height: 60px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 24px;
  font-size: 16px; font-weight: 600; transition: transform .25s var(--spring), background .2s, box-shadow .2s; white-space: nowrap; }
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(238, 140, 156, 0.35); flex: 1; }
.btn-primary:active { background: var(--accent-press); }
.btn-primary:disabled { background: #E4DEEA; color: #fff; box-shadow: none; }
.btn-glass { background: var(--surface); -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); box-shadow: var(--shadow); color: var(--text); }
.btn-full { width: 100%; }
.btn-small { height: 44px; padding: 0 20px; }
.btn-text { height: 48px; padding: 0 16px; color: var(--sub); font-weight: 600; border-radius: 999px; }
.btn-text:active { background: rgba(255,255,255,.5); }
.pill-evening { align-self: center; height: 44px; padding: 0 22px; border-radius: 999px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.pill-evening svg.i { width: 20px; height: 20px; }

/* 대화 +1 */
.talk { position: relative; display: flex; }
.talk .btn { min-width: 112px; }
.talk-pop { position: absolute; left: 0; bottom: 72px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.talk-pop .btn { background: var(--surface-strong); opacity: 0; transform: translateY(12px) scale(.96); transition: opacity .2s var(--ease), transform .35s var(--spring); height: 52px; justify-content: flex-start; }
.talk.open .talk-pop { pointer-events: auto; }
.talk.open .talk-pop .btn { opacity: 1; transform: none; }
.talk.open .talk-pop .btn:nth-child(1) { transition-delay: .04s; }
.plus-float { position: absolute; left: 50%; top: -8px; font-weight: 700; color: var(--accent); pointer-events: none; animation: floatUp .9s var(--ease) forwards; }
@keyframes floatUp { from { opacity: 0; transform: translate(-50%, 6px); } 25% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -28px); } }

/* 탭 막대 */
#tabbar { position: fixed; left: 16px; right: 16px; bottom: calc(var(--sab) + 8px); z-index: 5; height: var(--tabbar-h);
  display: flex; border-radius: 999px; background: var(--surface); -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); box-shadow: var(--shadow); }
#tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--sub); font-size: 13px; font-weight: 600; transition: color .2s; }
#tabbar button.on { color: var(--accent); }
#tabbar button:active svg { transform: scale(.88); }
#tabbar svg { transition: transform .2s var(--spring); }

/* 카드 */
.card { background: var(--surface); -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 24px; }
.card + .card { margin-top: 16px; }
.slot .card { text-align: left; padding: 18px 12px 6px 20px; animation: rise .45s var(--spring); }
.slot .card .txt { padding-right: 8px; }
.slot .card .row { display: flex; justify-content: flex-end; gap: 0; margin-top: 2px; }
.talk .count { position: absolute; top: -4px; right: -2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #fff; color: var(--text); font-size: 13px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(60,50,90,.14); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* 말풍선 */
.bubble { position: fixed; z-index: 3; transform: translate(-50%, -100%); padding: 10px 16px; border-radius: 999px; background: var(--surface-strong); box-shadow: var(--shadow); font-size: 15px; font-weight: 600; white-space: nowrap; pointer-events: none; animation: pop .35s var(--spring); }
.bubble.out { opacity: 0; transition: opacity .25s; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -88%) scale(.9); } to { opacity: 1; transform: translate(-50%, -100%); } }

/* 알림 막대 */
.toast { position: fixed; left: var(--pad); right: var(--pad); z-index: 6; bottom: calc(var(--sab) + var(--tabbar-h) + 104px); display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 20px; min-height: 56px; border-radius: 999px;
  background: rgba(44, 42, 58, 0.86); color: #fff; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--shadow);
  animation: toastIn .4s var(--spring); }
.toast.out { animation: toastOut .25s var(--ease) forwards; }
.toast .msg { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast .act { height: 44px; padding: 0 16px; border-radius: 999px; font-weight: 700; color: #FFC2CC; }
.toast .act:active { background: rgba(255,255,255,.12); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* 시트 */
.scrim { position: fixed; inset: 0; z-index: 10; background: rgba(44, 42, 58, 0.16); opacity: 0; transition: opacity .3s var(--ease); }
.scrim.light { background: transparent; }
.scrim.on { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; max-height: calc(100% - var(--sat) - 24px); display: flex; flex-direction: column;
  border-radius: var(--r-card) var(--r-card) 0 0; background: rgba(250, 249, 253, 0.92); -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: 0 -8px 40px rgba(60, 50, 90, 0.14); transform: translateY(105%); transition: transform .45s var(--spring); padding-bottom: calc(var(--sab) + 16px); }
.sheet.on { transform: none; }
.sheet.full { height: calc(100% - var(--sat) - 12px); }
.sheet.drag { transition: none; }
.sheet .grab { flex: none; height: 28px; display: grid; place-items: center; touch-action: none; cursor: grab; }
.sheet .grab::before { content: ''; width: 40px; height: 5px; border-radius: 3px; background: rgba(44, 42, 58, 0.16); }
.sheet .body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 var(--pad) 8px; overscroll-behavior: contain; flex: 1; }
.sheet .body::-webkit-scrollbar { display: none; }
.sheet .head { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 8px var(--pad); flex: none; }
.sheet .foot { padding: 12px var(--pad) 0; flex: none; display: flex; gap: 12px; }
.group { margin-top: 24px; }
.body > .group:first-child, .body > div > .group:first-child { margin-top: 8px; }
.body > div > div > .group:first-child { margin-top: 24px; }
.group-title { font-size: 13px; font-weight: 600; color: var(--sub); margin-bottom: 12px; }

/* 칩 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.line { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--pad)); padding: 4px var(--pad) 8px; scroll-snap-type: x proximity; scroll-padding: 0 var(--pad); }
.chips.line::-webkit-scrollbar { display: none; }
.chip { height: 44px; padding: 0 18px; border-radius: 999px; background: rgba(255,255,255,0.86); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 16px; font-weight: 600; white-space: nowrap; flex: none; scroll-snap-align: start;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: transform .22s var(--spring), background .2s, box-shadow .2s, color .2s; }
.chip:active { transform: scale(.94); }
.chip.on { background: var(--accent); color: #fff; box-shadow: none; }
.chip.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(238, 140, 156, 0.55); border: 0; color: var(--accent-press); outline: 1.5px dashed rgba(238,140,156,.0); }
.chip.ghost { background-image: none; box-shadow: none; border: 1.5px dashed rgba(217, 106, 126, 0.55); }
.chip.add { width: 44px; padding: 0; }
.chip.add svg.i { width: 20px; height: 20px; }
.chip-input { height: 44px; border-radius: 999px; border: 0; outline: 0; padding: 0 18px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--accent); font-weight: 600; width: 150px; flex: none; }

/* 세 칸 고르기 */
.seg { display: flex; gap: 8px; }
.seg .chip { flex: 1; padding: 0 8px; }

/* 기운 돌 다섯 */
.stones5 { display: flex; justify-content: space-between; align-items: center; padding: 4px 2px 0; }
.stone5 { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; transition: transform .25s var(--spring); }
.stone5 i { display: block; width: 46px; height: 40px; border-radius: 52% 48% 46% 54% / 58% 56% 44% 42%; box-shadow: inset 0 0 0 1px rgba(90,70,60,.08), inset -4px -6px 10px rgba(90,70,60,.12), inset 4px 5px 8px rgba(255,255,255,.6), 0 6px 14px rgba(60,50,90,.14); transition: transform .25s var(--spring); }
.stone5:nth-child(2) i { border-radius: 46% 54% 50% 50% / 52% 60% 40% 48%; }
.stone5:nth-child(3) i { border-radius: 55% 45% 52% 48% / 50% 52% 48% 50%; }
.stone5:nth-child(4) i { border-radius: 48% 52% 44% 56% / 60% 50% 50% 40%; }
.stone5:active i { transform: scale(.86); }
.stone5.on i { box-shadow: 0 0 0 3px #fff, 0 0 0 5.5px var(--accent), 0 6px 14px rgba(60,50,90,.14); }
.stones5.wait .stone5 { opacity: .6; }
.ends { display: flex; justify-content: space-between; margin-top: 8px; padding: 0 6px; }
.shake { animation: shake .4s ease; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* 입력 */
.field { width: 100%; min-height: 52px; border: 0; outline: 0; border-radius: var(--r-cell); padding: 14px 16px; background: rgba(255,255,255,0.86); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 16px; font-weight: 500; resize: none; }
.field:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.field::placeholder { color: #B4B0C2; }

/* 셈 */
.stepper { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.stepper .ctl { display: flex; align-items: center; gap: 4px; }
.stepper .val { min-width: 36px; text-align: center; font-weight: 700; font-size: 20px; }
.stepper .val.ghost { color: #C9A0AA; }
.round { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.86); box-shadow: inset 0 0 0 1.5px var(--line); display: grid; place-items: center; transition: transform .2s var(--spring); }
.round:active { transform: scale(.9); }
.round svg.i { width: 20px; height: 20px; }

/* 목록 줄 */
.rows { display: flex; flex-direction: column; }
.rowi { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.rowi:last-child { border-bottom: 0; }
.rowi .grow { flex: 1; min-width: 0; }
.rowi .dotc { width: 20px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset -2px -3px 5px rgba(0,0,0,.10), 0 2px 5px rgba(60,50,90,.12); }
.switch { width: 52px; height: 32px; border-radius: 999px; background: #E2DDE9; position: relative; transition: background .25s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15); transition: transform .3s var(--spring); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(20px); }

/* 병 탭 */
.bottle-head { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; }
.bottle-head .t-small { padding-bottom: 6px; }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.dots21 { display: grid; grid-template-columns: 72px repeat(7, 1fr); row-gap: 14px; align-items: center; }
.dots21 .lab { font-size: 13px; color: var(--sub); font-weight: 500; }
.dots21 .lab.cur { color: var(--text); font-weight: 600; }
.day { position: relative; height: 40px; display: grid; place-items: center; border-radius: 12px; }
.day:active { background: rgba(255,255,255,.5); }
.day i { display: block; border-radius: 50%; box-shadow: inset -2px -3px 5px rgba(0,0,0,.10), 0 2px 6px rgba(60,50,90,.12); transition: transform .3s var(--spring); }
.day.empty i { width: 14px; height: 14px; box-shadow: none; border: 1.5px dashed #BDB8CB; background: transparent; }
.day.future i { width: 6px; height: 6px; background: #D4CFE0; box-shadow: none; }
.day.today::after { content: ''; position: absolute; width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 0 2px var(--accent); }
.day.skip i { opacity: .35; }
.day.skip::before { content: ''; position: absolute; width: 18px; height: 2px; background: #A9A4B8; transform: rotate(-45deg); border-radius: 1px; }
.steps3 { display: flex; gap: 6px; margin-top: 16px; }
.steps3 > div { flex: 1; }
.steps3 .bar { height: 6px; border-radius: 3px; background: rgba(44,42,58,.08); overflow: hidden; }
.steps3 .bar b { display: block; height: 100%; background: var(--text); opacity: .75; border-radius: 3px; }
.steps3 .t-small { margin-top: 8px; display: block; }
.steps3 .cur .t-small { color: var(--text); font-weight: 600; }
.evid { display: inline-flex; gap: 4px; vertical-align: middle; margin-right: 6px; }
.evid i { width: 7px; height: 7px; border-radius: 50%; background: rgba(44,42,58,.15); }
.evid i.on { background: var(--text); }
.shelf { display: flex; gap: 16px; overflow-x: auto; margin: 0 calc(-1 * var(--pad)); padding: 8px var(--pad) 16px; scroll-snap-type: x mandatory; }
.shelf::-webkit-scrollbar { display: none; }
.shelf button { flex: none; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform .25s var(--spring); }
.shelf button:active { transform: scale(.94); }
.shelf-empty { height: 120px; border-radius: var(--r-card); border: 1.5px dashed rgba(44,42,58,.12); display: grid; place-items: center; }
.plank { height: 10px; border-radius: 5px; background: linear-gradient(180deg, #EFE4D6, #DCCBB6); margin: -14px -4px 0; box-shadow: 0 6px 14px rgba(60,50,90,.10); }

/* 지도 탭 */
.map-head { display: flex; justify-content: space-between; align-items: center; }
.period { height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.period svg.i { width: 16px; height: 16px; }
.map { position: relative; aspect-ratio: 1 / 1; margin-top: 32px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.map .q { position: absolute; width: 50%; height: 50%; padding: 14px 16px; font-size: 13px; font-weight: 600; color: var(--sub); }
.map .q:nth-child(1) { left: 0; top: 0; }
.map .q:nth-child(2) { right: 0; top: 0; text-align: right; background: rgba(238, 140, 156, 0.06); }
.map .q:nth-child(3) { left: 0; bottom: 0; display: flex; align-items: flex-end; }
.map .q:nth-child(4) { right: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: flex-end; }
.map .axis-h, .map .axis-v { position: absolute; background: rgba(44,42,58,.08); }
.map .axis-h { left: 16px; right: 16px; top: 50%; height: 1.5px; }
.map .axis-v { top: 16px; bottom: 16px; left: 50%; width: 1.5px; }
.map .st { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 48px; min-height: 48px; justify-content: center; transition: transform .3s var(--spring); }
.map .st:active { transform: translate(-50%, -50%) scale(.92); }
.map .st i { display: block; border-radius: 52% 48% 46% 54% / 58% 56% 44% 42%; box-shadow: inset -3px -4px 8px rgba(0,0,0,.12), inset 3px 3px 6px rgba(255,255,255,.5), 0 4px 10px rgba(60,50,90,.16); }
.map .st span { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; text-shadow: 0 1px 0 rgba(255,255,255,.8); }
.map .st.faint { opacity: .45; }
.map .st.sel i { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--accent); }
.map-note { margin-top: 16px; text-align: center; min-height: 44px; }
.foot-note { margin-top: 24px; text-align: center; }

/* 꾸미기 */
.deco-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.deco-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.deco-item { border-radius: var(--r-cell); background: rgba(255,255,255,.8); box-shadow: inset 0 0 0 1.5px var(--line); padding: 14px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 112px; transition: transform .22s var(--spring), box-shadow .2s; position: relative; }
.deco-item:active { transform: scale(.95); }
.deco-item.on { box-shadow: inset 0 0 0 2.5px var(--accent); }
.deco-item.locked { color: var(--sub); }
.deco-item .sw { width: 48px; height: 48px; border-radius: 14px; }
.deco-item.locked .sw { filter: grayscale(.8) opacity(.5); }
.deco-item .lock { position: absolute; top: 8px; right: 8px; color: var(--sub); }
.deco-item .lock svg.i { width: 16px; height: 16px; }
.deco-item .new { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.deco-rule { min-height: 44px; margin-top: 16px; text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* 새로 생겼어요 */
.unlock { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(44,42,58,.12); opacity: 0; transition: opacity .3s var(--ease); }
.unlock.on { opacity: 1; }
.unlock .card { width: calc(100% - 48px); max-width: 360px; text-align: center; padding: 32px 24px 20px; transform: scale(.9) translateY(20px); transition: transform .5s var(--spring); }
.unlock.on .card { transform: none; }
.unlock .gem { width: 96px; height: 96px; margin: 0 auto 20px; border-radius: 28px; position: relative; animation: floaty 3s ease-in-out infinite; }
.unlock .gem::after { content: ''; position: absolute; inset: -18px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.9), transparent); z-index: -1; }
.unlock .spark { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff; animation: spark 1.6s ease-out infinite; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
@keyframes spark { from { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } to { opacity: 0; transform: translateY(-30px) scale(1); } }

/* 대화 상자 */
.dialog { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(44,42,58,.2); opacity: 0; transition: opacity .25s; }
.dialog.on { opacity: 1; }
.dialog .card { width: calc(100% - 64px); max-width: 320px; text-align: center; padding: 28px 20px 16px; transform: scale(.94); transition: transform .4s var(--spring); }
.dialog.on .card { transform: none; }
.dialog .row { display: flex; gap: 8px; margin-top: 20px; }
.dialog .row .btn { flex: 1; height: 52px; }
.btn-danger { background: #2C2A3A; color: #fff; }

/* 홈 화면 안내 */
.install { position: fixed; left: 16px; right: 16px; top: calc(var(--sat) + 76px); z-index: 2; }
.install .card { display: flex; gap: 14px; align-items: center; padding: 16px 12px 16px 20px; animation: rise .5s var(--spring); }
.install .app-ic { width: 48px; height: 48px; border-radius: 12px; flex: none; box-shadow: 0 4px 12px rgba(60,50,90,.12); }
.install .grow { flex: 1; }
.install svg.i { width: 18px; height: 18px; vertical-align: -3px; }

.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt40 { margin-top: 40px; }
.muted { color: var(--sub); }
.spacer { height: 24px; }
.loading { position: fixed; inset: 0; display: grid; place-items: center; z-index: 50; background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom)); transition: opacity .5s var(--ease); }
.loading.out { opacity: 0; pointer-events: none; }
.loading img { width: 88px; height: 88px; border-radius: 22px; box-shadow: var(--shadow); animation: floaty 2.4s ease-in-out infinite; }

/* 움직임 줄이기: 위치 이동을 페이드로 */
.rm *, .rm *::before, .rm *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
.rm .view, .rm .sheet, .rm .toast, .rm .unlock .card, .rm .dialog .card { transform: none !important; }
.rm .sheet { opacity: 0; transition: opacity .25s !important; }
.rm .sheet.on { opacity: 1; }
