:root {
  color-scheme: dark;
  --font-primary: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg: #060a08;
  --bg-elevated: #0b120f;
  --surface: rgba(16, 27, 22, 0.92);
  --surface-solid: #101b16;
  --surface-soft: #14231c;
  --surface-hover: #192b22;
  --line: rgba(217, 255, 226, 0.1);
  --line-strong: rgba(217, 255, 226, 0.17);
  --text: #f3f8f4;
  --text-muted: #98aaa0;
  --text-faint: #68776e;
  --brand: #7df59c;
  --brand-strong: #41dd72;
  --brand-ink: #08220f;
  --cyan: #7ce8e1;
  --amber: #ffc86b;
  --coral: #ff8e79;
  --danger: #ff7a7a;
  --on-contrast-text: #f3f8f4;
  --on-contrast-muted: #a9bbb0;
  --on-contrast-accent: #7df59c;
  --secondary-control-bg: rgba(255,255,255,.045);
  --secondary-control-text: var(--text);
  --success-bg: rgba(125,245,156,.1);
  --success-text: var(--brand);
  --info-bg: rgba(124,232,225,.1);
  --info-text: var(--cyan);
  --warning-bg: rgba(255,200,107,.1);
  --warning-text: var(--amber);
  --skeleton-bg: var(--surface);
  --skeleton-highlight: rgba(255,255,255,.055);
  --mascot-glow: rgba(125,245,156,.2);
  --mascot-shadow: rgba(0,0,0,.38);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  --nav-height: 78px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 17px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html[data-theme='light'] {
  color-scheme: light;
  --bg: #f3f7f3;
  --bg-elevated: #ffffff;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-solid: #ffffff;
  --surface-soft: #edf4ee;
  --surface-hover: #e4eee6;
  --line: rgba(25, 59, 36, 0.16);
  --line-strong: rgba(25, 59, 36, 0.28);
  --text: #132019;
  --text-muted: #52665a;
  --text-faint: #697a70;
  --brand: #087f3d;
  --brand-strong: #056b33;
  --brand-ink: #f3fff6;
  --cyan: #087a75;
  --amber: #965300;
  --coral: #b9473f;
  --danger: #b4232c;
  --on-contrast-text: #f7fbf8;
  --on-contrast-muted: #b8c9be;
  --on-contrast-accent: #6df193;
  --secondary-control-bg: #ffffff;
  --secondary-control-text: #1b2a21;
  --success-bg: #e7f7ec;
  --success-text: #087f3d;
  --info-bg: #e2f5f3;
  --info-text: #087a75;
  --warning-bg: #fff2df;
  --warning-text: #965300;
  --skeleton-bg: #dfe8e2;
  --skeleton-highlight: rgba(255,255,255,.62);
  --mascot-glow: rgba(109,241,147,.24);
  --mascot-shadow: rgba(0,0,0,.3);
  --shadow: 0 22px 60px rgba(26, 54, 33, 0.13);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% -10%, rgba(91, 244, 133, 0.13), transparent 34%),
    radial-gradient(circle at 100% 25%, rgba(63, 193, 189, 0.08), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-primary);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; font-weight: 600; }
input { font-weight: 400; }
strong { font-weight: 600; }
small { font-weight: 400; }
button, [data-action], [data-tab] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.ambient {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.16;
}

.ambient-one { width: 320px; height: 320px; background: #37ef78; top: -200px; left: calc(50% - 390px); }
.ambient-two { width: 280px; height: 280px; background: #40cbc2; bottom: -170px; right: calc(50% - 420px); }

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(7, 14, 10, 0.88), rgba(5, 9, 7, 0.97));
  border-inline: 1px solid rgba(255,255,255,0.035);
}

html[data-theme='light'] .app-shell {
  background: linear-gradient(180deg, rgba(250,253,250,.96), rgba(242,247,243,.98));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: max(12px, env(safe-area-inset-top)) 18px 10px;
  background: linear-gradient(180deg, var(--bg) 50%, color-mix(in srgb, var(--bg), transparent 18%));
  backdrop-filter: blur(20px);
}

.brand-button, .brand-copy, .header-actions, .avatar, .section-heading,
.meta-row, .badge-row, .product-price-row, .order-top, .order-bottom,
.account-row, .toggle-row, .inline-stat, .video-actions, .player-meta,
.detail-topbar, .search-wrap, .empty-actions { display: flex; align-items: center; }

