/*
 * ahhaohho-netcheck 디자인 시스템.
 * ao-community-web(HeroUI hero.ts + app.css)의 팔레트/타이포/그림자 토큰을 이식.
 * Pretendard 웹폰트(CDN) + 시스템 폰트 폴백. 무거운 React/HeroUI 스택은 미사용.
 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css');

:root {
  /* 그래파이트/뉴트럴 (community-web hero.ts lightTokens) */
  --fg-neutral: #2a2a2a;
  --fg-neutral-muted: #69665d;
  --fg-neutral-subtle: #bdbab2;
  --bg-brand: #101010;
  --bg-neutral: #ffffff;
  --bg-neutral-subtle: #f1f0ee;
  --bg-neutral-muted: #fafaf9;
  --st-neutral: #f1f0ee;
  --st-neutral-contrast: #d7d5d0;

  /* 시맨틱 */
  --positive: #25b46b;
  --positive-weak: #dff7ea;
  --critical: #f52439;
  --critical-weak: #feeced;
  --warn: #feb877;
  --warn-weak: #ffead7;

  /* 파스텔 액센트 */
  --accent-blue: #8fc9ff;
  --accent-blue-weak: #e5f3ff;
  --accent-lime: #d4ec88;
  --accent-lime-weak: #eef8ce;
  --accent-lavender: #d7adff;
  --accent-mint: #9de2d3;
  --accent-yellow: #fbe583;
  --accent-pink: #fca6dd;
  --accent-grapefruit: #fc9c92;

  /* 그림자(community-web) */
  --shadow-color: #f2f2f2;
  --shadow-large: 0px 0px 40px 0px var(--shadow-color);
  --shadow-medium: 0px 0px 1.25rem 0px var(--shadow-color);
  --shadow-btn: 0px 4px 0px 0px rgba(224, 224, 224, 1);
  --shadow-reflection: 0px 1px 3px 1px #00000026, 0px 1px 2px 0px #0000004d;

  --radius: 1rem;
  --radius-sm: 0.625rem;
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo',
    'Malgun Gothic', sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--fg-neutral);
  background: var(--bg-neutral-muted);
  -webkit-font-smoothing: antialiased;
}

/* 타이포(community-web app.css utilities) */
.title-t1 { font-size: 2rem; line-height: 2.125rem; font-weight: 800; letter-spacing: 0.01rem; }
.title-t2 { font-size: 1.5rem; line-height: 2rem; font-weight: 700; letter-spacing: 0.01rem; }
.title-t3 { font-size: 1.25rem; line-height: 1.875rem; font-weight: 700; }
.title-t4 { font-size: 1.125rem; line-height: 1.875rem; font-weight: 600; }
.body-b1 { font-size: 1.0625rem; line-height: 1.625rem; font-weight: 500; }
.body-b2 { font-size: 1rem; line-height: 1.5rem; font-weight: 500; }
.body-b3 { font-size: 0.9375rem; line-height: 1.375rem; font-weight: 500; }
.body-b4 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.muted { color: var(--fg-neutral-muted); }
.subtle { color: var(--fg-neutral-subtle); }

/* 레이아웃 */
.container { max-width: 720px; margin: 0 auto; padding: 1.25rem; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 1.25rem; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; flex-direction: row; align-items: center; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.between { justify-content: space-between; }
.center { align-items: center; justify-content: center; }
.wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.hidden { display: none !important; }
.text-center { text-align: center; }

/* 카드 */
.card {
  background: var(--bg-neutral);
  border: 1px solid var(--st-neutral);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-medium);
}
.card + .card { margin-top: 1rem; }

/* 버튼 (shadow-btn 아하오호 스타일) */
.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease;
  background: var(--bg-brand);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 0 rgba(224, 224, 224, 1); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-lg { padding: 1.05rem 1.5rem; font-size: 1.0625rem; width: 100%; }
.btn-secondary { background: var(--bg-neutral-subtle); color: var(--fg-neutral); }
.btn-accent { background: var(--accent-lime); color: #101010; }
.btn-ghost { background: transparent; color: var(--fg-neutral-muted); box-shadow: none; }

/* 입력 */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.4rem; }
.input,
select.input {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--st-neutral-contrast);
  border-radius: var(--radius-sm);
  background: #fff;
  outline: none;
}
.input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px var(--accent-blue-weak); }

/* 배지/판정 */
.badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 700; }
.badge-good { background: var(--positive-weak); color: var(--positive); }
.badge-warn { background: var(--warn-weak); color: #c96a1f; }
.badge-bad { background: var(--critical-weak); color: var(--critical); }
.badge-neutral { background: var(--bg-neutral-subtle); color: var(--fg-neutral-muted); }

/* 프로그레스 */
.progress { height: 0.75rem; background: var(--bg-neutral-subtle); border-radius: 999px; overflow: hidden; }
.progress > .bar { height: 100%; background: linear-gradient(90deg, var(--accent-lime), var(--positive)); transition: width 0.4s ease; }

/* 스켈레톤(community-web) */
.skeleton { position: relative; overflow: hidden; background: var(--bg-neutral-subtle); border-radius: 0.5rem; }
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: skeleton 1.5s linear infinite;
}
@keyframes skeleton { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* 스크롤바(community-web) */
::-webkit-scrollbar { width: 0.4rem; height: 0.4rem; }
::-webkit-scrollbar-track { background: #e2e2e2; border-radius: 100px; }
::-webkit-scrollbar-thumb { background: #05050533; border-radius: 100px; }

/* 테이블 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--st-neutral); font-size: 0.9375rem; }
.table th { color: var(--fg-neutral-muted); font-weight: 600; font-size: 0.875rem; }
.table tr.slow td { background: var(--critical-weak); }

/* 토스트 */
.toast { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); background: var(--bg-brand); color: #fff; padding: 0.85rem 1.25rem; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow-reflection); z-index: 100; opacity: 0; transition: opacity 0.2s; }
.toast.show { opacity: 1; }

/* 헤더 로고 바 */
.appbar { display: flex; align-items: center; gap: 0.6rem; padding: 1rem 1.25rem; }
.appbar .logo { font-weight: 800; font-size: 1.125rem; }
.appbar .logo .dot { color: var(--accent-grapefruit); }

/* 연출 애니메이션 */
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
.pop { animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes float-up { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.float-up { animation: float-up 0.3s ease; }
