/* 꼬리길 모바일 웹 — 기획 리뷰 문서(tail_trail.html)의 톤을 따른다:
   Crisp White(#FFFFFF) + Cobalt(#2563EB/#1E3A8A) + Teal(#0F766E), 머리선(hairline) 구분, 0px 이미지 모서리, 숫자는 JetBrains Mono */
:root {
  --paper: #FFFFFF; --ink: #111317; --ink2: #272C35; --mute: #4B5563; --hair: #DCE1E7; --soft: #F3F6FA;
  --accent: #2563EB; --accent-text: #1E3A8A; --teal: #0F766E; --teal-text: #115E59; --warn: #B45309; --bad: #991B1B;
  --sans: 'Plus Jakarta Sans', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --tabbar: 62px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: rgba(37,99,235,.12); overscroll-behavior-y: contain; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--accent-text); text-underline-offset: 3px; }
h1, h2, h3 { letter-spacing: -0.015em; line-height: 1.3; text-wrap: balance; }
h2 { font-size: 21px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 6px; }
em { font-style: normal; color: var(--mute); font-size: 12px; font-weight: 400; margin-left: 4px; }
.muted { color: var(--mute); font-size: 14px; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); border: 1px solid var(--hair); background: var(--card); padding: 10px 12px; border-radius: 0; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.primary { background: var(--accent-text); color: var(--on-accent); border: 0; padding: 12px 18px; font-weight: 700; }
.primary:disabled { opacity: .55; }
.primary.block, .block { width: 100%; }
.ghost { background: var(--card); color: var(--accent-text); border: 1px solid var(--hair); padding: 8px 12px; font-weight: 600; }
.small { font-size: 13px; padding: 6px 10px; white-space: nowrap; }
.row { display: flex; gap: 8px; align-items: flex-end; }
.row > .field { margin-bottom: 0; }
.plan-form > .row { margin-bottom: 14px; }
.diary-form .row { margin-bottom: 14px; }
#btnLocate { height: 45px; }
.grow { flex: 1; }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--ink2); margin-bottom: 6px; }
.msg { color: var(--bad); font-size: 14px; min-height: 1.2em; }

/* 로그인 */
.login-view { min-height: 100vh; display: grid; place-items: start center; padding: 48px 22px; }
.login-card { width: 100%; max-width: 420px; }
.eyebrow { font-family: var(--mono); font-size: 12px; color: var(--accent-text); letter-spacing: .04em; margin: 0 0 10px; }
.login-card h1 { font-size: 30px; font-weight: 800; margin: 0 0 12px; border-top: 2px solid var(--ink); padding-top: 16px; }
.deck { color: var(--ink2); margin: 0 0 24px; }
.remember { display: flex; gap: 6px; align-items: center; font-size: 14px; color: var(--mute); margin: -4px 0 14px; }
.remember input { width: auto; }
.login-card .primary { width: 100%; }
.signup { display: block; margin-top: 18px; padding: 14px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); font-weight: 700; text-decoration: none; }
.server-line { font-family: var(--mono); font-size: 11px; color: var(--mute); margin-top: 12px; word-break: break-all; }
dialog { border: 1px solid var(--hair); padding: 22px; max-width: 380px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(17, 19, 23, .45); }

/* 앱 셸 */
.app { max-width: 640px; margin: 0 auto; padding-bottom: calc(var(--tabbar) + 24px + env(safe-area-inset-bottom)); }
.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--top-bg); border-bottom: 1px solid var(--hair); backdrop-filter: blur(6px); }
.brand { display: flex; gap: 10px; align-items: center; }
.brand b { display: block; font-size: 17px; line-height: 1.1; }
.brand small { font-family: var(--mono); font-size: 11px; color: var(--mute); }
.top-right { display: flex; gap: 8px; align-items: center; }
.timer { font-family: var(--mono); font-size: 13px; color: var(--accent-text); }
.timer.warn { color: var(--warn); } .timer.crit { color: var(--bad); }
main { padding: 18px 16px; }
.tab { display: none; } .tab.active { display: block; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--card); border-top: 1px solid var(--hair); }
.tabbar button { background: none; border: 0; font-size: 12px; color: var(--mute); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tabbar button span { font-size: 18px; }
.tabbar button.active { color: var(--accent-text); font-weight: 700; box-shadow: inset 0 2px 0 var(--accent); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 16px); transform: translateX(-50%); background: var(--ink); color: var(--on-accent); padding: 10px 14px; font-size: 14px; z-index: 9; max-width: 90%; }

/* 칩 */
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip { flex: none; border: 1px solid var(--hair); background: var(--card); padding: 7px 11px; font-size: 14px; color: var(--ink2); }
.chip[aria-checked="true"] { background: var(--accent-text); border-color: var(--accent-text); color: var(--on-accent); font-weight: 700; }
.plan-form { border-top: 2px solid var(--ink); padding-top: 14px; }

