:root {
  --navy: #0b2947;
  --navy-deep: #061b31;
  --green: #19b67a;
  --green-dark: #0f8e5e;
  --mint: #eafaf4;
  --ink: #12263a;
  --muted: #6c7d8f;
  --line: #dce5ed;
  --soft: #f4f7fa;
  --danger: #bd3346;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: #f4f7fa; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 13% 10%, rgba(25, 182, 122, .10), transparent 25%),
    radial-gradient(circle at 86% 4%, rgba(41, 112, 180, .10), transparent 24%),
    linear-gradient(180deg, #f8fbfd 0%, #eef3f7 100%);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
button, input, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  padding: 13px clamp(18px, 4vw, 54px);
  gap: 16px;
  border-bottom: 1px solid rgba(11, 41, 71, .08);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
  color: #073a2a; background: linear-gradient(145deg, #62e8b7, #2bd390); font-weight: 950; font-size: 17px;
  box-shadow: 0 9px 22px rgba(25,182,122,.22);
}
.brand-text { display: grid; gap: 2px; }
.brand-text strong { color: var(--navy); font-size: 17px; letter-spacing: -.035em; }
.brand-text small { color: #8190a0; font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.header-actions { display: flex; align-items: center; gap: 13px; }
.header-downloads { display: flex; align-items: stretch; gap: 8px; }
.header-link {
  display: flex; align-items: center; gap: 9px; min-width: 146px; min-height: 50px; padding: 8px 11px;
  border: 1px solid #cbd8e3; border-radius: 12px; color: #29445f; background: #fff;
  text-decoration: none; box-shadow: 0 5px 14px rgba(18, 55, 86, .06); transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.header-link:hover { transform: translateY(-1px); border-color: #99b5ca; box-shadow: 0 9px 20px rgba(18, 55, 86, .10); }
.header-link > span:last-child { display: grid; gap: 1px; }
.header-link strong { color: inherit; font-size: 12px; font-weight: 950; letter-spacing: -.025em; }
.header-link small { color: #8190a0; font-size: 9px; font-weight: 750; }
.header-link-icon { display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 9px; color: #176287; background: #eaf4fb; font-size: 16px; font-weight: 950; }
.header-link-auto { color: #086c4b; border-color: #a8dec9; background: #f1fcf7; }
.header-link-auto .header-link-icon { color: #fff; background: linear-gradient(145deg, #20c985, #0f9663); }
.header-link-auto small { color: #4f8370; }
.header-link-android { color: #075f86; border-color: #b7ddeb; background: #f1faff; }
.header-link-android .header-link-icon { color: #fff; background: linear-gradient(145deg, #20b7d7, #0783b0); }
.header-link-android small { color: #548298; }
.support-phone { display: grid; padding-left: 13px; border-left: 1px solid var(--line); text-decoration: none; }
.support-phone span { color: #8391a0; font-size: 10px; font-weight: 750; }
.support-phone strong { color: var(--navy); font-size: 17px; letter-spacing: .01em; }
.portal-main { width: min(820px, calc(100% - 30px)); margin: 0 auto; padding: 46px 0 28px; }
.intro { text-align: center; }
.security-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #bce8d6;
  border-radius: 999px; color: #087552; background: var(--mint); font-size: 12px; font-weight: 900;
}
.security-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(25,182,122,.12); }
.intro h1 { margin: 18px 0 12px; color: var(--navy); font-size: clamp(31px, 5vw, 48px); line-height: 1.18; letter-spacing: -.06em; }
.intro h1 strong { color: var(--green-dark); }
.intro p { max-width: 660px; margin: 0 auto; color: var(--muted); font-size: 15px; line-height: 1.75; }
.connect-card {
  display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px 30px;
  margin-top: 30px; padding: 30px; border: 1px solid #d8e3ec; border-radius: 25px;
  background: rgba(255,255,255,.96); box-shadow: 0 24px 65px rgba(25, 54, 82, .13);
}
.code-panel { display: flex; min-height: 270px; flex-direction: column; justify-content: center; }
.card-label { margin: 0 0 15px; color: #4e6175; font-size: 13px; font-weight: 900; }
.code-slots { display: grid; grid-template-columns: repeat(6, minmax(36px, 1fr)); gap: 8px; }
.code-slots span {
  display: grid; place-items: center; height: 62px; border: 2px solid #d7e0e8; border-radius: 12px;
  color: var(--navy); background: #fbfcfd; font-size: 29px; font-weight: 950; transition: .15s ease;
}
.code-slots span.filled { border-color: #86d8b9; background: #f0fcf7; }
.code-slots span.active { border-color: var(--green); box-shadow: 0 0 0 4px rgba(25,182,122,.12); }
.hidden-code-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.code-message { min-height: 22px; margin: 15px 0 0; color: #758596; font-size: 12px; line-height: 1.6; }
.code-message.error { color: var(--danger); font-weight: 800; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; align-content: center; }
.keypad button {
  min-height: 58px; border: 1px solid #d4dee7; border-radius: 12px; color: #276348;
  background: linear-gradient(180deg, #fff, #f5f8fa); font-size: 21px; font-weight: 950; cursor: pointer;
  box-shadow: 0 4px 10px rgba(24,52,77,.06); transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.keypad button:hover { border-color: #8fcfb7; background: #f1fbf7; transform: translateY(-1px); }
.keypad button:active { transform: translateY(1px); }
.keypad .key-function { color: #5c6d7d; font-size: 12px; }
.keypad .key-back { color: #1d6588; font-size: 23px; }
.connect-button {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 11px;
  min-height: 58px; border: 0; border-radius: 14px; color: #fff;
  background: linear-gradient(135deg, #0f9663, #20c685); font-size: 17px; font-weight: 950; cursor: pointer;
  box-shadow: 0 14px 30px rgba(25,182,122,.24); transition: transform .15s ease, filter .15s ease;
}
.connect-button:hover { transform: translateY(-2px); filter: brightness(1.03); }
.connect-button:disabled { cursor: wait; opacity: .72; transform: none; }
.connect-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: rgba(255,255,255,.2); }
.launch-status {
  grid-column: 1 / -1; padding: 13px 15px; border: 1px solid #bce5d5; border-radius: 12px;
  color: #0b6b4b; background: #effbf6; font-size: 13px; font-weight: 800; text-align: center;
}
.launch-status.warning { color: #795100; border-color: #ecd28c; background: #fff9e8; }
.install-help {
  display: grid; gap: 15px; margin-top: 17px; padding: 20px 21px;
  border: 1px solid #dbe4ec; border-radius: 18px; background: rgba(255,255,255,.88);
  box-shadow: 0 10px 26px rgba(18, 55, 86, .06);
}
.install-copy strong { color: var(--navy); font-size: 15px; }
.install-copy p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.install-copy b { color: #274b6a; }
.install-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 9px; align-items: stretch; }
.install-button, .retry-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 9px 13px;
  border-radius: 12px; font-size: 12px; font-weight: 900; text-decoration: none; cursor: pointer;
}
.install-button { justify-content: flex-start; gap: 10px; border: 0; color: #fff; background: var(--navy); box-shadow: 0 8px 18px rgba(11, 41, 71, .14); }
.install-android { background: linear-gradient(135deg, #087fae, #18a8c8); }
.install-button > span:last-child { display: grid; gap: 2px; }
.install-button strong { color: inherit; font-size: 13px; }
.install-button small { color: rgba(255,255,255,.72); font-size: 9px; }
.install-action-icon { display: grid; place-items: center; flex: 0 0 auto; width: 31px; height: 31px; border-radius: 9px; background: rgba(255,255,255,.16); font-size: 17px; }
.install-auto { background: linear-gradient(135deg, #0f9663, #20c685); box-shadow: 0 8px 18px rgba(25, 182, 122, .19); }
.retry-button { border: 1px solid #cbd8e3; color: #29445f; background: #fff; white-space: nowrap; }
.install-button:hover, .retry-button:hover { transform: translateY(-1px); filter: brightness(1.02); }
.auto-connect-guide {
  display: flex; align-items: flex-start; gap: 13px; margin-top: 13px; padding: 16px 18px;
  border: 1px solid #bfe7d7; border-radius: 16px; color: #244b3d; background: linear-gradient(135deg, #effbf6, #f8fffc);
}
.auto-connect-badge { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; color: #fff; background: #0f9663; font-size: 10px; font-weight: 950; }
.auto-connect-guide strong { display: block; color: #0a5d43; font-size: 13px; line-height: 1.5; }
.auto-connect-guide p { margin: 4px 0 0; color: #648174; font-size: 11px; line-height: 1.55; }
.safe-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.safe-guide > div { display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid #dfe7ee; border-radius: 14px; background: rgba(255,255,255,.64); }
.safe-guide span { display: grid; place-items: center; flex: 0 0 auto; width: 29px; height: 29px; border-radius: 50%; color: #087552; background: #ddf7ed; font-size: 12px; font-weight: 950; }
.safe-guide p, .safe-guide strong, .safe-guide small { display: block; margin: 0; }
.safe-guide strong { color: #30475d; font-size: 12px; }
.safe-guide small { margin-top: 3px; color: #8795a4; font-size: 10px; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; padding: 22px 18px 30px; color: #82909e; font-size: 11px; }
@media (max-width: 860px) {
  .site-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 12px 15px; }
  .brand { grid-column: 1; grid-row: 1; }
  .header-actions { display: contents; }
  .header-downloads { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .support-phone { grid-column: 2; grid-row: 1; padding-left: 12px; }
  .header-link { min-width: 0; }
  .portal-main { padding-top: 32px; }
  .connect-card { grid-template-columns: 1fr; padding: 22px; }
  .code-panel { min-height: auto; }
  .keypad { grid-row: 2; }
  .install-actions { grid-template-columns: 1fr 1fr; }
  .retry-button { grid-column: 1 / -1; }
  .safe-guide { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .support-phone { padding-left: 0; border-left: 0; }
  .support-phone span { display: none; }
  .support-phone strong { font-size: 14px; }
  .brand-text small { display: none; }
}
@media (max-width: 430px) {
  .brand-text strong { font-size: 15px; }
  .brand-mark { width: 40px; height: 40px; }
  .intro h1 { font-size: 31px; }
  .code-slots { gap: 5px; }
  .code-slots span { height: 52px; font-size: 24px; }
  .header-downloads { gap: 6px; }
  .header-link { min-height: 46px; padding: 7px 8px; }
  .header-link small { display: none; }
  .header-link-icon { width: 25px; height: 25px; }
  .install-actions { grid-template-columns: 1fr; }
  .retry-button { grid-column: auto; }
  .auto-connect-guide { flex-direction: column; }
}
