:root {
  color-scheme: light;
  --canvas: #f5f7fa;
  --surface: #ffffff;
  --surface-subtle: #f9fafb;
  --control: #eef2f6;
  --text: #172033;
  --text-secondary: #4c5a6d;
  --text-muted: #667085;
  --border: rgb(23 32 51 / 12%);
  --border-strong: rgb(23 32 51 / 22%);
  --accent: #315e9e;
  --accent-hover: #274d83;
  --accent-contrast: #ffffff;
  --accent-soft: #eaf0f8;
  --success: #287a52;
  --success-soft: #edf8f2;
  --warning: #8a5a12;
  --warning-soft: #fff8e8;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --media-overlay: rgb(16 19 24 / 88%);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgb(49 94 158 / 18%);
}

a,
button,
input,
select {
  font: inherit;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

button,
select {
  cursor: pointer;
}

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

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.site-header,
main,
footer {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 13px;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-link {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
  transition: color 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.header-link:hover {
  color: var(--accent);
}

.header-inquiry {
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 13px;
  font-weight: 600;
}

.header-inquiry:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.8fr);
  align-items: center;
  gap: 64px;
  padding: 72px 0 64px;
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.eyebrow span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(36px, 4.2vw, 52px);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: -0.045em;
}

h1 em {
  color: var(--accent);
  font-style: normal;
}

.intro {
  max-width: 680px;
  margin-bottom: 28px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}

.hero-actions,
.catalog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.primary-action,
.secondary-action,
.download-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition:
    background-color 140ms cubic-bezier(0.23, 1, 0.32, 1),
    border-color 140ms cubic-bezier(0.23, 1, 0.32, 1),
    color 140ms cubic-bezier(0.23, 1, 0.32, 1),
    transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.primary-action,
.download-link {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
}

.primary-action:hover,
.download-link:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.secondary-action {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-secondary);
}

.secondary-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.primary-action:active,
.secondary-action:active,
.download-link:active {
  transform: scale(0.98);
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.availability i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.route-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.catalog-console {
  padding: 24px;
}

.route-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 550;
}

.path-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 12px;
  font-weight: 650;
}

.path-state::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.console-title {
  padding: 24px 0 16px;
}

.console-title h2 {
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.console-title p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.progress-stack {
  display: grid;
}

.progress-stack > div {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border-top: 1px solid var(--border);
}

.progress-stack span {
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.progress-stack p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.progress-stack strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.progress-stack b {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--control);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.progress-stack .safe-step b {
  background: var(--success-soft);
  color: var(--success);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--border);
}

.trust-strip div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 16px;
  border-right: 1px solid var(--border);
}

.trust-strip div:last-child {
  border-right: 0;
}

.trust-strip strong {
  color: var(--accent);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.trust-strip span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 550;
}

.experience {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 64px;
  padding: 80px 0 0;
}

.experience-copy {
  max-width: 480px;
}

.experience-copy .eyebrow {
  margin-bottom: 8px;
}

