/* Buyer pages share the homepage type, palette and artwork. Spacing uses an 8px base. */
.customer-world {
  --space-1: 8px; --space-2: 16px; --space-3: 24px; --space-4: 32px; --space-6: 48px; --space-8: 64px;
  --customer-gutter: clamp(24px, 4.5vw, 64px);
  position: relative; isolation: isolate; margin: 0; min-height: 100svh; font-family: ui-sans-serif, system-ui, sans-serif;
  background: radial-gradient(ellipse at 80% 0%, #192238 0%, #030303 65%);
}
.customer-world *, .customer-world *::before, .customer-world *::after { box-sizing: border-box; }
.customer-world [hidden] { display: none !important; }
.customer-shell, .customer-world .yondora-header { width: min(100%, 1568px); margin-inline: auto; padding-inline: var(--customer-gutter); }
.customer-world .yondora-header { min-height: 112px; gap: 24px; }
@media (min-width: 901px) {
  .customer-world .yondora-navigation { gap: clamp(16px, 2vw, 32px); font-size: 15px; }
}
.customer-world .yondora-navigation a[aria-current=page] { color: var(--yondora-gold); }
.customer-world__art { display: block; position: absolute; inset: 0 0 auto; z-index: -2; height: max(100svh, 960px); pointer-events: none; }
.customer-world__art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: right top; }
.customer-world:has(.customer-world__art)::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, transparent 0%, #03030330 30%, #030303b3 70%, #030303 100%); }
.customer-main { padding-block: var(--space-6) var(--space-8); }
.customer-eyebrow { margin: 0; color: var(--yondora-gold); font: 600 12px/1.5 ui-sans-serif, system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.customer-title { margin: 0; color: #fff4d9; font: 600 clamp(32px, 4vw, 48px)/1.12 ui-sans-serif, system-ui, sans-serif; letter-spacing: -.035em; overflow-wrap: anywhere; text-wrap: balance; }
.customer-title--story-hero { font: 500 clamp(48px, 5.6vw, 88px)/1.02 "Yondora Storybook", Georgia, serif; }
.customer-description { margin: 0; max-width: 44ch; color: #f5f1e9db; font: 300 18px/1.65 ui-sans-serif, system-ui, sans-serif; }
.customer-body { margin: 0; color: #f5f1e9da; font: 400 15px/1.65 ui-sans-serif, system-ui, sans-serif; overflow-wrap: anywhere; }
.customer-note { margin: 0; color: #e3dcc3ad; font: 400 12px/1.6 ui-sans-serif, system-ui, sans-serif; }
.customer-world h2 { margin: 0; font: 600 22px/1.3 ui-sans-serif, system-ui, sans-serif; overflow-wrap: anywhere; }
.customer-world svg { width: 24px; height: 24px; flex-shrink: 0; }
.customer-button { display: inline-flex; justify-content: center; align-items: center; gap: var(--space-1); min-height: 56px; padding: var(--space-2) var(--space-4); border: 1px solid #ffe5a0; border-radius: 999px; color: #271a09 !important; background: radial-gradient(ellipse at 17% 20%, #fffde7 0%, #fff4c67a 24%, transparent 55%), linear-gradient(102deg, #e9b64f, #ffeca5 48%, #d99d32); box-shadow: 0 0 24px #dda94030, inset 0 1px 0 #fffde6; cursor: pointer; font: 600 16px/1.25 ui-sans-serif, system-ui, sans-serif; text-align: center; text-decoration: none; transition: filter 160ms ease, border-color 160ms ease; }
.customer-button:hover { filter: brightness(1.08); }
.customer-button--secondary { border-color: #efc86e66; color: #fff3cf !important; background: #06101b80; box-shadow: none; }
.customer-button--outline { border-color: #fff3cf40; color: #fff3cf !important; background: transparent; box-shadow: none; }
.customer-button--outline:hover { border-color: #fff3cf99; background: #fff3cf08; }
.customer-button--danger-outline { border-color: #e7a18c66; color: #f2b39f !important; }
.customer-button--danger-outline:hover { border-color: #e7a18cb3; background: #e7a18c0d; }
.customer-button--danger { border-color: #efb29b; color: #29140f !important; background: #e7a18c; box-shadow: none; }
.customer-button:focus-visible { outline: 2px solid #efc86e; outline-offset: 4px; }
.customer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.customer-actions form { margin: 0; }
.customer-text-link { display: inline-flex; align-items: center; min-height: 44px; padding: var(--space-1) 0; border: 0; color: #efc86e !important; background: none; font: 500 14px/1.4 ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
.customer-text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.customer-text-link--danger { color: #f4b5a5 !important; }
.customer-panel { border: 1px solid #efc86e33; border-radius: 24px; padding: var(--space-4); background: linear-gradient(130deg, #142032e8, #080e19ed); box-shadow: 0 16px 48px #0003; }
.customer-flash { color: #fff3cf; padding-block: var(--space-2); font: 400 14px/1.5 ui-sans-serif, system-ui, sans-serif; }
/* Featured experience: full artwork, bottom copy and reachable navigation. */
.customer-world--featured { background: #030303; }
.customer-world--featured .yondora-header { position: absolute; top: 0; left: 0; right: 0; }
.customer-world--featured .customer-main { padding-block: 0; }
.customer-world--featured .customer-world__art { height: 100%; bottom: 0; }
.customer-world--featured .customer-world__art img { object-position: right center; }
.customer-world--featured:has(.customer-world__art)::before { background: linear-gradient(180deg, #0005 0%, transparent 20%, transparent 38%, #030303a8 62%, #030303f5 90%, #030303 100%); }
.customer-world--featured .customer-flash { position: absolute; top: 112px; left: 50%; transform: translateX(-50%); z-index: 2; }
.library-feature { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-4); padding-block: 160px clamp(64px, 9svh, 112px); }
.library-feature__copy { display: grid; gap: var(--space-3); width: min(100%, 760px); }
.library-feature__ownership { display: flex; align-items: center; gap: 7px; margin: 0; color: #efc86e; font: 500 16px/1.5 ui-sans-serif, system-ui, sans-serif; letter-spacing: .02em; }
.library-feature__ownership svg { width: 18px; height: 18px; flex: none; stroke-width: 1.6; }
.library-feature__copy .customer-title { width: fit-content; padding-bottom: .12em; margin-bottom: -.12em; font-size: clamp(72px, 4.8vw, 92px); background: linear-gradient(118deg, #fffdf6 0%, #fff8df 48%, #e4ad43 100%); background-clip: text; -webkit-background-clip: text; color: transparent; }
.library-feature__copy .customer-description { max-width: 48ch; color: #fff9e9; font-size: 20px; line-height: 1.5; }
.library-feature__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-items: stretch; gap: var(--space-1) var(--space-2); width: min(100%, 656px); }
.library-feature__actions .customer-button { min-height: 60px; padding-inline: 24px; font-size: 18px; }
.library-feature__allowance { grid-column: 1 / -1; margin: 0; color: #fff3cfb3; font: 400 13px/1.5 ui-sans-serif, system-ui, sans-serif; }
.featured-navigation { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); width: 100%; }
.featured-navigation__controls { display: flex; align-items: center; gap: var(--space-2); }
.featured-navigation__position { color: #ffffffb3; font-size: 12px; font-variant-numeric: tabular-nums; }
.featured-arrow, .dialog-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: #ffffff14; cursor: pointer; }
.featured-arrow:hover, .dialog-close:hover { background: #ffffff26; }
.featured-arrow svg { width: 28px; height: 28px; }
.selected-story { display: grid; gap: var(--space-2); }
/* The selected child's preparation and ready states share one stable stage. */
.library-feature--story { justify-content: flex-start; padding-block: 144px 48px; }
.library-feature--story .library-feature__copy { width: min(100%, 560px); margin-inline: auto; gap: var(--space-2); }
.story-moment__experience { margin: 0; color: #fff3cfb3; font: 500 13px/1.5 ui-sans-serif, system-ui, sans-serif; }
.story-moment { --story-title-gradient: linear-gradient(118deg, #fffdf6, #fff8df 48%, #e4ad43); gap: var(--space-2); }
.story-moment__title { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 150px; margin: 0; color: #fff4d9; }
.story-moment__title:not(:has(.story-moment__phrase)) { display: block; min-height: 0; }
.story-moment__phrase { color: #fff5df; font: 500 clamp(24px, 3vw, 32px)/1.25 "Yondora Storybook", Georgia, serif; }
.story-moment__name { width: fit-content; max-width: 100%; padding-bottom: .12em; margin-bottom: -.12em; background: var(--story-title-gradient); background-clip: text; -webkit-background-clip: text; color: transparent; font: 500 clamp(64px, 8vw, 96px)/1.05 "Yondora Storybook", Georgia, serif; letter-spacing: -.025em; overflow-wrap: anywhere; }
.story-moment__guidance { min-height: 64px; }
.story-moment__guidance .customer-body { max-width: 40ch; }
.story-moment__error { margin-top: 8px; color: #f2b39f; }
.story-moment__actions { display: grid; align-content: start; justify-items: stretch; gap: 8px; min-height: 172px; }
.story-moment--sample { display: grid; }
.story-moment--sample .story-moment__title { width: fit-content; max-width: 100%; min-height: 0; gap: 0; padding-bottom: .12em; margin-bottom: -.12em; background: var(--story-title-gradient); background-clip: text; -webkit-background-clip: text; color: transparent; font: 500 clamp(52px, 7vw, 88px)/1.05 "Yondora Storybook", Georgia, serif; letter-spacing: -.025em; }
.story-moment--sample .story-moment__title > span { width: auto; padding: 0; margin: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; }
.story-moment--sample .story-moment__actions { min-height: 0; }
.story-moment__actions > .customer-button { width: 100%; min-height: 60px; font-size: 18px; }
.story-moment > .customer-actions { display: grid; gap: var(--space-1); align-items: stretch; }
.story-details { text-align: center; }
.story-moment__details { justify-self: center; }
.story-moment__switch { justify-self: center; gap: 8px; color: #fff3cfb3 !important; font-size: 13px; }
.story-moment__switch svg { width: 24px; height: 24px; }
.story-status { margin: 0; font-size: 15px; color: #fff; }
.customer-dialog-open { overflow: hidden; }
.experience-dialog { width: min(calc(100% - 48px), 560px); max-height: calc(100svh - 48px); border: 1px solid #e8ca862e; padding: var(--space-3); border-radius: 24px; background: radial-gradient(ellipse at 50% 0%, #dac08a0c, transparent 75%), #151719; color: #fff; box-shadow: 0 24px 96px #0008; font-family: ui-sans-serif, system-ui, sans-serif; }
.experience-dialog::backdrop { background: #0008; backdrop-filter: blur(4px); }
.experience-dialog__header { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.experience-dialog__header h2 { font-size: 22px; font-weight: 600; }
.story-details-dialog { text-align: left; }
.story-details-dialog .experience-dialog__header { align-items: center; margin-bottom: var(--space-2); }
.story-details-dialog .customer-review { gap: var(--space-2); }
.story-details-dialog .customer-review > div { gap: 4px; padding-bottom: 12px; }
.story-details-dialog .customer-review > div:last-child { border-bottom: 0; padding-bottom: 0; }
.story-details-dialog__manage { margin-top: var(--space-2); color: #fff3cfb3 !important; font-size: 13px; }
.story-details-dialog__download { display: grid; gap: 8px; margin-top: 24px; }
.story-downloads > .customer-button { width: 100%; }
.story-details-dialog[open] { animation: story-details-reveal 180ms ease-out; }
@keyframes story-details-reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.dialog-close { flex-shrink: 0; background: transparent; font: 300 32px/1 ui-sans-serif, system-ui, sans-serif; }
.experience-dialog.story-picker { position: relative; padding: 32px 24px 28px; }
.story-picker .experience-dialog__header { justify-content: center; margin: 0 32px 8px; }
.story-picker .dialog-close { position: absolute; top: 12px; right: 12px; }
.story-picker__description { max-width: 32ch; margin-inline: auto; color: #e5ded0b8; text-align: center; text-wrap: balance; }
.story-picker__grid { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 20px 12px; width: 100%; max-width: 440px; margin: 24px 0 0; }
.story-picker__grid .story-choice { flex: 0 0 calc((100% - 24px) / 3); min-width: 0; padding-block: 4px; }
.story-picker__grid[data-columns="2"] { max-width: 360px; }
.story-picker__grid[data-columns="2"] .story-choice { flex-basis: calc((100% - 12px) / 2); }
.story-choice { display: grid; justify-items: center; align-content: start; gap: var(--space-1); padding-block: var(--space-1); color: #fff; text-align: center; border-radius: 12px; }
.story-initial { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; color: #fff8df; background: linear-gradient(145deg, #6a9292, #395c60); box-shadow: inset 0 1px 0 #fff2; font: 500 32px/1 ui-sans-serif, system-ui, sans-serif; transition: transform 160ms ease, filter 160ms ease; }
.story-choice:nth-child(3n + 2) .story-initial { background: linear-gradient(145deg, #a087a0, #654b65); }
.story-choice:nth-child(3n) .story-initial { background: linear-gradient(145deg, #b28c56, #76552d); }
.story-choice:hover .story-initial { transform: translateY(-2px); filter: brightness(1.15); }
.story-choice:focus-visible, .experience-dialog button:focus-visible, .experience-dialog a:focus-visible { outline: 2px solid #efc86e; outline-offset: 4px; }
.story-choice__name { font: 500 16px/1.4 ui-sans-serif, system-ui, sans-serif; overflow-wrap: anywhere; }
.story-choice__status { color: #e5ded0b8; font: 400 11px/1.4 ui-sans-serif, system-ui, sans-serif; }
.story-choice--add .story-initial { background: #ffffff0d !important; box-shadow: inset 0 0 0 1px #efc86e66; color: #efc86e; }
.story-choice--add .story-initial svg { width: 28px; height: 28px; }
.experience-picker__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.experience-option { display: grid; gap: var(--space-1); font-size: 14px; }
.experience-option img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.experience-option[aria-current=true] { color: var(--yondora-gold); }
.customer-empty { display: grid; gap: var(--space-3); align-content: center; min-height: 65svh; }
.customer-empty .customer-button { justify-self: start; margin-top: var(--space-1); }
.customer-account { width: min(100%, 960px); display: grid; gap: var(--space-4); }
.customer-account--profile { max-width: 560px; margin-inline: auto; }
.customer-page-heading { display: grid; gap: var(--space-2); }
.customer-page-heading .customer-title { font-size: clamp(32px, 4vw, 48px); }
.profile-panel { display: grid; gap: var(--space-4); }
.profile-identity { display: flex; gap: var(--space-3); align-items: center; }
.profile-identity > div { min-width: 0; }
.profile-photo { flex: 0 0 80px; width: 80px; height: 80px; overflow: hidden; border: 1px solid #efc86e66; border-radius: 50%; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-control { display: grid; justify-items: start; gap: var(--space-1); }
.profile-form { --form-group-gap: 24px; }
.profile-form .profile-photo-control .profile-photo-button { width: auto; min-height: 44px; padding: 8px 16px; font-size: 14px; }
.profile-form .customer-note { color: #e3dcc3d9; }
.profile-email { margin: 0; color: var(--form-value-color); font: var(--form-value-weight) var(--form-value-size)/1.5 ui-sans-serif, system-ui, sans-serif; overflow-wrap: anywhere; }
.profile-email-note { margin-top: 2px; }
.profile-form > .customer-button { width: 100%; margin-top: var(--space-1); }
.profile-form > .customer-button:disabled { opacity: .5; cursor: default; filter: none; box-shadow: none; }
.profile-footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); border-top: 1px solid #e8ca8626; padding-top: var(--space-4); }
.profile-footer form { margin: 0; min-width: 0; }
.profile-footer .customer-button { width: 100%; padding-inline: 16px; }
.account-delete-dialog__copy { display: grid; gap: var(--space-2); }
.account-delete-dialog__warning { color: #f2b39f; }
.account-delete-dialog__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-4); }
.account-delete-dialog__actions form { margin: 0; min-width: 0; }
.account-delete-dialog__actions .customer-button { width: 100%; padding-inline: 16px; }
.customer-form { display: grid; gap: var(--form-group-gap); }
.customer-form .customer-button { justify-self: start; }
.customer-field { display: grid; gap: var(--form-field-gap); min-width: 0; }
.customer-field > label, .profile-field-label, .customer-review dt { color: var(--form-label-color); font: var(--form-label-weight) var(--form-label-size)/1.5 ui-sans-serif, system-ui, sans-serif; }
.customer-field :is(input, select, textarea), .customer-readonly { width: 100%; min-width: 0; min-height: 48px; border: 1px solid #d9c4925c; border-radius: 12px; padding: 8px 16px; color: var(--form-value-color); background: #030914a8; font: var(--form-value-weight) var(--form-value-size)/1.5 ui-sans-serif, system-ui, sans-serif; color-scheme: dark; }
.customer-field :is(input, textarea)::placeholder { color: var(--form-placeholder-color); opacity: 1; }
.customer-field select:has(option[value=""]:checked) { color: var(--form-placeholder-color); }
.customer-field :is(input, select, textarea):focus-visible { outline: 2px solid #efc86e; outline-offset: 3px; }
.customer-field input[type=file] { font-size: 13px; }
.customer-field input::file-selector-button { border: 0; border-radius: 6px; padding: 4px 8px; margin-right: var(--space-1); background: #efc86e; color: #271a09; font: inherit; cursor: pointer; }
.customer-readonly { margin: 0; overflow-wrap: anywhere; }
.customer-checkbox { display: flex; align-items: start; gap: var(--space-2); color: #e3dcc3d9; font: 400 13px/1.6 ui-sans-serif, system-ui, sans-serif; }
.customer-checkbox input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: #efc86e; }
.customer-error { padding: var(--space-2); border: 1px solid #b2665280; border-radius: 12px; margin: 0; color: #ffd6c4; background: #321914; font: 400 14px/1.6 ui-sans-serif, system-ui, sans-serif; }
.customer-danger { display: grid; gap: var(--space-2); background: #100d11; border-color: #be817a33; }
.customer-danger summary { min-height: 44px; color: #e7b6a6; cursor: pointer; font: 500 13px/1.6 ui-sans-serif, system-ui, sans-serif; }
.customer-danger[open] > p { margin-block: var(--space-2); }
.experience-setup { width: min(100%, 560px); margin-inline: auto; display: grid; gap: var(--space-4); }
.setup-heading { display: grid; gap: var(--space-2); }
.setup-edit-link { justify-self: start; }
.setup-navigation { display: flex; justify-content: space-between; align-items: center; margin-inline: -12px 0; }
.setup-navigation form { margin: 0; }
.setup-options > summary { list-style: none; }
.setup-options > summary::-webkit-details-marker { display: none; }
.setup-options[open] > summary, .setup-options > summary:hover { background: #ffffff08; }
.setup-options__menu { position: fixed; z-index: 20; width: max-content; max-width: calc(100vw - 16px); padding: 4px; border: 1px solid #e8ca8624; border-radius: 8px; background: #17191c; box-shadow: 0 8px 24px #0006; }
.setup-options__action { display: flex; align-items: center; gap: var(--space-1); width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 4px; color: #e7b6a6; background: transparent; cursor: pointer; font: 500 14px/1.4 ui-sans-serif, system-ui, sans-serif; text-align: left; }
.setup-options__action svg { width: 18px; height: 18px; }
.setup-options__action:hover { background: #ffffff0d; }
.setup-options__action:focus-visible { outline: 2px solid #efc86e; outline-offset: -2px; }
.setup-heading .customer-title, .customer-account--profile .customer-title { width: fit-content; padding-bottom: .12em; margin-bottom: -.12em; font-size: clamp(32px, 4vw, 48px); background: linear-gradient(118deg, #fffdf6 0%, #fff8df 48%, #e4ad43 100%); background-clip: text; -webkit-background-clip: text; color: transparent; }
.setup-panel { display: grid; gap: var(--space-3); width: 100%; padding: 0; border: 0; }
.setup-panel--review { gap: var(--space-1); }
.experience-setup a, .experience-setup a:hover, .library-feature--story a, .library-feature--story a:hover { text-decoration: none; }
.setup-panel .customer-field :is(input, select, textarea) { border: 0; border-bottom: 1px solid transparent; border-radius: 0; padding: 8px 0; background: linear-gradient(90deg, #d9c49238, #d9c49226 60%, #d9c49208) left bottom / 100% 1px no-repeat; }
.setup-panel .customer-field :is(input, select, textarea):focus-visible { outline: 0; background-image: linear-gradient(90deg, #efc86eb3, #efc86e80 60%, #efc86e26); }
/* Santa setup: one quiet surface for each answer and a single wording group. */
.experience-setup:has(.setup-choices) .customer-form { gap: 24px; }
.experience-setup:has(.setup-choices) .customer-field > label, .setup-choices legend { color: #f7f2e7; font: 500 15px/1.5 ui-sans-serif, system-ui, sans-serif; }
.experience-setup:has(.setup-choices) .customer-field input { min-height: 54px; border: 1px solid transparent; border-radius: 14px; padding: 8px 15px; background: #1b2028; color: #fff9ef; }
.experience-setup:has(.setup-choices) .customer-field input::placeholder { color: #b8b7b2; }
.experience-setup:has(.setup-choices) .customer-field input:focus-visible { outline: 2px solid #e5c27b; outline-offset: 3px; }
.setup-choices { min-width: 0; padding: 0; margin: 0; border: 0; }
.setup-choices legend { padding: 0; margin-bottom: 8px; }
.setup-choices__options { display: flex; overflow: hidden; border-radius: 14px; background: #1b2028; }
.setup-choice { position: relative; display: flex; flex: 1; align-items: center; justify-content: center; min-width: 0; min-height: 54px; padding: 10px; color: #eee9df; cursor: pointer; font: 500 15px/1.4 ui-sans-serif, system-ui, sans-serif; text-align: center; }
.setup-choice + .setup-choice::before { content: ""; position: absolute; z-index: 1; left: 0; top: 0; bottom: 0; width: 1px; background: #47484a; }
.setup-choice input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.setup-choice:has(input:checked) { background: #d8c49b; color: #211a13; }
.setup-choice:has(input:focus-visible) { outline: 2px solid #e5c27b; outline-offset: -3px; }
.setup-consent { display: grid; gap: 20px; }
.setup-consent .customer-checkbox { color: #dbd7ce; font-size: 13px; }
.setup-consent .customer-checkbox input { accent-color: #d8b879; }
.setup-consent .customer-note { font-size: 13px; }
.setup-consent .customer-note a { color: #dec382; text-decoration: none; }
.setup-consent .customer-note a:hover { color: #fff3cf; }
.setup-consent .customer-note a:focus-visible { outline: 2px solid #e5c27b; outline-offset: 3px; }
.profile-panel .customer-field input { border: 1px solid #d9c49299; border-radius: 12px; padding: 8px 16px; background: #030914a8; }
.profile-panel .customer-field input:focus-visible { outline: 2px solid #efc86e; outline-offset: 3px; }
.customer-select { position: relative; }
.setup-panel .customer-select select { appearance: none; padding-right: 48px; cursor: pointer; }
.customer-select > svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; pointer-events: none; color: #fff3cf; }
.setup-panel .customer-select option { background: #142032; color: #fff9e9; }
.setup-actions { display: flex; align-items: center; gap: var(--space-2); }
.setup-actions > .customer-button { flex: 1; min-width: 0; padding-inline: 16px; }
.setup-final-step { display: grid; gap: var(--space-2); }
.setup-lock-warning { display: flex; align-items: flex-start; gap: 12px; padding: var(--space-2); border: 1px solid #efc86e66; border-radius: 12px; background: #211b10f5; }
.setup-lock-warning > svg { width: 20px; height: 20px; margin-top: 2px; color: #efc86e; }
.setup-lock-warning > div { min-width: 0; }
.customer-world .setup-lock-warning h2 { color: #fff3cf; font: 600 15px/1.45 ui-sans-serif, system-ui, sans-serif; }
.setup-lock-warning p { margin: 8px 0 0; color: #f5f1e9; font: 400 14px/1.6 ui-sans-serif, system-ui, sans-serif; overflow-wrap: anywhere; }
.setup-replay-note { text-align: center; }
.customer-icon-button { display: inline-flex; justify-content: center; align-items: center; width: 48px; height: 48px; padding: 0; border: 0; background: transparent; color: #fff3cf; cursor: pointer; border-radius: 50%; }
.customer-icon-button:hover { background: #ffffff12; }
.customer-icon-button:focus-visible { outline: 2px solid #efc86e; outline-offset: 3px; }
.customer-world .setup-back svg { width: 32px; height: 32px; }
.customer-review { display: grid; gap: var(--space-2); margin: 0; }
.customer-review > div { display: grid; grid-template-columns: 1fr; gap: var(--form-field-gap); padding-bottom: var(--space-2); border-bottom: 1px solid #efc86e1f; }
.customer-review dd { margin: 0; color: var(--form-value-color); font: var(--form-value-weight) var(--form-value-size)/1.5 ui-sans-serif, system-ui, sans-serif; overflow-wrap: anywhere; }
.history-list { padding: 0; overflow: hidden; }
.history-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); }
.history-row + .history-row { border-top: 1px solid #efc86e26; }
.history-row__icon { color: #efc86e; }
.history-row__copy { display: grid; gap: 4px; flex: 1; min-width: 0; }
.history-row h2 { font-size: 26px; }
.customer-empty-panel { display: grid; justify-items: start; gap: var(--space-3); }
.customer-empty-panel > svg { color: #efc86e; }
.history-pagination:empty { display: none; }
@media (max-width: 900px) {
  .customer-world .yondora-header { min-height: 96px; }
  .customer-world__art { height: min(960px, calc(100vw * 1.78)); }
  .customer-world__art img { object-position: center top; }
  .customer-world:has(.customer-world__art)::before { background: linear-gradient(180deg, #030b1975, #030b1980 240px, #030b19e6 480px, #030303 900px); }
  .customer-main { padding-top: var(--space-4); }
  .customer-world .yondora-navigation { right: var(--customer-gutter); }
}
@media (max-width: 600px) {
  .customer-title--story-hero { font-size: 52px; }
  .customer-description { font-size: 16px; }
  .customer-world h2 { font-size: 20px; }
  .customer-panel { padding: var(--space-3); border-radius: 20px; }
  .customer-actions { align-items: stretch; }
  .customer-actions form { width: 100%; }
  .customer-form .customer-button { width: 100%; }
  .profile-identity { align-items: start; gap: var(--space-2); }
  .customer-account--profile { gap: var(--space-3); }
  .customer-account--profile .customer-page-heading { gap: var(--space-1); }
  .profile-photo { width: 64px; height: 64px; flex-basis: 64px; }
  .profile-footer { grid-template-columns: 1fr; gap: var(--space-1); }
  .customer-review > div { grid-template-columns: 1fr; gap: 4px; }
  .history-list { padding: 0; }
  .history-row { flex-wrap: wrap; padding: var(--space-3); gap: var(--space-2); }
  .history-row .customer-button { width: 100%; }
  .customer-empty-panel .customer-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .customer-world * { animation: none !important; transition: none !important; } }

@media (max-width: 900px) {
  .customer-world--featured .customer-main { padding-top: 0; }
  .customer-world--featured .customer-world__art { height: 100%; }
  .customer-world--featured .customer-world__art img { object-position: center top; }
  .customer-world--featured:has(.customer-world__art)::before { background: linear-gradient(180deg, #0004 0%, transparent 18%, transparent 35%, #0303038a 55%, #030303eb 78%, #030303 100%); }
  .library-feature { gap: var(--space-3); padding-block: 120px max(64px, 8svh, env(safe-area-inset-bottom)); }
  .library-feature__copy { gap: var(--space-2); }
  .library-feature__copy .customer-title { font-size: clamp(34px, 10.8vw, 60px); max-width: 14ch; }
  .library-feature__copy .customer-description { font-size: 19px; line-height: 1.5; }
  .featured-navigation__controls { gap: var(--space-1); }
  .experience-dialog { padding: var(--space-3); }
}
@media (min-width: 600px) and (max-width: 900px) {
  .library-feature__copy .customer-title { font-size: clamp(62px, 8.3vw, 76px); }
}
@media (min-width: 901px) and (max-width: 1150px) {
  .library-feature__copy .customer-title { font-size: clamp(58px, 5.5vw, 68px); }
}
@media (max-width: 600px) {
  .library-feature__actions { grid-template-columns: 1fr; width: 100%; }
  .library-feature__allowance { text-align: center; }
  .library-feature__copy .customer-button { padding-inline: 24px; }
  .library-feature--story { padding-block: 128px 32px; }
  .story-moment__title { min-height: 112px; }
  .featured-navigation { gap: var(--space-1); }
  .featured-navigation > button { font-size: 13px; }
  .featured-arrow { width: 44px; height: 44px; }
  .experience-picker__grid { grid-template-columns: 1fr; }
  .experience-dialog { position: fixed; inset: auto 0 0; width: 100%; max-width: none; max-height: calc(100svh - 96px); margin: 0; padding: 20px var(--space-3) max(24px, env(safe-area-inset-bottom)); border-bottom: 0; border-radius: 24px 24px 0 0; }
  .experience-dialog__header { margin-top: -4px; }
  .experience-dialog.story-picker { position: fixed; padding: 32px 20px max(28px, env(safe-area-inset-bottom)); }
  .story-picker::before { content: ""; position: absolute; top: 12px; left: calc(50% - 20px); width: 40px; height: 4px; border-radius: 2px; background: #ffffff30; }
  .story-details-dialog { padding: 28px var(--space-3) max(20px, env(safe-area-inset-bottom)); }
  .story-details-dialog::before { content: ""; position: absolute; top: 12px; left: calc(50% - 20px); width: 40px; height: 4px; border-radius: 2px; background: #ffffff30; }
  .story-picker .dialog-close { top: 24px; }
  .story-picker .story-initial { width: 64px; height: 64px; }
}
@media (max-width: 600px) and (max-height: 700px) {
  .library-feature { gap: var(--space-2); padding-block: 104px max(32px, env(safe-area-inset-bottom)); }
  .library-feature__copy .customer-description { font-size: 17px; }
  .customer-world--featured:has(.customer-world__art)::before { background: linear-gradient(180deg, #0004, transparent 18%, #03030388 40%, #030303eb 75%, #030303); }
}
/* Phone library artwork keeps its composition as controls and invitations grow.
   Copy begins below the faces, over the darkened table and its fade to black. */
@media (max-width: 600px) {
  .customer-world--featured:has(.library-feature:not(.library-feature--story)) { --library-art-height: 178vw; }
  .customer-world--featured:has(.library-feature:not(.library-feature--story)) .customer-world__art { height: var(--library-art-height); bottom: auto; }
  .customer-world--featured:has(.library-feature:not(.library-feature--story))::before { inset: 0 0 auto; height: var(--library-art-height); background: linear-gradient(180deg, #0004, transparent 18%, transparent 46%, #030303d9 64%, #030303 82%); }
  .library-feature:not(.library-feature--story) { justify-content: flex-start; padding-top: 100vw; }
}
/* Setup treats artwork as atmosphere. Contrast never depends on its composition. */
.customer-world:has(.experience-setup) { background: #080b10; }
.customer-world:has(.experience-setup, .customer-account--profile) .customer-main { padding-block: var(--space-2) var(--space-6); }
.customer-world:has(.experience-setup) .customer-world__art { position: fixed; inset: 0; height: 100%; }
.customer-world:has(.experience-setup) .customer-world__art img { object-fit: cover; object-position: center; }
.customer-world:has(.experience-setup)::before { position: fixed; background: linear-gradient(180deg, #080b10c4, #080b10eb); }

.customer-world--featured:has(.library-feature--story)::before { background: linear-gradient(180deg, #080b104d, #080b10b8 25%, #080b10e8 60%, #080b10f5); }

/* Desktop gives the story and its artwork their own space. */
@media (min-width: 901px) {
  .library-feature--story { justify-content: center; padding-block: 160px 64px; }
  .library-feature--story .library-feature__copy { width: min(52%, 620px); margin-inline: 0; gap: var(--space-3); }
  .story-moment { gap: var(--space-3); }
  .story-moment__title { min-height: clamp(152px, 13vw, 188px); gap: 12px; }
  .story-moment__name { font-size: clamp(88px, 8vw, 120px); }
  .story-moment__phrase { font-size: clamp(30px, 2.8vw, 42px); }
  .story-moment__experience { font-size: 14px; }
  .story-moment__guidance .customer-body { font-size: 17px; max-width: 36ch; }
  .story-moment__actions { width: min(100%, 360px); }
  .story-moment > .customer-actions, .story-moment > .customer-button { width: min(100%, 360px); }
  .story-moment > .story-moment__switch { justify-self: start; justify-content: center; width: min(100%, 360px); }
  .customer-world--featured:has(.library-feature--story) .customer-world__art img { object-position: center; }
  .customer-world--featured:has(.library-feature--story)::before {
    background: linear-gradient(90deg, #080b10f5 0%, #080b10e8 25%, #080b10b3 43%, #080b1033 66%, #080b101a), linear-gradient(180deg, #080b104d, transparent 24%, transparent 60%, #080b10d9);
  }
}

/* Preparation gives the existing artwork its own stage above a centered loader.
   Scope to the mounted loading section so failed/cancelled replacements restore
   the normal owned-story layout without changing the polling contract. */
.customer-world--featured:has(.story-loading) { --story-art-height: 66svh; --story-loading-height: max(34svh, 192px); }
.customer-world--featured:has(.story-loading) .customer-world__art { height: var(--story-art-height); bottom: auto; overflow: hidden; }
.customer-world--featured:has(.story-loading) .customer-world__art img { object-position: center 15%; }
.customer-world--featured:has(.story-loading)::before { inset: 0 0 auto; height: var(--story-art-height); background: linear-gradient(180deg, #03030326, transparent 20%, transparent 82%, #030303); }
.customer-main:has(.story-loading) { width: 100%; max-width: none; padding: 0; }
.library-feature:has(.story-loading) { justify-content: flex-start; gap: 0; padding: var(--story-art-height) 0 0; }
.library-feature:has(.story-loading) .library-feature__copy { width: 100%; max-width: none; margin: 0; gap: 0; }
.story-loading { gap: 0; }
.story-loading__panel { display: grid; place-items: center; min-height: var(--story-loading-height); padding: 32px var(--customer-gutter); background: #030303; }
.story-loading__content, .story-loading__status { display: grid; justify-items: center; gap: 16px; width: 100%; text-align: center; }
.story-loading__content { max-width: 640px; }
.story-loading__spinner { display: block; width: 48px; height: 48px; border-radius: 50%; background: conic-gradient(#fff9e9, #efc86e 240deg, #efc86e33 280deg); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); animation: story-loading-turn 1.2s linear infinite; }
.story-loading__title { margin: 0; color: #fff4d9; font: 500 clamp(24px, 2.5vw, 32px)/1.25 "Yondora Storybook", Georgia, serif; overflow-wrap: anywhere; text-wrap: balance; }
.story-loading .story-moment__error { margin: 0; max-width: 44ch; }
.story-loading__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; padding: 0 var(--customer-gutter) max(16px, env(safe-area-inset-bottom)); background: #030303; }
.library-feature:has(.story-loading) > .featured-navigation { padding: 16px var(--customer-gutter); }
@keyframes story-loading-turn { to { transform: rotate(360deg); } }

/* On larger screens, hints sit beside the heading rather than below it. */
@media (min-width: 1024px) {
  .customer-world:has(.experience-setup) .customer-main { padding-block: var(--space-6) var(--space-8); }
  .experience-setup { width: min(100%, 1120px); grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(48px, 6vw, 96px); align-items: start; }
  .setup-heading { align-content: start; }
  .setup-heading .customer-title { font-size: clamp(32px, 4vw, 48px); text-align: left; text-wrap: initial; }
  .setup-panel { padding-top: 64px; }
  .customer-world:has(.experience-setup)::before { background: linear-gradient(90deg, #080b10e8, #080b10d9 45%, #080b10e8); }
  .story-details-dialog { padding: var(--space-3); }
}

/* Keep artwork above the form on phones, fading to a steady reading surface. */
@media (max-width: 1023px) {
  .customer-world:has(.experience-setup .setup-choices) .customer-world__art { position: absolute; height: 320px; }
  .customer-world:has(.experience-setup .setup-choices)::before { position: absolute; inset: 0 0 auto; height: 320px; background: linear-gradient(180deg, #080b115c 0%, #080b1199 42%, #080b10 92%); }
  .experience-setup:has(.setup-choices) { gap: 32px; }
}
