@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --ink: #4b3540;
  --muted: #927d87;
  --pink: #f4dce6;
  --pink-strong: #c77f9c;
  --pink-deep: #a95e7d;
  --paper: #fffdfd;
  --line: #f0e1e8;
  --soft: #fff6fa;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: #fff9fb; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse at 8% 12%, rgba(246, 220, 231, .45), transparent 28rem),
    radial-gradient(ellipse at 92% 22%, rgba(250, 231, 238, .48), transparent 26rem),
    #fff9fb;
}
button, select { font: inherit; }
button:focus-visible, select:focus-visible, label:focus-within { outline: 3px solid rgba(199,127,156,.38); outline-offset: 3px; }
.booth { width: min(1100px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 30px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: #9b6079; text-decoration: none; font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.brand-mark { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #f8e8ef; color: #a45f7c; font-size: 18px; letter-spacing: 0; }
.language-control select { min-height: 35px; padding: 0 28px 0 11px; border: 1px solid #ead8e1; border-radius: 30px; color: #745966; background: rgba(255,255,255,.8); font-size: 12px; cursor: pointer; }
.intro { text-align: center; padding: 35px 0 26px; }
.eyebrow, .section-kicker { margin: 0 0 8px; color: #b47b93; font-size: 9px; font-weight: 800; letter-spacing: .2em; }
h1 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: clamp(29px, 4.5vw, 43px); line-height: 1.15; font-weight: 700; letter-spacing: -.025em; }
.subtitle { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.site-credit { margin: 6px 0 0; color: #b47b93; font-size: 10px; line-height: 1.4; font-weight: 500; letter-spacing: .035em; }
.booth-layout { display: grid; grid-template-columns: minmax(300px, 1.02fr) minmax(310px, .98fr); gap: clamp(24px, 5vw, 64px); align-items: start; max-width: 900px; margin: 0 auto; }
.preview-column { min-width: 0; }
.preview-topline { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.section-kicker { margin-bottom: 5px; }
.gesture-hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.size-pill { white-space: nowrap; padding: 6px 9px; border: 1px solid #f0dfe7; border-radius: 30px; background: #fff; color: #9b7183; font-size: 9px; font-weight: 700; }
.frame-wrap { position: relative; width: min(100%, 390px); margin: 0 auto; overflow: hidden; border: 1px solid #f0dce5; border-radius: 17px; background: #f7eaf0; box-shadow: 0 15px 38px rgba(117, 74, 92, .1); touch-action: none; user-select: none; -webkit-user-select: none; }
#preview { display: block; touch-action: none; width: 100%; height: auto; aspect-ratio: 2 / 5; }
.selection-outline { position: absolute; display: none; border: 1.5px solid rgba(255,255,255,.96); outline: 1px solid rgba(164,91,122,.72); border-radius: 2px; pointer-events: none; box-shadow: 0 0 0 999px rgba(255,255,255,.025); }
.loading-cover { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; color: #916f7e; background: #f9edf2; font-size: 12px; text-align: center; }
.loading-cover.hidden { display: none; }
.slot-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 390px); margin: 13px auto 0; }
.slot-chip { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 9px 10px; border: 1px solid #efdee6; border-radius: 11px; background: rgba(255,255,255,.82); color: #8d7580; text-align: left; cursor: pointer; }
.slot-chip span { display: grid; place-items: center; flex: 0 0 24px; height: 24px; border-radius: 50%; background: #f7e9ef; color: #9b607a; font-size: 9px; font-weight: 800; }
.slot-chip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 700; }
.slot-chip i { width: 6px; height: 6px; flex: 0 0 6px; margin-left: auto; border-radius: 50%; background: #e3d5dc; }
.slot-chip.filled i { background: #82b49a; }
.slot-chip.active { border-color: #d7a4b8; background: #fff4f8; box-shadow: 0 0 0 2px rgba(215,164,184,.13); color: #684656; }
.control-column { padding: 24px; border: 1px solid #f0e1e8; border-radius: 18px; background: rgba(255,255,255,.87); box-shadow: 0 12px 35px rgba(103,62,80,.055); }
.step-label { display: flex; align-items: center; gap: 9px; color: #ad718b; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.step-label > span:first-child { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #f8e8ef; color: #9b5f79; font-size: 9px; letter-spacing: 0; }
.control-column h2 { margin: 13px 0 7px; font-family: "Playfair Display", Georgia, serif; font-size: 22px; line-height: 1.2; }
.body-copy { margin: 0 0 17px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.body-copy.compact { margin-bottom: 12px; font-size: 11px; }
.primary-button, .download-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; border: 0; border-radius: 11px; font-size: 12px; font-weight: 800; cursor: pointer; transition: transform .16s ease, background .16s ease, opacity .16s ease; }
.primary-button { color: white; background: #b46d8a; box-shadow: 0 7px 16px rgba(180,109,138,.18); }
.primary-button:hover, .download-button:hover:not(:disabled) { transform: translateY(-1px); }
.upload-slot-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.upload-slot-button { min-width: 0; min-height: 44px; padding: 0 7px; gap: 5px; font-size: 10px; }
.upload-slot-button .button-icon { width: 18px; height: 18px; flex: 0 0 18px; font-size: 14px; }
.button-icon { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; font-size: 17px; font-weight: 400; }
.selected-files { display: grid; gap: 6px; margin-top: 12px; }
.empty-file-state { padding: 12px; border: 1px dashed #ead6e0; border-radius: 10px; color: #a38e98; font-size: 10px; text-align: center; }
.file-row { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 7px 9px; border: 1px solid #f1e5ea; border-radius: 9px; background: #fffafd; }
.file-thumb { width: 32px; height: 32px; flex: 0 0 32px; object-fit: cover; border-radius: 6px; background: #f5e6ed; }
.file-name { min-width: 0; overflow: hidden; color: #775f6a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.file-index { margin-left: auto; color: #b07b92; font-size: 9px; font-weight: 800; }
.edit-tools { margin-top: 24px; padding-top: 21px; border-top: 1px solid #f2e7ec; }
.tool-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.secondary-button { min-height: 36px; padding: 0 12px; border: 1px solid #ead4df; border-radius: 9px; color: #8b5870; background: #fff7fa; font-size: 10px; font-weight: 700; cursor: pointer; }
.text-button { min-height: 34px; border: 0; color: #a47a8d; background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.secondary-button:disabled, .text-button:disabled { opacity: .38; cursor: not-allowed; }
.download-area { margin-top: 24px; padding-top: 21px; border-top: 1px solid #f2e7ec; }
.download-button { justify-content: space-between; margin-top: 14px; padding: 0 17px; color: white; background: #9f5a78; box-shadow: 0 7px 16px rgba(159,90,120,.17); }
.download-button span:last-child { font-size: 19px; font-weight: 400; }
.download-button:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.privacy-note { display: flex; align-items: start; gap: 7px; margin: 12px 0 0; color: #9a8790; font-size: 10px; line-height: 1.5; }
.privacy-note span:first-child { color: #c17e9a; font-size: 13px; }
.status-message { min-height: 18px; margin: 22px auto 0; color: #9a7d8a; font-size: 11px; text-align: center; }
footer { margin-top: 15px; color: #b09da6; font-size: 10px; text-align: center; }
.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; }
@media (max-width: 720px) {
  .booth { width: min(100% - 28px, 500px); padding-top: 15px; }
  .intro { padding: 27px 0 21px; }
  .booth-layout { grid-template-columns: 1fr; gap: 22px; max-width: 430px; }
  .frame-wrap { width: min(100%, 350px); }
  .slot-picker { width: min(100%, 350px); }
  .control-column { padding: 20px; }
}
@media (max-width: 380px) {
  .booth { width: calc(100% - 20px); }
  .slot-chip { padding: 8px 6px; gap: 5px; }
  .slot-chip b { font-size: 9px; }
  .control-column { padding: 16px; }
}
