:root {
  --cream: #f8f1d8;
  --cream-deep: #efe1b7;
  --brown: #6c4725;
  --brown-soft: #8a6940;
  --orange-top: #ff8b22;
  --orange-bottom: #e13d0e;
  --orange-border: #b9360c;
  --red-pill: #c93b18;
  --gold: #ffe6a0;
  --gold-deep: #d9a547;
  --sky-top: #8ed4ff;
  --sky-bottom: #d7f0ff;
  --field-top: #83cb52;
  --field-bottom: #4d962d;
  --card-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  --card-border: rgba(255, 255, 255, 0.82);
  --ring-progress: 0deg;
  --transition: 220ms ease;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: #34210d;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: hidden;
  scroll-behavior: smooth;
  background-color: #F7C948;
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(42, 85, 36, 0.12)),
    url("./assets/bg.png") center center / cover no-repeat fixed;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 24px 16px 32px;
}

.sky-layer,
.field-layer,
.sparkles {
  pointer-events: none;
  position: absolute;
}

.sky-layer {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02) 40%, rgba(64, 112, 51, 0.1) 100%);
  backdrop-filter: blur(2px);
}

.field-layer {
  left: -10%;
  right: -10%;
  bottom: -8%;
  height: 34vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 236, 189, 0.12), transparent 50%),
    linear-gradient(180deg, rgba(88, 142, 55, 0.08), rgba(46, 82, 25, 0.2));
  border-radius: 50% 50% 0 0;
  filter: blur(8px);
}

.sparkles {
  width: 22px;
  height: 22px;
  color: rgba(255, 242, 180, 0.85);
}

.sparkles::before,
.sparkles::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 10px rgba(255, 228, 148, 0.6));
}

.sparkles::after {
  inset: 34%;
}

.sparkle-a {
  top: 20vh;
  left: calc(50% - 230px);
  animation: float-sparkle 3s ease-in-out infinite;
}

.sparkle-b {
  top: 34vh;
  right: calc(50% - 250px);
  animation: float-sparkle 2.8s ease-in-out infinite 0.4s;
}

.app-root {
  position: relative;
  z-index: 2;
  width: min(calc(100vw - 20px), 390px);
  max-width: 100%;
  height: calc(100vh - 56px);
  max-height: calc(100vh - 56px);
  overflow: hidden;
  margin-bottom: 10px;
}

.step-pane {
  display: none;
  height: 100%;
  min-height: 0;
}

.step-pane.is-active {
  display: block;
}

.support-fab-shell {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
}

.support-fab-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.support-fab-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.support-fab {
  position: relative;
  min-width: 82px;
  padding: 14px 16px 13px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #8a63f8 0%, #6b3fe0 100%);
  color: #fffaff;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.2),
    0 16px 30px rgba(97, 61, 193, 0.32);
  display: grid;
  gap: 2px;
  justify-items: center;
  text-align: center;
}

.support-fab-title {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
}

.support-status-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.support-status-dot.online {
  background: #5fe26b;
}

.support-status-dot.offline {
  background: #ef5656;
}

.support-menu {
  width: min(86vw, 250px);
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 251, 243, 0.98);
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 34px rgba(50, 29, 13, 0.22);
  animation: fade-up 180ms ease;
}

.support-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 16px;
  color: #4e3816;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.support-menu-item + .support-menu-item {
  margin-top: 6px;
}

.support-menu-item:hover {
  background: rgba(243, 231, 196, 0.7);
  transform: translateY(-1px);
}

.support-flag {
  font-size: 1.3rem;
  line-height: 1;
}

.support-channel-copy {
  display: grid;
  gap: 2px;
}

.support-channel-copy strong {
  font-size: 0.98rem;
}

.support-channel-copy small {
  color: #7e6038;
  font-size: 0.83rem;
  font-weight: 700;
}

.card {
  position: relative;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  padding: 22px 18px 26px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent 12%),
    radial-gradient(circle at 18% 12%, rgba(255, 248, 224, 0.82), transparent 24%),
    linear-gradient(180deg, #fbf5de 0%, var(--cream) 55%, #f4e6c0 100%);
  border: 2px solid var(--card-border);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 35%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0 5px, rgba(169, 125, 63, 0.015) 5px 10px);
  opacity: 0.9;
  pointer-events: none;
}

.card-inner {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  margin: 2px 0 14px;
}

.compact-logo-wrap {
  justify-content: flex-end;
  margin: 0;
}

.logo-image {
  display: block;
  width: min(100%, 340px);
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(126, 44, 13, 0.2));
}

.compact-logo {
  width: min(42vw, 150px);
}

.hero-frame {
  position: relative;
  padding: 8px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(254, 243, 209, 0.95));
  border: 2px solid rgba(152, 109, 54, 0.28);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.8),
    0 10px 18px rgba(99, 63, 19, 0.12);
}

.hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.22;
  object-fit: cover;
  border-radius: 20px;
  background: #e7d6b6;
}

.hero-frame-empty {
  min-height: 220px;
}

.upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 220px;
  padding: 24px 16px;
  border: none;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.45);
  color: #7a5a2d;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.upload-prompt:hover {
  background: rgba(255, 255, 255, 0.72);
}

.upload-prompt:active {
  transform: scale(0.99);
}

.upload-prompt-icon {
  font-size: 2.4rem;
  line-height: 1;
}

.upload-prompt-text {
  font-size: 1.05rem;
  font-weight: 800;
}

.upload-prompt-hint {
  font-size: 0.85rem;
  opacity: 0.75;
}

.loading-preview-frame {
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(68, 118, 255, 0.2), transparent 38%),
    radial-gradient(circle at 50% 50%, rgba(130, 51, 255, 0.18), transparent 54%),
    linear-gradient(180deg, #060911 0%, #090f1d 100%);
}

.final-loading-frame {
  --final-ring-progress: 0deg;
  padding: 6px;
  background:
    conic-gradient(#f9bc2a 0deg, #f59a16 var(--final-ring-progress), rgba(242, 219, 171, 0.28) var(--final-ring-progress), rgba(242, 219, 171, 0.28) 360deg);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 10px 18px rgba(99, 63, 19, 0.12);
}

.particle-face-host {
  position: relative;
  width: 100%;
  height: min(56vh, 480px);
  min-height: 360px;
  touch-action: none;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(68, 118, 255, 0.16), transparent 36%),
    linear-gradient(180deg, #04070d 0%, #0a1020 100%);
}

.particle-face-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 247, 231, 0.82);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.particle-face-host canvas,
.particle-face-fallback-image {
  display: block;
  width: 100%;
  height: 100%;
}

.particle-face-fallback-image {
  object-fit: contain;
  background:
    radial-gradient(circle at 50% 35%, rgba(68, 118, 255, 0.16), transparent 36%),
    linear-gradient(180deg, #04070d 0%, #0a1020 100%);
}

.main-actions,
.stack-actions {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.primary-btn,
.secondary-btn,
.link-btn,
.back-btn {
  width: 100%;
  border: 0;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    opacity var(--transition);
}

.primary-btn {
  padding: 18px 20px 16px;
  background: linear-gradient(180deg, var(--orange-top) 0%, var(--orange-bottom) 100%);
  border: 2px solid var(--orange-border);
  border-radius: 18px;
  color: #fff9f0;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.25),
    0 6px 0 #9b2808,
    0 14px 22px rgba(166, 58, 15, 0.2);
}

.secondary-btn {
  padding: 16px 18px 15px;
  background: linear-gradient(180deg, #fbf3da, #f1e0b3);
  border: 2px solid rgba(191, 151, 91, 0.62);
  border-radius: 16px;
  color: var(--brown);
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.7),
    0 6px 14px rgba(115, 77, 33, 0.12);
}

.link-btn {
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(246, 232, 189, 0.92));
  border: 2px solid rgba(193, 150, 81, 0.4);
  border-radius: 16px;
  color: var(--brown);
  font-weight: 800;
  font-size: 1.1rem;
}

.back-btn {
  width: auto;
  padding: 0;
  background: none;
  color: #4e3816;
  font-weight: 700;
  text-align: left;
  margin-bottom: 14px;
}

.top-back-btn {
  align-self: auto;
  margin-bottom: 0;
  flex: 0 0 auto;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.primary-btn:hover:not(:disabled),
.secondary-btn:hover:not(:disabled),
.link-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.primary-btn:active:not(:disabled),
.secondary-btn:active:not(:disabled),
.link-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.link-btn:disabled,
.back-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.helper-text {
  margin: 10px 0 0;
  color: var(--brown-soft);
  font-size: 0.96rem;
  line-height: 1.45;
}

.minor-changes-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 252, 240, 0.74);
  border: 2px solid rgba(198, 169, 121, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4e3816;
  font-weight: 800;
  cursor: pointer;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: #eb6b12;
}

.minor-changes-input {
  width: 100%;
  margin-top: 12px;
  padding: 14px 14px 15px;
  border-radius: 16px;
  border: 2px solid rgba(203, 181, 146, 0.7);
  background: rgba(255, 255, 255, 0.92);
  color: #3a2a13;
  font-size: 1rem;
  line-height: 1.35;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.minor-changes-input:focus {
  border-color: rgba(248, 143, 26, 0.9);
  box-shadow: 0 0 0 4px rgba(248, 143, 26, 0.16);
}

.status-message {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.98rem;
  line-height: 1.45;
  font-weight: 700;
}

.status-message.success {
  background: rgba(139, 214, 124, 0.18);
  color: #246224;
  border: 1px solid rgba(89, 161, 75, 0.28);
}

.status-message.error {
  background: rgba(229, 106, 92, 0.12);
  color: #9a2317;
  border: 1px solid rgba(197, 76, 55, 0.22);
}

.status-message.info {
  background: rgba(102, 155, 214, 0.14);
  color: #22517d;
  border: 1px solid rgba(59, 109, 171, 0.2);
}

.warning-inline {
  margin-top: 14px;
  color: #925021;
  font-size: 0.92rem;
}

.heading {
  margin: 2px 0 18px;
  font-size: 2rem;
  line-height: 1.05;
  color: #3e2b14;
}

.subheading {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #6a4d2b;
}

.generation-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.loading-zone {
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 10px 0 4px;
}

.progress-ring {
  --size: 214px;
  position: relative;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background:
    conic-gradient(#f9bc2a 0deg, #f59a16 var(--ring-progress), rgba(242, 219, 171, 0.6) var(--ring-progress), rgba(242, 219, 171, 0.6) 360deg);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.42);
}

.progress-ring::before {
  content: "";
  width: calc(var(--size) - 34px);
  height: calc(var(--size) - 34px);
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(250, 249, 242, 0.98), rgba(246, 229, 184, 0.95));
  box-shadow: inset 0 0 0 10px rgba(222, 229, 241, 0.75);
}

.progress-image {
  position: absolute;
  width: 118px;
  height: 118px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 10px 12px rgba(47, 112, 175, 0.2));
}

.progress-value {
  font-size: 2rem;
  font-weight: 900;
  color: #d77200;
}

.loading-progress-shell-inline {
  margin-top: 10px;
}

.thumb-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.thumb-item,
.grid-option {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 3px solid transparent;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 14px rgba(92, 63, 26, 0.1);
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.thumb-item {
  aspect-ratio: 0.8;
}

.grid-option {
  aspect-ratio: 0.76;
}

.thumb-item img,
.grid-option img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.thumb-item.selected,
.grid-option.selected {
  border-color: #f48b18;
  box-shadow: 0 10px 20px rgba(217, 123, 17, 0.24);
  transform: translateY(-2px);
}

.selection-check {
  position: absolute;
  left: 7px;
  bottom: 7px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff9231, #ea4b11);
  color: white;
  font-size: 0.95rem;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(180, 68, 16, 0.35);
}

.thumb-skeleton {
  position: relative;
  overflow: hidden;
}

.thumb-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.35s linear infinite;
}

.grid-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.final-gallery {
  display: grid;
  gap: 14px;
  margin-bottom: 10px;
  min-width: 0;
}

.final-main-frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 10px;
  overflow: hidden;
}

