:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

button {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease, background-color 150ms ease;
}

button:active:not(:disabled) {
  transform: scale(0.985);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

#appShell {
  height: min(calc(100svh - 0.5rem), 840px);
  min-height: min(100svh, 620px);
}

@supports (height: 100dvh) {
  #appShell {
    height: min(calc(100dvh - 0.5rem), 840px);
    min-height: min(100dvh, 620px);
  }
}

@media (min-width: 640px) {
  #appShell {
    height: min(calc(100svh - 2rem), 840px);
  }
}

@supports (height: 100dvh) {
  @media (min-width: 640px) {
    #appShell {
      height: min(calc(100dvh - 2rem), 840px);
    }
  }
}

.screen-stack {
  position: relative;
  min-height: 0;
  height: 100%;
}

.screen {
  position: absolute;
  inset: 0;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.screen.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.screen-body {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

.screen-content {
  padding-top: 1rem;
}

.screen[data-screen="1"] .screen-content,
.screen[data-screen="2"] .screen-content,
.screen[data-screen="3"] .screen-content,
.screen[data-screen="4"] .screen-content {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.theme-preview-shell {
  position: relative;
  width: min(70vw, 288px);
  height: min(70vw, 288px);
  opacity: 0;
  transform: scale(1.06);
  filter: blur(6px);
  transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1), transform 240ms cubic-bezier(0.22, 1, 0.36, 1), filter 240ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform, filter;
}

.theme-preview-shell.is-revealed {
  opacity: 1;
  transform: scale(1.10);
  filter: blur(0);
}



.theme-preview-ripple,
.theme-preview-ripple-click {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.theme-preview-ripple {
  width: 136%;
  height: 136%;
  border: 1.5px solid rgba(16, 185, 129, 0.18);
  opacity: 0;
  z-index: 0;
  animation: water-ripple 4.6s ease-out infinite;
}

.theme-preview-ripple-2 {
  animation-delay: 2.3s;
}

.theme-preview-ripple-click {
  width: 120%;
  height: 120%;
  border: 2px solid rgba(16, 185, 129, 0.36);
  opacity: 0;
  z-index: 1;
}

.theme-preview-ripple-click.is-active {
  animation: ripple-click 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.preview-canvas {
  position: relative;
  z-index: 2;
}

.review-preview-shell {
  width: min(78vw, 280px);
  height: min(78vw, 280px);
}

.preview-canvas,
.thumbnail-canvas {
  display: block;
}

.screen-header {
  min-height: 42px;
}

.step-title {
  font-size: 1.42rem;
  line-height: 1.16;
  font-weight: 600;
}

.step-subtitle {
  font-size: 0.95rem;
  line-height: 1.55;
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: rgb(15 23 42);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.mirror-feed {
  transform: none;
}

.photo-thermal-shell {
  width: clamp(184px, 52vw, 248px);
  height: clamp(184px, 52vw, 248px);
}

.camera-stage {
  height: clamp(220px, 34svh, 360px);
  min-height: 220px;
  max-height: 360px;
}

@supports (height: 100dvh) {
  .camera-stage {
    height: clamp(220px, 34dvh, 360px);
  }
}

.preset-list {
  margin-inline: auto;
  width: 100%;
  max-width: 260px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.preset-grid-scroll {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 118px));
  gap: 0.65rem;
  max-height: min(42vh, 320px);
  min-height: min(34vh, 252px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.2rem;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 185, 129, 0.35) transparent;
  justify-content: center;
}

.preset-grid-scroll::-webkit-scrollbar {
  width: 6px;
}

.preset-grid-scroll::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.28);
  border-radius: 999px;
}

.preset-card {
  position: relative;
  display: block;
  min-width: 0;
  border-radius: 24px;
  border: 0.5px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.4rem;
  text-align: left;
  color: rgb(51 65 85);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.preset-card.is-active {
  border-color: rgb(16 185 129);
  color: white;
  background: linear-gradient(135deg, rgb(16 185 129), rgb(34 211 238));
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.22);
}

.preset-card-preview {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.92), rgba(224, 242, 254, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.preset-card-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 36%);
  pointer-events: none;
}

.preset-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.preset-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.02) 0%, rgba(15,23,42,0.18) 62%, rgba(15,23,42,0.42) 100%);
  pointer-events: none;
}

.preset-page--2 .preset-card {
  padding: 0.5rem;
}

.preset-page--2 .preset-card-preview {
  aspect-ratio: 1 / 1;
}

.preset-card.is-active .preset-card-preview {
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.12));
}

.preset-card.is-active .preset-card-image {
  transform: scale(1.01);
}

.preset-card-copy {
  display: none;
}

.preset-card-title {
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  color: white;
  text-shadow: 0 1px 8px rgba(15, 23, 42, 0.24);
}

.preset-card-note {
  margin-top: 0.24rem;
  font-size: 0.60rem;
  line-height: 1.28;
  color: rgba(255, 255, 255, 0.86);
  text-shadow: 0 1px 8px rgba(15, 23, 42, 0.2);
}

.preset-card.is-active .preset-card-note {
  color: rgba(255, 255, 255, 0.84);
}

.step-panel {
  margin-inline: auto;
  max-width: 320px;
}

.step-note {
  color: rgb(100 116 139);
}

.step-status {
  line-height: 1.35;
}

.step-status:empty {
  display: none;
}

.step-action-btn {
  display: inline-flex;
  min-width: min(100%, 240px);
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, rgb(16 185 129), rgb(34 211 238));
  padding: 0.95rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: white;
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.28);
}

.edit-disclosure {
  margin-inline: auto;
  width: 100%;
  max-width: 320px;
  display: flex;
  justify-content: center;
  text-align: center;
}

.edit-disclosure-toggle {
  padding: 0;
  font-size: 0.84rem;
  font-weight: 500;
  color: rgb(148 163 184);
  text-decoration: underline;
  text-decoration-color: rgba(148, 163, 184, 0.45);
  text-underline-offset: 0.18rem;
}

.edit-disclosure-toggle:disabled {
  opacity: 0.5;
}

.step-skip-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin-inline: auto;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 500;
  color: rgb(148 163 184);
  text-decoration: underline;
  text-decoration-color: rgba(148, 163, 184, 0.45);
  text-underline-offset: 0.18rem;
  box-shadow: none;
}

.step-skip-link:disabled {
  opacity: 0.45;
  text-decoration: none;
}

.edit-disclosure-panel {
  margin-top: 0.75rem;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.84);
  padding: 0.34rem;
  backdrop-filter: blur(8px);
}

.edit-disclosure-item {
  display: block;
  width: 100%;
  border-radius: 14px;
  padding: 0.78rem 0.9rem;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgb(71 85 105);
}

.edit-disclosure-item + .edit-disclosure-item {
  margin-top: 0.12rem;
}

.edit-disclosure-item:hover,
.edit-disclosure-item:focus-visible {
  background: rgba(241, 245, 249, 0.9);
  outline: none;
}

.camera-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 20;
  display: inline-flex;
  height: 74px;
  width: 74px;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(12px);
}

.thermal-canvas {
  display: block;
  image-rendering: pixelated;
}

