:root {
  color-scheme: light;
  --ink: #101010;
  --mint: #a8f0de;
  --mint-deep: #56cfb6;
  --paper: #fffdfa;
  --pink: #ffb1c2;
  --yellow: #ffe665;
  --red: #ef3438;
  --shadow: rgb(16 16 16 / 0.18);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100svh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 10%, #fff8fb 0 120px, transparent 121px),
    radial-gradient(circle at 82% 78%, #fff0c6 0 120px, transparent 121px),
    linear-gradient(180deg, #ffeaf0 0%, #f7d8e3 100%);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.home-stage {
  width: min(100vw, 430px);
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 22px 12px;
}

.home-poster {
  position: relative;
  width: 375px;
  height: 719px;
  overflow: hidden;
  border-radius: 30px;
  background: #ffeaf0;
  box-shadow:
    0 18px 42px rgb(80 25 45 / 0.2),
    inset 0 0 0 1px rgb(255 255 255 / 0.45);
}

.home-poster-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.home-hotspot {
  position: absolute;
  left: 50.8%;
  width: 37.6%;
  height: 7.1%;
  transform: translateZ(0);
  border-radius: 14% / 34%;
  color: transparent;
  font-size: 0;
  -webkit-tap-highlight-color: rgb(255 255 255 / 0.18);
}

.home-hotspot:hover {
  background: rgb(255 255 255 / 0.14);
}

.home-hotspot:focus-visible {
  outline: 4px solid #101010;
  outline-offset: 4px;
  background: rgb(255 255 255 / 0.2);
}

.home-start {
  top: 70.1%;
}

.home-records {
  top: 78.9%;
}

.booth-stage,
.phone-frame {
  width: min(100vw, 430px);
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 22px 12px;
}

.photo-booth {
  position: relative;
  width: min(390px, 100%);
  min-height: 690px;
  padding-top: 0;
}

.booth-sign {
  position: relative;
  z-index: 4;
  border: 5px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  box-shadow:
    inset 0 0 0 4px #e9e6e1,
    0 8px 14px rgb(0 0 0 / 0.22);
}

.sign-brand {
  width: 92%;
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px;
  white-space: nowrap;
}

.brand-cn,
.brand-tag,
.sign-title {
  font-weight: 1000;
  letter-spacing: 0;
  text-shadow:
    2px 0 #fff,
    -2px 0 #fff,
    0 2px #fff,
    0 -2px #fff;
}

.brand-cn {
  flex: 0 0 auto;
  font-size: 26px;
  line-height: 1;
  white-space: nowrap;
}

.brand-tag {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  height: 38px;
  padding: 0 7px;
  border-radius: 5px;
  background: #050505;
  color: #fff;
  font-size: 18px;
  text-shadow: none;
}

.photo-letters {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
}

.photo-letters b {
  display: grid;
  place-items: center;
  width: 31px;
  height: 38px;
  border: 3px solid var(--ink);
  border-radius: 5px;
  font-size: 24px;
  line-height: 1;
}

.photo-letters b:nth-child(1) { background: #88e8ee; }
.photo-letters b:nth-child(2) { background: #9af3bf; }
.photo-letters b:nth-child(3) { background: #fff1a6; }
.photo-letters b:nth-child(4) { background: #ffadc0; }
.photo-letters b:nth-child(5) { background: #d9c4ff; }

.sign-posts {
  width: 72%;
  height: 30px;
  margin: 0 auto -2px;
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
}

.sign-posts span {
  width: 8px;
  background: var(--ink);
}

.sign-title {
  width: 96%;
  min-height: 66px;
  margin: 0 auto -2px;
  display: grid;
  place-items: center;
  font-size: clamp(31px, 8.7vw, 39px);
  white-space: nowrap;
}

.booth-cabinet {
  position: relative;
  min-height: 540px;
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 18px;
  padding: 38px 20px 70px;
  overflow: visible;
  border: 2px solid rgb(16 16 16 / 0.22);
  border-radius: 18px 18px 7px 7px;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 0.24), transparent 13%, transparent 87%, rgb(0 0 0 / 0.06)),
    linear-gradient(180deg, #aff4e1 0%, #a4ecd9 100%);
  box-shadow: 0 22px 35px rgb(80 25 45 / 0.16);
}

.cabinet-seam {
  position: absolute;
  z-index: 1;
  background: rgb(46 130 114 / 0.28);
}

.cabinet-seam.vertical {
  left: 49.2%;
  top: 0;
  bottom: 48px;
  width: 2px;
}

.cabinet-seam.horizontal {
  left: 0;
  right: 0;
  top: 38px;
  height: 2px;
}

.curtain-room,
.control-side {
  position: relative;
  z-index: 2;
}

.curtain-room {
  min-height: 445px;
  display: grid;
  align-content: end;
  justify-items: center;
  border-left: 7px solid #7be9d8;
  border-right: 2px solid #5dc6b6;
  background:
    linear-gradient(180deg, transparent 0 74%, rgb(4 94 79 / 0.78) 75%),
    linear-gradient(90deg, rgb(255 255 255 / 0.35), transparent 16%, transparent 84%, rgb(0 0 0 / 0.12)),
    #65d7c3;
  overflow: hidden;
}

.side-glass {
  position: absolute;
  left: -2px;
  top: 34px;
  width: 15px;
  height: 228px;
  border: 2px solid #38cdbc;
  background: rgb(230 255 255 / 0.48);
}

.curtain {
  position: absolute;
  top: 0;
  left: 13px;
  right: 0;
  height: 378px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, #050505 0 11px, #101010 12px 20px, #030303 21px 32px);
  box-shadow: inset 0 -12px 18px rgb(0 0 0 / 0.45);
}

.spark {
  position: absolute;
  z-index: 2;
  font-weight: 1000;
  animation: sparkle 2s ease-in-out infinite;
}

.spark.white { color: #fff; }
.spark.yellow { color: #ffe45e; }
.spark.pink { color: #ff7891; }
.s1 { left: 18%; top: 24%; }
.s2 { right: 16%; top: 18%; animation-delay: 0.5s; }
.s3 { right: 10%; top: 50%; animation-delay: 1s; }

.cat-logo {
  position: relative;
  flex: 0 0 auto;
  width: 68px;
  height: 52px;
  border: 3px solid var(--ink);
  border-radius: 42% 42% 38% 38%;
  background: #8f8f8f;
  box-shadow: inset 0 -8px 0 rgb(0 0 0 / 0.08);
}

.small-cat {
  width: 52px;
  height: 42px;
  border-width: 2.5px;
}

.ear {
  position: absolute;
  top: -9px;
  width: 21px;
  height: 25px;
  border: 3px solid var(--ink);
  border-bottom: 0;
  background: #8f8f8f;
}

.small-cat .ear {
  top: -7px;
  width: 16px;
  height: 19px;
  border-width: 2.5px;
}

.ear.left {
  left: 6px;
  transform: rotate(-24deg);
  border-radius: 16px 5px 0 0;
}

.ear.right {
  right: 6px;
  transform: rotate(24deg);
  border-radius: 5px 16px 0 0;
}

.tuft {
  position: absolute;
  left: 50%;
  top: 3px;
  width: 26px;
  height: 13px;
  transform: translateX(-50%);
  border: 3px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 12px 12px;
}

.small-cat .tuft {
  width: 19px;
  height: 10px;
  border-width: 2.5px;
}

.eye {
  position: absolute;
  top: 27px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
}

.eye.left { left: 28px; }
.eye.right { right: 28px; }
.small-cat .eye { top: 22px; width: 4px; height: 4px; }
.small-cat .eye.left { left: 20px; }
.small-cat .eye.right { right: 20px; }

.muzzle {
  position: absolute;
  bottom: 8px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #5fed83;
}

.muzzle.left { left: 19px; }
.muzzle.right { right: 19px; }
.small-cat .muzzle { width: 16px; height: 16px; bottom: 5px; }
.small-cat .muzzle.left { left: 15px; }
.small-cat .muzzle.right { right: 15px; }

.curtain-cat {
  position: absolute;
  left: 50%;
  top: 104px;
  width: 104px;
  height: 84px;
  transform: translateX(-50%);
}

.curtain-cat .eye { top: 44px; }
.curtain-cat .eye.left { left: 45px; }
.curtain-cat .eye.right { right: 45px; }
.curtain-cat .muzzle { width: 28px; height: 28px; bottom: 17px; }
.curtain-cat .muzzle.left { left: 36px; }
.curtain-cat .muzzle.right { right: 36px; }
.curtain-cat .tail {
  position: absolute;
  right: -17px;
  bottom: 5px;
  width: 34px;
  height: 23px;
  border: 4px solid var(--ink);
  border-left: 0;
  border-radius: 0 24px 24px 0;
  background: #8f8f8f;
}

.camera-sticker {
  position: absolute;
  left: 22%;
  top: 236px;
  width: 38px;
  height: 30px;
  transform: rotate(-8deg);
  border: 3px solid var(--ink);
  border-radius: 7px;
  background: #ffe552;
}

.camera-sticker::before {
  content: "";
  position: absolute;
  left: 7px;
  top: -9px;
  width: 14px;
  height: 8px;
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background: #ffe552;
}

.camera-sticker span {
  position: absolute;
  left: 10px;
  top: 8px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}

.curtain-copy {
  position: absolute;
  left: 18%;
  top: 264px;
  width: 104px;
  margin: 0;
  transform: rotate(-5deg);
  color: #fff;
  font-size: 19px;
  font-weight: 1000;
  line-height: 1.15;
  white-space: nowrap;
  text-shadow: 2px 3px 0 rgb(0 0 0 / 0.45);
}

.curtain-copy::after {
  content: "♥";
  color: #ff7891;
  margin-left: 8px;
}

.smile-copy {
  position: absolute;
  left: 27%;
  bottom: 21px;
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 1000;
  letter-spacing: 2px;
  transform: rotate(-2deg);
  text-shadow:
    -1px -1px #101010,
    1px -1px #101010,
    -1px 1px #101010,
    1px 1px #101010;
}

.smile-copy::first-letter { color: #ff7891; }

.stool {
  position: relative;
  z-index: 3;
  width: 78px;
  height: 82px;
  margin-bottom: 30px;
}

.stool::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 84px;
  height: 31px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: linear-gradient(180deg, #fff6fa, #e9d8df);
  box-shadow: 0 8px 16px rgb(0 0 0 / 0.25);
}

.stool::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 25px;
  width: 19px;
  height: 54px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #ddf8f1, #9fded0);
}

.stool span {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 56px;
  height: 13px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #9fded0;
  border: 1px solid rgb(16 16 16 / 0.25);
}

.tile-floor {
  position: absolute;
  left: 13px;
  right: 0;
  bottom: 0;
  height: 56px;
  background:
    linear-gradient(45deg, #101010 25%, transparent 25%),
    linear-gradient(-45deg, #101010 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #101010 75%),
    linear-gradient(-45deg, transparent 75%, #101010 75%),
    #e8fff7;
  background-position: 0 0, 0 20px, 20px -20px, -20px 0;
  background-size: 40px 40px;
  border-top: 3px solid rgb(16 16 16 / 0.25);
}

.control-side {
  display: grid;
  align-content: start;
  gap: 20px;
}

.sample-sheet {
  position: relative;
  min-height: 292px;
  margin-top: 38px;
  padding: 20px 14px 12px;
  border: 3px solid #5fbda9;
  border-radius: 20px;
  background: #fff7ef;
  box-shadow:
    inset 0 0 0 2px #e7d6c9,
    0 5px 10px rgb(0 0 0 / 0.1);
}

.tape {
  position: absolute;
  width: 38px;
  height: 16px;
  border: 1px solid rgb(16 16 16 / 0.25);
  background:
    radial-gradient(circle, #ffe86e 0 2px, transparent 3px),
    #cfe9ff;
  opacity: 0.9;
}

.tape-a { left: 15px; top: 15px; transform: rotate(-38deg); }
.tape-b { right: 18px; bottom: 46px; transform: rotate(-24deg); background-color: #ffafbd; }

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

.sheet-grid article,
.strip-frame {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1.5px solid #8f8f8f;
  background: var(--cell-bg, #fff0dc);
}

.sheet-grid article {
  min-height: 98px;
}

.sheet-grid article:nth-child(1) { --cell-bg: #fff1e3; }
.sheet-grid article:nth-child(2) { --cell-bg: #fff0f5; }
.sheet-grid article:nth-child(3) { --cell-bg: #f0f7e9; }
.sheet-grid article:nth-child(4) { --cell-bg: #ffe8ec; }

.sheet-grid b,
.strip-frame > span {
  position: absolute;
  left: 7px;
  top: 5px;
  z-index: 2;
  font-size: 10px;
  font-weight: 1000;
}

.pose-cat,
.mini-face {
  position: relative;
  width: 56px;
  height: 68px;
  border: 3px solid var(--ink);
  border-radius: 38% 38% 28% 28%;
  background: #909090;
  box-shadow: inset 0 -6px 0 rgb(0 0 0 / 0.08);
}

.pose-cat::before,
.pose-cat::after,
.mini-face::before,
.mini-face::after {
  content: "";
  position: absolute;
  bottom: 30px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #5fed83;
}

.pose-cat::before,
.mini-face::before { left: 18px; }
.pose-cat::after,
.mini-face::after { right: 18px; }

.pose-v {
  transform: rotate(5deg);
}

.pose-jump {
  transform: rotate(-12deg) translateY(4px);
}

.pose-shy {
  transform: scale(0.96);
}

.mood-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 13px;
  font-size: 11px;
  white-space: nowrap;
}

.cat-chip {
  width: 25px;
  height: 20px;
  border: 1.5px solid var(--ink);
  border-radius: 45%;
  background: #9a9a9a;
}

.mood-row i {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: #ffd7df;
  font-style: normal;
  font-weight: 900;
}

.mood-row i:nth-of-type(2) { background: #fff2a3; }
.mood-row i:nth-of-type(3) { background: #d6cdfc; }
.mood-row i:nth-of-type(4) { background: #ddc7ff; }

.home-actions,
.actions,
.result-actions {
  display: grid;
  gap: 14px;
}

.booth-button,
.primary-button,
.secondary-button,
.retake-link,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  padding: 0 18px;
  border: 3px solid #2e6d61;
  border-radius: 24px;
  color: var(--ink);
  font-size: 27px;
  font-weight: 1000;
  letter-spacing: 2px;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    inset 0 4px 0 rgb(255 255 255 / 0.52),
    0 5px 0 rgb(0 0 0 / 0.18);
}

.pink,
.primary-button {
  background: linear-gradient(180deg, #ffd4dc 0%, #ff9ead 100%);
}

.yellow,
.secondary-button,
.retake-link {
  background: linear-gradient(180deg, #fff7a4 0%, #ffdd4e 100%);
}

.cabinet-stripe {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
}

.stripe-yellow {
  bottom: 48px;
  height: 19px;
  background: #ffd841;
}

.stripe-red {
  bottom: 29px;
  height: 19px;
  background: var(--red);
}

.cabinet-base {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 29px;
  border-radius: 0 0 7px 7px;
  background: #121212;
}

.wheels {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -12px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
}

.wheels span {
  width: 22px;
  height: 22px;
  border: 3px solid #111;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 45%, #666 0 4px, #1a1a1a 5px);
}

.phone-frame {
  padding: 0;
}

.phone-frame > .screen-scroll,
.page {
  width: 375px;
  height: 719px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  background: linear-gradient(180deg, #fff8fb 0 62px, #fde9ef 62px);
  border-radius: 28px;
  box-shadow: 0 18px 50px rgb(30 20 30 / 0.18);
}

.screen-scroll::-webkit-scrollbar,
.page::-webkit-scrollbar {
  display: none;
}

.page {
  padding: 14px 16px 86px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  margin: -14px -16px 14px;
  padding: 8px 14px;
  border-bottom: 3px solid var(--ink);
  background: #fffdfa;
}

.topbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 1000;
}

.topbar-spacer {
  width: 36px;
  height: 36px;
}

.icon-link {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 24px;
  font-weight: 1000;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 3px 0 rgb(0 0 0 / 0.14);
}

.flow-back {
  display: none;
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 10;
}

.page.is-flow {
  position: relative;
  padding: 0;
  overflow: hidden;
  background: #fde9ef;
}

.page.is-flow .topbar {
  display: none;
}

.page.is-flow .flow-back {
  display: inline-grid;
}

.section {
  margin: 14px 0;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 9px;
}

.section-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 1000;
}

.section-title span {
  color: #675d61;
  font-size: 12px;
  font-weight: 800;
}

.final-panel,
.empty-state,
.record-item {
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  background: #fffdfa;
  box-shadow: 0 6px 0 rgb(0 0 0 / 0.1);
}

.chooser-section {
  margin-top: 2px;
}

.shooter-title {
  margin-bottom: 8px;
}

.shooter-title h2 {
  font-size: 16px;
}

.field-panel {
  display: grid;
  gap: 8px;
}

.field-row {
  position: relative;
}

#setup-screen {
  min-height: calc(719px - 78px);
  display: flex;
  flex-direction: column;
}

#setup-screen[hidden] {
  display: none;
}

.character-row {
  display: grid;
  gap: 6px;
  min-height: 0;
  padding: 8px 10px 10px;
  border: 2.5px dashed #b1c6d8;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.18), rgb(255 255 255 / 0)),
    #bde2fb;
}

.choice-label {
  margin: 0;
  color: #4a413c;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0;
  white-space: nowrap;
}

.choice-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 8px;
  align-items: stretch;
}

.field-main {
  position: relative;
  min-width: 0;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  border: 0;
  border-radius: 11px;
  background: #d9fff3;
  color: #433b3e;
  font-size: 18px;
  font-weight: 1000;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.7);
}

.choice-card {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 3px solid #eee9dd;
  border-radius: 12px;
  background: #fffef9;
  color: var(--ink);
  cursor: pointer;
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 0.8),
    0 3px 0 rgb(54 69 67 / 0.12);
}

.choice-card:focus-visible {
  outline: 4px solid #101010;
  outline-offset: 3px;
}

.choice-card[aria-expanded="true"] .choice-chevron {
  transform: rotate(180deg);
}

.choice-name {
  flex: 1 1 auto;
  min-width: 0;
  color: #4a413c;
  font-size: 16px;
  font-weight: 1000;
  line-height: 1.1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.choice-chevron {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #d07687;
  transition: transform 0.16s ease;
}

.choice-chevron path {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.choice-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 7px);
  z-index: 9;
  display: none;
  padding: 8px;
  border: 3px solid #eee9dd;
  border-radius: 14px;
  background: #fffef9;
  box-shadow: 0 12px 24px rgb(32 42 48 / 0.18);
}

.file-trigger {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 48px;
  grid-auto-flow: column;
  gap: 6px;
  overflow: hidden;
  border: 3px solid #eee9dd;
  border-radius: 12px;
  background: #fffef9;
  color: #d07687;
  font-size: 12px;
  font-weight: 1000;
  cursor: pointer;
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 0.8),
    0 3px 0 rgb(54 69 67 / 0.12);
}

.file-trigger input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-trigger::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-bottom: 0;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 17px;
  line-height: 1;
}

.upload-label {
  position: relative;
  z-index: 1;
}

.file-trigger.has-preview {
  color: #fff;
  background-position: center;
  background-size: cover;
}

.file-trigger.has-preview::before {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: rgb(16 16 16 / 0.28);
  content: "";
}

.character-row.is-open {
  z-index: 12;
}

.character-row.is-open .choice-list {
  display: grid;
  gap: 6px;
}

.choice-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.choice-option:hover,
.choice-option[aria-selected="true"] {
  background: #f7e9ef;
}

.choice-option .avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 20px;
}

.choice-option strong {
  font-size: 18px;
  font-weight: 1000;
}

.template-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 132px;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 4px 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.template-grid::-webkit-scrollbar {
  display: none;
}

.template-option {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  scroll-snap-align: center;
}

.template-master-preview {
  display: block;
  width: 104px;
  aspect-ratio: 900 / 2700;
  height: auto;
  margin: 0 auto 8px;
  object-fit: contain;
  filter: drop-shadow(0 8px 9px rgb(0 0 0 / 0.12));
}

.template-option[aria-pressed="true"] .template-master-preview {
  outline: 4px solid #fff06a;
  outline-offset: 4px;
}

.template-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 1000;
}

.template-copy p {
  margin: 3px 0 0;
  color: #645a5f;
  font-size: 11px;
  line-height: 1.35;
}

.style-section {
  margin-top: 6px;
}

.style-grid {
  grid-auto-flow: row;
  grid-auto-columns: unset;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  padding: 0;
  scroll-snap-type: none;
}

.style-option {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 104px;
  padding: 7px 8px;
  border: 3px solid #eee9dd;
  border-radius: 14px;
  background: #fffef9;
  color: var(--ink);
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 0.78),
    0 3px 0 rgb(54 69 67 / 0.12);
  cursor: pointer;
}

.style-option[aria-pressed="true"] {
  border-color: var(--ink);
  background: #fff5a8;
}

.style-preview {
  display: block;
  width: 48px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 4px 4px rgb(0 0 0 / 0.12));
}

.style-copy {
  display: grid;
  gap: 3px;
  text-align: center;
}

.style-copy strong {
  font-size: 13px;
  font-weight: 1000;
}

.style-copy small {
  color: #645a5f;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.actions {
  margin: auto 0 0;
  padding: 14px 0 0;
}

.actions .primary-button {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border-width: 3px;
  border-radius: 24px;
  font-size: 20px;
  letter-spacing: 2px;
  box-shadow:
    inset 0 4px 0 rgb(255 255 255 / 0.52),
    0 5px 0 rgb(0 0 0 / 0.18);
}

.flow-screen {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  min-height: 100%;
  align-items: center;
  justify-items: center;
  padding: 0;
  text-align: center;
}

.flow-screen.is-active {
  display: grid;
}

.flow-screen > div {
  display: grid;
  justify-items: center;
}

#final-screen {
  align-items: start;
  overflow-y: auto;
  padding: 12px 14px 18px;
}

#countdown-screen > div {
  position: relative;
  width: 100%;
  height: 100%;
  place-items: center;
}

#countdown-screen .flow-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  top: calc(50% + 118px);
}

.shooting-countdown {
  position: relative;
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  overflow: hidden;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgb(255 255 255 / 0.75) 0 34px, transparent 35px),
    radial-gradient(circle at 50% 50%, #ffe665 0 70px, #ffd9e3 71px 100%);
  box-shadow:
    inset 0 0 0 8px rgb(255 255 255 / 0.38),
    0 9px 0 rgb(0 0 0 / 0.16);
  animation: cameraBreathe 1s ease-in-out infinite;
}

.countdown-number {
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: #fffef9;
  font-size: 82px;
  font-weight: 1000;
  box-shadow:
    inset 0 -7px 0 rgb(255 230 101 / 0.75),
    0 5px 0 rgb(0 0 0 / 0.16);
  animation: shutterPulse 1s steps(2, end) infinite;
}

.viewfinder-corner {
  position: absolute;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-color: var(--ink);
  border-style: solid;
  border-width: 0;
  opacity: 0.9;
}

.viewfinder-corner.top-left {
  left: 22px;
  top: 22px;
  border-left-width: 4px;
  border-top-width: 4px;
}

.viewfinder-corner.top-right {
  right: 22px;
  top: 22px;
  border-right-width: 4px;
  border-top-width: 4px;
}

.viewfinder-corner.bottom-left {
  left: 22px;
  bottom: 22px;
  border-left-width: 4px;
  border-bottom-width: 4px;
}

.viewfinder-corner.bottom-right {
  right: 22px;
  bottom: 22px;
  border-right-width: 4px;
  border-bottom-width: 4px;
}

.shutter-blade {
  position: absolute;
  z-index: 2;
  inset: -8px;
  background: rgb(16 16 16 / 0.18);
  transform-origin: 50% 50%;
  animation: shutterClose 1s ease-in-out infinite;
}

.blade-a {
  clip-path: polygon(0 0, 100% 0, 50% 50%);
}

.blade-b {
  clip-path: polygon(0 100%, 100% 100%, 50% 50%);
  animation-delay: 0.08s;
}

.shutter-flash {
  position: absolute;
  z-index: 3;
  inset: 0;
  background: #fff;
  opacity: 0;
  animation: photoFlash 1s ease-out infinite;
  pointer-events: none;
}

.flow-caption {
  margin: 18px 0 0;
  font-size: 18px;
  font-weight: 1000;
}

.printer {
  width: 250px;
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: 26px;
  background: var(--mint);
  box-shadow: 0 8px 0 rgb(0 0 0 / 0.15);
}

.printer-light {
  width: 86px;
  height: 18px;
  margin: 0 auto 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  animation: blink 0.7s infinite alternate;
}

.printer-slot {
  position: relative;
  height: 280px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #191919;
}

.result-strip,
.record-strip {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 4px;
  padding: 7px;
  border: 2px solid var(--ink);
  background: #fffaf3;
}

.printing-strip {
  position: absolute;
  left: 50%;
  top: -236px;
  width: 132px;
  height: 300px;
  transform: translateX(-50%);
  border-radius: 14px;
  animation: printOut 3s ease-in-out forwards;
}

.strip-frame {
  border-radius: 8px;
  background: var(--frame-bg, #fff0dc);
}

.mini-face {
  z-index: 1;
  width: 66px;
  height: 58px;
  border-radius: 42% 42% 32% 32%;
  background:
    radial-gradient(circle at 44% 45%, #111 0 2px, transparent 3px),
    radial-gradient(circle at 56% 45%, #111 0 2px, transparent 3px),
    var(--mini-art, #909090);
}

.final-panel {
  width: 100%;
  padding: 0;
  align-content: start;
  box-shadow: none;
  border: 0;
  background: transparent;
}

.result-strip {
  width: 220px;
  height: 430px;
  margin: 0 auto 14px;
  border-radius: 18px;
}

.generated-strip-wrap {
  display: block;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: transparent;
}

.generated-strip-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.final-panel .generated-strip-wrap {
  width: min(260px, 76vw);
  height: min(500px, calc(100vh - 160px));
  min-height: 360px;
  margin: 0 auto 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.printer-slot .generated-strip-wrap {
  position: absolute;
  left: 50%;
  top: -236px;
  width: 132px;
  height: 300px;
  transform: translateX(-50%);
  border-radius: 14px;
  animation: printOut 3s ease-in-out forwards;
}

.generated-record-strip {
  padding: 0;
  overflow: hidden;
  background: transparent;
}

.final-status {
  min-height: 20px;
  margin: -4px 0 12px;
  color: #4b4547;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
}

.final-status:empty {
  display: none;
}

.final-status.is-error {
  padding: 8px 10px;
  border: 2px solid #ef9aaa;
  border-radius: 12px;
  background: #fff0f4;
  color: #9f2940;
}

.result-actions {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: min(260px, 76vw);
}

.result-actions .primary-button,
.result-actions .secondary-button,
.retake-link,
.back-link {
  min-height: 48px;
  border-color: var(--ink);
  border-radius: 999px;
  font-size: 17px;
  letter-spacing: 0;
}

.retake-link {
  margin-top: 0;
}

.records-list {
  display: grid;
  gap: 12px;
}

.record-item {
  position: relative;
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 12px;
  padding: 10px;
}

.record-strip {
  width: 88px;
  height: 156px;
  border-radius: 12px;
}

.record-meta h2 {
  margin: 2px 0 6px;
  font-size: 16px;
  font-weight: 1000;
}

.record-meta p {
  margin: 0 0 5px;
  color: #5d5357;
  font-size: 12px;
  line-height: 1.45;
}

.empty-state {
  padding: 24px 16px;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 1000;
}

.empty-state p {
  margin: 0 0 18px;
  color: #665a5f;
  line-height: 1.55;
}

.toast {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 20px;
  z-index: 20;
  display: none;
  min-height: 44px;
  place-items: center;
  padding: 9px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.toast.is-visible {
  display: grid;
}

.korean .strip-frame { --frame-bg: linear-gradient(135deg, #fff2f7, #d9fff3); --mini-art: #909090; }
.doodle .strip-frame { --frame-bg: #fffbe7; --mini-art: #909090; }
.anime .strip-frame { --frame-bg: linear-gradient(135deg, #e7f0ff, #ffe4f1); --mini-art: #909090; }
.retro .strip-frame { --frame-bg: #f0dfc5; --mini-art: #909090; }
.fresh .strip-frame { --frame-bg: linear-gradient(135deg, #e9fff4, #fff8d4); --mini-art: #909090; }

@keyframes sparkle {
  0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
  50% { transform: translateY(-5px) scale(1.15); opacity: 0.72; }
}

@keyframes cameraBreathe {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  45% { transform: scale(0.985); filter: brightness(0.96); }
  52% { transform: scale(1.035); filter: brightness(1.12); }
  64% { transform: scale(1); filter: brightness(1); }
}

@keyframes shutterPulse {
  0%, 42%, 100% { transform: scale(1); }
  48% { transform: scale(0.88); }
  58% { transform: scale(1.04); }
}

@keyframes shutterClose {
  0%, 38%, 100% {
    transform: scale(1.25) rotate(0deg);
    opacity: 0;
  }
  46% {
    transform: scale(0.42) rotate(14deg);
    opacity: 1;
  }
  58% {
    transform: scale(1.18) rotate(0deg);
    opacity: 0;
  }
}

@keyframes photoFlash {
  0%, 43%, 100% { opacity: 0; }
  48% { opacity: 0.9; }
  60% { opacity: 0; }
}

@keyframes blink {
  from { background: var(--yellow); }
  to { background: var(--pink); }
}

@keyframes printOut {
  from { top: -236px; }
  to { top: 26px; }
}

@media (max-width: 374px), (max-height: 718px) {
  .booth-stage,
  .phone-frame {
    width: 100vw;
    min-height: 100svh;
    padding: 0;
  }

  .photo-booth {
    width: 100vw;
    transform: scale(min(1, calc(100vw / 390)));
    transform-origin: top center;
  }

  .phone-frame > .screen-scroll,
  .page,
  .home-poster {
    width: 100vw;
    height: 100svh;
    border-radius: 0;
  }

  .home-stage {
    width: 100vw;
    padding: 0;
  }
}