.final-main-image {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 0.86;
  object-fit: cover;
}

.fullscreen-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(82, 53, 21, 0.84);
  color: #fff8ef;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 16px rgba(41, 24, 7, 0.18);
}

.final-thumbnails-shell {
  min-width: 0;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 252, 240, 0.68);
  border: 2px solid rgba(198, 169, 121, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.final-thumbnails-title {
  margin-bottom: 10px;
  color: #6a4d2b;
  font-weight: 800;
}

.final-thumbnails-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 92px;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.final-thumb {
  position: relative;
  width: 92px;
  min-width: 92px;
  max-width: 92px;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 6px 14px rgba(92, 63, 26, 0.1);
  scroll-snap-align: start;
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.final-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 0.86;
  object-fit: cover;
}

.final-thumb.selected {
  border-color: #f48b18;
  box-shadow: 0 10px 20px rgba(217, 123, 17, 0.24);
  transform: translateY(-2px);
}

.image-number-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(82, 53, 21, 0.84);
  color: #fff8ef;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.main-image-number {
  top: 16px;
  right: 16px;
}

.form-block {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.pose-slider-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.pose-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 152px;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.pose-slider-arrow {
  display: none;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(191, 151, 91, 0.45);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 232, 189, 0.98));
  color: #6a4d2b;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(115, 77, 33, 0.12);
}

.pose-card {
  width: 152px;
  min-width: 152px;
  max-width: 152px;
  padding: 10px;
  border: 3px solid transparent;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 6px 14px rgba(92, 63, 26, 0.1);
  text-align: left;
  vertical-align: top;
  scroll-snap-align: start;
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.pose-card.selected {
  border-color: #f48b18;
  box-shadow: 0 10px 20px rgba(217, 123, 17, 0.24);
  transform: translateY(-2px);
}

.pose-card-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(252, 243, 214, 0.88);
}

.pose-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 0.86;
  object-fit: cover;
}

.field-card {
  padding: 14px 14px 16px;
  border-radius: 20px;
  background: rgba(255, 252, 240, 0.65);
  border: 2px solid rgba(198, 169, 121, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 800;
  color: #4e3816;
}

.field-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: white;
  font-size: 1rem;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25);
}