#photoThermalPreview,
#photoCapturePreview {
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,1) 62%, rgba(0,0,0,0.92) 76%, rgba(0,0,0,0.45) 88%, transparent 100%);
  mask-image: radial-gradient(circle, rgba(0,0,0,1) 62%, rgba(0,0,0,0.92) 76%, rgba(0,0,0,0.45) 88%, transparent 100%);
}

#navShell {
  position: sticky;
  bottom: 0;
  padding-bottom: calc(env(safe-area-inset-bottom) + 16px);
}

.progress-dot {
  transition: background-color 140ms ease, transform 140ms ease;
}

.progress-dot.active {
  background: rgb(16 185 129);
  transform: scale(1.12);
}

.swipe-handle {
  touch-action: none;
  user-select: none;
  cursor: grab;
  transition: transform 160ms ease;
  will-change: transform;
}

.swipe-track::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12), transparent 48%);
  opacity: var(--swipe-progress, 0);
  pointer-events: none;
}

.swipe-card.dragging .swipe-handle {
  cursor: grabbing;
  transition: none;
}

.saving-overlay,
.barcode-overlay {
  display: none;
}

.saving-overlay.visible,
.barcode-overlay.visible {
  display: flex;
}

.screen[data-screen="1"] {
  overflow-y: hidden;
}

.screen[data-screen="1"] .screen-content {
  display: flex;
  flex-direction: column;
}

.screen[data-screen="1"] .theme-preview-hero {
  margin-top: 1rem;
}

.screen[data-screen="1"] .preset-list {
  margin-top: 1rem;
}

@media (max-height: 820px) {
  #appShell {
    height: calc(100dvh - 0.25rem);
  }

  .screen-body {
    padding-bottom: 92px;
  }

  .screen-content {
    padding-top: 0.7rem;
  }

  .theme-preview-shell {
    width: min(64vw, 214px);
    height: min(64vw, 214px);
  }

  

.theme-preview-ripple,
.theme-preview-ripple-click {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.theme-preview-ripple {
  width: 136%;
  height: 136%;
  border: 1.5px solid rgba(16, 185, 129, 0.18);
  opacity: 0;
  z-index: 0;
  animation: water-ripple 4.6s ease-out infinite;
}

.theme-preview-ripple-2 {
  animation-delay: 2.3s;
}

.theme-preview-ripple-click {
  width: 120%;
  height: 120%;
  border: 2px solid rgba(16, 185, 129, 0.36);
  opacity: 0;
  z-index: 1;
}

.theme-preview-ripple-click.is-active {
  animation: ripple-click 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.preview-canvas {
  position: relative;
  z-index: 2;
}

.review-preview-shell {
    width: min(72vw, 242px);
    height: min(72vw, 242px);
  }

  .preset-list {
    margin-top: 0.9rem;
  }

  .preset-card-preview {
    aspect-ratio: 1 / 1;
  }

  .preset-grid-scroll {
    max-height: min(27vh, 190px);
  }

  .preset-card {
    padding: 0.4rem;
  }

  .preset-card-title {
    margin-top: 0.42rem;
    font-size: 0.72rem;
  }

  .preset-card-note {
    font-size: 0.58rem;
  }

  .camera-stage {
    height: min(30vh, 260px);
    min-height: 200px;
    max-height: 248px;
  }

  .photo-thermal-shell {
    width: min(54vw, 208px);
    height: min(54vw, 208px);
  }

  .step-panel {
    max-width: 300px;
  }

  .step-note,
  #recordVideoHint,
  #photoCaptureHint {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .step-action-btn {
    padding-block: 0.82rem;
  }

  .edit-disclosure-toggle,
  .step-skip-link {
    font-size: 0.8rem;
  }

  .edit-disclosure-item {
    padding: 0.72rem 0.82rem;
    font-size: 0.84rem;
  }

  .camera-play-btn {
    height: 66px;
    width: 66px;
  }

  .loading-mark {
    padding: 1rem 1.25rem;
  }

  .loading-logo {
    height: 56px;
  }
}

@media (max-height: 900px) and (min-height: 821px) {
  .theme-preview-shell {
    width: min(66vw, 224px);
    height: min(66vw, 224px);
  }

  

.theme-preview-ripple,
.theme-preview-ripple-click {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.theme-preview-ripple {
  width: 136%;
  height: 136%;
  border: 1.5px solid rgba(16, 185, 129, 0.18);
  opacity: 0;
  z-index: 0;
  animation: water-ripple 4.6s ease-out infinite;
}

.theme-preview-ripple-2 {
  animation-delay: 2.3s;
}

.theme-preview-ripple-click {
  width: 120%;
  height: 120%;
  border: 2px solid rgba(16, 185, 129, 0.36);
  opacity: 0;
  z-index: 1;
}

.theme-preview-ripple-click.is-active {
  animation: ripple-click 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.preview-canvas {
  position: relative;
  z-index: 2;
}

.review-preview-shell {
    width: min(76vw, 268px);
    height: min(76vw, 268px);
  }

  .screen[data-screen="1"] .preset-list {
    margin-top: 0.8rem;
  }

  .screen[data-screen="1"] .preset-card-preview {
    aspect-ratio: 1 / 1;
  }

  .screen[data-screen="1"] .preset-page--2 .preset-card-preview {
    aspect-ratio: 1 / 1;
  }

  .step-title {
    font-size: 1.38rem;
  }
}

@media (max-height: 720px) {
  .theme-preview-shell {
    width: min(58vw, 188px);
    height: min(58vw, 188px);
  }

  

.theme-preview-ripple,
.theme-preview-ripple-click {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.theme-preview-ripple {
  width: 136%;
  height: 136%;
  border: 1.5px solid rgba(16, 185, 129, 0.18);
  opacity: 0;
  z-index: 0;
  animation: water-ripple 4.6s ease-out infinite;
}

.theme-preview-ripple-2 {
  animation-delay: 2.3s;
}

.theme-preview-ripple-click {
  width: 120%;
  height: 120%;
  border: 2px solid rgba(16, 185, 129, 0.36);
  opacity: 0;
  z-index: 1;
}

.theme-preview-ripple-click.is-active {
  animation: ripple-click 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.preview-canvas {
  position: relative;
  z-index: 2;
}

.review-preview-shell {
    width: min(72vw, 244px);
    height: min(72vw, 244px);
  }

  .screen[data-screen="1"] .preset-list {
    margin-top: 0.65rem;
  }

  .screen[data-screen="1"] .preset-card {
    padding: 0.56rem;
  }

  .screen[data-screen="1"] .preset-card-preview {
    aspect-ratio: 1 / 1;
  }

  .screen[data-screen="1"] .preset-page--2 .preset-card-preview {
    aspect-ratio: 1 / 1;
  }

  .step-title {
    font-size: 1.32rem;
  }
}

.review-hero {
  margin-inline: auto;
  width: 100%;
  max-width: 340px;
}

.review-video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255,255,255,0.92);
  padding: 0.75rem;
  box-shadow: 0 20px 48px rgba(16, 185, 129, 0.10);
}

.review-video-stage {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  border-radius: 22px;
  background: linear-gradient(180deg, #0f172a, #134e4a);
}

.review-video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.review-video-placeholder-card {
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.16);
  padding: 0.7rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  backdrop-filter: blur(10px);
}

.review-sticker-overlay {
  position: absolute;
  right: -6px;
  top: 18px;
  z-index: 2;
  width: 132px;
  height: 132px;
  transform: rotate(-6deg);
  filter: drop-shadow(0 18px 28px rgba(15, 23, 42, 0.24));
  animation: breathe 4s ease-in-out infinite;
}

.review-play-btn {
  z-index: 3;
}

.toast-stack {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(92vw, 360px);
  pointer-events: none;
}

.toast {
  border-radius: 999px;
  background: rgba(255,255,255,0.94);
  color: rgb(5 150 105);
  padding: 0.8rem 1rem;
  text-align: center;
  font-size: 0.87rem;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(-8px);
  animation: toast-in 220ms ease forwards, toast-out 220ms ease 1.35s forwards;
}

.toast--notice {
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.86);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.22);
}

