@font-face { font-family: 'Pretendard'; font-weight: 500; font-display: swap; src: url('./assets/fonts/Pretendard-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Pretendard'; font-weight: 700; font-display: swap; src: url('./assets/fonts/Pretendard-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Pretendard'; font-weight: 800; font-display: swap; src: url('./assets/fonts/Pretendard-ExtraBold.woff2') format('woff2'); }

/* ── 공통 규칙 (디자인 캔버스 ① 기준) ──
   헤딩 Black Han Sans · 본문 Pretendard · Primary #FF3D8B 한 가지
   CTA 56 / 라운드 14 / 핑크 / 흰 글씨 17 Bold · 카드 라운드 20 · 시트 라운드 24 */
:root {
  --primary: #FF3D8B;
  --header-height: calc(56px + env(safe-area-inset-top));
  --primary-soft: rgba(255, 61, 139, 0.16);
  --hf: 'Black Han Sans', 'Pretendard', system-ui, sans-serif;
  --bf: 'Pretendard', system-ui, -apple-system, sans-serif;
  --bg: #0B0B0F; --text: #FFFFFF; --sub: #A8A9B8; --meta: #8B8F99; --body: #D6D7DE;
  --tile: rgba(255, 255, 255, 0.07); --card: rgba(255, 255, 255, 0.08); --line: rgba(255, 255, 255, 0.14);
  --chip: #1F1F24; --chip-text: #D9D9E0; --sheet: #141418; --handle: #3A3A42;
  --input-bg: rgba(255, 255, 255, 0.06); --input-border: rgba(255, 255, 255, 0.18);
  --pill-bg: #FFFFFF; --pill-text: #111114; --badge-bg: #FFFFFF; --badge-text: #111114;
  --star: #FFFFFF; --eaten: #6E727C; --dot-off: rgba(255, 255, 255, 0.22); --scrim: rgba(0, 0, 0, 0.55);
  --letter-bg: radial-gradient(120% 70% at 90% 0%, #3B1428 0%, #16101A 45%, #0B0B0F 75%);
  --blend: screen; --fab-bg: #FFFFFF; --fab-text: #111114;
}
:root[data-theme="light"] {
  --bg: #FFFFFF; --text: #111114; --sub: #6E727C; --meta: #9A9EA8; --body: #3A3D45;
  --tile: #F4F5F7; --card: #F4F5F7; --line: #ECEEF2;
  --chip: #F4F5F7; --chip-text: #4A4E57; --sheet: #FFFFFF; --handle: #E1E3E8;
  --input-bg: #FFFFFF; --input-border: #E1E3E8;
  --pill-bg: #111114; --pill-text: #FFFFFF; --badge-bg: #111114; --badge-text: #FFFFFF;
  --star: #FFC2D9; --eaten: #A3A7B0; --dot-off: #DADDE3; --scrim: rgba(0, 0, 0, 0.32);
  --letter-bg: linear-gradient(200deg, #FFDCEA 0%, #FFF4F8 38%, #FFFFFF 62%);
  --blend: multiply; --fab-bg: #111114; --fab-text: #FFFFFF;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
/* 모바일에서 빠르게 연속 탭해도(빼빼로 먹이기) 화면이 확대되거나 옆으로 밀리지 않게 */
html, body { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html { overflow-x: hidden; }
body { overflow-x: clip; }
button, a, [data-act] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body { background: #050507; font-family: var(--bf); color: var(--text); -webkit-font-smoothing: antialiased; }
:root[data-theme="light"] body { background: #EDEEF1; }
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
img { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app {
  position: relative; max-width: 430px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); overflow: hidden;
}
.screen { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); }

/* 상단 바 */
.topbar { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 8px 0 20px; position: relative; z-index: 2; }
.topbar.back { padding-left: 8px; }
.brand { font-family: var(--hf); font-size: 19px; }
.bar-title { font-size: 15px; font-weight: 500; color: var(--sub); }
.icon-btn { position: relative; width: 44px; height: 44px; border: none; background: transparent; color: var(--text); display: flex; align-items: center; justify-content: center; text-decoration: none; border-radius: 12px; }
.icon-btn:focus-visible, .cta:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.count-badge { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--primary); color: #fff; font: 500 10px var(--bf); display: flex; align-items: center; justify-content: center; }

/* 헤딩·텍스트 */
.chip { height: 28px; padding: 0 12px; border-radius: 14px; background: var(--chip); color: var(--chip-text); font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; }
.h-hero { margin: 0; font-family: var(--hf); font-weight: 400; font-size: 46px; line-height: 1.2; color: var(--primary); }
.h1 { margin: 0; font-family: var(--hf); font-weight: 400; font-size: 30px; line-height: 1.35; }
.h2 { margin: 0; font-family: var(--hf); font-weight: 400; font-size: 26px; line-height: 1.35; }
.big { font-family: var(--hf); font-size: 38px; line-height: 1.25; }
.label { font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--sub); }
.meta { font-size: 12px; font-weight: 500; color: var(--meta); }

/* 안내 카드 */
.hint-card { width: 100%; min-height: 60px; padding: 10px 16px 10px 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
:root[data-theme="light"] .hint-card { border-color: var(--card); }
.hint-icon { width: 36px; height: 36px; flex: none; border-radius: 12px; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; }
.hint-text { flex: 1; min-width: 0; font-size: 16px; font-weight: 500; letter-spacing: -0.3px; line-height: 1.4; }

/* CTA */
.cta { width: 100%; height: 56px; border: none; border-radius: 14px; background: var(--primary); color: #fff; font: 500 17px var(--bf); display: flex; align-items: center; justify-content: center; text-decoration: none; transition: opacity .2s, transform .1s; }
.cta:active { transform: scale(.98); }
.cta[disabled], .cta[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.text-btn { height: 48px; padding: 0 20px; border: none; background: transparent; color: var(--sub); font: 500 15px var(--bf); }
.bottom-cta { position: sticky; bottom: 0; padding: 12px 20px calc(24px + env(safe-area-inset-bottom)); background: var(--bg); z-index: 3; }

/* ① 메인 */
.main-head { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 20px 0; position: relative; z-index: 1; text-align: center; }
.cats { display: flex; flex-direction: column; padding: 4px 20px 0; position: relative; z-index: 1; }
.cat-row { position: relative; height: 136px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; gap: 24px; transition: opacity .2s; }
.cat-row.dim { opacity: .3; }
.cat-row img { width: 128px; height: 128px; image-rendering: pixelated; }
.cat-badge { width: 64px; height: 40px; border-radius: 20px; background: var(--badge-bg); color: var(--badge-text); font: 500 18px var(--bf); display: flex; align-items: center; justify-content: center; }
.tray { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 16px 20px calc(24px + env(safe-area-inset-bottom)); margin-top: auto; position: relative; z-index: 1; }
.slot { position: relative; height: 96px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
:root[data-theme="light"] .slot { border-color: var(--card); }
.slot .eaten { font: 500 15px var(--bf); color: var(--eaten); }
.spark { position: absolute; }
.deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.deco .star { position: absolute; width: 3px; height: 3px; background: var(--star); }

/* 시트·스크림 */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 20; animation: fadeIn .2s ease-out; }
.sheet { position: fixed; left: 50%; bottom: 0; width: 100%; max-width: 430px; transform: translateX(-50%); max-height: 78dvh; background: var(--sheet); color: var(--text); border-radius: 24px 24px 0 0; display: flex; flex-direction: column; z-index: 21; animation: sheetUp .35s ease-out; }
.sheet-handle { display: flex; justify-content: center; padding-top: 10px; }
.sheet-handle span { width: 36px; height: 4px; border-radius: 2px; background: var(--handle); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 0 20px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 20px 12px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; }
.sheet-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.num-badge { width: 28px; height: 28px; border-radius: 14px; background: var(--primary); color: #fff; font-size: 15px; font-weight: 500; display: flex; align-items: center; justify-content: center; }
.head-title { font-size: 16px; font-weight: 500; letter-spacing: -0.3px; }
.pill { height: 36px; padding: 0 16px; border-radius: 18px; background: var(--pill-bg); color: var(--pill-text); font-size: 14px; font-weight: 500; display: flex; align-items: center; }
.pill-tip { display: flex; flex-direction: column; align-items: center; }
.pill-tip svg path { fill: var(--pill-bg); }

/* 타일 */
.tile { background: var(--tile); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.tile-title { font-size: 15px; font-weight: 500; letter-spacing: -0.3px; line-height: 1.45; }
.item { display: flex; gap: 8px; font-size: 14px; font-weight: 500; line-height: 1.65; color: var(--body); }
b, strong { font-weight: 500; }
.item b { color: var(--text); font-weight: 500; }
.bullet { color: var(--meta); }
.body { font-size: 14px; font-weight: 500; line-height: 1.7; color: var(--body); margin: 0; }
.blur { filter: blur(5px); pointer-events: none; user-select: none; display: flex; flex-direction: column; gap: 10px; }

/* 잠금·동의 */
.lock-card { border: 1px solid var(--line); border-radius: 20px; padding: 20px 18px; display: flex; flex-direction: column; gap: 14px; }
.lock-head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.lock-icon { width: 48px; height: 48px; border-radius: 16px; background: rgba(255, 61, 139, 0.14); display: flex; align-items: center; justify-content: center; }
.lock-title { font-family: var(--hf); font-size: 20px; line-height: 1.4; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 500; }
.input { width: 100%; height: 48px; border-radius: 12px; border: 1px solid var(--input-border); background: var(--input-bg); color: var(--text); padding: 0 14px; font: 500 16px var(--bf); }
.input::placeholder, textarea::placeholder { color: #8E929C; }
.input[aria-invalid="true"] { border-color: var(--primary); }
.err { font-size: 12px; font-weight: 500; color: var(--primary); }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seg button { height: 48px; border-radius: 12px; border: 1px solid var(--input-border); background: var(--input-bg); color: var(--text); font: 500 14px var(--bf); }
.seg button[aria-pressed="true"] { border: 2px solid var(--primary); background: rgba(255, 61, 139, 0.10); }
.consent { display: flex; flex-direction: column; padding: 4px 14px; border-radius: 16px; background: var(--tile); }
.consent-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.check { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; font-weight: 500; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--primary); }
.detail-btn { flex: none; height: 44px; padding: 0 2px; border: none; background: transparent; color: var(--sub); font: 500 13px var(--bf); display: flex; align-items: center; gap: 2px; }
.detail-btn svg { transition: transform .2s; }
.detail-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.detail { display: flex; flex-direction: column; gap: 12px; padding: 12px 0 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail dt { font-size: 12px; font-weight: 500; margin-bottom: 4px; }
.detail dd { margin: 0; font-size: 12px; font-weight: 500; line-height: 1.6; color: var(--sub); }

/* 서랍 */
.drawer { position: fixed; top: 0; right: max(0px, calc((100vw - 430px) / 2)); width: min(316px, 84vw); height: 100dvh; background: var(--sheet); border-radius: 24px 0 0 24px; display: flex; flex-direction: column; z-index: 21; animation: drawerIn .3s ease-out; padding-top: env(safe-area-inset-top); }
.drawer-title { font-family: var(--hf); font-size: 22px; }
.saved-row { background: var(--tile); border-radius: 20px; padding: 14px; display: flex; align-items: center; gap: 12px; }
.saved-row img { width: 48px; height: 48px; image-rendering: pixelated; border-radius: 12px; object-fit: cover; flex: none; }

/* 온보딩 */
.guide { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); width: calc(100% - 40px); max-width: 390px; transform: translateX(-50%); padding: 28px 20px 20px; border-radius: 24px; background: var(--sheet); display: flex; flex-direction: column; align-items: center; gap: 18px; z-index: 21; animation: guideIn .35s ease-out; }
.guide-icon { width: 72px; height: 72px; border-radius: 22px; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.step { height: 64px; border-radius: 16px; background: var(--tile); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 500; }
.step span { width: 20px; height: 20px; border-radius: 10px; background: var(--primary); color: #fff; font: 500 11px var(--bf); display: flex; align-items: center; justify-content: center; }

/* ② 고르기 */
.pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 28px 20px 0; }
.pick-item { border-radius: 20px; padding: 8px 6px 12px; border: 2px solid transparent; background: var(--tile); color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 10px; transition: transform .2s; }
.pick-item[aria-pressed="true"] { border-color: var(--primary); background: rgba(255, 61, 139, 0.08); transform: translateY(-8px); }
.stone-box { width: 100%; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; }
.stone-box img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.card-img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 14px; }
.pick-name { font-family: var(--hf); font-size: 20px; }
.pick-label { font-size: 14px; font-weight: 500; }

/* ③ 결과 */
.result-meta { display: flex; align-items: center; gap: 12px; padding-bottom: 6px; }
.result-meta img { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; }
.content { flex: 1; padding: 8px 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.letter-thumb { width: 88px; height: 88px; object-fit: cover; mix-blend-mode: var(--blend); animation: letterFloat 2.4s ease-in-out infinite; }
.fab { position: fixed; right: max(12px, calc((100vw - 430px) / 2 + 12px)); bottom: calc(104px + env(safe-area-inset-bottom)); width: 168px; height: 77px; padding: 0; border: none; background: transparent; z-index: 10; cursor: pointer; }
.fab svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
[data-theme="dark"] .fab svg { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .55)); }
[data-theme="light"] .fab svg g:first-child { fill: #fff; }
[data-theme="light"] .fab svg { filter: drop-shadow(0 2px 8px rgba(17, 17, 20, .16)) drop-shadow(0 0 1px rgba(17, 17, 20, .22)); }
[data-theme="light"] .fab span { color: #111114; }
.fab span { position: absolute; left: 64px; right: 6px; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; color: #fff; font: 500 15px var(--bf); letter-spacing: -0.3px; white-space: nowrap; }
.mood { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mood button { height: 48px; border-radius: 14px; border: 2px solid transparent; background: var(--tile); color: var(--text); font: 500 14px var(--bf); }
.mood button[aria-pressed="true"] { border-color: var(--primary); background: rgba(255, 61, 139, 0.10); }
textarea.input { height: auto; padding: 14px; resize: none; line-height: 1.5; }

/* 편지 (토스식) */
.letter-screen { position: fixed; inset: 0; margin: 0 auto; max-width: 430px; background: var(--letter-bg); display: flex; flex-direction: column; z-index: 30; animation: fadeIn .35s ease-out; padding-top: env(safe-area-inset-top); }
.letter-screen.plain { background: var(--bg); }
.letter-title-top { margin: 0; padding: 72px 24px 0; font-family: var(--hf); font-weight: 400; font-size: 30px; line-height: 1.35; animation: fadeUp .45s ease-out .15s both; }
.letter-stage { flex: 1; position: relative; }
.letter-big { position: absolute; right: -40px; bottom: 30px; width: 340px; height: 340px; object-fit: cover; mix-blend-mode: var(--blend); animation: letterFly .9s cubic-bezier(.2, .8, .2, 1) both, letterFloat 3s ease-in-out .9s infinite; }
.letter-mid { width: 220px; height: 220px; object-fit: cover; mix-blend-mode: var(--blend); animation: letterPop .55s cubic-bezier(.2, .8, .2, 1) both; }
.letter-foot { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 20px calc(24px + env(safe-area-inset-bottom)); }
.share-sheet { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); width: calc(100% - 24px); max-width: 406px; transform: translateX(-50%); padding: 0 8px 28px; border-radius: 28px; background: var(--sheet); z-index: 32; animation: sheetUp .3s ease-out; }
.share-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 18px; }
.share-grid button { border: none; background: transparent; color: var(--text); font: 500 13px var(--bf); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0; }
.share-circle { width: 56px; height: 56px; border-radius: 28px; display: flex; align-items: center; justify-content: center; }

/* 토스트 */
#toast { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 50; pointer-events: none; max-width: calc(100% - 32px); }
#toast .t { height: 40px; padding: 0 18px; border-radius: 20px; background: var(--pill-bg); color: var(--pill-text); font: 500 14px var(--bf); display: flex; align-items: center; white-space: nowrap; animation: fadeUp .25s ease-out; }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 15; overflow: hidden; }

/* 애니메이션 */
@keyframes heartUpL { 0% { opacity: 0; transform: translate(0, 0) scale(.3); } 15% { opacity: 1; transform: translate(-4px, -14px) scale(1); } 100% { opacity: 0; transform: translate(-26px, -120px) scale(1.15); } }
@keyframes heartUpR { 0% { opacity: 0; transform: translate(0, 0) scale(.3); } 15% { opacity: 1; transform: translate(4px, -14px) scale(1); } 100% { opacity: 0; transform: translate(26px, -120px) scale(1.15); } }
@keyframes squish { 0% { transform: scale(1); } 35% { transform: scale(1.1, .88); } 70% { transform: scale(.96, 1.05); } 100% { transform: scale(1); } }
@keyframes feedFly { 0% { transform: translate(var(--dx), var(--dy)) rotate(35deg) scale(1); opacity: 1; } 80% { transform: translate(0, 0) rotate(-25deg) scale(.95); opacity: 1; } 100% { transform: translate(0, 0) rotate(-25deg) scale(.2); opacity: 0; } }
@keyframes sheetUp { 0% { transform: translate(-50%, 100%); } 100% { transform: translate(-50%, 0); } }
@keyframes drawerIn { 0% { transform: translateX(100%); } 100% { transform: translateX(0); } }
@keyframes guideIn { 0% { opacity: 0; transform: translate(-50%, 16px); } 100% { opacity: 1; transform: translate(-50%, 0); } }
@keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes fadeUp { 0% { opacity: 0; transform: translateY(14px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes letterFly { 0% { opacity: 0; transform: translate(180px, 260px) rotate(28deg) scale(.55); } 70% { opacity: 1; transform: translate(-8px, -6px) rotate(-4deg) scale(1.03); } 100% { opacity: 1; transform: none; } }
@keyframes letterFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes letterPop { 0% { opacity: 0; transform: scale(.6) rotate(-8deg); } 70% { opacity: 1; transform: scale(1.06) rotate(2deg); } 100% { opacity: 1; transform: none; } }
.squish { animation: squish .38s ease; }
.still { animation: none !important; }
#toast .t, .share-sheet, .sheet, .guide { will-change: transform; }

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

/* ⓪ 홈 — 강아지(화이트) / 고양이(다크) 입구 */
.topbar.with-home { padding-left: 8px; justify-content: flex-start; gap: 2px; }
.topbar.with-home .icon-btn:last-child { margin-left: auto; }
.home { background: #F4F5F7; color: #111114; }
.home-head { display: flex; flex-direction: column; gap: 8px; padding: 12px 20px 0; }
.home-title { font-size: 34px; line-height: 1.3; color: #111114; text-align: left; }
.home-head .label { color: #6E727C; font-size: 15px; }
.home-doors { display: flex; flex-direction: column; gap: 12px; padding: 24px 20px calc(28px + env(safe-area-inset-bottom)); }
.door { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px 20px 18px; border-radius: 24px; border: none; text-align: left; cursor: pointer; font-family: var(--bf); overflow: hidden; }
.door-dog { background: #FFFFFF; color: #111114; }
.door-cat { background: #0B0B0F; color: #FFFFFF; }
.door:active { transform: scale(.98); }
.home-pets { display: flex; margin: -4px 0 4px -6px; }
.home-pets img { width: 72px; height: 72px; image-rendering: pixelated; margin-right: -14px; }
.door-chip { height: 26px; padding: 0 10px; border-radius: 13px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 500; }
.door-dog .door-chip { background: #F4F5F7; color: #4A4E57; }
.door-cat .door-chip { background: #1F1F24; color: #D9D9E0; }
.door-title { font-family: var(--hf); font-size: 26px; line-height: 1.3; }
.door-go { margin-top: 4px; font-size: 15px; font-weight: 500; color: #FF3D8B; }

/* ── 하단 고정 2버튼 (이전 / 주요 행동) ── */
.cta-bar { position: sticky; bottom: 0; margin-top: auto; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); z-index: 3; }
.cta-row { display: flex; gap: 8px; width: 100%; }
.cta-row .cta { flex: 1; width: auto; min-width: 0; }
.cta-sub { flex: 0 0 32%; height: 56px; border: none; border-radius: 14px; background: var(--tile); color: var(--text); font: 500 17px var(--bf); cursor: pointer; transition: transform .1s; }
.cta-sub:active { transform: scale(.98); }
.topbar.center { justify-content: center; padding: 0 20px; }
.letter-foot .cta-row { margin-top: 4px; }

/* ── 결과 시트: 처음부터 전면을 덮고, 시트 본문만 스크롤 ── */
.sheet:not(.fb-sheet) { top: 0; bottom: 0; height: 100dvh; max-height: none; border-radius: 0; padding-top: env(safe-area-inset-top); }
.sheet:not(.fb-sheet) .sheet-handle { display: none; }
.sheet-body { overscroll-behavior: contain; min-height: 0; }
.fb-sheet { overflow-y: auto; overscroll-behavior: contain; }
html.lock, html.lock body { overflow: hidden; overscroll-behavior: none; }
.scrim, .guide, .letter-screen { overscroll-behavior: contain; touch-action: none; }
.letter-screen .cta-row, .guide .cta-row { touch-action: manipulation; }

/* ── 의견 남기기 FAB: 펼침 ↔ 접힘 ── */
.fab { bottom: calc(100px + env(safe-area-inset-bottom)); transition: width .28s ease; }
.fab .paw-mini { opacity: 0; }
.fab .paw-full, .fab span { transition: opacity .2s; }
.fab.mini { width: 72px; }
.fab.mini .paw-full, .fab.mini span { opacity: 0; }
.fab.mini .paw-mini { opacity: 1; }
[data-theme="light"] .fab .paw-mini g:first-child { fill: #fff; }

/* 홈 카드: 가로 2열 · 아이콘 1마리 */
.home-doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 28px 20px 0; }
.home-doors .door { min-height: 176px; padding: 18px 16px 16px; gap: 6px; border-radius: 22px; box-shadow: 0 6px 18px rgba(17, 17, 20, .06); }
.door::after { content: ''; position: absolute; right: -36px; top: -36px; width: 112px; height: 112px; border-radius: 50%; pointer-events: none; }
.door-dog::after { background: #FFF0F6; }
.door-cat::after { background: rgba(255, 255, 255, .06); }
.door > * { position: relative; z-index: 1; }
.door-icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; overflow: hidden; }
.door-dog .door-icon { background: #FFE4EF; }
.door-cat .door-icon { background: rgba(255, 255, 255, .14); }
.door-icon img { width: 44px; height: 44px; image-rendering: pixelated; }
.home-doors .door-chip { height: 22px; padding: 0 8px; font-size: 11px; }
.home-doors .door-title { font-size: 20px; line-height: 1.3; }
.home-doors .door-go { margin-top: auto; font-size: 13px; }

/* 홈 배너: 요크셔가 말하는 말풍선 */
.home-banner { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin: 12px 20px 16px; padding: 16px 16px 0 6px; min-height: 120px; border-radius: 22px; background: #FFE4EF; overflow: hidden; }
.banner-bubble { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; align-self: center; margin-bottom: 14px; color: #111114; letter-spacing: -0.3px; }
.banner-h { font-family: var(--hf); font-weight: 400; font-size: 17px; line-height: 1.35; color: #111114; letter-spacing: -0.2px; }
.banner-sub { font-size: 12px; font-weight: 500; line-height: 1.5; color: #6E727C; }
.banner-yorkie { flex: none; width: 104px; height: auto; mix-blend-mode: multiply; }

/* 빼빼로 비 */
.home { position: relative; overflow: hidden; }
.home > :not(.pepero-rain):not(.drawer):not(.scrim):not(.bottom-nav):not(.w-cta):not(.w-chest):not(.login-sheet):not(.ad-full):not(.w-map-fab) { position: relative; z-index: 1; }
.pepero-rain { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.pepero-rain span { position: absolute; top: -80px; opacity: .85; animation: pepero-fall linear infinite; }
@keyframes pepero-fall {
  from { transform: translateY(0) rotate(var(--rot)); }
  to { transform: translateY(calc(100vh + 160px)) rotate(calc(var(--rot) + 360deg)); }
}
@media (prefers-reduced-motion: reduce) { .pepero-rain { display: none; } }

/* Shared home header stays visible; all screen content sits below it. */
#app { padding-top: var(--header-height); overflow: clip; }
.screen { min-height: calc(100dvh - var(--header-height)); padding-top: 0; }
.site-header { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; height: var(--header-height); padding-top: env(safe-area-inset-top); background: var(--bg); z-index: 40; gap: 12px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; flex-shrink: 0; }
.brand:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.site-header .bar-title { text-align: right; font-size: 12px; }
.cta-bar, .bottom-cta { position: relative; bottom: auto; }
.sheet:not(.fb-sheet) { top: var(--header-height); height: calc(100dvh - var(--header-height)); padding-top: 0; }
.sheet { max-height: calc(100dvh - var(--header-height)); }
.drawer { top: var(--header-height); height: calc(100dvh - var(--header-height)); padding-top: 0; }
.letter-screen { top: var(--header-height); padding-top: 0; overflow-x: hidden; overflow-y: auto; touch-action: pan-y; }
.letter-screen > * { flex-shrink: 0; }
.letter-stage { min-height: 370px; }
.letter-screen.plain > :first-child { min-height: 420px; }
.guide { max-height: calc(100dvh - var(--header-height) - 40px); overflow-y: auto; touch-action: pan-y; }

/* ②-1 정보 입력: 고른 카드·원석 요약 */
.info-pick { display: flex; align-items: center; gap: 12px; padding: 4px 0 6px; }
.info-pick img { width: 48px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }

/* 저장한 결과운: 누르면 다시 보기 */
.saved-row { width: 100%; border: none; text-align: left; color: var(--text); font-family: inherit; cursor: pointer; transition: transform .1s; }
.saved-row:active { transform: scale(.98); }

/* ───────── 편지 보내기 팝업 ───────── */
.share-scrim { z-index: 32; background: rgba(0, 0, 0, .55); }
.share-pop { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 33; width: calc(100% - 40px); max-width: 360px; background: var(--sheet); color: var(--text); border-radius: 24px; padding: 24px 16px 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); animation: popIn .25s cubic-bezier(.2, .8, .2, 1); }
.share-pop .h2 { margin: 0; font-size: 20px; }
.share-pop .share-grid { width: 100%; margin-top: 10px; }
.share-pop .share-circle { width: 52px; height: 52px; }
.share-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: none; border-radius: 18px; background: transparent; color: var(--text); display: flex; align-items: center; justify-content: center; opacity: .6; }
.share-link { width: 100%; display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 8px 8px 12px; border-radius: 14px; background: var(--tile); }
.share-link-url { flex: 1; min-width: 0; font-size: 12px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .8; }
.share-link-btn { flex: none; border: none; border-radius: 10px; padding: 8px 10px; background: var(--primary); color: #fff; font: 600 12px var(--bf); }
.share-more { margin-top: 4px; border: none; background: transparent; color: var(--text); opacity: .65; font: 500 13px var(--bf); text-decoration: underline; padding: 8px; }
@keyframes popIn { 0% { opacity: 0; transform: translate(-50%, -46%) scale(.96); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* ───────── 편지 보내기 바텀시트 — 결과 위에 떠 있어요 ───────── */
.send-scrim { z-index: 29; }
.send-sheet { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; width: calc(100% - 32px); max-width: 398px; background: var(--sheet); color: var(--text); border-radius: 28px; padding: 28px 20px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; box-shadow: 0 12px 40px rgba(0, 0, 0, .18); animation: sheetUp .35s cubic-bezier(.2, .8, .2, 1); }
.send-img { width: 76px; height: 76px; object-fit: cover; mix-blend-mode: var(--blend); margin-bottom: 4px; }
.send-title { margin: 0; font-family: var(--hf); font-weight: 400; font-size: 20px; line-height: 1.35; }
.send-sub { font-size: 14px; }
.send-sheet .cta-row { margin-top: 14px; }

/* ───────── 하단 탭 (타로 · 만보기) — 모든 화면 ───────── */
:root { --bnav-h: calc(64px + env(safe-area-inset-bottom)); }
#app .screen { padding-bottom: var(--bnav-h); }
.bottom-nav { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 22; width: 100%; max-width: 430px; height: var(--bnav-h); display: flex; background: var(--bg); border-top: 1px solid var(--line); padding: 4px 12px env(safe-area-inset-bottom); }
.bottom-nav.light { background: rgba(255, 255, 255, .96); border-top-color: #ECEEF2; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.bnav-item { flex: 1; height: 56px; border: none; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--meta); font: 600 11px var(--bf); }
.bottom-nav.light .bnav-item { color: #A3A7B0; }
.bnav-item[aria-current="page"], .bottom-nav.light .bnav-item[aria-current="page"] { color: #FF3D8B; }
/* 하단 탭 위로 올리기 */
.sheet:not(.fb-sheet) { height: calc(100dvh - var(--header-height) - var(--bnav-h)) !important; bottom: auto; }
.fb-sheet { bottom: var(--bnav-h); }
.drawer { height: calc(100dvh - var(--header-height) - var(--bnav-h)) !important; }
.guide { bottom: calc(var(--bnav-h) + 16px); }
.fab { bottom: calc(var(--bnav-h) + 92px) !important; }
.send-sheet { bottom: calc(var(--bnav-h) + 12px); }

/* ───────── 멍산책 ───────── */
.walk { --walk: #FF3D8B; --walk-soft: #FFE4EF; background: #F4F5F7; }
.w-head { display: flex; flex-direction: column; gap: 6px; padding: 8px 20px 0; }
.w-kicker { align-self: flex-start; padding: 4px 10px; border-radius: 10px; background: var(--walk); color: #fff; font-size: 12px; font-weight: 700; }
.walk .home-title { font-size: 30px; }
.w-pts-pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 6px; border: none; border-radius: 17px; background: #fff; color: #111114; font: 700 14px var(--bf); box-shadow: 0 2px 10px rgba(17, 17, 20, .08); }
.w-coin { width: 22px; height: 22px; border-radius: 11px; background: var(--walk, #FF3D8B); color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.w-card { margin: 14px 20px 0; padding: 18px; border-radius: 22px; background: #fff; box-shadow: 0 6px 18px rgba(17, 17, 20, .05); color: #111114; }
.w-today { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: 22px; }
.w-ring { width: 168px; height: 168px; }
.w-ring-in { position: absolute; top: 22px; width: 168px; height: 168px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.w-big { font-family: var(--hf); font-size: 36px; line-height: 1.1; color: #111114; }
.w-stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; margin-top: 16px; text-align: center; }
.w-stats > div { display: flex; flex-direction: column; gap: 2px; }
.w-stats b { font-size: 18px; font-weight: 800; color: #111114; }
.w-stats span { font-size: 12px; color: #8E929C; font-weight: 500; }
.w-shop-card { display: flex; align-items: center; gap: 12px; width: calc(100% - 40px); border: none; text-align: left; font: inherit; background: var(--walk-soft); }
.w-shop-ico { font-size: 28px; }
.w-shop-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.w-shop-txt b { font-size: 15px; }
.w-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #ECEEF2; }
.w-row:first-of-type { border-top: none; }
.w-row-ico { font-size: 20px; }
.w-row-main { flex: 1; min-width: 0; }
.w-row-pts { color: var(--walk); font-size: 14px; }
.w-cta { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bnav-h) + 12px); width: calc(100% - 40px); max-width: 390px; z-index: 11; }
#app .walk:not(.walk-map) { padding-bottom: calc(var(--bnav-h) + 86px); }
.walk .cta { box-shadow: none; }
/* 지도뷰 */
.walk-map { display: flex; flex-direction: column; min-height: calc(100dvh - var(--header-height)); }
.w-map-slot { position: relative; flex: 1; min-height: 300px; margin: 0; background: #ECEEF2; }
.w-map { position: absolute; inset: 0; }
.w-map-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #8E929C; font-size: 14px; }
.w-panel { position: relative; z-index: 5; margin-top: -22px; padding: 20px 20px 16px; border-radius: 24px 24px 0 0; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 -8px 24px rgba(17, 17, 20, .08); color: #111114; }
.w-timer { font-family: var(--hf); font-size: 46px; line-height: 1.1; color: #111114; letter-spacing: 1px; }
.w-stats-live { margin-top: 10px; padding: 12px 0; border-radius: 16px; background: #F4F5F7; }
.w-stats-live > div:last-child b { color: var(--walk); }
.w-hint { margin: 10px 0 6px; text-align: center; }
.w-end { width: 100%; }
.w-me span { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 20px; background: #fff; border: 3px solid #FF3D8B; font-size: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }
.w-spot .w-spot-pin { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 26px; background: #FF3D8B; color: #fff; font-size: 18px; line-height: 1; box-shadow: 0 4px 12px rgba(255, 61, 139, .4); border: 3px solid #fff; animation: spotPulse 1.8s ease-in-out infinite; }
.w-spot .w-spot-pin b { font-size: 11px; margin-top: 2px; }
.w-spot.got .w-spot-pin { background: #B9B3AC; box-shadow: none; animation: none; }
.w-spot-partner .w-spot-pin { background: #FFB800; box-shadow: 0 4px 12px rgba(255, 184, 0, .45); }
.w-spot-name { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); max-width: 120px; padding: 2px 8px; border-radius: 8px; background: rgba(255, 255, 255, .95); color: #111114; font: 600 11px var(--bf); font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); pointer-events: none; }
@keyframes spotPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
/* 보물상자 */
.w-chest { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 41; width: calc(100% - 40px); max-width: 360px; padding: 28px 20px 20px; border-radius: 26px; background: #fff; color: #111114; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; animation: popIn .3s cubic-bezier(.2, .8, .2, 1); }
.w-chest .h2 { font-size: 22px; }
.w-chest-ico { font-size: 72px; line-height: 1; cursor: pointer; animation: chestShake 1.2s ease-in-out infinite; }
.w-chest-ico.open { animation: letterPop .5s cubic-bezier(.2, .8, .2, 1) both; cursor: default; }
@keyframes chestShake { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-8deg); } 85% { transform: rotate(8deg); } 95% { transform: rotate(-4deg); } }
.w-chest-list { width: 100%; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: #F4F5F7; font-size: 14px; }
.w-chest-list > div { display: flex; justify-content: space-between; }
.w-chest-list b { color: #FF3D8B; }
.w-chest > .cta, .w-chest > .cta-row { width: 100%; margin-top: 8px; }
.w-chest .cta-row .cta-sub, .w-chest .cta-row .cta { height: 54px; margin: 0; }
/* 상품권 교환 */
.w-balance { display: flex; align-items: center; gap: 8px; font-family: var(--hf); font-size: 36px; color: #111114; }
.w-balance .w-coin { width: 30px; height: 30px; border-radius: 15px; font-size: 15px; }
.w-gift { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #ECEEF2; }
.w-gift:first-child { border-top: none; }
.w-gift-ico { width: 44px; height: 44px; border-radius: 14px; background: #F4F5F7; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.w-gift-main { flex: 1; }
.w-gift-btn { min-width: 84px; height: 38px; border: none; border-radius: 12px; background: #FF3D8B; color: #fff; font: 700 14px var(--bf); }
.w-gift-btn:disabled { background: #ECEEF2; color: #A3A7B0; }

.w-legal { margin: 14px 24px 0; line-height: 1.5; color: #8E929C; }
.w-legal a { color: #FF3D8B; }

/* ───────── 멍산책 다크 (고양이를 고른 뒤 만보기) ───────── */
.walk.walk-dark { background: #0B0B0F; color: #fff; }
.walk-dark .home-title, .walk-dark .w-big, .walk-dark .w-stats b, .walk-dark .w-timer, .walk-dark .w-balance, .walk-dark .tile-title, .walk-dark .w-shop-txt b { color: #fff; }
.walk-dark .label, .walk-dark .meta, .walk-dark .w-stats span, .walk-dark .w-legal { color: #8E929C; }
.walk-dark .w-card, .walk-dark .w-panel, .walk-dark .w-chest { background: #17171C; color: #fff; box-shadow: none; }
.walk-dark .w-shop-card { background: rgba(255, 61, 139, .14); }
:root[data-theme="dark"] .w-pts-pill { background: #1E1E24; color: #fff; box-shadow: none; }
.walk-dark .w-ring circle:first-child { stroke: rgba(255, 255, 255, .1); }
.walk-dark .w-row, .walk-dark .w-gift { border-top-color: rgba(255, 255, 255, .08); }
.walk-dark .w-stats-live, .walk-dark .w-chest-list, .walk-dark .w-gift-ico { background: rgba(255, 255, 255, .06); }
.walk-dark .w-gift-btn:disabled { background: rgba(255, 255, 255, .08); color: #6E727C; }
.walk-dark .w-map-slot { background: #1E1E24; }
.walk-dark .w-panel { box-shadow: 0 -8px 24px rgba(0, 0, 0, .4); }
.walk-dark .cta-bar { background: #0B0B0F; border-top-color: rgba(255, 255, 255, .08); }

/* 카카오맵 위 마커 (Leaflet 과 달리 크기·기준점을 직접 지정) */
.w-map[data-map="kakao"] .w-spot { position: relative; width: 52px; height: 52px; cursor: pointer; }
.w-map[data-map="kakao"] .w-me { width: 40px; height: 40px; }

/* 저장한 결과운 서랍 — 왼쪽 닫기 버튼 */
.drawer-head { display: flex; align-items: center; gap: 4px; padding: 12px 20px 8px 8px; }
.drawer-x { flex: none; color: var(--text); }

/* ───────── 로그인 퍼널 (만보기) ───────── */
.login-scrim { z-index: 34; }
.login-sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 35; width: 100%; max-width: 430px; padding: 26px 20px calc(18px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: #fff; color: #111114; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; animation: sheetUp .35s cubic-bezier(.2, .8, .2, 1); }
.login-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 16px; background: #FFE4EF; color: #FF3D8B; font-weight: 800; font-size: 15px; }
.login-title { margin: 4px 0 0; font-family: var(--hf); font-weight: 400; font-size: 24px; line-height: 1.35; color: #111114; }
.login-sub { font-size: 14px; color: #6E727C; }
.login-benefits { list-style: none; margin: 6px 0 4px; padding: 14px 16px; width: 100%; box-sizing: border-box; border-radius: 16px; background: #F4F5F7; text-align: left; display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: #111114; }
.kakao-btn { width: 100%; height: 54px; border: none; border-radius: 14px; background: #FEE500; color: rgba(0, 0, 0, .85); font: 700 16px var(--bf); display: flex; align-items: center; justify-content: center; gap: 8px; }
.login-later { border: none; background: transparent; color: #8E929C; font: 500 14px var(--bf); padding: 10px; }
/* 전면 광고 자리 */
.ad-full { position: fixed; inset: 0; z-index: 60; background: #0B0B0F; color: #fff; display: flex; flex-direction: column; max-width: 430px; margin: 0 auto; animation: fadeIn .2s ease-out; }
.ad-top { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 16px 10px; min-height: 44px; }
.ad-tag { padding: 2px 8px; border-radius: 6px; background: #FFB800; color: #111; font-size: 12px; font-weight: 800; }
.ad-count { font-size: 13px; color: #A3A7B0; }
.ad-x { width: 40px; height: 40px; border: none; border-radius: 20px; background: rgba(255, 255, 255, .14); color: #fff; display: flex; align-items: center; justify-content: center; }
.ad-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ad-box { width: 100%; aspect-ratio: 3 / 4; max-height: 70dvh; border-radius: 20px; border: 2px dashed rgba(255, 255, 255, .25); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.ad-emoji { font-size: 48px; }
.ad-foot { padding: 0 20px calc(24px + env(safe-area-inset-bottom)); text-align: center; font-size: 13px; color: #A3A7B0; }
/* 출금 화면 계정 카드 */
.w-acct { display: flex; align-items: center; gap: 12px; margin: 14px 20px 0; padding: 14px 16px; border-radius: 18px; background: #fff; color: #111114; border: none; width: calc(100% - 40px); text-align: left; font: inherit; box-shadow: 0 6px 18px rgba(17, 17, 20, .05); }
.w-acct-guest { background: #FFF8D6; }
.w-acct-ico { font-size: 22px; }
.w-acct-go { color: #FF3D8B; font-weight: 700; font-size: 14px; white-space: nowrap; }
.w-acct-out { border: none; background: #F4F5F7; color: #6E727C; border-radius: 10px; padding: 8px 10px; font: 600 12px var(--bf); }
.w-demo { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: #ECEEF2; color: #6E727C; font-weight: 600; vertical-align: middle; }
.walk-dark .w-acct { background: #17171C; color: #fff; box-shadow: none; }
.walk-dark .w-acct-guest { background: rgba(255, 184, 0, .12); }
.walk-dark .w-acct-out { background: rgba(255, 255, 255, .08); color: #A3A7B0; }
:root[data-theme="dark"] .login-sheet { background: #17171C; color: #fff; }
:root[data-theme="dark"] .login-title { color: #fff; }
:root[data-theme="dark"] .login-benefits { background: rgba(255, 255, 255, .06); color: #fff; }

/* 출금 화면 — 지도 뷰로 돌아가기 (하단 탭 위에 떠 있는 버튼) */
.w-map-fab { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bnav-h) + 14px); z-index: 23; display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 22px 0 18px; border: none; border-radius: 25px; background: #fff; color: #111114; font: 700 16px var(--bf); white-space: nowrap; box-shadow: 0 6px 20px rgba(17, 17, 20, .18), 0 1px 3px rgba(17, 17, 20, .12); }
.w-map-fab svg { color: #FF3D8B; }
.w-map-fab:active { transform: translateX(-50%) scale(.97); }
.walk-dark .w-map-fab { background: #24242B; color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); }
#app .walk:has(.w-map-fab) { padding-bottom: calc(var(--bnav-h) + 84px); }

/* ───────── 콘텐츠 탭 (매거진 목록) ───────── */
.contents { background: #fff; color: #111114; }
.mag-hero { position: relative; display: block; height: 380px; overflow: hidden; color: #111114; text-decoration: none; }
.mag-hero-img { position: absolute; right: -10px; top: 24px; width: 210px; height: 210px; object-fit: contain; image-rendering: pixelated; }
.mag-hero-text { position: absolute; left: 20px; right: 20px; bottom: 28px; }
.mag-tags { display: flex; gap: 6px; }
.mag-tags span { padding: 4px 10px; border-radius: 8px; border: 1px solid rgba(17, 17, 20, .15); background: rgba(255, 255, 255, .6); font-size: 12px; font-weight: 700; }
.mag-hero-title { margin: 12px 0 0; font-family: var(--hf); font-weight: 400; font-size: 26px; line-height: 1.35; }
.mag-hero-sum { margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: #4A4E57; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mag-sec { padding: 32px 20px 24px; }
.mag-sec .label { color: #8E929C; font-size: 14px; }
.mag-sec-title { margin: 2px 0 0; font-family: var(--hf); font-weight: 400; font-size: 22px; }
.mag-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; margin-top: 16px; }
.mag-card { display: block; color: #111114; text-decoration: none; }
.mag-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; }
.mag-thumb img { width: 88px; height: 88px; object-fit: contain; image-rendering: pixelated; }
.mag-card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 10px; font-size: 15px; font-weight: 600; line-height: 1.45; }
.mag-card-meta { display: block; margin-top: 4px; font-size: 12px; color: #8E929C; }
