/* 묘수 공용 화면 뼈대 — 모든 도구가 같은 톤으로 보이게 하는 부분.
 * 원본은 packages/client/myosu.css, 서비스의 public/shared/ 파일은 복사본(scripts/sync-client.mjs).
 *
 * 색은 도구마다 다르다. 도구의 app.css 맨 위에서 아래 네 값만 정한다.
 *   --c       도구 대표색 (버튼, 강조 숫자)
 *   --c-deep  글자에 쓸 진한 대표색
 *   --c-soft  옅은 바탕 (보조 버튼, 안내 상자)
 *   --bg      화면 바탕
 * 나머지(글꼴, 간격, 둥글기, 머리·바닥글, 버튼, 카드, 안내, 토스트, 쿠팡 카드)는 여기서 같이 쓴다.
 */
:root {
  --c: #111318; --c-deep: #111318; --c-soft: #f1f2f4; --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #15171c;
  --ink-2: #4a4f59;
  --muted: #8b919c;
  --line: #e6e8ec;
  --danger: #e5484d;
  --r: 20px;
  --shadow: 0 1px 2px rgba(17, 19, 24, .05), inset 0 0 0 1px var(--line);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  font-size: 16px; line-height: 1.55; word-break: keep-all; -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }

/* 한 줄 화면 (폰 기준) */
.app { max-width: 480px; margin: 0 auto; padding: 4px 20px 40px; display: flex; flex-direction: column; }
.loading { color: var(--muted); text-align: center; margin-top: 40vh; }

/* 머리: 왼쪽 도구 이름, 오른쪽 상태(로그인 등) */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; letter-spacing: -0.03em; text-decoration: none; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.top .me { font-size: 14px; font-weight: 700; color: var(--ink-2); background: var(--surface); padding: 6px 12px; border-radius: 999px; box-shadow: var(--shadow); }

/* 첫 화면 큰 글 */
.hero { text-align: center; padding: 20px 0 8px; }
.hero h2 { margin: 18px 0 8px; font-size: 27px; line-height: 1.3; font-weight: 800; letter-spacing: -0.04em; }
.hero p { margin: 0 auto; color: var(--ink-2); max-width: 22em; }

/* 버튼 */
.primary, .secondary { display: flex; align-items: center; justify-content: center; width: 100%; border: 0; border-radius: 999px; font-weight: 800; text-decoration: none; }
.primary { height: 58px; margin-top: 18px; background: var(--c); color: #fff; font-size: 18px; box-shadow: 0 8px 20px color-mix(in srgb, var(--c) 30%, transparent); }
.secondary { height: 52px; margin-top: 10px; background: var(--c-soft); color: var(--c-deep); font-size: 16px; }
.primary:active, .secondary:active, .cand:active, .save-card:active { transform: scale(.98); }
.primary:disabled, .secondary:disabled { opacity: .5; }
.row { display: flex; gap: 8px; }
.row > .primary, .row > .secondary { margin-top: 14px; height: 52px; font-size: 16px; }
.ghost { border: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 600; padding: 10px 8px; text-decoration: underline; text-underline-offset: 3px; }
.tiny { border: 0; background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 600; padding: 6px 11px; border-radius: 999px; box-shadow: var(--shadow); text-decoration: none; display: inline-block; }

/* 카드와 안내 */
.card { background: var(--surface); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.notice { background: var(--c-soft); color: var(--ink-2); border-radius: 16px; padding: 12px 16px; font-size: 14px; margin: 12px 0 0; }
.notice b { color: var(--c-deep); }
.fine { color: var(--muted); font-size: 13px; text-align: center; margin: 10px 0 0; }
.fine a { color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 28px 0; margin: 0; }
.hint { color: var(--muted); font-size: 14px; margin: 14px 2px 8px; }

/* 촬영·사용 요령 (번호 없는 세 줄) */
.tips { margin: 22px 0 0; background: var(--surface); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.tips h3 { margin: 0 0 8px; font-size: 15px; font-weight: 800; }
.tips ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.tips li { font-size: 14px; color: var(--ink-2); padding-left: 16px; position: relative; }
.tips li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.tips li b { display: block; color: var(--ink); font-size: 15px; }

/* 탭 */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 14px -20px 4px; padding: 2px 20px 6px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 0; height: 38px; padding: 0 15px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-weight: 700; font-size: 15px; color: var(--ink-2); }
.tabs button.on { background: var(--ink); color: #fff; box-shadow: none; }

/* 알림 한 줄 */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: rgba(21, 23, 28, .92); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 15px; font-weight: 600; max-width: calc(100% - 40px); z-index: 10; }

/* 쿠팡 파트너스 카드 (고지 문구는 카드 바로 아래 고정) */
.coupang-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; background: var(--surface); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); text-decoration: none; }
.coupang-card b { font-size: 15px; }
.coupang-card span { flex: none; font-size: 14px; font-weight: 700; color: var(--c-deep); }
.coupang-note { color: var(--muted); font-size: 12px; margin: 6px 4px 0; }

/* 바닥글: 모든 도구 같은 모양 */
.foot { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); }
.foot-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.myosu-line { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 16px 0 0; font-size: 13px; color: var(--muted); text-decoration: none; }
.myosu-mark { width: 22px; height: 22px; border-radius: 7px; background: #111318; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