@keyframes breathe {
  0%, 100% { transform: rotate(-6deg) scale(1); }
  50% { transform: rotate(-6deg) scale(1.01); }
}

@keyframes water-ripple {
  0% { opacity: 0.42; transform: translate(-50%, -50%) scale(0.78); }
  68% { opacity: 0.12; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.24); }
}

@keyframes ripple-click {
  0% { opacity: 0.62; transform: translate(-50%, -50%) scale(0.72); }
  60% { opacity: 0.18; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.42); }
}

@keyframes toast-in {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(-8px); }
}


.step-logo-chip .step-logo {
  height: 1.8rem;
}

.screen[data-screen="1"] .theme-preview-hero {
  margin-top: 1.35rem;
  margin-bottom: 1.5rem;
}

.screen[data-screen="1"] .preset-list {
  margin-top: 0;
}

.screen[data-screen="1"] .screen-content {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.review-video-shell video {
  pointer-events: none;
}

.review-play-btn {
  z-index: 30;
  pointer-events: auto;
}

.camera-play-btn {
  touch-action: manipulation;
}

.video-playback-hit-area {
  z-index: 15;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

#playRecordedVideoBtn {
  pointer-events: none;
}


/* v1.7.7 premium joyful background + adaptive small-phone tuning */
.kk-body {
  background:
    radial-gradient(circle at 12% 10%, rgba(251, 191, 36, 0.16), transparent 20%),
    radial-gradient(circle at 88% 14%, rgba(236, 72, 153, 0.12), transparent 20%),
    radial-gradient(circle at 20% 90%, rgba(16, 185, 129, 0.14), transparent 24%),
    radial-gradient(circle at 82% 82%, rgba(34, 211, 238, 0.16), transparent 24%),
    linear-gradient(180deg, #fff7ed 0%, #fdf2f8 18%, #ecfdf5 48%, #ecfeff 78%, #ffffff 100%);
}

.decor-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.decor-leaf {
  position: absolute;
  opacity: 0.12;
  filter: blur(0.2px) drop-shadow(0 8px 18px rgba(15, 23, 42, 0.06));
  transform-origin: center center;
  animation: decor-float 12s ease-in-out infinite;
}

.decor-leaf-a { width: 78px; left: -8px; top: 92px; --rot: -12deg; }
.decor-leaf-b { width: 62px; right: 6px; top: 180px; --rot: 18deg; animation-delay: -3.2s; }
.decor-leaf-c { width: 54px; left: 14px; bottom: 170px; --rot: -24deg; animation-delay: -6.4s; }
.decor-leaf-d { width: 88px; right: -18px; bottom: 90px; --rot: 22deg; animation-delay: -1.8s; }

@keyframes decor-float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-8px) rotate(calc(var(--rot, 0deg) + 2deg)); }
}

#appShell {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.74), rgba(255,255,255,0.68)),
    radial-gradient(circle at top, rgba(255,255,255,0.55), transparent 40%);
}

.theme-preview-hero { margin-bottom: 1rem; }
.preset-list { margin-top: 1.15rem; max-width: 280px; }
.preset-grid-scroll { max-height: min(36vh, 300px); gap: 0.7rem; }
.preset-card { border: 0.5px solid rgba(255, 255, 255, 0.72); }
.step-logo { height: 1.8rem; }

@media (max-width: 390px) {
  body.kk-body { padding: 0.35rem; }
  #appShell { max-width: 100%; border-radius: 24px; }
  .screen-body { padding-bottom: 98px; }
  .screen-content { padding-top: 0.75rem; }
  .screen-header { min-height: 38px; }
  .step-title { font-size: 1.28rem; line-height: 1.12; }
  .step-subtitle { font-size: 0.9rem; line-height: 1.45; max-width: 272px; }
  .theme-preview-shell { width: min(74vw, 276px); height: min(74vw, 276px); }
  .theme-preview-hero { margin-top: 0.8rem; margin-bottom: 1.15rem; }
  .preset-list { max-width: 250px; margin-top: 1.2rem; }
  .preset-grid-scroll { grid-template-columns: repeat(2, minmax(0, 102px)); max-height: min(39vh, 290px); gap: 0.55rem; }
  .preset-card { border-radius: 20px; padding: 0.32rem; }
  .preset-card-preview { border-radius: 15px; }
  .camera-stage { height: min(34vh, 312px); min-height: 220px; max-height: 300px; }
  .photo-thermal-shell { width: min(58vw, 214px); height: min(58vw, 214px); }
  .review-video-stage { aspect-ratio: 1 / 1; width: 100%; height: auto; min-height: 0; }
  .review-sticker-overlay { width: 116px; height: 116px; top: 14px; right: -10px; }
  .camera-play-btn { width: 68px; height: 68px; }
  #navShell { padding-bottom: calc(env(safe-area-inset-bottom) + 12px); }
}

@media (max-width: 340px) {
  .preset-grid-scroll { grid-template-columns: repeat(2, minmax(0, 96px)); }
  .step-title { font-size: 1.18rem; }
  .step-subtitle { font-size: 0.86rem; }
}


@media (max-height: 820px) {
  .screen-body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .screen-content { padding-top: 0.72rem; }
  .step-title { font-size: 1.28rem; }
  .step-subtitle { font-size: 0.88rem; line-height: 1.42; }
  .camera-stage { height: clamp(208px, 31svh, 300px); }
  .photo-thermal-shell { width: clamp(172px, 46vw, 216px); height: clamp(172px, 46vw, 216px); }
  .hero-carousel { padding-top: 0.3rem; padding-bottom: 0.75rem; }
}

@supports (height: 100dvh) {
  @media (max-height: 820px) {
    .camera-stage { height: clamp(208px, 31dvh, 300px); }
  }
}

@media (max-height: 720px) {
  .screen-header { min-height: 36px; }
  .screen-body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .screen[data-screen="2"] .screen-content,
  .screen[data-screen="3"] .screen-content,
  .screen[data-screen="4"] .screen-content { gap: 0.45rem; }
  .screen[data-screen="2"] .mt-5,
  .screen[data-screen="3"] .mt-6,
  .screen[data-screen="4"] .mt-6 { margin-top: 0.8rem !important; }
  .camera-stage { height: clamp(190px, 29svh, 264px); min-height: 190px; }
  .photo-thermal-shell { width: clamp(156px, 42vw, 196px); height: clamp(156px, 42vw, 196px); }
  .step-action-btn { padding-top: 0.88rem; padding-bottom: 0.88rem; }
}

