/* Etai 应用集 landing (C一周通 · 轻记账 · 多人事务) — mobile-first, prefers-color-scheme */

:root {
  color-scheme: light dark;
  --teal: #0f766e;
  --teal-bright: #14b8a6;
  --amber: #b45309;
  --amber-dot: #f59e0b;
  --c-accent: #00599c;
  --bg: #f4f7f7;
  --surface: #ffffff;
  --text: #102027;
  --muted: #4a5f66;
  --outline: #c5d0d3;
  --code-bg: #0f172a;
  --shadow: 0 8px 32px rgba(16, 32, 39, 0.08);
  --radius: 14px;
  --qjz: #b45309;
  --qjz-bright: #f59e0b;
  --class: #0369a1;
  --class-bright: #38bdf8;
  --header-h: 88px;
  --max: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Source Han Sans SC", "SF Mono", Menlo,
    Consolas, monospace;
  --shot-stage-bg: color-mix(in srgb, var(--bg) 55%, var(--surface));
}

html.theme-dark {
  --bg: #0b1416;
  --surface: #152125;
  --text: #e6f1f2;
  --muted: #9fb4b8;
  --outline: #334247;
  --code-bg: #020617;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --teal: #5eead4;
  --teal-bright: #2dd4bf;
  --amber: #fcd34d;
  --amber-dot: #fbbf24;
  --qjz: #fcd34d;
  --qjz-bright: #fbbf24;
  --class: #7dd3fc;
  --class-bright: #38bdf8;
  --shot-stage-bg: color-mix(in srgb, var(--surface) 72%, var(--bg));
}

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

html {
  scroll-behavior: smooth;
}

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

main [id] {
  scroll-margin-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--surface);
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--outline);
}

.header-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand tools"
    "nav nav";
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding: 0.65rem 0 0.75rem;
}

.brand-block {
  grid-area: brand;
  min-width: 0;
}

.header-nav {
  grid-area: nav;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.brand-tagline {
  margin: 0.2rem 0 0 calc(36px + 0.65rem);
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--muted);
  max-width: none;
  white-space: nowrap;
}

.brand-tagline-short {
  display: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex-shrink: 0;
}

.header-nav {
  width: 100%;
  min-width: 0;
}

.header-nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.5rem;
  max-width: 100%;
}

.legacy-section-anchor {
  display: block;
  height: 0;
  width: 0;
  overflow: hidden;
  scroll-margin-top: var(--header-h);
}

@media (max-width: 640px) {
  .brand-block {
    max-width: calc(100vw - 2rem - 8.25rem);
    min-width: 0;
  }

  .brand-tagline {
    margin-left: 0;
    padding-left: calc(36px + 0.65rem);
  }

  html[lang^="en"] .brand-tagline-full {
    display: none;
  }

  html[lang^="en"] .brand-tagline-short {
    display: inline;
  }

  .header-nav-inner {
    flex-wrap: wrap;
    overflow: visible;
  }
}

@media (min-width: 641px) {
  .header-shell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem 1rem;
  }

  .brand-block {
    flex: 0 1 11.5rem;
    min-width: 9rem;
  }

  .header-nav {
    flex: 1 1 16rem;
    min-width: 0;
  }

  .header-nav-inner {
    justify-content: center;
    flex-wrap: wrap;
  }

  .header-tools {
    flex: 0 0 auto;
    margin-left: auto;
  }
}

@media (min-width: 1024px) {
  .header-shell {
    flex-wrap: nowrap;
  }

  .brand-block {
    flex: 0 1 13rem;
  }

  .header-nav-inner {
    flex-wrap: nowrap;
  }
}

.header-nav .nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.header-nav .nav-link:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 85%, var(--bg));
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal-bright), var(--teal));
  color: #fff;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--teal-bright) 35%, transparent);
}

html.theme-dark .btn-primary {
  color: #0b1416;
}

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

.hero {
  padding: 2.5rem 0 3rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal-bright) 18%, var(--surface));
  color: var(--teal);
  margin-bottom: 1rem;
}

.hero h1,
.hero h2.hero-title {
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.page-title {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 600;
  color: var(--muted);
  margin: 1.25rem 0 0.5rem;
  letter-spacing: -0.01em;
  line-height: 1.45;
}

.lang-hint {
  background: color-mix(in srgb, var(--teal-bright) 14%, var(--surface));
  border-bottom: 1px solid var(--outline);
  font-size: 0.88rem;
}

.lang-hint-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
}

