:root {
  color-scheme: light;
  --bg-paper: #e6edf5;
  --panel-white: #f6f6f6;
  --panel-cream: #fbfbfb;
  --panel-gray: #ececec;
  --shadow-lilac: #d5bef6;
  --pink-border: #ffbae6;
  --cyan-border: #3bc0e4;
  --cyan-bright: #6ed5ed;
  --cyan-deep: #3b81ad;
  --gray-700: #717171;
  --gray-500: #8a8a8a;
  --gray-300: #d8d8d8;
  --gray-200: #e8e8e8;
  --tab-0: #f6f6f6;
  --tab-1: #e7e7e7;
  --tab-2: #dddddd;
  --tab-3: #d0d0d0;
  --tab-4: #bebebe;
  --tab-5: #aaaaaa;
  --option-shadow: 0 18px 30px rgba(59, 129, 173, 0.12);
  --ui-stroke-gradient: linear-gradient(
    90deg,
    #ffbae6 0%,
    #f0d2fb 14%,
    #d9d5fb 34%,
    #a9ddf5 68%,
    #3bc0e4 100%
  );
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: "Nunito", sans-serif;
  color: #505050;
  background: #dfe8f1;
}

.viewport-frame {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
}

.viewport-scale {
  flex: none;
  transform-origin: top center;
  will-change: transform;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.desktop-shell {
  position: relative;
  width: 2994px;
  height: 2060px;
  padding: 0;
  overflow: hidden;
  border: 4px solid #666666;
  box-shadow: inset 0 4px 6px 11px rgba(0, 0, 0, 0.22);
  background:
    radial-gradient(circle at 2px 2px, rgba(134, 188, 230, 0.46) 1px, transparent 1.4px) 0 0 / 8px 8px,
    linear-gradient(
      180deg,
      rgba(218, 236, 250, 0.52) 0,
      rgba(218, 236, 250, 0.52) 128px,
      transparent 128px,
      transparent 320px
    ) 0 0 / 100% 320px,
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.top-strip {
  position: absolute;
  left: 23px;
  top: 37px;
  width: 2948px;
  height: 93px;
  margin: 0;
  overflow: hidden;
  border: 4px solid #17649a;
  box-shadow:
    inset 0 4px 4px 18px rgba(255, 255, 255, 0.25),
    inset 0 0 5px 11px #225bb1;
  background: linear-gradient(180deg, #8bc7ff 0%, #7dbcff 100%);
}

.top-strip__fill {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 9px 9px, rgba(255, 255, 255, 0.96) 3px, transparent 3.4px) 0 0 / 18px 18px,
    linear-gradient(180deg, #8bc7ff 0%, #7dbcff 100%);
}

.reset-button {
  position: absolute;
  top: 15px;
  right: 20px;
  width: 62px;
  height: 62px;
  border: 2px solid #8a8a8a;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: inset -2px -2px 4px rgba(0, 0, 0, 0.16);
  font-family: "Silkscreen", monospace;
  font-size: 32px;
  line-height: 1;
  padding: 0;
}

.desktop-layout {
  position: absolute;
  inset: 0;
}

.preview-column,
.options-column {
  position: relative;
}

.preview-column {
  position: absolute;
  left: 101px;
  top: 196px;
  width: 943px;
  height: 1586px;
  padding-top: 0;
}

.preview-column__shadow,
.options-column__shadow {
  position: absolute;
  transform: none;
  border-radius: 40px;
  background: var(--shadow-lilac);
  z-index: 0;
}

.preview-column__shadow {
  left: 43px;
  top: 0;
  width: 900px;
  height: 1534px;
}

.preview-card {
  position: absolute;
  left: 0;
  top: 52px;
  width: 900px;
  height: 1534px;
  min-height: 0;
  border: 10px solid transparent;
  border-radius: 40px;
  overflow: hidden;
  background:
    linear-gradient(#f8f8f8, #f8f8f8) padding-box,
    var(--ui-stroke-gradient) border-box;
  z-index: 1;
}

.preview-card::before {
  display: none;
}

.preview-card canvas {
  position: absolute;
  left: 24px;
  top: 42px;
  width: 840px;
  height: 1478px;
  margin: 0;
  image-rendering: auto;
  z-index: 1;
}

.options-column {
  position: absolute;
  left: 1132px;
  top: 196px;
  width: 1783px;
  height: 1563px;
  padding-top: 0;
}

.options-panel {
  position: absolute;
  left: 0;
  top: 0;
  width: 1721px;
  height: 1563px;
  border-radius: 0;
  overflow: visible;
  z-index: 1;
}

.options-column__shadow {
  left: 38px;
  top: 0;
  width: 1745px;
  height: 1563px;
}

.rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  overflow: visible;
}

.rail--top,
.rail--bottom {
  position: absolute;
  left: 0;
  width: 1721px;
  height: 213px;
  z-index: 4;
  overflow: visible;
}

.rail--top {
  top: 96px;
}

.rail--bottom {
  top: 1373px;
}

.rail__tab {
  --tab-fill: var(--tab-2);
  --rail-gradient-position: 0%;
  position: relative;
  min-height: 213px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 0;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 5px;
  background:
    linear-gradient(var(--tab-fill), var(--tab-fill)) padding-box,
    var(--ui-stroke-gradient) border-box;
  background-repeat: no-repeat;
  background-size: auto, 600% 100%;
  background-position: 0 0, var(--rail-gradient-position) 0;
  color: #5d5d5d;
  transition: background 120ms ease, box-shadow 120ms ease;
  overflow: hidden;
}

.rail--top .rail__tab {
  border-width: 10px 5px 10px;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
}

.rail--bottom .rail__tab {
  border-width: 10px 5px 10px;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
}

.rail__tab:first-child {
  border-left-width: 10px;
}

.rail__tab:last-child {
  border-right-width: 10px;
}

.rail__tab:nth-child(1) {
  --rail-gradient-position: 0%;
}

.rail__tab:nth-child(2) {
  --rail-gradient-position: 20%;
}

.rail__tab:nth-child(3) {
  --rail-gradient-position: 40%;
}

.rail__tab:nth-child(4) {
  --rail-gradient-position: 60%;
}

.rail__tab:nth-child(5) {
  --rail-gradient-position: 80%;
}

.rail__tab:nth-child(6) {
  --rail-gradient-position: 100%;
}

.rail__tab[data-depth="0"] {
  --tab-fill: var(--tab-0);
}

.rail__tab[data-depth="1"] {
  --tab-fill: var(--tab-1);
}

.rail__tab[data-depth="2"] {
  --tab-fill: var(--tab-2);
}

.rail__tab[data-depth="3"] {
  --tab-fill: var(--tab-3);
}

.rail__tab[data-depth="4"] {
  --tab-fill: var(--tab-4);
}

.rail__tab[data-depth="5"] {
  --tab-fill: var(--tab-5);
}

.rail__tab:hover {
  --tab-fill: #efefef;
}

.rail__tab.is-active {
  --tab-fill: #ffffff;
  box-shadow: inset 0 -8px 0 rgba(255, 255, 255, 0.24);
}

.rail__tab.is-hidden {
  display: none;
}

.rail__icon {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  overflow: visible;
}

.rail__icon img {
  position: absolute;
  left: var(--icon-left, 50%);
  top: var(--icon-top, 50%);
  width: var(--icon-width, 152px);
  height: var(--icon-height, 118px);
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
  transform: translate(-50%, -50%);
  opacity: 0.92;
}

.rail__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 28px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #ffffff;
  border: 2px solid rgba(59, 129, 173, 0.38);
  font-size: 14px;
  font-weight: 800;
  color: #5d5d5d;
}

.options-stage {
  position: absolute;
  left: 0;
  top: 187px;
  width: 1721px;
  height: 1293px;
  min-height: 0;
  padding: 0;
  border: 10px solid transparent;
  background:
    linear-gradient(#f4f4f4, #f4f4f4) padding-box,
    var(--ui-stroke-gradient) border-box;
  overflow: visible;
  z-index: 1;
}

.options-stage__header {
  display: none;
}

.stage-kicker {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8d8d8d;
}

.stage-title {
  margin: 0;
  font-family: "ADLaM Display", sans-serif;
  font-size: 40px;
  color: #5d5d5d;
}

.stage-meta {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: #7c7c7c;
}

.stage-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clear-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #edf8fb 100%);
  box-shadow:
    0 8px 18px rgba(59, 129, 173, 0.12),
    inset 0 0 0 2px rgba(59, 129, 173, 0.18);
  font-weight: 800;
  color: #4d7897;
}

.clear-button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.clear-button--ghost {
  background: #ffffff;
}

.options-stage__body {
  position: absolute;
  left: 0;
  top: 291px;
  width: 100%;
  height: 895px;
  min-height: 0;
  padding: 24px 96px 214px;
  z-index: 1;
}

.options-grid {
  display: grid;
  gap: 20px 20px;
  height: 100%;
  align-items: stretch;
  justify-items: stretch;
}

.options-grid--standard {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.options-grid--body {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
}

.options-grid--body .option-card {
  padding: 18px 12px;
}

.option-card {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 4px solid rgba(59, 192, 228, 0.5);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: inset 0 0 0 3px rgba(255, 186, 230, 0.24);
  transition: border-color 120ms ease, box-shadow 120ms ease;
  overflow: hidden;
}

.option-card:hover {
  box-shadow: inset 0 0 0 3px rgba(255, 186, 230, 0.36);
}

.option-card.is-selected {
  border-color: #ff9bdf;
  box-shadow: inset 0 0 0 3px rgba(255, 186, 230, 0.5);
}

.option-card__thumb {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
  border-radius: 0;
  background: transparent;
  justify-self: center;
  align-self: center;
}

.options-grid--body .option-card__thumb {
  width: auto;
  height: 100%;
}

.page-arrow {
  position: absolute;
  bottom: 22px;
  width: 94px;
  height: 95px;
  border-radius: 50%;
  border: 4px solid var(--cyan-border);
  background: radial-gradient(circle at 32% 30%, #ffffff 0%, #dadada 78%, #c7c7c7 100%);
  color: #525252;
  font-size: 36px;
  z-index: 3;
}

.page-arrow--right {
  right: 38px;
  border-color: var(--pink-border);
}

.page-arrow--left {
  left: 38px;
}

.page-arrow[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.lipstick-panel {
  position: absolute;
  left: 50%;
  bottom: 118px;
  width: 692px;
  margin: 0;
  padding: 18px 20px;
  border-radius: 24px;
  border: 4px solid rgba(255, 186, 230, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 247, 251, 0.96) 100%),
    radial-gradient(circle at top left, rgba(255, 186, 230, 0.28), transparent 44%);
  box-shadow: var(--option-shadow);
  transform: translateX(-50%);
  z-index: 5;
}

.lipstick-panel.is-hidden {
  display: none;
}

.lipstick-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.lipstick-panel__title {
  margin: 0;
  font-family: "ADLaM Display", sans-serif;
  font-size: 18px;
  color: #6b5a68;
}

.lipstick-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.lipstick-panel .clear-button {
  padding: 8px 12px;
  font-size: 13px;
}

.lipstick-option {
  display: grid;
  place-items: center;
  padding: 8px;
  border: 3px solid rgba(59, 192, 228, 0.3);
  border-radius: 14px;
  background: #ffffff;
}

.lipstick-option.is-selected {
  border-color: #ff9bdf;
}

.lipstick-option canvas {
  width: 100%;
  height: 60px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(252, 252, 252, 0.96), rgba(241, 248, 255, 0.96));
}

.selection-summary {
  display: none;
}

.name-box {
  position: absolute;
  left: 101px;
  top: 1818px;
  width: 900px;
  display: block;
}

.name-box input {
  width: 100%;
  height: 131px;
  border-radius: 20px;
  border: 3px solid var(--gray-700);
  background: var(--gray-200);
  padding: 24px 28px;
  font-family: "ADLaM Display", sans-serif;
  font-size: 58px;
  color: #7b7b7b;
}

.name-box input::placeholder {
  color: #7b7b7b;
}

.download-button {
  position: absolute;
  left: 2284px;
  top: 1839px;
  width: 569px;
  height: 131px;
  border-radius: 20px;
  border: 6px solid var(--cyan-deep);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.06) 24%, transparent 24%),
    linear-gradient(180deg, rgba(110, 213, 237, 1) 0%, rgba(99, 201, 226, 1) 100%);
  box-shadow:
    inset 0 4px 4px 5px rgba(255, 255, 255, 0.25),
    inset 0 4px 4px 18px rgba(0, 138, 169, 0.25),
    0 18px 30px rgba(39, 135, 170, 0.18);
  font-family: "ADLaM Display", sans-serif;
  font-size: 64px;
  color: #ffffff;
}

.download-button:active {
  transform: translateY(1px);
}