@supports (height: 100dvh) {
  @media (max-height: 720px) {
    .camera-stage { height: clamp(190px, 29dvh, 264px); }
  }
}

#deleteVideoBtn.hidden,
#deletePhotoBtn.hidden {
  display: none;
}

.review-video-shell video {
  pointer-events: none;
}

.review-play-btn {
  pointer-events: auto;
}


.preview-canvas {
  position: relative;
  z-index: 2;
}

#designPreviewCanvas {
  animation: premium-float 6.8s ease-in-out infinite;
  transform-origin: 50% 50%;
}

.theme-preview-shell {
  overflow: visible;
}

.theme-preview-shell::before {
  content: '';
  position: absolute;
  inset: 7%;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,0.7), transparent 34%), radial-gradient(circle at 70% 76%, rgba(255,255,255,0.3), transparent 26%);
  pointer-events: none;
  z-index: 1;
}

.capture-target-frame {
  z-index: 3;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.26);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 0 0 1px rgba(15,23,42,0.04);
}

.capture-target-frame::before,
.capture-target-frame::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.14);
}

.capture-target-frame::after {
  inset: 14px;
  border: 0;
  background:
    linear-gradient(#ffffff,#ffffff) left top/26px 2px no-repeat,
    linear-gradient(#ffffff,#ffffff) left top/2px 26px no-repeat,
    linear-gradient(#ffffff,#ffffff) right top/26px 2px no-repeat,
    linear-gradient(#ffffff,#ffffff) right top/2px 26px no-repeat,
    linear-gradient(#ffffff,#ffffff) left bottom/26px 2px no-repeat,
    linear-gradient(#ffffff,#ffffff) left bottom/2px 26px no-repeat,
    linear-gradient(#ffffff,#ffffff) right bottom/26px 2px no-repeat,
    linear-gradient(#ffffff,#ffffff) right bottom/2px 26px no-repeat;
  opacity: 0.8;
}

.premium-delete-chip {
  border-radius: 999px;
  padding: 0.42rem 0.92rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ef4444;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(254, 202, 202, 0.92);
  box-shadow: 0 10px 26px rgba(15,23,42,0.08);
  backdrop-filter: blur(14px);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.premium-delete-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(239,68,68,0.14);
  background: rgba(255,255,255,0.96);
}

.confirm-dialog {
  position: relative;
}

.confirm-dialog-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(16,185,129,0.14), transparent 38%), radial-gradient(circle at bottom, rgba(34,211,238,0.12), transparent 34%);
  pointer-events: none;
}

.confirm-overlay.visible,
.saving-overlay.visible,
.barcode-overlay.visible {
  display: flex;
}

@keyframes premium-float {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -6px, 0) scale(1.01); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@media (max-width: 420px) {
  .capture-target-frame::after {
    background:
      linear-gradient(#ffffff,#ffffff) left top/22px 2px no-repeat,
      linear-gradient(#ffffff,#ffffff) left top/2px 22px no-repeat,
      linear-gradient(#ffffff,#ffffff) right top/22px 2px no-repeat,
      linear-gradient(#ffffff,#ffffff) right top/2px 22px no-repeat,
      linear-gradient(#ffffff,#ffffff) left bottom/22px 2px no-repeat,
      linear-gradient(#ffffff,#ffffff) left bottom/2px 22px no-repeat,
      linear-gradient(#ffffff,#ffffff) right bottom/22px 2px no-repeat,
      linear-gradient(#ffffff,#ffffff) right bottom/2px 22px no-repeat;
  }
}


/* v1.7.7 premium refinements */
.confirm-overlay,
.edit-overlay {
  backdrop-filter: none;
}

.confirm-dialog,
.edit-dialog {
  position: relative;
}

.video-target-frame,
.photo-target-frame {
  inset: 22px !important;
  border-radius: 26px;
}

.screen[data-screen="3"] .step-subtitle {
  font-size: 0.95rem;
  line-height: 1.55;
}

.glass-camera-shell,
.photo-camera-shell {
  background:
    radial-gradient(circle at 50% 12%, rgba(255,255,255,0.26), transparent 24%),
    radial-gradient(circle at 18% 20%, rgba(110,211,245,0.14), transparent 22%),
    radial-gradient(circle at 82% 82%, rgba(16,185,129,0.14), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.10)) !important;
  border: 1px solid rgba(255,255,255,0.32) !important;
  box-shadow:
    0 18px 40px rgba(15,23,42,0.14),
    inset 0 1px 0 rgba(255,255,255,0.34) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.photo-camera-shell::before,
.photo-camera-shell::after,
.review-video-shell--sticker-only::before,
.review-video-shell--sticker-only::after {
  content: '';
  position: absolute;
  width: 74px;
  height: 74px;
  background: url('./bg_leaf.png') center/contain no-repeat;
  opacity: 0.052;
  pointer-events: none;
  filter: saturate(0.8) blur(2.8px);
  z-index: 0;
}

.photo-camera-shell::before,
.review-video-shell--sticker-only::before {
  left: -10px;
  top: -10px;
  transform: rotate(-16deg) scale(0.72);
}

.photo-camera-shell::after,
.review-video-shell--sticker-only::after {
  right: -10px;
  bottom: -10px;
  transform: rotate(18deg) scale(0.76);
  opacity: 0.046;
}

.photo-camera-shell > *,
.review-video-shell--sticker-only > * {
  position: relative;
  z-index: 1;
}

.screen[data-screen="3"] .absolute.left-4.right-4.top-4 {
  z-index: 12;
}

#deletePhotoBtn {
  background: #ffffff;
  border-color: rgba(254, 202, 202, 1);
  box-shadow: 0 12px 30px rgba(15,23,42,0.12);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#deletePhotoBtn:hover {
  background: #fff7f7;
}


.review-sticker-overlay {
  right: -20px;
  top: 12px;
  width: 158px;
  height: 158px;
  filter: drop-shadow(0 24px 34px rgba(15, 23, 42, 0.28));
  animation: premium-review-float 7.2s ease-in-out infinite;
}

#reviewStickerCanvas {
  transform-origin: 50% 50%;
}

.edit-dialog-item {
  display: block;
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  padding: 1rem 1rem;
  text-align: left;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgb(51 65 85);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.edit-dialog-item:hover,
.edit-dialog-item:focus-visible {
  background: linear-gradient(180deg, rgba(236,253,245,0.98), rgba(236,254,255,0.98));
  border-color: rgba(16, 185, 129, 0.26);
  outline: none;
}

@keyframes premium-review-float {
  0%, 100% { transform: rotate(-6deg) translate3d(0, 0, 0) scale(1); }
  50% { transform: rotate(-6deg) translate3d(0, -8px, 0) scale(1.02); }
}

@media (max-width: 390px) {
  .review-sticker-overlay {
    width: 136px;
    height: 136px;
    right: -14px;
    top: 12px;
  }
}


#recordingCountdown {
  z-index: 25;
  text-shadow: 0 12px 36px rgba(15, 23, 42, 0.34);
  letter-spacing: -0.04em;
}

#recordingCountdown:not(.hidden) {
  display: flex;
}

#videoPlaybackPreview,
#reviewVideo {
  transform: none !important;
}

.confirm-overlay,
.edit-overlay {
  backdrop-filter: none;
}

.review-play-btn,
#reviewVideoPlayBtn {
  display: none !important;
}

/* v1.7.7 hero carousel integration */
.screen[data-screen="1"] .screen-content {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.screen[data-screen="1"] .step-title {
  font-size: 1.8rem;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.screen[data-screen="1"] .step-subtitle {
  max-width: 302px;
  font-size: 0.97rem;
  line-height: 1.55;
}


.hero-blur-backdrop {
  position: absolute;
  inset: -14% -12%;
  background-image:
    radial-gradient(circle at 50% 16%, rgba(255,255,255,0.22), transparent 24%),
    radial-gradient(circle at 18% 18%, rgba(110,211,245,0.22), transparent 18%),
    radial-gradient(circle at 80% 82%, rgba(16,185,129,0.24), transparent 20%),
    var(--hero-active-image);
  background-position: center, center, center, center;
  background-size: auto, auto, auto, 62%;
  background-repeat: no-repeat;
  filter: blur(28px);
  transform: scale(1.18);
  opacity: 0.36;
  transition: opacity 320ms ease, transform 560ms cubic-bezier(0.22, 1, 0.36, 1), background-image 260ms ease;
  pointer-events: none;
}

.hero-blur-backdrop::after {
  content: '';
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 50% 12%, rgba(255,255,255,0.18), transparent 18%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.00) 20%, rgba(255,255,255,0.02) 46%, rgba(11,20,26,0.26) 100%);
}

.hero-carousel-wrap {
  position: relative;
  margin-inline: -0.5rem;
  isolation: isolate;
}

.hero-carousel {
  display: flex;
  gap: 0.82rem;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x proximity;
  padding: 0.55rem 0.95rem 0.95rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

.hero-carousel::-webkit-scrollbar {
  display: none;
}



@keyframes premium-sticker-float-large {
  0%, 100% {
    transform: translate3d(var(--sticker-parallax-x, 0px), calc(var(--sticker-parallax-y, 0px) + 0px), 0) scale(1);
  }
  50% {
    transform: translate3d(var(--sticker-parallax-x, 0px), calc(var(--sticker-parallax-y, 0px) - 12px), 0) scale(1.03);
  }
}

@keyframes premium-gold-breathe-large {
  0%, 100% {
    transform: scale(1);
    opacity: 0.94;
    filter: saturate(1) brightness(1);
  }
  50% {
    transform: scale(1.035);
    opacity: 1;
    filter: saturate(1.06) brightness(1.04);
  }
}

@keyframes decor-float-large-a {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg)) scale(1); }
  50% { transform: translate3d(0, -15px, 0) rotate(calc(var(--rot, 0deg) + 4deg)) scale(1.05); }
}

@keyframes decor-float-large-b {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg)) scale(1); }
  50% { transform: translate3d(0, 12px, 0) rotate(calc(var(--rot, 0deg) - 5deg)) scale(1.06); }
}

@keyframes premium-sticker-float {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -7px, 0);
  }
}

.hero-card {
  position: relative;
  flex: 0 0 clamp(226px, 74vw, 302px);
  scroll-snap-align: center;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.07));
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.20);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  --hero-translate-y: 6px;
  --hero-opacity: 0.84;
  transform: translate3d(0, var(--hero-translate-y), 0);
  opacity: var(--hero-opacity);
  transition:
    transform 360ms ease,
    opacity 260ms ease,
    box-shadow 360ms ease,
    border-color 240ms ease,
    background 320ms ease;
}