.lang-hint a {
  font-weight: 600;
  color: var(--teal);
}

.lang-hint-dismiss {
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.hero .lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 36em;
}

/* ---------- integrated download panel (design D) ---------- */

.download-panel {
  --panel-accent: var(--teal);
  --panel-accent-bright: var(--teal-bright);
  margin: 0 0 0.85rem;
  padding: 1.1rem 1.15rem;
  border-radius: calc(var(--radius) + 2px);
  border: 2px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, var(--panel-accent-bright), var(--panel-accent)) border-box;
  box-shadow: var(--shadow);
  max-width: 36rem;
}

.download-panel--qjz {
  --panel-accent: #b45309;
  --panel-accent-bright: var(--qjz-bright);
}

.download-panel--class {
  --panel-accent: #0369a1;
  --panel-accent-bright: var(--class-bright);
}

.download-panel__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.download-panel__icon {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(16, 32, 39, 0.12);
}

.download-panel__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}

.download-panel__version {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.download-panel__body {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 1rem;
}

.download-panel__left {
  flex: 1 1 12rem;
  min-width: 0;
}

.download-panel__primary {
  min-width: 0;
}

.download-panel__primary .btn {
  width: 100%;
  justify-content: center;
}

.download-panel__note {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.download-panel__scan {
  display: none;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.download-panel__divider {
  display: none;
  align-self: stretch;
  align-items: stretch;
  padding: 0 1rem;
  flex-shrink: 0;
}

.download-panel__divider-track {
  position: relative;
  width: 1px;
  flex: 1 1 auto;
  min-height: 100%;
  background: var(--outline);
}

.download-panel__divider-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: var(--surface);
  padding: 0.25rem 0.4rem;
  line-height: 1.2;
}

.download-panel__qr {
  margin: 0;
  text-align: center;
}

.download-panel__qr-frame {
  background: #ffffff;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--outline);
  line-height: 0;
}

.download-panel__qr-frame img {
  display: block;
  width: 120px;
  height: 120px;
}

.download-panel__qr figcaption {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.35;
}

.download-panel__source {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.download-panel__source:hover {
  color: var(--teal);
}

.download-panel__source .icon-github {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

@media (min-width: 641px) {
  .download-panel__body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 0;
  }

  .download-panel__left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    justify-self: end;
    width: max-content;
    max-width: 100%;
  }

  .download-panel__scan {
    display: flex;
    justify-self: start;
  }

  .download-panel__divider {
    display: flex;
  }

  .download-panel__primary .btn {
    width: auto;
    min-width: 11.5rem;
  }

  .download-panel__note {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .download-panel {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    max-width: none;
  }

  .download-panel__head {
    display: none;
  }

  .download-panel__body {
    display: block;
  }

  .download-panel__left {
    display: block;
  }

  .download-panel__divider,
  .download-panel__scan {
    display: none;
  }

  .download-panel__primary .btn {
    width: 100%;
  }

  .download-panel__note {
    display: none;
  }
}

.hero-visual {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.phone-frame {
  border-radius: 24px;
  border: 3px solid var(--outline);
  overflow: hidden;
  background: var(--bg);
  max-width: 280px;
  margin-inline: auto;
}

.phone-notch {
  height: 22px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-notch span {
  width: 56px;
  height: 6px;
  border-radius: 999px;
  background: var(--outline);
}

.phone-screen {
  padding: 1rem;
  min-height: 320px;
}

.mock-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
  border: 1px solid var(--outline);
}

.mock-card strong {
  display: block;
  font-size: 0.85rem;
}

.mock-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--outline);
  margin-top: 0.5rem;
  overflow: hidden;
}

.mock-progress i {
  display: block;
  height: 100%;
  width: 43%;
  background: linear-gradient(90deg, var(--teal-bright), var(--c-accent));
  border-radius: inherit;
}

section {
  padding: 3rem 0;
}

section:nth-of-type(even) {
  background: color-mix(in srgb, var(--surface) 55%, var(--bg));
}

.section-head {
  margin-bottom: 2rem;
}

.section-head h2 {
  font-size: clamp(1.45rem, 3.5vw, 1.85rem);
  margin: 0 0 0.5rem;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 40em;
}

.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

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

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }

  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--amber);
  margin-bottom: 0.35rem;
}

.roadmap {
  display: grid;
  gap: 1rem;
}