/* 결과 */
.result { margin-top: 28px; }
.loading { padding: 28px 0; color: var(--mute); border-top: 1px solid var(--hair); }
.loading b { color: var(--accent-text); font-family: var(--mono); }
.metric-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--hair); padding: 14px 0; margin-bottom: 18px; }
.metric-strip.small { margin-bottom: 14px; }
.metric { padding: 0 10px; border-left: 1px solid var(--hair); }
.metric:first-child { border-left: 0; padding-left: 0; }
.metric-num { font-family: var(--mono); font-size: 26px; font-weight: 500; line-height: 1.1; color: var(--accent-text); white-space: nowrap; }
.metric-num.go { color: var(--teal-text); } .metric-num.caution { color: var(--warn); } .metric-num.indoor { color: var(--bad); }
.metric-label { font-size: 12px; color: var(--mute); line-height: 1.4; margin-top: 4px; }
.card-lines { font-size: 18px; font-weight: 700; line-height: 1.45; color: var(--accent-text); border-left: 3px solid var(--accent); padding-left: 14px; margin: 0 0 18px; }
.card-lines p { margin: 0 0 2px; }
.sec { border-top: 1px solid var(--hair); padding-top: 16px; margin-top: 20px; }
.sec h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sec h3 small { font-weight: 400; font-size: 12px; color: var(--mute); }
.reasons { margin: 6px 0 0; padding-left: 18px; color: var(--ink2); font-size: 14px; }
.reasons li { margin-bottom: 4px; }
.hours { display: flex; overflow-x: auto; border: 1px solid var(--hair); margin-top: 10px; }
.hour { flex: none; width: 56px; text-align: center; padding: 6px 0; border-left: 1px solid var(--hair); font-size: 12px; }
.hour:first-child { border-left: 0; }
.hour b { display: block; font-family: var(--mono); font-size: 13px; color: var(--ink); }
.hour .pop { color: var(--accent); font-family: var(--mono); }
.course { padding: 12px 0; border-bottom: 1px solid var(--hair); }
.course:last-child { border-bottom: 0; }
.course .meta { font-family: var(--mono); font-size: 12px; color: var(--mute); }
.course p { font-size: 14px; color: var(--ink2); margin: 6px 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 6px; border: 1px solid currentColor; margin-right: 4px; }
.tag.go { color: var(--teal-text); } .tag.caution { color: var(--warn); } .tag.indoor { color: var(--bad); }
.links a { font-size: 13px; margin-right: 12px; }
.book { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.book:last-child { border-bottom: 0; }
.book img { width: 76px; height: 108px; object-fit: cover; border-radius: 0; border: 1px solid var(--hair); background: var(--soft); }
.book .t { font-weight: 700; line-height: 1.35; }
.book .a { font-size: 13px; color: var(--mute); }
.book .i { font-size: 13px; color: var(--ink2); margin: 6px 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.book .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.book .acts a, .book .acts button { font-size: 13px; }
.book-grid .book { grid-template-columns: 64px 1fr; }
.book-grid .book img { width: 64px; height: 92px; }
.places { list-style: none; padding: 0; margin: 0; }
.places li { padding: 8px 0; border-bottom: 1px solid var(--hair); font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.places li:last-child { border-bottom: 0; }
.places .d { font-family: var(--mono); font-size: 12px; color: var(--mute); white-space: nowrap; }
.audio { background: var(--soft); border-top: 2px solid var(--accent); padding: 14px; margin-top: 20px; }
.audio p.script { white-space: pre-line; font-size: 15px; color: var(--ink2); margin: 10px 0; }
.audio audio { width: 100%; margin-top: 6px; }
.sources { font-size: 12px; color: var(--mute); margin-top: 22px; border-top: 1px solid var(--hair); padding-top: 10px; }
.sources span { display: inline-block; margin-right: 10px; }
.sources .bad { color: var(--bad); }
.attribution { font-size: 12px; color: var(--mute); margin-top: 14px; }
.filters { margin: 10px 0; } .filters label { font-size: 13px; color: var(--mute); display: flex; gap: 6px; align-items: center; } .filters select { width: auto; padding: 6px 8px; }
#searchForm { margin-bottom: 8px; }
.diary-form { border-top: 2px solid var(--ink); padding-top: 14px; }
.diary-form .row .field { flex: 1; }
.diary-list { list-style: none; padding: 0; margin: 20px 0 0; }
.diary-list li { border-top: 1px solid var(--hair); padding: 12px 0; }
.diary-list .when { font-family: var(--mono); font-size: 12px; color: var(--mute); }
.empty { color: var(--mute); font-size: 14px; padding: 18px 0; border-top: 1px solid var(--hair); }
@media (min-width: 700px) { main { padding: 28px 24px; } .card-lines { font-size: 20px; } }

/* ---- 모바일 최적화(v0.1.1): 390px 기준, 손가락 터치 44px, iOS 자동 확대 방지(입력 16px) ---- */
.top { padding-top: max(10px, env(safe-area-inset-top)); }
.chip, .ghost, .primary, .tabbar button { min-height: 44px; }
.chip { display: inline-flex; align-items: center; }
.links { display: flex; flex-wrap: wrap; gap: 4px 0; }
.links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px 0 0; }
.places li a { display: inline-block; padding: 4px 0; }
.book .acts a { min-height: 40px; display: inline-flex; align-items: center; }
input, select, textarea { font-size: 16px; }
@media (max-width: 480px) {
  main { padding: 14px 14px; }
  h2 { font-size: 19px; }
  .metric { padding: 0 8px; }
  .metric-num { font-size: 22px; }
  .metric-label { font-size: 11.5px; }
  .card-lines { font-size: 16px; padding-left: 12px; }
  .chip { padding: 6px 10px; font-size: 14px; }
  .course .meta { font-size: 11.5px; line-height: 1.5; }
  .hour { width: 52px; }
  .plan-form > button.primary { position: sticky; bottom: calc(var(--tabbar) + 8px + env(safe-area-inset-bottom)); z-index: 3; box-shadow: 0 6px 16px rgba(17,19,23,.18); }
}

.admin-link { display: inline-flex; align-items: center; text-decoration: none; min-height: 44px; }

/* ---- v0.1.3: 기록·의견·오늘의 추천·자주 걷는 곳·설정(frontend-go-fishing 기능을 꼬리길 톤으로) ---- */
.icon-btn { background: var(--card); border: 1px solid var(--hair); min-width: 44px; min-height: 44px; font-size: 18px; line-height: 1; padding: 0; }
.top-right { gap: 6px; }
.notes { margin: 18px 0 0; border-top: 1px solid var(--hair); padding-top: 10px; font-size: 13px; color: var(--mute); }
.notes summary { cursor: pointer; font-weight: 700; color: var(--ink2); min-height: 32px; }
.notes ul { padding-left: 18px; margin: 8px 0 0; } .notes li { margin-bottom: 6px; }
.pre { white-space: pre-line; } .small-text { font-size: 12.5px; }
dialog .row.end { justify-content: flex-end; margin-top: 14px; } .row.between { justify-content: space-between; align-items: center; } .row.between h2 { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.link-as-btn { display: flex; align-items: center; justify-content: center; min-height: 44px; text-decoration: none; }
.today-tip { margin: 12px 16px 0; border-top: 2px solid var(--accent); background: var(--soft); padding: 12px 14px; }
.today-tip-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; color: var(--accent-text); }
.today-tip-head button { background: none; border: 0; font-size: 16px; min-width: 40px; min-height: 40px; color: var(--mute); }
.today-tip p { margin: 6px 0; font-size: 14.5px; color: var(--ink2); }
.today-tip-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ai-lock { margin: 12px 16px 0; padding: 14px; border: 1px solid var(--danger-line); background: var(--danger-soft); } .ai-lock h2 { font-size: 16px; margin: 0 0 4px; color: var(--bad); } .ai-lock p { margin: 0; font-size: 14px; }
.history .hist-day { border-top: 1px solid var(--hair); padding: 4px 0; } .hist-day summary { display: flex; justify-content: space-between; align-items: center; min-height: 44px; cursor: pointer; font-size: 15px; }
.hist-item { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--hair); }
.hist-item img { width: 48px; height: 68px; object-fit: cover; border: 1px solid var(--hair); }
.hist-item .acts { display: flex; gap: 8px; margin-top: 6px; }
.opinion-form { border-top: 2px solid var(--ink); padding-top: 14px; }
.stars { display: flex; gap: 4px; } .star { background: none; border: 0; font-size: 30px; line-height: 1; min-width: 44px; min-height: 44px; color: #CBD5E1; } .star.on { color: #F59E0B; }
#placesDialog .places li { align-items: center; }
.tabbar { grid-template-columns: repeat(5, 1fr); } .tabbar button { font-size: 11.5px; }
@media (max-width: 380px) { .brand small { display: none; } .top-right .ghost { padding: 8px 9px; } }
/* 헤더 한 줄 유지(390px): 버튼 글자 줄바꿈 금지, 부제 숨김 */
.top { gap: 8px; padding-left: 12px; padding-right: 12px; }
.top-right .ghost, .admin-link { white-space: nowrap; padding: 8px 10px; font-size: 13px; }
.top-right .icon-btn { min-width: 40px; }
@media (max-width: 480px) { .brand small { display: none; } .brand b { font-size: 16px; } .brand img { width: 26px; height: 26px; } .timer { font-size: 12px; } .top-right { gap: 4px; } .top-right .icon-btn { min-width: 38px; font-size: 16px; } }

/* 목적지 상세: 작은 화면에서도 입력·조회 결과를 한 열로 읽는다. */
#destinationDialog { max-width: 560px; max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; overflow-wrap: anywhere; }
.dest-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dest-head .eyebrow { margin-bottom: 3px; }
.dest-head button { flex: none; }
.dest-open { margin: 4px 8px 4px 0; min-height: 44px; }
#destInfo { padding-bottom: 12px; border-bottom: 1px solid var(--hair); }
#destInfo p, #destResult p { margin: 6px 0; }
#destCar { min-width: 0; margin: 0 0 14px; padding: 12px; border: 1px solid var(--hair); }
#destCar legend { font-weight: 700; }
.dest-inputs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
#destResult section { margin-top: 16px; border-top: 1px solid var(--hair); padding-top: 12px; }
#destResult ul { list-style: none; padding: 0; margin: 0; }
#destResult li { margin: 10px 0; }
#destResult small { display: block; color: var(--mute); }
@media (max-width: 390px) { #destinationDialog { padding: 16px; } .dest-inputs { grid-template-columns: 1fr; } }

/* ==== 디자인 리프레시 v0.2.0 (Canva 시안): 숲 초록 + 따뜻한 종이색, 둥근 카드, 큰 글씨, 모든 연령 ====
   색: 배경 var(--paper) · 카드 #FFF · 주색 숲 초록 var(--accent) · 글자 #1F2A24 · 날씨 하늘 #3B82C4 · 주의 앰버 #B7791F · 실내 var(--danger) */
:root {
  --paper: #F7F5EF; --card: #FFFFFF; --ink: #1F2A24; --ink2: #34403A; --mute: #5F6B64; --hair: #E4E0D6; --soft: #EEF4EF;
  --accent: #2F6B4F; --accent-text: #24553F; --accent-soft: #E6F0E9; --sky: #3B82C4; --sky-soft: #EAF3FB;
  --teal: #2F6B4F; --teal-text: #24553F; --warn: #A86A12; --bad: #B4443A; --sun: #F2C14E;
  --sans: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif; --mono: 'Noto Sans KR', -apple-system, sans-serif;
  --r: 16px; --r-sm: 12px; --shadow: 0 1px 2px rgba(31,42,36,.05), 0 4px 14px rgba(31,42,36,.06);
}
html, body { background: var(--paper); color: var(--ink); }
h2 { font-weight: 800; }
input, select, textarea { border-radius: var(--r-sm); border-color: var(--hair); background: var(--card); min-height: 48px; }
textarea { min-height: 72px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.primary { background: var(--accent); border-radius: var(--r-sm); min-height: 52px; font-size: 16px; letter-spacing: -.01em; }
.primary:active { background: var(--accent-text); }
.primary.small { min-height: 44px; font-size: 14px; }
.ghost { border-radius: var(--r-sm); color: var(--accent-text); border-color: var(--hair); }
.ghost:active { background: var(--accent-soft); }
.field > span { color: var(--ink); font-size: 14px; }
dialog { border: 0; border-radius: 20px; box-shadow: 0 20px 50px rgba(15,23,42,.25); background: var(--card); }
dialog::backdrop { background: rgba(15,23,42,.45); }

/* 로그인 */
.login-view { padding: 28px 18px 40px; }
.login-card { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); padding: 22px; overflow: hidden; }
.login-hero { display: block; width: calc(100% + 44px); height: 150px; margin: -22px -22px 20px; object-fit: cover; }
.eyebrow { font-family: var(--sans); font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.login-card h1 { border-top: 0; padding-top: 0; font-size: 27px; line-height: 1.35; }
.deck { color: var(--mute); font-size: 15px; }
.signup { border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 14px 16px; text-align: center; color: var(--accent-text); background: var(--accent-soft); }
.notes { border-top: 0; }
.server-line { text-align: center; }

/* 앱 셸 */
.top { background: var(--top-bg); border-bottom: 1px solid var(--hair); }
.brand img { border-radius: 8px; }
.brand b { font-weight: 800; color: var(--ink); }
.icon-btn { border-radius: 12px; border-color: var(--hair); display: inline-flex; align-items: center; justify-content: center; color: var(--ink2); }
.icon-btn svg, .tabbar svg, .sec-ico { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.timer { background: var(--accent-soft); color: var(--accent-text); padding: 4px 8px; border-radius: 999px; font-weight: 700; }
.timer.warn { background: var(--caution-soft); } .timer.crit { background: var(--danger-soft); }
.tabbar { background: var(--card); border-top: 1px solid var(--hair); box-shadow: 0 -4px 16px rgba(15,23,42,.05); }
.tabbar button { color: var(--mute); font-size: 12px; gap: 3px; }
.tabbar button span { display: inline-flex; height: 24px; align-items: center; }
.tabbar button.active { color: var(--accent); box-shadow: none; font-weight: 800; }
.tabbar button.active span { background: var(--accent-soft); border-radius: 999px; padding: 0 14px; }
.toast { border-radius: 999px; padding: 10px 18px; background: var(--ink); }

/* 칩 */
.chip { border-radius: 999px; border-color: var(--hair); background: var(--card); color: var(--ink2); padding: 8px 14px; font-size: 15px; }
.chip[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }

/* 카드 공통: 폼·결과 섹션을 흰 카드로 */
.plan-form, .diary-form, .opinion-form { border-top: 0; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 16px; }
.plan-form h2 { font-size: 20px; }
.result { margin-top: 18px; }
.loading { border-top: 0; background: var(--card); border-radius: var(--r); padding: 22px 16px; text-align: center; }
.loading b { font-family: var(--sans); color: var(--accent); }
.sec { border-top: 0; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin-top: 14px; }
.sec h3 { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.sec h3 small { font-size: 12.5px; }
details.sec summary { font-weight: 700; min-height: 32px; cursor: pointer; }

/* 걷기 지수·날씨 요약 */
.metric-strip { border: 0; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 8px; margin-bottom: 14px; }
.metric { text-align: center; border-left-color: var(--hair); padding: 0 6px; }
.metric:first-child { padding-left: 6px; }
.metric-num { font-family: var(--sans); font-weight: 800; color: var(--ink); }
.metric:first-child .metric-num { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 5px solid currentColor; font-size: 22px; }
.metric-num.go { color: var(--accent); } .metric-num.caution { color: var(--warn); } .metric-num.indoor { color: var(--bad); }
.metric-label { font-size: 13px; }
.card-lines { border-left: 0; background: var(--accent-soft); border-radius: var(--r); padding: 14px 16px; color: var(--accent-text); font-size: 16.5px; }
.reasons { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 16px 12px 32px; margin: 0 0 14px; }
.hours { border: 0; gap: 8px; padding: 2px 2px 6px; margin: 0 0 4px; scrollbar-width: none; }
.hour { border: 0; background: var(--sky-soft); border-radius: 14px; width: 60px; padding: 8px 0; color: var(--ink2); }
.hour b { font-family: var(--sans); font-size: 15px; font-weight: 800; margin: 2px 0; }
.hour .pop { font-family: var(--sans); color: var(--sky); font-weight: 700; }

/* 코스·책·장소 */
.course { border-bottom-color: var(--hair); }
.course b { font-size: 16.5px; }
.course .meta { font-family: var(--sans); font-size: 13px; }
.tag { border-radius: 999px; padding: 2px 8px; border: 0; }
.tag.go { background: var(--accent-soft); } .tag.caution { background: var(--caution-soft); } .tag.indoor { background: var(--danger-soft); }
.links a { color: var(--accent-text); font-weight: 600; }
.book { border-bottom-color: var(--hair); }
.book img, .hist-item img { border-radius: 8px; border-color: var(--hair); box-shadow: 0 2px 8px rgba(15,23,42,.12); }
.book .t { font-size: 16px; }
.book-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.book-grid .book { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px; border: 0; }
.places li { border-bottom-color: var(--hair); }
.places .d { font-family: var(--sans); font-weight: 700; color: var(--accent-text); }
.audio { background: linear-gradient(135deg, var(--accent), var(--accent-hover)); color: var(--on-accent); border-top: 0; border-radius: var(--r); padding: 18px 16px; margin-top: 14px; box-shadow: var(--shadow); }
.audio h3, .audio .muted, .audio p.script { color: var(--on-accent); }
.audio .muted { opacity: .85; }
.audio .primary { background: var(--card); color: var(--accent-text); }
.audio p.script { background: rgba(255,255,255,.12); border-radius: var(--r-sm); padding: 12px; }
.sources { border-top: 0; text-align: left; padding: 6px 4px; }

/* 오늘의 꼬리길 말풍선·잠금 */
.today-tip { border-top: 0; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); border-left: 5px solid var(--sun); }
.today-tip-head { color: var(--accent-text); }
.ai-lock { border-radius: var(--r); }

/* 일기·기록·의견 */
#diaryStats { margin-bottom: 14px; }
#diaryStats .metric:first-child .metric-num { width: auto; height: auto; border: 0; display: block; font-size: 26px; }
.diary-list li { background: var(--card); border-radius: var(--r); border-top: 0; box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 10px; }
.diary-list .when { font-family: var(--sans); }
.empty { border-top: 0; background: var(--card); border-radius: var(--r); padding: 22px 16px; text-align: center; }
.history .hist-day { background: var(--card); border-radius: var(--r); border-top: 0; box-shadow: var(--shadow); padding: 4px 14px; margin-bottom: 10px; }
.filters select { border-radius: 10px; min-height: 40px; }
@media (max-width: 480px) {
  .metric-num { font-size: 20px; }
  .metric:first-child .metric-num { width: 58px; height: 58px; font-size: 20px; }
  .card-lines { font-size: 15.5px; }
  .plan-form > button.primary { box-shadow: 0 8px 20px rgba(16,185,129,.28); }
}
.result { scroll-margin-top: 72px; }
/* 가입 신청 화면(register.html) */
#requestForm label { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin: 0 0 14px; }
#requestForm label input { margin-top: 6px; font-weight: 400; }
#requestForm button[type=submit], .registration-dialog button[type=submit] { width: 100%; min-height: 52px; border: 0; border-radius: var(--r-sm); background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 16px; margin-top: 6px; }
#requestForm button:disabled { opacity: .55; }
.back-to-login { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 8px; font-weight: 600; }
/* 자주 걷는 곳: 주소 찾기 → 선택 → 저장 (v0.2.2, 어디물어 출발지 추가와 같은 절차) */
#placesDialog { max-height: 90vh; max-height: 90dvh; overflow-y: auto; }
.place-form { margin: 6px 0 14px; }
.place-form .field { margin-bottom: 6px; }
.place-form .row { align-items: stretch; }
.place-form .row .ghost { min-height: 48px; white-space: nowrap; }
.place-form button:disabled { opacity: .45; cursor: not-allowed; }
.place-steps { font-size: 12.5px; color: var(--mute); margin: 6px 0 0; }
.postcode-wrap { margin-top: 10px; border: 1px solid var(--hair); border-radius: var(--r-sm); overflow: hidden; background: var(--card); }
.postcode-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 700; }
.postcode-head button { min-height: 36px; padding: 4px 12px; border-radius: 10px; border: 1px solid var(--hair); background: var(--card); color: var(--ink); }
.postcode-box { height: min(440px, 58dvh); }
.place-picked { margin-top: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--accent-soft); display: flex; flex-direction: column; gap: 2px; }
.place-picked span { font-size: 12px; color: var(--accent-text); } .place-picked b { font-size: 15px; }
#placeAdd { margin-top: 10px; }
/* 출발지 칩 한 줄 통합 v0.3.0: [◎ 현재 위치] [자주 걷는 곳…] [＋ 주소로 추가] — 입력칸·현재 위치·저장 버튼을 하나로 */
.origin-field > span em { font-size: 12px; }
.chip.gps { color: var(--accent-text); font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip.gps[aria-checked="true"] { color: var(--on-accent); }
.chip.add { border-style: dashed; color: var(--accent-text); font-weight: 700; background: var(--card); }
.chip:disabled { opacity: .5; }
.origin-now { margin: 10px 2px 0; font-size: 14px; color: var(--ink2); }
.origin-now b { color: var(--accent-text); }
.origin-now.empty { color: var(--warn); font-weight: 700; }
.place-acts { display: flex; gap: 8px; margin-top: 10px; }
.place-acts .ghost { flex: 1; min-height: 52px; }
.place-acts .primary { flex: 1.6; }
#placeAdd { margin-top: 0; }
/* 만들기 전 안내 팝업 · AI 맞춤 안내 v0.3.1 */
#askDialog { max-width: 400px; max-height: 90dvh; overflow-y: auto; }
#askDialog h2 { font-size: 19px; margin: 0 0 8px; }
.ask-msg { font-size: 15px; line-height: 1.65; color: var(--ink2); margin: 0 0 14px; }
.ask-msg b { color: var(--accent-text); }
.ask-box { margin: 0 0 14px; }
.ask-label { font-size: 14px; font-weight: 700; margin: 0 0 8px; }
.ask-skip { margin: 4px 0 12px; }
.ask-acts { display: flex; gap: 8px; }
.ask-acts .ghost { flex: 1; min-height: 52px; }
.ask-acts .primary { flex: 1.5; }
.auto-note { background: var(--caution-soft); border-radius: var(--r-sm); padding: 10px 14px; font-size: 14px; color: var(--caution-text); margin: 0 0 12px; line-height: 1.55; }
.top-right .ghost, .admin-link { font-weight: 700; line-height: 1; }
/* 검수 보정 v0.3.1: 입력칸 옆 버튼 높이 통일, 일기 통계 숫자 통일, 별점 톤 */
#searchForm { align-items: stretch; } #searchForm .ghost { min-height: 48px; padding: 0 16px; }
#diaryStats .metric-num, #diaryStats .metric:first-child .metric-num { display: block; width: auto; height: auto; border: 0; font-size: 24px; color: var(--accent-text); }
.star { color: #DDD8CC; } .star.on { color: #F2B33D; }
.filters select { min-height: 44px; }
/* 입력칸 지우기(ⓧ) v0.3.5 — 어디물어와 같은 방식 */
.clearable { position: relative; display: block; }
.clearable input { width: 100%; box-sizing: border-box; padding-right: 44px; }
.clear-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; min-height: 0; padding: 0; display: grid; place-items: center; border: 0; background: transparent; border-radius: 50%; cursor: pointer; box-shadow: none; }
.clear-btn svg circle { fill: #cbd5e1; } .clear-btn svg path { stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.clear-btn:hover svg circle, .clear-btn:focus-visible svg circle { fill: #64748b; } .clear-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.clear-btn[hidden] { display: none; }
/* 일기 날짜·별점 겹침 수정 v0.3.6: iOS 사파리 날짜 칸은 고유 최소 너비가 있어 flex 칸을 넘친다 → 최소 너비 0, 기본 모양 해제 */
.row > .field { min-width: 0; }
.diary-form .row { align-items: flex-start; }
.diary-form .row .field { flex: 1 1 0; }
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; box-sizing: border-box; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.diary-form .row input, .diary-form .row select { height: 48px; min-height: 48px; }
.diary-form .row select { -webkit-appearance: none; appearance: none; padding-right: 36px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='16' viewBox='0 0 12 16'%3E%3Cpath d='M2 6l4-4 4 4M2 10l4 4 4-4' fill='none' stroke='%23333' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
/* 오늘의 걷기 날씨 카드 v0.3.7 — 캔바 시안: 흰 카드 하나에 상태 칩·팁·시간별 예보, 예보 칸은 카드 너비를 고르게 채움 */
.wx-card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin: 0 0 14px; }
.wx-card h3 { font-size: 17px; font-weight: 800; margin: 0 0 12px; }
.wx-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-bottom: 14px; border-bottom: 1px solid var(--hair); }
.wx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 9px; border-radius: 999px; font-size: 14px; font-weight: 700; line-height: 1.3; background: var(--accent-soft); color: var(--accent-text); }
.wx-chip svg { width: 18px; height: 18px; flex: none; }
.wx-chip svg circle { fill: currentColor; } .wx-chip svg path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.wx-chip.caution { background: var(--caution-soft); color: var(--caution-text); } .wx-chip.indoor { background: var(--danger-soft); color: var(--danger-text); }
.wx-tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; width: 100%; }
.wx-tips li { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; color: var(--mute); line-height: 1.45; }
.wx-tips svg { width: 18px; height: 18px; flex: none; fill: none; stroke: #8A8F7E; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.wx-hours { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(68px, 1fr); overflow-x: auto; scrollbar-width: none; margin: 12px -4px 0; padding: 0 4px; }
.wx-hours::-webkit-scrollbar { display: none; }
.wx-hour { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: 14px; text-align: center; }
.wx-hour + .wx-hour::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; border-left: 1px solid var(--hair); }
.wx-hour.now { background: var(--accent-soft); } .wx-hour.now + .wx-hour::before { display: none; }
.wx-hour .t { font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.wx-hour b { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.wx-hour .sky { font-size: 13px; color: var(--ink2); }
.wx-hour .pop { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; color: var(--sky); }
.wx-hour .pop svg { width: 12px; height: 12px; fill: var(--sky); }
.wx-ico { width: 30px; height: 30px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.wx-ico .i-sun { fill: #F4B92E; } .wx-ico .i-ray { stroke: #F4B92E; stroke-width: 1.8; }
.wx-ico .i-moon { fill: #F2D27A; } .wx-ico .i-cloud { fill: #DCE3EA; stroke: #A9B6C3; stroke-width: 1.2; }
.wx-ico .i-drop { stroke: var(--sky); stroke-width: 1.8; } .wx-ico .i-snow { stroke: #7FA7CF; stroke-width: 3; }
/* 하단 메뉴 아래 비침 수정 v0.3.8: iOS 사파리가 주소창·도구막대를 접을 때 고정 하단 메뉴가 화면 끝보다 위에 머물러 그 아래로 본문이 비친다
   → 메뉴 흰 배경을 화면 아래쪽으로 길게 늘여 틈을 덮는다(메뉴 위치·크기는 그대로) */
.tabbar::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 100vh; background: var(--card); pointer-events: none; }
/* 책 카드 버튼 v0.3.9: '예스24' 링크도 버튼 모양으로, 세 버튼 높이·모양 통일 */
.book .acts a.yes24 { text-decoration: none; justify-content: center; min-height: 40px; }
.book .acts .ghost.small { min-height: 40px; padding: 6px 14px; display: inline-flex; align-items: center; justify-content: center; }
/* 상황 선택 v0.3.10: 12개를 가로 2개 × 세로 6줄, 칸 너비·간격 동일 */
.chips.sit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.chips.sit-grid .chip { width: 100%; min-width: 0; justify-content: flex-start; gap: 6px; padding: 8px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 출발지 고르기 재설계 v0.3.12 — 위계: ① 선택 결과 배너 ② 현재 위치(주 버튼) ③ 자주 걷는 곳(2칸 타일) ④ 저장·추가(글자 버튼) */
.o-ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.o-ico .fill { fill: currentColor; stroke: none; } .o-ico .on-fill { stroke: #fff; stroke-width: 2.2; } .o-ico .hole { fill: #fff; stroke: none; }
.origin-now { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent); }
.origin-now .o-ico { width: 28px; height: 28px; }
.origin-now span { display: flex; flex-direction: column; align-items: flex-start; text-align: left; min-width: 0; }
.origin-now small { font-size: 12.5px; color: var(--mute); font-weight: 600; }
.origin-now b { font-size: 18px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.origin-now.empty { background: var(--caution-soft); color: var(--warn); } .origin-now.empty b { color: var(--warn); font-size: 16px; }
.origin-picker { display: block; }
.origin-gps { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border: 1.5px solid var(--accent); border-radius: var(--r-sm); background: var(--card); color: var(--accent); text-align: left; }
.origin-gps > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.origin-gps b { font-size: 16px; font-weight: 800; color: var(--accent-text); }
.origin-gps small { font-size: 13px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.origin-gps[aria-checked="true"] { background: var(--accent); color: var(--on-accent); } .origin-gps[aria-checked="true"] b, .origin-gps[aria-checked="true"] small { color: var(--on-accent); }
.origin-gps[aria-checked="true"] .o-ico .fill { fill: #fff; } .origin-gps[aria-checked="true"] .o-ico .on-fill { stroke: var(--accent); }
.origin-gps[aria-busy="true"] .o-ico { animation: o-spin 1.2s linear infinite; }
@keyframes o-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .origin-gps[aria-busy="true"] .o-ico { animation: none; } }
.origin-sub { display: flex; align-items: baseline; justify-content: space-between; margin: 16px 2px 8px; font-size: 13px; font-weight: 700; color: var(--mute); }
.origin-sub em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.origin-places { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.origin-tile { position: relative; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--hair); border-radius: var(--r-sm); background: var(--card); color: var(--mute); text-align: left; font-size: 15px; }
.origin-tile span { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.origin-tile .o-ico { width: 20px; height: 20px; }
.origin-tile[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.origin-tile[aria-checked="true"] span { color: var(--accent-text); font-weight: 800; }
.origin-tag { margin-left: auto; flex: none; font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent-text); background: var(--card); border-radius: 999px; padding: 2px 7px; }
.origin-empty { grid-column: 1 / -1; margin: 0; padding: 12px; border: 1px dashed var(--hair); border-radius: var(--r-sm); font-size: 13.5px; color: var(--mute); text-align: center; }
.origin-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hair); }
.origin-link { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 0 2px; border: 0; background: none; color: var(--accent-text); font-size: 14px; font-weight: 700; }
.origin-link .o-ico { width: 18px; height: 18px; }
.origin-link:disabled { opacity: .5; }
/* 메인 입력 폼 재설계 v0.3.13 — 단계 번호 · 구획선 · 칸 격자로 읽는 순서를 분명하게 */
.plan-form { counter-reset: step; }
.plan-form h2 { margin-bottom: 4px; }
.plan-lead { margin: 0 0 18px; font-size: 14px; color: var(--mute); line-height: 1.5; }
.plan-form > .field { counter-increment: step; margin: 0; }
.plan-form > .field + .field { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--hair); }
.plan-form > .field > span { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 12px; font-size: 16px; font-weight: 800; color: var(--ink); }
.plan-form > .field > span::before { content: counter(step); display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 800; }
.plan-form > .field > span em { flex-basis: 100%; padding-left: 32px; font-style: normal; font-size: 13px; font-weight: 500; color: var(--mute); }
.plan-form .opt { font-size: 11.5px; font-weight: 700; color: var(--mute); background: var(--soft); border-radius: 999px; padding: 2px 8px; }
.plan-form > button.primary { margin-top: 22px; min-height: 54px; font-size: 17px; font-weight: 800; border-radius: var(--r-sm); }
/* 날짜: 5칸, 요일·날짜 두 줄 */
.chips.date-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; overflow: visible; }
.chip.two { flex-direction: column; justify-content: center; gap: 2px; min-height: 58px; padding: 6px 2px; border-radius: var(--r-sm); width: 100%; }
.chip.two .chip-main { font-size: 15px; font-weight: 800; color: var(--ink); }
.chip.two .chip-sub { font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip.two[aria-checked="true"] .chip-main, .chip.two[aria-checked="true"] .chip-sub { color: var(--on-accent); }
/* 상황: 2칸 격자(이모지 + 이름) */
.chips.sit-grid .chip { border-radius: var(--r-sm); min-height: 48px; }
.chip-emo { flex: none; font-size: 18px; line-height: 1; }
/* 누구와: 4칸, 이모지 위·이름 아래 */
.chips.who-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; overflow: visible; }
.chips.who-grid .chip { width: 100%; flex-direction: column; justify-content: center; gap: 4px; min-height: 66px; padding: 8px 2px; border-radius: var(--r-sm); font-size: 14px; }
.chips.who-grid .chip-emo { font-size: 22px; }
.plan-form textarea { min-height: 76px; border-radius: var(--r-sm); line-height: 1.5; }
/* 제목·버튼 구분 v0.3.14 — 제목은 배경 없는 글자, 고르는 버튼은 회색 바탕·그림자로 '누르는 것'처럼 */
.plan-form > .field > span { font-size: 17px; letter-spacing: -0.2px; }
.plan-form > .field > span::before { width: 22px; height: 22px; background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); font-size: 12px; }
.origin-now { background: transparent; border-radius: 0; border-left: 4px solid var(--accent); padding: 4px 0 4px 12px; margin-bottom: 14px; }
.origin-now.empty { background: transparent; border-left-color: var(--warn); }
.plan-form .chip, .plan-form .origin-tile { background: var(--soft); border-color: transparent; box-shadow: 0 1px 0 rgba(15,23,42,.10), 0 1px 3px rgba(15,23,42,.06); }
.plan-form .chip:active, .plan-form .origin-tile:active { transform: translateY(1px); box-shadow: none; }
.plan-form .chip[aria-checked="true"] { background: var(--accent); border-color: var(--accent); box-shadow: 0 2px 8px rgba(16,185,129,.30); }
.plan-form .origin-tile[aria-checked="true"] { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.origin-gps { box-shadow: 0 1px 3px rgba(15,23,42,.08); }
.origin-sub { margin-top: 18px; }
/* ===== 디자인 통일 v0.4.0 (캔바 '꼬리길 UI 디자인 시스템': 관리자 화면 admin.css 와 같은 색·모서리·버튼) ===== */
:root { --warn: #B45309; --bad: #991B1B; --info: #3B82C4; }
.primary { min-height: 52px; border-radius: var(--r-sm); font-weight: 800; }
.primary.small { min-height: 44px; }
.ghost { border-radius: var(--r-sm); font-weight: 700; }
.ghost.danger, .danger.ghost { color: var(--bad); border-color: var(--danger-line); }
h2 { font-size: 22px; letter-spacing: -0.3px; } h3 { font-size: 17px; }
.muted, .hint { color: var(--mute); }
/* 로그인 화면 재설계 v0.4.1 — 캔바 시안·디자인 시스템: 짧고 굵은 헤드라인, 기능 칩, 초록 체크박스, 안내/오류 구분 */
.login-card { padding: 22px 22px 26px; }
.login-card .eyebrow { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; margin: 0 0 8px; }
.login-card h1.login-title { font-size: 40px; font-weight: 900; line-height: 1.18; letter-spacing: -1.2px; margin: 0 0 12px; color: var(--ink); }
.login-title em { font-style: normal; color: var(--accent); background: linear-gradient(transparent 62%, var(--accent-soft) 62%); padding: 0 2px; }
.login-card .deck { font-size: 16px; color: var(--ink2); line-height: 1.55; margin: 0 0 14px; }
.login-feats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; }
.login-feats li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 14px; font-weight: 700; }
.login-feats span { font-size: 16px; line-height: 1; }
#loginForm .field > span { font-size: 15px; font-weight: 800; }
.remember { margin: 2px 0 18px; font-size: 15px; color: var(--ink2); gap: 10px; }
.remember input { width: 22px; height: 22px; min-height: 0; margin: 0; accent-color: var(--accent); }
#loginBtn { font-size: 18px; }
.msg:empty { display: none; }
.msg { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--r-sm); font-size: 14.5px; font-weight: 600; background: var(--danger-soft); color: var(--bad); }
.msg[data-kind="info"] { background: var(--accent-soft); color: var(--accent-text); }
.signup { display: flex; align-items: center; justify-content: center; min-height: 52px; margin-top: 10px; border: 1.5px solid var(--accent); border-radius: var(--r-sm); background: var(--card); color: var(--accent-text); font-weight: 800; text-decoration: none; }
.login-card .notes { margin-top: 16px; font-size: 14px; color: var(--mute); }
.login-card .notes summary { font-weight: 700; color: var(--ink2); min-height: 40px; display: flex; align-items: center; cursor: pointer; }
.login-card h1.login-title em { display: inline; font-size: inherit; font-weight: inherit; line-height: inherit; letter-spacing: inherit; }
.login-feats { flex-wrap: nowrap; gap: 6px; } .login-feats li { padding: 7px 10px; font-size: 13.5px; white-space: nowrap; gap: 5px; }
.login-card .notes { border-top: 1px solid var(--hair); padding-top: 6px; }
body { word-break: keep-all; overflow-wrap: anywhere; } /* 한국어는 낱말 단위로 줄바꿈(글자 하나만 다음 줄로 넘어가지 않게) */
/* 로그인 v0.4.3 — 설명·칩을 빼고 헤드라인 → 입력으로 바로, 수채화 그림, 큰 글자·넉넉한 간격 */
.login-card { padding: 0 24px 28px; }
.login-hero { width: calc(100% + 48px); height: 190px; margin: 0 -24px 22px; object-fit: cover; object-position: center 60%; border-radius: 24px 24px 0 0; }
.login-card h1.login-title { font-size: 42px; margin: 0 0 26px; }
#loginForm .field { margin-bottom: 18px; }
#loginForm .field > span { font-size: 16px; margin-bottom: 8px; }
#loginForm input { min-height: 54px; font-size: 17px; }
.login-hero { object-position: 25% 60%; -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent); mask-image: linear-gradient(to bottom, #000 72%, transparent); }
/* v0.4.6 로그인 배너: 처음의 단순한 평면 그림(언덕·산책길·나무·해·펼친 책)으로 되돌림 — 흐림 처리 없이 또렷하게 */
.login-hero { height: 170px; object-position: center; -webkit-mask-image: none; mask-image: none; }
/* 지도·길찾기 링크를 버튼으로 v0.4.7 — '목적지 상세'와 같은 모양(흰 바탕·테두리·12px 모서리) */
.links { gap: 8px; align-items: center; }
.links a, .dest-links a.link-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; margin: 0; border: 1px solid var(--hair); border-radius: var(--r-sm); background: var(--card); color: var(--accent-text); font-size: 14px; font-weight: 700; text-decoration: none; box-shadow: 0 1px 0 rgba(15,23,42,.06); }
.links a:active, .dest-links a.link-btn:active { background: var(--accent-soft); }
.links .ghost { min-height: 44px; }
.dest-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.links > * { margin: 0 !important; } .links .ghost { font-size: 14px; padding: 0 14px; }
/* 코스 버튼 v0.4.8: 3칸 격자로 모든 버튼 같은 너비·같은 간격 */
.course .links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.course .links > * { width: 100%; min-width: 0; padding: 0 6px !important; white-space: nowrap; justify-content: center; }
/* 말풍선 통일 v0.4.10 — 버튼 아래 말풍선과 화면 아래 토스트를 같은 디자인(흰 바탕·12px 모서리·그림자·색 아이콘)으로 */
.bubble { position: relative; display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--card); color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.5; box-shadow: 0 6px 18px rgba(15,23,42,.16); max-width: 100%; }
.bubble::before { content: ""; position: absolute; top: -7px; left: 26px; width: 14px; height: 14px; background: var(--card); transform: rotate(45deg); border-radius: 2px; }
.bubble-ico { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--warn); color: var(--on-accent); font-size: 13px; font-weight: 900; margin-top: 1px; }
.bubble.info .bubble-ico { background: var(--accent); }
.bubble.error .bubble-ico { background: var(--bad); }
.toast { border-radius: var(--r-sm); padding: 12px 16px; background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 8px 24px rgba(15,23,42,.22); border-left: 5px solid var(--accent); max-width: min(92%, 420px); }
.brand { text-decoration: none; color: inherit; border-radius: var(--r-sm); -webkit-tap-highlight-color: transparent; } .brand:active { opacity: .7; } .brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
/* 비밀번호 보기 v0.4.15 — [입력][ⓧ 지우기][👁 보기]: 보기는 맨 오른쪽 고정, 지우기는 글자가 있을 때만 그 왼쪽 */
.clearable.has-eye input { padding-right: 88px; }
.clearable.has-eye .clear-btn { right: 46px; }
.eye-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--mute); cursor: pointer; min-height: 0; padding: 0; }
.eye-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eye-btn .eye-off, .eye-btn[aria-pressed="true"] .eye-on { display: none; }
.eye-btn[aria-pressed="true"] .eye-off { display: block; }
.eye-btn[aria-pressed="true"] { color: var(--accent); }
@media (hover: hover) { .eye-btn:hover { color: var(--accent); background: var(--accent-soft); } } /* 터치 화면은 누른 뒤 배경이 남지 않게 */
.eye-btn:focus-visible { color: var(--accent); background: var(--accent-soft); }
.eye-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* v0.4.20 남은 AI 사용량 표시·소진 잠금·입력창 지우기 (go-fishing v1.20.0) */
.token-left { margin: 8px 2px 0; font-size: 13px; font-weight: 600; color: var(--mute); text-align: center; }
.token-left.warn, .token-tag.warn { color: var(--warn); }
.token-tag { display: block; text-align: right; font-size: 11.5px; line-height: 1.3; color: var(--mute); margin: 0 0 6px; white-space: nowrap; }
.plan-form.token-empty textarea { opacity: .6; cursor: not-allowed; }
.plan-form.token-empty #btnPlan { opacity: .45; cursor: not-allowed; }
.clearable.area textarea { width: 100%; box-sizing: border-box; padding-right: 44px; }
.clearable.area .clear-btn { top: 8px; transform: none; }
#searchForm .clearable { min-width: 0; }

/* v0.4.21 추천 버튼을 누를 수 있는 버튼으로: 채운 배경·아이콘·화살표·눌림 효과, 새 추천 강조, 처음 사용자 안내 (go-fishing v1.21.0) */
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions .actions-hint, .tap-hint { flex: 0 0 100%; font-size: 12.5px; font-weight: 700; color: var(--accent-text); padding: 0 2px 2px; }
button.act { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px 8px 10px; border-radius: 14px; border: 1.5px solid var(--accent); background: var(--accent-soft); color: var(--accent-text); font-size: 14.5px; font-weight: 700; line-height: 1.3; text-align: left; box-shadow: 0 2px 6px rgba(16,185,129,.15); transition: transform .12s, box-shadow .12s, background .12s; -webkit-tap-highlight-color: transparent; cursor: pointer; }
button.act.small { min-height: 40px; padding: 6px 10px 6px 8px; font-size: 13.5px; }
button.act .act-ico { font-size: 14px; line-height: 1; }
button.act .act-go { font-size: 20px; line-height: 1; margin-left: 2px; color: var(--accent); font-weight: 700; }
@media (hover: hover) { button.act:hover { background: var(--accent-soft); box-shadow: 0 4px 12px rgba(16,185,129,.22); } }
button.act:active { transform: scale(.96); box-shadow: 0 1px 3px rgba(16,185,129,.2); }
button.act:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.actions.fresh button.act { animation: actGlow 1.6s ease-in-out 2; }
.actions.used button.act:not(.picked) { opacity: .55; box-shadow: none; }
button.act.picked { background: var(--accent); border-color: transparent; color: var(--on-accent); }
button.act.picked .act-go { color: var(--on-accent); }
button.act:disabled, button.act.locked { opacity: .45; box-shadow: none; cursor: not-allowed; }
@keyframes actGlow { 0%, 100% { box-shadow: 0 2px 6px rgba(16,185,129,.15); } 50% { box-shadow: 0 0 0 4px rgba(242,193,78,.45), 0 2px 10px rgba(16,185,129,.3); } }
@media (prefers-reduced-motion: reduce) { .actions.fresh button.act { animation: none; } button.act { transition: none; } }
.today-tip-actions .act { flex: 1 1 auto; }

/* v0.4.22 누를 수 있는 카드·행·링크 공통 표시(오늘 결과·책·기록·빈 화면) (go-fishing v1.22.0) */
.sec .tap-hint { margin: -2px 2px 8px; font-weight: 600; font-size: 12px; }
.places a.ext { color: var(--accent-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.places a.ext::after { content: ' ↗'; font-size: 11px; display: inline-block; margin-left: 2px; text-decoration: none; }
.places .act.dest-open { margin-top: 6px; }
.places a.link-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--accent); border-radius: var(--r-sm); background: var(--card); color: var(--accent-text); font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none; align-self: center; }
.places a.link-btn:active, .links a:active { transform: scale(.97); }
.links a b, .yes24 b, .link-btn b { font-size: 12px; margin-left: 3px; color: var(--accent); }
.links a span[aria-hidden], .link-btn span[aria-hidden] { margin-right: 4px; }
button.act.act-primary { background: var(--accent); border-color: transparent; color: var(--on-accent); box-shadow: 0 4px 12px rgba(16,185,129,.25); }
button.act.act-primary .act-go { color: var(--on-accent); }
.empty-go { justify-content: center; margin: 4px 0 12px; }
@media (prefers-reduced-motion: reduce) { .places a.link-btn:active, .links a:active { transform: none; } }

/* ===== 꼬리길 v0.1.0: 강아지 산책 화면(북 워킹 디자인 토큰 그대로, 판단 카드·시간대 막대·응급 강조만 추가) ===== */
.dog-chips .chips { margin: 0; }
.dog-empty { margin: 0 0 8px; color: var(--ink2); font-size: 14px; }
.dog-hero { border-radius: var(--r); padding: 16px; margin: 4px 0 14px; color: var(--on-accent); background: var(--accent); box-shadow: var(--shadow); }
.dog-hero.caution { background: var(--caution); }
.dog-hero.indoor { background: var(--danger); }
.dog-hero h2 { margin: 8px 0 6px; font-size: 21px; line-height: 1.35; color: var(--on-accent); }
.dog-hero .dh-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.dog-hero .dh-sub { margin: 0; font-size: 13px; opacity: .9; }
.dog-hero .tag { background: rgba(255,255,255,.2); color: var(--on-accent); border: 1px solid rgba(255,255,255,.5); }
.metric-num.go { color: var(--accent); } .metric-num.caution { color: var(--caution); } .metric-num.indoor { color: var(--danger); }
.hour-bars { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 12px; margin: 0 0 14px; }
.hour-bars h3 { margin: 0 0 10px; font-size: 16px; }
.hour-bars h3 small { font-weight: 500; color: var(--mute); margin-left: 6px; }
.hb-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(34px, 1fr); gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.hb { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; }
.hb i { display: block; width: 100%; height: 34px; border-radius: 8px; background: var(--accent); }
.hb.lv-warn i { background: var(--caution); } .hb.lv-bad i { background: var(--danger); }
.hb-t { color: var(--mute); } .hb b { font-weight: 700; } .hb em { font-style: normal; font-size: 11px; color: var(--danger); min-height: 14px; }
.lg { display: inline-block; padding: 0 8px; border-radius: 10px; color: var(--on-accent); font-size: 12px; }
.lg.ok { background: var(--accent); } .lg.warn { background: var(--caution); } .lg.bad { background: var(--danger); }
.walk-hint { margin: 6px 0; font-weight: 600; color: var(--accent); }
.sec.emergency { border: 2px solid var(--danger-line); background: var(--danger-soft); border-radius: var(--r); padding: 14px; }
.sec.emergency h4 { margin: 10px 0 4px; font-size: 14px; color: var(--danger); }
.place-note { margin: 8px 0 14px; }
.check, .check-row { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.check input, .check-row input { width: 22px; height: 22px; }
.count { font-style: normal; font-size: 14px; color: var(--mute); margin-left: 6px; }
#dogList li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#dogList .row { display: flex; gap: 6px; }
#diaryList li button { margin-top: 6px; }
.hb-row { grid-auto-flow: row; grid-template-columns: repeat(var(--n, 16), minmax(0, 1fr)); grid-auto-columns: auto; gap: 2px; overflow: visible; }
.hb { font-size: 10px; } .hb i { height: 30px; border-radius: 5px; } .hb em { font-size: 9px; }
.metric-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.air-line { margin: 0 0 12px; padding: 0 4px; font-size: 14px; color: var(--ink2); }
.share-card { margin: 0 0 14px; } .share-card summary { cursor: pointer; font-size: 14px; color: var(--mute); padding: 6px 2px; }
#diaryStats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#diaryStats .metric-label { font-size: 11px; }
.check input[type="checkbox"], .check-row input[type="checkbox"] { -webkit-appearance: auto; appearance: auto; width: 22px !important; height: 22px !important; min-height: 0 !important; padding: 0; margin: 0; accent-color: var(--accent); flex: none; }
.places .links .link-btn { padding: 6px 10px; font-size: 13px; min-height: 38px; }
#dogForm > .primary.block { position: static !important; bottom: auto !important; box-shadow: none !important; margin-top: 14px; }
#diaryForm > .primary.block { position: static !important; box-shadow: none !important; }

.pet-cond { margin: 6px 0 0; font-size: 13px; color: var(--accent); line-height: 1.5; }

.dog-welcome { background: var(--accent-soft); border-radius: var(--r); padding: 14px 16px; margin: 0 0 14px; color: var(--accent); }
.dog-welcome p { margin: 6px 0 0; font-size: 14px; color: var(--ink2); }
#dogList .dog-acts { flex-wrap: wrap; justify-content: flex-end; }
.ghost.danger { color: var(--danger); border-color: var(--danger-line); }
.dog-form-acts { display: flex; gap: 10px; margin-top: 14px; }
.dog-form-acts .primary { flex: 1; }
#dogForm > .primary.block, #dogForm .dog-form-acts .primary { position: static !important; box-shadow: none !important; }
.check-row { flex-wrap: wrap; } .check-row small { flex-basis: 100%; padding-left: 30px; margin-top: -2px; }

/* ===== 우리 아이 UI v0.1.4: 아이 고르기 카드 · 아이 카드 목록 · 등록/수정 시트 ===== */
.dog-pick { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 -2px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.dog-pick-card { flex: 0 0 116px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 8px 10px; min-height: 112px; background: var(--card); border: 1.5px solid var(--hair); border-radius: 16px; font: inherit; color: var(--ink); cursor: pointer; text-align: center; }
.dog-pick-card b { font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dog-pick-card small { font-size: 11.5px; color: var(--mute); line-height: 1.3; }
.dog-pick-card[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px rgba(16,185,129,.18); }
.dog-pick-card[aria-checked="true"] b { color: var(--accent); }
.dog-pick-card.add { border-style: dashed; background: transparent; color: var(--accent); }
.dog-ava { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 24px; line-height: 1; flex: none; }
.dog-ava.lg { width: 58px; height: 58px; font-size: 32px; }
.dog-care { margin: 4px 0 6px; font-size: 14px; color: var(--ink2); line-height: 1.5; }
.dog-empty-card { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--paper); border-radius: 14px; margin-bottom: 10px; }
.dog-empty-card p { margin: 3px 0 0; font-size: 13.5px; color: var(--ink2); }
.primary.soft { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.dog-cards { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; }
.dog-card { background: var(--card); border: 2px solid transparent; border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.dog-card.is-default { border-color: var(--accent-line); }
.dog-card-top { display: flex; align-items: center; gap: 14px; }
.dog-card-name h3 { margin: 0; font-size: 19px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dog-card-name p { margin: 3px 0 0; font-size: 14px; color: var(--mute); }
.dog-card .dog-care { margin: 12px 0 8px; font-weight: 700; color: var(--accent); }
.dog-traits { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dog-traits li { display: flex; gap: 9px; padding: 9px 10px; background: var(--paper); border-radius: 10px; font-size: 13.5px; line-height: 1.5; color: var(--ink2); }
.dog-card-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.dog-card-acts .ghost { min-height: 44px; padding: 0 14px; font-size: 14px; flex: 1 1 auto; }
.ghost.danger { color: var(--danger); border-color: var(--danger-line); }
.dog-welcome { text-align: center; background: linear-gradient(180deg, var(--accent-soft), var(--paper)); border-radius: 20px; padding: 24px 18px 20px; margin: 14px 0; }
.dog-welcome-ava { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--card); font-size: 38px; box-shadow: var(--shadow); }
.dog-welcome h3 { margin: 12px 0 8px; font-size: 20px; }
.dog-welcome ul { list-style: none; padding: 0; margin: 0 0 16px; font-size: 14px; color: var(--ink2); line-height: 1.8; text-align: left; display: inline-block; }
.dog-welcome li::before { content: '✓ '; color: var(--accent); font-weight: 700; }
.dog-privacy { margin-top: 18px; }
/* 등록·수정 시트: 폰에서는 아래에서 올라오고, 넓은 화면에서는 가운데 카드 */
dialog.sheet { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-width: 520px; width: 100%; max-height: 92vh; overflow-y: auto; margin: auto auto 0; border-radius: 22px 22px 0 0; animation: sheet-up .22s ease-out; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) { dialog.sheet { margin: auto; border-radius: 22px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sheet-head h3 { margin: 0; font-size: 19px; }
.dog-live { display: flex; gap: 12px; align-items: center; background: var(--accent-soft); border-radius: 14px; padding: 12px; margin: 0 0 14px; }
.dog-live[hidden] { display: none; }
.dog-live b { font-size: 14.5px; } .dog-live p { margin: 3px 0 0; font-size: 13px; color: var(--ink2); line-height: 1.45; }
.pick-hint { margin: 8px 2px 0; font-size: 12.5px; color: var(--mute); line-height: 1.45; }
.check-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px; margin: 0 0 8px; border: 1.5px solid var(--hair); border-radius: 14px; cursor: pointer; background: var(--card); }
.check-card input { -webkit-appearance: auto; appearance: auto; width: 24px !important; height: 24px !important; min-height: 0 !important; margin: 1px 0 0; padding: 0; flex: none; accent-color: var(--accent); }
.check-card b { display: block; font-size: 14.5px; } .check-card small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--mute); line-height: 1.45; }
.check-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.primary.danger-btn { background: var(--danger); }

/* 숫자 칸의 위아래 화살표가 ⓧ 와 겹치지 않게 */
.clearable input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.clearable input[type="number"]::-webkit-outer-spin-button, .clearable input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.row > .clearable.grow { flex: 1 1 auto; min-width: 0; }
label > .clearable { margin-top: 6px; }

/* 강아지 캐릭터 */
.dog-ava{position:relative;overflow:visible}
.dog-ava img{width:100%;height:100%;border-radius:inherit;display:block;object-fit:cover}
.dog-ava .ava-badge{position:absolute;right:-4px;bottom:-4px;font-style:normal;font-size:10px;font-weight:800;line-height:1;padding:3px 6px;border-radius:999px;background:var(--accent);color: var(--on-accent);border:2px solid var(--card)}
.ava-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:6px}
.ava-opt{display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px 2px;border:2px solid transparent;border-radius:14px;background:transparent;cursor:pointer;color:inherit;font:inherit}
.ava-opt .ava-img{display:grid;place-items:center;width:100%;aspect-ratio:1;max-width:64px;border-radius:50%;overflow:hidden}
.ava-opt .ava-img img{width:92%;height:92%}
.ava-opt small{font-size:12px;opacity:.75}
.ava-opt.on{border-color:var(--accent);background:rgba(16,185,129,.08)}
.ava-opt.on small{opacity:1;font-weight:800}
.ava-opt:focus-visible{outline:3px solid #7FB8A0;outline-offset:2px}
.dog-traits li{justify-content:flex-start;text-align:left}
.dog-traits li>span:last-child{flex:1;text-align:left}
.dog-ava .ava-badge{right:-8px;bottom:-5px;font-size:9.5px;padding:2px 5px}
/* 보호소: 좁은 기기에서도 여섯 메뉴가 한 줄에 들어간다. */
.tabbar {grid-template-columns:repeat(6,minmax(0,1fr))}.tabbar button{min-width:0;padding-inline:0;white-space:nowrap}.tabbar button.active span{padding-inline:9px}
#shelterRoot{color:var(--ink);overflow-wrap:anywhere}#shelterRoot :where(input,select,button,summary){min-height:44px}#shelterRoot button{border:1px solid var(--hair);border-radius:9px;background: var(--card);color:var(--accent-text);padding:7px 12px;font-weight:650}#shelterRoot button:disabled{opacity:.52}#shelterRoot summary{cursor:pointer;padding-block:9px;font-weight:700}#shelterRoot a{font-weight:650}.shelter-head p,.shelter-source,.shelter-status{color:var(--mute);font-size:.9rem}.shelter-region,.shelter-filters{padding:12px;border:1px solid var(--hair);border-radius:12px;margin-block:12px}.shelter-field{display:block;min-width:0;font-size:.88rem}.shelter-field select,.shelter-field input{display:block;margin-block:3px 7px;border-radius:8px}.shelter-list{display:grid;gap:12px;padding:0;list-style:none}.shelter-card,.shelter-guide{border:1px solid var(--hair);border-radius:12px;background: var(--card);padding:12px}.shelter-photo{width:100%;max-height:225px;object-fit:contain;background:var(--soft);border-radius:8px}.shelter-placeholder{background:var(--soft);color:var(--mute);padding:16px;text-align:center}.shelter-badge{display:inline-block;border-radius:30px;background:var(--accent-soft);color:var(--accent-text);padding:3px 9px;font-size:.8rem}.shelter-pager{display:flex;justify-content:center;align-items:center;gap:10px;margin:16px 0}.shelter-facts{margin:8px 0}.shelter-facts dt{color:var(--mute);font-size:.82rem}.shelter-facts dd{margin:0 0 6px}.shelter-guide{margin:14px 0}.shelter-source{margin-top:18px}
/* 우리 아이 카드: [둥근 사각 캐릭터] [이름·속성] [기본·수정·삭제 세로] */
.dog-card-main{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px}
.dog-ava.sq{border-radius:18px}
.dog-ava.lg.sq{width:76px;height:76px}
.dog-card-name{min-width:0}
.dog-card-name h3{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dog-card-name p{line-height:1.4;overflow-wrap:anywhere}
.dog-card-main .dog-card-acts{display:flex;flex-direction:column;flex-wrap:nowrap;gap:6px;width:112px}
.dog-card-main .dog-card-acts .ghost{flex:none;width:100%;min-height:38px;padding:0 10px;font-size:13.5px;white-space:nowrap}
.dog-card-acts .is-default-btn:disabled{opacity:1;cursor:default;background:var(--accent-soft);color:var(--accent);border-color:var(--accent-line);font-weight:800}
.dog-card .dog-care{margin:12px 0 8px}
@media (max-width:420px){.dog-card{padding:14px 12px}.dog-card-main{gap:10px}.dog-ava.lg.sq{width:60px;height:60px;border-radius:14px}.dog-card-main .dog-card-acts{width:96px}.dog-card-main .dog-card-acts .ghost{font-size:12.5px;padding:0 6px}.dog-card-name h3{font-size:17px}.dog-card-name p{font-size:13px}}
/* 이름 중복 실시간 안내 */
.name-check{display:block;margin:6px 2px 0;font-size:13px;font-weight:600;line-height:1.4}
.name-check:empty{display:none}
.name-check[data-kind="bad"]{color:var(--bad)}
.name-check[data-kind="ok"]{color:var(--accent)}
#dogName[aria-invalid="true"]{border-color:var(--bad)}
/* 보호소 검색: 2열×3행(보호 상태·성별 / 정렬·보호센터 / 검색어·검색), 아주 좁으면 1열 */
#shelterRoot .shelter-filters:not([hidden]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 12px;align-items:end}
#shelterRoot .shelter-filters .shelter-field select,#shelterRoot .shelter-filters .shelter-field input{width:100%;box-sizing:border-box}
#shelterRoot .shelter-filters .shelter-submit{width:100%;margin-bottom:7px;background:var(--accent);color: var(--on-accent);border-color:transparent}
@media (max-width:340px){#shelterRoot .shelter-filters:not([hidden]){grid-template-columns:1fr}}
/* 보호소 공고: 목록형(왼쪽 둥근 정사각 사진 + 오른쪽 정보), 우리 아이 카드와 같은 결 */
#shelterRoot .shelter-list{gap:10px}
#shelterRoot .shelter-card{display:grid;grid-template-columns:112px minmax(0,1fr);gap:14px;align-items:start;padding:14px;border-radius:var(--r);border:0;box-shadow:var(--shadow)}
#shelterRoot .shelter-thumb{width:112px;aspect-ratio:1;border-radius:18px;overflow:hidden;background:var(--soft)}
#shelterRoot .shelter-thumb .shelter-photo{width:100%;height:100%;max-height:none;object-fit:cover;border-radius:0;display:block}
#shelterRoot .shelter-thumb .shelter-placeholder{height:100%;display:grid;place-items:center;padding:8px;font-size:12px;box-sizing:border-box}
#shelterRoot .shelter-card-body{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0}
#shelterRoot .shelter-card-body h3{margin:4px 0 0;font-size:17px}
#shelterRoot .shelter-card-body>p{margin:0;font-size:14px;line-height:1.45;color:var(--ink2)}
#shelterRoot .shelter-card-body>small{color:var(--mute);font-size:12.5px}
#shelterRoot .shelter-card-body .shelter-details{width:100%;margin-top:2px}
#shelterRoot .shelter-card-body .shelter-details summary{min-height:36px;padding-block:6px;font-size:14px}
#shelterRoot .shelter-details .shelter-photo{width:100%;max-height:225px;object-fit:contain;margin-top:8px}
@media (max-width:420px){#shelterRoot .shelter-card{grid-template-columns:84px minmax(0,1fr);gap:12px;padding:12px}#shelterRoot .shelter-thumb{width:84px;border-radius:14px}#shelterRoot .shelter-card-body h3{font-size:16px}#shelterRoot .shelter-card-body>p{font-size:13.5px}}
/* 꼬리일기: 아이·날짜·시간 한 줄, 시간은 "시간 | 분" 고르기 */
.diary-form .row.diary-trio{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.diary-form .row.diary-trio .field{min-width:0;margin:0}
.diary-form .row.diary-trio input,.diary-form .row.diary-trio select{width:100%;box-sizing:border-box;min-width:0}
.time-pick{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.diary-form .time-pick select{height:48px;min-height:48px;-webkit-appearance:none;appearance:none;background: var(--card);padding:0 10px;border:1.5px solid var(--hair);border-radius:var(--r-sm);font:inherit;color:inherit;text-align:center}
@media (max-width:560px){.diary-form .row.diary-trio{grid-template-columns:1fr 1fr}.diary-form .row.diary-trio>.field:last-child{grid-column:1 / -1}}

/* =====================================================================================
   꼬리길 디자인 시스템 v1.0 (design/UI_UX_DESIGN_SPEC.md · design-tokens.json)
   Warm Cream #FAF8F5 · Emerald #10B981 · Warm Coral #FF7A59 · Sunny Yellow #FBBF24 · 카드 20px · 본문 15px 이상
   흰 글자를 얹는 채움색은 대비(WCAG AA)를 위해 Emerald 600(#059669)을 쓰고, #10B981 은 신호등·링·포인트에 쓴다.
   다크모드: 기기 설정(자동) 또는 설정 창의 '화면 모드'(data-theme) — 배경 #0F172A
   ===================================================================================== */
:root {
  color-scheme: light;
  --brand: #10B981; --accent: #059669; --accent-hover: #047857; --accent-text: #047857; --accent-soft: #ECFDF5; --accent-line: #A7F3D0; --on-accent: #FFFFFF;
  --coral: #FF7A59; --coral-soft: #FFF1ED; --coral-text: #C2410C; --sun: #FBBF24; --sky: #0284C7; --sky-soft: #E0F2FE;
  --paper: #FAF8F5; --card: #FFFFFF; --hair: #EDE9E2; --soft: #F3F0EA; --ink: #1E293B; --ink2: #475569; --mute: #64748B;
  --safe: #10B981; --safe-soft: #ECFDF5; --safe-text: #065F46;
  --caution: #F59E0B; --caution-soft: #FFFBEB; --caution-text: #92400E;
  --danger: #EF4444; --danger-soft: #FEF2F2; --danger-text: #991B1B; --danger-line: #FECACA;
  --warn: #B45309; --bad: #B91C1C; --info: #0284C7; --teal: #059669; --teal-text: #047857;
  --top-bg: rgba(250,248,245,.94); --ava-bg: #FFF7EC; --backdrop: rgba(15,23,42,.45);
  --sans: Pretendard, 'Pretendard Variable', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif; --mono: var(--sans);
  --r: 20px; --r-sm: 16px; --r-pill: 9999px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 18px rgba(15,23,42,.06);
  --tabbar: 68px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #34D399; --accent: #34D399; --accent-hover: #10B981; --accent-text: #6EE7B7; --accent-soft: #064E3B; --accent-line: #065F46; --on-accent: #052E1F;
  --coral: #FB923C; --coral-soft: #431407; --coral-text: #FDBA74; --sun: #FBBF24; --sky: #38BDF8; --sky-soft: #0C2A3F;
  --paper: #0F172A; --card: #1E293B; --hair: #334155; --soft: #273449; --ink: #F8FAFC; --ink2: #CBD5E1; --mute: #94A3B8;
  --safe: #34D399; --safe-soft: #064E3B; --safe-text: #A7F3D0;
  --caution: #FBBF24; --caution-soft: #422006; --caution-text: #FCD34D;
  --danger: #F87171; --danger-soft: #450A0A; --danger-text: #FCA5A5; --danger-line: #7F1D1D;
  --warn: #FBBF24; --bad: #F87171; --info: #38BDF8; --teal: #34D399; --teal-text: #6EE7B7;
  --top-bg: rgba(15,23,42,.92); --ava-bg: #273449; --backdrop: rgba(0,0,0,.6);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand: #34D399; --accent: #34D399; --accent-hover: #10B981; --accent-text: #6EE7B7; --accent-soft: #064E3B; --accent-line: #065F46; --on-accent: #052E1F;
    --coral: #FB923C; --coral-soft: #431407; --coral-text: #FDBA74; --sun: #FBBF24; --sky: #38BDF8; --sky-soft: #0C2A3F;
    --paper: #0F172A; --card: #1E293B; --hair: #334155; --soft: #273449; --ink: #F8FAFC; --ink2: #CBD5E1; --mute: #94A3B8;
    --safe: #34D399; --safe-soft: #064E3B; --safe-text: #A7F3D0;
    --caution: #FBBF24; --caution-soft: #422006; --caution-text: #FCD34D;
    --danger: #F87171; --danger-soft: #450A0A; --danger-text: #FCA5A5; --danger-line: #7F1D1D;
    --warn: #FBBF24; --bad: #F87171; --info: #38BDF8; --teal: #34D399; --teal-text: #6EE7B7;
    --top-bg: rgba(15,23,42,.92); --ava-bg: #273449; --backdrop: rgba(0,0,0,.6);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
  }
}
html, body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; }
body { -webkit-tap-highlight-color: rgba(16,185,129,.14); }
.metric-num, .timer, .hb, .hour b, #diaryStats .metric-num { font-variant-numeric: tabular-nums; }
h2 { font-size: 24px; font-weight: 700; line-height: 1.3; } h3 { font-size: 18px; font-weight: 700; line-height: 1.35; }
p, li, .muted, .dog-care, .air-line, .deck { font-size: max(15px, 1em); }
.muted, .hint, .small-text, small { color: var(--mute); }
.small-text, .metric-label, .pick-hint, .hb-t { font-size: 13px; }
a { color: var(--accent-text); }
input, select, textarea { background-color: var(--card); color: var(--ink); border: 1.5px solid var(--hair); border-radius: var(--r-sm); min-height: 48px; font-size: 16px; }
input::placeholder, textarea::placeholder { color: var(--mute); opacity: .85; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
:focus-visible { outline-color: var(--brand); }
.primary, #requestForm button[type=submit] { background: var(--accent); color: var(--on-accent); border-radius: var(--r-sm); min-height: 52px; font-weight: 800; box-shadow: 0 6px 16px rgba(16,185,129,.22); }
.primary:hover { background: var(--accent-hover); } .primary:active { transform: translateY(1px); }
.primary.soft { background: var(--accent-soft); color: var(--accent-text); box-shadow: none; }
.ghost { background: var(--card); color: var(--accent-text); border: 1.5px solid var(--hair); border-radius: var(--r-sm); min-height: 44px; }
.ghost:hover { border-color: var(--accent-line); } .ghost:active { background: var(--accent-soft); }
.ghost.danger, .danger.ghost { color: var(--danger-text); border-color: var(--danger-line); }
.primary.danger-btn { background: var(--danger); color: #fff; }
dialog { background: var(--card); color: var(--ink); border-radius: var(--r); }
dialog::backdrop { background: var(--backdrop); }
.msg { background: var(--danger-soft); color: var(--danger-text); }
.msg[data-kind="info"] { background: var(--accent-soft); color: var(--accent-text); }

/* 머리줄·하단 탭: 탭은 높이 68px, 아이콘 알약 + 13px 글자, 누르는 칸 전체가 터치 영역 */
.top { background: var(--top-bg); border-bottom: 1px solid var(--hair); }
.brand b { color: var(--ink); }
.icon-btn { background: var(--card); color: var(--ink2); border: 1.5px solid var(--hair); border-radius: 14px; min-width: 44px; min-height: 44px; }
.timer { background: var(--accent-soft); color: var(--accent-text); }
.timer.warn { background: var(--caution-soft); color: var(--caution-text); } .timer.crit { background: var(--danger-soft); color: var(--danger-text); }
.tabbar { background: var(--card); border-top: 1px solid var(--hair); box-shadow: 0 -6px 20px rgba(15,23,42,.06); }
.tabbar button { min-height: 56px; font-size: 13px; color: var(--mute); gap: 4px; padding-top: 6px; }
.tabbar button span { height: 30px; min-width: 48px; justify-content: center; border-radius: var(--r-pill); transition: background .15s; }
.tabbar button.active { color: var(--accent-text); font-weight: 800; }
.tabbar button.active span { background: var(--accent-soft); color: var(--brand); padding: 0 16px; }
.tabbar button:active span { background: var(--accent-soft); }
@media (max-width: 380px) { .tabbar button { font-size: 12px; } .tabbar button span { min-width: 40px; } .tabbar button.active span { padding: 0 12px; } }
.toast { background: var(--card); color: var(--ink); border-left-color: var(--brand); border-radius: var(--r-sm); }

/* 칩·카드: 20px 둥근 카드, 1px 테두리 #EDE9E2 */
.chip { background: var(--card); color: var(--ink2); border: 1.5px solid var(--hair); border-radius: var(--r-pill); min-height: 44px; font-size: 15px; }
.chip[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.plan-form .chip, .plan-form .origin-tile { background: var(--soft); }
.plan-form .chip[aria-checked="true"] { background: var(--accent); color: var(--on-accent); }
.plan-form, .diary-form, .opinion-form, .sec, .metric-strip, .reasons, .hour-bars, .loading, .empty, .diary-list li, .history .hist-day, .book-grid .book, .login-card, .dog-card, .today-tip, .wx-card, #shelterRoot .shelter-card, #shelterRoot .shelter-guide {
  background: var(--card); border: 1px solid var(--hair); border-radius: var(--r); box-shadow: var(--shadow); }
.plan-form, .diary-form, .opinion-form, .dog-card { padding: 20px; }
.dog-card.is-default { border: 2px solid var(--brand); }
.card-lines { background: var(--accent-soft); color: var(--accent-text); border-radius: var(--r); }
.tag { border-radius: var(--r-pill); font-weight: 700; }
.tag.go { background: var(--safe-soft); color: var(--safe-text); } .tag.caution { background: var(--caution-soft); color: var(--caution-text); } .tag.indoor { background: var(--danger-soft); color: var(--danger-text); }
.metric-num { color: var(--ink); }
.metric-num.go { color: var(--safe); } .metric-num.caution { color: var(--caution); } .metric-num.indoor { color: var(--danger); }
.hour { background: var(--sky-soft); color: var(--ink2); } .hour .pop { color: var(--sky); }
.hb i { background: var(--safe); } .hb.lv-warn i { background: var(--caution); } .hb.lv-bad i { background: var(--danger); } .hb em { color: var(--danger-text); }
.lg.ok { background: var(--safe); color: #052E1F; } .lg.warn { background: var(--caution); color: #3B2300; } .lg.bad { background: var(--danger); color: #fff; }
.walk-hint, .pet-cond { color: var(--accent-text); }
.sec.emergency { background: var(--danger-soft); border: 2px solid var(--danger-line); }
.sec.emergency h3, .sec.emergency h4 { color: var(--danger-text); }
.audio { background: linear-gradient(135deg, var(--accent), var(--accent-hover)); color: var(--on-accent); }
.bubble, .bubble::before { background: var(--card); color: var(--ink); }
.ai-lock { background: var(--danger-soft); border-color: var(--danger-line); }
.auto-note { background: var(--caution-soft); color: var(--caution-text); }
.dog-welcome { background: linear-gradient(180deg, var(--accent-soft), var(--paper)); color: var(--ink); border-radius: var(--r); }
.dog-welcome li::before { color: var(--brand); }
.dog-welcome-ava { background: var(--card); }
.check-card { background: var(--card); border-color: var(--hair); border-radius: var(--r-sm); }
.check-card:has(input:checked) { border-color: var(--brand); background: var(--accent-soft); }
.check-card input, .check input[type="checkbox"], .check-row input[type="checkbox"] { accent-color: var(--accent); }
.dog-live { background: var(--accent-soft); border-radius: var(--r); }
.dog-empty-card { background: var(--soft); border-radius: var(--r); }
.star { color: var(--hair); } .star.on { color: var(--sun); }

/* 산책 신호등 카드: 초록·노랑·빨강 고대비 + 큰 제목 + 켜진 불 */
.dog-hero { position: relative; border-radius: var(--r); padding: 20px; margin: 4px 0 12px; border: 0; box-shadow: var(--shadow); background: var(--safe-soft); color: var(--safe-text); border-left: 8px solid var(--safe); }
.dog-hero.caution { background: var(--caution-soft); color: var(--caution-text); border-left-color: var(--caution); }
.dog-hero.indoor { background: var(--danger-soft); color: var(--danger-text); border-left-color: var(--danger); }
.dog-hero h2 { color: inherit; font-size: 26px; line-height: 1.25; margin: 10px 0 6px; font-weight: 800; letter-spacing: -.02em; }
.dog-hero .dh-sub, .dog-hero .dh-dog { margin: 4px 0 0; font-size: 14px; color: inherit; opacity: .9; }
.dog-hero .dh-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dog-hero .tag { background: var(--card); color: inherit; border: 0; font-size: 14px; padding: 4px 12px; box-shadow: 0 1px 2px rgba(15,23,42,.08); }
.sig-light { display: inline-flex; gap: 6px; padding: 6px 8px; border-radius: var(--r-pill); background: #1E293B; }
.sig-light i { width: 14px; height: 14px; border-radius: 50%; background: #475569; opacity: .55; }
.dog-hero.go .sig-light .g { background: #10B981; opacity: 1; box-shadow: 0 0 10px #10B981; }
.dog-hero.caution .sig-light .y { background: #FBBF24; opacity: 1; box-shadow: 0 0 10px #FBBF24; }
.dog-hero.indoor .sig-light .r { background: #EF4444; opacity: 1; box-shadow: 0 0 10px #EF4444; }

/* 말풍선 에이전트: 캐리커처 + 1인칭 말풍선(꼬리 포함) */
.agent-say { display: flex; align-items: flex-end; gap: 12px; margin: 0 0 14px; }
.agent-say .say-bubble { position: relative; flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--hair); border-radius: var(--r) var(--r) var(--r) 6px; padding: 12px 16px; box-shadow: var(--shadow); }
.agent-say .say-bubble::before { content: ""; position: absolute; left: -7px; bottom: 12px; width: 14px; height: 14px; background: var(--card); border-left: 1px solid var(--hair); border-bottom: 1px solid var(--hair); transform: rotate(45deg); }
.agent-say .say-bubble b { display: block; font-size: 13px; color: var(--coral-text); margin-bottom: 2px; }
.agent-say .say-bubble p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink); }
.dog-ava.agent { width: 96px; height: 96px; border-radius: 24px; }
.dog-ava.agent.sm { width: 64px; height: 64px; border-radius: 18px; }
.agent-say.mini { margin: 12px 0 8px; }
@media (max-width: 420px) { .dog-ava.agent { width: 76px; height: 76px; border-radius: 20px; } .dog-ava.agent.sm { width: 56px; height: 56px; } .dog-hero h2 { font-size: 23px; } }

/* 캐리커처: 크림 액자 안에 그림, 둥근 사각 */
.dog-ava { background: var(--ava-bg); border-radius: 50%; overflow: visible; box-shadow: inset 0 0 0 1px var(--hair); }
.dog-ava img { border-radius: inherit; object-fit: cover; }
.dog-ava.sq { border-radius: 20px; } .dog-ava.lg.sq { border-radius: 20px; }
.dog-pick-card .dog-ava { width: 56px; height: 56px; border-radius: 18px; }
.dog-pick-card { background: var(--card); border: 1.5px solid var(--hair); border-radius: var(--r); }
.dog-pick-card[aria-checked="true"] { border-color: var(--brand); background: var(--accent-soft); box-shadow: 0 0 0 2px rgba(16,185,129,.2); }
.dog-pick-card[aria-checked="true"] b { color: var(--accent-text); }
.dog-pick-card.add { color: var(--accent-text); }
.dog-ava .ava-badge { background: var(--coral); color: #fff; border-color: var(--card); }
.ava-grid { gap: 10px; }
.ava-opt { border-radius: var(--r-sm); }
.ava-opt .ava-img { border-radius: 18px; background: var(--ava-bg); max-width: 72px; }
.ava-opt .ava-img img { width: 100%; height: 100%; object-fit: cover; }
.ava-opt.on { border-color: var(--brand); background: var(--accent-soft); }
.ava-opt small { font-size: 12.5px; line-height: 1.25; text-align: center; }

/* 이전 배포분 유지(1·2차): 이름 확인·기본 아이 배지·보호소 검색 버튼을 새 색으로 */
.dog-card-acts .is-default-btn:disabled { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-line); }
.name-check[data-kind="ok"] { color: var(--accent-text); } .name-check[data-kind="bad"] { color: var(--danger-text); }
#dogName[aria-invalid="true"] { border-color: var(--danger); }
#shelterRoot { color: var(--ink); }
#shelterRoot button { background: var(--card); color: var(--accent-text); border: 1.5px solid var(--hair); border-radius: 12px; }
#shelterRoot .shelter-filters .shelter-submit { background: var(--accent); color: var(--on-accent); border-color: transparent; }
#shelterRoot .shelter-region, #shelterRoot .shelter-filters { background: var(--card); border-color: var(--hair); border-radius: var(--r); }
#shelterRoot .shelter-badge { background: var(--coral-soft); color: var(--coral-text); font-weight: 700; }
#shelterRoot .shelter-thumb { border-radius: 20px; background: var(--soft); }
.diary-form .time-pick select { background-color: var(--card); color: var(--ink); border-color: var(--hair); }

/* 화면 모드 고르기(설정 창) */
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0 14px; padding: 4px; background: var(--soft); border-radius: var(--r-sm); }
.theme-pick button { min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--ink2); font-weight: 700; }
.theme-pick button[aria-pressed="true"] { background: var(--card); color: var(--accent-text); box-shadow: var(--shadow); }
.theme-label { margin: 14px 0 0; font-size: 13px; font-weight: 700; color: var(--mute); }
/* 캐리커처가 액자(정사각·원형)를 꽉 채우게: 그리드 정렬 대신 절대 배치 */
.dog-ava { position: relative; }
.dog-ava > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.dog-ava .ava-badge { z-index: 1; }
/* 주변 탭 '가까운 곳' 종류 6개: 항상 한 줄(1×6). 들어가면 칸을 고르게 채우고, 안 들어가면 그 줄만 가로 스크롤 */
.chips.near-row { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 0 4px; margin: 0 0 12px; }
.chips.near-row::-webkit-scrollbar { display: none; }
.chips.near-row .chip { flex: 1 0 auto; justify-content: center; gap: 4px; min-height: 44px; padding: 6px 10px; font-size: 14px; white-space: nowrap; scroll-snap-align: start; }
.chips.near-row .chip-emo { font-size: 16px; }
.chips.near-row.is-scroll:not(.at-end) { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
@media (max-width: 400px) { .chips.near-row { gap: 5px; } .chips.near-row .chip { padding: 6px 9px; font-size: 13.5px; } .chips.near-row .chip-emo { font-size: 15px; } }
/* 꼬리일기: 배변 체크를 기분 칩과 같은 줄 오른쪽에 작은 칩으로(별도 카드 없이). 좁으면 자연스럽게 다음 줄로 */
.mood-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mood-row > #diaryMood { flex: 0 1 auto; margin: 0; gap: 6px; }
.poop-chip { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px 6px 10px; border: 1.5px solid var(--hair); border-radius: var(--r-pill); background: var(--card); color: var(--ink2); font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.poop-chip input { -webkit-appearance: auto; appearance: auto; width: 20px !important; height: 20px !important; min-height: 0 !important; margin: 0; padding: 0; flex: none; accent-color: var(--accent); }
.poop-chip:has(input:checked) { border-color: var(--brand); background: var(--accent-soft); color: var(--accent-text); font-weight: 800; }
.poop-chip:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 400px) { .mood-row > #diaryMood { display: contents; } .poop-chip { margin-left: 0; } }
/* 머리줄 한 줄 유지: 로고·남은 시간은 줄바꿈 금지. 400px 이하에서는 '관리자'·'로그아웃'을 아이콘 버튼(44×44)으로,
   340px 이하에서는 로고 글자를 숨기고 그림만(홈 링크 이름은 aria-label 로 유지) */
.top { flex-wrap: nowrap; gap: 8px; }
.brand { flex: 0 1 auto; min-width: 0; }
.brand b, .brand small, .timer { white-space: nowrap; }
.brand > div { min-width: 0; }
.top-right { flex: none; flex-wrap: nowrap; }
.top-right .icon-btn { min-width: 44px; min-height: 44px; }
.timer { flex: none; font-variant-numeric: tabular-nums; padding: 4px 8px; }
.hdr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; white-space: nowrap; }
.hdr-btn .hdr-ico { display: none; width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 400px) {
  .top { padding-left: 12px; padding-right: 12px; gap: 6px; }
  .top-right { gap: 4px; }
  .top-right .icon-btn, .top-right .hdr-btn { min-width: 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 14px; }
  .hdr-btn .hdr-ico { display: block; }
  .hdr-btn .hdr-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .timer { font-size: 12.5px; padding: 3px 7px; }
  .brand { gap: 7px; } .brand b { font-size: 16px; }
}
@media (max-width: 340px) { .brand > div { display: none; } }
/* 가까운 곳 장소 목록: 칸마다 은은한 카드, 이름은 굵고 또렷하게(밑줄은 호버·포커스 때만), 배지는 보조색
   배치는 아래 '장소 카드 v2' */
.places li.place { margin: 0 0 10px; background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-sm); font-size: 15px; }
.places li.place:last-child { margin-bottom: 0; border-bottom: 1px solid var(--hair); }
.sec .places li.place { background: var(--soft); border-color: transparent; }
.places .pl-name { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.35; color: var(--ink); letter-spacing: -.01em; min-width: 0; overflow-wrap: anywhere; }
.places .pl-name a.ext { color: inherit; font-weight: inherit; text-decoration: none; border-radius: 6px; }
.places .pl-name a.ext::after { content: ' ↗'; font-size: 12px; color: var(--mute); }
.places .pl-name a.ext:hover, .places .pl-name a.ext:focus-visible { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.places .pl-name a.ext:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.places .pl-dist { font-size: 15px; font-weight: 800; color: var(--accent-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.places .pl-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.places .pl-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--r-pill); background: var(--paper); border: 1px solid var(--hair); color: var(--ink2); font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.places .pl-badge.lic { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.places .pl-badge.open24 { background: var(--danger-soft); border-color: transparent; color: var(--danger-text); }
.places .pl-badge.unk { color: var(--mute); }
/* 오늘의 맞춤 산책 코스(오늘 탭, 출발지 아래): 20px 카드 · 에메랄드(좋음)·노랑(주의)·코랄(위험) 왼쪽 띠 · 캐리커처 */
.today-course { margin: 2px 0 18px; }
.tc-card { position: relative; background: var(--card); border: 1px solid var(--hair); border-left: 6px solid var(--brand); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; transition: opacity .2s; }
.tc-card.caution { border-left-color: var(--sun); } .tc-card.indoor { border-left-color: var(--coral); }
.today-course.is-updating .tc-card { opacity: .55; }
.tc-eyebrow { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .02em; color: var(--accent-text); }
.tc-head { display: flex; align-items: center; gap: 12px; }
.tc-head .dog-ava.sm, .tc-head > .dog-ava { width: 52px; height: 52px; border-radius: 16px; }
.tc-title { flex: 1; min-width: 0; }
.tc-title h3 { margin: 2px 0 2px; font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--ink); }
.tc-title small { display: block; font-size: 12.5px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-head .tag { flex: none; align-self: flex-start; font-size: 12.5px; }
.tc-wx { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.tc-wx span { display: inline-flex; align-items: baseline; gap: 4px; padding: 5px 10px; border-radius: var(--r-pill); background: var(--soft); color: var(--ink2); font-size: 13px; font-weight: 700; }
.tc-wx span small { font-weight: 500; color: var(--mute); font-size: 11.5px; }
.tc-wx span.hot { background: var(--coral-soft); color: var(--coral-text); }
.tc-list { list-style: none; margin: 10px 0 0; padding: 0; }
.tc-item { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--hair); }
.tc-rank { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: var(--accent-soft); font-size: 17px; }
.tc-body { flex: 1; min-width: 0; }
.tc-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.tc-name b { font-size: 16px; color: var(--ink); }
.tc-src { font-size: 12px; font-weight: 700; color: var(--coral-text); }
.tc-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0 6px; font-size: 13px; color: var(--ink2); }
.tc-why { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.tc-why.sub { color: var(--mute); font-size: 13px; margin-top: 2px; }
.tc-body .links { margin-top: 8px; }
.tc-nudge { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--coral-soft); color: var(--coral-text); }
.tc-nudge p { flex: 1; margin: 0; font-size: 13.5px; line-height: 1.45; }
.tc-nudge .ghost { flex: none; min-height: 40px; }
.tc-foot { margin: 10px 0 0; font-size: 11.5px; color: var(--mute); }
.tc-error p:not(.tc-eyebrow) { margin: 6px 0 10px; font-size: 14px; color: var(--ink2); }
.tc-card.is-loading { border-left-color: var(--hair); }
.tc-skel { height: 14px; border-radius: 8px; margin: 10px 0; background: linear-gradient(90deg, var(--soft) 25%, var(--hair) 50%, var(--soft) 75%); background-size: 200% 100%; animation: tc-shine 1.2s linear infinite; }
.tc-skel.w60 { width: 60%; } .tc-skel.w80 { width: 80%; } .tc-skel.w90 { width: 90%; }
.tc-loading-txt { margin: 8px 0 0; font-size: 13px; color: var(--mute); }
@keyframes tc-shine { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .tc-skel { animation: none; } }
@media (max-width: 400px) { .tc-card { padding: 14px 12px; } .tc-title h3 { font-size: 16.5px; } .tc-head .tag { display: none; } .tc-rank { width: 30px; height: 30px; font-size: 15px; } .tc-nudge { flex-wrap: wrap; } .tc-nudge .ghost { width: 100%; } }
.tc-say { margin: 8px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent-text); font-size: 14px; font-weight: 700; line-height: 1.5; }
.tc-card.caution .tc-say { background: var(--caution-soft, var(--soft)); color: var(--caution-text, var(--ink)); } .tc-card.indoor .tc-say { background: var(--coral-soft); color: var(--coral-text); }
.places .pl-addr { margin: 0; font-size: 14px; color: var(--mute); line-height: 1.45; }
.places li.place .pet-cond { margin: 0; }
/* 장소 카드 v2: 모든 폭에서 [왼쪽 이름·배지·주소 | 오른쪽 거리 + 버튼 세로(같은 너비)] — 오른쪽 빈 여백을 없애고 카드 높이를 줄인다 */
.places li.place { padding: 12px 12px 12px 16px; } /* 배치는 공통 .split */
.places li.place .pl-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.places li.place .pl-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.places li.place .pl-dist { text-align: right; line-height: 1.3; padding: 1px 2px 0; }
@media (max-width: 360px) { .places li.place { padding: 12px 10px 12px 14px; } }
/* 버튼 3개(전화 포함)일 때: 간격·위아래 여백을 줄여 카드가 덜 길어지게(버튼 40px 유지) */
.places li.place:has(.links > :nth-child(3)) { padding-top: 10px; padding-bottom: 10px; }
.places li.place:has(.links > :nth-child(3)) .pl-side { gap: 4px; }
.places li.place:has(.links > :nth-child(3)) .pl-dist { line-height: 1.15; }
/* 화면에서만 숨김(스크린리더는 읽음) */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* 보호소 '지역 선택': 라벨 글자 없이 셀렉트 두 개 + 버튼 4개를 카드 너비에 고르게(좁으면 2×2, 넓으면 1×4) */
#shelterRoot .shelter-region .shelter-field { margin: 0 0 8px; }
#shelterRoot .shelter-region .shelter-field select { margin: 0; width: 100%; }
#shelterRoot .region-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 4px 0 0; }
#shelterRoot .region-acts button { width: 100%; min-height: 44px; padding: 6px 8px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#shelterRoot .region-acts button.primary-act { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 800; }
#shelterRoot .region-acts button:disabled { opacity: .5; }
@media (min-width: 600px) { #shelterRoot .region-acts { grid-template-columns: repeat(4, minmax(0, 1fr)); } #shelterRoot .region-acts button { font-size: 13.5px; padding: 6px 4px; } }
@media (max-width: 340px) { #shelterRoot .region-acts button { font-size: 13px; padding: 6px 4px; } }
/* 보호소 공고 필터: 라벨 글자 없이(옵션 글자가 '제목 · 값'), 2열 그리드·검색 버튼 유지, 긴 글자는 말줄임 */
#shelterRoot .shelter-filters:not([hidden]) { gap: 8px 10px; align-items: center; }
#shelterRoot .shelter-filters .shelter-field select, #shelterRoot .shelter-filters .shelter-field input { margin: 0; min-width: 0; }
#shelterRoot .shelter-filters .shelter-field select { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; padding-right: 30px; }
#shelterRoot .shelter-filters .shelter-submit { margin: 0; min-height: 48px; }
@media (max-width: 340px) { #shelterRoot .shelter-filters:not([hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 6px; } #shelterRoot .shelter-filters .shelter-field select { font-size: 14px; padding-left: 10px; padding-right: 24px; } }
/* 보호소 필터: 값이 잘리지 않게 [상태|성별] / [보호센터 전체 너비] / [검색어 전체 너비] / [정렬|검색] (모든 폭 공통)
   좁은 화면(480px 미만)은 옵션 글자도 짧게(shelter.js) */
#shelterRoot .shelter-filters:not([hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "state sex" "center center" "q q" "sort go"; gap: 8px 10px; }
#shelterRoot .shelter-filters > :nth-child(1) { grid-area: state; } #shelterRoot .shelter-filters > :nth-child(2) { grid-area: sex; }
#shelterRoot .shelter-filters > :nth-child(3) { grid-area: sort; } #shelterRoot .shelter-filters > :nth-child(4) { grid-area: center; }
#shelterRoot .shelter-filters > :nth-child(5) { grid-area: q; } #shelterRoot .shelter-filters > :nth-child(6) { grid-area: go; }
@media (max-width: 479px) {
  #shelterRoot .shelter-filters:not([hidden]) { gap: 8px; }
  #shelterRoot .shelter-filters .shelter-field select { font-size: 15px; padding-left: 12px; padding-right: 28px; }
}

/* ===== 공통 2열 카드(.split): 장소 카드(#19 .places li.place)·맞춤 산책 코스 항목(#22 .tc-item) =====
   [.split-main 왼쪽 정보 | .split-side 오른쪽 버튼 세로(같은 너비)]. 버튼 2개 44px, 3개 40px(+간격 축소)
   넓은 화면 배치를 바꾸려면 아래 '넓은 화면 스위치' 한 곳만 고치면 두 카드가 함께 바뀐다 */
.split { display: flex; align-items: flex-start; gap: 12px; }
.split-main { flex: 1 1 auto; min-width: 0; }
.split-side { flex: none; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.split-side .links { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 6px; margin: 0; }
.split-side .links .link-btn { flex: none; width: 100%; min-height: 40px; height: 40px; padding: 0 12px; font-size: 14px; justify-content: space-between; gap: 6px; border-width: 1.5px; white-space: nowrap; }
.split-side .links:not(:has(> :nth-child(3))) .link-btn { min-height: 44px; height: 44px; }
.split-side .links:has(> :nth-child(3)) { gap: 4px; }
@media (max-width: 360px) { .split { gap: 10px; } .split-side .links .link-btn { padding: 0 9px; font-size: 13.5px; } }
/* 맞춤 산책 코스 항목: 코스명은 320px 에서 2줄까지 */
.tc-item.split { gap: 10px; }
.tc-item .tc-name b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.tc-item .tc-meta { margin-bottom: 4px; }
@media (max-width: 400px) { .tc-item.split { gap: 8px; } .tc-item .tc-rank { width: 28px; height: 28px; font-size: 14px; } .tc-item .tc-why { font-size: 13.5px; } }
/* 넓은 화면 스위치(오너 결정 대기): <html data-wide-actions="row"> 이면 600px 이상에서 두 카드 모두 버튼을 가로 한 줄로 */
@media (min-width: 600px) {
  :root[data-wide-actions="row"] .split { flex-wrap: wrap; }
  :root[data-wide-actions="row"] .split-side { flex-direction: row; align-items: center; width: 100%; justify-content: flex-end; }
  :root[data-wide-actions="row"] .split-side .links { flex-direction: row; }
  :root[data-wide-actions="row"] .split-side .links .link-btn { width: auto; height: 44px; min-height: 44px; }
}
/* 좁은 화면(≤400px): 왼쪽 설명이 너무 좁아지지 않게 장식 아이콘만 숨김(버튼 글자·↗ 표시는 그대로) — 두 카드 공통 */
@media (max-width: 400px) {
  .split-side .links .link-btn { padding: 0 10px; font-size: 13.5px; justify-content: center; gap: 4px; }
  .split-side .links .link-btn > span[aria-hidden] { display: none; }
  .tc-item .tc-rank { display: none; }
}
/* 캐릭터 나이 변형(#23): 노령 전용 그림이 없으면 은빛 톤 + '어르신' 배지, 강아지는 '아기' 배지(그림은 그대로) */
.dog-ava.age-senior img, .ava-img.age-senior img { filter: grayscale(.55) sepia(.18) brightness(1.06) contrast(.94); }
.dog-ava.age-senior .ava-badge { background: #64748B; }
.ava-img { position: relative; }
.ava-img.age-senior::after, .ava-img.age-puppy::after { position: absolute; right: 2px; bottom: 2px; padding: 1px 5px; border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 1.4; color: #fff; }
.ava-img.age-senior::after { content: '어르신'; background: #64748B; }
.ava-img.age-puppy::after { content: '아기'; background: var(--coral); }
.ava-opt .ava-img { overflow: hidden; }
#dogAvatarKind { font-weight: 700; color: var(--accent-text); }
/* 보호소 첫 화면: 컴팩트 기준 지역 바 + 접힌 지역 선택 카드 */
#shelterRoot .shelter-region[hidden], #shelterRoot .shelter-bar[hidden], #shelterRoot .shelter-prompt[hidden] { display: none; }
#shelterRoot .shelter-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin-block: 12px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
#shelterRoot .shelter-bar-text { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
#shelterRoot .shelter-bar-btn { flex: none; min-height: 36px; padding: 4px 12px; font-size: 13.5px; }
#shelterRoot .shelter-prompt { margin-block: 12px; padding: 14px; background: var(--accent-soft); color: var(--accent-text); border-radius: var(--r); }
#shelterRoot .shelter-prompt p { margin: 0 0 10px; font-weight: 700; line-height: 1.45; }
#shelterRoot .shelter-prompt-acts { display: flex; flex-wrap: wrap; gap: 8px; }
#shelterRoot .shelter-prompt-acts button { min-height: 40px; padding: 6px 14px; }
#shelterRoot .shelter-region-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#shelterRoot .shelter-region-head h3 { margin: 0 0 6px; }
#shelterRoot .shelter-close { min-height: 34px; padding: 2px 12px; font-size: 13px; }
/* 나이 전용 그림도 고르기 칸에 '아기'·'어르신' 배지(은빛 필터는 변형에만) */
.ava-img.badge-senior::after, .ava-img.badge-puppy::after { position: absolute; right: 2px; bottom: 2px; padding: 1px 5px; border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 1.4; color: #fff; }
.ava-img.badge-senior::after { content: '어르신'; background: #64748B; }
.ava-img.badge-puppy::after { content: '아기'; background: var(--coral); }
