:root {
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --duration-press: 140ms;
  --duration-ui: 220ms;
  --duration-reveal: 500ms;
  --surface: rgba(255, 255, 255, .78);
  --hairline: rgba(0, 0, 0, .08);
  --shadow-soft: 0 24px 70px rgba(0, 0, 0, .08);
}

body { background: #fff; }
button, a, summary { outline-offset: 4px; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid rgba(0, 113, 227, .42); }

.topbar {
  height: 52px;
  border-color: transparent;
  background: rgba(248, 248, 250, .78);
  box-shadow: none;
  backdrop-filter: blur(24px) saturate(180%);
  transition: background var(--duration-ui) var(--ease-out), color var(--duration-ui) var(--ease-out), border-color var(--duration-ui) var(--ease-out);
}
.topbar.on-dark { background: rgba(24, 24, 27, .72); }
.top-buy { background: var(--orange); }
.on-dark .top-buy { background: var(--orange); color: #fff; }

h1, h2, h3 { font-optical-sizing: auto; }
h1 { font-weight: 700; letter-spacing: -.058em; }
h2 { font-weight: 800; letter-spacing: .06em; }
.section-copy { margin-bottom: 42px; }
.eyebrow { color: #9a5537; letter-spacing: .02em; }
.hero .eyebrow, .dark-section .eyebrow { color: rgba(255, 255, 255, .6); }
.button.primary { background: #0071e3; box-shadow: none; }

.button, .top-buy, .sticky-buy > a, .menu-trigger, .feature-card, .mood-card,
.health-tabs button, .response-tabs button, .app-tabs button, .sheet-head button,
.buy-colors button, .breath-control, .text-button {
  transition-timing-function: var(--ease-out);
}
.button, .top-buy, .sticky-buy > a, .menu-trigger, .feature-card, .mood-card,
.health-tabs button, .response-tabs button, .app-tabs button, .sheet-head button,
.buy-colors button, .breath-control, .text-button {
  transition-property: transform, background-color, color, box-shadow, opacity;
  transition-duration: var(--duration-press), var(--duration-ui), var(--duration-ui), var(--duration-ui), var(--duration-ui);
}
.button:active, .top-buy:active, .sticky-buy > a:active, .menu-trigger:active,
.feature-card:active, .mood-card:active, .health-tabs button:active,
.response-tabs button:active, .app-tabs button:active, .sheet-head button:active,
.buy-colors button:active, .breath-control:active,
.text-button:active { transform: scale(.97); }

.hero { background: radial-gradient(circle at 50% 45%, rgba(90, 106, 210, .19), transparent 30%), linear-gradient(180deg, #17181c, #050506 84%); }
.hero-product img { animation: heroSettle 800ms var(--ease-out) both; }
.hero-status { border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .07); box-shadow: 0 18px 55px rgba(0, 0, 0, .24); }
.scroll-hint i::after { animation-timing-function: var(--ease-out); }

.soft-section { background: #f5f5f7; }

.feature-grid, .mood-grid { gap: 10px; }
.feature-card, .mood-card { border-radius: 28px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .025); }
.feature-card.call { background: #eaf0f8; }
.feature-card.notice { background: #f5ece8; }
.feature-card.music { background: #eeecf5; }
.open-mark { background: rgba(255, 255, 255, .72); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }

.health-tabs, .response-tabs, .app-tabs { scroll-snap-type: x proximity; }
.health-tabs button.active, .response-tabs button.active, .app-tabs button.active { box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.health-card, .response-panel { border: 1px solid rgba(0, 0, 0, .035); border-radius: 32px; box-shadow: 0 20px 60px rgba(0, 0, 0, .055); }
.response-panel { opacity: 1; transform: none; transition: opacity var(--duration-ui) var(--ease-out), transform var(--duration-ui) var(--ease-out), filter var(--duration-ui) var(--ease-out); }
.response-panel.is-entering { opacity: .35; transform: translateY(4px); }
.response-panel.active { animation: none; }

.app-tabs button { position: relative; }
.phone-frame { border-color: #303136; box-shadow: 0 40px 90px rgba(0, 0, 0, .46); }
.app-screen { transition: opacity var(--duration-ui) var(--ease-out), transform var(--duration-ui) var(--ease-out); }
.app-screen-image { will-change: opacity, transform; }

.buy-config { border-color: rgba(0, 0, 0, .07); background: rgba(255, 255, 255, .82); box-shadow: var(--shadow-soft); }
.buy-product img { transition: filter 260ms var(--ease-out), transform 260ms var(--ease-out), opacity 260ms var(--ease-out); }
.sticky-buy { border-color: rgba(255, 255, 255, .72); background: rgba(250, 250, 252, .8); box-shadow: 0 12px 40px rgba(0, 0, 0, .12); transition: transform 260ms var(--ease-drawer), opacity 180ms var(--ease-out); }

.sheet-backdrop { transition: opacity 200ms var(--ease-out); }
.sheet { --sheet-drag-y: 0px; border: 1px solid rgba(255, 255, 255, .8); border-bottom: 0; background: rgba(248, 248, 250, .94); box-shadow: 0 -24px 80px rgba(0, 0, 0, .2); transform: translateY(calc(105% + var(--sheet-drag-y))); transition: transform 280ms var(--ease-drawer); will-change: transform; }
.sheet.open { transform: translateY(var(--sheet-drag-y)); }
.sheet.closing { transition-duration: 220ms; transition-timing-function: var(--ease-out); }
.sheet.dragging { transition: none; }
.sheet-head button { background: rgba(0, 0, 0, .06); }
.toast { box-shadow: 0 12px 34px rgba(0, 0, 0, .18); transition: opacity var(--duration-ui) var(--ease-out), transform var(--duration-ui) var(--ease-out); }

.enter { opacity: 0; transform: translateY(12px); transition: opacity var(--duration-reveal) var(--ease-out), transform var(--duration-reveal) var(--ease-out); }
.enter.visible { opacity: 1; transform: none; }
.feature-grid .enter:nth-child(2), .mood-grid .enter:nth-child(2) { transition-delay: 45ms; }
.feature-grid .enter:nth-child(3), .mood-grid .enter:nth-child(3) { transition-delay: 90ms; }
.feature-grid .enter:nth-child(4), .mood-grid .enter:nth-child(4) { transition-delay: 135ms; }

.emotion-orbit, .music-bars::before, .music-bars::after, .wave i, .speed-wave i, .data-beam i, .scroll-hint i::after { animation-play-state: paused; }
.is-in-view .emotion-orbit, .is-in-view .music-bars::before, .is-in-view .music-bars::after,
.is-in-view .wave i, .is-in-view .speed-wave i, .is-in-view .data-beam i, .hero.is-in-view .scroll-hint i::after { animation-play-state: running; }

@media (hover: hover) and (pointer: fine) {
  .feature-card:hover, .mood-card:hover { transform: translateY(-3px); }
  .button:hover, .top-buy:hover, .sticky-buy > a:hover { filter: brightness(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .enter { opacity: 0; transform: none; transition: opacity 180ms linear; }
  .enter.visible { opacity: 1; }
  .hero-product img, .scroll-hint i::after, .emotion-orbit, .music-bars::before,
  .music-bars::after, .wave i, .data-beam i, .breath-control { animation: none !important; }
  .sheet, .sheet-backdrop, .sticky-buy, .app-screen, .response-panel, .buy-product img {
    transition-duration: 180ms;
    transition-property: opacity, background-color, color;
  }
}

/* Spatial tab indicator */
.response-tabs, .app-tabs { position: relative; isolation: isolate; }
.response-tabs::before, .app-tabs::before {
  position: absolute;
  z-index: 0;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: var(--tab-width, calc((100% - 16px) / 3));
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  content: "";
  transform: translateX(var(--tab-left, 4px));
  transition: transform var(--duration-ui) var(--ease-out);
  pointer-events: none;
}
.response-tabs button, .app-tabs button { position: relative; z-index: 1; }
.response-tabs button.active, .app-tabs button.active {
  background: transparent;
  box-shadow: none;
}
/* Refined motion: GPU-only waves, restrained card reveals, and drag-safe sheets */
.music-bars::before, .music-bars::after, .wave i, .speed-wave i {
  transform-origin: 50% 100%;
  will-change: transform;
}
@keyframes music { from { transform: scaleY(.64); } to { transform: scaleY(1.04); } }
@keyframes wave { from { transform: scaleY(.62); } to { transform: scaleY(1.04); } }
@keyframes speedWave { from { transform: scaleY(.64); } to { transform: scaleY(1.05); } }

.health-card.health-image-card {
  transition: opacity 240ms var(--ease-out), transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
.health-image-card img { will-change: transform, opacity; }
.health-image-card.is-active img { animation: healthVisualInRefined 300ms var(--ease-out) both; }
.health-image-card::after, .health-image-card.is-active::after { display: none; animation: none; }
@keyframes healthVisualInRefined {
  from { opacity: .76; transform: scale(1.035); }
  to { opacity: 1; transform: scale(1.018); }
}

.ai-dialogue-message {
  filter: none;
  will-change: opacity;
  animation-play-state: paused;
}
.ai-dialogue-stage.is-in-view .ai-dialogue-message { animation-play-state: running; }
@keyframes dialogueMessageIn { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 760px) {
  .sheet { transform: translate(-50%, calc(105% + var(--sheet-drag-y))); }
  .sheet.open { transform: translate(-50%, var(--sheet-drag-y)); }
}

@media (prefers-reduced-motion: reduce) {
  .health-card.health-image-card { transition: opacity 180ms linear, box-shadow 180ms linear; transform: none; }
  .health-image-card.is-active img { animation: none; }
  .ai-dialogue-message { opacity: 1; animation: none !important; }
  .response-tabs::before, .app-tabs::before { transition: opacity 180ms linear; }
  .sheet { opacity: 0; transform: translateY(105%); transition: opacity 180ms linear; pointer-events: none; }
  .sheet.open { opacity: 1; transform: none; pointer-events: auto; }
  .sticky-buy { opacity: 0; visibility: hidden; transform: none; pointer-events: none; box-shadow: none; backdrop-filter: none; }
  .sticky-buy.visible { opacity: 1; visibility: visible; transform: none; pointer-events: auto; box-shadow: 0 10px 28px -12px rgba(0, 0, 0, .32), 0 2px 8px -5px rgba(0, 0, 0, .18); backdrop-filter: blur(22px) saturate(180%); }
}
@media (min-width: 760px) and (prefers-reduced-motion: reduce) {
  .sheet, .sheet.open { transform: translateX(-50%); }
  .sticky-buy, .sticky-buy.visible { transform: translateX(-50%); }
}
/* Keep the floating purchase shadow attached to the bar only. */
.sticky-buy:not(.visible),
.sticky-buy[aria-hidden="true"] {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
}
/* Sticky purchase shadow is rendered only while the bar is visible. */
.sticky-buy {
  isolation: isolate;
  box-shadow: none !important;
  filter: none !important;
}
.sticky-buy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8px 18px -5px;
  border-radius: inherit;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.sticky-buy.visible::before {
  display: block;
  opacity: 1;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .34), 0 3px 10px -6px rgba(0, 0, 0, .2);
}
.sticky-buy:not(.visible)::before,
.sticky-buy[aria-hidden="true"]::before,
.buy-screen-visible .sticky-buy::before {
  display: none !important;
  opacity: 0 !important;
  box-shadow: none !important;
}
.buy-screen-visible .sticky-buy {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}