/* ==========================================================================
   Squares Store — public site
   ========================================================================== */
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 32px); }
.flip { transition: transform .2s; }
html[dir="rtl"] .flip { transform: scaleX(-1); }

body {
  background:
    radial-gradient(1200px 600px at 85% -10%, color-mix(in oklab, var(--brand) 14%, transparent), transparent 60%),
    var(--bg);
}

/* ---------- nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--line); background: color-mix(in oklab, var(--bg) 88%, transparent); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; }
.brand-name { white-space: nowrap; unicode-bidi: plaintext; }
.nav-links { display: flex; gap: 4px; margin-inline-start: auto; }
.nav-links a {
  text-decoration: none; color: var(--muted); font-weight: 550; font-size: .93rem;
  padding: 8px 12px; border-radius: 10px; transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2);
  background: transparent; cursor: pointer; font-weight: 700; font-size: .95rem;
}
.lang-btn:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }
.menu-btn span:first-child { top: 15px; } .menu-btn span:last-child { top: 23px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------- hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; }
.hero-glow {
  position: absolute; inset: -20% -10% auto; height: 640px; pointer-events: none;
  background:
    radial-gradient(420px 300px at 70% 40%, color-mix(in oklab, var(--brand) 30%, transparent), transparent 70%),
    radial-gradient(360px 260px at 88% 70%, color-mix(in oklab, var(--brand-2) 22%, transparent), transparent 70%),
    radial-gradient(300px 200px at 20% 10%, color-mix(in oklab, var(--accent) 10%, transparent), transparent 70%);
  filter: blur(10px);
}
.hero-in { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2); color: var(--muted);
  font-size: .85rem; font-weight: 600;
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand-2) 22%, transparent); }
.hero h1 {
  font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.06; letter-spacing: -.035em;
  margin: 22px 0 18px; font-weight: 800; text-wrap: balance;
}
html[dir="rtl"] .hero h1 { letter-spacing: 0; line-height: 1.25; }
.hero h1 .hl {
  background: linear-gradient(100deg, var(--brand) 0%, var(--brand-2) 55%, var(--accent) 110%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.18rem); max-width: 560px; margin: 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-types { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.hero-types span {
  font-size: .82rem; color: var(--muted); padding: 5px 12px; border-radius: 999px;
  border: 1px dashed var(--line-2);
}

.hero-art { position: relative; aspect-ratio: 1; max-width: 500px; justify-self: center; width: 100%; }
.sq-grid {
  position: absolute; inset: 6%; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  transform: perspective(1000px) rotateX(18deg) rotateZ(-8deg);
}
.sq-grid i {
  border-radius: 22%; background: rgba(255,255,255,.035); border: 1px solid var(--line);
  animation: sq 6s ease-in-out infinite; animation-delay: calc(var(--d) * -1s);
}
.sq-grid i.c1 { background: linear-gradient(140deg, var(--brand), color-mix(in oklab, var(--brand) 60%, #000)); border-color: transparent; box-shadow: 0 18px 40px -16px var(--brand); }
.sq-grid i.c2 { background: linear-gradient(140deg, var(--brand-2), color-mix(in oklab, var(--brand-2) 60%, #000)); border-color: transparent; box-shadow: 0 18px 40px -16px var(--brand-2); }
.sq-grid i.c3 { background: linear-gradient(140deg, var(--accent), color-mix(in oklab, var(--accent) 60%, #000)); border-color: transparent; box-shadow: 0 18px 40px -16px var(--accent); }
@keyframes sq { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.float-card {
  position: absolute; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 16px; font-size: .88rem; font-weight: 600;
  background: color-mix(in oklab, var(--surface) 78%, transparent); backdrop-filter: blur(12px);
  border: 1px solid var(--line-2); box-shadow: var(--shadow);
  animation: float 7s ease-in-out infinite;
}
.float-card b { font-size: 1.5rem; line-height: 1; background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fc-icon { color: var(--brand-2); }
.fc-icon.wa { color: #25D366; }
.fc-1 { top: 6%; inset-inline-end: -2%; }
.fc-2 { bottom: 20%; inset-inline-start: -6%; animation-delay: -2s; }
.fc-3 { bottom: 0; inset-inline-end: 6%; animation-delay: -4s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- stats */
.stats-band { border-block: 1px solid var(--line); background: color-mix(in oklab, var(--surface) 50%, transparent); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 26px 20px; text-align: center; }
.stat + .stat { border-inline-start: 1px solid var(--line); }
.stat b { display: block; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .88rem; }

