/* MediMind Lite — 공개 재고 사용 안내(/inventory-guide). 로그인 없이 열리고 예시 데이터만 씁니다.
 * 바깥(머리 · 안내 글)은 첫 화면과 같은 초록 잉크, 가운데 예시 화면은 앱과 같은 토큰(남색 · 재고 상태 색)을 씁니다.
 * CSP: 글꼴 파일 없음(시스템 글꼴), style 속성 없음. 모든 모양은 이 파일의 class/속성 선택자로만 정합니다. */
:root {
  /* 첫 화면(landing)과 같은 바깥 색 */
  --g-page: #f6f8f7; --g-card: #fff; --g-ink: #17384b; --g-ink-2: #3f5866; --g-muted: #526a74;
  --g-line: #d9e3e1; --g-line-soft: #e7ecea; --g-green: #326b5a; --g-green-soft: #edf6f2; --g-button-line: #8fa7a3;
  /* 앱 토큰(디자인 명세 §2)과 같은 값 — 예시 화면 안쪽 */
  --a-surface: #fff; --a-sunken: #f5f7fa; --a-ink: #1b2430; --a-ink-2: #3d4b5a; --a-muted: #5b6977; --a-placeholder: #697683;
  --a-line: #d5dde6; --a-line-soft: #e7ecf2; --a-line-input: #7d8da1;
  --a-accent: #1f4f7a; --a-accent-soft: #e7eff7; --a-accent-line: #a9c0d6;
  --a-ok: #2d6a57; --a-ok-soft: #e8f3ef;
  --a-order-fill: #b7791f; --a-order-ink: #7a4f0f;
  --a-disabled-bg: #e7ecf2; --a-disabled-ink: #6b7886;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --dur: 140ms;
  font-family: var(--font); color: var(--g-ink); background: var(--g-page);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--g-green); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: -80px; left: 16px; padding: 8px 12px; background: #fff; z-index: 3; }
.skip:focus { top: 12px; }

