/* Download page — extends shared tokens & components (css/tokens.css, components.css) */

.tv-dl-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--tv-border);
  padding-block: var(--tv-space-16) var(--tv-space-20);
}

@media (min-width: 1024px) {
  .tv-dl-hero {
    padding-block: var(--tv-space-20) var(--tv-space-28);
  }
}

.tv-dl-hero__grid {
  position: relative;
  display: grid;
  gap: var(--tv-space-12);
  align-items: center;
}

@media (min-width: 1024px) {
  .tv-dl-hero__grid {
    grid-template-columns: 1.02fr 0.98fr;
    gap: var(--tv-space-16);
  }
}

.tv-dl-hero__title {
  font-family: var(--tv-font-sans);
  font-size: var(--tv-display);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.04em;
  margin: 0;
}

.tv-dl-hero__title em {
  font-family: inherit;
  font-style: normal;
  font-weight: inherit;
  background: var(--tv-primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tv-dl-status {
  display: inline-flex;
  align-items: center;
  gap: var(--tv-space-2);
  margin-bottom: var(--tv-space-5);
  padding: var(--tv-space-2) var(--tv-space-4);
  border-radius: var(--tv-radius-full);
  border: 1px solid var(--tv-border);
  background: color-mix(in srgb, var(--tv-bg-elevated) 88%, transparent);
  font-size: var(--tv-text-xs);
  font-weight: 600;
  color: var(--tv-text-muted);
}

.tv-dl-status__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 22%, transparent);
}

/* Device showcase */
.tv-dl-showcase {
  position: relative;
  min-height: 22rem;
  border: 1px solid var(--tv-border-strong);
  border-radius: var(--tv-radius-xl);
  background: var(--tv-bg-elevated);
  box-shadow: var(--tv-shadow);
  padding: var(--tv-space-6);
  overflow: hidden;
}

@media (min-width: 640px) {
  .tv-dl-showcase {
    min-height: 26rem;
  }
}

.tv-dl-showcase::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -15%;
  width: 14rem;
  height: 14rem;
  border-radius: 50%;
  background: var(--tv-hero-glow);
  filter: blur(2px);
  pointer-events: none;
}

.tv-dl-browser {
  position: relative;
  border-radius: var(--tv-radius-lg);
  border: 1px solid var(--tv-mock-chrome-border);
  background: var(--tv-mock-chrome-bg);
  color: var(--tv-mock-chrome-fg);
  padding: var(--tv-space-4);
  box-shadow: var(--tv-glass-shadow-lg);
}

.tv-dl-browser__dots {
  display: flex;
  gap: var(--tv-space-2);
  margin-bottom: var(--tv-space-4);
  padding-bottom: var(--tv-space-3);
  border-bottom: 1px solid var(--tv-mock-chrome-border);
}

.tv-dl-browser__dots span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tv-mock-chrome-fg) 28%, transparent);
}

[data-theme="light"] .tv-dl-browser__dots span:nth-child(1) {
  background: #ff5f57;
}

[data-theme="light"] .tv-dl-browser__dots span:nth-child(2) {
  background: #febc2e;
}

[data-theme="light"] .tv-dl-browser__dots span:nth-child(3) {
  background: #28c840;
}

.tv-dl-mock-panel {
  border: 1px solid var(--tv-mock-panel-border);
  border-radius: var(--tv-radius);
  background: var(--tv-mock-panel-bg);
  padding: var(--tv-space-4);
  margin-bottom: var(--tv-space-3);
  font-size: var(--tv-text-xs);
  font-weight: 600;
  color: var(--tv-mock-chrome-fg);
  line-height: 1.4;
}

.tv-dl-mock-panel:last-child {
  margin-bottom: 0;
}

.tv-dl-mock-row {
  height: 0.45rem;
  border-radius: var(--tv-radius-full);
  background: var(--tv-mock-row-bg);
  margin-top: var(--tv-space-3);
}

.tv-dl-mock-row--mid {
  width: 78%;
}

.tv-dl-mock-row--short {
  width: 56%;
}

