:root {
  --bg: #0E111A;
  --surface: #161B29;
  --surface-alt: #1C2336;
  --border: #2A3550;
  --text: #F4F7FC;
  --muted: #A4B0CE;
  --mint: #00E599;
  --mint-dim: rgba(0, 229, 153, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 960px; margin: 0 auto; padding: 24px 20px 64px; }

/* Site header (not every <header>: posts and setup guides have their own). */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand svg { width: 40px; height: 40px; flex-shrink: 0; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }

nav.main-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
nav.main-nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.15s; }
nav.main-nav a:hover, nav.main-nav a.active { color: var(--mint); }

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--surface);
  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' stroke='%23A4B0CE' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 28px 6px 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.lang-select:hover, .lang-select:focus {
  border-color: var(--mint);
  outline: none;
}

.footer-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  width: 100%;
  font-size: 12px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 22px 0 8px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--mint); }

.hero { padding: 40px 0 28px; }
.page-header { padding: 20px 0 24px; }

.badge {
  display: inline-block;
  background: var(--mint-dim);
  color: var(--mint);
  border: 1px solid rgba(0, 229, 153, 0.35);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

h1 { font-size: clamp(28px, 4.8vw, 42px); line-height: 1.18; letter-spacing: -0.025em; margin-bottom: 16px; }
.subtitle { font-size: 17px; color: var(--muted); max-width: 720px; margin-bottom: 24px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}
.btn:hover { border-color: var(--mint); color: var(--mint); }
.btn-primary { background: var(--mint); color: #08120D; border-color: var(--mint); }
.btn-primary:hover { opacity: 0.92; color: #08120D; }

.banner-wrap {
  margin: 28px 0 32px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.banner-wrap img { display: block; width: 100%; height: auto; }

section { margin-top: 44px; }
section.tight { margin-top: 16px; }
section h2 { font-size: 23px; letter-spacing: -0.02em; margin-bottom: 16px; }
.section-desc { color: var(--muted); font-size: 15px; margin-bottom: 20px; max-width: 720px; }

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

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}

.card h3 { font-size: 17px; margin-bottom: 8px; color: var(--text); }
.card p, .card li { font-size: 14px; color: var(--muted); }
.card ul, .card ol { padding-left: 18px; margin-top: 8px; display: grid; gap: 6px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag {
  font-size: 13px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
}

.diagram-box {
  background: #0A0D14;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  display: flex;
  justify-content: center;
}
.diagram-box svg { width: 100%; max-width: 220px; height: auto; display: block; }

.step-num {
  color: var(--mint);
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.faq-list { display: grid; gap: 14px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
}
.faq-item h3 { font-size: 16px; margin-bottom: 6px; color: var(--text); }
.faq-item p { font-size: 14px; color: var(--muted); }

.privacy-box {
  margin-top: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--mint);
  border-radius: 12px;
  padding: 22px 24px;
}
.privacy-box h2 { font-size: 18px; margin-bottom: 8px; }
.privacy-box p { font-size: 14px; color: var(--muted); }
.privacy-box a { color: var(--mint); }

.prose h2 { font-size: 20px; margin: 28px 0 10px; }
.prose p, .prose li { color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.prose ul { padding-left: 20px; margin-bottom: 14px; }
.prose a { color: var(--mint); }

code {
  background: var(--surface-alt);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.9em;
  color: var(--text);
}

.site-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--mint); }
.site-footer .links { display: flex; gap: 16px; flex-wrap: wrap; }

/* Blog post and setup guide images and figures */
.blog-post figure, .setup-guide figure {
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.blog-post .featured-image, .setup-guide .featured-image {
  width: 100%;
  margin: 24px 0 32px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.blog-post .featured-image img, .setup-guide .featured-image img {
  display: block;
  width: 100%;
  height: auto;
}

.blog-post .inline-image, .setup-guide .inline-image {
  margin: 24px 0;
  max-width: 100%;
}

.blog-post .inline-image.left, .setup-guide .inline-image.left {
  float: left;
  margin-right: 20px;
  margin-bottom: 10px;
  max-width: 320px;
}

.blog-post .inline-image.right, .setup-guide .inline-image.right {
  float: right;
  margin-left: 20px;
  margin-bottom: 10px;
  max-width: 400px;
}

.blog-post figure img, .setup-guide figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.blog-post figcaption, .setup-guide figcaption {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}

/* Responsive images for mobile */
@media (max-width: 640px) {
  .blog-post .inline-image.left,
  .blog-post .inline-image.right,
  .setup-guide .inline-image.left,
  .setup-guide .inline-image.right {
    float: none;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 16px;
  }
}

/* Long words and URLs must wrap instead of widening the page on phones. */
main { overflow-wrap: anywhere; }
.setup-guide .inline-image.right img { max-width: 240px; margin: 0 auto; }
.post-meta { display: flex; gap: 16px; color: var(--muted); font-size: 14px; }
.blog-post::after, .setup-guide::after { content: ""; display: block; clear: both; }

/* Blog index cards, related links and the CTA box reuse the card look. */
.blog-card, .cta-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}
.blog-card h3 { font-size: 17px; margin-bottom: 8px; }
.blog-card h3 a { color: var(--text); text-decoration: none; }
.blog-card h3 a:hover { color: var(--mint); }
.blog-card p { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.blog-card .meta { font-size: 12px; color: var(--mint); }
.blog-grid h2 { margin: 28px 0 16px; }
.cta-section p { color: var(--muted); margin-bottom: 16px; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
a.card { display: block; text-decoration: none; color: var(--text); }
a.card:hover { border-color: var(--mint); }
a.card h4 { font-size: 16px; margin-bottom: 6px; }
a.card p { font-size: 14px; color: var(--muted); }
.related-posts h3, .related h3 { font-size: 20px; margin-bottom: 16px; }

/* Mobile menu: the toggle only appears when JS runs (see Header.astro). */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; }
.nav-toggle[aria-expanded="true"] { border-color: var(--mint); }
@media (max-width: 720px) {
  .js .nav-toggle { display: flex; }
  .js nav.main-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 4px; }
  .js nav.main-nav.open { display: flex; }
  .js nav.main-nav a { padding: 10px 4px; font-size: 16px; border-bottom: 1px solid var(--border); }
}

/* Portrait screenshots and photos as featured images: keep them to a screen's height instead of full width. */
.blog-post .featured-image img, .setup-guide .featured-image img { width: auto; max-width: 100%; max-height: 560px; margin: 0 auto; }

/* Article bodies: readable link colour on the dark background, and list markers inside the column. */
.post-content a, .setup-steps a { color: var(--mint); }
.post-content ul, .post-content ol, .setup-steps ul, .setup-steps ol { padding-left: 22px; margin: 8px 0 14px; }

/* ---------- Interactive lessons (/learn/<slug>) ---------- */
.lesson-header { padding: 8px 0 8px; }
.lesson-goal { font-size: 17px; color: var(--muted); max-width: 680px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--mint); border-radius: 12px; padding: 14px 18px; }
.lesson-goal strong { color: var(--text); }
.lesson h2 { font-size: 22px; letter-spacing: -0.02em; margin: 40px 0 14px; }
.lesson > p, .lesson .pick-result p, .try-in-app p { color: var(--muted); max-width: 680px; margin-bottom: 12px; }
.lesson strong { color: var(--text); }
.muted { color: var(--muted); font-weight: 400; }

.learn-photo { margin: 18px 0; max-width: 420px; }
.learn-photo-frame { position: relative; display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.learn-photo-frame img { display: block; width: 100%; height: auto; }
.grid-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 0.25s; pointer-events: none; }
.learn-photo[data-on="true"] .grid-layer, .pick-better.answered .grid-layer, .tap-target.answered .grid-layer { opacity: 1; }
.crop-frame .guide-svg, .crop-frame .guide-dot { opacity: 1; }
.guide-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.7)); }
.guide-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35); }
.subject-mark { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 3px solid #FFD54A; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35); }
.grid-toggle { margin-top: 10px; cursor: pointer; font-family: inherit; }
.learn-photo figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }

