/* ─── App UI (CSS-rendered from BYMER app screenshots) ───────────────────── */

.app-ui {
  gap: 8px;
  padding-bottom: 10px;
}

.app-ui--scroll {
  overflow-y: auto;
  scrollbar-width: none;
}

.app-ui--scroll::-webkit-scrollbar {
  display: none;
}

.app-ui__header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 2px;
}

.app-ui__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.app-ui__header-icon {
  position: absolute;
  right: 0;
  color: rgba(237, 239, 245, 0.55);
}

.app-ui__greeting {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-ui__hello {
  font-size: 0.62rem;
  color: rgba(237, 239, 245, 0.55);
}

.app-ui__hello strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 1px;
}

.app-ui__date {
  font-size: 0.58rem;
  color: rgba(237, 239, 245, 0.42);
}

.app-rings--home .app-ring__svg {
  width: 64px;
  height: 64px;
}

.app-rings--home .app-ring__wrap {
  width: 64px;
  height: 64px;
}

.app-ring__sub {
  font-size: 0.48rem;
  font-weight: 600;
  margin-top: -2px;
}

.app-ring__sub--green {
  color: #22c55e;
}

.app-ring__sub--gold {
  color: #fbbf24;
}

.app-ui__section-label {
  margin: 4px 0 0;
  font-size: 0.58rem;
  font-weight: 600;
  color: rgba(237, 239, 245, 0.45);
}

/* Home carousel card */
.app-home-card {
  border-radius: 16px;
  padding: 10px 10px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  position: relative;
  overflow: hidden;
  min-height: 108px;
  display: flex;
  flex-direction: column;
}

.app-home-card--hrv::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.16) 0%, transparent 55%);
  pointer-events: none;
}

.app-home-card__label {
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(237, 239, 245, 0.48);
}

.app-home-card__value-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 2px;
}

