/* whereis.tinysoft.kr
 *
 * 색과 글꼴은 지어내지 않았다. 앱의 라이트 팔레트(lib/core/tokens/palette/)와
 * 스플래시 글꼴(IBM Plex Sans KR)을 그대로 가져왔다.
 *
 * **다크 모드를 따로 두지 않는다.** 앱의 기본이 밝은 화면이고, 사이트만 어두우면
 * 같은 제품으로 안 보인다. */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR:wght@400;500;600;700&family=Roboto:wght@500&display=swap');

:root {
  --accent: #c9453c;
  --accent-soft: #ffd9cf;
  --on-accent: #ffffff;
  --border-accent: rgba(201, 69, 60, 0.4);
  --bg: #fffbf7;
  --surface: #ffffff;
  --border: #ede6df;
  --ink: #2b2622;
  --muted: #6f6660;
  --subtle: #8a8078;
  --notice: #fff1ec;
  --shadow: 0 1px 2px rgba(43, 38, 34, 0.04), 0 12px 32px rgba(43, 38, 34, 0.07);
  --shadow-lift: 0 2px 4px rgba(43, 38, 34, 0.05), 0 20px 48px rgba(43, 38, 34, 0.1);
  --radius: 20px;
  --nav-break: 820px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans KR', -apple-system, BlinkMacSystemFont,
    'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: -0.01em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 18px;
  border-radius: 0 0 12px 0;
  z-index: 30;
}

.skip:focus { left: 0; }

/* ── 머리 ─────────────────────────────────────────────────────────── */

.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site.scrolled, .site.open { border-bottom-color: var(--border); }

.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand svg { display: block; flex: none; }

.site nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }

/* 언어 버튼과 햄버거는 **같은 키**여야 한다. 높이도 모서리도 다르면 둘이 한
   짝으로 안 보이고 아무렇게나 놓인 것처럼 읽힌다. */
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.site nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1.5px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

a.lang {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  background: var(--surface);
  transition: color 0.15s ease, border-color 0.15s ease;
}

a.lang:hover { color: var(--accent); border-color: var(--border-accent); }

/* 햄버거 — 좁은 화면에서만 선다.
 *
 * 좁은 화면에서 사용자가 먼저 찾는 것은 메뉴가 아니라 내용이다. 링크 넷을 줄여
 * 밀어 넣는 대신 접어 두고, 열면 온전한 이름으로 보여 준다. */

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.menu-toggle .bars {
  display: grid;
  gap: 5px;
  justify-items: center;
}

.menu-toggle .bars i {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.15s ease;
}

.site.open .menu-toggle .bars i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site.open .menu-toggle .bars i:nth-child(2) { opacity: 0; }
.site.open .menu-toggle .bars i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 819px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .site nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .site.open nav { display: flex; }

  .site nav a {
    padding: 13px 2px;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
  }

  .site nav a:last-child { border-bottom: none; }
}

/* ── 첫 화면 ──────────────────────────────────────────────────────── */

.hero { padding: 56px 0 32px; }

.hero .wrap { display: grid; gap: 40px; align-items: center; }

@media (min-width: 880px) {
  .hero { padding: 88px 0 56px; }
  .hero .wrap { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
}

h1 {
  font-size: clamp(32px, 6vw, 50px);
  line-height: 1.24;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 18px;
  text-wrap: balance;
}

.hero p.lead {
  font-size: clamp(17px, 2.2vw, 19px);
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 32em;
}

.hero-art { display: flex; justify-content: center; }

.hero-art svg {
  width: 100%;
  max-width: 300px;
  height: auto;
  filter: drop-shadow(var(--shadow-lift));
}

ul.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.pill {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

/* ── 본문 ─────────────────────────────────────────────────────────── */

section { padding: 48px 0; }
section.tight { padding: 28px 0; }

h2 {
  font-size: clamp(23px, 3.2vw, 29px);
  line-height: 1.35;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  font-weight: 700;
  text-wrap: balance;
}

h3 { font-size: 18px; margin: 0 0 6px; letter-spacing: -0.02em; font-weight: 600; }

p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }

.grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.card .icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--notice);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card p { color: var(--muted); font-size: 16px; }

.feature {
  display: grid;
  gap: 28px;
  align-items: center;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (min-width: 800px) { .feature { grid-template-columns: 1fr 1fr; padding: 40px; } }

.feature h2 { font-size: clamp(22px, 3vw, 27px); }
.feature p { color: var(--muted); }
.feature figure { margin: 0; display: flex; justify-content: center; }
.feature figure svg { width: 100%; max-width: 300px; height: auto; }

ol.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 800px) { ol.steps { grid-template-columns: repeat(3, 1fr); } }

/* **직계 자식만.** 그냥 `li` 로 잡으면 단계 안에 든 목록까지 번호와 카드를
   물려받는다 — 기기 핀마다 번호가 붙고 저마다 흰 상자를 두르고 있었다. */
ol.steps > li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}

ol.steps > li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
}

ol.steps > li > p { color: var(--muted); font-size: 15px; }

