@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard-dynamic-subset.min.css");
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300..700&display=swap");
/* 도그워크(DogWalk) - 스타일
   크림 캔버스 + 잉크 블랙, 필/원형 중심, 떠 있는 내비, 오렌지 궤도선 */

:root {
  --ink: #141413;
  --charcoal: #262627;
  --slate: #696969;
  --taupe: #d1cdc7;
  --ghost: #e8e2da;
  --canvas: #f3f0ee;
  --lifted: #fcfbfa;
  --white: #ffffff;
  --signal: #cf4500;
  --signal-light: #f37338;

  --r-btn: 20px; --r-lg: 40px; --r-pill: 999px;
  --lift-1: rgba(0, 0, 0, .04) 0 4px 24px 0;
  --lift-2: rgba(0, 0, 0, .08) 0 24px 48px 0;
  --font: Pretendard, Outfit, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--canvas); color: var(--ink);
  font-family: var(--font); font-weight: 450; font-size: 16px; line-height: 1.4;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }

/* 타이포 */
h1, h2, h3 { margin: 0; font-weight: 500; }
h1 { font-size: 64px; line-height: 1; letter-spacing: -.02em; }
h2 { font-size: 36px; line-height: 44px; letter-spacing: -.02em; }
h3 { font-size: 24px; line-height: 1.2; letter-spacing: -.02em; }
p { margin: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  font-size: 14px; font-weight: 700; line-height: 14px; letter-spacing: .04em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); flex: none; }
.muted { color: var(--slate); }

/* 버튼 */
button { font-family: var(--font); cursor: pointer; color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 6px 24px; border-radius: var(--r-btn);
  font-size: 16px; font-weight: 500; line-height: 1; letter-spacing: -.02em; white-space: nowrap;
  border: 1.5px solid var(--ink); transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; }
.btn-primary { background: var(--ink); color: var(--canvas); }
.btn-primary:hover { background: var(--charcoal); }
.btn-secondary { background: var(--white); color: var(--ink); font-weight: 450; }
.btn-secondary:hover { background: var(--lifted); }
.btn.lg { min-height: 56px; padding: 16px 40px; border-radius: var(--r-lg); }
.btn.sm { min-height: 40px; padding: 6px 18px; font-size: 14px; }
.sat {                    /* 원형에 붙는 위성 버튼 */
  width: 52px; height: 52px; border-radius: 50%; border: 0; padding: 0;
  background: var(--white); display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--lift-1); transition: transform .12s ease, background .15s ease, color .15s ease;
}
.sat:hover { transform: translate(2px, -2px); }
.sat svg { width: 20px; height: 20px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; letter-spacing: -.03em; line-height: 1; color: var(--ink); }
.logo i { position: relative; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ink); flex: none; }
.logo i::after { content: ""; position: absolute; right: -4px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--signal-light); border: 2px solid var(--white); }

/* ============ 시작 화면 ============ */
.layer {
  position: fixed; inset: 0; z-index: 20; overflow-y: auto; overflow-x: hidden;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(243, 240, 238, .9);
}
.layer.home { display: block; padding: 0; background: transparent; }
.home > * { position: relative; z-index: 2; }

.nav-pill {
  z-index: 5; margin: 24px auto 0; width: calc(100% - 96px); max-width: 1184px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--white); border-radius: var(--r-pill); padding: 10px 12px 10px 32px;
  box-shadow: var(--lift-1);
}
.nav-links { display: flex; align-items: center; gap: 40px; }
.nav-links button:not(.btn) {
  background: none; border: 0; padding: 8px 0; font-size: 16px; font-weight: 500; letter-spacing: -.03em; line-height: 1;
}
.nav-links button:not(.btn):hover { text-decoration: underline; text-underline-offset: 6px; }

.hero {
  z-index: auto; position: static;
  width: calc(100% - 96px); max-width: 1184px; margin: 0 auto; padding: 40px 0 0;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center;
}
.hero-copy { position: relative; z-index: 2; }
.hero-copy h1 { margin-top: 24px; }
.hero-copy .lead { margin-top: 24px; max-width: 420px; font-size: 16px; line-height: 22.4px; }
.start-form { margin-top: 32px; display: flex; gap: 8px; align-items: center; max-width: 440px; }
.start-form input {
  flex: 1; min-width: 0; height: 56px; padding: 12px 24px; border-radius: var(--r-pill);
  border: 1px solid rgba(20, 20, 19, .5); background: var(--white); color: var(--ink);
  font-family: var(--font); font-size: 16px; font-weight: 450;
  -webkit-user-select: text; user-select: text;
}
.start-form input::placeholder { color: var(--slate); }
.start-form input:focus { outline: 1.5px solid var(--ink); outline-offset: 2px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.chips > span { font-size: 14px; color: var(--slate); margin-right: 6px; }
.chips button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 18px;
  border-radius: var(--r-pill); border: 1px solid rgba(20, 20, 19, .2); background: var(--white);
  font-size: 14px; font-weight: 450; line-height: 1;
}
.chips button i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(20, 20, 19, .3); }
.chips button.on { border: 1.5px solid var(--ink); font-weight: 500; }

/* 3D 장면이 비치는 스타디움 프레임: 프레임 바깥은 큰 그림자로 크림색을 채운다 */
.hero-frame {
  position: relative; z-index: 0; height: min(62vh, 560px); min-height: 380px;
  border-radius: var(--r-lg); box-shadow: 0 0 0 200vmax var(--canvas);
}
.hero-frame .frame-chip {
  position: absolute; left: 24px; top: 24px; background: var(--white); border-radius: var(--r-pill);
  padding: 8px 20px; font-size: 14px; font-weight: 500; line-height: 1.2; display: inline-flex; align-items: center; gap: 8px;
}
.hero-frame .frame-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal-light); }
.hero-frame .frame-note { position: absolute; left: 24px; bottom: 24px; display: flex; gap: 6px; flex-wrap: wrap; }
.hero-frame .frame-note span { background: rgba(255, 255, 255, .92); border-radius: var(--r-pill); padding: 8px 16px; font-size: 14px; line-height: 1.2; }
.hero-frame .sat { position: absolute; right: -14px; bottom: -14px; width: 64px; height: 64px; background: var(--ink); color: var(--canvas); box-shadow: var(--lift-2); }

