/* ==========================================================================
   ARtattoo — Kids Minimal UI (Ages 5–12)
   Bright white & pastel blue palette, high-contrast navy typography,
   oversized yellow tactile CTA, playful dinosaur AR illustration,
   and 3 simple icon benefits.
   ========================================================================== */

:root {
  --kids-bg: #ffffff;
  --kids-navy: #074c8c;
  --kids-navy-soft: #2b5b9e;
  --kids-cyan: #03b8de;
  --kids-cyan-word: #04a6d6;
  --kids-cyan-dark: #009cbf;
  --kids-yellow-top: #ffe735;
  --kids-yellow-mid: #ffdc18;
  --kids-yellow-bot: #f6c400;
  --kids-yellow: #ffdc00;
  --kids-yellow-border: #fff184;
  --kids-yellow-shadow: #e5a800;
  --kids-red: #ff3c48;
  --kids-font: "Fredoka", "Nunito", "Baloo 2", "Quicksand", ui-rounded, "Arial Rounded MT Bold", "Segoe UI", system-ui, sans-serif;
}

html,
body {
  background: var(--kids-bg) !important;
  color: var(--kids-navy) !important;
  font-family: var(--kids-font) !important;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
}

.ambient-backdrop {
  display: none !important;
}

.kids-home {
  position: relative;
  isolation: isolate;
  width: 100% !important;
  max-width: 560px !important;
  min-height: 100dvh;
  margin: 0 auto !important;
  padding: calc(14px + env(safe-area-inset-top)) 0 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0 !important;
  background: var(--kids-bg) !important;
  box-sizing: border-box;
  overflow: hidden;
}

.kids-home::before,
.kids-home::after {
  display: none !important;
}

/* Prominent Centered Brand Header */
.kids-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center !important;
  padding: 6px 20px 2px !important;
  position: relative;
  z-index: 3;
}

.kids-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.kids-logo-img {
  height: clamp(54px, 13.5vw, 66px);
  width: auto;
  display: block;
  object-fit: contain;
  user-select: none;
}

/* Seamless Hero Illustration & Content Section */
.kids-hero-section {
  width: 100%;
  flex: 1;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  padding: 0 !important;
  position: relative;
  z-index: 2;
}

.kids-illustration-wrap {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  line-height: 0;
  user-select: none;
  pointer-events: none;
}

.kids-hero-img {
  width: 100% !important;
  height: auto !important;
  max-height: 38dvh;
  object-fit: cover;
  display: block;
  border-radius: 0 !important;
  filter: none !important;
  user-select: none;
}

