:root {
  --ink: #211b17;
  --muted: #786f66;
  --paper: #fffaf1;
  --card: #fffdf8;
  --line: #ecd7bb;
  --line-strong: #d8b988;
  --gold: #be8c3d;
  --copper: #9f5b3b;
  --teal: #296f68;
  --sage: #dbe5d4;
  --shadow: 0 18px 45px rgba(71, 48, 26, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(41, 111, 104, 0.14), transparent 28rem),
    linear-gradient(135deg, #fffefd 0%, #fff6e8 52%, #f6fbf5 100%);
}

button {
  font: inherit;
}

.app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vw, 40px);
}

.flow-board {
  width: min(430px, 100%);
}

.flow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.stage {
  position: relative;
  display: none;
  opacity: 0;
  transform: translateX(18px);
}

.stage.is-active {
  display: block;
  opacity: 1;
  transform: translateX(0);
  animation: stageEnter 260ms ease both;
}

.stage.is-active .phone-screen {
  border-color: var(--gold);
  box-shadow: var(--shadow), 0 0 0 3px rgba(190, 140, 61, 0.18);
}

.stage-label {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.stage-label strong {
  font-size: 18px;
  white-space: nowrap;
}

.stage-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  background: #191512;
  border-radius: 50%;
}

.phone-screen {
  min-height: 590px;
  padding: 70px 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 14px 34px rgba(99, 71, 38, 0.09);
  transition: border-color 260ms ease, box-shadow 260ms ease;
}

.phone-header {
  height: 36px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf1;
  font-weight: 800;
}

.icon-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-content: center;
  gap: 4px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
}

.icon-button span {
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.tag-scene {
  width: 100%;
  min-height: 345px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.8), rgba(219, 229, 212, 0.54)),
    radial-gradient(circle at center, rgba(190, 140, 61, 0.18), transparent 52%);
  perspective: 900px;
}

.tag-scene:focus-visible,
.restart-button:focus-visible,
.answer-choice:focus-visible,
.next-action:focus-visible,
.primary-action:focus-visible,
.level-choice:focus-visible,
.quiz-answer-choice:focus-visible,
.keyword-action:focus-visible {
  outline: 3px solid rgba(41, 111, 104, 0.45);
  outline-offset: 3px;
}

.keyring-model {
  position: relative;
  width: 236px;
  height: 290px;
  transform-style: preserve-3d;
  animation: floatKeyring 3.4s ease-in-out infinite;
}

.ring {
  position: absolute;
  top: 3px;
  left: 86px;
  width: 64px;
  height: 64px;
  border: 8px solid #2b2926;
  border-top-color: #5d5a54;
  border-radius: 50%;
  transform: rotateX(58deg) rotateZ(-24deg);
  box-shadow: 0 12px 14px rgba(31, 27, 23, 0.22);
}

.chain-link {
  position: absolute;
  display: block;
  border: 5px solid #2c2926;
  border-radius: 18px;
  transform-style: preserve-3d;
}

.link-a {
  top: 57px;
  left: 101px;
  width: 34px;
  height: 54px;
  transform: rotateZ(24deg) rotateY(-22deg);
}

.link-b {
  top: 94px;
  left: 111px;
  width: 30px;
  height: 45px;
  transform: rotateZ(-18deg) rotateY(18deg);
}

.charm {
  position: absolute;
  left: 14px;
  bottom: 0;
  width: 208px;
  height: 210px;
  transform: rotateY(-12deg) rotateX(5deg) rotateZ(-3deg);
  transform-style: preserve-3d;
}

.charm::before {
  content: "";
  position: absolute;
  inset: 22px 12px 0;
  background: #fffdf9;
  border: 5px solid #171411;
  border-radius: 42px 42px 32px 32px;
  box-shadow:
    inset 9px -8px 0 rgba(190, 140, 61, 0.12),
    15px 20px 28px rgba(42, 35, 26, 0.18);
  transform: translateZ(-10px);
}

.person {
  position: absolute;
  left: 18px;
  bottom: 12px;
  width: 104px;
  height: 176px;
  transform: translateZ(28px);
}