.brand-button {
  gap: 11px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-solid), var(--brand) 7%);
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
  transform-origin: 50% 70%;
  transition: transform .2s cubic-bezier(.2,.8,.25,1), border-color .2s ease, box-shadow .2s ease;
}
.brand-mark-image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.brand-button:hover .brand-mark { border-color: rgba(125,245,156,.34); box-shadow: 0 10px 26px rgba(0,0,0,.2); transform: translateY(-1px) scale(1.045); }
.brand-button:active .brand-mark { transform: translateY(1px) scale(.97); }
html[data-theme='light'] .brand-mark { box-shadow: 0 7px 20px rgba(24,53,34,.14); }

.brand-copy { align-items: flex-start; flex-direction: column; gap: 1px; }
.brand-copy strong { font: 700 14px/1.3 var(--font-primary); letter-spacing: 0.06em; }
.brand-copy small { color: var(--text-muted); font-size: 10px; letter-spacing: 0.035em; }

.header-actions { gap: 8px; }
.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
}

.icon-button svg, .nav-item svg, .back-button svg, .search-icon,
.feature-icon svg, .list-icon svg, .tiny-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button svg { width: 19px; height: 19px; }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border: 2px solid var(--surface-solid); border-radius: 50%; background: var(--coral); }

.avatar {
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(125,245,156,.25);
  border-radius: 50%;
  background: linear-gradient(145deg, #173d27, #0f2418);
  color: #a9f8bd;
  font: 700 12px/1.2 var(--font-primary);
}
.avatar-small { width: 40px; height: 40px; cursor: pointer; }
.avatar-large { width: 68px; height: 68px; font-size: 19px; box-shadow: 0 12px 36px rgba(45,214,94,.14); }

.app-content {
  width: 100%;
  min-height: calc(100vh - 72px);
  padding: 4px 16px calc(var(--nav-height) + var(--safe-bottom) + 28px);
}

.page { animation: page-enter .36s cubic-bezier(.2,.75,.25,1) both; }
@keyframes page-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

.eyebrow {
  margin: 0 0 7px;
  color: var(--brand);
  font: 600 10px/1.4 var(--font-primary);
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-primary); }
h1 { margin-bottom: 8px; font-size: clamp(27px, 8vw, 38px); font-weight: 700; line-height: 1.16; letter-spacing: -.035em; }
h2 { margin-bottom: 0; font-size: 19px; font-weight: 600; line-height: 1.35; letter-spacing: -.02em; }
h3 { margin-bottom: 0; font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: -.012em; }
p { color: var(--text-muted); line-height: 1.55; }

.hero-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 210px;
  padding: 23px;
  border: 1px solid rgba(125,245,156,.18);
  border-radius: var(--radius-xl);
  background: linear-gradient(115deg, rgba(15,40,24,.97), rgba(9,22,15,.93)), var(--surface);
  box-shadow: var(--shadow);
}

.hero-card::before {
  content: '';
  position: absolute;
  width: 210px;
  height: 210px;
  right: -68px;
  top: -52px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(121,255,157,.27), rgba(70,227,113,.06) 53%, transparent 68%);
}

.hero-card::after {
  content: 'D2';
  position: absolute;
  right: 18px;
  bottom: -26px;
  color: rgba(150,255,179,.055);
  font: 700 116px/1 var(--font-primary);
  letter-spacing: -.1em;
}

.hero-content { position: relative; z-index: 2; width: 100%; }
.hero-content h1, .hero-content > p { max-width: calc(100% - clamp(90px, 26vw, 132px)); }
.hero-card h1 { color: var(--on-contrast-text); }
.hero-card h1 span { color: var(--on-contrast-accent); }
.hero-card .eyebrow { color: var(--on-contrast-accent); }
.hero-card p { margin-bottom: 19px; color: var(--on-contrast-muted); font-size: 13px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.hero-mascot {
  position: absolute;
  z-index: 1;
  top: 42px;
  right: 8px;
  display: grid;
  place-items: center;
  width: clamp(104px, 28vw, 148px);
  aspect-ratio: 1;
  transform-origin: 50% 72%;
  animation: mascot-enter .72s cubic-bezier(.2,.8,.25,1.15) .12s both;
  transition: transform .22s cubic-bezier(.2,.8,.25,1);
}
.hero-mascot::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 76%;
  height: 76%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--mascot-glow), transparent 69%);
  filter: blur(7px);
}
.hero-mascot-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px var(--mascot-shadow));
  animation: mascot-idle 4.2s ease-in-out .84s infinite;
  will-change: transform;
}
.hero-mascot:hover { transform: translateY(-2px) scale(1.035); }
.hero-mascot:active { transform: translateY(1px) scale(.985); }