.kids-hero-copy {
  width: 100%;
  padding: 0 18px;
  margin-top: -2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.kids-hero-title {
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.kids-headline-top {
  display: block;
  color: var(--kids-navy) !important;
  font-size: clamp(2.25rem, 8.8vw, 3.1rem) !important;
  font-weight: 900 !important;
  line-height: 1.06 !important;
  letter-spacing: -0.02em !important;
}

.kids-headline-pill-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.kids-sparkle-side {
  width: clamp(24px, 6vw, 34px);
  height: auto;
  flex-shrink: 0;
}

.kids-bubble {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 30px 12px 36px !important;
  background: linear-gradient(180deg, #06c2e4 0%, #02b1d6 100%) !important;
  color: #ffffff !important;
  font-style: normal !important;
  font-size: clamp(2.35rem, 9.2vw, 3.25rem) !important;
  font-weight: 900 !important;
  line-height: 1.04 !important;
  letter-spacing: -0.015em !important;
  border-radius: 999px !important;
  transform: none !important;
  box-shadow: 0 7px 18px rgba(2, 177, 214, 0.26), inset 0 -4px 0 rgba(0, 132, 168, 0.35) !important;
}

.kids-inner-sparkles {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 38px;
  pointer-events: none;
}

/* Oversized Yellow Tactile Button */
.kids-cta-wrap {
  width: 100%;
  max-width: 450px;
  margin: 20px auto 0 !important;
  display: flex;
  justify-content: center;
}

.kids-start-btn {
  width: 100% !important;
  max-width: 450px !important;
  min-height: 78px !important;
  padding: 14px 28px !important;
  border-radius: 999px !important;
  border: 3px solid var(--kids-yellow-border) !important;
  background: linear-gradient(180deg, var(--kids-yellow-top) 0%, var(--kids-yellow-mid) 58%, var(--kids-yellow-bot) 100%) !important;
  color: var(--kids-navy) !important;
  box-shadow:
    0 10px 24px rgba(235, 180, 0, 0.34),
    inset 0 3px 0 rgba(255, 255, 255, 0.75),
    inset 0 -6px 0 rgba(214, 152, 0, 0.5) !important;
  font-family: var(--kids-font) !important;
  font-size: clamp(1.68rem, 6.6vw, 2.2rem) !important;
  font-weight: 900 !important;
  letter-spacing: -0.015em !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease !important;
}

.kids-start-btn:hover:not(:disabled) {
  filter: brightness(1.03);
  transform: translateY(-2px);
}

.kids-start-btn:active:not(:disabled) {
  transform: translateY(3px) !important;
}

.kids-start-btn:focus-visible {
  outline: 4px solid var(--kids-cyan);
  outline-offset: 3px;
}

.kids-start-btn:disabled {
  opacity: 0.72;
  cursor: wait;
}

.kids-cta-icon {
  width: clamp(38px, 9.5vw, 46px) !important;
  height: clamp(34px, 8.5vw, 40px) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  color: var(--kids-navy) !important;
  flex-shrink: 0;
}

.kids-cta-icon svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.kids-cta-label {
  line-height: 1.1;
}

/* 3 Prominent Kid-Friendly Benefits */
.kids-benefits {
  width: 100% !important;
  max-width: 480px;
  margin: clamp(18px, 3vh, 28px) auto 0 !important;
  padding: 0 14px !important;
  border: none !important;
  background: transparent !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px !important;
  text-align: center;
  align-items: start;
}

.kids-benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 4px 2px !important;
  box-shadow: none !important;
}

.kids-benefit-badge {
  width: clamp(74px, 19vw, 88px);
  height: clamp(74px, 19vw, 88px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: none;
  box-shadow: 0 6px 14px rgba(7, 76, 140, 0.06);
}

.kids-benefit-badge svg {
  width: 64%;
  height: 64%;
  display: block;
}

.badge-blue {
  background: #d6f3ee;
}

.badge-pink {
  background: #fde2e5;
}

.badge-purple {
  background: #ebe0fa;
}

.kids-benefit-item strong {
  font-size: clamp(1.05rem, 4.2vw, 1.28rem) !important;
  font-weight: 900 !important;
  line-height: 1.16 !important;
  color: var(--kids-navy) !important;
  letter-spacing: -0.01em;
}

/* Seamless Bottom Pastel Clouds */
.kids-clouds {
  width: 100%;
  margin-top: 12px;
  line-height: 0;
  pointer-events: none;
  user-select: none;
}

.kids-clouds svg {
  width: 100%;
  height: clamp(46px, 11vw, 72px);
  display: block;
}

/* ==========================================================================
   AR SCANNER HUD — Kids Minimal Style
   Centered top ARtattoo logo, hidden technical/target/status badges,
   and large red Record Video button with white camcorder icon & big white text.
   ========================================================================== */

#ar-loading-card,
#hud-target-name,
#hud-status-pill {
  display: none !important;
}

.ar-hud {
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom)) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-family: var(--kids-font) !important;
}

.ar-hud-top {
  width: 100% !important;
  max-width: 540px !important;
  display: grid !important;
  grid-template-columns: 46px 1fr 46px !important;
  align-items: start !important;
  justify-items: center !important;
  gap: 8px !important;
}

.ar-hud-top-spacer {
  width: 46px;
  height: 46px;
}

.hud-center-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.kids-hud-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kids-hud-logo-img {
  height: clamp(46px, 11.5vw, 56px);
  width: auto;
  display: block;
  object-fit: contain;
  user-select: none;
}

.hud-close-icon-btn {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border: none !important;
  color: var(--kids-navy) !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  box-shadow: 0 6px 16px rgba(7, 76, 140, 0.2) !important;
}

.hud-close-icon-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

.hud-rec-pill {
  background: #ffffff !important;
  color: var(--kids-red) !important;
  border: 2.5px solid var(--kids-red) !important;
  border-radius: 999px !important;
  padding: 6px 18px !important;
  font-family: var(--kids-font) !important;
  font-size: 1.12rem !important;
  font-weight: 900 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2) !important;
}