.hair {
  position: absolute;
  top: 12px;
  left: 14px;
  width: 75px;
  height: 58px;
  background: #1f1a16;
  border-radius: 46% 54% 48% 45%;
  box-shadow: inset -10px -3px 0 #3b3027;
}

.face {
  position: absolute;
  top: 43px;
  left: 21px;
  width: 62px;
  height: 62px;
  background: #f0c8a2;
  border: 4px solid #191512;
  border-radius: 47% 48% 44% 45%;
}

.face::before,
.face::after {
  content: "";
  position: absolute;
  top: 25px;
  width: 7px;
  height: 10px;
  background: #191512;
  border-radius: 50%;
}

.face::before {
  left: 15px;
}

.face::after {
  right: 15px;
}

.body {
  position: absolute;
  top: 96px;
  left: 18px;
  width: 68px;
  height: 66px;
  background: linear-gradient(90deg, #1c1a18 0 45%, #fff 45% 55%, #2d2825 55%);
  border: 4px solid #191512;
  border-radius: 20px 20px 10px 10px;
}

.leg {
  position: absolute;
  bottom: 0;
  width: 23px;
  height: 36px;
  background: #171411;
  border-radius: 0 0 9px 9px;
}

.leg.left {
  left: 26px;
}

.leg.right {
  right: 24px;
}

.nfc-card {
  position: absolute;
  right: 6px;
  bottom: 19px;
  width: 94px;
  height: 148px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 5px solid #171411;
  border-radius: 18px;
  box-shadow: 10px 16px 18px rgba(32, 27, 22, 0.17);
  transform: translateZ(18px) rotateZ(-7deg);
}

.nfc-wave {
  position: absolute;
  border: 4px solid #191512;
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(45deg);
}

.wave-a {
  width: 30px;
  height: 30px;
}

.wave-b {
  width: 50px;
  height: 50px;
}

.wave-c {
  width: 70px;
  height: 70px;
}

.nfc-text {
  position: absolute;
  bottom: 24px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}

.scan-status {
  min-height: 78px;
  margin-top: 18px;
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 10px;
  align-items: center;
}

.scan-status strong {
  font-size: 18px;
}

.scan-status span:last-child {
  grid-column: 2;
  color: #2e2721;
  font-size: 15px;
}

.nfc-icon {
  grid-row: span 2;
  width: 35px;
  height: 35px;
  position: relative;
}

.nfc-icon::before,
.nfc-icon::after {
  content: "";
  position: absolute;
  border: 3px solid var(--ink);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(45deg);
}

.nfc-icon::before {
  inset: 6px;
}

.nfc-icon::after {
  inset: 0;
}

.quiz-panel,
.answer-panel,
.guide-panel,
.level-panel,
.play-panel,
.explain-panel,
.stamp-panel,
.shop-panel,
.share-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quiz-panel h1,
.answer-panel h1,
.guide-panel h1,
.level-panel h1,
.play-panel h1,
.explain-panel h1,
.stamp-panel h1,
.shop-panel h1,
.share-panel h1 {
  margin: 12px 0 18px;
  text-align: center;
  font-size: 20px;
  line-height: 1.45;
}

.mystery-portrait {
  position: relative;
  width: 134px;
  height: 134px;
  margin-bottom: 18px;
  overflow: hidden;
  background: #e8decc;
  border-radius: 50%;
}

.mystery-head {
  position: absolute;
  top: 28px;
  left: 43px;
  width: 48px;
  height: 58px;
  background: #281f16;
  border-radius: 46% 46% 42% 43%;
}

.mystery-body {
  position: absolute;
  left: 28px;
  bottom: 7px;
  width: 78px;
  height: 60px;
  background: #281f16;
  border-radius: 36px 36px 12px 12px;
}

.hint-list {
  width: 100%;
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.hint {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff7e7;
  color: #3a3027;
}

.hint p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.hint-icon {
  width: 18px;
  height: 18px;
  justify-self: center;
  position: relative;
  border: 2px solid var(--gold);
  border-radius: 50% 50% 44% 44%;
  background: #fff4d4;
}

.hint-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: -6px;
  height: 6px;
  border: 2px solid var(--gold);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: #fff4d4;
}

.answer-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.answer-choice {
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #362a20;
  background: #fff6e4;
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.answer-choice:hover,
.answer-choice.is-selected {
  color: #fff;
  background: #33251b;
  border-color: #33251b;
  transform: translateY(-2px);
}

.answer-choice.is-wrong {
  color: #fff;
  background: var(--copper);
  border-color: var(--copper);
  animation: shake 260ms ease;
}

.answer-choice.is-correct {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.answer-choice.is-auto {
  box-shadow: 0 0 0 5px rgba(41, 111, 104, 0.17);
}

.yoon-card {
  width: 142px;
  height: 148px;
  display: block;
  object-fit: cover;
  object-position: center top;
  background: #d8d5ce;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px #d5d1cb;
}

.answer-panel h2 {
  margin: 12px 0 2px;
  font-size: 15px;
}

.date {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.bio {
  max-width: 235px;
  min-height: 68px;
  margin: 0 0 14px;
  text-align: center;
  color: #3f352b;
  font-size: 13px;
  line-height: 1.55;
}

.next-card {
  width: 100%;
  min-height: 80px;
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff7e7;
  cursor: pointer;
  text-align: left;
}

.next-card span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--gold);
  border-radius: 6px;
}

.next-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 800;
}

.next-card:hover,
.primary-action:hover,
.level-choice:hover,
.quiz-answer-choice:hover {
  transform: translateY(-2px);
}

.guide-list {
  width: 100%;
  display: grid;
  gap: 12px;
  margin: 10px 0 16px;
}

.guide-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.guide-item strong {
  font-size: 17px;
  line-height: 1.45;
}

.guide-icon {
  width: 48px;
  height: 48px;
  display: block;
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fffaf1;
}

.list-icon::before,
.checklist-icon::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 19px;
  width: 18px;
  height: 3px;
  background: var(--ink);
  box-shadow: 0 9px 0 var(--ink), 0 18px 0 var(--ink);
}