.hero-card.is-nearby {
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.24);
}

.hero-card.is-centered,
.hero-card.is-active {
  border-color: rgba(255,255,255,0.44);
  box-shadow:
    0 34px 88px rgba(15, 23, 42, 0.30),
    0 0 0 1px rgba(110, 231, 183, 0.08),
    0 0 40px rgba(110, 211, 245, 0.14);
  }

.hero-card-shell {
  position: relative;
  overflow: hidden;
  border-radius: 31px;
  padding: 0.82rem;
}

.hero-card-shell::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.03));
  pointer-events: none;
}

.hero-card-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 8%, rgba(255,255,255,0.28), transparent 20%),
    radial-gradient(circle at 18% 12%, rgba(255,255,255,0.16), transparent 24%),
    radial-gradient(circle at 82% 86%, rgba(110,211,245,0.20), transparent 24%),
    linear-gradient(135deg, rgba(16,185,129,0.16), rgba(34,211,238,0.10));
  pointer-events: none;
  opacity: 0.9;
}

.hero-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 0.74 / 1.02;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 10%, rgba(255,255,255,0.2), transparent 18%),
    linear-gradient(180deg, rgba(245,255,252,0.92), rgba(230,247,252,0.86));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.72),
    inset 0 -18px 40px rgba(11, 20, 26, 0.08),
    0 16px 34px rgba(15,23,42,0.16);
}

.hero-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,0.16), transparent 14%),
    linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 24%, rgba(2,8,23,0.02) 62%, rgba(2,8,23,0.12) 100%);
  pointer-events: none;
}

.hero-card-image-wrap {
  position: absolute;
  inset: 8% 8% 23%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,0.34), rgba(255,255,255,0.07) 40%, rgba(255,255,255,0) 70%),
    linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  transform-origin: 50% 50%;
  will-change: transform;
}

.hero-card-image {
  display: block;
  width: 90%;
  height: 90%;
  object-fit: contain;
  object-position: center;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 18px 34px rgba(15,23,42,0.18)) drop-shadow(0 6px 14px rgba(15,23,42,0.12));
}

.hero-card.is-centered .hero-card-image,
.hero-card.is-active .hero-card-image {
  animation: premium-sticker-float 7.2s ease-in-out infinite;
  will-change: transform, filter;
}

