/* =========================================================
   내 리모델링 노트 (journey.css)
   - 버튼: 데스크톱 왼쪽 아래 / 모바일 탭바 위 왼쪽 (오른쪽 .fab 과 겹치지 않음)
   - 서랍: 데스크톱 왼쪽 패널 / 모바일 바텀시트
   ========================================================= */
.jn-btn {
  position: fixed; left: 20px; bottom: 24px; z-index: 72;
  display: inline-flex; align-items: center; gap: 9px;
  height: 52px; padding: 0 18px 0 15px; border-radius: 999px;
  border: 1px solid rgba(22,24,29,.08); background: rgba(255,255,255,.96); color: var(--ink, #16181d);
  font: inherit; font-size: 14.5px; font-weight: 750; letter-spacing: -0.01em; cursor: pointer;
  box-shadow: 0 10px 30px rgba(22,24,29,.14), 0 1px 2px rgba(22,24,29,.08);
  backdrop-filter: saturate(1.3) blur(8px);
  transition: transform .2s var(--ease, ease), box-shadow .2s, bottom .25s var(--ease, ease), opacity .2s, visibility .2s;
}
.jn-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(22,24,29,.18); }
.jn-btn svg { width: 22px; height: 22px; color: var(--accent, #b5592b); flex: none; }
.jn-btn.has-items { background: var(--ink, #16181d); color: #fff; border-color: transparent; }
.jn-btn.has-items svg { color: #f0b48f; }
.jn-badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--accent, #b5592b); color: #fff; font-size: 12px; font-weight: 800; line-height: 1;
}
.jn-badge[hidden] { display: none; }
.jn-btn.is-pulse .jn-badge { animation: jnPulse .7s var(--ease, ease); }
@keyframes jnPulse { 0% { transform: scale(1); } 35% { transform: scale(1.35); box-shadow: 0 0 0 6px rgba(181,89,43,.25); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(181,89,43,0); } }

/* 다른 하단 고정 요소와 겹치지 않게 */
body.has-sample-bar .jn-btn { bottom: calc(var(--tabbar-h, 0px) + 84px); }
body.menu-open .jn-btn { opacity: 0; visibility: hidden; }

/* ---------- drawer ---------- */
.jn-lock, .jn-lock body { overflow: hidden; }
.jn-drawer { position: fixed; inset: 0; z-index: 190; }
.jn-drawer[hidden] { display: none; }
.jn-backdrop { position: absolute; inset: 0; background: rgba(22,24,29,.38); opacity: 0; transition: opacity .25s var(--ease, ease); }
.jn-panel {
  position: absolute; left: 0; top: 0; bottom: 0; width: min(440px, 100%);
  background: var(--paper, #faf8f4); color: var(--ink, #16181d);
  display: flex; flex-direction: column; box-shadow: 18px 0 50px rgba(22,24,29,.18);
  transform: translateX(-104%); transition: transform .3s var(--ease, ease); outline: none;
}
.jn-drawer.is-open .jn-backdrop { opacity: 1; }
.jn-drawer.is-open .jn-panel { transform: none; }
.jn-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 22px 14px; border-bottom: 1px solid var(--line, #e7e2da); background: #fff; position: relative; }
.jn-grip { display: none; }
.jn-eyebrow { margin: 0 0 4px; font-size: 11px; font-weight: 800; letter-spacing: .18em; color: var(--accent, #b5592b); }
.jn-head h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.jn-close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line, #e7e2da); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--ink, #16181d); flex: none; }
.jn-close:hover { background: var(--stone, #f2ede5); }
.jn-close svg, .jn-x svg { width: 16px; height: 16px; }
.jn-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 22px 24px; display: grid; gap: 14px; align-content: start; }

/* steps */
.jn-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: none; }
.jn-steps li { position: relative; }
.jn-steps li + li::before { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--line-2, #d9d2c6); z-index: 0; margin-right: 16px; }
.jn-steps li.is-done + li::before { background: var(--accent, #b5592b); }
.jn-steps a { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted, #6b7079); font-size: 12px; font-weight: 700; text-align: center; text-decoration: none; }
.jn-steps i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 800; background: #fff; border: 2px solid var(--line-2, #d9d2c6); color: var(--muted, #6b7079); }
.jn-steps i svg { width: 16px; height: 16px; }
.jn-steps .is-done i { background: var(--accent, #b5592b); border-color: var(--accent, #b5592b); color: #fff; }
.jn-steps .is-done a { color: var(--ink, #16181d); }
.jn-steps .is-next i { border-color: var(--ink, #16181d); color: var(--ink, #16181d); box-shadow: 0 0 0 4px rgba(22,24,29,.08); }
.jn-steps .is-next a { color: var(--ink, #16181d); }
.jn-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.jn-next { background: var(--ink, #16181d); color: #fff; border-radius: 16px; padding: 16px 18px; }
.jn-next small { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; color: #f0b48f; }
.jn-next p { margin: 6px 0 10px; font-size: 14.5px; line-height: 1.55; color: #ecebe8; }
.jn-next.is-done p { margin-bottom: 0; }
.jn-link { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 750; font-size: 14px; text-decoration: none; border-bottom: 1.5px solid #f0b48f; padding-bottom: 2px; }
.jn-link::after { content: "\203A"; font-size: 18px; line-height: 1; }

/* sections */
.jn-sec { background: #fff; border: 1px solid var(--line, #e7e2da); border-radius: 16px; padding: 14px 16px; }
.jn-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.jn-sec h3 { margin: 0; font-size: 14.5px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 6px; }
.jn-sec h3 b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft, #f6e8df); color: var(--accent-2, #9a4a22); font-size: 12px; display: inline-grid; place-items: center; }
.jn-mini { border: 0; background: none; color: var(--muted, #6b7079); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.jn-mini:hover { color: var(--ink, #16181d); background: var(--stone, #f2ede5); }
.jn-empty { margin: 0; font-size: 13.5px; color: var(--muted, #6b7079); }
.jn-empty a, .jn-sub { color: var(--accent-2, #9a4a22); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.jn-sub { display: inline-block; margin-top: 6px; font-size: 13px; }
.jn-note, .jn-more { margin: 8px 0 0; font-size: 12.5px; color: var(--muted, #6b7079); }

.jn-card { display: flex; gap: 12px; align-items: flex-start; position: relative; }
.jn-card > img, .jn-card > .jn-ph { width: 72px; height: 54px; border-radius: 10px; object-fit: cover; flex: none; background: var(--stone, #f2ede5); }
.jn-card > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.jn-card b { font-size: 15.5px; letter-spacing: -0.02em; }
.jn-card small { font-size: 12.5px; color: var(--muted, #6b7079); }
.jn-est b { font-size: 20px; }

.jn-list, .jn-recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.jn-list li { display: flex; align-items: center; gap: 10px; }
.jn-list li > div { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.jn-list small { font-size: 12px; color: var(--muted, #6b7079); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jn-list b { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jn-sw { width: 30px; height: 30px; border-radius: 8px; flex: none; box-shadow: inset 0 0 0 1px rgba(22,24,29,.1); }

.jn-recent { grid-template-columns: 1fr 1fr; }
.jn-recent li { position: relative; }
.jn-recent a { display: grid; gap: 6px; color: var(--ink, #16181d); text-decoration: none; }
.jn-recent img, .jn-recent .jn-ph { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; object-fit: cover; background: var(--stone, #f2ede5); display: block; }
.jn-recent span { display: grid; line-height: 1.3; }
.jn-recent b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jn-recent small { font-size: 11.5px; color: var(--muted, #6b7079); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jn-recent .jn-x { position: absolute; top: 6px; right: 6px; background: rgba(255,255,255,.92); }

.jn-x { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--muted, #6b7079); display: grid; place-items: center; cursor: pointer; flex: none; }
.jn-x:hover { background: var(--stone, #f2ede5); color: var(--ink, #16181d); }

.jn-foot { display: grid; gap: 8px; padding: 12px 22px 16px; background: #fff; border-top: 1px solid var(--line, #e7e2da); }
.jn-cta { display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 999px; background: var(--accent, #b5592b); color: #fff; font-weight: 800; font-size: 16px; text-decoration: none; box-shadow: 0 8px 22px rgba(181,89,43,.28); }
.jn-cta span { margin-left: 8px; font-size: 12.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.2); }
.jn-cta:hover { background: var(--accent-2, #9a4a22); color: #fff; }
.jn-attach { margin: 0; font-size: 13.5px; color: var(--ink-3, #4a505a); text-align: center; }
.jn-privacy { margin: 0; font-size: 12px; color: var(--muted, #6b7079); text-align: center; line-height: 1.5; }
.jn-clear-all { justify-self: center; border: 0; background: none; color: var(--muted, #6b7079); font: inherit; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; }
.jn-clear-all:hover { color: var(--danger, #c0392b); }

/* ---------- mobile ---------- */
@media (max-width: 960px) {
  .jn-btn { left: 14px; bottom: calc(var(--tabbar-h, 62px) + 14px + env(safe-area-inset-bottom)); height: 46px; padding: 0 14px 0 12px; font-size: 13.5px; gap: 7px; }
  .jn-btn svg { width: 20px; height: 20px; }
  .jn-btn .jn-btn-txt::after { content: ""; }
  .page-estimate .jn-btn { bottom: calc(var(--tabbar-h, 62px) + 78px + env(safe-area-inset-bottom)); }
  body.has-sample-bar .jn-btn { bottom: calc(var(--tabbar-h, 62px) + 64px + env(safe-area-inset-bottom)); }
  body.page-simulator.sim-sheet-on .jn-btn { opacity: 0; visibility: hidden; transform: translateY(12px); }
  .jn-panel {
    top: auto; left: 0; right: 0; width: 100%; max-height: min(88vh, calc(100vh - 40px)); border-radius: 22px 22px 0 0;
    transform: translateY(104%); box-shadow: 0 -16px 40px rgba(22,24,29,.2);
  }
  .jn-head { border-radius: 22px 22px 0 0; padding: 22px 18px 12px; }
  .jn-grip { display: block; position: absolute; top: 8px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: var(--line-2, #d9d2c6); }
  .jn-body { padding: 14px 16px 16px; }
  .jn-foot { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  .jn-btn .jn-btn-txt { font-size: 0; }
  .jn-btn .jn-btn-txt::before { content: "노트"; font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .jn-btn, .jn-panel, .jn-backdrop { transition: none; }
  .jn-btn.is-pulse .jn-badge { animation: none; }
}
@media print { .jn-btn, .jn-drawer { display: none !important; } }