.tv-dl-phone {
  position: absolute;
  right: var(--tv-space-6);
  bottom: var(--tv-space-6);
  width: 9.5rem;
  height: 18rem;
  border-radius: 1.75rem;
  background: var(--tv-mock-chrome-bg);
  padding: 0.45rem;
  border: 1px solid var(--tv-mock-chrome-border);
  box-shadow: var(--tv-glass-shadow-lg);
}

@media (min-width: 640px) {
  .tv-dl-phone {
    width: 10.5rem;
    height: 20rem;
  }
}

.tv-dl-phone__screen {
  height: 100%;
  border-radius: 1.35rem;
  background: var(--tv-bg-elevated);
  padding: var(--tv-space-4) var(--tv-space-3);
}

.tv-dl-phone__pill {
  width: 2.75rem;
  height: 0.28rem;
  border-radius: var(--tv-radius-full);
  background: var(--tv-border-strong);
  margin: 0 auto var(--tv-space-5);
}

.tv-dl-chip {
  border-radius: var(--tv-radius);
  padding: var(--tv-space-3);
  background: var(--tv-bg-muted);
  margin-bottom: var(--tv-space-2);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--tv-text);
}

/* Download cards grid */
.tv-dl-grid {
  display: grid;
  gap: var(--tv-space-4);
}

@media (min-width: 768px) {
  .tv-dl-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tv-dl-grid--desktop .tv-dl-card--featured {
    grid-column: span 2;
  }
}

@media (min-width: 1024px) {
  .tv-dl-grid--mobile {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tv-dl-card {
  border: 1px solid var(--tv-border);
  border-radius: var(--tv-radius-xl);
  background: var(--tv-bg-elevated);
  padding: var(--tv-space-6);
  transition: border-color var(--tv-transition), box-shadow var(--tv-transition);
}

.tv-dl-card:hover {
  border-color: color-mix(in srgb, var(--tv-primary) 35%, var(--tv-border-strong));
  box-shadow: var(--tv-shadow-sm);
}

.tv-dl-card--featured {
  background: var(--tv-primary-gradient);
  color: var(--tv-primary-foreground);
  border-color: transparent;
  box-shadow: var(--tv-shadow-primary);
}

.tv-dl-card--featured:hover {
  box-shadow: 0 16px 40px -10px rgba(95, 109, 244, 0.45);
}

.tv-dl-card--featured h3 {
  color: var(--tv-primary-foreground);
}

.tv-dl-card--featured .tv-dl-card__desc,
.tv-dl-card--featured .tv-dl-meta {
  color: color-mix(in srgb, var(--tv-primary-foreground) 85%, transparent);
}

.tv-dl-card--featured .tv-dl-card__icon {
  background: color-mix(in srgb, var(--tv-primary-foreground) 12%, transparent);
  border-color: color-mix(in srgb, var(--tv-primary-foreground) 22%, transparent);
  color: var(--tv-primary-foreground);
}

.tv-dl-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: var(--tv-radius);
  border: 1px solid var(--tv-border);
  background: var(--tv-bg-muted);
  margin-bottom: var(--tv-space-4);
  color: var(--tv-text);
}

.tv-dl-card h3 {
  margin: 0 0 var(--tv-space-2);
  font-size: var(--tv-text-xl);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.tv-dl-card__desc {
  margin: 0;
  font-size: var(--tv-text-sm);
  color: var(--tv-text-muted);
  line-height: 1.6;
}

/* 보조 안내 — 제목 옆 작은 아이콘, 텍스트 위주 */
.tv-dl-card--note {
  padding: var(--tv-space-4) var(--tv-space-5);
  border-radius: var(--tv-radius-lg);
  background: color-mix(in srgb, var(--tv-bg-muted) 45%, transparent);
}

.tv-dl-card--note:hover {
  border-color: var(--tv-border-strong);
  box-shadow: none;
  background: color-mix(in srgb, var(--tv-bg-muted) 65%, transparent);
}

.tv-dl-card__head {
  display: flex;
  align-items: center;
  gap: var(--tv-space-3);
  margin-bottom: var(--tv-space-2);
}

.tv-dl-card--note .tv-dl-card__icon--sm {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--tv-text-subtle);
  flex-shrink: 0;
}

.tv-dl-card--note h3 {
  margin: 0;
  font-size: var(--tv-text-sm);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--tv-text);
}