.hero-card-caption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
  justify-content: center;
  min-height: 3.6rem;
  padding: 0.9rem 1rem 1rem;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.56);
  background: linear-gradient(180deg, rgba(255,255,255,0.93), rgba(243,253,248,0.84));
  box-shadow: 0 18px 40px rgba(15,23,42,0.11), inset 0 1px 0 rgba(255,255,255,0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero-card-caption-title {
  font-size: clamp(1.1rem, 3.4vw, 1.36rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.015em;
  color: #11372c;
  font-family: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  text-align: center;
  text-wrap: balance;
}

.hero-card-caption-subline {
  display: none;
}


.hero-card-copy,
.hero-card-title,
.hero-card-note {
  display: none !important;
}

.hero-carousel-footer {
  margin-top: auto;
  padding-bottom: 0.3rem;
}

.hero-carousel-progress {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  min-height: 10px;
}

.hero-carousel-progress-seg {
  height: 0.3rem;
  width: 1.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
  transition: width 280ms ease, background-color 280ms ease, box-shadow 280ms ease, opacity 280ms ease;
  opacity: 0.8;
}

.hero-carousel-progress-seg.is-active {
  width: 2.8rem;
  background: linear-gradient(90deg, rgba(16,185,129,0.9), rgba(34,211,238,0.95));
  box-shadow: 0 0 22px rgba(34,211,238,0.28);
  opacity: 1;
}

@media (max-width: 430px) {
  .hero-carousel {
    gap: 0.75rem;
    padding-inline: 0.75rem;
  }

  .hero-card {
    flex-basis: clamp(218px, 74vw, 286px);
    border-radius: 32px;
  }

  .hero-card-shell {
    border-radius: 31px;
    padding: 0.8rem;
  }

  .hero-card-shell::before {
    border-radius: 30px;
  }

  .hero-card-media {
    border-radius: 26px;
    aspect-ratio: 0.74 / 1.04;
  }
}

@media (max-width: 390px) {
  .screen[data-screen="1"] .screen-content {
    padding-top: 0.15rem !important;
  }

  .screen[data-screen="1"] .step-title {
    display: none;
  }

  .screen[data-screen="1"] .step-subtitle {
    max-width: 280px;
    font-size: 0.9rem;
    margin-top: 0.1rem !important;
  }

  .screen[data-screen="1"] .hero-carousel-wrap {
    margin-top: 0.65rem !important;
  }

  .screen[data-screen="1"] .hero-carousel-footer {
    margin-top: 0.55rem !important;
  }

  .hero-carousel {
    gap: 0.68rem;
    padding: 0.7rem 0.7rem 1rem;
  }

  .hero-card {
    flex-basis: clamp(208px, 73vw, 268px);
    border-radius: 30px;
  }

  .hero-card-shell {
    border-radius: 29px;
    padding: 0.72rem;
  }

  .hero-card-shell::before {
    border-radius: 28px;
  }

  .hero-card-media {
    border-radius: 24px;
  }

  .hero-card-image-wrap {
    inset: 9% 7% 22%;
  }

  .hero-blur-backdrop {
    background-size: auto, auto, auto, 74%;
    opacity: 0.34;
  }
}

@media (max-width: 340px) {
  .hero-card {
    flex-basis: clamp(196px, 72vw, 238px);
    border-radius: 28px;
  }

  .hero-card-shell {
    border-radius: 27px;
    padding: 0.65rem;
  }

  .hero-card-shell::before {
    border-radius: 26px;
  }

  .hero-card-media {
    border-radius: 22px;
  }

}


.app-info-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(6, 18, 22, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.app-info-overlay.visible {
  display: flex;
}

.app-info-card {
  width: min(92vw, 360px);
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.66);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(242,251,247,0.9));
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
  padding: 1.2rem 1.15rem 1.15rem;
}

.app-info-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #11372c;
}

.app-info-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(34,211,238,0.14));
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 700;
}

.logo-button {
  appearance: none;
  border: 0;
  cursor: pointer;
}



:root {
  --substrate-before-bg:
    radial-gradient(circle at 18% 16%, rgba(255, 248, 204, 0.82) 0%, rgba(255, 248, 204, 0) 26%),
    radial-gradient(circle at 78% 22%, rgba(255, 243, 170, 0.68) 0%, rgba(255, 243, 170, 0) 24%),
    radial-gradient(circle at 76% 82%, rgba(137, 92, 12, 0.16) 0%, rgba(137, 92, 12, 0) 28%),
    linear-gradient(145deg, #f6db81 0%, #efc75f 21%, #fff0ab 36%, #d9a842 52%, #f9dc7e 68%, #c79234 84%, #f1d171 100%);
  --substrate-after-bg:
    linear-gradient(118deg, transparent 0%, rgba(255,255,255,0.36) 15%, rgba(255,255,255,0.08) 24%, transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02) 32%, rgba(80, 52, 8, 0.12) 100%);
  --substrate-inner-shadow: inset 0 1px 0 rgba(255,255,255,0.62), inset 0 -10px 28px rgba(104, 68, 8, 0.18);
  --substrate-border: rgba(255, 247, 215, 0.72);
  --substrate-canvas-filter: contrast(1.08) brightness(0.98);
}

:root[data-substrate="gold"] {
  --substrate-border: rgba(255, 247, 215, 0.72);
}

:root[data-substrate="kaki"] {
  --substrate-before-bg:
    radial-gradient(circle at 16% 16%, rgba(255, 248, 218, 0.75) 0%, rgba(255, 248, 218, 0) 24%),
    radial-gradient(circle at 78% 22%, rgba(255, 225, 156, 0.62) 0%, rgba(255, 225, 156, 0) 23%),
    radial-gradient(circle at 24% 78%, rgba(248, 149, 177, 0.32) 0%, rgba(248, 149, 177, 0) 34%),
    linear-gradient(145deg, #ffe59b 0%, #ffd677 18%, #ffc7ac 34%, #f8a8ba 52%, #ffe08d 72%, #ffc85e 100%);
  --substrate-after-bg:
    linear-gradient(118deg, transparent 0%, rgba(255,255,255,0.42) 14%, rgba(255,255,255,0.10) 24%, transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02) 32%, rgba(174, 98, 86, 0.12) 100%);
  --substrate-inner-shadow: inset 0 1px 0 rgba(255,255,255,0.62), inset 0 -10px 28px rgba(181, 99, 84, 0.14);
  --substrate-border: rgba(255, 232, 210, 0.82);
}

:root[data-substrate="white"] {
  --substrate-before-bg:
    radial-gradient(circle at 18% 16%, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0) 26%),
    radial-gradient(circle at 78% 24%, rgba(243,246,251,0.84) 0%, rgba(243,246,251,0) 24%),
    radial-gradient(circle at 72% 82%, rgba(203,213,225,0.20) 0%, rgba(203,213,225,0) 26%),
    linear-gradient(145deg, #ffffff 0%, #f5f7fb 24%, #ffffff 44%, #e8edf4 70%, #ffffff 100%);
  --substrate-after-bg:
    linear-gradient(118deg, transparent 0%, rgba(255,255,255,0.65) 15%, rgba(255,255,255,0.14) 26%, transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02) 32%, rgba(148,163,184,0.10) 100%);
  --substrate-inner-shadow: inset 0 1px 0 rgba(255,255,255,0.84), inset 0 -10px 28px rgba(148,163,184,0.12);
  --substrate-border: rgba(255,255,255,0.92);
  --substrate-canvas-filter: contrast(1.1) brightness(0.94);
}

:root[data-substrate="rainbow"] {
  --substrate-before-bg:
    radial-gradient(circle at 18% 16%, rgba(255,255,255,0.58) 0%, rgba(255,255,255,0) 24%),
    conic-gradient(from 180deg at 50% 50%, #ff89a9 0deg, #ffd36e 65deg, #9be7a6 140deg, #83dcff 220deg, #c6b6ff 290deg, #ff89a9 360deg),
    linear-gradient(145deg, rgba(255,255,255,0.35), rgba(255,255,255,0.02));
  --substrate-after-bg:
    linear-gradient(118deg, transparent 0%, rgba(255,255,255,0.46) 14%, rgba(255,255,255,0.12) 24%, transparent 40%),
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02) 30%, rgba(99,102,241,0.10) 100%);
  --substrate-inner-shadow: inset 0 1px 0 rgba(255,255,255,0.58), inset 0 -10px 28px rgba(79, 70, 229, 0.14);
  --substrate-border: rgba(255,255,255,0.76);
}

