:root {
  color-scheme: light;
  --ink: #1b1a16;
  --muted: #857f72;
  --line-strong: #cac4b6;
  --surface: #fffdf8;
  --canvas: #e9e5da;
  --accent: #1f4b3f;
  --accent-hover: #16382e;
  --accent-ink: #f6f4ea;
  --accent-tint: #ecf1ed;
  --focus: #2f6d59;
  --danger: #8c2f22;
  --danger-bg: #fdf4f1;
  --danger-line: #e0bcb1;
  --radius: 6px;
  --shadow-panel: 0 18px 44px -26px rgba(27, 26, 22, 0.5);
  --font-ui: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

.page {
  width: min(520px, 100%);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}

.brand {
  padding: 28px 32px 24px;
  color: var(--accent-ink);
  background: var(--accent);
}

.vendor {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 244, 234, 0.62);
}

.wordmark {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lede {
  margin: 10px 0 0;
  color: rgba(246, 244, 234, 0.78);
  font-size: 14px;
  font-weight: 500;
}

.panel {
  display: flex;
  flex-direction: column;
  min-height: 288px;
  padding: 28px 32px 32px;
  background: var(--surface);
}

.panel[hidden] {
  display: none;
}

.folder-row {
  display: grid;
  flex: 1;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.folder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 0;
  height: 100%;
  padding: 24px 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 110ms ease, border-color 110ms ease;
}

.folder:hover {
  background: var(--accent-tint);
  border-color: var(--accent);
}

.folder:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.folder-icon {
  width: 56px;
  height: 56px;
  fill: currentColor;
}

.back {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 32px;
  margin: 0 0 18px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.back:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.back:disabled {
  pointer-events: none;
  background: var(--line-strong);
  border-color: var(--muted);
  color: var(--muted);
  cursor: not-allowed;
}

.back:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.environment-label {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.version-row {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0;
  white-space: nowrap;
}

.version-label {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.version {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  margin-top: 22px;
  padding: 11px 16px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 700;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: background 110ms ease, border-color 110ms ease, color 110ms ease;
}

.download:hover:not(.is-busy):not(.is-disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.download:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.download.is-disabled,
.download.is-busy {
  pointer-events: none;
}

.download.is-disabled {
  opacity: 0.4;
}

.download.is-busy {
  background: var(--line-strong);
  border-color: var(--muted);
  color: var(--muted);
}

.spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(246, 244, 234, 0.32);
  border-top-color: var(--accent-ink);
  border-radius: 50%;
  flex-shrink: 0;
  animation: spin 0.75s linear infinite;
}

.download.is-busy .spinner {
  border-color: rgba(133, 127, 114, 0.28);
  border-top-color: var(--muted);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.status {
  margin: 14px 0 0;
  padding: 11px 13px;
  border: 1px solid var(--danger-line);
  border-left: 3px solid var(--danger);
  border-radius: 0 4px 4px 0;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
}

@media (max-width: 560px) {
  body {
    padding: 18px 14px;
  }

  .brand,
  .panel {
    padding-right: 22px;
    padding-left: 22px;
  }

  .wordmark {
    font-size: 26px;
  }
}