/* 등록할 수 있는 기기 종류.
 *
 * 앱은 기기 종류를 등록할 때 스스로 정하고 지도 핀에 그림으로 붙인다. 색만으로는
 * 어느 기기인지 외워야 하지만 그림이 붙으면 외울 것이 없다 — 그 규칙을 여기서도
 * 그대로 보인다. 색은 앱의 핀 색 여섯 가지다. */

ul.kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 10px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

ul.kinds li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 72px;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  border-radius: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
  word-break: keep-all;
}

ul.kinds .pin {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  /* 지도 핀 모양. 각진 모서리가 왼쪽 아래에 있고, 반시계로 45도 돌리면 그 끝이
     **아래를 향한다** — 지도에 꽂힌 핀과 같은 방향이다. */
  border-radius: 50% 50% 50% 2px;
  transform: rotate(-45deg);
  background: hsl(var(--hue) 55% 47%);
  box-shadow: 0 3px 7px hsl(var(--hue) 55% 47% / 0.32);
}

ul.kinds .pin svg {
  width: 19px;
  height: 19px;
  transform: rotate(45deg);
  fill: none;
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.callout {
  background: var(--notice);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 28px 30px;
}

.callout h2 { font-size: clamp(21px, 3vw, 26px); margin-bottom: 12px; }
.callout p { color: var(--muted); }

ul.check { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }

ul.check li {
  position: relative;
  padding-left: 30px;
  color: var(--muted);
  font-size: 16px;
}

ul.check li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 12px;
  height: 7px;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}

/* ── 문서 페이지 ──────────────────────────────────────────────────── */

/* **위아래만 준다.** `padding` 을 통째로 쓰면 `.wrap` 이 준 좌우 여백까지
   덮어써서 글이 화면 가장자리에 붙는다. */
.doc { padding-top: 44px; padding-bottom: 24px; }
.doc h1 { font-size: clamp(28px, 5vw, 38px); margin-bottom: 12px; }
.doc p.lead { color: var(--muted); font-size: 17px; margin-bottom: 8px; }
.doc h2 { font-size: 21px; margin: 42px 0 10px; }
.doc h3 { font-size: 17px; margin: 26px 0 6px; }
.doc ul, .doc ol { color: var(--muted); padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc .card { margin: 22px 0; }
.doc .card ul { margin-top: 0; }
.doc .card + .note, .doc .note + .card { margin-top: 22px; }
.doc .card h3:first-child { margin-top: 0; }
.doc #actions { margin-top: 16px; }
.doc #state { margin-bottom: 0; }

.table-scroll { overflow-x: auto; }

table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 15px; }
th, td { border-bottom: 1px solid var(--border); padding: 11px 10px; text-align: left; vertical-align: top; }
th { color: var(--subtle); font-weight: 600; font-size: 14px; }
td { color: var(--muted); }
td strong { color: var(--ink); }

/* ── 버튼 ─────────────────────────────────────────────────────────── */

button {
  font: inherit;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 12px;
  border: 1.5px solid transparent;
  padding: 0 22px;
  height: 44px;
  cursor: pointer;
  background: var(--accent);
  color: var(--on-accent);
  transition: transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

button:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
button:active { transform: translateY(0); }
button.quiet { background: transparent; color: var(--muted); border-color: var(--border); }
button.quiet:hover { color: var(--ink); }
button[disabled] { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }

.danger { border-color: var(--border-accent); }
.note { color: var(--subtle); font-size: 15px; }

.status { margin-top: 14px; color: var(--muted); font-size: 15px; }

/* **빈 줄은 자리를 먹지 않는다.** 아무 말도 없는데 아래가 벌어져 있으면 카드가
   무엇을 기다리는 것처럼 보인다. */
.status:empty { display: none; }

/* 버튼은 한 줄에 나란히. 여백은 각자 margin 이 아니라 여기서 준다 — 버튼이
   하나일 때와 둘일 때 아래 여백이 달라지지 않는다. */
#actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

/* 구글 로그인 버튼. **구글이 정한 모양을 그대로 쓴다** — 흰 바탕, 회색 테두리,
   네 가지 색 로고, Roboto. 우리 색으로 칠하면 사용자가 아는 그 버튼이 아니게
   되고, 구글의 브랜드 규칙에도 어긋난다. */
button.gsi {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #747775;
  border-radius: 4px;
  font-family: 'Roboto', 'IBM Plex Sans KR', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.25px;
}

button.gsi:hover {
  transform: none;
  box-shadow: none;
  background: #f8f9fa;
  border-color: #5f6368;
}

button.gsi svg { flex: none; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }

:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ── 바닥 ─────────────────────────────────────────────────────────── */

footer.site-foot {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding: 32px 0 56px;
  color: var(--subtle);
  font-size: 15px;
}

footer.site-foot .wrap { display: grid; gap: 10px; }
footer.site-foot a { color: var(--muted); text-decoration: none; }
footer.site-foot a:hover { color: var(--accent); }
footer.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