.pick-better { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; }
.pick-question { margin-bottom: 14px; }
.pick-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pick-option { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; font: inherit; text-align: center; }
.pick-option .learn-photo-frame { border-width: 2px; transition: border-color 0.15s, transform 0.15s; }
.pick-option:hover .learn-photo-frame, .pick-option:focus-visible .learn-photo-frame { border-color: var(--mint); }
.pick-option.chosen .learn-photo-frame { border-color: var(--mint); transform: scale(0.98); }
.pick-label { font-weight: 700; font-size: 15px; }
.pick-result { margin-top: 16px; }
.pick-verdict { font-weight: 700; color: #FFB74A !important; }
.pick-verdict.ok { color: var(--mint) !important; }

.learn-steps { list-style: none; counter-reset: step; display: grid; gap: 10px; max-width: 680px; }
.learn-steps li { counter-increment: step; position: relative; padding: 12px 14px 12px 52px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.learn-steps li::before { content: counter(step); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: var(--mint); color: #08120D; font-weight: 700; font-size: 14px; display: grid; place-items: center; }

.crop-practice { max-width: 420px; }
.crop-stage { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); touch-action: none; user-select: none; }
.crop-stage img { display: block; width: 100%; height: auto; filter: brightness(0.45); }
.crop-frame { position: absolute; cursor: grab; outline: 2px solid #fff; background-repeat: no-repeat; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); }
.crop-frame:active { cursor: grabbing; }
.crop-frame:focus-visible { outline: 3px solid var(--mint); }
.crop-hint { font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.crop-feedback { font-weight: 600; min-height: 3em; color: var(--text); }
.crop-practice[data-state="good"] .crop-frame { outline-color: var(--mint); }
.crop-practice[data-state="good"] .crop-feedback { color: var(--mint); }
.crop-practice[data-state="centered"] .crop-feedback { color: #FFB74A; }

.try-in-app { margin-top: 40px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--mint); border-radius: 16px; padding: 20px 22px; }
.try-in-app h2 { margin: 0 0 10px; font-size: 19px; }
.lesson-faq h2 { margin-top: 40px; }

.grid-layer { overflow: hidden; }
.guide-label { position: absolute; transform: translateY(-50%); padding: 2px 8px; border-radius: 999px; background: rgba(14, 17, 26, 0.75); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.guide-arrowhead { position: absolute; width: 0; height: 0; margin: -9px 0 0 -4px; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 16px solid #FFD54A; transform: rotate(17deg); transform-origin: 4px 9px; }

/* Level practice (straighten the photo) and tilt practice (+7°) */
.level-practice, .tilt-practice, .tap-target { max-width: 420px; position: relative; }
.level-stage { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--border); aspect-ratio: 3 / 4; background: #000; }
.level-stage img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.05s linear; }
.level-line { position: absolute; left: 0; right: 0; height: 0; border-top: 3px solid #FFB74A; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }
.level-practice[data-state="good"] .level-line { border-color: var(--mint); }
.level-readout { position: absolute; top: 10px; right: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(14, 17, 26, 0.8); color: #FFB74A; font-weight: 700; font-variant-numeric: tabular-nums; }
.level-practice[data-state="good"] .level-readout, .tilt-practice[data-state="good"] .level-readout { color: var(--mint); }
.level-control { display: grid; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.level-control input { width: 100%; accent-color: var(--mint); }
.level-practice[data-state="good"] .crop-feedback, .tilt-practice[data-state="good"] .crop-feedback, .tap-target[data-state="good"] .crop-feedback { color: var(--mint); }
.tilt-scene { display: block; width: 100%; height: auto; background: #0A0D14; border: 1px solid var(--border); border-radius: 12px; }
.tilt-phone { transition: transform 0.05s linear; }
.tilt-readout { top: 10px; }

/* Tap the photo */
.tap-stage { display: block; width: 100%; padding: 0; cursor: crosshair; font: inherit; }
.tap-dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 3px solid #fff; background: rgba(255, 183, 74, 0.8); }
.tap-target[data-state="good"] .tap-dot { background: var(--mint); }

/* Next lesson */
.lesson-next { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); }
.lesson-next-card { display: flex; align-items: center; gap: 14px; flex: 1 1 280px; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: var(--text); text-decoration: none; }
.lesson-next-card:hover { border-color: var(--mint); }
.lesson-next-card img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.lesson-next-card > span { display: grid; gap: 2px; }
.lesson-next-label { font-size: 13px; color: var(--mint); font-weight: 600; }

/* /learn index */
.learn-index-header .btn { margin-top: 4px; }
.learn-module h2 { margin-bottom: 14px; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.lesson-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; color: var(--text); text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.lesson-card:hover { border-color: var(--mint); transform: translateY(-2px); }
.lesson-card-photo { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #0A0D14; }
.lesson-card-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.lesson-card-num { position: absolute; top: 10px; left: 10px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: #08120D; font-weight: 800; font-size: 15px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.lesson-card-body { display: grid; gap: 6px; padding: 14px 16px 16px; }
.lesson-card-body strong { font-size: 17px; line-height: 1.3; }
.lesson-card-goal { font-size: 14px; color: var(--muted); line-height: 1.5; }
.lesson-card-meta { font-size: 12px; color: var(--mint); font-weight: 600; }
@media (max-width: 520px) {
  .lesson-grid { grid-template-columns: 1fr; }
  .lesson-card { flex-direction: row; }
  .lesson-card-photo { width: 112px; flex-shrink: 0; aspect-ratio: auto; }
  .lesson-card-body { padding: 12px 14px; }
  .lesson-card-goal { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

/* /app download page */
.download { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding: 24px 0; }
.btn-play { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; padding: 14px 22px; }
.btn-play svg { width: 18px; height: 18px; }
.download-points { list-style: none; display: grid; gap: 10px; margin: 24px 0 16px; }
.download-points li { position: relative; padding-left: 28px; color: var(--muted); }
.download-points li::before { content: "✓"; position: absolute; left: 0; color: var(--mint); font-weight: 700; }
.download-small { font-size: 13px; color: var(--muted); }
.download-small a { color: var(--mint); }
.download-side { display: grid; justify-items: center; gap: 18px; }
.download-shot { width: 100%; max-width: 280px; height: auto; border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }
.download-qr { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; max-width: 340px; }
.download-qr strong { font-size: 14px; }
.download-qr p { font-size: 13px; color: var(--muted); }
.qr-code { flex-shrink: 0; width: 112px; height: 112px; background: #fff; border-radius: 8px; padding: 4px; }
.qr-code svg { display: block; width: 100%; height: 100%; }
@media (max-width: 720px) {
  .download { grid-template-columns: 1fr; }
  .download-shot { max-width: 200px; }
  /* A QR code is useless on the phone that would scan it. */
  .download-qr { display: none; }
}

/* ---------- Home / Guides / Poses redesign ---------- */
.btn-play-lg { font-size: 16px; padding: 14px 22px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; color: var(--text); text-decoration: none; transition: border-color 0.15s; }
.feature-card:hover { border-color: var(--mint); }
.feature-card img { width: 100%; height: 240px; object-fit: cover; object-position: center 62%; background: #0A0D14; }
.feature-card > span { display: grid; gap: 6px; padding: 16px; }
.feature-card strong { font-size: 17px; }
.feature-text { font-size: 14px; color: var(--muted); }

.tpl-photo { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: #0A0D14; }
.tpl-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tpl-layer { position: absolute; inset: 0; transition: opacity 0.2s; }
.tpl-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.8)); }
.tpl-label { font: 600 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; fill: #fff; paint-order: stroke; stroke: rgba(0, 0, 0, 0.6); stroke-width: 3px; }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.category-tile { position: relative; display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); color: #fff; text-decoration: none; }
.category-tile .tpl-layer { opacity: 0; }
.category-tile:hover .tpl-layer, .category-tile:focus-visible .tpl-layer, .category-tile.show .tpl-layer { opacity: 1; }
.category-tile:hover { border-color: var(--mint); }
.category-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; font-weight: 700; background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); }

.home-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.home-steps li { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: grid; gap: 6px; }
.home-steps p { font-size: 14px; color: var(--muted); }
.more-link { margin-top: 16px; }
details.faq-item summary { cursor: pointer; font-weight: 700; font-size: 16px; list-style: none; position: relative; padding-right: 28px; }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: "+"; position: absolute; right: 0; top: -2px; color: var(--mint); font-size: 22px; font-weight: 400; }
details.faq-item[open] summary::after { content: "–"; }
details.faq-item p { margin-top: 8px; }
.final-cta { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 32px 22px; }
.final-cta p { color: var(--muted); margin-bottom: 18px; }
.final-cta h2 { margin-bottom: 8px; }

/* Guides gallery */
.count { font-size: 15px; font-weight: 500; margin-left: 6px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 10px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 13px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; }
.chip:hover { border-color: var(--mint); }
.chip.active { background: var(--mint); color: #08120D; border-color: var(--mint); font-weight: 700; }
.grid-all { cursor: pointer; font-family: inherit; }
.grids-off .tpl-layer { opacity: 0; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.template-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; scroll-margin-top: 80px; }
.template-card[hidden] { display: none; }
.template-body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.template-body h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.template-body p { font-size: 13.5px; color: var(--muted); }
.template-body strong { color: var(--text); }
.template-sub { font-size: 12.5px !important; }
.tier { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.tier.free { color: var(--mint); border-color: rgba(0, 229, 153, 0.4); }
.tier.pro { color: #FFD54A; border-color: rgba(255, 213, 74, 0.4); }
.template-lesson { font-size: 13px; color: var(--mint); text-decoration: none; font-weight: 600; }
.level-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.level-card { display: flex; flex-direction: column; gap: 8px; }
.level-card .level-demo { margin-top: auto; padding-top: 8px; }
.level-card .tpl-photo { border-radius: 12px; }
.level-card .level-practice, .level-card .tilt-practice { max-width: none; }
.level-card .crop-feedback { font-size: 13px; min-height: 0; }

/* Poses */
.pose-jump { margin: 8px 0 0; }
.pose-section { scroll-margin-top: 20px; }
.pose-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.pose-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.pose-card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.pose-card figcaption { padding: 8px 10px 10px; font-size: 13px; font-weight: 600; }
.ghost { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px; }
.ghost img { width: 100%; max-width: 280px; height: auto; justify-self: center; border-radius: 18px; }

@media (max-width: 820px) {
  .ghost { grid-template-columns: 1fr; }
  .feature-grid, .home-steps, .level-grid { grid-template-columns: 1fr; }
  .feature-card { flex-direction: row; }
  .feature-card img { width: 110px; height: auto; flex-shrink: 0; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Back to top */
.to-top { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 20; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-alt); color: var(--mint); border: 1px solid var(--border); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--mint); }
.to-top svg { width: 22px; height: 22px; }

/* Home hero on phones: one full-width Play button, the two secondary buttons side by side, a smaller shot. */
.cta-row { align-items: center; }
@media (max-width: 720px) {
  .final-cta .btn-play { width: 100%; justify-content: center; }
}

/* Home hero: text + actions on the left, the live phone on the right; on phones the phone sits between them. */
.home-hero { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-areas: "text visual" "actions visual"; column-gap: 40px; row-gap: 20px; align-items: center; padding: 36px 0 8px; }
.hero-text { grid-area: text; align-self: end; }
.hero-text h1 { margin-bottom: 12px; }
.hero-text .subtitle { margin-bottom: 0; }
.hero-visual { grid-area: visual; justify-self: center; }
.hero-actions { grid-area: actions; align-self: start; display: grid; gap: 14px; justify-items: start; }
.trust { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.trust li::before { content: "✓ "; color: var(--mint); font-weight: 700; }
.hero-phone { display: grid; justify-items: center; gap: 10px; padding: 0; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; }
.hero-phone-screen { position: relative; display: block; width: 270px; aspect-ratio: 3 / 4; border-radius: 26px; overflow: hidden; border: 9px solid #1C2336; outline: 1px solid var(--border); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset; background: #0A0D14; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s; }
.hero-slide.active { opacity: 1; }
.hero-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-slide .tpl-layer { opacity: 1; }
.hero-slide-name { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); white-space: nowrap; padding: 5px 12px; border-radius: 999px; background: rgba(14, 17, 26, 0.82); color: #fff; font-size: 13px; font-weight: 600; }
.hero-dots { display: flex; gap: 6px; }
.hero-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--border); transition: background 0.3s; }
.hero-dots span.on { background: var(--mint); }
@media (max-width: 720px) {
  .home-hero { grid-template-columns: 1fr; grid-template-areas: "text" "visual" "actions"; row-gap: 12px; padding-top: 12px; }
  .hero-text h1 { font-size: 29px; }
  .hero-text .subtitle { font-size: 16px; }
  .hero-phone-screen { width: min(214px, 58vw); border-width: 7px; border-radius: 22px; }
  .hero-actions { justify-items: stretch; }
  .hero-actions .btn-play { justify-content: center; }
  .trust { justify-content: center; }
  .hero-actions .download-qr { display: none; }
}

/* Header order: brand | nav | language | menu button. Desktop: nav pushed right, language after it. */
nav.main-nav { margin-left: auto; }
.site-header { gap: 12px 16px; }
@media (max-width: 720px) {
  .js .site-header .lang-select { margin-left: auto; order: 1; padding: 8px 28px 8px 12px; }
  .js .nav-toggle { order: 2; }
  .js nav.main-nav { order: 3; margin-left: 0; }
}

/* ---------- /setup guide ---------- */
.brand-links { margin-top: 16px; }
.setup-progress { position: sticky; top: 0; z-index: 3; display: flex; gap: 8px; justify-content: center; padding: 10px 0; margin: 8px 0 0; background: var(--bg); border-bottom: 1px solid var(--border); }
.setup-progress a { text-decoration: none; }
.setup-progress span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 700; font-size: 14px; }
.setup-progress a:hover span { border-color: var(--mint); color: var(--mint); }
.setup-steps-list { list-style: none; }
.setup-step { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center; margin-top: 28px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; scroll-margin-top: 70px; }
.setup-step h2 { font-size: 21px; margin: 4px 0 10px; }
.setup-step-text > p { color: var(--muted); margin-bottom: 12px; }
.setup-step-text .btn-play { margin: 6px 0 14px; }
.setup-step:first-child { grid-template-columns: 1fr; }
.setup-privacy { font-size: 14px; border-left: 3px solid var(--mint); padding-left: 12px; }
.setup-note { font-size: 14px; }
.setup-tips { list-style: none; display: grid; gap: 8px; margin-top: 6px; }
.setup-tips li { position: relative; padding-left: 22px; font-size: 14px; color: var(--muted); }
.setup-tips li::before { content: "💡"; position: absolute; left: 0; font-size: 13px; }
.brand-tabs { margin: 4px 0 14px; }
.brand-panel[hidden] { display: none; }
.setup-step-calib { align-items: start; }

/* Phone mock-ups (English UI) */
.phone-mock { justify-self: center; width: 230px; aspect-ratio: 9 / 19; padding: 8px; border-radius: 30px; background: #1C2336; border: 1px solid var(--border); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); }
.phone-mock.small { width: 200px; }
.phone-mock-screen { position: relative; width: 100%; height: 100%; border-radius: 22px; overflow: hidden; background: #F5F6F8; color: #1B1F27; font-family: Roboto, "Segoe UI", system-ui, sans-serif; font-size: 12px; }
.mk-settings { padding: 26px 12px 12px; }
.mk-title { font-size: 17px; font-weight: 500; margin-bottom: 14px; }
.mk-app { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 12px; }
.mk-row { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 12px; }
.mk-row.hl { background: #E2F7EF; box-shadow: 0 0 0 2px #00C483; }
.mk-icon { width: 24px; height: 24px; border-radius: 7px; background: #C9CED8; flex-shrink: 0; }
.mk-icon.cg { background: #0E111A url("/assets/favicon.svg") center / 80% no-repeat; }
.mk-label { flex: 1; display: grid; font-size: 13px; }
.mk-label small { color: #6B7280; font-size: 11px; }
.mk-switch { width: 34px; height: 20px; border-radius: 999px; background: #C9CED8; position: relative; flex-shrink: 0; }
.mk-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.mk-switch.on { background: #0E9F6E; }
.mk-switch.on::after { left: 17px; }
.mk-radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #9AA3B2; }
.mk-radio.on { border-color: #0E9F6E; box-shadow: inset 0 0 0 3px #fff; background: #0E9F6E; }
.mk-note { font-size: 11px; color: #6B7280; margin-top: 10px; line-height: 1.4; }
.mk-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); display: grid; place-items: center; }
.mk-dialog { width: 84%; background: #fff; border-radius: 18px; padding: 16px 14px 10px; display: grid; gap: 8px; text-align: center; }
.mk-dialog p { font-size: 13px; line-height: 1.35; }
.mk-bell { font-size: 20px; }
.mk-btn { display: block; padding: 8px; border-radius: 999px; font-weight: 600; color: #0E6E50; }
.mk-btn.hl { background: #E2F7EF; box-shadow: 0 0 0 2px #00C483; }

/* Camera mock (first shot + calibration) */
.cam { position: absolute; inset: 0; background: #000; color: #fff; }
.cam-top { position: absolute; top: 0; left: 0; right: 0; height: 12%; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 14px 6px; font-size: 13px; z-index: 2; }
.cam-ratio { border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 6px; padding: 1px 6px; font-size: 11px; }
.cam-preview { position: absolute; left: 0; right: 0; overflow: hidden; }
.cam-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: 18%; display: flex; align-items: center; justify-content: space-around; z-index: 2; }
.cam[data-full="true"] .cam-top, .cam[data-full="true"] .cam-bottom { background: transparent; }
.cam-shutter { width: 46px; height: 46px; border-radius: 50%; border: 4px solid #fff; background: rgba(255, 255, 255, 0.25); }
.cam-thumb { width: 28px; height: 28px; border-radius: 6px; background: #3A4256; }
.cam-flip { font-size: 18px; }
.cam-handle { position: absolute; right: 0; top: 46%; width: 5px; height: 48px; border-radius: 4px 0 0 4px; background: #00E599; box-shadow: 0 0 10px rgba(0, 229, 153, 0.8); }
.calib-sim { display: grid; justify-items: center; gap: 12px; }
.calib-chips { justify-content: center; align-items: center; }
.calib-chips-label { font-size: 13px; color: var(--muted); }
.calib-frame { position: absolute; z-index: 3; border: 2px solid #00E599; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.28); cursor: move; touch-action: none; }
.calib-sim[data-state="good"] .calib-frame { border-color: #fff; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.28), 0 0 0 3px #00E599; }
.calib-grid { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(90deg, transparent calc(33.33% - 0.5px), rgba(255, 255, 255, 0.6) calc(33.33% - 0.5px), rgba(255, 255, 255, 0.6) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px), transparent calc(66.67% - 0.5px), rgba(255, 255, 255, 0.6) calc(66.67% - 0.5px), rgba(255, 255, 255, 0.6) calc(66.67% + 0.5px), transparent calc(66.67% + 0.5px)),
  linear-gradient(180deg, transparent calc(33.33% - 0.5px), rgba(255, 255, 255, 0.6) calc(33.33% - 0.5px), rgba(255, 255, 255, 0.6) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px), transparent calc(66.67% - 0.5px), rgba(255, 255, 255, 0.6) calc(66.67% - 0.5px), rgba(255, 255, 255, 0.6) calc(66.67% + 0.5px), transparent calc(66.67% + 0.5px)); }
.calib-handle { position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; touch-action: none; }
.calib-handle::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #00E599; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.35); }
.calib-handle[data-edge="top"] { left: 50%; top: 0; cursor: ns-resize; }
.calib-handle[data-edge="bottom"] { left: 50%; top: 100%; cursor: ns-resize; }
.calib-handle[data-edge="left"] { left: 0; top: 50%; cursor: ew-resize; }
.calib-handle[data-edge="right"] { left: 100%; top: 50%; cursor: ew-resize; }
.calib-feedback { text-align: center; max-width: 320px; font-size: 14px; }
.calib-sim[data-state="good"] .calib-feedback { color: var(--mint); }
.calib-done:disabled { opacity: 0.45; cursor: not-allowed; }
.calib-sim.saved .calib-done::after { content: " ✓"; }

@media (max-width: 760px) {
  .setup-step { grid-template-columns: 1fr; padding: 18px; }
  .setup-progress { gap: 6px; }
  .setup-progress span { width: 30px; height: 30px; font-size: 13px; }
  .setup-step .download-qr { display: none; }
}
