/* Empty-stage onboarding and the friendly Start Fresh confirmation. */

.empty-stage-onboarding {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 11;
  display: flex;
  width: min(460px, calc(100% - 54px));
  min-height: 228px;
  padding: 27px 31px 25px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--brass-light);
  border-radius: 23px 18px 26px 17px;
  color: var(--paper-ink);
  text-align: center;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.78) 0 2px, transparent 3px),
    radial-gradient(circle at 83% 17%, rgba(210, 154, 50, 0.34) 0 2px, transparent 3px),
    linear-gradient(145deg, #fff8df 0%, #f4dfaa 61%, #e7c579 100%);
  box-shadow:
    0 0 0 3px var(--cocoa),
    0 0 0 5px rgba(255, 216, 120, 0.62),
    0 18px 42px rgba(0, 0, 0, 0.46),
    inset 0 0 0 1px rgba(255, 255, 255, 0.78);
  transform: translate(-50%, -50%);
  animation: empty-stage-arrive 440ms var(--ease-spring) both;
}

.empty-stage-onboarding[hidden] {
  display: none;
}

.empty-stage-onboarding::before {
  position: absolute;
  inset: 9px;
  pointer-events: none;
  content: "";
  border: 1px dashed rgba(111, 64, 26, 0.28);
  border-radius: 17px 12px 20px 11px;
}

.empty-stage-onboarding::after {
  position: absolute;
  top: 30%;
  right: clamp(-92px, calc(227px - 23.6vw), 0px);
  z-index: 2;
  pointer-events: none;
  content: "\279C";
  color: var(--brass-light);
  font-family: system-ui, sans-serif;
  font-size: 4.8rem;
  font-weight: 900;
  line-height: 1;
  -webkit-text-stroke: 1px var(--cocoa);
  text-shadow:
    0 4px 0 var(--cocoa),
    0 0 18px rgba(255, 221, 133, 0.95);
  transform: translateY(-50%) rotate(-42deg) scaleX(1.3);
  transform-origin: center;
  animation: first-step-arrow 1.35s ease-in-out infinite;
}