/* 머리 */
.topbar { max-width: 1200px; min-height: 82px; margin: auto; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
/* 로고(2026-10-14): 투자자 랜딩 페이지와 같은 맥박 표시(#0b7a72)와 글자. */
.topbar-logo, .topbar-logo:hover { display: inline-flex; align-items: center; gap: 9px; font: 700 22px/1 "IBM Plex Sans Condensed", "IBM Plex Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif; letter-spacing: -.01em; color: #0f1f26; text-decoration: none; white-space: nowrap; }
.topbar-logo svg { display: block; width: 28px; height: 28px; flex: none; }
.mk-bg { fill: #0b7a72; }
.mk-ln { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.topbar-back { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 700; color: #315d5c; text-underline-offset: 4px; }
.topbar-back:hover { color: #183b50; }

main { max-width: 1200px; margin: auto; padding: 44px 24px 72px; }
.intro { max-width: 690px; margin-bottom: 48px; }
.eyebrow { margin: 0 0 12px; color: var(--g-green); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-size: clamp(32px, 4vw, 52px); letter-spacing: -.055em; line-height: 1.3; word-break: keep-all; }
.intro > p:last-child { max-width: 590px; color: var(--g-muted); word-break: keep-all; }
.guide-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 24px; align-items: start; }
.demo, .steps, .note { background: var(--g-card); border: 1px solid var(--g-line); border-radius: 12px; }

/* 예시 화면: 앱의 도구 줄 + 품목 카드(휴대폰 모양)를 그대로 줄여 보여 줍니다. */
.demo { overflow: hidden; box-shadow: 0 24px 48px #203d3a0b; }
.demo-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--g-line-soft); font-size: 13px; font-weight: 700; }
.sample { padding: 2px 10px; border-radius: 999px; background: var(--g-green-soft); color: #23644f; font-size: 12px; font-weight: 700; }
.demo-body { padding: 20px 24px 24px; background: #eef1f5; color: var(--a-ink); font-variant-numeric: tabular-nums; }
.demo-toolbar { margin: -20px -24px 16px; padding: 16px 24px 12px; background: var(--a-surface); box-shadow: 0 1px 0 var(--a-line), 0 2px 8px #182c431a; }
.demo-label { margin: 0 0 6px; color: var(--a-ink-2); font-size: 12.5px; font-weight: 600; }
.locations { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.locations::-webkit-scrollbar { display: none; }
.locations span { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--a-line-input); border-radius: 6px; background: var(--a-surface); font-size: 14px; font-weight: 700; }
.locations span.pressed { background: var(--a-accent); border-color: var(--a-accent); color: #fff; }
.locations span.active { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--a-accent-line); }
.locations { padding: 6px; margin: -6px -6px 6px; }
.findrow { display: flex; gap: 8px; align-items: stretch; margin-bottom: 8px; }
.search { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; min-height: 44px; padding: 0 12px 0 40px; border: 1px solid var(--a-line-input); border-radius: 4px; color: var(--a-placeholder); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--a-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235b6977' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat left 12px center; }
.search.active { border-color: var(--a-accent); box-shadow: 0 0 0 3px #1f4f7a2e; color: var(--a-ink); }
.add { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--a-line-input); border-radius: 6px; background: var(--a-surface); font-size: 13.5px; font-weight: 600; }
.meta { display: flex; justify-content: space-between; gap: 12px; margin: 0; min-height: 20px; color: var(--a-muted); font-size: 12.5px; line-height: 20px; }
.meta > span:first-child { flex: 0 0 auto; }

/* 저장 상태 줄: 앞의 8px 점(§5.12) */
.status { min-width: 0; display: inline-flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--a-muted); }
.status[data-tone="saved"] { color: var(--a-ok); font-weight: 600; }
.status[data-tone="saved"]::before { content: ""; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--a-ok); }

/* 품목 카드: 1줄 이름, 2줄 되돌리기 · 수량 · −, 3줄 재고 상태, 4줄 평균 · 최근 변경 · 메모 (§5.9) */
.item { padding: 12px; border: 1px solid var(--a-line); border-radius: 6px; background: var(--a-surface); }
.item-name { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.item-name strong { font-size: 18px; font-weight: 600; line-height: 1.4; }
.kind { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 4px; background: var(--a-accent-soft); color: var(--a-accent); }
.qty-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.undo { flex: 0 0 56px; display: grid; place-items: center; height: 56px; border: 1px solid var(--a-line); border-radius: 6px; background: var(--a-surface); color: var(--a-disabled-ink); }
.undo[data-enabled="true"] { border-color: var(--a-accent); color: var(--a-accent); }
.quantity { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 4px; padding: 0 4px; white-space: nowrap; }
.quantity strong { font-size: 26px; font-weight: 700; line-height: 1; border-bottom: 1px dotted var(--a-line-input); }
.quantity .unit { color: var(--a-muted); font-size: 13px; font-weight: 500; }
.quantity.active { outline: 3px solid var(--a-accent-line); outline-offset: 6px; border-radius: 4px; }
.minus { flex: 0 0 72px; display: grid; place-items: center; height: 56px; margin-left: auto; border: 1px solid var(--a-accent); border-radius: 6px; background: var(--a-accent); color: #fff; font-size: 32px; font-weight: 500; line-height: 1; }
.minus.active { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--a-accent-line); }
.stock { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12.5px; color: var(--a-ink-2); }
.stock-label { font-weight: 600; color: var(--a-ok); }
.stock-bar { flex: 1 1 auto; max-width: 96px; height: 6px; border-radius: 3px; background: var(--a-line-soft); overflow: hidden; }
.stock-bar > i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--a-ok); transition: width var(--dur); }
.stock-bar[data-fill="7"] > i { width: 70%; }
.stock-bar[data-fill="8"] > i { width: 80%; }
.item-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--a-line-soft); }
.cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cell-label { color: var(--a-muted); font-size: 12px; font-weight: 700; }
.avg { font-size: 13px; color: var(--a-ink-2); }
.avg b { font-size: 14px; font-weight: 700; color: var(--a-ink); }
.when { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.latest { min-width: 0; font-size: 12.5px; color: var(--a-muted); }
.latest b { color: var(--a-ink-2); font-weight: 700; margin-right: 4px; }
.memo { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: 6px; color: var(--a-ink-2); font-size: 12.5px; font-weight: 600; }
.memo.active { border-color: var(--a-accent); background: var(--a-accent-soft); color: var(--a-accent); }
.demo-caption { margin: 0; padding: 16px 24px 24px; color: var(--g-muted); font-size: 12.5px; word-break: keep-all; }

/* 단계 목록 */
.steps { padding: 28px; }
.step-head { position: relative; }
.step-head h2 { margin-bottom: 20px; font-size: 23px; letter-spacing: -.04em; }
.counter { position: absolute; right: 0; bottom: 4px; margin: 0; color: var(--g-muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.steps ol { list-style: none; padding: 0; margin: 0; }
.steps li { border-top: 1px solid var(--g-line-soft); }
.steps li button { display: flex; width: 100%; gap: 16px; text-align: left; padding: 12px 8px; border: 0; background: transparent; color: inherit; border-radius: 6px; transition: background-color var(--dur); }
.steps li button:hover { background: #f3f8f6; }
.steps li[aria-current="step"] button { background: var(--g-green-soft); box-shadow: inset 3px 0 0 var(--g-green); }
.number { flex: none; color: var(--g-green); font-size: 12px; font-weight: 800; padding-top: 2px; font-variant-numeric: tabular-nums; }
.steps strong, .steps small { display: block; }
.steps strong { font-size: 14px; }
.steps small { margin-top: 2px; color: var(--g-muted); font-size: 12.5px; line-height: 1.55; word-break: keep-all; }
.controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.controls button { min-height: 44px; padding: 0 14px; border: 1px solid var(--g-button-line); border-radius: 6px; background: #fff; color: #183b50; font-size: 13px; font-weight: 700; transition: background-color var(--dur); }
.controls button:hover { background: var(--g-green-soft); }
.controls button:disabled { background: var(--a-disabled-bg); border-color: transparent; color: var(--a-disabled-ink); cursor: not-allowed; }
.note { margin-top: 24px; padding: 20px 24px; }
.note strong { font-size: 14px; }
.note p { max-width: 900px; margin: 6px 0 0; color: var(--g-muted); font-size: 13.5px; word-break: keep-all; }
footer { max-width: 1200px; margin: auto; padding: 24px; border-top: 1px solid var(--g-line); color: var(--g-muted); font-size: 12.5px; }

@media (max-width: 850px) { .guide-layout { grid-template-columns: 1fr; } }
@media (max-width: 450px) {
  .topbar { min-height: 70px; padding: 12px 16px; }
  .topbar-logo { gap: 8px; font-size: 19px; }
  .topbar-logo svg { width: 24px; height: 24px; }
  .topbar-back { font-size: 12.5px; }
  main { padding: 28px 16px 48px; }
  .intro { margin-bottom: 28px; }
  .demo-head { padding: 12px 16px; }
  .demo-body { padding: 16px 12px; }
  .demo-toolbar { margin: -16px -12px 12px; padding: 12px; }
  .item-name strong { font-size: 16px; }
  .undo { flex-basis: 48px; height: 48px; }
  .minus { flex-basis: 60px; height: 48px; }
  .quantity strong { font-size: 22px; }
  .demo-caption { padding: 12px 16px 16px; }
  .steps { padding: 20px 16px; }
  .note { padding: 16px; }
}
@media (pointer: coarse) { .steps li button { min-height: 44px; } }
@media (prefers-reduced-motion: no-preference) { .demo-body .active { animation: focus-in .5s ease-out; } @keyframes focus-in { from { transform: scale(.96); } to { transform: scale(1); } } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
