:root {
  color-scheme: light;
  --navy: #071c2c;
  --navy-soft: #102f43;
  --gold: #c8a96b;
  --cream: #f8f5ef;
  --paper: #fffdf9;
  --ink: #102235;
  --muted: #59656e;
  --line: #d9d4ca;
  --teal: #399d93;
  --danger: #a0443d;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Pretendard", "Noto Sans KR", "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  word-break: normal;
  overflow-wrap: anywhere;
}

/* Web counterpart of LOCALIZATION_TYPOGRAPHY.md; keep copy unmodified. */
:lang(ko) { word-break: keep-all; }
:lang(ja), :lang(zh-Hans) { line-break: strict; }
h1, h2, h3 { text-wrap: balance; }
p, .steps li { text-wrap: pretty; }
html.feedback-open { overflow: hidden; }

a { color: inherit; }

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(200, 169, 107, .72);
}

.wordmark {
  font-size: 24px;
  font-weight: 720;
  letter-spacing: -.04em;
  text-decoration: none;
}

.wordmark span { color: #8c6a2f; font-weight: 560; }

.language-switcher {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
}

.language-switcher button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.language-switcher button[aria-pressed="true"] {
  background: var(--navy);
  color: white;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: 64px;
  padding: 84px 0 72px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: #76591f;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: .2em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 22px;
  font-size: clamp(42px, 5vw, 70px);
  line-height: 1.12;
  letter-spacing: -.055em;
  font-weight: 480;
}

.lead {
  max-width: 620px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.button {
  appearance: none;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 24px;
  border: 1px solid var(--navy);
  border-radius: 4px;
  background: var(--navy);
  color: white;
  text-decoration: none;
  font: inherit;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.button:hover { transform: translateY(-2px); }
.button.secondary { background: transparent; color: var(--navy); }
.button.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }

.device-card {
  min-height: 430px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--navy);
  border-radius: 4px;
  box-shadow: 0 22px 70px rgba(7, 28, 44, .18);
}

.device-card::before,
.device-card::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(200, 169, 107, .26);
  border-radius: 50%;
}

.device-card::before { right: -110px; top: -190px; }
.device-card::after { left: -180px; bottom: -230px; }
.device-card img { filter: drop-shadow(0 18px 24px rgba(0,0,0,.2)); }
.device-card .intro-mark {
  width: 118px;
  max-height: 326px;
  position: relative;
  z-index: 1;
}

.device-caption {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  letter-spacing: .08em;
}

.band {
  padding: 70px 0;
  background: var(--navy);
  color: white;
}

.band .eyebrow { color: var(--gold); }

.section-heading {
  max-width: 700px;
  margin-bottom: 38px;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.2;
  letter-spacing: -.04em;
  font-weight: 520;
}

.band .section-heading p { color: rgba(255,255,255,.72); }

.scope-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,255,255,.18);
  border-left: 1px solid rgba(255,255,255,.18);
}

.scope-item {
  min-height: 164px;
  padding: 26px;
  border-right: 1px solid rgba(255,255,255,.18);
  border-bottom: 1px solid rgba(255,255,255,.18);
}