:root[data-substrate="holographic"] {
  --substrate-before-bg:
    radial-gradient(circle at 18% 16%, rgba(255,255,255,0.64) 0%, rgba(255,255,255,0) 24%),
    linear-gradient(135deg, rgba(230,236,255,0.9) 0%, rgba(255,190,230,0.72) 18%, rgba(196,255,246,0.72) 36%, rgba(255,248,192,0.74) 54%, rgba(196,221,255,0.72) 72%, rgba(252,205,255,0.76) 100%),
    repeating-linear-gradient(115deg, rgba(255,255,255,0.18) 0 8px, rgba(255,255,255,0.02) 8px 16px);
  --substrate-after-bg:
    linear-gradient(118deg, transparent 0%, rgba(255,255,255,0.52) 15%, rgba(255,255,255,0.12) 24%, transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02) 30%, rgba(71,85,105,0.10) 100%);
  --substrate-inner-shadow: inset 0 1px 0 rgba(255,255,255,0.68), inset 0 -10px 28px rgba(71,85,105,0.14);
  --substrate-border: rgba(245,248,255,0.86);
}

/* v1.7.7 gold preview */
.gold-preview-frame,
.photo-thermal-shell,
.review-sticker-overlay {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.gold-preview-frame::before,
.photo-thermal-shell::before,
.review-sticker-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--substrate-before-bg);
  box-shadow: var(--substrate-inner-shadow);
  z-index: 0;
}

.gold-preview-frame::after,
.photo-thermal-shell::after,
.review-sticker-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--substrate-after-bg);
  opacity: 0.92;
  pointer-events: none;
  z-index: 1;
}

.photo-thermal-shell {
  background: transparent !important;
  border-color: var(--substrate-border) !important;
  box-shadow:
    0 20px 42px rgba(15, 23, 42, 0.22),
    inset 0 0 0 1px rgba(255,255,255,0.2) !important;
}

.review-sticker-overlay {
  border-radius: 999px;
}

#photoThermalPreview,
#photoCapturePreview,
#reviewStickerCanvas {
  position: relative;
  z-index: 2;
  mix-blend-mode: multiply;
}

#photoThermalPreview,
#photoCapturePreview {
  filter: var(--substrate-canvas-filter);
}

#reviewStickerCanvas {
  filter: contrast(1.05) brightness(0.98);
}

.screen[data-screen="3"] .camera-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(255, 214, 102, 0.10), rgba(255, 214, 102, 0) 48%);
  pointer-events: none;
}


.front-camera-unmirror {
  transform: scaleX(-1);
}

.review-video-shell video,
.review-video-placeholder {
  inset: 0.75rem;
  border-radius: 22px;
}

#photoCapturePreview {
  image-rendering: auto;
}


.review-hero--sticker-only {
  display: flex;
  justify-content: center;
}

.review-video-shell--sticker-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 28px;
  width: min(100%, 400px);
  height: clamp(300px, 42vh, 400px);
  min-height: 300px;
  margin-inline: auto;
  overflow: hidden;
}

.review-sticker-overlay--corner {
  left: 14px;
  top: 14px;
  right: auto;
  width: 112px;
  height: 112px;
  transform: rotate(-6deg);
}

.review-sticker-overlay--center {
  position: relative;
  inset: auto;
  left: auto;
  right: auto;
  top: auto;
  margin: 0 auto;
  width: min(84vw, 295px);
  height: min(84vw, 295px);
  max-width: 295px;
  max-height: 295px;
  align-self: center;
  justify-self: center;
  transform: translate3d(0, 0, 0);
  filter: drop-shadow(0 26px 46px rgba(15, 23, 42, 0.22)) drop-shadow(0 8px 18px rgba(15, 23, 42, 0.12));
  animation: premium-sticker-float 7.6s ease-in-out infinite;
  will-change: transform;
}

.review-video-shell--sticker-only .review-video-stage,
.review-video-shell--sticker-only video,
.review-video-shell--sticker-only .review-top-badges,
.review-video-shell--sticker-only .review-sticker-status,
.review-video-shell--sticker-only > .absolute.inset-0 {
  display: none !important;
}



@media (min-width: 391px) and (min-height: 761px) {
  .hero-card.is-centered .hero-card-image,
  .hero-card.is-active .hero-card-image {
    animation: premium-sticker-float-large 5.8s ease-in-out infinite;
  }

  .hero-card.is-centered .hero-card-image-wrap,
  .hero-card.is-active .hero-card-image-wrap {
    transform: translate3d(calc(var(--sticker-parallax-x, 0px) * 1.08), calc(var(--sticker-parallax-y, 0px) * 1.08), 0);
    transition: transform 180ms ease-out;
  }

  .hero-card.is-centered .hero-card-image,
  .hero-card.is-active .hero-card-image {
    transform: translate3d(calc(var(--sticker-parallax-x, 0px) * 0.78), calc(var(--sticker-parallax-y, 0px) * 0.78), 0);
  }

  .screen[data-screen="4"] .review-sticker-overlay--center {
    animation: premium-sticker-float-large 6.2s ease-in-out infinite;
  }

  .screen[data-screen="4"] .review-sticker-overlay--center::before,
  .screen[data-screen="4"] .review-sticker-overlay--center::after {
    animation: premium-gold-breathe-large 6.8s ease-in-out infinite;
    transform-origin: 50% 50%;
  }

  .decor-leaf-a,
  .decor-leaf-c {
    animation: decor-float-large-a 8.8s ease-in-out infinite;
  }

  .decor-leaf-b,
  .decor-leaf-d {
    animation: decor-float-large-b 9.8s ease-in-out infinite;
  }

  .decor-leaf {
    opacity: 0.17;
    filter: blur(0.2px) drop-shadow(0 12px 24px rgba(15, 23, 42, 0.08));
  }
}