.ar-hud-bottom {
  width: 100% !important;
  max-width: 320px !important;
  margin: 0 auto !important;
  display: flex !important;
  justify-content: center !important;
}

.hud-record-only-row {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
}

#btn-hud-record.btn-hud-record-single {
  width: 100% !important;
  max-width: 300px !important;
  min-height: 62px !important;
  padding: 12px 24px !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #ff4b57 0%, #ff2e3d 58%, #e01b28 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow:
    0 10px 24px rgba(224, 27, 40, 0.42),
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -5px 0 rgba(153, 15, 26, 0.45) !important;
  font-family: var(--kids-font) !important;
  font-size: clamp(1.32rem, 5.2vw, 1.58rem) !important;
  font-weight: 900 !important;
  letter-spacing: -0.015em !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 11px !important;
}

#btn-hud-record.btn-hud-record-single:active {
  transform: translateY(3px) !important;
}

.hud-video-cam-icon {
  width: 26px !important;
  height: 20px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff !important;
}

.hud-video-cam-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hud-stop-rec-icon {
  display: none;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hud-stop-rec-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

#btn-hud-record-label {
  color: #ffffff !important;
  font-family: var(--kids-font) !important;
  font-size: inherit !important;
  font-weight: 900 !important;
  line-height: 1.1;
}

/* Recording State: Round Stop Icon Button Only (hide text "Stop & Save") */
#btn-hud-record.btn-hud-record-single.is-recording {
  width: 72px !important;
  height: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  min-height: 72px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: none !important;
  background: linear-gradient(180deg, #ff4b57 0%, #e01b28 100%) !important;
  box-shadow:
    0 10px 24px rgba(224, 27, 40, 0.52),
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -4px 0 rgba(140, 10, 18, 0.45) !important;
  gap: 0 !important;
}

#btn-hud-record.btn-hud-record-single.is-recording .hud-video-cam-icon,
#btn-hud-record.btn-hud-record-single.is-recording #btn-hud-record-label {
  display: none !important;
}

#btn-hud-record.btn-hud-record-single.is-recording .hud-stop-rec-icon {
  display: inline-flex !important;
}

/* Kids-Friendly Modals (Record Preview, Error, Privacy) */
.modal-backdrop {
  background: rgba(6, 60, 132, 0.42) !important;
  backdrop-filter: blur(8px) !important;
}

