:root {
  color-scheme: dark;
  --bg: #151316;
  --panel: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.12);
  --text: #fff5e9;
  --muted: rgba(255, 245, 233, 0.66);
  --gold: #d9aa70;
  --gold2: #f5d49c;
  --red: #ff8a7c;
  --green: #7de0aa;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 8%, rgba(217, 170, 112, 0.22), transparent 34%),
    radial-gradient(circle at 90% 22%, rgba(121, 69, 48, 0.25), transparent 30%),
    linear-gradient(180deg, #21191a, var(--bg) 48%, #0f0d10);
  color: var(--text);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.phone {
  width: min(100vw, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 12px calc(18px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: -12px -12px 10px;
  padding: max(12px, env(safe-area-inset-top)) 12px 10px;
  background: linear-gradient(180deg, rgba(18, 15, 17, 0.96), rgba(18, 15, 17, 0.72));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brandline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brandline img {
  width: 142px;
  height: 42px;
  object-fit: contain;
}

.slideshow {
  overflow: hidden;
  margin: 8px -12px 14px;
  padding: 0 12px;
}

.slideshow-track {
  display: flex;
  width: max-content;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  animation: slideshow-scroll 42s linear infinite;
}

.slideshow-track.static {
  width: 100%;
  animation: none;
}

.slideshow-loop {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  padding-right: 8px;
}

.slideshow img {
  flex: 0 0 132px;
  width: 132px;
  height: 92px;
  display: block;
  object-fit: cover;
  border-radius: 18px;
  opacity: 0.78;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.24);
  backface-visibility: hidden;
  transform: translateZ(0);
}

@keyframes slideshow-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .slideshow-track {
    animation: none;
  }
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 24px;
  padding: 14px;
  margin: 12px 0;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.2);
}

.hero {
  padding: 0;
  overflow: hidden;
}

.hero-head,
.section-head {
  padding: 14px 14px 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.kicker {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 900;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 26px;
  line-height: 1.05;
}

.wish-title {
  max-width: 100%;
  font-size: 24px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.muted {
  color: var(--muted);
}

.badge {
  padding: 7px 9px;
  border-radius: 999px;
  color: #211713;
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.main-img {
  width: 100%;
  height: 284px;
  display: block;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.28);
}

.hero-progress {
  display: grid;
  gap: 16px;
  min-height: 220px;
  margin: 0 14px 14px;
  padding: 28px 24px;
  align-content: center;
  border: 1px solid rgba(245, 212, 156, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 18%, rgba(245, 212, 156, 0.16), transparent 36%),
    rgba(0, 0, 0, 0.18);
}

.hero-progress-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.hero-progress-row span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.hero-progress-row strong {
  color: var(--gold2);
  font-size: 42px;
  line-height: 0.9;
}

.hero-progress-bar {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.hero-progress-bar i {
  display: block;
  height: 100%;
  min-width: 7px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold2), var(--gold));
  transition: width 0.35s ease;
}

.thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 28%;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  scrollbar-width: none;
}

.thumbs::-webkit-scrollbar {
  display: none;
}

.thumb {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  text-align: left;
}

.thumb.active {
  border-color: var(--gold);
}

.thumb img {
  width: 100%;
  height: 64px;
  object-fit: cover;
  display: block;
}

.thumb span {
  display: block;
  padding: 6px;
  color: var(--muted);
  font-size: 11px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.field-grid.size-grid {
  grid-template-columns: 1fr;
}

.field {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.14);
}

.field small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 5px;
}

.field strong {
  font-size: 13px;
  word-break: break-word;
}

.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.button-grid.single {
  grid-template-columns: 1fr;
}

.action {
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font-weight: 850;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
}

.button-grid.single .action {
  min-height: 78px;
  border-radius: 22px;
  font-size: 20px;
  letter-spacing: 0.01em;
}

.action.primary {
  color: #231713;
  background: linear-gradient(135deg, var(--gold2), var(--gold));
}

.action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.progress-line {
  height: 4px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin-top: 5px;
}

.progress-line i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
}

.texture-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.texture {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 17px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.16);
}

.texture img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  display: block;
}

.next-design-cta {
  width: 100%;
  min-height: 68px;
  margin: 12px 0 18px;
  border: 0;
  border-radius: 22px;
  color: #231713;
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

label {
  display: block;
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border-radius: 17px;
  padding: 12px;
  outline: none;
}

textarea {
  min-height: 95px;
  resize: vertical;
}

.seat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.seat {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 15px;
  padding: 10px 8px;
  font-weight: 850;
}

.seat.active {
  color: #231713;
  background: linear-gradient(135deg, var(--gold2), var(--gold));
}

.new-action-wrap {
  position: relative;
  margin-top: 12px;
  padding-bottom: 48px;
}

.start-design-btn {
  width: 100%;
}

.last-task-btn {
  position: absolute;
  right: 10px;
  bottom: 6px;
  min-height: 30px;
  border: 1px solid rgba(245, 212, 156, 0.38);
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--gold2);
  background: rgba(0, 0, 0, 0.36);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.empty,
.error {
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.error {
  color: var(--red);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
}

.lightbox-stage {
  position: relative;
  display: inline-grid;
  place-items: center;
  max-width: 100%;
  max-height: 82vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
}

.lightbox-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  border: 0;
  padding: 0;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.lightbox-hit.prev {
  left: 0;
  cursor: w-resize;
}

.lightbox-hit.next {
  right: 0;
  cursor: e-resize;
}

.lightbox-hit:focus-visible {
  outline: 2px solid rgba(245, 212, 156, 0.9);
  outline-offset: -6px;
}

.close {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  border: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 28px;
}
