/* 이알매 홈 — 휴대폰 우선 */
:root {
  --blue: #0458C3; --navy: #002D9F; --teal: #05B5B9; --orange: #FEA61A; --star: #FEC32C;
  --bg: #f5f8fc; --card: #ffffff; --text: #16202c; --muted: #5f6b78; --line: #e1e7ef;
  --soft-blue: #e8f0fd; --soft-teal: #e6f7f7; --soft-orange: #fff3e0;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e141b; --card: #17202a; --text: #e8edf2; --muted: #9aa7b4; --line: #26323f;
    --soft-blue: #182a48; --soft-teal: #0f3132; --soft-orange: #3a2a12; --blue: #6b9bff;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 16px; line-height: 1.55; -webkit-text-size-adjust: 100%; padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--blue); text-decoration: none; }
h2 { font-size: 19px; margin: 28px 0 10px; }
.small { font-size: 13.5px; }
.muted { color: var(--muted); }

.splash { position: fixed; inset: 0; z-index: 50; background: #fff; display: grid; place-items: center; transition: opacity .35s; }
.splash img { width: min(78vw, 360px); }
.splash.out { opacity: 0; }

.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo img { display: block; height: 30px; width: auto; }
@media (prefers-color-scheme: dark) { .logo img, .hero .slogan { background: #fff; border-radius: 10px; padding: 4px 8px; } }
.chip { border: 0; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--navy)); }

main, .foot { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.hero { text-align: center; padding: 18px 0 4px; }
.hero .slogan { width: min(100%, 380px); height: auto; }
.lead { margin: 10px 4px 0; color: var(--muted); font-size: 15px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.status-card { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.status-card.ok { background: var(--soft-teal); border-color: transparent; }
.status-card.end { background: var(--soft-orange); border-color: transparent; }
.status-card .small { color: var(--muted); }

.group { font-size: 13px; color: var(--muted); font-weight: 700; margin: 16px 2px 8px; letter-spacing: .02em; }
.grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 520px) { .grid { grid-template-columns: 1fr 1fr; } }
.part { display: block; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(10, 30, 60, .04); transition: transform .1s; }
.part:active { transform: scale(.985); }
.part-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.part-top b { font-size: 18px; }
.blurb { margin-top: 4px; font-size: 14px; color: var(--muted); }
.meta { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge.trial { background: var(--soft-teal); color: #037f82; }
.badge.owned { background: var(--soft-blue); color: var(--blue); }
.badge.sample { background: var(--soft-orange); color: #b25e00; }
@media (prefers-color-scheme: dark) { .badge.trial { color: #5fd6d8; } .badge.sample { color: #ffc067; } }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 12px; text-align: center; }
.plan.best { border: 2px solid var(--blue); }
.plan .tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--orange); color: #fff;
  font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.plan-name { font-weight: 700; }
.plan-price { font-size: 24px; font-weight: 800; color: var(--blue); margin: 4px 0; }
.terms { padding-left: 18px; color: var(--muted); }
.btn { width: 100%; border: 0; border-radius: 14px; padding: 14px; font: inherit; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--navy)); }
.btn:disabled { background: var(--line); color: var(--muted); }

.install p { margin: 4px 0 10px; }
.test { margin-top: 24px; border: 2px dashed var(--orange); border-radius: 16px; padding: 4px 14px 14px; }
.test h2 { font-size: 15px; margin: 12px 0 4px; }
.test-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.test-btns button { font: inherit; font-size: 13px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); }

.foot { padding: 20px 16px 40px; text-align: center; color: var(--muted); }
.foot p { margin: 4px 0; }
.update { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20; max-width: 520px; margin: 0 auto;
  background: var(--navy); color: #fff; padding: 12px 14px; border-radius: 14px; display: flex; justify-content: space-between; align-items: center; }
.update[hidden] { display: none; }
.update button { border: 0; border-radius: 10px; padding: 7px 12px; font: inherit; font-weight: 700; background: #fff; color: var(--navy); }