/* ---------- sections */
.section { padding: 96px 0; }
.section-alt { background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--surface) 55%, transparent) 20%, color-mix(in oklab, var(--surface) 55%, transparent) 80%, transparent); }
.sec-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand-2);
}
html[dir="rtl"] .eyebrow { letter-spacing: 0; }
.sec-head h2, .why-copy h2, .cta h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem); letter-spacing: -.025em; line-height: 1.12; margin: 10px 0 12px; text-wrap: balance;
}
html[dir="rtl"] .sec-head h2, html[dir="rtl"] .why-copy h2, html[dir="rtl"] .cta h2 { letter-spacing: 0; line-height: 1.3; }
.sec-sub { color: var(--muted); margin: 0; }

/* ---------- toolbar */
.toolbar { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); gap: 2px; overflow-x: auto; max-width: 100%; }
.seg button {
  border: 0; background: transparent; cursor: pointer; padding: 8px 16px; border-radius: 10px;
  font-weight: 600; font-size: .9rem; color: var(--muted); white-space: nowrap; display: inline-flex; gap: 8px; align-items: center;
}
.seg button .cnt { font-size: .72rem; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.06); }
.seg button[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg button[aria-selected="true"] .cnt { background: var(--brand-soft); color: color-mix(in oklab, var(--brand) 40%, #fff); }
.search {
  display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 46px; min-width: 260px; flex: 0 1 340px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s;
}
.search:focus-within { border-color: var(--brand-line); }
.search svg { width: 18px; height: 18px; color: var(--faint); flex: none; }
.search input { border: 0; background: transparent; outline: none; width: 100%; height: 100%; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
  padding: 6px 14px; border-radius: 999px; font-size: .86rem; font-weight: 550; transition: .2s;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--text); }

/* ---------- app cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface), color-mix(in oklab, var(--surface) 80%, var(--bg)));
  border: 1px solid var(--line); overflow: hidden; cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.7,.3,1), border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-5px); border-color: var(--brand-line); box-shadow: 0 26px 50px -24px color-mix(in oklab, var(--brand) 60%, #000); }
.card.featured { border-color: color-mix(in oklab, var(--brand) 32%, var(--line)); }
.cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .cover img { transform: scale(1.04); }
.cover-gen { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.cover-gen .g-sq { position: absolute; border-radius: 22%; opacity: .9; }
.cover-gen .g-ic {
  position: relative; width: 74px; height: 74px; border-radius: 20px; display: grid; place-items: center;
  background: rgba(255,255,255,.12); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.22);
  color: #fff; box-shadow: 0 20px 40px -14px rgba(0,0,0,.5);
}
.cover-gen .g-ic svg { width: 36px; height: 36px; }
.cover-gen .g-name { position: absolute; bottom: 14px; inset-inline-start: 16px; font-weight: 800; font-size: 1.05rem; color: #fff; opacity: .92; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.tbadge {
  position: absolute; top: 12px; inset-inline-start: 12px; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700;
  background: rgba(7, 11, 20, .72); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.14);
}
.tbadge svg { width: 13px; height: 13px; }
.rbadge {
  position: absolute; top: 12px; inset-inline-end: 12px; padding: 5px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #111;
  background: var(--accent);
}
.rbadge.new { background: var(--brand-2); color: #04121a; }
.card-body { padding: 18px 20px 6px; flex: 1; }
.card-cat { font-size: .78rem; color: var(--brand-2); font-weight: 650; }
.card h3 { margin: 4px 0 6px; font-size: 1.18rem; letter-spacing: -.01em; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-tech { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tag { font-size: .72rem; color: var(--muted); padding: 3px 9px; border-radius: 7px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px 18px; }
.price small { display: block; font-size: .72rem; color: var(--faint); font-weight: 600; }
.price b { font-size: 1.2rem; }
.price b span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.card-actions { display: flex; gap: 8px; }
.wa-mini { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #1FAF57; color: #fff; text-decoration: none; flex: none; }
.wa-mini svg { width: 20px; height: 20px; }
.wa-mini:hover { background: #23BF60; }

.skeleton { height: 380px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.step { position: relative; padding: 26px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.step-n { font-weight: 800; font-size: .9rem; color: var(--brand-2); font-variant-numeric: tabular-nums; }
.step h3 { margin: 12px 0 8px; font-size: 1.08rem; }
.step p { margin: 0; color: var(--muted); font-size: .92rem; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 38px; inset-inline-end: -14px; width: 10px; height: 10px; border-radius: 3px;
  background: var(--brand); transform: rotate(45deg); opacity: .6;
}

/* ---------- why */
.why { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.why-copy .sec-sub { font-size: 1.04rem; }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.why-card { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.why-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; background: var(--brand-soft); color: color-mix(in oklab, var(--brand) 40%, #fff); border: 1px solid var(--brand-line); }
.why-card h3 { margin: 14px 0 6px; font-size: 1.02rem; }
.why-card p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ---------- faq */
.faq { display: grid; gap: 10px; }
.faq details { border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); transition: border-color .2s; }
.faq details[open] { border-color: var(--brand-line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 20px; font-weight: 650; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand-2); transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans { padding: 0 20px 18px; color: var(--muted); }

/* ---------- CTA */
.cta {
  position: relative; overflow: hidden; text-align: center; padding: 64px 24px; border-radius: 28px;
  background:
    radial-gradient(500px 240px at 50% 0%, color-mix(in oklab, var(--brand) 35%, transparent), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--brand-line);
}
.cta p { color: var(--muted); max-width: 520px; margin: 0 auto; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.cta-sq { position: absolute; inset: 0; pointer-events: none; }
.cta-sq i { position: absolute; width: 64px; height: 64px; border-radius: 16px; opacity: .22; }
.cta-sq i:nth-child(1) { background: var(--brand); top: 22px; left: 6%; transform: rotate(12deg); }
.cta-sq i:nth-child(2) { background: var(--brand-2); bottom: 26px; left: 12%; width: 40px; height: 40px; transform: rotate(-10deg); }
.cta-sq i:nth-child(3) { background: var(--accent); top: 30px; right: 8%; width: 46px; height: 46px; transform: rotate(-14deg); }
.cta-sq i:nth-child(4) { background: var(--brand); bottom: 22px; right: 14%; transform: rotate(8deg); }

/* ---------- footer */
.footer { border-top: 1px solid var(--line); padding: 36px 0 44px; }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.socials { display: flex; gap: 8px; }
.socials a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--muted); text-decoration: none; transition: .2s; }
.socials a:hover { color: var(--text); border-color: var(--brand-line); background: var(--brand-soft); }
.socials svg { width: 18px; height: 18px; }
.foot-about { color: var(--muted); font-size: .9rem; margin: 0; max-width: 620px; flex: 1 1 320px; }
.copy { color: var(--faint); font-size: .86rem; margin: 0; width: 100%; }

.fab-wa {
  position: fixed; z-index: 60; bottom: 22px; inset-inline-end: 22px; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #1FAF57; color: #fff;
  box-shadow: 0 14px 30px -8px rgba(31,175,87,.7);
  transition: transform .2s;
}
.fab-wa:hover { transform: scale(1.06); }
.fab-wa svg { width: 30px; height: 30px; }
.fab-wa::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #1FAF57; animation: ring 2.4s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }

/* ---------- reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   App detail view
   ========================================================================== */
.detail { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: flex; flex-direction: column; animation: dIn .3s ease; }
.detail[hidden] { display: none; }
@keyframes dIn { from { opacity: 0; transform: translateY(12px); } }
.detail-bar { border-bottom: 1px solid var(--line); background: color-mix(in oklab, var(--bg) 90%, transparent); backdrop-filter: blur(12px); flex: none; }
.detail-bar-in { height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-bar-title { font-weight: 700; opacity: 0; transition: opacity .2s; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-bar-title.show { opacity: 1; }
.detail-scroll { overflow-y: auto; overflow-x: hidden; flex: 1; padding-bottom: 80px; }

.d-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; padding: 36px 0 20px; align-items: start; }
.d-top > * { min-width: 0; }
.gallery-main { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); cursor: zoom-in; }
.gallery-main img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-main .cover-gen { cursor: default; }
.thumbs { display: flex; max-width: 100%; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: none; width: 92px; aspect-ratio: 16/10; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: var(--surface-2); opacity: .6; transition: .2s; }
.thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button.on, .thumbs button:hover { opacity: 1; border-color: var(--brand); }

.d-info .card-cat { font-size: .85rem; }
.d-info h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); letter-spacing: -.025em; line-height: 1.1; margin: 8px 0 12px; }
html[dir="rtl"] .d-info h1 { letter-spacing: 0; line-height: 1.3; }
.d-info .lead { font-size: 1.05rem; }
.d-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.d-meta .tag { font-size: .8rem; padding: 5px 11px; }
.d-meta .tag.type { color: var(--text); border-color: var(--brand-line); background: var(--brand-soft); }
.d-cta { display: grid; gap: 10px; margin-top: 24px; }
.d-cta .row { display: flex; gap: 10px; flex-wrap: wrap; }
.d-cta .row .btn { flex: 1; }
.d-from { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; color: var(--muted); }
.d-from b { color: var(--text); font-size: 1.6rem; }

.d-sec { padding: 40px 0 0; }
.d-sec h2 { font-size: 1.4rem; margin: 0 0 18px; letter-spacing: -.01em; }
.d-desc { color: var(--muted); font-size: 1.04rem; max-width: 820px; white-space: pre-line; margin: 0; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.features li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.features li::before {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 7px; margin-top: 1px;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
  border: 1px solid var(--brand-line);
}

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan { position: relative; display: flex; flex-direction: column; padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.plan.hl { border-color: var(--brand); background: linear-gradient(180deg, color-mix(in oklab, var(--brand) 12%, var(--surface)), var(--surface)); box-shadow: 0 20px 50px -26px var(--brand); }
.plan .hl-tag { position: absolute; top: -11px; inset-inline-start: 20px; font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--brand); color: var(--on-brand); }
.plan h3 { margin: 0; font-size: 1.02rem; color: var(--muted); font-weight: 650; }
.plan .p { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 2px; }
.plan .p span { font-size: .9rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.plan .note { color: var(--muted); font-size: .9rem; margin: 0 0 18px; flex: 1; }
.pay-note { margin-top: 16px; color: var(--muted); font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); border: 1px dashed var(--line-2); }

.video { position: relative; aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: #000; max-width: 900px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }

/* ---------- lightbox */
.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(2,4,10,.94); display: grid; place-items: center; padding: 40px 70px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(100%, calc(100vw - 140px)); max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); object-fit: contain; border-radius: 12px; box-shadow: var(--shadow-lg); }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255,255,255,.06); color: #fff; font-size: 1.6rem; cursor: pointer; display: grid; place-items: center; }
.lb-btn:hover { background: rgba(255,255,255,.12); }
.lb-close { top: 18px; right: 18px; font-size: 1.1rem; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: .85rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1020px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2)::after { display: none; }
  .why { grid-template-columns: 1fr; }
  .d-top { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 880px) {
  .nav-links {
    position: fixed; top: 70px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 10px 16px 18px;
    background: color-mix(in oklab, var(--bg) 96%, transparent); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .2s;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 13px 12px; font-size: 1rem; }
  .menu-btn { display: block; }
  .nav-wa span { display: none; }
  .nav-wa { padding: .55em; }
  .hero { padding-top: 40px; }
  .hero-in { grid-template-columns: 1fr; gap: 20px; }
  .hero-art { max-width: 380px; order: -1; margin-bottom: -10px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section { padding: 72px 0; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .steps, .why-grid { grid-template-columns: 1fr; }
  .step::after { display: none; }
  .search { min-width: 0; flex: 1 1 100%; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 8px 10px; }
  .hero-art { max-width: 300px; }
  .float-card { font-size: .76rem; padding: 9px 12px; }
  .fc-2 { inset-inline-start: -2%; }
  .lightbox { padding: 60px 12px; }
  .lightbox img { max-width: calc(100vw - 24px); max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); }
  .gallery-main img { object-fit: contain; }
  .d-top { padding-top: 20px; }
  .lb-prev, .lb-next { top: auto; bottom: 10px; transform: none; }
  .brand-name { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
  .detail-bar-title { display: none; }
}