.field-icon.blue {
  background: linear-gradient(180deg, #8bd6ff, #4399da);
}

.field-icon.purple {
  background: linear-gradient(180deg, #d497ff, #8b56d7);
}

textarea {
  width: 100%;
  min-height: 110px;
  resize: none;
  padding: 14px 14px 16px;
  border-radius: 16px;
  border: 2px solid rgba(203, 181, 146, 0.7);
  background: rgba(255, 255, 255, 0.9);
  color: #3a2a13;
  font-size: 1rem;
  line-height: 1.45;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

textarea:focus {
  border-color: rgba(248, 143, 26, 0.9);
  box-shadow: 0 0 0 4px rgba(248, 143, 26, 0.16);
}

.loading-final {
  display: grid;
  place-items: center;
  min-height: 310px;
  padding: 10px 0 18px;
  text-align: center;
}

.loading-final > div {
  width: 100%;
}

.loading-progress-shell {
  display: grid;
  place-items: center;
  gap: 12px;
  margin-top: 8px;
}

.magic-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.magic-loader span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffd05c, #f07b0b);
  animation: bounce 1s ease-in-out infinite;
}

.magic-loader span:nth-child(2) {
  animation-delay: 0.15s;
}

.magic-loader span:nth-child(3) {
  animation-delay: 0.3s;
}

.success-card {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
}

.success-badge {
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff8cf, #ffb733 65%, #ea6a0a 100%);
  color: white;
  font-size: 2.8rem;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.4),
    0 12px 24px rgba(219, 114, 18, 0.24);
}

.hidden-input {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(36, 22, 10, 0.55);
  backdrop-filter: blur(6px);
}

.upload-modal {
  width: min(100%, 360px);
  padding: 22px 18px 20px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 12%),
    linear-gradient(180deg, #fbf5de 0%, var(--cream) 55%, #f4e6c0 100%);
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.24);
}

.initial-error-backdrop {
  z-index: 60;
}

.initial-error-modal {
  text-align: center;
}

.upload-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.upload-modal-title {
  margin: 0;
  font-size: 1.4rem;
  color: #3e2b14;
}

.modal-close-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: #6a3f1f;
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.upload-modal-preview-wrap {
  margin-top: 14px;
  padding: 8px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid rgba(191, 151, 91, 0.32);
}

.upload-modal-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.12;
  object-fit: cover;
  border-radius: 16px;
}

.upload-modal-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.upload-modal-loader span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffd05c, #f07b0b);
  animation: bounce 1s ease-in-out infinite;
}

.upload-modal-loader span:nth-child(2) {
  animation-delay: 0.15s;
}

.upload-modal-loader span:nth-child(3) {
  animation-delay: 0.3s;
}

.upload-modal-text {
  margin: 16px 0 0;
  color: #5e4322;
  line-height: 1.45;
  font-weight: 700;
}

.modal-action-btn {
  margin-top: 18px;
}

.viber-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 18px;
  padding: 16px 18px 15px;
  border-radius: 16px;
  background: linear-gradient(180deg, #8a63f8 0%, #6b3fe0 100%);
  border: 2px solid #5530bb;
  color: #fff9ff;
  font-size: 1.08rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    0 10px 20px rgba(97, 61, 193, 0.28);
  transition: transform var(--transition), box-shadow var(--transition);
}

.viber-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    0 14px 24px rgba(97, 61, 193, 0.32);
}

.image-preview-backdrop {
  z-index: 70;
}

.image-preview-modal {
  position: relative;
  width: min(92vw, 880px);
  max-height: 88vh;
  padding: 18px;
  border-radius: 26px;
  background: rgba(255, 251, 240, 0.96);
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}

.image-preview-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}

.image-preview-full {
  display: block;
  width: 100%;
  max-height: calc(88vh - 36px);
  object-fit: contain;
  border-radius: 18px;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@keyframes float-sparkle {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.08);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  body {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(42, 85, 36, 0.12)),
      url("./assets/bg.png") center top / cover no-repeat;
    background-attachment: fixed;
  }

  .app-shell {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    display: grid;
    place-items: center;
    padding: 12px 10px 20px;
  }

  .app-root {
    width: min(calc(100vw - 20px), 390px);
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    margin-bottom: 10px;
  }

  .card {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    padding-inline: 14px;
  }

  .card-inner {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0;
    padding-bottom: 24px;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  .logo-image {
    width: min(100%, 300px);
  }

  .compact-logo {
    width: min(42vw, 132px);
  }

  .primary-btn {
    font-size: 1.45rem;
  }

  .heading {
    font-size: 1.7rem;
  }

  .progress-ring {
    --size: 192px;
  }
}

@media (min-width: 769px) {
  .pose-slider-arrow {
    display: inline-grid;
    place-items: center;
  }
}
