/* Layout: 좌측 메시지 / 우측 실제 프로그램 화면을 나란히 두는 분할 구성을 페이지 전체의 리듬으로 반복 */
  :root {
    --bg: 247 248 245;        /* 밝은 바탕, 아주 약한 녹색 기운 */
    --surface: 255 255 255;
    --sunk: 238 241 236;
    --ink: 17 27 48;
    --muted: 84 96 117;
    --line: 220 225 219;
    --primary: 30 58 138;     /* 네이비 #1E3A8A */
    --navy-ink: 30 58 138;
    --band: 30 58 138;
    --green: 16 185 129;      /* 소프트 그린 #10B981 */
    --green-ink: 4 120 87;
    --warn: 180 83 9;
    --on-green: 6 42 30;
    --logo-filter: none;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: 11 17 31; --surface: 19 28 48; --sunk: 15 23 40; --ink: 229 233 242; --muted: 150 162 184;
      --line: 39 51 77; --primary: 62 96 198; --navy-ink: 152 176 240; --band: 22 37 84;
      --green: 16 185 129; --green-ink: 52 211 153; --warn: 251 191 36; --on-green: 6 42 30;
      --logo-filter: brightness(0) invert(.93);
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --bg: 11 17 31; --surface: 19 28 48; --sunk: 15 23 40; --ink: 229 233 242; --muted: 150 162 184;
    --line: 39 51 77; --primary: 62 96 198; --navy-ink: 152 176 240; --band: 22 37 84;
    --green: 16 185 129; --green-ink: 52 211 153; --warn: 251 191 36; --on-green: 6 42 30;
    --logo-filter: brightness(0) invert(.93);
    color-scheme: dark;
  }

  [hidden] { display: none !important; }
  .logo { filter: var(--logo-filter); }
  .zoom { cursor: zoom-in; }
  .lightbox { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
    background: rgb(8 12 24 / .9);
    padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .lb-scroll { max-width: 100%; max-height: 100%; overflow: auto; border-radius: 6px; }
  .lb-scroll img { display: block; width: 1100px; max-width: none; }
  @media (min-width: 1000px) { .lb-scroll img { width: auto; max-width: 100%; max-height: calc(100vh - 48px); } }
  .lb-close { position: absolute; top: max(12px, env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
    width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; background: rgb(255 255 255 / .14); color: #fff; }

  html { scroll-behavior: smooth; }
  body {
    background: rgb(var(--bg)); color: rgb(var(--ink));
    font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    font-size: 16px; line-height: 1.7; word-break: keep-all; overflow-x: hidden;
  }
  body::before {
    content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
    z-index: 60; background: rgb(var(--bg));
  }
  h1, h2, h3 { text-wrap: balance; font-family: "IBM Plex Sans KR", "Noto Sans KR", sans-serif; letter-spacing: -0.02em; }
  .wrap {
    max-width: 1200px; margin-inline: auto;
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
  }
  section[id] { scroll-margin-top: 76px; }
  .eyebrow { font-family: "IBM Plex Mono", "IBM Plex Sans KR", "Noto Sans KR", monospace; font-size: 12.5px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
  .num { font-variant-numeric: tabular-nums; }

  .site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; transition: box-shadow .25s, background-color .25s; }
  .site-header.is-scrolled { box-shadow: 0 1px 0 rgb(var(--line)), 0 8px 24px -16px rgb(var(--ink) / .25); }

  .btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-weight: 700; border-radius: 6px;
         padding: .85rem 1.25rem; white-space: nowrap; transition: transform .15s, background-color .15s, border-color .15s; line-height: 1.2; }
  .btn:active { transform: translateY(1px); }
  .btn-leaf { background: rgb(var(--green)); color: rgb(var(--on-green)); }
  .btn-leaf:hover { background: rgb(var(--green) / .88); }
  .btn-navy { background: rgb(var(--primary)); color: #fff; }
  .btn-navy:hover { background: rgb(var(--primary) / .9); }
  .btn-line { border: 1.5px solid rgb(var(--line)); color: rgb(var(--ink)); background: rgb(var(--surface)); }
  .btn-line:hover { border-color: rgb(var(--navy-ink)); }
  :focus-visible { outline: 2.5px solid rgb(var(--green)); outline-offset: 2px; border-radius: 4px; }

  /* 프로그램 화면 목업 */
  .win { background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: 8px; overflow: hidden;
         box-shadow: 0 30px 60px -30px rgb(var(--ink) / .35), 0 2px 6px -2px rgb(var(--ink) / .08); }
  .win-bar { background: rgb(var(--primary)); color: #fff; font-size: 12px; }
  .win th, .win td { white-space: nowrap; padding-right: 12px; }
  .win th:last-child, .win td:last-child { padding-right: 0; }
  .chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
  .chip-ok { background: rgb(var(--green) / .14); color: rgb(var(--green-ink)); }
  .chip-warn { background: rgb(var(--warn) / .14); color: rgb(var(--warn)); }
  .chip-navy { background: rgb(var(--navy-ink) / .12); color: rgb(var(--navy-ink)); }

  /* 들판 이랑 패턴: 히어로 배경에 깔리는 농지 고랑선 */
  .furrows { background-image: repeating-linear-gradient(-12deg, transparent 0 22px, rgb(var(--green) / .07) 22px 23px); }

  .float { animation: bob 6s ease-in-out infinite; }
  .float.d2 { animation-delay: -3s; }
  @keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }

  .reveal { transition: transform .7s cubic-bezier(.2,.7,.2,1), opacity .7s; }
  .reveal.pre { transform: translateY(22px); opacity: .5; }

  .tour-tab[aria-selected="true"] { background: rgb(var(--surface)); border-color: rgb(var(--line)); }
  .tour-tab[aria-selected="true"] .tab-mark { background: rgb(var(--green)); }
  .tour-tab[aria-selected="true"] .tab-desc { display: block; }

  details > summary { list-style: none; cursor: pointer; }
  details > summary::-webkit-details-marker { display: none; }
  details[open] .faq-plus { transform: rotate(45deg); }
  .faq-plus { transition: transform .2s; }

  .field { width: 100%; background: rgb(var(--surface)); border: 1.5px solid rgb(var(--line)); border-radius: 6px; padding: .7rem .85rem; color: rgb(var(--ink)); }
  .field:focus { outline: none; border-color: rgb(var(--green)); }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .float { animation: none; }
    .reveal, .reveal.pre { transition: none; transform: none; opacity: 1; }
  }

/* 단말기 앱 화면을 담는 기기 프레임 */
.phone { border: 10px solid #0f1626; border-radius: 34px; overflow: hidden; background: #0f1626;
         box-shadow: 0 40px 70px -35px rgb(var(--ink) / .45); }
.phone img { border-radius: 22px; }

/* 하위 페이지(support, payment)는 게시 스켈레톤 없이 열리므로 안전영역 여백을 직접 둠 */
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.nav-on { color: rgb(var(--ink)); }
.nav-on::after { content: ""; display: block; height: 2px; margin-top: 3px; border-radius: 2px; background: rgb(var(--green)); }

/* 휴대폰 하단 빠른 문의 바 */
.cbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; gap: 8px;
  padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  background: rgb(var(--surface) / .97); border-top: 1px solid rgb(var(--line)); box-shadow: 0 -8px 24px -18px rgb(var(--ink) / .35); }
.cbar a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border-radius: 8px;
  font-weight: 700; font-size: 15px; border: 1.5px solid rgb(var(--line)); color: rgb(var(--ink)); white-space: nowrap; }
