/* ECOS 앱 설치 페이지 - 인라인 style 없이 클래스로만 꾸민다 (CSP style-src 'self'). */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-latin-800-normal.woff2') format('woff2');
}

:root {
  --green: #115E4A;
  --green-dark: #0b4436;
  --green-soft: #e8efe9;
  --ink: #15171c;
  --ink-2: #3d4148;
  --ink-3: #5f646d;
  --bg: #f6f5f2;
  --line: #e6e3dc;
  --line-2: #d9d5cc;
  --amber-bg: #fff4df;
  --amber-ink: #7a4b00;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.5;
}
a { color: var(--green); }
a:hover { color: var(--green-dark); }
h1, h2, p, ol, ul { margin: 0; }
.grow { flex-grow: 1; }
.small { font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }

:focus-visible { outline: 3px solid #1b7fd6; outline-offset: 2px; }

/* 머리 */
.top { display: flex; align-items: center; gap: 10px; padding: 14px 20px; background: var(--green); color: #fff; }
.top-ico { border-radius: 9px; display: block; }
.top-name { font-family: 'Plus Jakarta Sans', 'Noto Sans KR', sans-serif; font-weight: 800; font-size: 19px; letter-spacing: 0.04em; }
.top-sub { font-size: 12.5px; color: #e3efe9; }

/* 배치: 한 칸 -> 두 칸(760~) -> 넓은 여백(1100~) */
.page { display: flex; flex-direction: column; gap: 22px; padding: 22px 16px 36px; max-width: 1280px; margin: 0 auto; }
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.share.share-b { display: none; }
@media (min-width: 760px) {
  .page { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; padding: 28px 28px 40px; }
  .share.share-a { display: none; }
  .share.share-b { display: flex; }
}
@media (min-width: 1100px) {
  .page { padding: 28px 64px 40px; }
}

/* 제목 */
.hero { display: flex; flex-direction: column; gap: 8px; }
.hero h1 { font-size: 26px; line-height: 1.3; letter-spacing: -0.02em; }
.hero p { font-size: 14.5px; line-height: 1.6; color: var(--ink-3); }
.pill { align-self: flex-start; display: flex; align-items: center; gap: 6px; margin-top: 4px; padding: 6px 12px; border-radius: 999px; background: var(--amber-bg); color: var(--amber-ink); font-size: 12.5px; font-weight: 700; }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: #d98a00; }

/* 이 기기 카드 */
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--green-soft); display: grid; place-items: center; color: var(--green); }
.card h2 { font-size: 16px; }
.note { font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }
.fallback { font-size: 14px; font-weight: 700; }
.fallback-link { display: inline-flex; align-items: center; min-height: 44px; }

.steps { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--bg); }
.step-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.step-body { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.step-t { font-size: 14.5px; font-weight: 700; }
.step-d { font-size: 13px; line-height: 1.5; color: var(--ink-3); }

/* 단추 (높이 44px 이상) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; font-family: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; align-self: flex-start; text-align: center; }
.btn-primary { background: var(--green); color: #fff; border: 1px solid var(--green); font-weight: 800; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--green); border: 1px solid var(--green); }
.btn-off { background: #e9e7e2; color: var(--ink-3); border: 1px solid #e9e7e2; cursor: default; }
.btn-cta { align-self: stretch; min-height: 52px; border-radius: 14px; font-size: 16px; font-weight: 800; }
.btn-line { background: #fff; color: var(--ink); border: 1px solid var(--line-2); min-height: 48px; }
.btn-kakao { background: #fee500; color: #191600; border: 0; min-height: 48px; }

/* PC 카드 */
.pc-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.qr-box { width: 168px; height: 168px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.qr { display: block; width: 100%; height: 100%; }
.pc-text { flex: 1 1 200px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.pc-text b { color: var(--ink); }
.pc-text .small a { display: inline-flex; align-items: center; min-height: 44px; }

/* 다른 기기 탭 */
.other { display: flex; flex-direction: column; gap: 10px; }
h2 { font-size: 15px; }
.tabs { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.tab[aria-selected="true"] { border-color: var(--green); background: var(--green); color: #fff; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.panel-t { font-size: 14px; font-weight: 700; }
.lines { padding-left: 18px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.btn-panel { align-self: flex-start; }
.warn { font-size: 12.5px; line-height: 1.6; color: var(--amber-ink); background: var(--amber-bg); border-radius: 10px; padding: 8px 10px; }

/* 동료에게 알려 주기 */
.share { flex-direction: column; gap: 10px; display: flex; }
.share-btns { display: flex; gap: 8px; }
.share-btns .btn { flex: 1 1 0; align-self: stretch; }

/* 지금 버전 */
.vers { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.ver-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ver { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.ver .small { font-size: 12px; line-height: 1.5; }
.ver-v { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* 업데이트 이력 */
.history { display: flex; flex-direction: column; gap: 10px; }
.hist-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters { display: flex; gap: 4px; }
.flt { min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.flt[aria-checked="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.hist-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hist { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.hist-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.chip-app { background: var(--green); color: #fff; }
.chip-screen { background: var(--green-soft); color: var(--green); }
.hist-v { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hist-t { font-size: 14px; font-weight: 700; line-height: 1.45; }
.hist-items { padding-left: 18px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.btn-more { align-self: stretch; min-height: 44px; font-size: 13.5px; }

.foot { font-size: 12px; line-height: 1.7; color: var(--ink-3); padding-top: 4px; }

/* 복사 실패 때 주소를 잡아 선택하는 임시 칸 (화면 밖) */
.sel-tmp { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .tab, .flt { transition: background-color 0.12s, color 0.12s; }
}