.modal-dialog {
  background: linear-gradient(180deg, #ffffff 0%, #f0faff 100%) !important;
  border: 3px solid #99e2ff !important;
  border-radius: 28px !important;
  color: var(--kids-navy) !important;
  box-shadow: 0 20px 50px rgba(6, 60, 132, 0.22) !important;
}

.modal-title {
  color: var(--kids-navy) !important;
  font-weight: 900 !important;
}

.modal-subtitle {
  color: #e11d48 !important;
}

.modal-desc {
  color: var(--kids-navy-soft) !important;
  font-weight: 600 !important;
}

.btn-modal-primary {
  background: var(--kids-yellow) !important;
  color: var(--kids-navy) !important;
  border: 2.5px solid var(--kids-yellow-border) !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 0 var(--kids-yellow-shadow) !important;
  font-weight: 900 !important;
}

.btn-modal-share {
  background: var(--kids-cyan) !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  font-weight: 900 !important;
}

.btn-modal-secondary {
  background: #e1f6ff !important;
  color: var(--kids-navy) !important;
  border: 2px solid #99e2ff !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
}

.privacy-item {
  background: #ffffff !important;
  border: 1.5px solid #cceeff !important;
  border-radius: 16px !important;
}

.privacy-item h4 {
  color: var(--kids-navy) !important;
}

.privacy-item p {
  color: var(--kids-navy-soft) !important;
}

@media (max-height: 700px) {
  .kids-home {
    padding-top: 8px !important;
  }
  .kids-hero-img {
    max-height: 31dvh;
  }
  .kids-cta-wrap {
    margin-top: 14px !important;
  }
  .kids-start-btn {
    min-height: 68px !important;
  }
  .kids-benefits {
    margin-top: 14px !important;
  }
  .kids-benefit-badge {
    width: 68px;
    height: 68px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kids-start-btn {
    transition: none !important;
    transform: none !important;
  }
}


/* Kids Minimal Recorded Video Preview */
.kids-preview-screen {
  align-items: center !important;
  padding: 8px !important;
  background: rgba(7, 76, 140, 0.28) !important;
  backdrop-filter: blur(10px) !important;
}

.kids-preview-container {
  position: relative;
  width: min(100%, 540px) !important;
  max-height: calc(100dvh - 12px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 12px 12px max(6px, env(safe-area-inset-bottom)) !important;
  gap: 8px !important;
  border: 3px solid #c8f2ff !important;
  border-radius: 28px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fdff 72%, #eafaff 100%) !important;
  box-shadow: 0 20px 55px rgba(7, 76, 140, 0.24) !important;
}

.kids-preview-header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
}

.kids-preview-logo {
  width: auto;
  height: clamp(34px, 8.8vw, 44px);
  object-fit: contain;
}

.kids-preview-title {
  margin: 0 !important;
  color: var(--kids-navy) !important;
  font-family: var(--kids-font) !important;
  font-size: clamp(1.35rem, 5.8vw, 1.85rem) !important;
  line-height: 1.05 !important;
  text-align: center;
  letter-spacing: -0.025em;
}

.kids-preview-subtitle {
  display: none !important;
}

.kids-video-card {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 52dvh !important;
  max-height: none !important;
  padding: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  border: 3px solid #bcefff !important;
  border-radius: 22px !important;
  background: #dff7ff !important;
  box-shadow: 0 8px 18px rgba(7, 76, 140, 0.12) !important;
  box-sizing: border-box;
}

.kids-video-card .record-preview-video {
  width: 100% !important;
  height: 54dvh !important;
  max-height: 58dvh !important;
  min-height: 300px !important;
  border-radius: 16px !important;
  object-fit: cover !important;
  background: #0b1726;
  display: block;
}

.kids-preview-actions {
  width: 100%;
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  margin: 2px 0 0 !important;
}

.kids-action-btn {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 999px !important;
  font-family: var(--kids-font) !important;
  font-size: 1rem !important;
  font-weight: 900 !important;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.kids-action-btn:active { transform: translateY(2px); }
.kids-action-btn:focus-visible { outline: 4px solid rgba(3, 184, 222, 0.35); outline-offset: 3px; }
.kids-btn-icon { width: 23px; height: 23px; display: inline-flex; flex: 0 0 auto; }
.kids-btn-icon svg { width: 100%; height: 100%; display: block; }

.kids-btn-save {
  color: var(--kids-navy) !important;
  background: #ffd600 !important;
  border: 2.5px solid #ffe968 !important;
  box-shadow: 0 5px 0 #e5a800, 0 8px 18px rgba(235, 180, 0, 0.22) !important;
}

.kids-btn-share, .kids-btn-again {
  color: var(--kids-navy) !important;
  background: #e0f7ff !important;
  border: 2.5px solid #4dd4f7 !important;
  box-shadow: 0 4px 0 #a7eafa, 0 6px 14px rgba(7, 76, 140, 0.08) !important;
}

.kids-action-btn:hover { filter: brightness(1.03); }
.kids-action-btn[hidden] { display: none !important; }

.kids-preview-clouds { width: calc(100% + 24px); margin: 2px -12px -1px; line-height: 0; pointer-events: none; }
.kids-preview-clouds svg { display: block; width: 100%; height: clamp(24px, 6vw, 38px); }

@media (max-width: 480px) {
  .kids-preview-screen { align-items: stretch !important; padding: 0 !important; }
  .kids-preview-container { width: 100% !important; min-height: 100dvh !important; max-height: 100dvh !important; overflow-y: auto !important; border: none !important; border-radius: 0 !important; padding: calc(10px + env(safe-area-inset-top)) 12px calc(10px + env(safe-area-inset-bottom)) !important; justify-content: space-between; }
  .kids-video-card { flex: 1 1 auto !important; min-height: 50dvh !important; }
  .kids-video-card .record-preview-video { height: 52dvh !important; max-height: 56dvh !important; min-height: 280px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .kids-action-btn { transition: none; }
}