.tv-dl-card--note .tv-dl-card__desc {
  line-height: 1.55;
}

.tv-dl-actions--inline {
  margin-top: var(--tv-space-4);
}

.tv-dl-pill-btn--sm {
  min-height: 2rem;
  padding: 0 var(--tv-space-3);
  font-size: 0.625rem;
}

.tv-dl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tv-space-2);
  margin-top: var(--tv-space-6);
}

.tv-dl-platforms {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--tv-space-2);
  margin-top: var(--tv-space-6);
}

.tv-dl-platforms > .tv-dl-platform__btn,
.tv-dl-platforms > .tv-dl-picker {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
}

.tv-dl-platforms > .tv-dl-platform__btn {
  display: inline-flex;
  align-self: center;
}

.tv-dl-platform__btn.is-detected,
.tv-dl-picker.is-detected .tv-dl-picker__trigger {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--tv-accent) 55%, transparent);
}

/* Mac pill 과 동일 너비감 — 커스텀 플랫폼 드롭다운 */
.tv-dl-picker {
  position: relative;
  flex: 0 0 auto;
  width: auto;
  align-self: center;
}

.tv-dl-picker__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: auto;
  max-width: none;
  min-width: 5.75rem;
  padding-left: 1rem;
  padding-right: 0.75rem;
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
}

.tv-dl-picker__chev {
  flex-shrink: 0;
  opacity: 0.75;
  transition: transform 0.2s ease;
}

.tv-dl-picker.is-open .tv-dl-picker__chev {
  transform: rotate(180deg);
}

.tv-dl-picker__menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 30;
  min-width: 11.5rem;
  width: max-content;
  max-width: 14rem;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  border-radius: 0.75rem;
  border: 1px solid var(--tv-border-strong);
  background: var(--tv-bg-elevated);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

.tv-dl-picker.is-open .tv-dl-picker__menu {
  display: block;
}

.tv-dl-picker__menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tv-dl-picker__option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  font-family: inherit;
  font-size: var(--tv-text-xs);
  font-weight: 600;
  line-height: 1.25;
  color: var(--tv-text);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tv-dl-picker__option:hover,
.tv-dl-picker__option:focus-visible {
  background: var(--tv-primary-soft);
  color: var(--tv-primary);
  outline: none;
}

.tv-dl-picker__hint {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--tv-text-subtle);
  line-height: 1.3;
}

.tv-dl-picker__option:hover .tv-dl-picker__hint,
.tv-dl-picker__option:focus-visible .tv-dl-picker__hint {
  color: color-mix(in srgb, var(--tv-primary) 65%, var(--tv-text-subtle));
}

.tv-dl-card--featured .tv-dl-picker__menu {
  background: #fff;
  border-color: color-mix(in srgb, var(--tv-primary) 14%, #e2e8f0);
  box-shadow: 0 14px 36px rgba(30, 27, 75, 0.22);
}

.tv-dl-card--featured .tv-dl-picker__option {
  color: var(--tv-text);
}

.tv-dl-card--featured .tv-dl-picker__option:hover,
.tv-dl-card--featured .tv-dl-picker__option:focus-visible {
  background: color-mix(in srgb, var(--tv-primary) 10%, #fff);
  color: var(--tv-primary);
}

.tv-dl-arch-select {
  min-height: 2.75rem;
  max-width: 100%;
  padding: 0 2rem 0 var(--tv-space-3);
  border-radius: var(--tv-radius-full);
  border: 1px solid var(--tv-border-strong);
  background: var(--tv-bg-elevated);
  color: var(--tv-text);
  font-size: var(--tv-text-xs);
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  transition: border-color var(--tv-transition), background-color var(--tv-transition);
}

.tv-dl-arch-select:hover {
  border-color: var(--tv-text-subtle);
}

.tv-dl-arch-select:focus-visible {
  outline: 2px solid var(--tv-accent);
  outline-offset: 2px;
}

.tv-dl-card--featured .tv-dl-arch-select {
  background-color: color-mix(in srgb, var(--tv-text-invert) 10%, transparent);
  border-color: color-mix(in srgb, var(--tv-text-invert) 18%, transparent);
  color: var(--tv-text-invert);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%23ffffff' stroke-opacity='0.72' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.tv-dl-card--featured .tv-dl-arch-select option {
  color: var(--tv-text);
  background: var(--tv-bg-elevated);
}

.tv-dl-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--tv-space-2);
  min-height: 2.75rem;
  padding: 0 var(--tv-space-4);
  border-radius: var(--tv-radius-full);
  border: 1px solid var(--tv-border-strong);
  background: var(--tv-bg-elevated);
  font-size: var(--tv-text-xs);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--tv-transition), border-color var(--tv-transition);
}