.day-card {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: auto 1fr;
  align-items: start;
}

.day-num {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  background: color-mix(in srgb, var(--teal-bright) 22%, var(--surface));
  color: var(--teal);
  flex-shrink: 0;
}

.day-body h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.day-sub {
  font-size: 0.88rem;
  color: var(--teal);
  margin: 0 0 0.5rem;
}

.day-outcome {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.65rem;
}

.day-lab {
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 0.5rem 0.65rem;
  background: var(--code-bg);
  color: #e2e8f0;
  border-radius: 8px;
  display: inline-block;
}

.screenshot-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .screenshot-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.placeholder-shot {
  border-radius: var(--radius);
  border: 1px dashed var(--outline);
  background: var(--surface);
  overflow: hidden;
}

.placeholder-shot .label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--outline);
  background: color-mix(in srgb, var(--bg) 50%, var(--surface));
}

.placeholder-art {
  padding: 1.25rem;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.placeholder-art .bar {
  height: 10px;
  border-radius: 4px;
  background: var(--outline);
  opacity: 0.55;
}

.placeholder-art .bar.w75 {
  width: 75%;
}

.placeholder-art .bar.w55 {
  width: 55%;
}

.placeholder-art .bar.w90 {
  width: 90%;
}

.placeholder-art .code-block {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--code-bg);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.5;
}

.placeholder-note {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 1rem;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.faq-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.faq-item p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--outline);
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer .inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .site-footer .inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.site-footer a {
  color: var(--text);
}

/* ---------- mock progress widths (CSP forbids inline style attributes) ---------- */

.mock-progress i.p45 { width: 45%; }
.mock-progress i.p57 { width: 57%; }
.mock-progress i.p62 { width: 62%; }
.mock-progress i.p70 { width: 70%; }
.mock-progress i.p71 { width: 71%; }
.mock-progress i.p80 { width: 80%; }
.mock-progress i.p88 { width: 88%; }
.mock-progress i.p100 { width: 100%; }

.notfound {
  text-align: center;
  max-width: 28rem;
}

.notfound-prefs {
  justify-content: center;
  margin-bottom: 1.5rem;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
}

/* ---------- header app chips ---------- */

.app-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem 0.3rem 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.app-chip:hover {
  border-color: var(--teal);
}

.chip-badge {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, var(--teal-bright), var(--teal));
  flex-shrink: 0;
}

.chip-qjz .chip-badge {
  background: linear-gradient(135deg, var(--qjz-bright), #b45309);
}

.chip-class .chip-badge {
  background: linear-gradient(135deg, var(--class-bright), #0369a1);
}

/* ---------- project sections (轻记账 / 多人事务) ---------- */

.project {
  --accent: var(--teal);
  --accent-bright: var(--teal-bright);
  border-top: 1px solid var(--outline);
  padding: 3.5rem 0;
}

main > section.project:first-of-type {
  border-top: none;
}

.project-qjz {
  --accent: var(--qjz);
  --accent-bright: var(--qjz-bright);
}

.project-class {
  --accent: var(--class);
  --accent-bright: var(--class-bright);
}

.project-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 900px) {
  .project-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }
}

.project .project-badge {
  background: color-mix(in srgb, var(--accent-bright) 20%, var(--surface));
  color: var(--accent);
}

.project-title {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.project .lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 36em;
}

.project .btn-primary {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent-bright) 35%, transparent);
}

.project .mock-progress i {
  background: linear-gradient(90deg, var(--accent-bright), var(--accent));
}

.project .card .tag {
  color: var(--accent);
}

.project-subhead {
  font-size: 1.2rem;
  margin: 0 0 1rem;
}

.project-foot {
  margin: 1.25rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

/* ---------- real app screenshot galleries ---------- */

.hero-visual.screenshot-wrap {
  padding: 0.75rem 0 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.screenshot-gallery {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  padding-bottom: 0.35rem;
}

.screenshot-gallery-track {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0.25rem 0.75rem;
  width: max-content;
  max-width: none;
}

.screenshot-slide {
  scroll-snap-align: center;
  flex: 0 0 auto;
  width: min(252px, 78vw);
}

.screenshot-figure {
  margin: 0;
}

.screenshot-phone {
  max-width: none;
  margin-inline: 0;
}

.screenshot-phone .phone-screen {
  min-height: 0;
  padding: 0;
  aspect-ratio: 540 / 1171;
  background: var(--bg);
}

.screenshot-phone .phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 0 0 18px 18px;
}

.screenshot-caption {
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
  margin: 0.55rem 0 0;
  padding-inline: 0.25rem;
}

#screenshots .screenshot-gallery-track {
  width: max-content;
}