.list-icon::after,
.checklist-icon::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 9px 0 var(--ink), 0 18px 0 var(--ink);
}

.stamp-icon::before {
  content: "";
  position: absolute;
  left: 13px;
  bottom: 10px;
  width: 22px;
  height: 15px;
  background: var(--ink);
  border-radius: 12px 12px 5px 5px;
}

.stamp-icon::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 16px;
  width: 16px;
  height: 16px;
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.level-preview {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 6px 0 16px;
}

.level-preview span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff6e4;
  font-size: 11px;
  font-weight: 800;
}

.quiz-note {
  width: 100%;
  margin: 4px 0 18px;
  padding: 16px 10px;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  text-align: center;
}

.quiz-note p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 800;
}

.primary-action {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: #fffaf1;
  background: #2d241c;
  cursor: pointer;
  font-weight: 900;
  transition: transform 180ms ease;
}

.level-choice-grid {
  width: 100%;
  max-width: 230px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  justify-items: center;
  gap: 14px 22px;
  margin: 20px 0 30px;
}

.level-choice {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #2e2721;
  background: #fff6e4;
  cursor: pointer;
  font-weight: 900;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease;
}

.level-choice:nth-child(5) {
  grid-column: 1 / -1;
}

.level-choice.is-selected {
  color: #2e2721;
  background: #fff6e4;
  border-color: var(--line);
}