.tv-dl-pill-btn:hover {
  border-color: var(--tv-text-subtle);
}

.tv-dl-card--featured .tv-dl-pill-btn {
  background: color-mix(in srgb, var(--tv-primary-foreground) 18%, transparent);
  border-color: color-mix(in srgb, var(--tv-primary-foreground) 35%, transparent);
  color: var(--tv-primary-foreground);
}

.tv-dl-card--featured .tv-dl-pill-btn:hover {
  background: color-mix(in srgb, var(--tv-primary-foreground) 28%, transparent);
}

.tv-dl-channel-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: var(--tv-radius-full);
  font-size: var(--tv-text-xs);
  font-weight: 600;
  color: var(--tv-primary);
  background: var(--tv-primary-soft);
  border: 1px solid color-mix(in srgb, var(--tv-primary) 28%, transparent);
}

.tv-dl-meta {
  margin-top: var(--tv-space-4);
  font-size: var(--tv-text-xs);
  color: var(--tv-text-subtle);
  line-height: 1.55;
}

.tv-dl-stores {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tv-space-3);
  align-items: center;
  margin-top: var(--tv-space-5);
}

.tv-dl-stores img {
  height: 2.75rem;
  width: auto;
  display: block;
  border-radius: var(--tv-radius-sm);
}

/* Feature strip */
.tv-dl-features {
  display: grid;
  gap: var(--tv-space-3);
}

@media (min-width: 640px) {
  .tv-dl-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tv-dl-features {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tv-dl-feature {
  padding: var(--tv-space-5);
  border: 1px solid var(--tv-glass-border-outer);
  border-radius: var(--tv-radius-lg);
  background: var(--tv-glass-bg);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}

.tv-dl-feature strong {
  display: block;
  margin-bottom: var(--tv-space-2);
  font-size: var(--tv-text-sm);
  letter-spacing: -0.02em;
  color: var(--tv-text);
}

.tv-dl-feature span {
  font-size: var(--tv-text-sm);
  color: var(--tv-text-muted);
  line-height: 1.55;
}

.tv-dl-faq-grid {
  display: grid;
  gap: 0;
  max-width: 52rem;
}

@media (min-width: 768px) {
  .tv-dl-faq-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--tv-space-10);
  }
}

.tv-dl-cta-band {
  margin-top: var(--tv-space-12);
  padding: var(--tv-space-8);
  border-radius: var(--tv-radius-xl);
  border: 1px solid var(--tv-glass-border-outer);
  background: var(--tv-glass-bg-strong);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: var(--tv-glass-shadow);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--tv-space-6);
}

.tv-dl-cta-band p {
  margin: 0;
  max-width: 36ch;
  font-size: var(--tv-text-sm);
  color: var(--tv-text-muted);
}

@media (max-width: 767px) {
  .tv-dl-showcase {
    min-height: 18rem;
  }

  .tv-dl-phone {
    right: var(--tv-space-4);
    bottom: var(--tv-space-4);
    width: 8rem;
    height: 15rem;
  }
}