.app-home-card__value {
  font-size: 1.35rem;
  font-weight: 300;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.app-home-card__unit {
  font-size: 0.62rem;
  color: rgba(237, 239, 245, 0.52);
}

.app-home-card__meta {
  font-size: 0.5rem;
  color: rgba(237, 239, 245, 0.48);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-home-card__chart {
  margin-top: auto;
  width: 100%;
  height: 40px;
}

.app-home-card__dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
}

.app-home-card__dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.app-home-card__dots span.is-active {
  background: #d8b45a;
  width: 12px;
  border-radius: 999px;
}

/* Widgets row */
.app-ui__widgets-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.app-ui-widget {
  border-radius: 14px;
  padding: 8px;
  min-height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  overflow: hidden;
}

.app-ui-widget__label {
  font-size: 0.46rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.app-ui-widget--battery {
  background: linear-gradient(160deg, rgba(245, 158, 11, 0.12) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.app-ui-widget--battery .app-ui-widget__label {
  color: #f59e0b;
}

.app-ui-widget--water {
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.12) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.app-ui-widget--water .app-ui-widget__label {
  color: #3b82f6;
}

.app-ui-battery {
  position: relative;
  width: 36px;
  height: 52px;
  margin: 6px auto 0;
  border-radius: 10px;
  border: 2px solid rgba(245, 158, 11, 0.45);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.app-ui-battery::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  translate: -50% 0;
  width: 14px;
  height: 4px;
  border-radius: 2px 2px 0 0;
  background: rgba(245, 158, 11, 0.5);
}

.app-ui-battery__fill {
  width: 100%;
  height: calc(var(--progress, 0.28) * 100%);
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
  transition: height 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-ui-battery__num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.app-ui-water {
  margin-top: 4px;
  position: relative;
}

.app-ui-water__val {
  font-size: 0.88rem;
  font-weight: 700;
  display: block;
}

.app-ui-water__val small {
  font-size: 0.58rem;
  font-weight: 500;
  opacity: 0.7;
}

.app-ui-water__goal {
  font-size: 0.48rem;
  color: rgba(237, 239, 245, 0.45);
}

.app-ui-water__drop {
  position: absolute;
  right: 0;
  top: 4px;
  width: 22px;
  height: 28px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 40% 30%, #60a5fa 0%, #2563eb 100%);
  opacity: 0.85;
}

/* Mini metrics */
.app-ui-mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.app-ui-mini {
  border-radius: 12px;
  padding: 6px 4px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.app-ui-mini__icon {
  display: block;
  font-size: 0.55rem;
  opacity: 0.7;
  margin-bottom: 2px;
}

.app-ui-mini__val {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
}

.app-ui-mini__lbl {
  display: block;
  font-size: 0.42rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(237, 239, 245, 0.42);
  margin-top: 1px;
}

.app-ui-mini--spo2 .app-ui-mini__val {
  color: #06b6d4;
}

.app-ui-mini--stress .app-ui-mini__val {
  color: #8b5cf6;
}

.app-ui-mini--temp .app-ui-mini__val {
  color: #f59e0b;
}

/* Bottom nav */
.app-bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: auto;
  padding: 6px 4px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.app-bottom-nav__item {
  color: rgba(216, 180, 90, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.app-bottom-nav__item.is-active {
  color: #d8b45a;
  background: radial-gradient(circle, rgba(216, 180, 90, 0.22) 0%, transparent 70%);
  box-shadow: 0 0 16px rgba(216, 180, 90, 0.15);
}

/* Smaller phone for gallery */
.phone-mock--sm {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 9 / 19;
  border-radius: 32px;
  padding: 8px;
}

.phone-mock--sm::before {
  width: 60px;
  height: 18px;
  top: 12px;
}

.phone-mock--sm .phone-mock__screen {
  border-radius: 24px;
  padding: 36px 10px 10px;
  gap: 6px;
}

.phone-mock--pro .phone-mock__screen {
  background: #000;
}

/* App gallery */
.app-gallery {
  padding-top: 0;
}

.app-gallery__grid {
  display: grid;
  gap: 28px 20px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 900px) {
  .app-gallery__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.app-gallery__item {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.app-gallery__item figcaption {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(237, 239, 245, 0.62);
  text-align: center;
}

/* Sleep screen */
.app-sleep-chart {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 8px 8px 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sleep-hypno {
  width: 100%;
  height: 48px;
  display: block;
}

.sleep-hypno--wide {
  height: 64px;
  margin-top: 12px;
}

.app-sleep-chart__times {
  display: flex;
  justify-content: space-between;
  font-size: 0.48rem;
  color: rgba(237, 239, 245, 0.38);
  margin-top: 4px;
}

.app-sleep-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.app-sleep-stat {
  border-radius: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.app-sleep-stat__lbl {
  display: block;
  font-size: 0.48rem;
  color: rgba(237, 239, 245, 0.48);
}

.app-sleep-stat__val {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 2px;
}

.app-sleep-stat__pct {
  display: block;
  font-size: 0.48rem;
  color: rgba(237, 239, 245, 0.42);
}

.app-sleep-stat--deep .app-sleep-stat__val {
  color: #bf5af2;
}

.app-sleep-stat--rem .app-sleep-stat__val {
  color: #64d2ff;
}

.app-sleep-stat--light .app-sleep-stat__val {
  color: #0a84ff;
}

.app-sleep-stat--awake .app-sleep-stat__val {
  color: #ff9f0a;
}

.app-sleep-stat.is-highlight {
  border-color: rgba(255, 159, 10, 0.35);
}

/* Activity tabs */
.app-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.46rem;
}

.app-tabs span {
  flex: 1;
  text-align: center;
  padding: 4px 2px;
  border-radius: 999px;
  color: rgba(237, 239, 245, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-tabs span.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(216, 180, 90, 0.25);
}

.app-activity-hero {
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(160deg, rgba(0, 216, 164, 0.14) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(0, 216, 164, 0.15);
}

.app-activity-hero__tag {
  font-size: 0.46rem;
  color: rgba(237, 239, 245, 0.45);
}

.app-activity-hero__title {
  margin: 4px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #00d8a4;
}

.app-activity-hero__sub {
  margin: 2px 0 0;
  font-size: 0.48rem;
  color: rgba(237, 239, 245, 0.48);
  line-height: 1.35;
}

.app-activity-hero__foot {
  margin-top: 8px;
  font-size: 0.48rem;
}

.app-activity-hero__foot strong {
  display: block;
  font-size: 0.55rem;
}

.app-activity-hero__foot span {
  color: rgba(237, 239, 245, 0.42);
}

.app-schedule-btn {
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(216, 180, 90, 0.35);
  background: transparent;
  color: var(--text);
  font-size: 0.52rem;
  font-weight: 600;
  text-align: left;
  cursor: default;
}

.app-workout-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-workout-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.52rem;
}

.app-workout-list__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 216, 164, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  flex-shrink: 0;
}

.app-workout-list__name {
  flex: 1;
  font-weight: 600;
  line-height: 1.2;
}

.app-workout-list__name small {
  display: block;
  font-weight: 400;
  font-size: 0.44rem;
  color: rgba(237, 239, 245, 0.42);
}

.app-workout-list__kcal {
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid rgba(216, 180, 90, 0.3);
  font-size: 0.44rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Nutrition */
.app-nutrition-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.app-nutrition-toggle {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.46rem;
}

.app-nutrition-toggle span {
  padding: 4px 8px;
  border-radius: 999px;
  color: rgba(237, 239, 245, 0.45);
}

.app-nutrition-toggle span.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.app-nutrition-add {
  padding: 5px 8px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #d8b45a 0%, #c49a3c 100%);
  color: #0b0e11;
  font-size: 0.46rem;
  font-weight: 800;
  cursor: default;
  white-space: nowrap;
}

.app-nutrition-card {
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.app-nutrition-card__lbl {
  font-size: 0.46rem;
  color: rgba(237, 239, 245, 0.45);
}

.app-nutrition-card__val {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 2px;
}

.app-nutrition-card__val small {
  font-size: 0.62rem;
  font-weight: 500;
}

.app-nutrition-macros {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 8px;
}

.app-nutrition-macro {
  border-radius: 10px;
  padding: 6px 4px;
  text-align: center;
  border: 1px solid rgba(216, 180, 90, 0.2);
  font-size: 0.55rem;
  font-weight: 700;
}

.app-nutrition-macro small {
  display: block;
  font-size: 0.4rem;
  font-weight: 500;
  color: rgba(237, 239, 245, 0.42);
  margin-top: 2px;
}

.app-nutrition-macro--protein {
  border-color: rgba(0, 216, 164, 0.35);
}

.app-nutrition-empty {
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.app-nutrition-empty__icon {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.app-nutrition-empty p {
  margin: 0 0 4px;
  font-size: 0.48rem;
  color: rgba(237, 239, 245, 0.48);
  line-height: 1.35;
}

.app-nutrition-empty p strong {
  color: var(--text);
  font-size: 0.55rem;
}

.app-nutrition-cta {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #d8b45a 0%, #c49a3c 100%);
  color: #0b0e11;
  font-size: 0.48rem;
  font-weight: 800;
  cursor: default;
}

/* BYMER PRO */
.app-pro-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.app-pro-coin {
  font-size: 0.48rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(216, 180, 90, 0.35);
  white-space: nowrap;
}

.app-pro-title {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.app-pro-plus {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d8b45a, #c49a3c);
  color: #0b0e11;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
}

.app-pro-card {
  position: relative;
  border-radius: 16px;
  padding: 10px;
  margin-bottom: 6px;
  background: rgba(22, 22, 24, 0.95);
  border: 1px solid rgba(216, 180, 90, 0.12);
  overflow: hidden;
}

.app-pro-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% -20%, rgba(216, 180, 90, 0.12) 0%, transparent 55%);
  pointer-events: none;
}

.app-pro-card--chat::before {
  background: radial-gradient(circle at 50% -20%, rgba(6, 182, 212, 0.12) 0%, transparent 55%);
}

.app-pro-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.42rem;
  font-weight: 700;
  background: rgba(216, 180, 90, 0.15);
  color: #d8b45a;
  border: 1px solid rgba(216, 180, 90, 0.25);
  margin-bottom: 6px;
}

.app-pro-badge--teal {
  background: rgba(6, 182, 212, 0.12);
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.25);
}

.app-pro-history {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.42rem;
  color: #d8b45a;
}

.app-pro-card__head {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.app-pro-card__icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #d8b45a, #a67c2e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.app-pro-card__icon--teal {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.app-pro-card__head strong {
  display: block;
  font-size: 0.62rem;
  margin-bottom: 2px;
}

.app-pro-card__head p {
  margin: 0;
  font-size: 0.46rem;
  color: rgba(237, 239, 245, 0.48);
  line-height: 1.35;
}

.app-pro-pricing {
  position: relative;
  z-index: 1;
  margin: 8px 0;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(216, 180, 90, 0.2);
  font-size: 0.44rem;
  color: rgba(237, 239, 245, 0.55);
}

.app-pro-btn {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #d8b45a 0%, #c49a3c 100%);
  color: #0b0e11;
  font-size: 0.48rem;
  font-weight: 800;
  cursor: default;
  margin-top: 4px;
}

.app-pro-btn--outline {
  background: transparent;
  border: 1px solid rgba(216, 180, 90, 0.4);
  color: #d8b45a;
}

/* Sleep metric hero card on landing */
.app-metric-card--hero {
  min-height: auto;
}

.app-metric-card--sleep-head {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.app-metric-card__sleep-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 159, 10, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.app-metric-card--sleep-head strong {
  display: block;
  font-size: 0.95rem;
}

.app-metric-card__chev {
  margin-left: auto;
  font-size: 1.2rem;
  color: rgba(237, 239, 245, 0.35);
}

.app-metric-card__value--sleep-duration {
  font-size: 1.75rem;
  font-weight: 300;
}

.app-metric-card__badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
}

.app-metric-card__badge--ok {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.sleep-phase-pills--inline {
  margin-top: 10px;
}

.sleep-phase-pill--deep {
  color: #bf5af2;
  background: rgba(191, 90, 242, 0.1);
  border-color: rgba(191, 90, 242, 0.25);
}

@media (max-width: 600px) {
  .app-gallery__grid {
    grid-template-columns: 1fr;
    max-width: 240px;
    margin-inline: auto;
  }
}