.stamp-board {
  width: 100%;
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.stamp-board strong {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
}

.stamp-row {
  display: grid;
  grid-template-columns: repeat(5, 22px) 1fr;
  align-items: center;
  gap: 8px;
}

.stamp-row span {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fffaf1;
}

.stamp-row b {
  justify-self: end;
}

.quiz-progress {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.progress-track {
  width: 100%;
  height: 8px;
  margin-bottom: 26px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9dfce;
}

.progress-track span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: #4a96f0;
}

.play-answer-grid {
  width: 100%;
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.quiz-answer-choice {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #2e2721;
  background: #fffdf8;
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.quiz-answer-choice.is-selected,
.quiz-answer-choice.is-correct {
  color: #0b64d8;
  border-color: #4a96f0;
  background: #edf6ff;
  box-shadow: inset 0 0 0 1px #4a96f0;
}

.quiz-answer-choice.is-wrong {
  color: #fff;
  background: var(--copper);
  border-color: var(--copper);
  animation: shake 260ms ease;
}

.quiz-feedback {
  width: 100%;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #c9defc;
  border-radius: 8px;
  color: #2d5585;
  background: #edf6ff;
  font-size: 12px;
  line-height: 1.45;
}

.quiz-feedback.is-success {
  color: #155b51;
  border-color: rgba(41, 111, 104, 0.35);
  background: #eef8f3;
}

.red-portrait,
.stamp-medal {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 5px solid #cc342b;
  border-radius: 50%;
  background: #fff7f0;
  box-shadow: 0 8px 18px rgba(121, 40, 32, 0.14);
}

.red-portrait img,
.stamp-medal img {
  width: 104%;
  height: 104%;
  object-fit: cover;
  object-position: center top;
  filter: sepia(0.45) saturate(1.6) hue-rotate(320deg) contrast(1.05);
  opacity: 0.95;
}

.explain-box {
  width: 100%;
  margin: 22px 0 18px;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff7e7;
}

.explain-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.explain-box p {
  margin: 0;
  color: #3f352b;
  font-size: 13px;
  line-height: 1.55;
}

.stamp-panel h1 {
  font-size: 15px;
}

.stamp-medal {
  margin: 8px 0 18px;
}

.stamp-board.is-earned {
  margin-top: 0;
  margin-bottom: 14px;
}

.stamp-row .earned {
  position: relative;
  border-color: #d64239;
  background: #d64239;
}

.stamp-row .earned::before {
  content: "★";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
}

.coupon-strip {
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff7e7;
}

.coupon-strip p {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
}

.shop-panel h1 strong {
  color: #d3352c;
  font-size: 28px;
}

.shop-visual {
  position: relative;
  width: 220px;
  height: 230px;
  margin: 8px 0 10px;
}

.mini-keyring {
  position: absolute;
  left: 20px;
  bottom: 4px;
  width: 128px;
  height: 190px;
}

.mini-keyring::before {
  content: "";
  position: absolute;
  top: 0;
  left: 42px;
  width: 48px;
  height: 48px;
  border: 7px solid #1c1916;
  border-radius: 50%;
  transform: rotateX(55deg) rotateZ(-18deg);
}

.mini-person {
  position: absolute;
  left: 4px;
  bottom: 0;
  width: 72px;
  height: 132px;
  border-radius: 34px 34px 10px 10px;
  background:
    radial-gradient(circle at 50% 25%, #edc59e 0 18px, transparent 19px),
    radial-gradient(circle at 50% 9%, #1f1a16 0 26px, transparent 27px),
    linear-gradient(90deg, #191715 0 44%, #fff 44% 56%, #2a2521 56%);
  border: 3px solid #191512;
}

.mini-mask {
  position: absolute;
  right: 4px;
  bottom: 36px;
  width: 62px;
  height: 62px;
  border: 3px solid #191512;
  border-radius: 50%;
  background:
    radial-gradient(circle at 22px 26px, #191512 0 4px, transparent 5px),
    radial-gradient(circle at 40px 26px, #191512 0 4px, transparent 5px),
    #fff;
}

.discount-badge {
  position: absolute;
  right: 4px;
  top: 42px;
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  background: #d3352c;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
  clip-path: polygon(
    50% 0,
    61% 18%,
    82% 10%,
    80% 32%,
    100% 43%,
    82% 56%,
    90% 78%,
    66% 76%,
    50% 100%,
    35% 76%,
    10% 78%,
    18% 56%,
    0 43%,
    20% 32%,
    18% 10%,
    39% 18%
  );
}

.shop-copy {
  margin: 0 0 12px;
  text-align: center;
  color: #3f352b;
  font-size: 13px;
  line-height: 1.45;
}

.share-panel h1 {
  font-size: 15px;
}

.share-hero {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  position: relative;
  margin: 2px 0 16px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 28px 24px, #f15b50 0 3px, transparent 4px),
    radial-gradient(circle at 92px 22px, #4a96f0 0 3px, transparent 4px),
    radial-gradient(circle at 22px 88px, #f0b545 0 3px, transparent 4px),
    radial-gradient(circle at 106px 92px, #296f68 0 3px, transparent 4px),
    #fffdf8;
}

.share-symbol {
  width: 58px;
  height: 70px;
  display: block;
  position: relative;
  border: 4px solid #bfa46d;
  border-radius: 6px;
  background: #eef8f3;
}

.share-symbol::before,
.share-symbol::after {
  content: "";
  position: absolute;
  background: #2ca35c;
}

.share-symbol::before {
  top: 20px;
  left: 18px;
  width: 23px;
  height: 4px;
  transform: rotate(-28deg);
  box-shadow: 9px 18px 0 #2ca35c;
}

.share-symbol::after {
  top: 12px;
  left: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 28px -11px 0 #2ca35c, 34px 28px 0 #2ca35c;
}

.share-action {
  margin-bottom: 14px;
}

.reward-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.reward-item {
  min-height: 98px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.reward-item strong {
  font-size: 13px;
}

.reward-face {
  width: 54px;
  height: 54px;
  display: block;
  border: 3px solid #191512;
  border-radius: 50%;
  background:
    radial-gradient(circle at 18px 23px, #191512 0 4px, transparent 5px),
    radial-gradient(circle at 36px 23px, #191512 0 4px, transparent 5px),
    radial-gradient(circle at 50% 36px, #d9493d 0 7px, transparent 8px),
    #fff;
}

.reward-pen {
  width: 16px;
  height: 62px;
  display: block;
  border-radius: 9px;
  background: linear-gradient(#5b311f 0 72%, #14100d 72% 86%, #c8ad79 86%);
  transform: rotate(35deg);
  box-shadow: 8px 4px 0 rgba(48, 38, 30, 0.14);
}

.keyword-action {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #2e2721;
  background: #fff6e4;
  cursor: pointer;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease;
}

.keyword-action:hover {
  transform: translateY(-2px);
  background: #fff0d4;
}

.keyword-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.flow-arrow {
  display: none;
}

.flow-controls {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
}

.restart-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(45, 36, 28, 0.28);
  border-radius: 8px;
  color: #fffaf1;
  background: #2d241c;
  cursor: pointer;
  font-weight: 800;
}

.step-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #c9baa8;
  transition: width 220ms ease, background 220ms ease;
}

.dot.is-active {
  width: 26px;
  border-radius: 999px;
  background: var(--teal);
}

.dot.is-complete {
  background: var(--gold);
}

.app[data-reading="true"] .keyring-model {
  animation: tagPulse 880ms ease-in-out infinite;
}

@keyframes floatKeyring {
  0%,
  100% {
    transform: rotateY(-7deg) rotateX(4deg) translateY(0);
  }

  50% {
    transform: rotateY(8deg) rotateX(-3deg) translateY(-10px);
  }
}

@keyframes tagPulse {
  0%,
  100% {
    transform: rotateY(-10deg) rotateX(3deg) scale(1);
  }

  50% {
    transform: rotateY(12deg) rotateX(-4deg) scale(1.04);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  35% {
    transform: translateX(-6px);
  }

  70% {
    transform: translateX(6px);
  }
}

@keyframes stageEnter {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 980px) {
  .flow-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .phone-screen {
    min-height: 570px;
  }
}

@media (max-width: 430px) {
  .app {
    padding: 14px;
  }

  .phone-screen {
    min-height: calc(100vh - 120px);
    padding-inline: 12px;
  }

  .stage-label strong {
    max-width: 220px;
    overflow-wrap: anywhere;
    font-size: 17px;
  }

  .keyring-model {
    transform: scale(0.92);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