.empty-stage-star {
  position: absolute;
  top: -21px;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 2px solid var(--brass-light);
  border-radius: 50%;
  color: #fff4bc;
  font-size: 1.4rem;
  background: radial-gradient(circle at 38% 30%, #df5544, #9d1c27 58%, #68141d);
  box-shadow: 0 0 0 3px var(--cocoa), 0 0 22px rgba(255, 213, 113, 0.5);
  animation: onboarding-star 2.4s ease-in-out infinite;
}

.empty-stage-step {
  position: relative;
  margin-bottom: 7px;
  color: #8d2728;
  font-size: 0.67rem;
  font-weight: 1000;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.empty-stage-onboarding h3 {
  position: relative;
  margin: 0;
  color: #4b2518;
  font-family: var(--font-display);
  font-size: clamp(1.62rem, 3.1vw, 2.25rem);
  line-height: 1.04;
  text-wrap: balance;
  text-shadow: 0 1px rgba(255, 255, 255, 0.72);
}

.empty-stage-onboarding p {
  position: relative;
  max-width: 35ch;
  margin: 9px 0 16px;
  color: #64412b;
  font-size: clamp(0.76rem, 1.1vw, 0.9rem);
  font-weight: 700;
  line-height: 1.45;
}

.empty-stage-action {
  position: relative;
  min-width: min(270px, 100%);
  min-height: 49px;
  padding: 11px 22px;
  border-color: var(--cocoa);
  color: #fff8da;
  letter-spacing: 0.035em;
  background: linear-gradient(145deg, #25715a, #124638);
  box-shadow:
    0 0 0 2px var(--brass),
    0 5px 0 #25130d,
    0 10px 20px rgba(25, 19, 9, 0.25),
    inset 0 1px rgba(255, 255, 255, 0.2);
}

.empty-stage-action::before,
.empty-stage-action::after {
  color: var(--brass-light);
  content: "\2726";
  margin-inline: 0 9px;
}

.empty-stage-action::after {
  margin-inline: 9px 0;
}

.empty-stage-action:hover:not(:disabled) {
  filter: brightness(1.12);
  transform: translateY(-2px) rotate(-0.25deg);
}

.empty-stage-action:focus-visible,
.fresh-start-actions button:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

.stage-card.is-awaiting-elf {
  border-color: var(--brass-light);
  box-shadow:
    var(--shadow),
    inset 0 0 0 3px var(--cocoa),
    inset 0 0 0 6px rgba(255, 218, 122, 0.2),
    0 0 26px rgba(255, 205, 98, 0.2);
}

.stage-card.is-awaiting-elf .stage-nameplate,
.stage-card.is-awaiting-elf .speech-bubble,
.stage-card.is-awaiting-elf .buddy-drag-handle,
.stage-card.is-awaiting-elf .buddy-dismiss-hint {
  display: none !important;
}

.drop-hint.is-first-step {
  border-color: var(--brass-light);
  background: linear-gradient(145deg, #fff8df, #f3d99f);
  box-shadow:
    0 0 0 2px var(--cocoa),
    0 0 0 4px rgba(255, 216, 120, 0.54),
    0 8px 21px rgba(0, 0, 0, 0.36),
    0 0 25px rgba(255, 218, 122, 0.22);
}

.drop-hint.is-first-step::before {
  color: #a6292f;
  animation: onboarding-star 2.4s ease-in-out infinite;
}

.category-btn.is-locked,
.category-btn[aria-disabled="true"],
.item-card.is-locked,
.item-card[aria-disabled="true"],
.personality-btn.is-locked,
.personality-btn:disabled,
.profile-card.is-locked .personality-btn,
.wardrobe.is-locked .item-card {
  cursor: not-allowed;
  filter: grayscale(0.38) saturate(0.66);
  opacity: 0.48;
  transform: none;
}

.category-btn.is-locked:hover,
.category-btn[aria-disabled="true"]:hover,
.item-card.is-locked:hover,
.item-card[aria-disabled="true"]:hover,
.personality-btn.is-locked:hover,
.personality-btn:disabled:hover {
  transform: none;
}

.profile-card.is-locked {
  position: relative;
  border-color: rgba(255, 215, 119, 0.25);
}

.profile-card.is-locked::after {
  position: absolute;
  inset: 0;
  z-index: 4;
  cursor: not-allowed;
  content: "";
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(7, 27, 25, 0.2), rgba(10, 20, 16, 0.38));
}

#surprise-btn:disabled,
#talk-btn:disabled,
#finish-btn:disabled,
#reset-btn:disabled,
.workbench-controls.is-locked button:not(#reset-btn) {
  cursor: not-allowed;
  filter: grayscale(0.4) saturate(0.7);
  opacity: 0.52;
  transform: none;
}

.stage-card.is-resetting {
  border-color: var(--cyan);
  pointer-events: none;
  box-shadow:
    var(--shadow),
    inset 0 0 0 3px var(--cocoa),
    inset 0 0 0 7px rgba(125, 231, 228, 0.18),
    0 0 31px rgba(125, 231, 228, 0.28);
}

.stage-card.is-resetting .stage-nameplate,
.stage-card.is-resetting .speech-bubble,
.stage-card.is-resetting .empty-stage-onboarding,
.stage-card.is-resetting .buddy-drag-handle,
.stage-card.is-resetting .buddy-dismiss-hint,
.stage-card.is-resetting .drop-hint {
  visibility: hidden;
  opacity: 0;
}

.stage-card.is-resetting .status-dot {
  animation: reset-status-pulse 640ms ease-in-out infinite alternate;
}

.fresh-start-modal {
  background:
    radial-gradient(circle at 50% 38%, rgba(125, 231, 228, 0.11), transparent 32%),
    rgba(1, 13, 14, 0.82);
}

.reset-modal-card {
  width: min(620px, 100%);
  padding: clamp(28px, 4.5vw, 42px);
  overflow: visible;
  text-align: center;
  background:
    radial-gradient(circle at 14% 13%, rgba(255, 216, 120, 0.17) 0 2px, transparent 3px),
    radial-gradient(circle at 88% 20%, rgba(125, 231, 228, 0.14) 0 3px, transparent 4px),
    radial-gradient(circle at 50% 0%, rgba(226, 163, 58, 0.17), transparent 31%),
    linear-gradient(145deg, #164b3a, #092d2b 52%, #302016 100%);
}

.reset-modal-card::after {
  position: absolute;
  inset: 16px;
  pointer-events: none;
  content: "";
  border: 1px dashed rgba(255, 222, 143, 0.18);
  border-radius: 17px 13px 22px 12px;
}

.fresh-start-emblem {
  display: grid;
  width: 74px;
  height: 74px;
  margin: -2px auto 14px;
  place-items: center;
  border: 3px solid var(--cocoa);
  border-radius: 48% 53% 46% 55%;
  color: #fff5c5;
  font-size: 2rem;
  background:
    radial-gradient(circle at 37% 30%, #ef7658 0 8%, transparent 9%),
    radial-gradient(circle at 37% 30%, #d64b40, #9f202a 58%, #65131c 100%);
  box-shadow:
    0 0 0 2px var(--brass-light),
    0 8px 18px rgba(0, 0, 0, 0.34),
    0 0 28px rgba(255, 212, 105, 0.25);
  transform: rotate(-5deg);
}

.fresh-start-emblem span {
  display: block;
  animation: reset-emblem-twinkle 2.2s ease-in-out infinite;
}

.reset-modal-card .panel-eyebrow {
  margin-bottom: 8px;
  color: var(--brass-light);
  letter-spacing: 0.17em;
}

.reset-modal-card h2 {
  max-width: 13ch;
  margin: 0 auto 13px;
  font-size: clamp(1.85rem, 4.2vw, 2.75rem);
  line-height: 1.03;
}

.fresh-start-body {
  max-width: 48ch;
  margin: 0 auto;
  color: var(--cream);
  font-size: clamp(0.88rem, 1.6vw, 1rem);
  font-weight: 700;
  line-height: 1.55;
}

.fresh-start-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
  gap: 11px;
}

.fresh-start-actions button {
  width: 100%;
  min-height: 52px;
}

.fresh-start-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-color: var(--cocoa);
  background: linear-gradient(145deg, #bd3436, #7b1923);
  box-shadow:
    0 0 0 1px var(--brass-light),
    0 5px 0 rgba(30, 11, 8, 0.88),
    0 10px 19px rgba(0, 0, 0, 0.25),
    inset 0 1px rgba(255, 255, 255, 0.2);
}

.fresh-start-confirm::before {
  content: "\2726";
  color: #ffe6a5;
  font-size: 1rem;
}

@keyframes empty-stage-arrive {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 18px)) scale(0.94) rotate(-0.7deg);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

@keyframes first-step-arrow {
  0%,
  100% {
    transform: translate(-3px, calc(-50% + 3px)) rotate(-42deg) scaleX(1.3);
  }

  50% {
    transform: translate(8px, calc(-50% - 8px)) rotate(-42deg) scaleX(1.36);
  }
}

@keyframes onboarding-star {
  0%,
  100% {
    filter: brightness(1);
    transform: rotate(-5deg) scale(1);
  }
  50% {
    filter: brightness(1.18);
    transform: rotate(5deg) scale(1.07);
  }
}

@keyframes reset-emblem-twinkle {
  0%,
  100% {
    filter: drop-shadow(0 0 2px rgba(255, 225, 137, 0.35));
    transform: rotate(0deg) scale(1);
  }
  50% {
    filter: drop-shadow(0 0 11px rgba(255, 225, 137, 0.9));
    transform: rotate(10deg) scale(1.11);
  }
}

@keyframes reset-status-pulse {
  from {
    box-shadow: 0 0 4px var(--cyan);
    transform: scale(0.88);
  }
  to {
    box-shadow: 0 0 16px var(--cyan);
    transform: scale(1.12);
  }
}

@media (max-width: 960px) {
  .empty-stage-onboarding {
    top: 52%;
    width: min(430px, calc(100% - 40px));
  }

  .empty-stage-onboarding::after {
    top: auto;
    right: 50%;
    bottom: -68px;
    font-size: 4rem;
    transform: translateX(50%) rotate(90deg);
    animation-name: first-step-arrow-down;
  }
}

@keyframes first-step-arrow-down {
  0%,
  100% {
    transform: translate(50%, -4px) rotate(90deg);
  }
  50% {
    transform: translate(50%, 7px) rotate(90deg);
  }
}

@media (max-width: 720px) {
  .empty-stage-onboarding {
    top: 54%;
    width: min(390px, calc(100% - 34px));
    min-height: 216px;
    padding: 25px 24px 22px;
  }

  .empty-stage-onboarding h3 {
    font-size: clamp(1.5rem, 7vw, 1.9rem);
  }

  .empty-stage-onboarding p {
    margin-block: 8px 14px;
  }

  .empty-stage-onboarding::after {
    bottom: -60px;
    font-size: 3.55rem;
  }

  .empty-stage-action {
    min-height: 50px;
  }

  .drop-hint.is-first-step {
    max-width: 55%;
  }

  .reset-modal-card {
    width: min(570px, 100%);
    padding: 27px 24px 23px;
  }

  .fresh-start-emblem {
    width: 65px;
    height: 65px;
    margin-bottom: 14px;
    font-size: 1.7rem;
  }
}

@media (max-width: 430px) {
  .empty-stage-onboarding {
    top: 55%;
    width: calc(100% - 24px);
    min-height: 204px;
    padding: 23px 16px 17px;
    border-radius: 18px 14px 21px 13px;
  }

  .empty-stage-onboarding::before {
    inset: 7px;
  }

  .empty-stage-onboarding::after {
    bottom: -49px;
    font-size: 3.05rem;
  }

  .empty-stage-star {
    top: -18px;
    width: 39px;
    height: 39px;
    font-size: 1.15rem;
  }

  .empty-stage-step {
    margin-bottom: 5px;
    font-size: 0.58rem;
  }

  .empty-stage-onboarding h3 {
    font-size: clamp(1.28rem, 7vw, 1.58rem);
  }

  .empty-stage-onboarding p {
    max-width: 31ch;
    margin: 7px 0 12px;
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .empty-stage-action {
    min-width: 0;
    width: 100%;
    min-height: 47px;
    padding-inline: 12px;
    font-size: 0.7rem;
  }

  .drop-hint.is-first-step {
    max-width: 58%;
  }

  .reset-modal-card {
    padding: 24px 16px 18px;
    overflow: auto;
  }

  .fresh-start-emblem {
    width: 58px;
    height: 58px;
    margin-bottom: 12px;
    font-size: 1.5rem;
  }

  .reset-modal-card .panel-eyebrow {
    max-width: calc(100% - 70px);
    margin-inline: auto;
    font-size: 0.58rem;
  }

  .reset-modal-card h2 {
    margin: 0 auto 10px;
    font-size: 1.65rem;
  }

  .fresh-start-body {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .fresh-start-actions {
    grid-template-columns: 1fr;
    margin-top: 16px;
    gap: 9px;
  }

  .fresh-start-actions button {
    min-height: 48px;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .empty-stage-onboarding {
    top: 53%;
    width: min(540px, calc(100% - 90px));
    min-height: 164px;
    padding: 20px 24px 17px;
  }

  .empty-stage-onboarding p {
    margin-block: 5px 9px;
  }

  .empty-stage-action {
    min-height: 44px;
  }

  .reset-modal-card {
    padding-block: 20px;
  }

  .fresh-start-emblem {
    display: none;
  }

  .fresh-start-actions {
    margin-top: 12px;
  }
}

/* The first-step CTA spotlights Boy Elf without marking it as selected. */
.item-grid[data-category="elfType"] .item-card.is-elf-type-guided {
  z-index: 6;
  border-color: #ffe08a;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 231, 145, 0.28), transparent 47%),
    linear-gradient(150deg, rgba(45, 108, 82, 0.98), rgba(12, 49, 42, 0.98));
  box-shadow:
    inset 0 0 0 2px rgba(255, 236, 177, 0.22),
    0 0 0 2px var(--cocoa),
    0 0 0 4px rgba(255, 220, 125, 0.7),
    0 0 26px rgba(255, 215, 110, 0.75),
    0 0 38px rgba(125, 231, 228, 0.3);
  animation: elf-type-guide-breathe 1.8s ease-in-out infinite;
}

.item-grid[data-category="elfType"] .item-card.is-elf-type-guided .item-icon.item-visual {
  border-color: #ffe596;
  box-shadow:
    inset 0 0 0 1px rgba(255, 246, 203, 0.24),
    0 0 18px rgba(125, 231, 228, 0.62),
    0 0 28px rgba(255, 218, 120, 0.58);
  animation: elf-type-guide-icon 1.8s ease-in-out infinite;
}

.elf-type-guide-magic {
  position: absolute;
  inset: 3px;
  z-index: 4;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.elf-type-guide-magic::before {
  position: absolute;
  top: 34%;
  left: 50%;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(255, 239, 175, 0.34), rgba(125, 231, 228, 0.15) 46%, transparent 71%);
  transform: translate(-50%, -50%);
  animation: elf-type-guide-aura 1.8s ease-in-out infinite;
}

.elf-type-guide-spark {
  position: absolute;
  left: var(--guide-x);
  top: var(--guide-y);
  color: var(--guide-color, #ffe89f);
  font-family: system-ui, sans-serif;
  font-size: var(--guide-size, 0.76rem);
  line-height: 1;
  opacity: 0;
  text-shadow: 0 0 6px currentColor, 0 0 13px currentColor;
  transform: translate(-50%, -50%) scale(0.45) rotate(-20deg);
  animation: elf-type-guide-spark 1.8s ease-in-out infinite;
  animation-delay: var(--guide-delay, 0s);
}

.elf-type-guide-spark:nth-child(1) { --guide-x: 12%; --guide-y: 17%; --guide-delay: -0.05s; }
.elf-type-guide-spark:nth-child(2) { --guide-x: 35%; --guide-y: 8%; --guide-delay: -0.27s; --guide-color: #8ff4f1; }
.elf-type-guide-spark:nth-child(3) { --guide-x: 67%; --guide-y: 9%; --guide-delay: -0.5s; }
.elf-type-guide-spark:nth-child(4) { --guide-x: 88%; --guide-y: 25%; --guide-delay: -0.72s; --guide-color: #8ff4f1; }
.elf-type-guide-spark:nth-child(5) { --guide-x: 87%; --guide-y: 52%; --guide-delay: -0.94s; }
.elf-type-guide-spark:nth-child(6) { --guide-x: 70%; --guide-y: 69%; --guide-delay: -1.16s; --guide-color: #8ff4f1; }
.elf-type-guide-spark:nth-child(7) { --guide-x: 31%; --guide-y: 68%; --guide-delay: -1.38s; }
.elf-type-guide-spark:nth-child(8) { --guide-x: 10%; --guide-y: 48%; --guide-delay: -1.6s; --guide-color: #8ff4f1; }

@keyframes elf-type-guide-breathe {
  0%, 100% { filter: brightness(1) saturate(1); }
  50% { filter: brightness(1.15) saturate(1.12); }
}

@keyframes elf-type-guide-icon {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(255, 246, 203, 0.24), 0 0 14px rgba(125, 231, 228, 0.5), 0 0 22px rgba(255, 218, 120, 0.46);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(255, 246, 203, 0.36), 0 0 22px rgba(125, 231, 228, 0.76), 0 0 34px rgba(255, 218, 120, 0.72);
  }
}

@keyframes elf-type-guide-aura {
  0%, 100% { opacity: 0.46; transform: translate(-50%, -50%) scale(0.8); }
  50% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes elf-type-guide-spark {
  0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.42) rotate(-22deg); }
  24% { opacity: 1; }
  58% { opacity: 0.94; transform: translate(-50%, calc(-50% - 6px)) scale(1.24) rotate(32deg); }
  78% { opacity: 0; transform: translate(-50%, calc(-50% - 10px)) scale(0.76) rotate(58deg); }
}

@media (max-width: 430px) {
  .elf-type-guide-spark {
    font-size: 0.68rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .empty-stage-onboarding,
  .empty-stage-onboarding::after,
  .empty-stage-star,
  .drop-hint.is-first-step::before,
  .fresh-start-emblem span,
  .stage-card.is-resetting .status-dot,
  .item-card.is-elf-type-guided,
  .item-card.is-elf-type-guided .item-icon.item-visual,
  .elf-type-guide-magic::before,
  .elf-type-guide-spark {
    animation: none !important;
  }

  .elf-type-guide-spark {
    opacity: 0.82;
  }
}

html[data-motion="gentle"] .empty-stage-onboarding,
html[data-motion="gentle"] .empty-stage-onboarding::after,
html[data-motion="gentle"] .empty-stage-star,
html[data-motion="gentle"] .drop-hint.is-first-step::before,
html[data-motion="gentle"] .fresh-start-emblem span,
html[data-motion="gentle"] .stage-card.is-resetting .status-dot,
html[data-motion="gentle"] .item-card.is-elf-type-guided,
html[data-motion="gentle"] .item-card.is-elf-type-guided .item-icon.item-visual,
html[data-motion="gentle"] .elf-type-guide-magic::before,
html[data-motion="gentle"] .elf-type-guide-spark {
  animation: none !important;
}

html[data-motion="gentle"] .elf-type-guide-spark {
  opacity: 0.82;
}

/* Step 2 customization coachmark. */
.stage-wrap {
  position: relative;
}

.customization-coachmark {
  position: absolute;
  top: clamp(134px, 18%, 170px);
  left: clamp(38px, 7%, 70px);
  z-index: 15;
  display: flex;
  width: min(340px, 46%);
  min-height: 164px;
  padding: 24px 25px 20px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--brass-light);
  border-radius: 19px 15px 22px 13px;
  color: var(--paper-ink);
  text-align: center;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 255, 255, 0.8) 0 2px, transparent 3px),
    radial-gradient(circle at 84% 18%, rgba(210, 154, 50, 0.34) 0 2px, transparent 3px),
    linear-gradient(145deg, #fff8df 0%, #f2dca5 62%, #e6c477 100%);
  box-shadow:
    0 0 0 3px var(--cocoa),
    0 0 0 5px rgba(255, 216, 120, 0.56),
    0 16px 34px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.76);
  animation: step-two-card-arrive 420ms var(--ease-spring) both;
}

.customization-coachmark[hidden] {
  display: none;
}

.customization-coachmark::before {
  position: absolute;
  inset: 8px;
  pointer-events: none;
  content: "";
  border: 1px dashed rgba(111, 64, 26, 0.28);
  border-radius: 14px 10px 17px 9px;
}

.customization-coachmark::after {
  position: absolute;
  top: -34px;
  left: clamp(-148px, -12vw, -96px);
  z-index: 2;
  pointer-events: none;
  content: "\279C";
  color: var(--brass-light);
  font-family: system-ui, sans-serif;
  font-size: 4.35rem;
  font-weight: 900;
  line-height: 1;
  -webkit-text-stroke: 1px var(--cocoa);
  text-shadow:
    0 4px 0 var(--cocoa),
    0 0 18px rgba(255, 221, 133, 0.95);
  transform: rotate(210deg) scaleX(1.28);
  transform-origin: center;
  animation: step-two-arrow-left 1.35s ease-in-out infinite;
}

.customization-coachmark-star {
  position: absolute;
  top: -18px;
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 2px solid var(--brass-light);
  border-radius: 50%;
  color: #fff4bc;
  font-size: 1.14rem;
  background: radial-gradient(circle at 38% 30%, #df5544, #9d1c27 58%, #68141d);
  box-shadow:
    0 0 0 3px var(--cocoa),
    0 0 20px rgba(255, 213, 113, 0.5);
  animation: onboarding-star 2.4s ease-in-out infinite;
}

.customization-coachmark-step {
  position: relative;
  margin: 2px 0 5px;
  color: #8d2728;
  font-size: 0.64rem;
  font-weight: 1000;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.customization-coachmark h3 {
  position: relative;
  margin: 0;
  color: #4b2518;
  font-family: var(--font-display);
  font-size: clamp(1.32rem, 2.2vw, 1.72rem);
  line-height: 1.05;
  text-wrap: balance;
  text-shadow: 0 1px rgba(255, 255, 255, 0.72);
}

.customization-coachmark p {
  position: relative;
  max-width: 35ch;
  margin: 8px 0 13px;
  color: #64412b;
  font-size: clamp(0.7rem, 1vw, 0.82rem);
  font-weight: 700;
  line-height: 1.35;
  text-wrap: balance;
}

.customization-coachmark-action {
  position: relative;
  min-width: min(224px, 100%);
  min-height: 42px;
  padding: 9px 18px;
  border-color: var(--cocoa);
  color: #fff8da;
  font-size: 0.69rem;
  letter-spacing: 0.045em;
  background: linear-gradient(145deg, #25715a, #124638);
  box-shadow:
    0 0 0 2px var(--brass),
    0 4px 0 #25130d,
    0 8px 16px rgba(25, 19, 9, 0.22),
    inset 0 1px rgba(255, 255, 255, 0.2);
}

.customization-coachmark-action:hover,
.customization-coachmark-action:focus-visible {
  border-color: #fff0b1;
  color: #fffdf1;
  background: linear-gradient(145deg, #2b8065, #155342);
  box-shadow:
    0 0 0 2px var(--brass),
    0 4px 0 #25130d,
    0 0 22px rgba(125, 231, 228, 0.56),
    inset 0 1px rgba(255, 255, 255, 0.24);
}

.stage-card.is-guiding-customization .speech-bubble {
  display: none !important;
}

.category-btn.is-step-two-target:not([aria-pressed="true"]) {
  color: #fff9dc;
  border-color: #ffdf81;
  background:
    radial-gradient(circle at 28px 50%, rgba(125, 231, 228, 0.22), transparent 29px),
    linear-gradient(140deg, rgba(30, 106, 78, 0.98), rgba(18, 57, 44, 0.98));
}

.category-btn.is-step-two-target {
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.18),
    0 3px 0 rgba(27, 14, 8, 0.54),
    0 0 17px rgba(125, 231, 228, 0.72),
    0 0 27px rgba(255, 218, 120, 0.62);
  animation: step-two-target-pulse 1.7s ease-in-out infinite;
}

.category-btn.is-step-two-target .category-visual,
.category-btn.is-step-two-target .category-icon {
  border-color: #ffe79a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 14px rgba(125, 231, 228, 0.68);
}

.step-two-target-magic {
  position: absolute;
  inset: 1px;
  z-index: 4;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.step-two-target-spark {
  position: absolute;
  left: var(--step-two-x);
  top: var(--step-two-y);
  color: var(--step-two-color, #ffe89f);
  font-family: system-ui, sans-serif;
  font-size: var(--step-two-size, 0.7rem);
  line-height: 1;
  opacity: 0;
  text-shadow: 0 0 6px currentColor, 0 0 13px currentColor;
  transform: translate(-50%, -50%) scale(0.45) rotate(-20deg);
  animation: step-two-spark 1.65s ease-in-out infinite;
  animation-delay: var(--step-two-delay, 0s);
}

.step-two-target-spark:nth-child(1) { --step-two-x: 10%; --step-two-y: 20%; --step-two-delay: -0.05s; }
.step-two-target-spark:nth-child(2) { --step-two-x: 34%; --step-two-y: 10%; --step-two-delay: -0.31s; --step-two-color: #8ff4f1; }
.step-two-target-spark:nth-child(3) { --step-two-x: 82%; --step-two-y: 18%; --step-two-delay: -0.57s; }
.step-two-target-spark:nth-child(4) { --step-two-x: 89%; --step-two-y: 70%; --step-two-delay: -0.83s; --step-two-color: #8ff4f1; }
.step-two-target-spark:nth-child(5) { --step-two-x: 54%; --step-two-y: 88%; --step-two-delay: -1.09s; }
.step-two-target-spark:nth-child(6) { --step-two-x: 15%; --step-two-y: 76%; --step-two-delay: -1.35s; --step-two-color: #8ff4f1; }

@keyframes step-two-card-arrive {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.94) rotate(-1deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

@keyframes step-two-arrow-left {
  0%, 100% { transform: translate(0, 0) rotate(210deg) scaleX(1.28); }
  50% { transform: translate(-9px, -5px) rotate(210deg) scaleX(1.34); }
}

@keyframes step-two-target-pulse {
  0%, 100% {
    filter: brightness(1) saturate(1);
  }
  50% {
    filter: brightness(1.16) saturate(1.12);
  }
}

@keyframes step-two-spark {
  0%, 100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.42) rotate(-22deg);
  }
  25% {
    opacity: 1;
  }
  58% {
    opacity: 0.96;
    transform: translate(-50%, calc(-50% - 5px)) scale(1.22) rotate(30deg);
  }
  80% {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 9px)) scale(0.74) rotate(55deg);
  }
}

@keyframes step-two-arrow-up {
  0%, 100% { transform: rotate(-90deg) scaleX(1.24); }
  50% { transform: translateY(-8px) rotate(-90deg) scaleX(1.31); }
}

@media (max-width: 720px) {
  .customization-coachmark {
    top: clamp(96px, 23%, 126px);
    left: 16px;
    width: min(286px, 74%);
    min-height: 148px;
    padding: 21px 19px 17px;
  }

  .customization-coachmark::after {
    top: -92px;
    left: 125px;
    font-size: 4rem;
    transform: rotate(-90deg) scaleX(1.24);
    animation-name: step-two-arrow-up;
  }

  .customization-coachmark h3 {
    font-size: clamp(1.2rem, 4.2vw, 1.48rem);
  }

  .customization-coachmark p {
    margin: 7px 0 11px;
  }
}

@media (max-width: 430px) {
  .customization-coachmark {
    top: clamp(88px, 22%, 112px);
    left: 12px;
    width: min(270px, 76%);
    min-height: 138px;
    padding: 20px 16px 15px;
  }

  .customization-coachmark::after {
    top: -81px;
    left: 125px;
    font-size: 3.45rem;
  }

  .customization-coachmark-star {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .customization-coachmark-step {
    font-size: 0.57rem;
  }

  .customization-coachmark h3 {
    font-size: 1.18rem;
  }

  .customization-coachmark p {
    font-size: 0.66rem;
    line-height: 1.3;
  }

  .customization-coachmark-action {
    min-height: 44px;
    font-size: 0.62rem;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .customization-coachmark {
    top: 82px;
    left: 14px;
    width: min(310px, 43%);
    min-height: 124px;
    padding: 14px 17px 12px;
  }

  .customization-coachmark-star {
    display: none;
  }

  .customization-coachmark-step {
    margin-bottom: 3px;
  }

  .customization-coachmark h3 {
    font-size: 1.12rem;
  }

  .customization-coachmark p {
    margin: 5px 0 8px;
    font-size: 0.64rem;
  }

  .customization-coachmark-action {
    min-height: 44px;
    padding: 7px 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .customization-coachmark,
  .customization-coachmark::after,
  .customization-coachmark-star,
  .category-btn.is-step-two-target,
  .step-two-target-spark {
    animation: none !important;
  }

  .step-two-target-spark {
    opacity: 0.82;
  }
}

html[data-motion="gentle"] .customization-coachmark,
html[data-motion="gentle"] .customization-coachmark::after,
html[data-motion="gentle"] .customization-coachmark-star,
html[data-motion="gentle"] .category-btn.is-step-two-target,
html[data-motion="gentle"] .step-two-target-spark,
html[data-background-motion="off"] .customization-coachmark,
html[data-background-motion="off"] .customization-coachmark::after,
html[data-background-motion="off"] .customization-coachmark-star,
html[data-background-motion="off"] .category-btn.is-step-two-target,
html[data-background-motion="off"] .step-two-target-spark {
  animation: none !important;
}

html[data-motion="gentle"] .step-two-target-spark,
html[data-background-motion="off"] .step-two-target-spark {
  opacity: 0.82;
}