/* 산책 시간: 원형 초상 + 궤도선 */
.when {
  width: calc(100% - 96px); max-width: 1184px; margin: 0 auto; padding: 96px 0 96px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: start;
}
.ghost {
  position: absolute; z-index: -1; right: -60px; top: 36px; white-space: nowrap; pointer-events: none;
  font-size: 168px; font-weight: 500; letter-spacing: -.02em; line-height: 1; color: var(--ghost);
}
.when-copy h2 { margin-top: 20px; }
.when-copy p.lead { margin-top: 16px; max-width: 380px; }
.stats { display: flex; gap: 48px; margin-top: 48px; }
.stat-item b { display: block; font-size: 36px; font-weight: 500; line-height: 44px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-item span { font-size: 14px; color: var(--slate); }

.orbit { position: relative; height: 330px; }
.orbit svg.arc { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.orbit svg.arc path { fill: none; stroke: var(--signal-light); stroke-width: 1.25; stroke-linecap: round; }
.portrait { position: absolute; }
.portrait.p1 { left: 0; top: 96px; --d: 150px; }
.portrait.p2 { left: 34%; top: 0; --d: 190px; }
.portrait.p3 { right: 4%; top: 120px; --d: 150px; }
.portrait .circle {
  display: block; width: var(--d); height: var(--d); border-radius: 50%; border: 0; padding: 0;
  position: relative; overflow: hidden; box-shadow: var(--lift-2);
  outline: 1.5px solid transparent; outline-offset: 6px; transition: outline-color .2s ease, transform .2s ease;
}
.portrait .circle:hover { transform: scale(1.02); }
.portrait .circle.on { outline-color: var(--ink); }
.portrait .sat { position: absolute; right: -10px; bottom: 34px; }
.portrait .sat.on { background: var(--ink); color: var(--canvas); }
.portrait .eyebrow { margin-top: 20px; }
.portrait h3 { margin-top: 8px; font-size: 20px; }
.sky-day { background: linear-gradient(180deg, #cfe6f3 0%, #e7efe9 60%, #a9c48a 60%, #8fb174 100%); }
.sky-day::before { content: ""; position: absolute; left: 60%; top: 20%; width: 22%; height: 22%; border-radius: 50%; background: #f6c453; }
.sky-sunset { background: linear-gradient(180deg, #f7d3b1 0%, #f39a63 60%, #7d6a4f 60%, #5e5240 100%); }
.sky-sunset::before { content: ""; position: absolute; left: 36%; top: 46%; width: 28%; height: 28%; border-radius: 50%; background: #fff1d6; clip-path: inset(0 0 50% 0); }
.sky-night { background: linear-gradient(180deg, #1d2238 0%, #343a5a 60%, #232a26 60%, #171c19 100%); }
.sky-night::before {
  content: ""; position: absolute; left: 58%; top: 18%; width: 18%; height: 18%; border-radius: 50%; background: #f3f0ee;
  box-shadow: -52px 18px 0 -12px #f3f0ee, -24px -8px 0 -12.5px #f3f0ee, -70px -4px 0 -12.5px #f3f0ee, 14px 34px 0 -12.5px #f3f0ee;
}

/* 푸터 */
.foot { background: var(--ink); color: var(--white); padding: 64px 0 96px; }
.foot-in { width: calc(100% - 96px); max-width: 1184px; margin: 0 auto; }
.foot h2 { color: var(--white); max-width: 520px; }
.foot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 56px; padding-top: 32px; border-top: 1px solid rgba(255, 255, 255, .3); }
.foot-grid h4 { margin: 0 0 16px; font-size: 13px; font-weight: 700; line-height: 14px; letter-spacing: .04em; color: #a5a29d; }
.foot-grid p { font-size: 14px; line-height: 20px; margin-bottom: 8px; display: flex; gap: 10px; }
.foot-grid p b { font-weight: 700; min-width: 64px; }
.foot-bottom { margin-top: 48px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px; color: #a5a29d; }
.foot .logo { color: var(--white); }
.foot .logo i { border-color: var(--white); }
.foot .logo i::after { border-color: var(--ink); }

/* ============ 산책 중 ============
   크림색 알약과 카드에 짙은 초록 테두리, 살짝 기울인 손맛. 자판 키는 작은 키 모양 배지로 보여 준다.
   넓은 화면: 위쪽에 기록·코스·메뉴, 아래 양쪽 구석에 강아지 카드와 지도. 좁은 화면: 모두 위쪽에 모은다 */
:root {
  --g-ink: #1b4a2a; --g-cream: #fbf8ec; --g-green: #56b846; --g-green-d: #2f7d3a; --g-soft: #d7ead0; --g-pink: #d53fb4; --g-gold: #f6c431;
  --g-line: 3px solid var(--g-ink);
  --g-drop: 0 4px 0 rgba(22, 58, 33, .32), 0 10px 20px rgba(14, 40, 22, .2);
  --g-press: 0 1px 0 rgba(22, 58, 33, .32);
}
#hud { position: fixed; inset: 0; pointer-events: none; color: var(--g-ink); }
#hud > * { pointer-events: auto; }

/* 기록 알약: 동그란 그림 + 숫자 */
.hud-stats { position: absolute; left: 22px; top: 20px; display: flex; align-items: center; gap: 10px; }
.hstat { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 7px; border-radius: var(--r-pill); background: var(--g-cream); border: var(--g-line); box-shadow: var(--g-drop); white-space: nowrap; }
.hstat:nth-child(odd) { transform: rotate(-1.4deg); }
.hstat:nth-child(even) { transform: rotate(1.1deg); }
.hstat .ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--g-soft); border: 2px solid var(--g-ink); flex: none; }
.hstat .ico svg { width: 17px; height: 17px; }
.hstat-coin .ico { background: var(--g-gold); }
.hstat span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.hstat b { font-size: 20px; font-weight: 800; letter-spacing: -.01em; line-height: 1; font-variant-numeric: tabular-nums; }

/* 지금 걷는 곳 */
.hud-banner {
  position: absolute; left: 50%; top: 80px; transform: translateX(-50%) rotate(-1deg); max-width: min(44vw, 400px);
  padding: 9px 22px; border-radius: 14px; background: var(--g-green-d); color: #f3fbe6; border: var(--g-line); box-shadow: var(--g-drop);
  font-size: 16px; font-weight: 800; letter-spacing: .05em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 메뉴 알약 */
.hud-btns { position: absolute; right: 22px; top: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.hbtn, .hud-sound {
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 20px 0 10px; border-radius: var(--r-pill);
  background: var(--g-cream); color: var(--g-ink); border: var(--g-line); box-shadow: var(--g-drop);
  font-family: var(--font); font-size: 14px; font-weight: 800; letter-spacing: .03em; white-space: nowrap; cursor: pointer;
  transition: transform .08s, box-shadow .08s, background .12s;
}
.hbtn:hover, .hud-sound:hover { background: var(--white); }
.hbtn:active { transform: translateY(3px); box-shadow: var(--g-press); }
.hbtn svg { width: 22px; height: 22px; flex: none; }
.hbtn-go { background: var(--g-green); color: var(--white); text-shadow: 0 1px 0 rgba(22, 58, 33, .45); }
.hbtn-go:hover { background: #64c653; }
.hbtn.on { background: var(--g-pink); color: var(--white); }
.hud-btns .hbtn:nth-child(1) { transform: rotate(1deg); }
.hud-btns .hbtn:nth-child(2) { transform: rotate(-1.2deg); }
.hud-btns .hbtn:active { transform: translateY(3px); }
/* 상점·쇼핑몰 단추는 한 줄에 나란히 (메뉴 줄이 길어져 아래 칸을 밀지 않게) */
.hud-pair { display: flex; gap: 8px; justify-content: flex-end; }
.hud-pair .hbtn { transform: none; }
#hud.cafe .hud-go { display: none; }                      /* 카페 안에서는 [애견카페] [동물병원] 을 숨긴다 */
.hud-mapbtn { display: none; }
.hbtn .lb2 { display: none; }
.hbtn[data-arm] .lb { display: none; }
.hbtn[data-arm] .lb2 { display: inline; }
.hud-sound { padding: 0 12px; max-width: 190px; font-weight: 700; letter-spacing: 0; }
.hud-auto { position: absolute; left: 22px; top: 238px; transform: rotate(-1.5deg); }
/* 자판 키 배지 */
.hbtn[data-key]::before, #dock button[data-key]::before {
  content: attr(data-key); display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 7px;
  border-radius: 8px; background: var(--white); color: var(--g-ink); border: 2px solid var(--g-ink); box-shadow: 0 2px 0 var(--g-ink);
  font-size: 11px; font-weight: 800; letter-spacing: .04em; line-height: 1; text-transform: uppercase; text-shadow: none;
}

/* 강아지 카드 */
.hud-dog { position: absolute; left: 22px; top: 84px; width: 236px; }
.htag { display: inline-block; max-width: 100%; padding: 6px 14px; border-radius: var(--r-pill); background: var(--g-ink); color: #eef8e2; font-size: 12px; font-weight: 800; letter-spacing: .1em; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: top; }
.hud-dog .dcard { margin-top: 7px; padding: 13px 16px 15px; border-radius: 18px; background: var(--g-cream); border: var(--g-line); box-shadow: var(--g-drop); transform: rotate(-1deg); }
.dog-status { font-size: 15px; font-weight: 800; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hud .gauge { display: flex; align-items: center; gap: 9px; margin-top: 9px; }
#hud .gauge label { width: 28px; font-size: 12px; font-weight: 800; letter-spacing: .04em; color: rgba(27, 74, 42, .72); line-height: 1; }
#hud .bar { flex: 1; height: 14px; border-radius: var(--r-pill); background: var(--g-soft); border: 2px solid var(--g-ink); overflow: hidden; }
#hud .bar i { display: block; height: 100%; width: 50%; background: var(--g-green); border-radius: var(--r-pill); transition: width .3s ease; }
#hud .bar.energy i { background: var(--g-gold); }
#hud .bar.water i { background: #4aa8e8; }

/* 지도 */
.hud-map { position: absolute; right: 22px; top: 302px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hud-map .mring { padding: 5px; border-radius: 50%; background: var(--g-cream); border: var(--g-line); box-shadow: var(--g-drop); }
#minimap { display: block; width: 144px; height: 144px; border-radius: 50%; background: var(--ghost); }

/* 아래쪽 조작부: 조이스틱(마우스·터치) + 기능 버튼 */
#dock { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 18px; z-index: 6; }
.dock-side { display: flex; align-items: center; gap: 12px; }
#joy {
  position: relative; width: 140px; height: 140px; flex: none; border-radius: 50%; touch-action: none; cursor: grab; user-select: none;
  background: rgba(251, 248, 236, .55); border: var(--g-line); box-shadow: var(--g-drop); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
#joy.drag { cursor: grabbing; }
#joy svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#joy .ring { fill: none; stroke: rgba(27, 74, 42, .5); stroke-width: 1.5; stroke-dasharray: 3 5; }
#joy .arrow { fill: var(--g-ink); opacity: .8; }
#joyKnob {
  position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; pointer-events: none;
  background: var(--g-green); border: var(--g-line); box-shadow: 0 3px 0 rgba(22, 58, 33, .4), inset 0 -5px 0 rgba(22, 58, 33, .16), inset 0 4px 0 rgba(255, 255, 255, .28); transition: transform .12s ease-out;
}
#joy.drag #joyKnob { transition: none; }
#dock button {
  position: relative; width: 68px; height: 68px; border-radius: 50%; padding: 0; font-size: 13px; font-weight: 800; line-height: 1.15; touch-action: manipulation;
  background: var(--g-cream); color: var(--g-ink); border: var(--g-line); box-shadow: var(--g-drop); transition: transform .08s, box-shadow .08s, background .12s;
}
#dock button:hover { background: var(--white); }
#dock button:active { transform: translateY(3px); box-shadow: var(--g-press); }
#dock #btnAct { width: 84px; height: 84px; font-size: 15px; background: var(--g-green); color: var(--white); text-shadow: 0 1px 0 rgba(22, 58, 33, .45); }
#dock #btnAct:hover { background: #64c653; }
#dock button.on, #dock #btnAct.on { background: var(--g-pink); color: var(--white); text-shadow: none; }
#dock button:disabled { opacity: .45; cursor: default; }
#dock button[data-key]::before { position: absolute; left: 50%; top: -17px; transform: translateX(-50%); min-width: 26px; height: 22px; padding: 0 6px; font-size: 10px; }
#dock #btnAct.has::after { content: ""; position: absolute; right: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--g-gold); border: 2px solid var(--g-ink); }

/* 개인기 칸: [행동] 버튼을 눌렀을 때만 보인다. 지금 할 수 있는 행동(쓰다듬기 등)이 맨 앞에 초록 칸으로 나온다 */
#tricks { position: absolute; left: 50%; bottom: 188px; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 13px; width: max-content; max-width: 96vw; z-index: 6; }
#hud:not(.menu-open) #tricks { display: none; }
#tricks button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 68px; height: 60px; padding: 0 15px; border-radius: 17px;
  background: var(--g-cream); color: var(--g-ink); border: var(--g-line); box-shadow: var(--g-drop); font-size: 15px; font-weight: 800; white-space: nowrap; touch-action: manipulation;
  transition: transform .08s, box-shadow .08s, background .12s;
}
#tricks button:nth-child(odd) { transform: rotate(-1.6deg); }
#tricks button:nth-child(even) { transform: rotate(1.3deg); }
#tricks button:hover { background: var(--white); }
#tricks button:active { transform: translateY(3px); box-shadow: var(--g-press); }
#tricks kbd {
  position: absolute; left: -10px; top: -11px; min-width: 25px; height: 25px; padding: 0 5px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center;
  background: var(--g-pink); color: var(--white); border: 2px solid var(--g-ink); font-family: var(--font); font-size: 12px; font-weight: 800; line-height: 1;
}
#tricks #hint { padding: 0 20px; background: var(--g-green); color: var(--white); text-shadow: 0 1px 0 rgba(22, 58, 33, .45); cursor: pointer; }
#tricks #hint:hover { background: #64c653; }
#tricks #hint kbd { background: var(--g-gold); color: var(--g-ink); text-shadow: none; }

/* 알림 */
#toast {
  position: fixed; left: 50%; top: 138px; transform: translate(-50%, -12px) rotate(-.6deg);
  background: var(--g-cream); color: var(--g-ink); border: var(--g-line); border-radius: 16px; padding: 10px 20px 10px 10px;
  font-size: 14px; font-weight: 700; line-height: 1.4; box-shadow: var(--g-drop);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
  max-width: 86vw; z-index: 30; display: flex; align-items: center; gap: 10px;
}
#toast::before { content: "!"; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--g-pink); color: var(--white); border: 2px solid var(--g-ink); font-size: 15px; font-weight: 800; line-height: 1; flex: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0) rotate(-.6deg); }

/* 애견카페 안: 나가기 버튼과 보호자 대화창 (지도 자리에 놓인다) */
#cafeBox { position: absolute; right: 22px; top: 196px; width: 304px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
#cafeBox .cafe-row { display: flex; gap: 8px; }
#cafeBox .cafe-row .hbtn { height: 42px; padding: 0 16px; }
#chatToggle b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--g-pink); color: var(--white); border: 2px solid var(--g-ink); font-size: 12px; line-height: 1; }
#chatToggle[aria-expanded="true"] { background: var(--g-soft); }
.chat-box { width: 100%; border-radius: 18px; background: var(--g-cream); border: var(--g-line); box-shadow: var(--g-drop); overflow: hidden; }
#cafeBox.closed .chat-box { display: none; }
.chat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 14px 8px; background: var(--g-green-d); color: #f3fbe6; }
.chat-head b { font-size: 14px; font-weight: 800; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head span { font-size: 12px; font-weight: 700; opacity: .88; white-space: nowrap; }
.chat-log { height: 118px; overflow-y: auto; padding: 10px 13px; font-size: 14px; line-height: 1.45; overscroll-behavior: contain; }
.chat-log .cl { margin-bottom: 5px; overflow-wrap: anywhere; }
.chat-log .cl b { margin-right: 6px; font-weight: 800; color: var(--g-green-d); }
.chat-log .cl.me b { color: var(--g-pink); }
.chat-log .cl.sys { font-size: 12.5px; color: rgba(27, 74, 42, .62); }
#chatForm { display: flex; gap: 6px; padding: 8px; border-top: 2px solid var(--g-ink); background: var(--white); }
#chatForm input { flex: 1; min-width: 0; height: 38px; padding: 0 13px; border-radius: 19px; border: 2px solid var(--g-ink); background: var(--g-cream); color: var(--g-ink); font-family: var(--font); font-size: 14px; font-weight: 600; }
#chatForm input:focus { outline: 3px solid rgba(86, 184, 70, .5); outline-offset: 1px; }
#chatForm .hbtn { height: 38px; padding: 0 14px; font-size: 13px; box-shadow: none; }
.chat-note { margin: 0; padding: 10px 14px 12px; border-top: 2px solid var(--g-ink); font-size: 13px; line-height: 1.45; color: rgba(27, 74, 42, .78); }
.chat-box.guest .chat-log { height: 62px; }
#hud.cafe .hud-map, #hud.cafe .hud-auto { display: none; }
#hud.cafe #tricks button:not(#hint) { display: none; }
#hud.cafe #btnAutoPad, #hud.cafe #btnBall { opacity: .45; }
@media (hover: none) { #chatForm input { font-size: 16px; } }
/* 카페 문 앞에 서면 가운데 아래에 뜨는 큰 버튼 */
#btnCafeGo { position: absolute; left: 50%; bottom: 188px; transform: translateX(-50%); height: 56px; padding: 0 28px 0 14px; font-size: 18px; letter-spacing: .04em; z-index: 7; animation: cafeGo 1.1s ease-in-out infinite; }
#btnCafeGo:active { animation: none; transform: translateX(-50%) translateY(3px); }
#hud.menu-open #btnCafeGo { display: none; }
@keyframes cafeGo { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-7px); } }
@media (hover: none) { #btnCafeGo { padding-left: 26px; } }
@media (prefers-reduced-motion: reduce) { #btnCafeGo { animation: none; } }
/* 카페를 드나들 때 화면이 잠깐 덮였다가 열린다 */
/* 산책 사진: 찍을 때 번쩍이고, 찍은 사진을 보여 준다 */
.flash { position: fixed; inset: 0; z-index: 58; background: #fff; opacity: 0; pointer-events: none; }
.flash.on { animation: shotFlash .42s ease-out; }
@keyframes shotFlash { 0% { opacity: .85; } 100% { opacity: 0; } }
.shot-layer { position: fixed; inset: 0; z-index: 59; display: grid; place-items: center; background: rgba(28, 20, 12, .72); padding: 18px; }
.shot-box { width: min(760px, 94vw); text-align: center; }
.shot-box img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); background: #000; }
.shot-btns { margin-top: 14px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.shot-state { margin: 12px 0 0; font-size: 14px; font-weight: 600; color: #fff8e6; min-height: 20px; }
.shot-state.warn { color: #ffd9a8; }
.shot-note { margin: 10px 0 0; font-size: 12.5px; color: rgba(255, 248, 230, .72); }

/* 애견상점 화면: 가게 문 앞이나 진열대의 물건을 누르면 열린다 */
.shop-layer { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(28, 20, 12, .72); padding: 14px; }
.shop-box { width: min(880px, 96vw); max-height: 88vh; display: flex; flex-direction: column; background: #fbf8f3; border-radius: 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); overflow: hidden; }
.shop-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid rgba(62, 40, 23, .14); }
.shop-head b { font-size: 18px; font-weight: 800; color: var(--cocoa, #3e2817); }
.shop-pts { flex: 1; font-size: 13.5px; font-weight: 700; color: rgba(62, 40, 23, .6); }
.shop-tabs { display: flex; gap: 6px; padding: 12px 18px 0; flex-wrap: wrap; }
.shop-tabs button {
  border: 1px solid rgba(62, 40, 23, .2); background: #fff; color: rgba(62, 40, 23, .75); cursor: pointer;
  border-radius: 999px; padding: 7px 15px; font-family: var(--font); font-size: 13.5px; font-weight: 600;
}
.shop-tabs button.on { background: linear-gradient(180deg, var(--amber, #ffcf5e), var(--amber-2, #ef8f1e)); border-color: transparent; color: var(--cocoa, #3e2817); font-weight: 700; }
.shop-secs { display: flex; gap: 2px; margin: 12px 18px 0; padding: 4px; border-radius: 999px; background: rgba(62, 40, 23, .09); }
.shop-secs button {
  flex: 1; border: 0; background: transparent; color: rgba(62, 40, 23, .62); cursor: pointer; border-radius: 999px;
  padding: 9px 12px; font-family: var(--font); font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shop-secs button.on { background: #fff; color: var(--cocoa, #3e2817); box-shadow: 0 1px 5px rgba(62, 40, 23, .2); }
.shop-mall { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 18px 0; padding: 9px 12px; border-radius: 12px; background: #fff7e8; border: 1px solid rgba(239, 143, 30, .35); font-size: 12.5px; color: rgba(62, 40, 23, .75); }
.shop-mall span { flex: 1; min-width: 150px; line-height: 1.45; }
.shop-mall a {
  display: inline-flex; align-items: center; min-height: 32px; padding: 6px 13px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  background: linear-gradient(180deg, var(--amber, #ffcf5e), var(--amber-2, #ef8f1e)); color: var(--cocoa, #3e2817); font-size: 13px; font-weight: 700;
}
.shop-empty { grid-column: 1 / -1; padding: 30px 8px; text-align: center; font-size: 13.5px; color: rgba(62, 40, 23, .5); }
.shop-card.mall .shop-kind { color: var(--amber-2, #c9740d); font-size: 13px; }
a.shop-pic { text-decoration: none; cursor: pointer; }
.shop-card b a.shop-name { color: inherit; text-decoration: none; cursor: pointer; } .shop-card b a.shop-name:hover { text-decoration: underline; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; padding: 14px 18px; overflow-y: auto; }
.shop-card { display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: 16px; background: #fff; border: 1px solid rgba(62, 40, 23, .14); text-align: center; }
.shop-card.pick { border-color: var(--amber-2, #ef8f1e); box-shadow: 0 0 0 2px rgba(239, 143, 30, .35); }
.shop-card.on { background: #fff7e8; }
.shop-pic { position: relative; height: 104px; display: grid; place-items: center; }
.shop-pic img { max-width: 100%; max-height: 104px; object-fit: contain; }
.shop-blank { display: block; width: 72px; height: 72px; border-radius: 14px; background: rgba(62, 40, 23, .08); }
.shop-on { position: absolute; top: 2px; right: 2px; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: var(--amber-2, #ef8f1e); border-radius: 999px; padding: 3px 8px; }
.shop-card b { font-size: 14.5px; font-weight: 700; color: var(--ink, #141413); }
.shop-kind { font-size: 12px; font-weight: 600; color: rgba(62, 40, 23, .55); }
.shop-desc { font-size: 11.5px; line-height: 1.4; color: rgba(62, 40, 23, .5); }
.shop-btns { margin-top: 7px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.shop-btns .b {
  display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 7px 13px; border: 1px solid rgba(62, 40, 23, .22);
  border-radius: 999px; background: #fff; color: var(--cocoa, #3e2817); font-family: var(--font); font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.shop-btns .b.pri { background: linear-gradient(180deg, var(--amber, #ffcf5e), var(--amber-2, #ef8f1e)); border-color: transparent; }
.shop-btns .b.link { font-weight: 600; color: rgba(62, 40, 23, .7); }
.shop-btns .b.buy { background: #2d6a4f; border-color: transparent; color: #fff; }
.shop-note { margin: 0; padding: 0 18px 16px; font-size: 12.5px; color: rgba(62, 40, 23, .6); }
.shop-note.warn { color: #b5341f; font-weight: 600; }
.shop-note:empty { display: none; }
/* AI 동물병원 상담실: 왼쪽 의사 선생님(3D), 오른쪽 상담 */
.vet-layer { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(20, 34, 44, .72); padding: 14px; }
.vet-box { width: min(1040px, 97vw); height: min(640px, 90vh); display: grid; grid-template-columns: 38% 62%; background: #fbf8f3; border-radius: 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); overflow: hidden; }
.vet-doc { position: relative; background: radial-gradient(ellipse at 50% 35%, #ffffff 0%, #e4eef6 55%, #c9dbe8 100%); min-height: 0; }
.vet-doc canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vet-doc-tag { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: #1b4a2a; color: #fff8e6; font-size: 13px; font-weight: 800; padding: 6px 14px; border-radius: 99px; white-space: nowrap; }
.vet-chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.vet-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(62, 40, 23, .14); }
.vet-head b { font-size: 17px; font-weight: 800; color: #3e2817; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vet-pts { font-size: 13px; font-weight: 700; color: #1b4a2a; white-space: nowrap; }
.vet-log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.vmsg { display: flex; }
.vmsg .vb { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.vmsg.doc .vb { background: #fff; border: 1px solid rgba(27, 74, 42, .18); color: #2a2a2a; border-top-left-radius: 4px; }
.vmsg.me { justify-content: flex-end; }
.vmsg.me .vb { background: #1b4a2a; color: #fff8e6; border-top-right-radius: 4px; }
.vmsg.sys { justify-content: center; }
.vmsg.sys .vb { background: none; color: rgba(62, 40, 23, .62); font-size: 13px; padding: 2px 6px; }
.vmsg .vb.typing::after { content: '▍'; color: #1b4a2a; animation: vblink .8s steps(1) infinite; }
@keyframes vblink { 50% { opacity: 0; } }
.vet-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 8px; }
.vet-chips button { border: 1px solid rgba(27, 74, 42, .3); background: #fff; color: #1b4a2a; border-radius: 99px; padding: 6px 11px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.vet-form { display: flex; gap: 8px; padding: 0 16px 8px; }
.vet-form textarea { flex: 1; resize: none; border: 1px solid rgba(62, 40, 23, .25); border-radius: 12px; padding: 9px 12px; font: inherit; font-size: 14.5px; min-width: 0; background: #fff; }
.vet-form .btn { align-self: stretch; padding: 0 18px; background: #1b4a2a; color: #fff8e6; border: 0; border-radius: 12px; font-weight: 800; }
.vet-form .btn:disabled, .vet-form textarea:disabled { opacity: .55; }
.vet-note { margin: 0; padding: 0 16px 12px; font-size: 12px; color: rgba(62, 40, 23, .6); }
/* 휴대폰 세로: 위에 의사 선생님(작게), 아래 상담 */
@media (max-width: 767px) and (min-height: 481px) {
  .vet-layer { padding: 0; }
  .vet-box { width: 100vw; height: 100%; border-radius: 0; grid-template-columns: 1fr; grid-template-rows: 32% 68%; }
  .vet-doc-tag { bottom: 8px; font-size: 12px; padding: 4px 11px; }
  .vet-head { padding: 10px 12px; }
  .vet-log { padding: 10px 12px; }
  .vet-chips { padding: 0 12px 6px; flex-wrap: nowrap; overflow-x: auto; }
  .vet-chips button { white-space: nowrap; }
  .vet-form { padding: 0 12px 6px; }
  .vet-note { padding: 0 12px 10px; font-size: 11px; }
}
/* 휴대폰 가로: 좌우 그대로, 꽉 차게 */
@media (max-height: 480px) {
  .vet-layer { padding: 0; }
  .vet-box { width: 100vw; height: 100%; border-radius: 0; grid-template-columns: 34% 66%; }
  .vet-head { padding: 7px 12px; } .vet-log { padding: 8px 12px; gap: 6px; }
  .vet-chips { display: none; } .vet-note { display: none; } .vet-form { padding: 0 12px 8px; }
}
/* 휴대폰(세로·가로): 상점·쇼핑몰 화면을 작고 간단하게. 물건은 한 줄 목록(그림 · 이름과 값 · 단추)으로 보여 한눈에 읽힌다 */
@media (max-width: 560px), (max-height: 480px) {
  .shop-layer { padding: 8px; }
  .shop-box { width: min(620px, 100%); max-height: 96vh; border-radius: 16px; }
  .shop-head { padding: 9px 12px; gap: 8px; }
  .shop-head b { font-size: 15px; }
  .shop-pts { font-size: 12px; }
  .shop-head .btn { min-height: 0; height: 30px; padding: 0 13px; font-size: 12.5px; }
  .shop-tabs { padding: 8px 12px 0; gap: 5px; }
  .shop-tabs button { padding: 5px 11px; font-size: 12px; }
  .shop-mall { margin: 8px 12px 0; padding: 7px 10px; gap: 8px; font-size: 11.5px; }
  .shop-mall span { min-width: 120px; line-height: 1.4; }
  .shop-mall a { min-height: 28px; padding: 4px 11px; font-size: 12px; }
  .shop-grid { grid-template-columns: 1fr; gap: 6px; padding: 8px 12px; }
  .shop-card {
    display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; grid-template-areas: "pic name btns" "pic kind btns";
    align-items: center; column-gap: 10px; row-gap: 0; padding: 6px 9px; border-radius: 12px; text-align: left;
  }
  .shop-pic { grid-area: pic; width: 50px; height: 50px; }
  .shop-pic img { max-height: 50px; }
  .shop-blank { width: 40px; height: 40px; border-radius: 10px; }
  .shop-on { top: -3px; right: -5px; font-size: 9.5px; padding: 2px 6px; }
  .shop-card b { grid-area: name; align-self: end; font-size: 13.5px; line-height: 1.25; }
  .shop-kind { grid-area: kind; align-self: start; font-size: 11.5px; line-height: 1.3; }
  .shop-desc { display: none; }
  .shop-btns { grid-area: btns; margin: 0; flex-wrap: nowrap; }
  .shop-btns .b { min-height: 30px; padding: 4px 11px; font-size: 12px; white-space: nowrap; }
  .shop-empty { padding: 18px 6px; font-size: 12.5px; }
  .shop-note { padding: 0 12px 9px; font-size: 11.5px; }
}
@media (max-height: 480px) and (min-width: 600px) { .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 화면 준비 중: 첫 화면이 다 준비될 때까지 덮는 안내 */
.prep { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: #fdf7ec; transition: opacity .4s ease; }
.prep.off { opacity: 0; pointer-events: none; }
.prep-box { width: min(380px, 82vw); text-align: center; }
.prep-logo { width: min(240px, 60vw); height: auto; display: block; margin: 0 auto 18px; }
.prep-t { margin: 0 0 14px; font-family: var(--font, Pretendard, Outfit, -apple-system, sans-serif); font-size: 17px; font-weight: 700; color: #3e2817; letter-spacing: .01em; }
.prep-bar { height: 10px; border-radius: 999px; background: rgba(62, 40, 23, .1); overflow: hidden; }
.prep-bar i { display: block; height: 100%; width: 4%; border-radius: 999px; background: linear-gradient(90deg, #ffc93f, #ef8f1e); transition: width .18s linear; }
.prep-s { margin: 12px 0 0; font-size: 13px; color: rgba(62, 40, 23, .55); }
@media (max-width: 560px) { .prep-t { font-size: 15.5px; } .prep-s { font-size: 12px; } }

#fade { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: var(--g-ink); color: var(--g-cream); opacity: 0; pointer-events: none; transition: opacity .32s ease; }
#fade span { font-size: 22px; font-weight: 800; letter-spacing: .14em; }
#fade.on { opacity: 1; pointer-events: auto; }
/* 넓은 화면: 강아지 카드와 지도는 아래 구석, 자동 걷기는 왼쪽 가운데, 코스 이름은 맨 위 */
@media (min-width: 1100px) and (min-height: 620px) {
  .hud-banner { top: 20px; }
  .hud-dog { top: auto; bottom: 24px; }
  .hud-map { top: auto; bottom: 24px; }
  .hud-auto { top: 50%; margin-top: -23px; }
  #toast { top: 84px; }
  .chat-log { height: 210px; }
  .chat-box.guest .chat-log { height: 84px; }
}
/* 카페 안(넓은 화면): 나가기·대화 단추와 대화창은 오른쪽 메뉴 줄(다섯 칸) 아래에 둔다 (메뉴를 가리지 않게) */
@media (min-width: 768px) and (min-height: 481px) { #cafeBox { top: 300px; } }
@media (min-width: 768px) and (min-height: 481px) and (max-height: 760px) { .chat-log { height: 120px; } .chat-box.guest .chat-log { height: 62px; } }
/* 손가락으로 쓰는 기기에서는 자판 키 배지를 숨긴다 */
@media (hover: none) { .hbtn[data-key]::before, #dock button[data-key]::before { display: none; } .hbtn { padding-left: 18px; } }

/* ============ 결과 / 기록 / 도움말 ============ */
.sheet {
  position: relative; width: 100%; max-width: 560px; margin: auto;
  background: var(--lifted); border-radius: var(--r-lg); padding: 40px; box-shadow: var(--lift-2);
}
.sheet.wide { max-width: 680px; }
.sheet h2 { margin-top: 16px; }
.sheet-btns { display: flex; gap: 8px; margin-top: 32px; }

.score-row { display: flex; align-items: center; gap: 32px; margin-top: 32px; }
.score-orb { position: relative; width: 148px; height: 148px; flex: none; }
.score-orb .disc {
  width: 100%; height: 100%; border-radius: 50%; background: var(--ink); color: var(--canvas);
  display: flex; align-items: baseline; justify-content: center; gap: 2px; padding-top: 44px;
}
.score-orb .disc b { font-size: 64px; font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.score-orb .disc span { font-size: 14px; font-weight: 500; }
.score-orb svg { position: absolute; left: -22px; top: -22px; width: 192px; height: 192px; pointer-events: none; }
.score-orb svg path { fill: none; stroke: var(--signal-light); stroke-width: 1.25; stroke-linecap: round; }
.score-orb .sat { position: absolute; right: -14px; bottom: 4px; }
.score-row p { font-size: 24px; font-weight: 500; line-height: 1.2; letter-spacing: -.02em; }
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 24px; margin-top: 32px; }
.res-grid div { border-top: 1px solid rgba(20, 20, 19, .15); padding: 12px 0 16px; }
.res-grid span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--slate); line-height: 14px; }
.res-grid b { display: block; margin-top: 6px; font-size: 24px; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.save-msg { margin-top: 8px; font-size: 14px; color: var(--slate); min-height: 1.4em; }

.table-wrap { max-height: 46vh; overflow: auto; margin-top: 24px; border-top: 1px solid rgba(20, 20, 19, .15); }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
th, td { padding: 14px 12px 14px 0; text-align: left; border-bottom: 1px solid rgba(20, 20, 19, .1); white-space: nowrap; }
th { position: sticky; top: 0; background: var(--lifted); font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--slate); }
td:last-child, th:last-child { text-align: right; padding-right: 0; }
td:last-child { font-weight: 700; }
td.empty { text-align: center; color: var(--slate); padding: 40px 0; font-weight: 450; }
#histSummary { margin-top: 8px; color: var(--slate); }

.help { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid rgba(20, 20, 19, .15); }
.help li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(20, 20, 19, .1); font-size: 16px; line-height: 22.4px; }
.help b { font-weight: 700; font-size: 14px; letter-spacing: .04em; display: flex; align-items: baseline; gap: 8px; }
.help b::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal-light); flex: none; transform: translateY(-2px); }

/* ============ 반응형 ============ */
@media (max-width: 1023px) {
  h1 { font-size: 48px; }
  .nav-pill, .hero, .when, .foot-in { width: calc(100% - 48px); }
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 24px; }
  .hero-frame { order: -1; height: 46vh; min-height: 300px; }
  .when { grid-template-columns: 1fr; padding: 72px 0; gap: 48px; }
  .ghost { font-size: 120px; top: 12px; }
  .nav-links { gap: 24px; }
  .foot-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  h1 { font-size: 40px; }
  h2 { font-size: 30px; line-height: 36px; }
  .layer { padding: 12px; }
  .nav-pill { margin-top: 12px; width: calc(100% - 24px); padding: 8px 8px 8px 20px; }
  .nav-links button.opt { display: none; }
  .hero, .when, .foot-in { width: calc(100% - 32px); }
  .hero-frame { height: 40vh; min-height: 260px; }
  .hero-frame .sat { right: 12px; bottom: -20px; width: 56px; height: 56px; }
  .start-form { flex-direction: column; align-items: stretch; max-width: none; }
  .when { padding: 56px 0; }
  .ghost { font-size: 84px; right: -30px; }
  .stats { gap: 32px; margin-top: 32px; }
  .orbit { height: auto; display: flex; justify-content: space-between; gap: 8px; }
  .orbit svg.arc { display: none; }
  .portrait { position: relative; left: auto !important; right: auto !important; top: auto !important; --d: min(27vw, 120px) !important; }
  .portrait .sat { width: 40px; height: 40px; right: -6px; bottom: 44px; }
  .portrait .sat svg { width: 16px; height: 16px; }
  .portrait h3 { font-size: 16px; }
  .portrait .eyebrow { font-size: 12px; margin-top: 14px; }
  .foot { padding: 48px 0 64px; }
  .foot-grid { grid-template-columns: 1fr; gap: 24px; margin-top: 32px; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }

  .hud-stats { left: 10px; top: 10px; gap: 5px; }
  .hstat { height: 38px; padding: 0 11px 0 4px; gap: 5px; border-width: 2.5px; }
  .hstat.opt { display: none; }
  .hstat .ico { width: 25px; height: 25px; }
  .hstat .ico svg { width: 14px; height: 14px; }
  .hstat b { font-size: 15px; }
  .hud-btns { right: 10px; top: 10px; gap: 7px; }
  .hbtn, .hud-sound { height: 38px; font-size: 12px; padding: 0 13px; border-width: 2.5px; }
  #btnHelp, .hud-auto, .hbtn-go svg { display: none; }
  .hud-sound { max-width: 112px; padding: 0 6px; }
  .hud-banner { left: 10px; top: 58px; transform: rotate(-1deg); transform-origin: left center; max-width: calc(100% - 150px); padding: 7px 14px; font-size: 13px; border-width: 2.5px; border-radius: 12px; }
  .hud-dog { left: 10px; top: 104px; width: 152px; }
  .htag { font-size: 11px; padding: 5px 11px; }
  .hud-dog .dcard { padding: 8px 11px 10px; border-width: 2.5px; border-radius: 14px; }
  #hud .gauge { margin-top: 6px; }
  #hud .bar { height: 10px; }
  .dog-status { font-size: 13px; }
  .hud-map { right: 10px; top: 140px; }
  #cafeBox { right: 10px; top: 104px; width: min(292px, 78vw); gap: 7px; }
  #cafeBox .cafe-row .hbtn { height: 36px; padding: 0 13px; font-size: 13px; border-width: 2.5px; }
  .chat-box { border-width: 2.5px; border-radius: 14px; }
  .chat-log { height: 150px; font-size: 13px; }
  .hud-map .mring { padding: 3px; border-width: 2.5px; }
  .hud-map .htag { display: none; }
  #minimap { width: 84px; height: 84px; }
  #dock { bottom: 12px; gap: 10px; }
  .dock-side { gap: 7px; }
  #joy { width: 112px; height: 112px; }
  #joyKnob { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
  #dock button { width: 56px; height: 56px; font-size: 12px; border-width: 2.5px; }
  #dock #btnAct { width: 64px; height: 64px; font-size: 13px; }
  #tricks { bottom: 150px; gap: 10px; }
  #btnCafeGo { bottom: 150px; height: 48px; font-size: 16px; }
  #tricks button { min-width: 56px; height: 50px; padding: 0 12px; font-size: 14px; border-width: 2.5px; border-radius: 15px; }
  #tricks #hint { padding: 0 15px; }
  #toast { top: 222px; }
  .sheet { padding: 28px 24px; border-radius: 32px; }
  .score-row { gap: 20px; }
  .score-orb { width: 112px; height: 112px; }
  .score-orb .disc { padding-top: 34px; }
  .score-orb .disc b { font-size: 46px; }
  .score-orb svg { left: -16px; top: -16px; width: 144px; height: 144px; }
  .score-orb .sat { width: 44px; height: 44px; right: -10px; }
  .score-row p { font-size: 18px; }
  .res-grid { grid-template-columns: repeat(2, 1fr); }
  .help li { grid-template-columns: 1fr; gap: 4px; }
  .sheet-btns { flex-direction: column; }
}
/* 세워서 든 휴대폰: 화면이 좁으니 산책 화면 칸을 모두 더 작게 (가리는 곳을 줄인다) */
@media (max-width: 600px) and (min-height: 481px) {
  .hud-stats { left: 8px; top: 8px; gap: 4px; }
  .hstat { height: 28px; padding: 0 9px 0 3px; gap: 4px; border-width: 2px; }
  .hstat .ico { width: 20px; height: 20px; border-width: 1.5px; }
  .hstat .ico svg { width: 12px; height: 12px; }
  .hstat b { font-size: 12.5px; }
  .hud-btns { right: 8px; top: 8px; gap: 5px; }
  .hbtn, .hud-sound { height: 28px; font-size: 11px; padding: 0 10px; border-width: 2px; }
  .hud-sound { max-width: 92px; padding: 0 5px; font-size: 10px; }
  .hbtn[data-key]::before, #dock button[data-key]::before { display: none; }
  .hud-banner { left: 8px; top: 41px; max-width: calc(100% - 118px); padding: 4px 10px; font-size: 11px; border-width: 2px; border-radius: 9px; }
  .hud-dog { left: 8px; top: 72px; width: 114px; }
  .htag { font-size: 9px; padding: 3px 8px; letter-spacing: .05em; }
  .hud-dog .dcard { margin-top: 4px; padding: 6px 8px 7px; border-width: 2px; border-radius: 11px; }
  .dog-status { font-size: 11px; }
  #hud .gauge { margin-top: 4px; gap: 5px; }
  #hud .gauge label { width: 19px; font-size: 9px; }
  #hud .bar { height: 7px; border-width: 1.5px; }
  .hud-map { right: 8px; top: 139px; }
  .hud-map .mring { padding: 2px; border-width: 2px; }
  #minimap { width: 64px; height: 64px; }
  #cafeBox { right: 8px; top: 105px; width: min(250px, 72vw); gap: 6px; }
  #cafeBox .cafe-row .hbtn { height: 30px; padding: 0 11px; font-size: 12px; }
  .chat-log { height: 116px; font-size: 12px; }
  #toast { top: 178px; padding: 6px 13px 6px 6px; font-size: 12px; border-width: 2px; border-radius: 12px; }
  #toast::before { width: 20px; height: 20px; font-size: 12px; }
  #dock { bottom: 10px; }
  #joy { width: 92px; height: 92px; border-width: 2.5px; }
  #joyKnob { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  #dock button { width: 46px; height: 46px; font-size: 10.5px; border-width: 2px; }
  #dock #btnAct { width: 54px; height: 54px; font-size: 12px; }
  #dock #btnAct.has::after { width: 12px; height: 12px; }
  #tricks { bottom: 120px; gap: 8px; }
  #btnCafeGo { bottom: 120px; height: 42px; padding: 0 20px; font-size: 14px; border-width: 2.5px; }
  #tricks button { min-width: 48px; height: 42px; padding: 0 10px; font-size: 12.5px; border-width: 2px; border-radius: 13px; }
  #tricks #hint { padding: 0 12px; }
}
/* 가로로 든 휴대폰(화면 높이가 낮을 때): 모든 칸을 작게 줄여 위쪽 한 줄과 양쪽 구석에만 둔다 */
@media (max-height: 480px) {
  :root { --g-drop: 0 2px 0 rgba(22, 58, 33, .32), 0 5px 10px rgba(14, 40, 22, .18); }
  .hud-stats { left: 8px; top: 8px; gap: 4px; }
  .hstat { height: 30px; padding: 0 9px 0 3px; gap: 4px; border-width: 2px; }
  .hstat.opt { display: none; }
  .hstat .ico { width: 20px; height: 20px; border-width: 1.5px; }
  .hstat .ico svg { width: 12px; height: 12px; }
  .hstat b { font-size: 13px; }
  .hud-banner { left: 50%; top: 8px; transform: translateX(-50%) rotate(-1deg); transform-origin: center; max-width: 26vw; padding: 5px 12px; font-size: 12px; border-width: 2px; border-radius: 10px; }
  .hud-btns { right: 8px; top: 8px; flex-direction: row-reverse; align-items: center; gap: 5px; }
  .hbtn, .hud-sound { height: 30px; font-size: 12px; padding: 0 11px; border-width: 2px; }
  .hud-btns .hbtn { transform: none; }
  .hbtn svg, #btnHelp, .hud-auto { display: none; }
  .hud-sound { max-width: 100px; padding: 0 3px; }
  .hud-dog { left: 8px; top: 44px; width: 128px; }
  .htag { font-size: 10px; padding: 3px 9px; letter-spacing: .06em; }
  .hud-dog .dcard { margin-top: 4px; padding: 6px 9px 8px; border-width: 2px; border-radius: 12px; }
  .dog-status { font-size: 12px; }
  #hud .gauge { margin-top: 5px; gap: 6px; }
  #hud .gauge label { width: 22px; font-size: 10px; }
  #hud .bar { height: 8px; border-width: 1.5px; }
  .hud-map { right: 8px; top: 44px; }
  #cafeBox { right: 8px; top: 44px; width: min(280px, 44vw); gap: 6px; }
  #cafeBox .cafe-row .hbtn { height: 30px; padding: 0 11px; font-size: 12px; border-width: 2px; }
  .chat-box { border-width: 2px; border-radius: 12px; }
  .chat-head { padding: 5px 10px; }
  .chat-log { height: 84px; padding: 6px 9px; font-size: 12px; }
  #chatForm { padding: 5px; }
  #chatForm input, #chatForm .hbtn { height: 32px; }
  .hud-map .mring { padding: 3px; border-width: 2px; }
  .hud-map .htag { display: none; }
  #minimap { width: 72px; height: 72px; }
  #toast { top: 44px; padding: 6px 14px 6px 6px; font-size: 12px; border-width: 2px; border-radius: 12px; }
  #toast::before { width: 20px; height: 20px; font-size: 12px; }
  #joy { width: 100px; height: 100px; border-width: 2.5px; }
  #joyKnob { width: 42px; height: 42px; margin: -21px 0 0 -21px; border-width: 2.5px; }
  #dock button { width: 50px; height: 50px; font-size: 11px; border-width: 2.5px; }
  #dock #btnAct { width: 58px; height: 58px; font-size: 13px; }
  #tricks { bottom: 10px; gap: 8px; max-width: calc(100vw - 300px); }
  #btnCafeGo { bottom: 12px; height: 42px; padding: 0 20px; font-size: 14px; border-width: 2.5px; }
  #tricks button { min-width: 48px; height: 42px; padding: 0 10px; font-size: 13px; border-width: 2.5px; border-radius: 13px; }
  #tricks #hint { padding: 0 13px; }
  #tricks kbd { left: -7px; top: -8px; min-width: 20px; height: 20px; font-size: 10px; }
}
/* 휴대폰과 태블릿(손가락으로 쓰는 기기, 작은 화면): 조이스틱은 왼쪽 아래, 기능 버튼은 오른쪽 아래에 두 줄로 */
@media (max-width: 767px), (max-height: 480px), (hover: none) and (pointer: coarse) {
  #hud > #dock {
    left: 0; right: 0; transform: none; display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 8px 0;
    padding: 0 calc(14px + env(safe-area-inset-right, 0px)) 0 calc(14px + env(safe-area-inset-left, 0px)); pointer-events: none;      /* 가운데 빈 곳은 화면 돌리기에 쓴다 */
  }
  #hud > #dock > * { pointer-events: auto; }
  #joy { grid-column: 1; grid-row: 1 / span 2; }
  .dock-side { grid-column: 3; justify-content: flex-end; }
  .dock-side:first-child { grid-row: 1; }
  .dock-side:last-child { grid-row: 2; }
}
/* 큰 태블릿: 아래 구석은 조이스틱과 버튼이 쓰므로 강아지 카드와 지도를 위쪽에 둔다 */
@media (hover: none) and (pointer: coarse) and (min-width: 1100px) and (min-height: 620px) {
  .hud-dog { top: 84px; bottom: auto; }
  .hud-map { top: 302px; bottom: auto; }
  .hud-auto { display: none; }
}

/* ============ 휴대폰(세로·가로): 산책 화면의 칸(배경 상자)을 모두 없애고 글자만 작고 또렷하게 ============
   화면을 가리지 않도록 기록·코스·강아지 상태는 왼쪽 위에 글자로만 쌓고, 메뉴도 글자로만 둔다 (세로: 오른쪽 위 세로줄, 가로: 위쪽 한 줄).
   배경이 없으므로 짙은 초록 테두리 글자(text-shadow)로 어떤 풍경 위에서도 읽히게 한다. 지도는 [지도] 글자를 눌러야 나온다 */
@media (max-width: 767px), (max-height: 480px) {
  :root { --out: -1px 0 0 rgba(6, 30, 14, .96), 1px 0 0 rgba(6, 30, 14, .96), 0 -1px 0 rgba(6, 30, 14, .96), 0 1px 0 rgba(6, 30, 14, .96), 0 0 5px rgba(6, 30, 14, .85); }
  /* 기록: 간식 0  시간 00:00  거리 0 m */
  .hud-stats { left: 9px; top: 7px; gap: 11px; }
  .hstat, .hstat:nth-child(n) { height: auto; padding: 0; gap: 3px; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none; color: #fff; text-shadow: var(--out); align-items: baseline; }
  .hstat .ico { display: none; }
  .hstat span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; font-size: 10.5px; font-weight: 700; opacity: .9; }
  .hstat b { font-size: 12.5px; font-weight: 800; letter-spacing: 0; }
  /* 지금 걷는 곳 */
  .hud-banner { left: 9px; top: 25px; transform: none; max-width: calc(100vw - 122px); padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: #d9f8bd; font-size: 12px; font-weight: 800; letter-spacing: 0; text-shadow: var(--out); }
  /* 강아지: 이름 · 상태 한 줄, 행복·체력·수분 한 줄 */
  .hud-dog { left: 9px; top: 43px; width: auto; max-width: calc(100vw - 122px); display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 7px; row-gap: 2px; }
  .htag { padding: 0; border-radius: 0; background: none; color: #ffe9a6; font-size: 12px; font-weight: 800; letter-spacing: 0; text-shadow: var(--out); max-width: 96px; }
  .hud-dog .dcard { display: contents; }
  .dog-status { flex: 1 1 0; min-width: 0; font-size: 11.5px; font-weight: 700; color: #fff; text-shadow: var(--out); }
  .hud-dog .gauges { flex: 0 0 100%; display: flex; gap: 9px; }
  #hud .gauge { margin: 0; gap: 3px; }
  #hud .gauge label { width: auto; font-size: 10px; font-weight: 700; letter-spacing: 0; color: #fff; text-shadow: var(--out); }
  #hud .bar { flex: none; width: 30px; height: 5px; border: 1px solid rgba(6, 30, 14, .96); background: rgba(6, 30, 14, .5); box-shadow: 0 0 4px rgba(6, 30, 14, .6); }
  /* 메뉴: 글자만 (세로줄) */
  .hud-btns { right: 9px; top: 5px; gap: 0; align-items: flex-end; }
  .hud-pair { display: contents; }
  .hud-btns .hbtn, .hud-btns .hud-sound, .hud-btns .hbtn:nth-child(n), #cafeBox .cafe-row #chatToggle {
    height: 25px; padding: 0 1px 0 5px; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none;
    color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0; text-shadow: var(--out); gap: 0;
  }
  .hud-btns .hbtn:hover, .hud-btns .hud-sound:hover, #cafeBox .cafe-row #chatToggle:hover { background: none; }
  .hud-btns .hbtn:active, #cafeBox .cafe-row #chatToggle:active { transform: none; box-shadow: none; opacity: .6; }
  .hud-btns .hbtn svg { display: none; }
  .hud-btns .hbtn.hbtn-go, .hud-btns .hbtn.hbtn-go:hover { background: none; color: #c6ffad; }
  .hud-btns .hbtn.on, .hud-btns .hbtn.on:hover { background: none; color: #ffe58a; }
  .hud-btns .hbtn[data-arm], .hud-btns .hbtn.hbtn-go[data-arm] { color: #ffe58a; }
  .hud-btns .hud-mapbtn { display: inline-flex; align-items: center; }
  #hud.cafe .hud-btns .hud-mapbtn { display: none; }
  .hud-btns .hud-sound { max-width: 128px; padding-right: 15px; text-align: right; text-align-last: right; -webkit-appearance: none; appearance: none; cursor: pointer;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.6 3.6h8.8L6 9.2z' fill='%23fff' stroke='%23061e0e' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") right 1px center / 11px 11px no-repeat; }
  .hud-btns .hud-sound option { color: #1b4a2a; background: #fbf8ec; text-shadow: none; }
  /* 지도: 평소엔 숨기고 [지도] 를 누르면 작게 보인다 */
  .hud-map { display: none; right: 9px; top: 160px; }
  #hud.map-on:not(.cafe) .hud-map { display: flex; }
  .hud-map .mring { padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: none; }
  .hud-map .htag { display: none; }
  #minimap { width: 76px; height: 76px; border: 1.5px solid rgba(6, 30, 14, .95); opacity: .9; box-shadow: 0 0 5px rgba(6, 30, 14, .6); }
  /* 알림: 글자만 */
  #toast { top: 164px; max-width: calc(100vw - 132px); padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; display: block; text-align: center; color: #fff; font-size: 13px; font-weight: 800; text-shadow: var(--out); transform: translate(-50%, -6px); }
  #toast.show { transform: translate(-50%, 0); }
  #toast::before { display: none; }
  /* 카페 안: 나가기·대화 글자 단추 (메뉴 줄 아래) */
  #cafeBox { top: 134px; right: 9px; }
  #cafeBox .cafe-row { gap: 10px; align-items: center; }
  #cafeBox .cafe-row #btnCafeOut { height: 27px; padding: 0 12px; font-size: 12px; border-width: 2px; }
  #cafeBox .cafe-row #chatToggle[aria-expanded="true"] { background: none; color: #ffe58a; }
  #chatToggle b { margin-left: 4px; }
}
/* 가로로 든 휴대폰(높이가 낮을 때): 메뉴는 위쪽 오른쪽에 한 줄로 */
@media (max-height: 480px) {
  .hud-btns { top: 6px; flex-direction: row-reverse; align-items: center; gap: 9px; }
  .hud-btns .hbtn, .hud-btns .hbtn:nth-child(n), .hud-btns .hud-sound { height: 24px; padding: 0 1px; }
  .hud-btns .hud-sound { padding-right: 14px; max-width: 118px; }
  .hud-banner { left: 9px; top: 25px; transform: none; max-width: 40vw; }
  .hud-dog { max-width: 40vw; }
  .hud-map { top: 34px; }
  #toast { top: 40px; max-width: 46vw; }
  #cafeBox { top: 34px; }
}

/* 회원·언어·음악 (상단 메뉴) */
.nav-links .navlink { font-size: 14px; color: var(--ink); text-decoration: none; padding: 8px 10px; border-radius: 999px; white-space: nowrap; }
.nav-links .navlink:hover { background: rgba(20, 20, 19, .06); }
.nav-links #langSlot { display: inline-flex; gap: 4px; }
.nav-links #langSlot button, .site #langSlot button { font-size: 12px; padding: 5px 9px; border-radius: 999px; border: 1px solid rgba(20, 20, 19, .25); background: transparent; }
.nav-links #langSlot button.on, .site #langSlot button.on { background: var(--ink); color: var(--canvas); }
.home-flash { margin: 14px 0 0; padding: 12px 18px; border-radius: 16px; background: var(--white); border: 1px solid rgba(20, 20, 19, .12); font-size: 14px; }
.foot .company { margin-top: 18px; font-size: 12px; opacity: .7; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.dw-install { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 90; display: flex; gap: 12px; align-items: center; padding: 12px 14px 12px 20px;
  background: var(--ink); color: var(--canvas); border-radius: 999px; font-size: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.dw-install button { border: 0; border-radius: 999px; padding: 8px 14px; font-size: 13px; background: var(--canvas); color: var(--ink); }
.dw-install button.x { background: transparent; color: var(--canvas); padding: 8px; }
body > .skiptranslate, .goog-te-banner-frame { display: none !important; } body { top: 0 !important; }
#startLayer .nav-links { gap: 20px; }
@media (max-width: 1180px) { .nav-links .navlink.opt, .nav-links #langSlot button:not(.on) { display: none; } }
@media (max-width: 760px) { .nav-links #langSlot, .nav-links #btnMusic { display: none; } }

/* 회원 선택: 강아지, 보호자, 배경 코스, 털 색 */
.picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; max-width: 460px; }
.picks label { display: grid; gap: 5px; font-size: 13px; font-weight: 700; }
.picks label.wide { grid-column: 1 / -1; }
.picks select { font-family: var(--font); font-size: 15px; padding: 11px 16px; border-radius: 999px; border: 1px solid rgba(20, 20, 19, .5); background: var(--white); color: var(--ink); width: 100%; cursor: pointer; }
.picks select:focus { outline: 1.5px solid var(--ink); outline-offset: 2px; }
.chips button i.orig { background: conic-gradient(#f5f1e8, #e6c89a, #8a5a33, #2b2b2e, #f5f1e8); }
.guest-note { margin: 16px 0 0; font-size: 14px; max-width: 460px; color: rgba(20, 20, 19, .75); }
.guest-note a { color: var(--ink); font-weight: 700; text-underline-offset: 4px; }

/* 강아지를 사진으로 고르기 */
.picks .wide { grid-column: 1 / -1; }
.dogpick { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.dogpick-list { display: flex; gap: 10px; overflow-x: auto; padding: 3px 3px 6px; scrollbar-width: thin; }
.dogcard { flex: 0 0 104px; display: grid; gap: 6px; justify-items: center; padding: 6px 6px 9px; border-radius: 20px; border: 1.5px solid rgba(20, 20, 19, .18); background: var(--white); color: var(--ink); font-family: var(--font); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.dogcard img, .dogcard .dogcard-blank { width: 90px; height: 90px; border-radius: 15px; object-fit: cover; display: block; }
.dogcard .dogcard-blank { display: grid; place-items: center; background: rgba(20, 20, 19, .07); font-style: normal; font-size: 30px; font-weight: 700; color: rgba(20, 20, 19, .45); }
.dogcard b { font-size: 13px; font-weight: 700; white-space: nowrap; }
.dogcard small { font-size: 11px; font-weight: 500; color: rgba(20, 20, 19, .6); }
.dogcard:hover:not(:disabled) { border-color: rgba(20, 20, 19, .55); transform: translateY(-1px); }
.dogcard.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.dogcard:disabled { opacity: .55; cursor: not-allowed; }
.dogcard:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.nav-logout { display: inline-flex; margin: 0; }
.nav-links .nav-logout .navlink { border: 0; background: none; font-family: var(--font); cursor: pointer; }
.nav-links .nav-logout .navlink:hover { background: rgba(20, 20, 19, .06); }

/* ============ 카툰 스타일 (관리자 > 배경·코스 > 산책 설정) ============ */
.look-cartoon #scene, .look-cartoon canvas { filter: saturate(1.28) contrast(1.04); }

/* ============ 시작 화면: 3D 장면 위에 올라가는 표지 (밝은 낮 느낌) ============ */
.home {
  --amber: #ffc93f; --amber-2: #ef8f1e; --cocoa: #3e2817; --river: #2f93b8;
  --soft: rgba(20, 20, 19, .66); --line: rgba(62, 40, 23, .12);
}
/* 장면 위에 덮는 밝은 층: 가운데는 크림색으로 글이 또렷하게, 가장자리는 비쳐서 풍경이 보이게 */
.home .veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(118% 92% at 50% 40%, rgba(255, 253, 249, .88) 0%, rgba(255, 252, 246, .74) 34%, rgba(252, 248, 241, .42) 68%, rgba(249, 244, 235, .7) 100%),
    linear-gradient(180deg, rgba(255, 253, 249, .5) 0%, rgba(255, 253, 249, 0) 22%, rgba(250, 245, 237, .55) 100%);
}
.home .nav-pill { background: rgba(255, 255, 255, .88); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(62, 40, 23, .1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.home .nav-pill .logo { display: inline-flex; align-items: center; padding: 0; }
.home .nav-pill .logo img { height: 44px; width: auto; display: block; }
.home .nav-pill .btn-primary { background: linear-gradient(180deg, var(--amber), var(--amber-2)); color: var(--cocoa); font-weight: 700; border: 0; }
.home .nav-pill .btn-primary:hover { filter: brightness(1.05); background: linear-gradient(180deg, var(--amber), var(--amber-2)); }

.stage {
  position: relative; z-index: 2; width: calc(100% - 48px); max-width: 680px; margin: 0 auto;
  min-height: calc(100vh - 96px); min-height: calc(100dvh - 96px);
  padding: 28px 0 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.stage .eyebrow { justify-content: center; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: rgba(62, 40, 23, .55); }
.stage .eyebrow::before { background: var(--amber-2); }
.logo-big { width: min(330px, 68vw); height: auto; display: block; margin: 0 auto; }
/* 로그인한 회원: 고르는 칸이 첫 화면에 들어가도록 표지를 줄인다 */
.stage.member .logo-big { width: min(250px, 54vw); margin-top: 0; }
.stage.member .stage-lead { display: none; }
.stage.member .dogcard { flex: 0 0 90px; }
.stage.member .dogcard img, .stage.member .dogcard .dogcard-blank { width: 78px; height: 78px; }
.stage.member .start-form { margin-top: 14px; }
.stage.member .cue { margin-top: 16px; }
.tagline { margin-top: 2px; font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -.02em; color: var(--ink); }
.stage.member .tagline { font-size: 18px; }
.stage-lead { margin-top: 8px; max-width: 460px; font-size: 15.5px; line-height: 1.65; color: var(--soft); }
.stage .home-flash { margin-top: 14px; }
.stage .play {
  margin-top: 20px; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; flex: none; cursor: pointer;
  border: 1.5px solid rgba(62, 40, 23, .25); background: rgba(255, 255, 255, .9); color: var(--cocoa);
  box-shadow: 0 8px 22px rgba(62, 40, 23, .14); transition: transform .15s ease, box-shadow .15s ease;
}
.stage .play svg { width: 22px; height: 22px; margin-left: 3px; }
.stage .play:hover { transform: scale(1.06); box-shadow: 0 12px 26px rgba(62, 40, 23, .2); }

.keys { margin-top: 22px; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.key {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px;
  border-radius: 15px; background: rgba(255, 255, 255, .88); border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(62, 40, 23, .05);
}
.key b {
  min-width: 25px; padding: 5px 7px; border-radius: 8px; background: #fff; border: 1px solid rgba(62, 40, 23, .18);
  box-shadow: 0 1.5px 0 rgba(62, 40, 23, .16); font-size: 12px; font-weight: 700; line-height: 1; color: var(--cocoa); text-align: center;
}
.key b.w { min-width: 0; }
.key em { font-style: normal; font-size: 13px; line-height: 1.2; color: var(--soft); }

.acts {
  margin-top: 10px; width: min(960px, 100vw); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; cursor: grab; padding: 4px 0 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; user-select: none; -webkit-user-select: none;
}
.acts::-webkit-scrollbar { display: none; }
.acts.drag { cursor: grabbing; }
.acts-track { display: flex; flex-wrap: nowrap; gap: 8px; width: max-content; }
.acts-track span { flex: none; white-space: nowrap; }
.acts span {
  display: inline-flex; align-items: center; min-height: 38px; padding: 9px 18px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .9); border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(62, 40, 23, .05);
  font-size: 14px; font-weight: 500; line-height: 1; color: var(--ink);
}
.acts span::before { content: ""; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--amber-2); flex: none; }
.stage-label { margin-top: 18px; font-size: 11px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: rgba(62, 40, 23, .5); }
.seg { margin-top: 10px; display: inline-flex; gap: 4px; padding: 5px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .9); border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(62, 40, 23, .06); }
.stage > .seg { margin-top: 18px; }
/* 화면이 낮으면 (노트북, 가로로 눕힌 휴대폰) 첫 화면이 한 번에 들어오도록 줄인다 */
@media (max-height: 800px) {
  .stage { padding: 16px 0 26px; min-height: calc(100vh - 86px); min-height: calc(100dvh - 86px); }
  .logo-big { width: min(260px, 52vw); }
  .stage.member .logo-big { width: min(210px, 46vw); }
  .tagline { font-size: 17px; }
  .stage-label { margin-top: 12px; }
  .acts { margin-top: 8px; }
  .acts span { min-height: 34px; padding: 7px 14px; font-size: 13px; }
}
@media (max-height: 760px) and (min-width: 561px) {   /* 아주 낮은 화면에서는 두 줄만 보이고 나머지는 [더보기] 로 */
  .stage { padding: 12px 0 18px; }
  .cue { margin-top: 10px; }
  .tagline { font-size: 16px; }
  .logo-big { width: min(230px, 46vw); }
  .stage > .seg { margin-top: 12px; }
  .stage .start-form { margin-top: 12px; }
  .stage .start-form input { height: 46px; }
  .btn-go { min-height: 48px; }
  .cue { margin-top: 12px; }
}
.seg button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 20px; border: 0; cursor: pointer;
  border-radius: var(--r-pill); background: none; color: var(--soft); font-family: var(--font); font-size: 14px; font-weight: 500; line-height: 1;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: linear-gradient(180deg, var(--amber), var(--amber-2)); color: var(--cocoa); font-weight: 700; box-shadow: 0 5px 14px rgba(239, 143, 30, .3); }
.seg i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.seg .sun { background: #ffd04a; box-shadow: 0 0 0 2px rgba(255, 208, 74, .3); }
.seg .dusk { background: linear-gradient(180deg, #ffb36b, #e4683a); }
.seg .moon { background: #9fb0cc; box-shadow: inset -4px -1px 0 rgba(255, 255, 255, .6); }
.stage-hint { margin-top: 9px; font-size: 12.5px; color: rgba(62, 40, 23, .5); }
.stage-hint b { display: inline-block; min-width: 20px; padding: 3px 6px; margin: 0 2px; border-radius: 6px; background: #fff; border: 1px solid rgba(62, 40, 23, .18); font-size: 11px; color: var(--cocoa); }

/* 로그인한 회원: 고르는 칸 */
.panel {
  margin-top: 14px; width: 100%; padding: 18px 20px 20px; text-align: left;
  border-radius: 26px; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(62, 40, 23, .12);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.panel .picks { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; gap: 12px; }
.panel .picks label > span, .panel .dogpick > span { color: rgba(62, 40, 23, .6); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.panel .picks select { background: #fff; border-color: rgba(62, 40, 23, .22); }
.panel .dogcard { background: #fff; border-color: rgba(62, 40, 23, .14); }
.panel .dogcard.on { border-color: var(--amber-2); box-shadow: 0 0 0 2px var(--amber-2); }
.panel .chips { margin-top: 14px; }
.panel .chips > span { color: rgba(62, 40, 23, .6); font-size: 12px; font-weight: 600; }
.panel .chips button { background: #fff; border-color: rgba(62, 40, 23, .18); }
.panel .chips button.on { border-color: var(--amber-2); box-shadow: 0 0 0 1px var(--amber-2); }

.stage .start-form { margin-top: 18px; width: 100%; max-width: 420px; flex-direction: column; align-items: stretch; gap: 10px; }
.namerow { display: flex; align-items: center; gap: 12px; width: 100%; }
.namelab { font-size: 14px; font-weight: 600; color: rgba(62, 40, 23, .62); white-space: nowrap; flex: none; }
.namerow input { flex: 1; min-width: 0; }
.stage .start-form input { height: 52px; background: rgba(255, 255, 255, .95); border: 1px solid rgba(62, 40, 23, .2); text-align: center; }
.stage .start-form input:focus { outline: 1.5px solid var(--amber-2); }
.btn-go {
  display: inline-flex; align-items: center; justify-content: center; min-height: 58px; padding: 16px 40px; border: 0; cursor: pointer;
  border-radius: var(--r-pill); background: linear-gradient(180deg, #ffd45e, var(--amber-2)); color: var(--cocoa); text-decoration: none;
  font-family: var(--font); font-size: 18px; font-weight: 700; letter-spacing: .02em; line-height: 1;
  box-shadow: 0 12px 26px rgba(239, 143, 30, .32), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.btn-go:hover { filter: brightness(1.05); }
.btn-go:active { transform: scale(.985); }
.btn-go.sm { min-height: 46px; padding: 12px 26px; font-size: 15px; }
.cue {
  margin-top: 20px; display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: rgba(255, 255, 255, .8); color: var(--soft); text-decoration: none; font-size: 13.5px;
}
.cue:hover { color: var(--ink); background: #fff; }
.cue svg { width: 16px; height: 16px; }

/* 아래 칸: 조작과 기능 */
.more { position: relative; z-index: 2; background: #fbf7f0; border-top: 1px solid var(--line); padding: 68px 0 84px; }
.more-in { width: calc(100% - 48px); max-width: 1100px; margin: 0 auto; }
.more .eyebrow { color: rgba(62, 40, 23, .55); }
.more .eyebrow::before { background: var(--amber-2); }
.more h2 { margin-top: 12px; max-width: 640px; }
.more-lead { margin-top: 14px; max-width: 640px; font-size: 15px; line-height: 1.6; color: var(--soft); }
.more .keys.wide { margin-top: 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.segrow { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.segrow .stage-label, .segrow .stage-hint, .segrow .seg { margin-top: 0; }

.feats { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feat { padding: 24px; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(62, 40, 23, .06); }
.feat > i { display: none; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #fff3dc; color: var(--amber-2); }
.feat > i svg { width: 21px; height: 21px; }
.feat h3 { margin-top: 0; font-size: 18px; }
.feat p { margin-top: 9px; font-size: 14px; line-height: 1.6; color: var(--soft); }

.strip { margin-top: 38px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 36px; }
.strip b { display: block; font-size: 30px; font-weight: 500; letter-spacing: -.02em; }
.strip span { font-size: 13px; color: rgba(62, 40, 23, .55); }
.strip-cta { margin-left: auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-line {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 24px;
  border-radius: var(--r-pill); border: 1.5px solid rgba(62, 40, 23, .25); background: #fff; color: var(--ink);
  text-decoration: none; font-size: 15px; font-weight: 600;
}
.btn-line:hover { background: #fff6e6; border-color: var(--amber-2); }
.home .foot { background: var(--cocoa); }
.home .foot h2, .home .foot .logo { color: #fff; }
.foot-logo { height: 40px; width: auto; display: block; }

.home .nav-links button:not(.btn), .home .nav-links .navlink { white-space: nowrap; }
@media (max-width: 1023px) {
  .stage, .more-in { width: calc(100% - 48px); }
  .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more .keys.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .stage, .more-in { width: calc(100% - 32px); }
  .stage { padding: 20px 0 40px; }
  .keys, .more .keys.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .key { padding: 9px 10px; gap: 6px; }
  .key em { font-size: 12.5px; }
  .key b { min-width: 22px; padding: 4px 6px; font-size: 11.5px; }
  .stage .start-form { max-width: none; }
  .panel { padding: 16px; border-radius: 22px; }
  .panel .picks { grid-template-columns: 1fr; }
  .more { padding: 52px 0 64px; }
  .feats { grid-template-columns: 1fr; }
  .strip { gap: 24px; }
  .strip-cta { margin-left: 0; width: 100%; }
  .home .nav-pill .logo img, .foot-logo { height: 34px; }
}
@media (max-width: 560px) {
  .home .nav-links { gap: 8px; }
  .home .nav-pill { padding: 7px 7px 7px 12px; gap: 10px; }
  .home .nav-links #btnHistory0, .home .nav-links .navlink.me { display: none; }   /* 좁은 화면: 머리글은 로고와 시작 버튼만 */
  .home .nav-pill .btn.sm { padding: 6px 14px; }
}
/* 낮은 화면(노트북)에서도 회원 첫 화면이 [산책 시작]까지 한 번에 보이도록 줄인다 */
@media (max-height: 820px) and (min-width: 561px) {
  .stage.member { justify-content: flex-start; padding-top: 10px; }
  .stage.member .tagline { font-size: 16px; }
  .stage.member .panel { margin-top: 10px; padding: 13px 16px 14px; }
  .stage.member .panel .picks { gap: 9px; }
  .stage.member .panel .picks select { padding: 8px 14px; font-size: 14.5px; }
  .stage.member .dogpick-list { padding: 2px 2px 5px; }
  .stage.member .dogcard { flex: 0 0 78px; padding: 5px 5px 7px; }
  .stage.member .dogcard img, .stage.member .dogcard .dogcard-blank { width: 66px; height: 66px; }
  .stage.member .panel .chips { margin-top: 10px; }
  .stage.member .panel .chips button { padding: 6px 11px; }
  .stage.member .start-form { margin-top: 10px; gap: 8px; }
  .stage.member .start-form input { height: 46px; }
  .stage.member .btn-go { min-height: 50px; padding: 14px 32px; }
  .stage.member .cue { margin-top: 10px; }
}
/* 실제 산책 재기: 휴대폰(손가락으로 쓰는 화면이나 좁은 화면)에서만 보인다 */
.real-cta { display: none; }
@media (max-width: 767px), (hover: none) and (pointer: coarse) {
  .stage.member .real-cta {
    display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; max-width: 420px; margin-top: 10px;
    padding: 10px 16px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .95); border: 1px solid rgba(62, 40, 23, .22);
    color: var(--cocoa); text-decoration: none; box-shadow: 0 6px 16px rgba(62, 40, 23, .08);
  }
  .stage.member .real-cta b { font-size: 15px; font-weight: 700; }
  .stage.member .real-cta b::after { content: ' ›'; color: rgba(62, 40, 23, .45); }
  .stage.member .real-cta span { font-size: 11.5px; line-height: 1.35; color: rgba(62, 40, 23, .6); }
}
/* 휴대폰: 회원 첫 화면을 한 화면에 (로고를 작게 위로, 고르는 칸은 둘씩, [산책 시작]까지 보이게) */
@media (max-width: 560px) {
  .stage.member { justify-content: flex-start; padding: 4px 0 22px; }
  .stage.member .logo-big { width: min(120px, 32vw); }
  .stage.member .tagline { margin-top: 3px; font-size: 13.5px; line-height: 1.25; }
  .stage.member .panel { margin-top: 9px; padding: 11px 12px 12px; border-radius: 18px; }
  .stage.member .panel .picks { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stage.member .panel .picks label { gap: 2px; }
  .stage.member .panel .picks label > span, .stage.member .panel .dogpick > span { font-size: 11px; }
  .stage.member .panel .picks select { padding: 7px 12px; font-size: 14px; }
  .stage.member .dogpick-list { gap: 7px; padding: 2px 2px 4px; }
  .stage.member .dogcard { flex: 0 0 72px; padding: 5px 5px 7px; gap: 4px; border-radius: 16px; }
  .stage.member .dogcard img, .stage.member .dogcard .dogcard-blank { width: 54px; height: 54px; border-radius: 11px; }
  .stage.member .dogcard b { font-size: 11px; }
  .stage.member .panel .picks { gap: 7px; }
  /* 털 색: 여러 줄로 쌓이지 않게 한 줄로 두고 옆으로 밀어 고른다 */
  .stage.member .panel #coatField { margin-top: 9px; flex-wrap: nowrap; gap: 6px; }
  .stage.member .panel #coatField > span { margin-right: 0; flex: none; }
  .stage.member .panel #coatChoices { flex: 1; min-width: 0; flex-wrap: nowrap; overflow-x: auto; gap: 5px; padding-bottom: 2px; scrollbar-width: none; }
  .stage.member .panel #coatChoices::-webkit-scrollbar { display: none; }
  .stage.member .panel .chips button { flex: none; padding: 5px 10px; font-size: 12px; }
  .stage.member .start-form { margin-top: 9px; gap: 7px; }
  .stage.member .start-form input { height: 42px; }
  .stage.member .namelab { font-size: 13px; }
  .stage.member .btn-go { min-height: 48px; padding: 13px 28px; font-size: 17px; }
  .stage.member .real-cta { margin-top: 7px; padding: 8px 14px; flex-direction: row; gap: 6px; }
  .stage.member .real-cta b { font-size: 14px; }
  .stage.member .real-cta span { display: none; }
  .stage.member .cue { margin-top: 10px; }
}
@media (max-width: 330px) { .keys { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .stage .play, .btn-go { transition: none; } }

/* 휴대폰: 아래쪽 조이스틱과 [자동 걷기] [달리기] [공 던지기] [행동] 버튼을 더 작게 (화면을 덜 가리게) */
@media (max-width: 767px), (max-height: 480px) {
  #hud > #dock { bottom: calc(8px + env(safe-area-inset-bottom, 0px)); gap: 5px 0; }
  .dock-side { gap: 6px; }
  #joy { width: 78px; height: 78px; border-width: 2px; }
  #joyKnob { width: 32px; height: 32px; margin: -16px 0 0 -16px; border-width: 2px; }
  #dock button { width: 38px; height: 38px; font-size: 9px; line-height: 1.1; border-width: 1.5px; box-shadow: 0 2px 0 rgba(22, 58, 33, .35); }
  #dock button:active { transform: translateY(2px); box-shadow: none; }
  #dock #btnAct { width: 46px; height: 46px; font-size: 11px; }
  #dock #btnAct.has::after { width: 10px; height: 10px; right: 0; top: 0; border-width: 1.5px; }
  #tricks { bottom: 100px; }
  #btnCafeGo { bottom: 100px; }
}
@media (max-height: 480px) {
  #tricks { bottom: 8px; }
  #btnCafeGo { bottom: 10px; }
}