.cbar .cbar-main { background: rgb(var(--green)); color: rgb(var(--on-green)); border-color: transparent; }
.cbar .cbar-kakao { background: #FEE500; color: #191600; border-color: transparent; }
@media (min-width: 1024px) { .cbar { display: none; } }
@media (max-width: 1023px) { body { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); } }

/* 1분 둘러보기 진행 막대 */
.tour-bar { display: none; height: 3px; margin-top: 10px; border-radius: 3px; background: rgb(var(--line)); overflow: hidden; }
.tour-tab[aria-selected="true"] .tour-bar { display: block; }
.tour-bar i { display: block; height: 100%; background: rgb(var(--green)); transform-origin: left; transform: scaleX(0); }
.tour-playing .tour-tab[aria-selected="true"] .tour-bar i { animation: tourfill 8s linear forwards; }
.tour-paused .tour-tab[aria-selected="true"] .tour-bar i { animation-play-state: paused; }
@keyframes tourfill { to { transform: scaleX(1); } }

/* 비교표 */
.vs th, .vs td { padding: 15px 18px; text-align: left; vertical-align: top; }
.vs tbody tr + tr { border-top: 1px solid rgb(var(--line)); }
.vs .us { background: rgb(var(--green) / .07); }

/* PC 화면 오른쪽 원격 지원 버튼 (팀뷰어는 Windows PC용이라 휴대폰에서는 숨김) */
.rfab { position: fixed; z-index: 44; right: max(18px, env(safe-area-inset-right, 0px)); bottom: max(24px, env(safe-area-inset-bottom, 0px));
  display: none; flex-direction: column; align-items: center; gap: 4px; width: 76px; padding: 12px 6px 10px; border-radius: 14px;
  background: rgb(var(--primary)); color: #fff; font-size: 12.5px; font-weight: 700; line-height: 1.25; text-align: center;
  box-shadow: 0 14px 30px -14px rgb(var(--ink) / .55); transition: transform .15s; }
.rfab:hover { transform: translateY(-2px); }
@media (min-width: 1024px) { .rfab { display: flex; } }

/* 홈페이지 팝업 (assets/popup.js) */
.wpop { padding: 0; border: 0; background: transparent; max-width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); width: 100%; color: rgb(var(--ink)); }
.wpop::backdrop { background: rgb(8 12 24 / .55); }
.wpop-card { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); background: rgb(var(--surface)); border-radius: 10px; overflow: hidden; box-shadow: 0 20px 50px rgb(8 12 24 / .35); }
.wpop-body { overflow-y: auto; }
.wpop-imglink { display: block; }
.wpop-img { display: block; width: 100%; height: auto; }
.wpop-text { padding: 20px 22px 22px; }
.wpop-text:only-child { padding-top: 26px; }
.wpop-count { font-size: 12.5px; color: rgb(var(--muted)); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.wpop-title { font-size: 19px; font-weight: 700; line-height: 1.4; }
.wpop-desc { margin-top: 8px; font-size: 15px; line-height: 1.65; color: rgb(var(--muted)); white-space: pre-wrap; overflow-wrap: anywhere; }
.wpop-cta { margin-top: 16px; padding: .7rem 1.1rem; font-size: 15px; }
.wpop-foot { display: flex; border-top: 1px solid rgb(var(--line)); background: rgb(var(--sunk)); font-size: 14px; }
.wpop-foot button { flex: 1; padding: 13px 10px; min-height: 48px; }
.wpop-today { color: rgb(var(--muted)); }
.wpop-close { font-weight: 700; border-left: 1px solid rgb(var(--line)); }
.wpop-foot button:hover { background: rgb(var(--line) / .5); }
