/* /admin/login and /join/{token}: a static storybook surrounds real HTML.
   Every rule stays inside the welcome journey; parent shelves are unaffected. */
.kiana-welcome {
    --welcome-paper: #fff3d7;
    --welcome-plum: #49334f;
    --welcome-muted: #68556b;
    margin: 0;
    background: var(--welcome-paper);
    color: var(--welcome-plum);
    font-family: system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color-scheme: light;
}
.kiana-welcome *, .kiana-welcome *::before, .kiana-welcome *::after { box-sizing: border-box; }
.kiana-welcome .welcome-world {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: max(100svh, 66.667vw);
    margin-inline: auto;
    padding-block: clamp(155px, 17vw, 280px) 20px;
    overflow: hidden;
}
/* Restore the accepted painting at its natural proportions and full width.
   Never cover-crop a character or enlarge the picture to fit a long form. */
.kiana-welcome .welcome-art { position: absolute; inset: 0; z-index: -1; display: block; pointer-events: none; }
.kiana-welcome .welcome-art img { display: block; width: 100%; height: auto; }
/* The original's paper continuation keeps long forms readable below the
   painting. Only its bottom edge fades; faces and the town stay untouched. */
.kiana-welcome .welcome-art::after { content: ""; position: absolute; top: calc(66.667vw - 48px); left: 0; right: 0; height: 48px; background: linear-gradient(transparent, var(--welcome-paper)); }
.kiana-welcome .welcome-panel { --welcome-form-width: clamp(292px, 25vw, 390px); width: var(--welcome-form-width); margin-left: calc(81% - var(--welcome-form-width) / 2); padding: 12px 0 16px; outline: none; overflow-wrap: anywhere; }
.kiana-welcome .welcome-panel:has(.welcome-registration) { background: linear-gradient(transparent, var(--welcome-paper) 280px); }
.kiana-welcome .welcome-brand { text-align: center; margin-bottom: 12px; }
.kiana-welcome .welcome-town-name { margin: 0; color: #513957; font-family: Tahoma, serif; font-size: clamp(22px, 2.15vw, 32px); line-height: 1.7; font-weight: 700; }
.kiana-welcome .welcome-footer { margin: 16px 0 0; color: var(--welcome-muted); text-align: center; font-size: 12px; }
.kiana-welcome .welcome-version { display: block; margin-top: 8px; font-size: 11px; }
.kiana-welcome h1, .kiana-welcome .fi-simple-header-heading { font-size: 24px; line-height: 1.25; font-weight: 700; color: var(--welcome-plum); margin: 0 0 12px; }
.kiana-welcome p { overflow-wrap: anywhere; }
.kiana-welcome .fi-simple-header { gap: 0; }
.kiana-welcome .fi-simple-header-subheading { font-size: 15px; line-height: 1.55; color: var(--welcome-muted); }
.kiana-welcome .fi-simple-page-content { gap: 24px; }
.kiana-welcome .fi-fo-field-label, .kiana-welcome .fi-fo-field-label-content { color: var(--welcome-plum); font-size: 15px; }
.kiana-welcome .fi-input-wrp { border: 1px solid #b7a78f; border-radius: 12px; background: #fffcf4; box-shadow: none; }
.kiana-welcome .fi-input { min-height: 48px; font-size: 16px; color: var(--welcome-plum); background: transparent; }
.kiana-welcome .fi-input-wrp-suffix { color: var(--welcome-muted); }
.kiana-welcome .fi-input-wrp-suffix button { min-width: 44px; min-height: 44px; }
.kiana-welcome .fi-input-wrp:focus-within { outline: 3px solid #7f638a; outline-offset: 3px; }
.kiana-welcome .fi-btn, .kiana-welcome .welcome-button { display: inline-flex; width: 100%; min-height: 50px; align-items: center; justify-content: center; padding: 12px 16px; border: 1px solid #674b72; border-radius: 12px; background: #674b72; color: #fff; box-shadow: 0 3px 0 #4b3455; font: inherit; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.kiana-welcome .fi-btn:hover, .kiana-welcome .welcome-button:hover { background: #533a5d; }
.kiana-welcome .fi-btn:disabled { opacity: .65; cursor: wait; }
.kiana-welcome :is(a, button, input):focus-visible { outline: 3px solid #7f638a; outline-offset: 3px; }
.kiana-welcome .fi-fo-field-wrp-error-message, .kiana-welcome .welcome-error { color: #992b30; font-size: 14px; }
.kiana-welcome .welcome-registration > p { margin: 0 0 16px; color: var(--welcome-muted); font-size: 15px; }
.kiana-welcome .welcome-registration { text-align: center; }
.kiana-welcome .welcome-registration label { display: block; margin: 10px 0 5px; font-weight: 600; font-size: 15px; text-align: center; }
.kiana-welcome .welcome-registration button[type="submit"] { margin-top: 18px; }
.kiana-welcome .welcome-registration input { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid #b7a78f; border-radius: 12px; background: #fffcf4; color: var(--welcome-plum); font: inherit; font-size: 16px; text-align: start; }
.kiana-welcome .welcome-registration input[readonly] { background: #eee4d0; color: #58475b; }
.kiana-welcome .welcome-error { padding: 12px; border-left: 3px solid #992b30; background: #fff3ed; border-radius: 6px; }
.kiana-welcome .welcome-invitation-heading { margin-bottom: 2px; font-family: Tahoma, serif; line-height: 1.7; }
.kiana-welcome .welcome-registration > :is(.welcome-invitation-translation, .welcome-inviter) { margin-bottom: 6px; font-size: 13px; line-height: 1.5; }
.kiana-welcome .welcome-inviter { padding-inline: 8px; }
.kiana-welcome .welcome-account-heading { margin: 12px 0 4px; color: var(--welcome-plum); font-size: 24px; line-height: 1.35; }
/* A real close composition replaces the wide art on phones and portrait tablets.
   Content stays in normal document flow, including with the software keyboard.
   No image or fixed-height panel can block the form or its validation. */
@media (max-width: 899px) {
    .kiana-welcome .welcome-world { min-height: 100svh; padding-top: 74vw; }
    .kiana-welcome .welcome-art::after { top: calc(150vw - 48px); }
    .kiana-welcome .welcome-panel { width: min(74%, 420px); margin-inline: auto; padding-top: 8px; }
    .kiana-welcome .welcome-panel:has(.welcome-registration) { background: none; }
    .kiana-welcome .welcome-town-name { font-size: clamp(22px, 5.7vw, 30px); }
    .kiana-welcome .welcome-brand { margin-bottom: 10px; }
}
/* At narrow landscape sizes the form remains comfortably scrollable. */
@media (max-width: 599px) and (max-height: 600px) {
    .kiana-welcome .welcome-world { padding-bottom: 70px; }
}