.experience-copy h2 {
  margin-bottom: 16px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.experience-copy > p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.experience-list {
  border-top: 1px solid var(--border-strong);
}

.experience-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.experience-item > span {
  padding-top: 2px;
  color: var(--accent);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.experience-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 650;
}

.experience-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.programs {
  scroll-margin-top: 32px;
  padding: 80px 0 48px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading .eyebrow {
  margin-bottom: 8px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.section-heading > p {
  margin-bottom: 3px;
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.app-list,
.install-index-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
}

.app-card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.catalog-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  min-height: 260px;
}

.catalog-number {
  padding-top: 3px;
  color: var(--accent);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.catalog-copy {
  display: flex;
  min-width: 0;
  min-height: 202px;
  flex-direction: column;
}

.app-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
}

.catalog-copy h3,
.install-index-card h2 {
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.app-description,
.empty-message {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
}

.program-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.program-flow i {
  color: var(--border-strong);
  font-style: normal;
}

.catalog-actions {
  margin-top: auto;
  padding-top: 24px;
}

.app-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 11px;
  font-weight: 650;
}

.app-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.app-status.prototype-status {
  background: var(--accent-soft);
  color: var(--accent);
}

.prototype-notice,
.availability-notice {
  margin: 28px 0 0;
  padding: 16px;
  border: 1px solid rgb(49 94 158 / 20%);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 550;
  line-height: 1.65;
}

.notice {
  display: flex;
  align-items: start;
  gap: 12px;
  margin: 0 0 80px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.notice-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--control);
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 700;
}

.notice strong {
  font-size: 13px;
  font-weight: 650;
}

.notice p {
  max-width: 820px;
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.route-hero {
  padding: 64px 0 40px;
}

.compact-route-hero {
  max-width: 760px;
  padding-bottom: 32px;
}

.route-hero h1 {
  max-width: 840px;
  margin-bottom: 16px;
  font-size: clamp(32px, 4vw, 44px);
}

.route-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.route-title-row .intro {
  margin-bottom: 24px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 550;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.detail-shell {
  padding-bottom: 80px;
}

.workflow-demo {
  position: relative;
  margin: 0 0 28px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.demo-label {
  position: absolute;
  z-index: 1;
  top: 20px;
  left: 20px;
  max-width: calc(100% - 40px);
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--media-overlay);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
}

.workflow-image {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.workflow-caption {
  margin: 10px 4px 2px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.info-card {
  padding: 20px 0 0;
  border-top: 1px solid var(--border-strong);
}

.info-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 650;
}

.info-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.warning {
  margin: 18px 0 0;
  color: var(--warning);
  font-size: 12px;
  line-height: 1.65;
}

.route-warning {
  margin-top: 28px;
  padding: 16px;
  border: 1px solid rgb(138 90 18 / 20%);
  border-radius: 8px;
  background: var(--warning-soft);
}

.install-index-list {
  padding-bottom: 80px;
}

.install-index-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.install-index-card .primary-action {
  align-self: start;
}

.install-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(380px, 1fr);
  align-items: start;
  gap: 56px;
  padding-bottom: 80px;
}

.install-guide {
  display: grid;
}

.install-guide h2 {
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.install-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 2px 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.install-step > span {
  grid-row: 1 / 3;
  color: var(--accent);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.install-step strong {
  font-size: 13px;
  font-weight: 650;
}

.install-step p {
  margin: 3px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.install-card {
  padding: 28px;
  border-color: var(--border-strong);
}

.install-card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.install-card-heading .brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
}

.install-card-heading .app-kicker {
  margin-bottom: 1px;
}

.install-card-heading h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
}

.access-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.access-copy {
  align-self: center;
}

.access-copy strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
  font-weight: 650;
}

.access-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.field-label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.field-control {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  outline: 0;
  background: var(--control);
  color: var(--text);
  transition:
    background-color 140ms cubic-bezier(0.23, 1, 0.32, 1),
    border-color 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.field-control:hover {
  border-color: var(--accent);
}

.field-control:focus-visible {
  border-color: var(--accent);
  background: var(--surface);
  outline: 3px solid rgb(49 94 158 / 18%);
  outline-offset: 1px;
}

.download-link {
  min-height: 40px;
}

.download-link:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.form-status {
  grid-column: 2 / -1;
  min-height: 18px;
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.form-status[data-state="busy"] {
  color: var(--accent);
}

.form-status[data-state="success"] {
  color: var(--success);
}

.form-status[data-state="error"],
.form-status[data-state="blocked"] {
  color: var(--danger);
}

.install-card .access-panel {
  grid-template-columns: 1fr;
  padding: 0;
  border: 0;
  background: transparent;
}

.install-card .form-status {
  grid-column: auto;
}

.full-action {
  width: 100%;
  margin-top: 20px;
}

.missing-route {
  min-height: 520px;
}

.route-error,
.noscript {
  margin: 64px auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.primary-action:focus-visible,
.secondary-action:focus-visible,
.download-link:focus-visible,
.header-link:focus-visible,
.brand:focus-visible,
.breadcrumb a:focus-visible {
  outline: 3px solid rgb(49 94 158 / 25%);
  outline-offset: 3px;
}

.header-inquiry:focus-visible,
.icon-button:focus-visible,
.text-button:focus-visible,
.choice-option:focus-visible,
.file-action:focus-within,
.composer textarea:focus-visible,
.inquiry-form input:focus-visible,
.check-row input:focus-visible {
  outline: 3px solid rgb(49 94 158 / 25%);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.inquiry-dialog {
  width: min(760px, calc(100% - 32px));
  max-width: none;
  height: min(840px, calc(100dvh - 32px));
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 18px 50px rgb(23 32 51 / 18%);
}

.inquiry-dialog::backdrop {
  background: rgb(23 32 51 / 48%);
}

.inquiry-shell {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.inquiry-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.inquiry-header h2 {
  margin: 4px 0 0;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.inquiry-header > div:first-child {
  min-width: 0;
}

.inquiry-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
}

.inquiry-auth {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 32px 24px;
  overflow-y: auto;
}

.inquiry-intro {
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.inquiry-intro p,
.privacy-details p,
.form-help,
.completion-panel p {
  margin: 6px 0 0;
  color: var(--text-secondary);
}

.inquiry-form {
  display: grid;
  gap: 12px;
}

.inquiry-form .full-action {
  margin-top: 4px;
}

.privacy-details {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: 12px;
}

.privacy-details summary {
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text-secondary);
  font-size: 12px;
}

.check-row input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.text-button {
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.verification-code {
  max-width: 220px;
  font-size: 20px;
  letter-spacing: 0.28em;
  text-align: center;
}

.inquiry-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  pointer-events: none;
  white-space: nowrap;
}

.inquiry-chat {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.inquiry-chat[hidden],
.inquiry-auth[hidden] {
  display: none;
}

.chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}

.chat-toolbar > div:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  font-size: 11px;
}

.chat-toolbar strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.message-list {
  display: flex;
  min-height: 180px;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding: 22px 24px;
  overflow-y: auto;
  background: var(--canvas);
}

.chat-message {
  width: fit-content;
  max-width: min(86%, 620px);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.chat-message.user {
  align-self: flex-end;
  border-color: rgb(49 94 158 / 25%);
  background: var(--accent-soft);
}

.chat-message > strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 11px;
}

.markdown-body > :first-child {
  margin-top: 0;
}

.markdown-body > :last-child {
  margin-bottom: 0;
}

.markdown-body p {
  margin: 0;
}

.markdown-body p + p,
.markdown-body p + ul,
.markdown-body p + ol,
.markdown-body ul + p,
.markdown-body ol + p,
.markdown-body blockquote + p {
  margin-top: 9px;
}

.markdown-body ul,
.markdown-body ol {
  margin: 8px 0;
  padding-left: 22px;
}

.markdown-body li + li {
  margin-top: 4px;
}

.markdown-body strong {
  color: inherit;
  font-size: inherit;
}

.markdown-body h3,
.markdown-body h4,
.markdown-body h5 {
  margin: 12px 0 6px;
  color: var(--text-primary);
  font-size: 13px;
}

.markdown-body code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--canvas);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
}

.markdown-body pre {
  max-width: 100%;
  margin: 8px 0;
  padding: 10px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--canvas);
  white-space: pre-wrap;
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
}

.markdown-body blockquote {
  margin: 8px 0;
  padding-left: 10px;
  border-left: 3px solid var(--border-strong);
  color: var(--text-secondary);
}

.markdown-body a {
  color: var(--accent);
  text-underline-offset: 2px;
}

.chat-message.pending .message-body:empty::after {
  content: "답변을 정리하고 있습니다…";
  color: var(--text-muted);
}

.choice-list,
.completion-panel {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.choice-card > strong {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
}

.choice-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.choice-option {
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--text);
  text-align: left;
}

.choice-option:hover {
  border-color: var(--accent);
}

.choice-option strong,
.choice-option span {
  display: block;
}

.choice-option span {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 11px;
}

.completion-panel {
  background: var(--success-soft);
}

.completion-panel .check-row {
  margin: 12px 0;
}

.spec-preview {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgb(40 122 82 / 20%);
  border-radius: 6px;
  background: var(--surface);
}

.spec-preview summary {
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.spec-preview .markdown-body {
  max-height: 240px;
  margin: 12px 0 0;
  overflow: auto;
  color: var(--text-secondary);
  font-size: 12px;
}

.composer {
  padding: 14px 24px 10px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.composer textarea {
  width: 100%;
  min-height: 72px;
  max-height: 180px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--text);
  font: inherit;
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.composer-actions > span {
  flex: 1;
  color: var(--text-muted);
  font-size: 11px;
}

.file-action {
  min-height: 36px;
  cursor: pointer;
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.attachment-list:empty {
  display: none;
}

.attachment-chip {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--control);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
}

.chat-status {
  min-height: 28px;
  margin: 0;
  padding: 5px 24px 8px;
  background: var(--surface);
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

footer p {
  margin: 0;
  text-align: right;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 56px;
  }

  .hero-visual {
    width: min(600px, 100%);
  }

  .experience {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .experience-copy {
    max-width: 680px;
  }

  .access-panel {
    grid-template-columns: 1fr 1fr;
  }

  .access-copy,
  .form-status {
    grid-column: 1 / -1;
  }

  .install-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .install-card {
    width: min(620px, 100%);
  }
}

@media (max-width: 720px) {
  .site-header,
  main,
  footer {
    width: min(100% - 32px, 1120px);
  }

  .trust-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-strip div:nth-child(2) {
    border-right: 0;
  }

  .trust-strip div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .route-title-row {
    flex-direction: column;
  }

  .route-title-row .app-status {
    order: -1;
  }
}

@media (max-width: 520px) {
  .site-header {
    min-height: 60px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }

  .site-nav {
    gap: 10px;
  }

  .site-nav .header-link {
    display: none;
  }

  .inquiry-dialog {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .inquiry-header,
  .message-list,
  .choice-list,
  .completion-panel {
    padding-inline: 16px;
  }

  .chat-toolbar,
  .composer,
  .chat-status {
    padding-inline: 16px;
  }

  .choice-options {
    grid-template-columns: 1fr;
  }

  .chat-message {
    max-width: 94%;
  }

  .composer-actions {
    flex-wrap: wrap;
  }

  .composer-actions > span {
    order: 3;
    width: 100%;
    flex-basis: 100%;
  }

  .hero {
    padding: 44px 0 48px;
  }

  h1,
  .route-hero h1 {
    font-size: 32px;
  }

  .hero-actions,
  .section-heading,
  footer {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .primary-action,
  .hero-actions .secondary-action,
  .catalog-actions,
  .catalog-actions a,
  .install-index-card .primary-action {
    width: 100%;
  }

  .availability {
    justify-content: center;
    min-height: 32px;
  }

  .catalog-console,
  .app-card,
  .install-card {
    padding: 20px;
  }

  .progress-stack > div {
    grid-template-columns: 24px 1fr auto;
  }

  .trust-strip {
    grid-template-columns: 1fr;
  }

  .trust-strip div,
  .trust-strip div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .trust-strip div:last-child {
    border-bottom: 0;
  }

  .programs {
    padding-top: 56px;
  }

  .experience {
    padding-top: 56px;
  }

  .catalog-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .catalog-copy {
    min-height: 0;
  }

  .catalog-card > .app-status {
    grid-row: 1;
    justify-self: start;
  }

  .access-panel {
    grid-template-columns: 1fr;
  }

  .access-copy,
  .form-status {
    grid-column: auto;
  }

  .download-link {
    width: 100%;
  }

  .demo-label {
    top: 14px;
    left: 14px;
    max-width: calc(100% - 28px);
    font-size: 10px;
  }

  footer p {
    text-align: left;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
