:root {
  color-scheme: dark;
  --bg: #0b0c0e;
  --bg-elevated: #121418;
  --bg-stage: #07080a;
  --border: #1e222b;
  --border-strong: #2d3340;
  --ink: #f3f1ec;
  --ink-muted: #9b9991;
  --ink-dim: #6c6b66;
  --brass: #d9a441;
  --brass-soft: rgba(217, 164, 65, 0.14);
  --live: #4fd1a5;
  --live-soft: rgba(79, 209, 165, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  --max-w: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 12, 14, 0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 16px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: var(--ink-muted);
}

.nav-links a {
  transition: color 0.16s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
  font-family: var(--mono);
  font-size: 11px;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  transition: color 0.15s ease, background 0.15s ease;
}

.lang-btn[aria-pressed="true"] {
  background: var(--border-strong);
  color: var(--ink);
}

/* Hero */
.hero {
  position: relative;
  padding: 52px 0 40px;
  border-bottom: 1px solid var(--border);
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 36px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 14px;
}

.kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--brass);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.14;
  letter-spacing: -0.03em;
  font-weight: 650;
}

.hero-lead {
  margin: 0 0 24px;
  font-size: 16px;
  color: var(--ink-muted);
  max-width: 46ch;
}

.hero-tracks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.track-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.track-chip:hover {
  border-color: var(--brass);
  transform: translateY(-1px);
}

.track-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--brass);
}

/* Hero Preview Stage */
.hero-stage {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.stage-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.stage-tab-group {
  display: inline-flex;
  gap: 6px;
}

.stage-tab {
  border: 1px solid var(--border);
  background: var(--bg-stage);
  color: var(--ink-muted);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  font-family: var(--sans);
  transition: all 0.15s ease;
}

.stage-tab[aria-selected="true"] {
  border-color: var(--brass);
  color: var(--ink);
  background: var(--brass-soft);
}

.stage-panel {
  display: none;
}

.stage-panel.is-active {
  display: block;
}

.stage-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 240px;
  background: var(--bg-stage);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  overflow: hidden;
}

.stage-frame img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.stage-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 13px;
}

.stage-caption-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.stage-caption-meta img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
}

.stage-caption-meta strong {
  font-weight: 600;
  white-space: nowrap;
}

.stage-caption-meta span {
  color: var(--ink-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Filter Toolbar */
.catalog {
  padding: 36px 0 64px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.filter-pill[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  font-weight: 600;
}

.filter-pill[aria-pressed="true"] .pill-num {
  color: #555;
}

.pill-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
}

.filter-note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
}

/* Category Sections */
.category-section {
  margin-bottom: 52px;
}

.category-section.is-hidden {
  display: none;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.section-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.section-idx {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brass);
}

.section-head h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
}

/* Product Grid & Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.app-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.app-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.app-card-horizontal {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px;
  align-items: center;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.app-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  object-fit: cover;
  background: #000;
}

.card-heading {
  min-width: 0;
  flex: 1;
}

.card-heading h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.card-sub {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-family: var(--mono);
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  color: var(--ink-muted);
  background: var(--bg-stage);
}

.status-badge.is-live {
  border-color: rgba(79, 209, 165, 0.32);
  color: var(--live);
  background: var(--live-soft);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Visual Frames inside Cards */
.card-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 210px;
  border-radius: 10px;
  background: var(--bg-stage);
  border: 1px solid var(--border);
  padding: 12px;
  margin-bottom: 14px;
  overflow: hidden;
}

.card-visual img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 6px;
}

/* Apple Watch hardware bezel for watchOS cards */
.watch-bezel {
  position: relative;
  height: 184px;
  aspect-ratio: 416 / 496;
  background: #000;
  border-radius: 26px;
  border: 2px solid #2d323c;
  padding: 5px;
  box-shadow: inset 0 0 0 1px #14171c, 0 8px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.watch-bezel::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 26%;
  width: 4px;
  height: 26px;
  border-radius: 2px;
  background: #484f5d;
  border: 1px solid #20242c;
}

.watch-bezel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 20px;
}

.card-tagline {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.5;
  flex: 1;
}

.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.card-actions .status-badge {
  margin-left: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  background: var(--bg-stage);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn:hover {
  border-color: var(--brass);
}

.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  font-weight: 600;
}

.btn-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
}

.btn-ghost:hover {
  color: var(--ink);
}

/* Detail & Policy Pages */
.page-shell {
  padding: 36px 0 72px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  margin-bottom: 24px;
}

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

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

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.detail-icon {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: #000;
  flex-shrink: 0;
}

.detail-title-row h1 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.detail-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: start;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.gallery-shot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-stage);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  min-height: 240px;
  cursor: zoom-in;
  transition: border-color 0.16s ease;
}

.gallery-shot:hover {
  border-color: var(--brass);
}

.gallery-shot img {
  max-height: 360px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
}

.panel-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}

.panel-box h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel-box p {
  margin: 0 0 12px;
  color: var(--ink-muted);
  font-size: 14px;
}

.panel-box p:last-child {
  margin-bottom: 0;
}

.bullet-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-muted);
  font-size: 14px;
}

.bullet-list li {
  margin-bottom: 8px;
}

.bullet-list li:last-child {
  margin-bottom: 0;
}

.spec-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.spec-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.spec-row dt {
  color: var(--ink-dim);
}

.spec-row dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  text-align: right;
  word-break: break-all;
}

/* Prose (Privacy / Support) */
.prose {
  max-width: 780px;
}

.prose h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: -0.025em;
}

.prose .lead {
  color: var(--ink-muted);
  font-size: 15px;
  margin: 0 0 28px;
}

.policy-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 18px;
}

.policy-block h2 {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: -0.015em;
}

.policy-block h3 {
  margin: 18px 0 8px;
  font-size: 14px;
  color: var(--brass);
  font-family: var(--mono);
}

.policy-block p,
.policy-block li {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.7;
}

.policy-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.policy-link-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-stage);
  font-size: 13px;
  transition: border-color 0.15s ease;
}

.policy-link-card:hover {
  border-color: var(--brass);
}

.policy-link-card img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 6, 8, 0.9);
  backdrop-filter: blur(8px);
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 20px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 36px;
  color: var(--ink-dim);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a:hover {
  color: var(--ink);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .detail-grid,
  .app-card-horizontal {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 34px 0 28px;
  }

  .nav-links {
    gap: 12px;
    font-size: 13px;
  }

  .nav-hide-sm {
    display: none;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .stage-frame {
    height: 200px;
  }
}