@media (min-width: 900px) {
  .screenshot-slide {
    width: min(220px, 22vw);
  }
}

/* ---------- language & theme controls ---------- */

.header-tools {
  grid-area: tools;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.site-prefs {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--outline);
  background: var(--surface);
}

.site-prefs button {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.35rem 0.55rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
}

.site-prefs button[aria-pressed="true"] {
  color: var(--text);
  background: color-mix(in srgb, var(--teal-bright) 22%, var(--surface));
}

.site-prefs button:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 2px;
}

#theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}

#theme-toggle:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 2px;
}

#theme-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
}

#theme-toggle .icon-sun,
#theme-toggle .icon-moon,
#theme-toggle .icon-system {
  display: none;
}

html[data-theme="light"] #theme-toggle .icon-sun,
html[data-theme="dark"] #theme-toggle .icon-moon,
html[data-theme="system"] #theme-toggle .icon-system {
  display: block;
}

.app-meta-date-wrap[hidden] {
  display: none;
}

.hero-badge .sep {
  opacity: 0.65;
}

html.theme-dark .shot-carousel-btn {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* ---------- fixed-size screenshot carousel ---------- */

.shot-carousel {
  --shot-w: min(260px, 78vw);
  --shot-screen-h: calc(var(--shot-w) * 1171 / 540);
  --shot-caption-min: 2.75rem;
  width: var(--shot-w);
  max-width: 100%;
  margin-inline: auto;
}

.shot-carousel-stage {
  position: relative;
  min-height: calc(var(--shot-notch-h, 22px) + var(--shot-screen-h) + 6px);
}

.shot-carousel .phone-frame {
  width: 100%;
  max-width: var(--shot-w);
  margin-inline: auto;
}

.shot-carousel .phone-screen {
  height: var(--shot-screen-h);
  min-height: var(--shot-screen-h);
  max-height: var(--shot-screen-h);
  aspect-ratio: auto;
  background: var(--shot-stage-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shot-carousel .phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 0 0 18px 18px;
}

.shot-carousel .screenshot-caption {
  min-height: var(--shot-caption-min);
  max-height: var(--shot-caption-min);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.screenshot-gallery.is-carousel {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0;
  border-radius: 24px;
  touch-action: pan-y pinch-zoom;
}

.screenshot-gallery.is-carousel::-webkit-scrollbar {
  display: none;
}

.screenshot-gallery.is-carousel:focus-visible {
  outline: 2px solid var(--accent, var(--teal));
  outline-offset: 4px;
}

.screenshot-gallery.is-carousel .screenshot-gallery-track,
#screenshots .screenshot-gallery.is-carousel .screenshot-gallery-track {
  width: auto;
  gap: 0;
  padding: 0;
}

.screenshot-gallery.is-carousel .screenshot-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.screenshot-gallery.is-carousel .screenshot-caption {
  min-height: var(--shot-caption-min, 2.75rem);
  max-height: var(--shot-caption-min, 2.75rem);
}

.shot-carousel-btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--outline);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--accent, var(--teal));
  font-size: 1.6rem;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
}

.shot-carousel-btn:hover {
  background: var(--surface);
  transform: translateY(-50%) scale(1.08);
}

.shot-carousel-btn:focus-visible {
  outline: 2px solid var(--accent, var(--teal));
  outline-offset: 2px;
}

.shot-carousel-btn.is-prev {
  left: -52px;
}

.shot-carousel-btn.is-next {
  right: -52px;
}

.shot-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.shot-carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--outline);
  cursor: pointer;
  transition: width 0.25s, background 0.25s;
}

.shot-carousel-dot.is-active {
  width: 22px;
  background: var(--accent, var(--teal));
}

@media (max-width: 480px) {
  .shot-carousel {
    --shot-w: min(230px, 84vw);
  }
  .shot-carousel-btn.is-prev {
    left: -44px;
  }
  .shot-carousel-btn.is-next {
    right: -44px;
  }
}

@media (max-width: 360px) {
  .shot-carousel-btn.is-prev {
    left: 4px;
  }
  .shot-carousel-btn.is-next {
    right: 4px;
  }
}