.scope-item strong { display: block; margin-bottom: 8px; font-size: 18px; }
.scope-item p { margin: 0; color: rgba(255,255,255,.62); font-size: 14px; }
.scope-item .status { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.scope-privacy { margin: 22px 0 0; color: rgba(255,255,255,.72); font-size: 14px; }
.scope-privacy a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.status-dot.pending { background: var(--gold); }

.install-section { padding: 82px 0; }
.install-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.install-card {
  padding: 34px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.platform {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.platform h3 { margin: 0; font-size: 28px; font-weight: 600; }
.build-badge { padding: 5px 9px; background: #eee8dc; color: #70572b; font-size: 11px; font-weight: 700; }

.steps { margin: 0 0 28px; padding: 0; list-style: none; counter-reset: install-step; }
.steps li { position: relative; min-height: 54px; padding: 0 0 22px 44px; color: var(--muted); }
.steps li::before { counter-increment: install-step; content: counter(install-step); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: #937235; font-size: 12px; font-weight: 750; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 28px; bottom: 0; width: 1px; background: var(--line); }
.steps strong { color: var(--ink); }
.install-actions { display: grid; gap: 10px; }

.notice {
  margin-top: 22px;
  padding: 18px 20px;
  border-left: 3px solid var(--gold);
  background: #f1ece3;
  color: #615d56;
  font-size: 13px;
}

.check-section { padding: 24px 0 84px; }
.check-section .section-heading p { color: var(--muted); }
.checklist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.checklist article { padding: 26px; background: var(--paper); }
.checklist h3 { margin-bottom: 7px; font-size: 17px; }
.checklist p { margin: 0; color: var(--muted); font-size: 14px; }

.feedback-dialog {
  --feedback-gutter: 28px;
  width: min(620px, calc(100% - 28px));
  max-width: calc(100% - 28px);
  height: min(820px, calc(var(--feedback-viewport-height, 100dvh) - 24px));
  max-height: calc(var(--feedback-viewport-height, 100dvh) - 24px);
  top: calc(var(--feedback-viewport-top, 0px) + var(--feedback-viewport-height, 100dvh) / 2);
  bottom: auto;
  transform: translateY(-50%);
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(7, 28, 44, .3);
}

.feedback-dialog::backdrop { background: rgba(4, 20, 31, .7); backdrop-filter: blur(3px); }
.feedback-form { height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.feedback-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px var(--feedback-gutter) 20px; border-bottom: 1px solid var(--line); background: var(--paper); }
.feedback-heading > div { min-width: 0; }
.feedback-heading .eyebrow { margin-bottom: 8px; }
.feedback-heading h2 { margin-bottom: 0; font-size: clamp(24px, 5vw, 30px); }
#feedback-title:focus { outline: none; }
.feedback-body { min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; padding: 22px var(--feedback-gutter); scroll-padding-block: 16px; }
.dialog-close { width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; }
.feedback-intro { margin: 0 0 26px; color: var(--muted); }
.feedback-categories { margin: 0 0 22px; padding: 0; border: 0; }
.feedback-categories legend, .feedback-field > span { margin-bottom: 10px; color: #76591f; font-size: 12px; font-weight: 720; letter-spacing: .08em; }
.feedback-categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7em), 1fr)); gap: 8px; }
.feedback-categories legend { grid-column: 1 / -1; }
.feedback-categories label { position: relative; min-height: 48px; padding: 8px; display: grid; place-items: center; border: 1px solid var(--line); cursor: pointer; white-space: nowrap; }
.feedback-categories label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.feedback-categories input { position: absolute; opacity: 0; pointer-events: none; }
.feedback-categories label:has(input:checked) { border-color: var(--gold); background: var(--navy); color: white; }
.feedback-field { display: grid; margin-bottom: 18px; }
.feedback-field textarea, .feedback-field input { width: 100%; border: 1px solid var(--line); border-radius: 2px; background: white; color: var(--ink); font: inherit; font-size: 16px; }
.feedback-field textarea { min-height: 150px; padding: 14px 16px; resize: vertical; }
.feedback-field input { min-height: 52px; padding: 0 16px; }
.feedback-field textarea:focus, .feedback-field input:focus { outline: 2px solid rgba(200, 169, 107, .35); border-color: var(--gold); }
.feedback-status { min-height: 24px; margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.feedback-status[data-state="success"] { color: #25796f; }
.feedback-status[data-state="pending"], .feedback-status[data-state="error"] { color: var(--danger); }
.feedback-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5em), 1fr)); gap: 10px; padding: 16px var(--feedback-gutter) max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.feedback-actions .button { padding: 10px 12px; line-height: 1.4; }

footer { padding: 30px 0 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-links { display: flex; gap: 18px; }

.simple-page { padding-bottom: 80px; }
.simple-hero { max-width: 760px; padding: 80px 0 36px; }
.simple-hero h1 { font-size: clamp(38px, 5vw, 58px); }
.prose { max-width: 760px; }
.prose section { padding: 26px 0; border-top: 1px solid var(--line); }
.prose h2 { font-size: 22px; }
.prose p, .prose li { color: var(--muted); }

.js-only { visibility: hidden; }
.js-ready .js-only { visibility: visible; }

@media (max-width: 820px) {
  .shell { width: min(100% - 32px, 680px); }
  .topbar { min-height: 70px; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 56px 0 50px; }
  h1 { font-size: clamp(32px, 8.5vw, 43px); }
  .lead { font-size: 16px; }
  .device-card { min-height: 350px; }
  .device-card .intro-mark { width: 98px; max-height: 278px; }
  .scope-grid { grid-template-columns: 1fr; }
  .scope-item { min-height: auto; }
  .install-grid, .checklist { grid-template-columns: 1fr; }
  .install-section { padding: 60px 0; }
  .install-card { padding: 26px 22px; }
  .footer-row { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
  .shell { width: calc(100% - 28px); }
  .language-switcher button { padding: 6px 8px; }
  .wordmark { font-size: 21px; }
  .hero-actions .button { width: 100%; }
  .device-card { min-height: 320px; }
  .feedback-dialog { --feedback-gutter: 20px; }
  .install-actions .button { padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
