:root {
  color-scheme: light;
  --background: #f5f5f7;
  --surface: #ffffff;
  --surface-muted: #f2f2f7;
  --text-primary: #1c1c1e;
  --text-secondary: #6b7280;
  --accent: #0071e3;
  --border: #e2e3e8;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-sans: 'SF Pro Display', 'SF Pro Text', 'Pretendard', 'Inter', 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--text-primary);
}

body {
  display: flex;
  justify-content: center;
}

.page {
  width: min(1040px, 100%);
  padding: 48px 32px 72px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.branding h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
}

.branding p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.language-selector {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.language-selector select {
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
}

.search-bar {
  position: sticky;
  top: 20px;
  z-index: 2;
  margin-bottom: 32px;
}

.search-bar input {
  width: 100%;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 1rem;
  color: var(--text-primary);
}

.search-bar input::placeholder {
  color: var(--text-secondary);
}

.extension-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.extension-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.card-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  text-decoration: none;
  padding: 24px;
  color: inherit;
  height: 100%;
}

.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 22%;
  background: var(--surface-muted);
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.card-summary {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.extension-list .empty {
  margin: 0;
  padding: 32px;
  text-align: center;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.view-detail.is-active,
.view-download.is-active {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.back-button {
  align-self: flex-start;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

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

.extension-detail,
.download-detail {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-header {
  display: flex;
  gap: 24px;
  align-items: center;
}

.detail-icon {
  width: 92px;
  height: 92px;
  border-radius: 28%;
  background: var(--surface-muted);
}

.detail-heading h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.detail-summary {
  margin: 10px 0 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.detail-meta {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
}

.detail-description {
  margin: 0;
  line-height: 1.7;
  color: var(--text-primary);
}

.download-heading {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.feature-list {
  margin: 0;
  padding: 0 0 0 18px;
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: none;
  padding: 14px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.download-button.primary {
  background: var(--accent);
  color: #ffffff;
}

.download-button.primary:hover {
  background: #005ecb;
}

.download-intro {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.download-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
  color: var(--text-primary);
  line-height: 1.6;
}

.download-notice {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.download-tip {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.site-footer {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .page {
    padding: 40px 24px 64px;
  }

  .detail-header {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .card-icon {
    width: 56px;
    height: 56px;
  }

  .detail-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .download-detail,
  .extension-detail {
    padding: 28px;
  }
}

@media (max-width: 480px) {
  .card-link {
    padding: 20px;
  }

  .detail-header,
  .download-detail header {
    align-items: center;
    text-align: center;
  }

  .detail-header {
    flex-direction: column;
  }

  .detail-heading,
  .download-detail .detail-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}