@keyframes mascot-enter {
  from { opacity: 0; transform: translateY(12px) scale(.94) rotate(-2deg); }
  70% { opacity: 1; transform: translateY(-3px) scale(1.015) rotate(.8deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
@keyframes mascot-idle {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); }
  50% { transform: translate3d(0, -5px, 0) rotate(1.2deg); }
}

.primary-button, .secondary-button, .soft-button, .text-button, .back-button, .play-button {
  border: 0;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.primary-button:active, .secondary-button:active, .soft-button:active, .icon-button:active { transform: scale(.97); }
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 17px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: var(--brand-ink);
  font-weight: 600;
  box-shadow: 0 10px 26px rgba(65,221,114,.16);
}
.secondary-button, .soft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--secondary-control-bg);
  color: var(--secondary-control-text);
  font-weight: 600;
}
.soft-button { background: var(--surface-soft); }
html[data-theme='light'] .hero-card .secondary-button {
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.1);
  color: var(--on-contrast-text);
}
.full-button { width: 100%; }
.text-button { padding: 4px 0; background: transparent; color: var(--brand); font-weight: 600; }

.section { margin-top: 28px; }
.section-heading { justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading p { margin: 4px 0 0; font-size: 12px; }
.section-link { border: 0; background: none; color: var(--brand); font-size: 12px; font-weight: 600; cursor: pointer; }

.carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 78%);
  gap: 12px;
  margin-inline: -16px;
  padding: 0 16px 6px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar, .chip-row::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; }
.carousel.products-carousel { grid-auto-columns: minmax(180px, 58%); }

.video-card, .product-card, .order-card, .content-card, .stat-card, .account-card,
.tutorial-card, .related-product, .profile-card, .state-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(0,0,0,.12);
}

.video-card, .product-card { overflow: hidden; border-radius: var(--radius-lg); cursor: pointer; }
.video-card:hover, .product-card:hover { border-color: var(--line-strong); }

