:root {
  --bg: #F6F3EA;
  --surface: #FFFFFF;
  --text: #17241D;
  --text-muted: #4B5A50;
  --green: #34C759;
  --yellow: #FFCC00;
  --border: rgba(23, 36, 29, 0.10);
  --shadow: 0 12px 28px rgba(23, 36, 29, 0.08);
  --radius: 20px;
  --max-width: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12201A;
    --surface: #182A22;
    --text: #F1F5F1;
    --text-muted: #A9BBAF;
    --green: #4CD964;
    --yellow: #FFD54D;
    --border: rgba(241, 245, 241, 0.10);
    --shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Header */

.site-header {
  padding-block: 1rem;
}

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

.site-header a.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.site-header img {
  width: 64px;
  height: 64px;
}

.site-header span {
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.header-link {
  color: var(--green);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.header-link:hover {
  text-decoration: underline;
}

/* Hero */

.hero {
  padding-top: clamp(1.25rem, 3vw, 2rem);
  padding-bottom: clamp(0.5rem, 1.5vw, 1rem);
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.hero p {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 42ch;
  margin: 0 auto 2rem;
}

.cta-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta {
  display: inline-flex;
}

.cta img {
  display: block;
  height: 40px;
  width: auto;
}

/* Features */

.features {
  padding-top: clamp(0.5rem, 1.5vw, 1rem);
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.features h2 {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover,
.feature-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(23, 36, 29, 0.14);
}

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

.feature-card .icon {
  width: calc(100% + 3rem);
  height: clamp(170px, 24vw, 230px);
  margin: -1.5rem -1.5rem 1.25rem;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 3rem;
  background: color-mix(in srgb, var(--green) 12%, var(--surface));
}

.feature-card .icon img {
  width: auto;
  height: auto;
  max-width: 82%;
  max-height: 82%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

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

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

/* Footer */

.site-footer {
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  margin-top: 0.75rem;
}

.site-footer nav {
  margin-top: 0.5rem;
}

.site-footer nav a {
  color: var(--text-muted);
  text-decoration: underline;
}

/* Policy page */

.policy {
  padding-block: clamp(2rem, 5vw, 3.5rem);
}

.policy .wrap {
  max-width: 720px;
}

.policy .back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.policy h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

.policy .updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.policy h2 {
  font-size: 1.15rem;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.policy p,
.policy li {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.policy ul {
  padding-left: 1.2rem;
  margin: 0.75rem 0;
}

.policy li + li {
  margin-top: 0.4rem;
}

.policy a {
  text-decoration: underline;
}

/* Help page */

.help-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.help-nav a {
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.help-section {
  margin-top: 3rem;
}

.help-section h2 {
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  scroll-margin-top: 1.5rem;
}

.help-section p,
.help-section li {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.help-section ul {
  padding-left: 1.2rem;
  margin: 0.75rem 0;
}

.help-section li + li {
  margin-top: 0.4rem;
}

.shot-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.device-switcher,
.appearance-switcher {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.25rem;
  width: fit-content;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.device-switcher-option,
.appearance-switcher-option {
  padding: 0.4rem 1.1rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.device-switcher-option.is-selected,
.appearance-switcher-option.is-selected {
  background: var(--green);
  color: #ffffff;
}

.help-shots {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.help-shot {
  margin: 0;
  max-width: 280px;
  cursor: zoom-in;
}

.help-shot:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.help-shot img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.help-shot figcaption {
  margin-top: 0.6rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  background: rgba(0, 0, 0, 0.8);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: zoom-out;
}

.help-faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 0.9rem 1.1rem;
  margin-top: 1.25rem;
}

.help-faq details:first-of-type {
  margin-top: 1.25rem;
}

.help-faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
}

.help-faq details p {
  margin: 0.75rem 0 0;
}

.shortcuts-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.shortcuts-table td {
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.shortcuts-table tr:last-child td {
  border-bottom: none;
}

.shortcuts-table td:first-child {
  width: 1%;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text);
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-prev[hidden],
.lightbox-next[hidden] {
  display: none;
}

.lightbox-caption {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.lightbox-caption[hidden] {
  display: none;
}