/* v1.7.10 small-screen adaptive tuning for iPhone SE / compact phones */
@media (max-width: 390px) and (max-height: 760px) {
  :root {
    --compact-square-size: 100%;
    --compact-square-inset: 18px;
    --compact-circle-gap: 8px;
  }

  body.kk-body {
    padding: 0.2rem;
  }

  #appShell {
    max-width: 100%;
    border-radius: 22px;
  }

  .screen-body {
    padding-left: 0.82rem;
    padding-right: 0.82rem;
    padding-top: 0.65rem;
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .screen-header {
    min-height: 34px;
  }

  .screen-header .rounded-full.bg-white\/85 {
    padding: 0.26rem 0.62rem;
    font-size: 0.68rem;
  }

  .screen-content {
    padding-top: 0.35rem !important;
    padding-left: 0.1rem;
    padding-right: 0.1rem;
    padding-bottom: 0.55rem;
  }

  .screen[data-screen="1"] .screen-content {
    padding-top: 0.05rem !important;
  }

  .screen[data-screen="1"] .step-title {
    display: none;
  }

  .screen[data-screen="1"] .step-subtitle {
    margin-top: 0 !important;
  }

  .screen[data-screen="1"] .hero-carousel-wrap {
    margin-top: 0.4rem !important;
  }

  .screen[data-screen="1"] .hero-carousel-footer {
    margin-top: 0.4rem !important;
  }

  .step-title {
    font-size: 1.08rem;
    line-height: 1.08;
    letter-spacing: -0.02em;
  }

  .screen[data-screen="1"] .step-title {
    font-size: 1.18rem;
    max-width: 240px;
    margin-inline: auto;
  }

  .screen[data-screen="1"] .step-subtitle {
    display: none;
  }

  .hero-carousel-wrap {
    margin-top: 0.35rem;
  }

  .hero-carousel {
    gap: 0.55rem;
    padding: 0.38rem 0.52rem 0.78rem;
  }

  .hero-card {
    flex-basis: clamp(170px, 61vw, 208px);
    border-radius: 24px;
  }

  .hero-card-shell {
    border-radius: 23px;
    padding: 0.54rem;
  }

  .hero-card-shell::before {
    border-radius: 22px;
  }

  .hero-card-media {
    border-radius: 18px;
  }

  .hero-card-image-wrap {
    inset: 10% 8% 23%;
    border-radius: 18px;
  }

  .hero-card-image {
    width: 86%;
    height: 86%;
  }

  .hero-card-caption {
    left: 0.72rem;
    right: 0.72rem;
    bottom: 0.72rem;
    min-height: 2.95rem;
    padding: 0.66rem 0.72rem 0.76rem;
    border-radius: 16px;
  }

  .hero-card-caption-title {
    font-size: clamp(0.92rem, 3.2vw, 1.06rem);
  }

  .hero-carousel-progress-seg {
    width: 0.9rem;
  }

  .hero-carousel-progress-seg.is-active {
    width: 2rem;
  }

  .screen[data-screen="2"] .step-subtitle,
  .screen[data-screen="3"] .step-subtitle,
  .screen[data-screen="4"] .step-subtitle {
    display: none !important;
  }

  .screen[data-screen="2"] .step-title,
  .screen[data-screen="3"] .step-title,
  .screen[data-screen="4"] .step-title {
    margin-bottom: 0;
  }

  .glass-camera-shell,
  .photo-camera-shell,
  .review-video-shell--sticker-only {
    border-radius: 24px;
  }

  .screen[data-screen="2"] #videoPlaybackStage,
  .screen[data-screen="3"] .photo-camera-shell,
  .screen[data-screen="4"] .review-video-shell--sticker-only {
    width: var(--compact-square-size);
    max-width: none;
    margin-top: 0.68rem !important;
    margin-left: auto;
    margin-right: auto;
  }

  .screen[data-screen="2"] .camera-stage,
  .screen[data-screen="3"] .camera-stage {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .screen[data-screen="4"] .review-video-shell--sticker-only {
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: 0;
    padding: 0;
  }

  .capture-target-frame,
  .video-target-frame,
  .photo-target-frame {
    inset: var(--compact-square-inset) !important;
    border-radius: 20px;
  }

  .capture-target-frame::before {
    inset: 8px;
    border-radius: 14px;
  }

  .capture-target-frame::after {
    inset: 12px;
    background:
      linear-gradient(#ffffff,#ffffff) left top/16px 2px no-repeat,
      linear-gradient(#ffffff,#ffffff) left top/2px 16px no-repeat,
      linear-gradient(#ffffff,#ffffff) right top/16px 2px no-repeat,
      linear-gradient(#ffffff,#ffffff) right top/2px 16px no-repeat,
      linear-gradient(#ffffff,#ffffff) left bottom/16px 2px no-repeat,
      linear-gradient(#ffffff,#ffffff) left bottom/2px 16px no-repeat,
      linear-gradient(#ffffff,#ffffff) right bottom/16px 2px no-repeat,
      linear-gradient(#ffffff,#ffffff) right bottom/2px 16px no-repeat;
  }

  .screen[data-screen="3"] .photo-camera-shell {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .screen[data-screen="3"] .photo-thermal-shell {
    width: min(100%, calc((100% - (var(--compact-circle-gap) * 2)) * 1.15));
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: none;
    max-height: min(100%, calc((100% - (var(--compact-circle-gap) * 2)) * 1.15));
    flex: 0 0 auto;
    align-self: center;
    justify-self: center;
  }

  .screen[data-screen="3"] #photoThermalPreview,
  .screen[data-screen="3"] #photoCapturePreview {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 9999px;
    object-fit: cover;
    display: block;
  }

  .screen[data-screen="4"] .review-sticker-overlay--center {
    width: calc(100% - (var(--compact-circle-gap) * 2));
    height: calc(100% - (var(--compact-circle-gap) * 2));
    max-width: none;
    max-height: none;
  }

  .step-panel {
    margin-top: 0.72rem !important;
  }

  .step-action-btn,
  #nextBtn {
    min-height: 52px;
    padding-top: 0.82rem;
    padding-bottom: 0.82rem;
    font-size: 0.84rem;
    border-radius: 18px;
  }

  #nextBtn {
    margin-top: 0.8rem;
  }

  #navShell {
    padding-left: 0.82rem;
    padding-right: 0.82rem;
    padding-top: 0.72rem;
    padding-bottom: calc(env(safe-area-inset-bottom) + 10px);
  }

  .premium-delete-chip,
  #videoBadge,
  #photoBadge,
  .review-top-badges > div,
  .review-sticker-status {
    transform: scale(0.92);
    transform-origin: top left;
  }

  .review-top-badges > div:last-child {
    transform-origin: top right;
  }

  .review-sticker-status {
    transform-origin: bottom left;
  }

  .back-button,
  .step-logo-chip.logo-button {
    transform: scale(0.94);
    transform-origin: top left;
  }

  .edit-disclosure {
    margin-top: 0.9rem !important;
  }
}

@supports (height: 100dvh) {
  @media (max-width: 390px) and (max-height: 760px) {
    .screen[data-screen="2"] .camera-stage,
    .screen[data-screen="3"] .camera-stage,
    .screen[data-screen="4"] .review-video-shell--sticker-only {
      height: auto;
    }
  }
}


/* v1.7.18 centered edit link + larger large-screen step4 sticker */
#barcodeIdValue {
  font-size: clamp(16px, 4.4vw, 20px);
  letter-spacing: 0.04em;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* v1.7.18 barcode screen controls */
.barcode-back-button {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
}

.barcode-primary-btn {
  width: 100%;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}


.review-sticker-overlay,
.review-sticker-overlay::before,
.review-sticker-overlay::after,
#reviewStickerCanvas {
  background-color: transparent !important;
}

.review-sticker-overlay,
#reviewStickerCanvas {
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(circle, #fff 99.4%, transparent 100%);
}

#reviewStickerCanvas {
  display: block;
}

@supports (-webkit-touch-callout: none) {
  .screen[data-screen="4"] .review-sticker-overlay--center {
    isolation: isolate;
    background: transparent !important;
  }

  .screen[data-screen="4"] #reviewStickerCanvas {
    background: transparent !important;
    mix-blend-mode: multiply;
  }
}


.debug-log-panel {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 70;
  max-height: 148px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.7);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #e2e8f0;
  pointer-events: none;
}

.debug-log-panel__title {
  padding: 8px 12px 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.72);
}

.debug-log-panel__output {
  margin: 0;
  padding: 8px 12px 12px;
  max-height: 120px;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 11px;
  line-height: 1.45;
  color: #f8fafc;
}