.visual-art {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  overflow: hidden;
  min-height: 132px;
  padding: 15px;
  background: #163423;
}
.visual-art::before, .visual-art::after { content: ''; position: absolute; z-index: -1; border-radius: 999px; }
.visual-art::before { width: 150px; height: 150px; right: -45px; top: -55px; background: rgba(255,255,255,.17); filter: blur(2px); }
.visual-art::after { width: 95px; height: 95px; left: -34px; bottom: -45px; border: 22px solid rgba(255,255,255,.08); }
.visual-art.mint { background: linear-gradient(135deg,#0e3020,#2acb68); }
.visual-art.sky { background: linear-gradient(135deg,#102b44,#397ecf); }
.visual-art.coral { background: linear-gradient(135deg,#4b1e24,#ee765f); }
.visual-art.lime { background: linear-gradient(135deg,#25330d,#8fcb36); }
.visual-art.violet { background: linear-gradient(135deg,#2d1d45,#8064d8); }
.visual-art.aqua { background: linear-gradient(135deg,#0b3033,#2cb9b3); }
.visual-art.sand { background: linear-gradient(135deg,#3b3022,#c49b5d); }
.visual-art.blue { background: linear-gradient(135deg,#152d53,#3e6fdb); }
.visual-art.pink { background: linear-gradient(135deg,#431d35,#db579b); }
.visual-art.teal { background: linear-gradient(135deg,#0a3330,#279e91); }
.visual-art.amber { background: linear-gradient(135deg,#402d0c,#e1a12e); }
.visual-art.red { background: linear-gradient(135deg,#421416,#e24b4f); }

.art-icon {
  display: grid;
  place-items: center;
  min-width: 52px;
  height: 52px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 17px;
  background: rgba(0,0,0,.18);
  color: #fff;
  font: 700 20px/1.2 var(--font-primary);
  backdrop-filter: blur(12px);
}
.art-kicker { color: rgba(255,255,255,.86); font: 600 10px/1.4 var(--font-primary); letter-spacing: .08em; text-transform: uppercase; }
.duration { position: absolute; right: 11px; bottom: 11px; padding: 4px 7px; border-radius: 7px; background: rgba(0,0,0,.68); color: white; font-size: 10px; font-weight: 600; }
.play-orb { position: absolute; inset: 0; display: grid; place-items: center; }
.play-orb span { display: grid; place-items: center; width: 43px; height: 43px; padding-left: 3px; border: 1px solid rgba(255,255,255,.34); border-radius: 50%; background: rgba(3,8,5,.42); color: #fff; backdrop-filter: blur(10px); box-shadow: 0 9px 24px rgba(0,0,0,.22); }
.play-orb svg { width: 16px; height: 16px; fill: currentColor; }

.card-body { padding: 14px; }
.card-title { display: -webkit-box; overflow: hidden; margin-bottom: 8px; font: 600 14px/1.45 var(--font-primary); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.meta-row { flex-wrap: wrap; gap: 7px; color: var(--text-faint); font-size: 10px; }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.progress-track { width: 100%; height: 4px; margin-top: 11px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }
.progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--cyan)); }

.product-card .visual-art { min-height: 117px; }
.product-card .card-body { padding: 13px; }
.product-price-row { align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 10px; }
.price { color: var(--text); font: 600 15px/1.25 var(--font-primary); }
.old-price { display: block; margin-top: 5px; color: var(--text-faint); font-size: 10px; text-decoration: line-through; }
.stock-pill, .status-badge, .category-label, .deep-link-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-weight: 600;
}
.stock-pill { padding: 5px 8px; background: var(--success-bg); color: var(--success-text); font-size: 9px; }
.stock-pill.low { background: var(--warning-bg); color: var(--warning-text); }

.promo-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
  padding: 13px;
  border: 1px solid rgba(255,200,107,.17);
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(255,187,75,.09), rgba(255,255,255,.02));
}
.promo-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 12px; background: rgba(255,200,107,.13); font-size: 18px; }
.promo-strip strong { display: block; font-size: 12px; }
.promo-strip small { color: var(--text-muted); font-size: 10px; }
.promo-strip button { border: 0; background: transparent; color: var(--amber); font-size: 11px; font-weight: 600; cursor: pointer; }

.recent-order { padding: 16px; border-radius: var(--radius-lg); }
.order-top { justify-content: space-between; gap: 12px; }
.order-product { display: grid; grid-template-columns: 45px 1fr; align-items: center; gap: 11px; }
.mini-art { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 14px; color: white; font: 700 13px/1.2 var(--font-primary); }
.mini-art.visual-art { min-height: 45px; padding: 0; }
.order-product strong { display: block; font-size: 13px; }
.order-product small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 10px; }
.status-badge { padding: 6px 9px; font-size: 9px; letter-spacing: .035em; }
.status-completed, .status-paid { background: var(--success-bg); color: var(--success-text); }
.status-processing { background: var(--info-bg); color: var(--info-text); }
.status-pending { background: var(--warning-bg); color: var(--warning-text); }
.order-bottom { justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.order-bottom span { color: var(--text-muted); font-size: 10px; }
.order-bottom strong { font-size: 13px; }

.page-intro { margin: 6px 2px 20px; }
.page-intro p { margin-bottom: 0; font-size: 13px; }
.search-wrap { gap: 10px; height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.search-wrap:focus-within { border-color: rgba(125,245,156,.42); box-shadow: 0 0 0 3px rgba(125,245,156,.055); }
.search-icon { width: 18px; color: var(--text-muted); }
.search-wrap input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.search-wrap input::placeholder { color: var(--text-faint); }

.chip-row { display: flex; gap: 8px; margin: 14px -16px 20px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.chip { flex: 0 0 auto; min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-muted); font-size: 11px; font-weight: 600; cursor: pointer; }
.chip.active { border-color: rgba(125,245,156,.26); background: var(--brand); color: var(--brand-ink); }

.video-grid, .product-grid, .order-list, .account-list { display: grid; gap: 13px; }
.video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.video-grid .visual-art { min-height: 105px; }
.video-grid .card-body { padding: 12px; }
.video-grid .card-title { font-size: 12px; }
.video-grid .meta-row { font-size: 9px; }
.product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-grid .visual-art { min-height: 105px; }

.load-more { display: grid; place-items: center; min-height: 84px; margin-top: 14px; color: var(--text-muted); font-size: 11px; }
.loading-dots { display: flex; gap: 5px; margin-bottom: 8px; }
.loading-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); animation: dot-bounce .85s infinite alternate; }
.loading-dots i:nth-child(2) { animation-delay: .16s; }
.loading-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes dot-bounce { to { transform: translateY(-6px); opacity: .4; } }

.detail-topbar { justify-content: space-between; gap: 10px; margin: 2px 0 14px; }
.back-button { display: inline-grid; place-items: center; width: 41px; height: 41px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.back-button svg { width: 18px; height: 18px; }
.deep-link-pill { max-width: 74%; padding: 7px 10px; overflow: hidden; background: rgba(125,245,156,.08); color: var(--brand); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.video-player { position: relative; overflow: hidden; aspect-ratio: 16/9; border: 1px solid var(--line); border-radius: 23px; box-shadow: var(--shadow); }
.video-player .visual-art { width: 100%; height: 100%; min-height: 0; align-items: center; justify-content: center; }
.video-player .art-icon { width: 78px; height: 78px; border-radius: 25px; font-size: 29px; opacity: .5; }
.play-button { position: absolute; inset: 0; margin: auto; display: grid; place-items: center; width: 62px; height: 62px; padding-left: 4px; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; background: rgba(2,8,5,.6); color: white; backdrop-filter: blur(12px); }
.play-button svg { width: 21px; fill: currentColor; }
.player-progress { position: absolute; right: 14px; bottom: 12px; left: 14px; height: 4px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.22); }
.player-progress span { display: block; width: 34%; height: 100%; background: var(--brand); }
.player-label { position: absolute; left: 14px; top: 13px; padding: 5px 8px; border-radius: 8px; background: rgba(0,0,0,.58); color: white; font-size: 9px; font-weight: 600; backdrop-filter: blur(8px); }

.detail-copy { padding: 18px 2px 0; }
.detail-copy h1 { font-size: 23px; }
.player-meta { justify-content: space-between; gap: 12px; margin-bottom: 16px; color: var(--text-muted); font-size: 10px; }
.video-actions { gap: 9px; }
.video-actions button { flex: 1; }
.video-actions svg, .primary-button svg, .secondary-button svg { width: 16px; height: 16px; fill: currentColor; }
.secondary-button.is-active { border-color: rgba(125,245,156,.3); background: rgba(125,245,156,.1); color: var(--brand); }
.content-card { margin-top: 16px; padding: 17px; border-radius: var(--radius-lg); }
.content-card p:last-child { margin-bottom: 0; }
.description-text { margin: 8px 0 0; font-size: 12px; }
.inline-empty { margin-top: 0; box-shadow: none; }
.inline-empty p { margin: 0; font-size: 11px; }

.related-product { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; }
.related-product .mini-art { width: 64px; height: 64px; border-radius: 18px; font-size: 18px; }
.related-product .mini-art.visual-art { min-height: 64px; }
.related-product > div { min-width: 0; }
.related-product strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-product p { margin: 5px 0 0; font-size: 11px; }
.related-product .primary-button { min-height: 38px; padding-inline: 12px; font-size: 11px; }

.product-hero { position: relative; overflow: hidden; border-radius: 27px; box-shadow: var(--shadow); }
.product-hero .visual-art { min-height: 224px; align-items: flex-start; padding: 22px; }
.product-hero .art-icon { width: 76px; height: 76px; border-radius: 24px; font-size: 26px; }
.product-hero-copy { position: absolute; inset: auto 19px 18px; }
.product-hero-copy .category-label { padding: 6px 9px; margin-bottom: 9px; background: rgba(0,0,0,.28); color: rgba(255,255,255,.8); font-size: 9px; backdrop-filter: blur(10px); }
.product-hero-copy h1 { margin: 0; color: white; font-size: 27px; }

.detail-price { display: flex; align-items: end; justify-content: space-between; gap: 14px; padding: 18px 2px 0; }
.detail-price .price { font-size: 24px; }
.detail-price .old-price { display: inline; margin-left: 7px; }
.availability { text-align: right; }
.availability strong { display: block; color: var(--brand); font-size: 12px; }
.availability small { color: var(--text-muted); font-size: 10px; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 17px; }
.stat-card { padding: 13px 10px; border-radius: 17px; text-align: center; }
.stat-card strong { display: block; font: 600 15px/1.35 var(--font-primary); }
.stat-card span { display: block; margin-top: 5px; color: var(--text-muted); font-size: 9px; }

.benefit-list { display: grid; gap: 10px; margin: 13px 0 0; padding: 0; list-style: none; }
.benefit-list li { display: flex; align-items: center; gap: 9px; color: var(--text-muted); font-size: 12px; }
.benefit-list i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(125,245,156,.1); color: var(--brand); font-style: normal; font-size: 10px; }

.tutorial-card { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px; padding: 13px; border-radius: 19px; }
.tutorial-thumb { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: linear-gradient(135deg,#123722,#35d96f); color: white; }
.tutorial-thumb svg { width: 18px; fill: currentColor; }
.tutorial-card strong { display: block; font-size: 12px; }
.tutorial-card small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 10px; }
.tutorial-card button { border: 0; background: transparent; color: var(--brand); font-size: 10px; font-weight: 600; cursor: pointer; }

.sticky-action { position: sticky; bottom: calc(var(--nav-height) + var(--safe-bottom) + 9px); z-index: 12; display: grid; grid-template-columns: 54px 1fr; gap: 9px; margin-top: 20px; padding: 8px; border: 1px solid var(--line); border-radius: 21px; background: color-mix(in srgb, var(--surface-solid), transparent 6%); box-shadow: 0 18px 50px rgba(0,0,0,.32); backdrop-filter: blur(18px); }
.wishlist-button { display: grid; place-items: center; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); color: var(--text-muted); cursor: pointer; }
.wishlist-button.active { color: var(--coral); border-color: rgba(255,142,121,.25); background: rgba(255,142,121,.09); }
.wishlist-button svg { width: 20px; fill: currentColor; }

.filter-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 16px; padding: 5px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.filter-tabs button { min-height: 36px; border: 0; border-radius: 12px; background: transparent; color: var(--text-muted); font-size: 10px; font-weight: 600; cursor: pointer; }
.filter-tabs button.active { background: var(--surface-hover); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.order-card { padding: 15px; border-radius: 20px; }
.order-card .badge-row { flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.payment-line { display: flex; justify-content: space-between; gap: 12px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: 10px; }
.payment-line strong { color: var(--text); font-size: 12px; }

.profile-card { position: relative; overflow: hidden; padding: 20px; border-radius: var(--radius-xl); }
.profile-card::after { content: ''; position: absolute; right: -45px; top: -65px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgba(125,245,156,.17), transparent 67%); }
.profile-head { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; }
.profile-copy strong { display: block; font: 600 18px/1.35 var(--font-primary); }
.profile-copy span, .profile-copy small { display: block; color: var(--text-muted); font-size: 10px; }
.profile-copy span { margin-top: 4px; }
.profile-copy small { margin-top: 3px; color: var(--text-faint); }
.profile-stats { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.profile-stats div { text-align: center; }
.profile-stats div + div { border-left: 1px solid var(--line); }
.profile-stats strong { display: block; font: 600 16px/1.25 var(--font-primary); }
.profile-stats span { display: block; margin-top: 6px; color: var(--text-muted); font-size: 9px; }

.account-card { overflow: hidden; border-radius: var(--radius-lg); }
.account-row, .toggle-row { width: 100%; justify-content: space-between; gap: 13px; min-height: 62px; padding: 12px 14px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.account-row + .account-row, .toggle-row + .account-row { border-top: 1px solid var(--line); }
.account-row-main { display: flex; align-items: center; gap: 12px; }
.list-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: var(--surface-soft); color: var(--brand); }
.list-icon svg { width: 18px; height: 18px; }
.account-row strong, .toggle-row strong { display: block; font-size: 12px; }
.account-row small, .toggle-row small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 9px; }
.chevron { color: var(--text-faint); font-size: 20px; }

.switch { position: relative; width: 44px; height: 25px; border-radius: 999px; background: var(--surface-hover); box-shadow: inset 0 0 0 1px var(--line); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: var(--text-muted); transition: transform .2s ease, background .2s ease; }
.switch.on { background: rgba(125,245,156,.22); }
.switch.on::after { transform: translateX(19px); background: var(--brand); }

.history-list { display: grid; gap: 10px; }
.history-item { display: grid; grid-template-columns: 70px 1fr; gap: 11px; padding: 10px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); cursor: pointer; }
.history-item .visual-art { min-height: 65px; border-radius: 13px; padding: 8px; }
.history-item .art-icon { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 10px; font-size: 11px; }
.history-item strong { display: -webkit-box; overflow: hidden; font-size: 11px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.history-item small { display: block; margin-top: 6px; color: var(--text-muted); font-size: 9px; }
.history-item .progress-track { margin-top: 8px; }

.state-card { display: grid; place-items: center; min-height: 300px; padding: 30px 20px; border-radius: 24px; text-align: center; }
.state-icon { display: grid; place-items: center; width: 66px; height: 66px; margin-bottom: 16px; border-radius: 21px; background: var(--surface-soft); color: var(--brand); font-size: 28px; }
.state-card h2 { margin-bottom: 8px; }
.state-card p { max-width: 330px; margin-bottom: 18px; font-size: 12px; }
.empty-actions { justify-content: center; gap: 9px; }

.toast {
  position: fixed;
  z-index: 90;
  right: 16px;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 17px);
  left: 16px;
  width: min(calc(100% - 32px), 520px);
  margin: 0 auto;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(18,31,24,.96);
  color: #eef8f0;
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: none; }

.bottom-nav {
  position: fixed;
  z-index: 50;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 760px);
  min-height: calc(var(--nav-height) + var(--safe-bottom));
  margin: 0 auto;
  padding: 8px 8px calc(8px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated), transparent 4%);
  backdrop-filter: blur(22px);
  box-shadow: 0 -16px 50px rgba(0,0,0,.24);
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--text-faint);
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
}
.nav-item svg { width: 20px; height: 20px; }
.nav-item.active { color: var(--brand); }
.nav-item.active::after { content: ''; position: absolute; top: 0; width: 18px; height: 2px; border-radius: 99px; background: var(--brand); box-shadow: 0 0 12px var(--brand); }
.nav-featured { padding-top: 2px; }
.nav-featured-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-top: -18px; border: 5px solid var(--bg-elevated); border-radius: 15px; background: linear-gradient(145deg, var(--brand), var(--brand-strong)); color: var(--brand-ink); box-shadow: 0 8px 25px rgba(65,221,114,.2); }
.nav-featured-icon svg { width: 19px; height: 19px; }
.nav-featured.active::after { display: none; }

.initial-loader { padding-top: 8px; }
.skeleton { position: relative; overflow: hidden; border-radius: 18px; background: var(--skeleton-bg); }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--skeleton-highlight), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton-hero { height: 220px; border-radius: 28px; }
.skeleton-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.skeleton-card { height: 190px; }
.skeleton-line { width: 100%; height: 16px; margin-top: 22px; }
.skeleton-line.short { width: 65%; margin-top: 10px; }

.stagger > * { animation: card-enter .42s cubic-bezier(.2,.75,.25,1) both; }
.stagger > *:nth-child(2) { animation-delay: .04s; }
.stagger > *:nth-child(3) { animation-delay: .08s; }
.stagger > *:nth-child(4) { animation-delay: .12s; }
.stagger > *:nth-child(5) { animation-delay: .16s; }
.stagger > *:nth-child(6) { animation-delay: .2s; }
@keyframes card-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (min-width: 560px) {
  .app-content { padding-inline: 22px; }
  .carousel { margin-inline: -22px; padding-inline: 22px; grid-auto-columns: minmax(265px, 48%); }
  .carousel.products-carousel { grid-auto-columns: minmax(200px, 34%); }
  .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chip-row { margin-inline: -22px; padding-inline: 22px; }
  .hero-card { min-height: 228px; padding: 29px; }
  .hero-content { width: 68%; }
  .hero-content h1, .hero-content > p { max-width: none; }
  .hero-mascot { top: 18px; right: 18px; width: 190px; }
}

@media (max-width: 374px) {
  .app-content { padding-inline: 12px; }
  .app-header { padding-inline: 13px; }
  .brand-copy small { display: none; }
  .hero-card { padding: 19px; }
  .hero-content { width: 100%; }
  .hero-content h1, .hero-content > p { max-width: calc(100% - 76px); }
  .hero-mascot { top: 58px; right: -10px; width: 82px; }
  .carousel, .chip-row { margin-inline: -12px; padding-inline: 12px; }
  .product-grid, .video-grid { gap: 9px; }
  .related-product { grid-template-columns: 54px 1fr; }
  .related-product .primary-button { grid-column: 1 / -1; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero-mascot, .hero-mascot-image { animation: none !important; transform: none !important; transition: none !important; }
  .brand-mark, .brand-button:hover .brand-mark, .brand-button:active .brand-mark { transform: none !important; transition: none !important; }
}
