/* ROZEL AI — cinematic desktop intro + responsive mobile welcome */
#rozelEntryGate, #rozelEntryGate * { box-sizing: border-box; }
#rozelEntryGate {
  position: fixed;
  inset: 0;
  z-index: 10000001;
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  color: #f7f5f6;
  background: #030304;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  isolation: isolate;
}
#rozelEntryGate.rozel-entry-hidden { display: none !important; }
#rozelEntryGate::before,
#rozelEntryGate::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
#rozelEntryGate::before { z-index: 0; }
#rozelEntryGate::after { z-index: 1; }
#rozelEntryGate [hidden] { display: none !important; }
body.rozel-entry-lock { overflow: hidden !important; }

/* Desktop first screen: cinematic image occupies roughly the upper half. */
.rozel-desktop-intro {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #030304;
}
.rozel-desktop-intro[hidden] { display: none !important; }
.rozel-desktop-hero {
  position: relative;
  width: 100%;
  height: clamp(360px, 52vh, 560px);
  min-height: 360px;
  overflow: hidden;
  background: #050407;
}
.rozel-desktop-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.02) 45%, rgba(3,3,4,.15) 74%, #030304 100%);
  pointer-events: none;
}
.rozel-desktop-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 6%;
}
.rozel-desktop-intro-action {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 150px;
  padding: 24px;
  background: #030304;
}
.rozel-desktop-continue {
  min-width: 190px;
  min-height: 49px;
  padding: 12px 34px;
  color: #fff;
  background: linear-gradient(105deg, #a20b50, #650a37);
  border: 1px solid rgba(238, 91, 151, .65);
  border-radius: 999px;
  box-shadow: 0 9px 35px rgba(161, 12, 79, .22);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.rozel-desktop-continue:hover { filter: brightness(1.12); box-shadow: 0 12px 42px rgba(191, 20, 96, .3); }
.rozel-desktop-continue:active { transform: scale(.98); }
.rozel-desktop-continue:focus-visible,
.rozel-entry-choice:focus-visible,
.rozel-auth-submit:focus-visible,
.rozel-auth-link:focus-visible,
.rozel-auth-back:focus-visible { outline: 2px solid #ee91b2; outline-offset: 3px; }

/* The same image becomes a deeply blurred, subdued backdrop after Continue. */
#rozelEntryGate.rozel-desktop-welcome-active::before {
  background-image: url("./rozel-welcome-bg.jpg");
  background-size: cover;
  background-position: center 28%;
  background-repeat: no-repeat;
  filter: blur(22px) brightness(.38) saturate(1.15);
  opacity: .9;
  transform: scale(1.08);
}
#rozelEntryGate.rozel-desktop-welcome-active::after {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(119, 7, 58, .16), transparent 58%),
    linear-gradient(180deg, rgba(0,0,0,.01), rgba(0,0,0,.6));
}

/* Welcome and auth content on desktop: deliberately below the exact centre. */
.rozel-entry-card {
  position: relative;
  z-index: 3;
  width: min(100% - 48px, 650px);
  margin: 0 auto;
  padding: clamp(105px, 16vh, 165px) 0 54px;
  text-align: center;
  background: transparent;
}
.rozel-entry-heading {
  margin: 0 0 12px;
  color: #f7f5f6;
  font-size: clamp(29px, 3.5vw, 39px);
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: -.035em;
}
.rozel-entry-subheading {
  margin: 0 0 clamp(27px, 4vh, 38px);
  color: #b3abb0;
  font-size: clamp(15px, 1.55vw, 17px);
  line-height: 1.5;
}
.rozel-entry-choice {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0 0 14px;
  padding: 17px 22px 16px;
  border-radius: 16px;
  text-align: center;
  color: #fff;
  cursor: pointer;
  font: inherit;
  transition: transform .16s ease, border-color .16s ease, filter .16s ease, box-shadow .16s ease;
}
.rozel-entry-choice:hover { filter: brightness(1.1); }
.rozel-entry-choice:active { transform: scale(.992); }
.rozel-entry-choice-primary {
  border: 1px solid rgba(221, 64, 124, .78);
  background: linear-gradient(110deg, #94104e, #650a34);
  box-shadow: 0 10px 30px rgba(113, 8, 51, .2);
}
.rozel-entry-choice-secondary {
  border: 1px solid rgba(196, 48, 107, .82);
  background: rgba(0,0,0,.38);
}
.rozel-entry-choice-title { display: block; font-size: clamp(18px, 2vw, 20px); font-weight: 620; line-height: 1.15; }
.rozel-entry-choice-description { display: block; margin-top: 5px; color: #ead6df; font-size: 14px; line-height: 1.25; font-weight: 360; }
.rozel-entry-choice-secondary .rozel-entry-choice-description { color: #aaa4a8; }
.rozel-entry-footnote { margin: 20px 0 0; color: #aaa0a6; font-size: 13px; line-height: 1.5; }

/* Authentication sub-screen */
.rozel-auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  margin-top: 20px;
  padding: 7px 0;
  color: #fff;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.rozel-auth-form { max-width: 440px; margin: 0 auto; text-align: left; }
.rozel-auth-field { display: block; margin: 0 0 13px; }
.rozel-auth-field[hidden] { display: none !important; }
.rozel-auth-field span { display: block; margin: 0 0 7px; color: #d8d2d5; font-size: 13px; }
.rozel-auth-field input {
  width: 100%; min-height: 47px; padding: 11px 14px; color: #fff;
  background: rgba(12,12,14,.88); border: 1px solid rgba(255,255,255,.17);
  border-radius: 11px; outline: none; font: inherit; font-size: 15px;
}
.rozel-auth-field input:focus { border-color: #c24e7d; box-shadow: 0 0 0 3px rgba(138,30,73,.17); }
.rozel-auth-submit {
  width: 100%; min-height: 47px; margin-top: 5px; color: #fff;
  background: linear-gradient(110deg, #94104e, #650a34); border: 1px solid #982052;
  border-radius: 11px; font: inherit; font-weight: 620; font-size: 15px; cursor: pointer;
}
.rozel-auth-submit:disabled { opacity: .62; cursor: wait; }
.rozel-auth-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; margin-top: 16px; }
.rozel-auth-link { padding: 5px; color: #e0a0b8; background: transparent; border: 0; font: inherit; font-size: 13px; cursor: pointer; }
.rozel-auth-message { display: none; max-width: 440px; margin: 0 auto 15px; padding: 11px 13px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; text-align: left; color: #ddd; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.rozel-auth-message.show { display: block; }
.rozel-auth-message.error { color: #ffc2c2; border-color: rgba(220,70,85,.4); background: rgba(150,20,35,.18); }
.rozel-auth-message.success { color: #c8f2d5; border-color: rgba(75,180,110,.35); background: rgba(35,130,75,.18); }
.rozel-auth-loading { color: #bbb; text-align: center; font-size: 13px; }

/* Guest confirmation dialog */
#rozelGuestConfirm {
  position: fixed; inset: 0; z-index: 10000002; display: none; align-items: center;
  justify-content: center; padding: 18px; background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
#rozelGuestConfirm.show { display: flex; }
.rozel-guest-confirm-card { width: min(100%, 390px); padding: 23px 21px 19px; color: #fff; background: #111; border: 1px solid rgba(196,48,107,.55); border-radius: 18px; box-shadow: 0 24px 80px rgba(0,0,0,.65); }
.rozel-guest-confirm-card h2 { margin: 0 0 9px; font-size: 20px; letter-spacing: -.02em; }
.rozel-guest-confirm-card p { margin: 0; color: #b7b1b5; font-size: 13px; line-height: 1.55; }
.rozel-guest-confirm-actions { display: flex; gap: 10px; margin-top: 19px; }
.rozel-guest-confirm-actions button { flex: 1; min-height: 41px; border-radius: 10px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
#rozelGuestBack { color: #ddd; background: #171717; border: 1px solid rgba(255,255,255,.14); }
#rozelGuestContinue { color: #fff; background: linear-gradient(110deg, #94104e, #650a34); border: 1px solid #982052; }

/* Account control injected into the existing app header */
#rozelAccountBar { position: fixed; z-index: 100; top: 8px; right: 9px; display: flex; align-items: center; gap: 7px; }
#rozelAccountBar[hidden] { display: none !important; }
#rozelAccountEmail { max-width: 125px; overflow: hidden; color: #bdbdbd; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
#rozelSignOutBtn { padding: 6px 8px; color: #e6c5d2; background: rgba(138,30,73,.18); border: 1px solid rgba(138,30,73,.45); border-radius: 8px; font: inherit; font-size: 10px; cursor: pointer; }
#rozelSignOutBtn:disabled { opacity: .6; }

/* Phones/tablets: one screen, with the supplied image and controls together. */
@media (max-width: 899px) {
  #rozelEntryGate {
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
  }
  #rozelEntryGate::before {
    background-image: url("./rozel-welcome-bg.jpg");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    filter: none;
    opacity: 1;
    transform: none;
  }
  /* Override the desktop blurred-background selector on mobile.
     Mobile always keeps the supplied hero image sharp, including after
     switching from welcome to authentication views. */
  #rozelEntryGate.rozel-desktop-welcome-active::before,
  #rozelEntryGate.rozel-auth-active::before {
    filter: none !important;
    opacity: 1.6 !important;
    transform: none !important;
  }
  #rozelEntryGate::after {
    background: linear-gradient(180deg,
      rgba(0,0,0,.0) 0%,
      rgba(0,0,0,.0) 22%,
      rgba(0,0,0,.0) 31%,
      rgba(0,0,0,.0) 43%,
      rgba(0,0,0,.) 68%,
      #030304 100%);
  }
  .rozel-desktop-intro { display: none !important; }
  .rozel-entry-card {
    width: min(100% - 36px, 560px);
    margin: 0 auto;
    padding: clamp(275px, 39dvh, 395px) 0 28px;
  }
  .rozel-entry-heading { margin-bottom: 7px; font-size: clamp(30px, 6.4vw, 31px); }
  .rozel-entry-subheading { margin-bottom: 18px; font-size: 13px; }
  .rozel-entry-choice { padding: 15px 14px 14px; margin-bottom: 12px; border-radius: 15px; }
  .rozel-entry-choice-title { font-size: 18px; }
  .rozel-entry-choice-description { font-size: 11px; }
  .rozel-entry-footnote { margin-top: 19px; font-size: 12px; }
  #rozelAccountEmail { display: none; }
  #rozelEntryGate.rozel-auth-active .rozel-entry-card { padding-top: clamp(135px, 19dvh, 220px); }
  #rozelEntryGate.rozel-auth-active::after {
    background: linear-gradient(180deg, rgba(0,0,0,.84), rgba(0,0,0,.04) 40%, #030304 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .rozel-entry-card:has(#rozelAuthView:not([hidden])) { padding-bottom: 40px; }
}

@media (max-width: 899px) and (max-height: 700px) {
  .rozel-entry-card { padding-top: max(245px, 35dvh); }
  #rozelEntryGate.rozel-auth-active .rozel-entry-card { padding-top: 115px; }
  .rozel-entry-subheading { margin-bottom: 18px; }
  .rozel-entry-choice { padding-top: 12px; padding-bottom: 12px; }
}

@media (min-width: 900px) and (max-height: 720px) {
  .rozel-desktop-hero { height: 48vh; min-height: 280px; }
  .rozel-entry-card { padding-top: 9vh; }
  .rozel-entry-subheading { margin-bottom: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .rozel-entry-choice, .rozel-desktop-continue { transition: none; }
}


/* ROZEL brand polish — premium duo-tone heading and refined choice buttons */
.rozel-brand-gradient {
  display: inline-block;
  color: #f08ab4;
  background: linear-gradient(150deg, #fff 0%, #f18ab6 42%, #d52d78 76%, #9e1555 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 26px rgba(225, 54, 125, .13);
}

.rozel-entry-heading {
  letter-spacing: -.045em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .34);
}

.rozel-entry-subheading {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  color: #c5b8bf;
  letter-spacing: .005em;
}

.rozel-entry-choice {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 17px;
  padding: 19px 24px 18px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255,255,255,.12);
}

.rozel-entry-choice::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0;
  background: linear-gradient(115deg, transparent 15%, rgba(255,255,255,.13) 48%, transparent 78%);
  transform: translateX(-110%);
  transition: transform .55s ease, opacity .25s ease;
}

.rozel-entry-choice:hover::before {
  opacity: 1;
  transform: translateX(110%);
}

.rozel-entry-choice-primary {
  background: linear-gradient(112deg, #b31560 0%, #861047 52%, #5e0b36 100%);
  border: 1px solid rgba(245, 112, 166, .2);
  box-shadow: 0 12px 34px rgba(132, 10, 65, .3), inset 0 1px 0 rgba(255,255,255,.17);
}

.rozel-entry-choice-primary:hover {
  box-shadow: 0 15px 42px rgba(180, 18, 91, .34), inset 0 1px 0 rgba(255,255,255,.2);
  border-color: rgba(255, 151, 193, .9);
}

.rozel-entry-choice-secondary {
  background: linear-gradient(155deg, rgba(22, 10, 17, .84), rgba(5, 5, 7, .78));
  border: 1px solid rgba(220, 66, 132, .72);
  box-shadow: 0 10px 30px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.055);
}

.rozel-entry-choice-secondary:hover {
  border-color: rgba(244, 112, 166, .9);
  box-shadow: 0 12px 34px rgba(112, 8, 52, .2), inset 0 1px 0 rgba(255,255,255,.08);
}

.rozel-entry-choice-title {
  font-weight: 480;
  letter-spacing: -.018em;
}

.rozel-entry-choice-description {
  color: #f0d9e3;
  letter-spacing: .005em;
}

.rozel-entry-choice-secondary .rozel-entry-choice-description {
  color: #c5b8bf;
}

.rozel-entry-footnote {
  color: #b9aeb4;
  letter-spacing: .01em;
}

.rozel-desktop-continue,
.rozel-auth-submit,
#rozelGuestContinue {
  background: linear-gradient(110deg, #b31560 0%, #861047 55%, #5e0b36 100%);
  border-color: rgba(245, 112, 166, .72);
  box-shadow: 0 10px 30px rgba(132, 10, 65, .26), inset 0 1px 0 rgba(255,255,255,.14);
}

.rozel-auth-back{
  color:#fff;
}
.rozel-auth-link {
  color: #ef9cbd;
}

.rozel-auth-field input:focus {
  border-color: #e15b96;
  box-shadow: 0 0 0 3px rgba(190, 38, 104, .2), 0 0 18px rgba(190, 38, 104, .08);
}

@media (max-width: 899px) {
  .rozel-entry-choice {
    padding: 13px 16px 13px;
  }
  .rozel-entry-heading {
    letter-spacing: -.04em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rozel-entry-choice::before { transition: none; }
}


/* ================================================================
   ROZEL motion system — cinematic entrances + restrained neon feedback
   ================================================================ */
@keyframes rozelHeroReveal {
  from { opacity: .55; transform: scale(1.055); filter: saturate(.82); }
  to   { opacity: 1; transform: scale(1); filter: saturate(1); }
}
@keyframes rozelFadeRise {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes rozelFadeOut {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to   { opacity: 0; transform: translate3d(0, -7px, 0); }
}
@keyframes rozelOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes rozelOverlayOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes rozelDialogPop {
  from { opacity: 0; transform: translate3d(0, 12px, 0) scale(.965); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes rozelSpin {
  to { transform: rotate(360deg); }
}
@keyframes rozelBackdropReveal {
  from { opacity: 0; transform: scale(1.14); }
  to   { opacity: .9; transform: scale(1.08); }
}

/* Desktop cinematic intro. The image has a very restrained camera movement. */
.rozel-desktop-intro.rozel-intro-animate .rozel-desktop-hero img {
  animation: rozelHeroReveal 1.25s cubic-bezier(.2,.72,.2,1) both;
}
.rozel-desktop-intro.rozel-intro-animate .rozel-desktop-intro-action {
  animation: rozelFadeRise .72s cubic-bezier(.2,.72,.2,1) .18s both;
}
.rozel-desktop-intro.rozel-intro-animate .rozel-desktop-continue {
  animation: rozelFadeRise .68s cubic-bezier(.2,.72,.2,1) .38s both;
}

/* Reveal the welcome card after the desktop Continue step, and on mobile entry. */
.rozel-entry-card.rozel-card-enter {
  animation: rozelFadeRise .62s cubic-bezier(.2,.72,.2,1) both;
}
#rozelWelcomeView.rozel-view-entering .rozel-entry-heading,
#rozelWelcomeView.rozel-view-entering .rozel-entry-subheading,
#rozelWelcomeView.rozel-view-entering .rozel-entry-choice,
#rozelWelcomeView.rozel-view-entering .rozel-entry-footnote {
  animation: rozelFadeRise .56s cubic-bezier(.2,.72,.2,1) both;
}
#rozelWelcomeView.rozel-view-entering .rozel-entry-heading { animation-delay: .02s; }
#rozelWelcomeView.rozel-view-entering .rozel-entry-subheading { animation-delay: .10s; }
#rozelWelcomeView.rozel-view-entering .rozel-entry-choice-primary { animation-delay: .18s; }
#rozelWelcomeView.rozel-view-entering .rozel-entry-choice-secondary { animation-delay: .28s; }
#rozelWelcomeView.rozel-view-entering .rozel-entry-footnote { animation-delay: .37s; }

/* Screen-to-screen fades and authentication form stagger. */
.rozel-view-leaving { animation: rozelFadeOut .16s ease both; pointer-events: none; }
#rozelAuthView.rozel-view-entering .rozel-entry-heading,
#rozelAuthView.rozel-view-entering .rozel-entry-subheading,
#rozelAuthView.rozel-view-entering .rozel-auth-message,
#rozelAuthView.rozel-view-entering .rozel-auth-back,
#rozelAuthView.rozel-view-entering .rozel-auth-links {
  animation: rozelFadeRise .48s cubic-bezier(.2,.72,.2,1) both;
}
#rozelAuthView.rozel-view-entering .rozel-entry-heading { animation-delay: .02s; }
#rozelAuthView.rozel-view-entering .rozel-entry-subheading { animation-delay: .08s; }
#rozelAuthView.rozel-view-entering .rozel-auth-message { animation-delay: .11s; }
#rozelAuthView.rozel-view-entering .rozel-auth-back { animation-delay: .03s; }
#rozelAuthView.rozel-view-entering .rozel-auth-links { animation-delay: .28s; }
#rozelAuthView.rozel-view-entering .rozel-auth-field:not([hidden]) {
  animation: rozelFadeRise .44s cubic-bezier(.2,.72,.2,1) both;
}
#rozelAuthView.rozel-view-entering .rozel-auth-field:nth-of-type(1) { animation-delay: .12s; }
#rozelAuthView.rozel-view-entering .rozel-auth-field:nth-of-type(2) { animation-delay: .17s; }
#rozelAuthView.rozel-view-entering .rozel-auth-field:nth-of-type(3) { animation-delay: .22s; }
#rozelAuthView.rozel-view-entering .rozel-auth-field:nth-of-type(4) { animation-delay: .27s; }
#rozelAuthView.rozel-view-entering .rozel-auth-submit { animation: rozelFadeRise .48s cubic-bezier(.2,.72,.2,1) .3s both; }

/* Switching between sign-in, sign-up and reset modes. */
#rozelAuthView.rozel-auth-mode-enter .rozel-entry-heading,
#rozelAuthView.rozel-auth-mode-enter .rozel-entry-subheading,
#rozelAuthView.rozel-auth-mode-enter .rozel-auth-field:not([hidden]),
#rozelAuthView.rozel-auth-mode-enter .rozel-auth-submit,
#rozelAuthView.rozel-auth-mode-enter .rozel-auth-links {
  animation: rozelFadeRise .4s cubic-bezier(.2,.72,.2,1) both;
}
#rozelAuthView.rozel-auth-mode-enter .rozel-auth-field:not([hidden]) { animation-delay: .06s; }
#rozelAuthView.rozel-auth-mode-enter .rozel-auth-submit { animation-delay: .14s; }
#rozelAuthView.rozel-auth-mode-enter .rozel-auth-links { animation-delay: .2s; }

/* Button feedback: gentle lift, not bouncing. Keep existing gradients and colors. */
.rozel-desktop-continue,
.rozel-entry-choice,
.rozel-auth-submit,
.rozel-auth-link,
.rozel-auth-back,
.rozel-guest-confirm-actions button {
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s cubic-bezier(.2,.72,.2,1),
              box-shadow .24s ease, border-color .2s ease,
              filter .2s ease, color .2s ease;
}
.rozel-desktop-continue:hover,
.rozel-entry-choice:hover,
.rozel-auth-submit:not(:disabled):hover,
.rozel-guest-confirm-actions button:hover {
  transform: translateY(-2px);
}
.rozel-entry-choice:active,
.rozel-desktop-continue:active,
.rozel-auth-submit:active,
.rozel-guest-confirm-actions button:active {
  transform: translateY(0) scale(.985);
}
.rozel-auth-link:hover,
.rozel-auth-back:hover { color: #ffd5e6; }
.rozel-auth-field input { transition: border-color .2s ease, box-shadow .22s ease, background .2s ease; }
.rozel-auth-submit:disabled::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 9px;
  vertical-align: -2px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rozelSpin .72s linear infinite;
}

/* Guest confirmation overlay and card enter/exit smoothly. */
#rozelGuestConfirm.show { animation: rozelOverlayIn .22s ease both; }
#rozelGuestConfirm.show .rozel-guest-confirm-card {
  animation: rozelDialogPop .3s cubic-bezier(.2,.72,.2,1) both;
}
#rozelGuestConfirm.is-closing { animation: rozelOverlayOut .16s ease both; pointer-events: none; }
#rozelGuestConfirm.is-closing .rozel-guest-confirm-card { animation: rozelFadeOut .15s ease both; }
.rozel-guest-confirm-card { transition: border-color .2s ease, box-shadow .2s ease; }

/* Only the desktop backdrop animates into its intentionally blurred state.
   Mobile sharp-image overrides above remain authoritative. */
@media (min-width: 900px) {
  #rozelEntryGate::before {
    opacity: 0;
    transform: scale(1.12);
    transition: opacity .85s ease, filter .85s ease, transform .95s cubic-bezier(.2,.72,.2,1);
  }
  #rozelEntryGate.rozel-desktop-welcome-active::before {
    animation: rozelBackdropReveal .9s cubic-bezier(.2,.72,.2,1) both;
  }
}

@media (hover: none) {
  .rozel-entry-choice:hover,
  .rozel-desktop-continue:hover,
  .rozel-auth-submit:hover,
  .rozel-guest-confirm-actions button:hover { transform: none; }
  .rozel-entry-choice::before { display: none; }
}

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


/* ROZEL AI — Advanced Settings layer */
#rozelSettingsOverlay,
#rozelSettingsOverlay * { box-sizing: border-box; }

#rozelSettingsOverlay {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, .76);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
  color: #f5f5f7;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#rozelSettingsOverlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
#rozelSettingsOverlay[hidden] { display: none !important; }

.rozel-settings-shell {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  width: min(920px, 100%);
  height: min(690px, calc(100dvh - 44px));
  min-height: 460px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 24px;
  background:
    radial-gradient(650px 300px at 100% 0%, rgba(138,30,73,.12), transparent 60%),
    linear-gradient(145deg, #111115, #08080b 70%);
  box-shadow: 0 35px 100px rgba(0,0,0,.65), 0 0 55px rgba(138,30,73,.09);
  transform: translateY(12px) scale(.985);
  transition: transform .24s cubic-bezier(.2,.72,.2,1);
}
#rozelSettingsOverlay.is-open .rozel-settings-shell { transform: translateY(0) scale(1); }

.rozel-settings-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 23px 14px 16px;
  border-right: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.018);
}
.rozel-settings-brand {
  padding: 2px 12px 22px;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .19em;
}
.rozel-settings-brand span {
  display: block;
  margin-top: 6px;
  color: #8d8992;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .16em;
}
.rozel-settings-nav { display: grid; gap: 6px; }
.rozel-settings-nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #a9a6af;
  text-align: left;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: .18s ease;
}
.rozel-settings-nav button:hover {
  background: rgba(255,255,255,.045);
  color: #fff;
}
.rozel-settings-nav button[aria-selected="true"] {
  border-color: rgba(213,45,120,.2);
  background: linear-gradient(100deg, rgba(138,30,73,.25), rgba(138,30,73,.07));
  color: #ffdce9;
}
.rozel-settings-nav .nav-icon {
  display: inline-grid;
  width: 19px;
  place-items: center;
  color: #e77cab;
  font-size: 14px;
}
.rozel-settings-sidebar-foot {
  margin-top: auto;
  padding: 14px 12px 0;
  color: #77737d;
  font-size: 10px;
  line-height: 1.55;
}

.rozel-settings-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.rozel-settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 25px 29px 19px;
  border-bottom: 1px solid rgba(255,255,255,.075);
}
.rozel-settings-eyebrow {
  margin: 0 0 6px;
  color: #d66b98;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.rozel-settings-header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(20px, 3vw, 25px);
  font-weight: 760;
  letter-spacing: -.045em;
}
.rozel-settings-header p {
  margin: 7px 0 0;
  color: #918d98;
  font-size: 11px;
  line-height: 1.5;
}
.rozel-settings-close {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 11px;
  background: rgba(255,255,255,.04);
  color: #d8d5dc;
  font-size: 19px;
  cursor: pointer;
}
.rozel-settings-close:hover { background: rgba(255,255,255,.1); color: #fff; }
.rozel-settings-content { min-height: 0; overflow: auto; padding: 25px 29px 30px; }
.rozel-settings-page { display: none; max-width: 660px; }
.rozel-settings-page.is-active { display: block; animation: rozelSettingsFade .2s ease both; }
@keyframes rozelSettingsFade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.rozel-settings-section-title {
  margin: 0 0 5px;
  color: #fff;
  font-size: 14px;
  font-weight: 750;
}
.rozel-settings-section-description {
  margin: 0 0 18px;
  color: #898590;
  font-size: 11px;
  line-height: 1.65;
}
.rozel-settings-card {
  margin: 0 0 14px;
  padding: 17px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 15px;
  background: rgba(255,255,255,.027);
}
.rozel-settings-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.rozel-settings-card h4 { margin: 0; color: #f1eff3; font-size: 12px; font-weight: 720; }
.rozel-settings-card p { margin: 5px 0 0; color: #898590; font-size: 10px; line-height: 1.6; }
.rozel-settings-field { display: grid; gap: 7px; margin-top: 15px; }
.rozel-settings-field label,
.rozel-settings-label { color: #c6c2cb; font-size: 11px; font-weight: 650; }
.rozel-settings-field input:not([type="checkbox"]):not([type="color"]),
.rozel-settings-field select {
  width: 100%;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 10px;
  outline: none;
  background: #111116;
  color: #f4f2f6;
  font: inherit;
  font-size: 12px;
}
.rozel-settings-field input:focus,
.rozel-settings-field select:focus { border-color: rgba(222,92,146,.65); box-shadow: 0 0 0 3px rgba(190,38,104,.13); }
.rozel-settings-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rozel-settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 10px;
  background: rgba(255,255,255,.055);
  color: #f3f0f4;
  font-size: 11px;
  font-weight: 720;
  cursor: pointer;
  transition: .18s ease;
}
.rozel-settings-btn:hover { border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.09); }
.rozel-settings-btn.primary {
  border-color: rgba(210,66,127,.42);
  background: linear-gradient(135deg, #9e1e58, #681337);
  color: white;
  box-shadow: 0 7px 22px rgba(138,30,73,.19);
}
.rozel-settings-btn.danger { border-color: rgba(255,93,111,.22); background: rgba(145,32,48,.12); color: #ff9ca8; }
.rozel-settings-btn:disabled { opacity: .55; cursor: not-allowed; }
.rozel-settings-note { margin-top: 10px !important; color: #77737d !important; font-size: 10px !important; }
.rozel-settings-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(223,105,154,.22);
  border-radius: 30px;
  background: rgba(138,30,73,.13);
  color: #efa0bf;
  font-size: 9px;
  font-weight: 750;
}
.rozel-settings-profile {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 17px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.rozel-settings-avatar {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(231,124,171,.28);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(194,44,105,.3), rgba(74,18,43,.45));
  color: #ffd8e8;
  font-size: 19px;
  font-weight: 800;
}
.rozel-settings-profile strong { display: block; color: #fff; font-size: 13px; }
.rozel-settings-profile span { display: block; margin-top: 4px; color: #8d8993; font-size: 10px; overflow-wrap: anywhere; }
.rozel-settings-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.rozel-settings-swatch {
  width: 31px;
  height: 31px;
  padding: 0;
  border: 2px solid rgba(255,255,255,.16);
  border-radius: 50%;
  outline: 2px solid transparent;
  outline-offset: 2px;
  cursor: pointer;
}
.rozel-settings-swatch[aria-pressed="true"] { outline-color: #f1b0ca; }
.rozel-settings-color-input { width: 42px; height: 35px; padding: 2px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; background: #17171d; cursor: pointer; }
.rozel-settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  border-bottom: 1px solid rgba(255,255,255,.055);
}
.rozel-settings-toggle-row:last-child { border-bottom: 0; }
.rozel-settings-toggle-copy strong { display: block; color: #e9e6ed; font-size: 11px; font-weight: 700; }
.rozel-settings-toggle-copy small { display: block; margin-top: 4px; color: #85818b; font-size: 10px; line-height: 1.45; }
.rozel-settings-switch { position: relative; flex: 0 0 39px; width: 39px; height: 22px; }
.rozel-settings-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rozel-settings-switch span { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 30px; background: #303038; cursor: pointer; transition: .18s; }
.rozel-settings-switch span::before { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #dedbe2; transition: .18s; }
.rozel-settings-switch input:checked + span { border-color: #a12b60; background: #8a1e49; }
.rozel-settings-switch input:checked + span::before { transform: translateX(17px); background: #fff; }
.rozel-settings-switch input:focus-visible + span { outline: 2px solid #f2a4c4; outline-offset: 3px; }
.rozel-settings-footer { margin-top: 20px; color: #6f6c75; font-size: 9px; line-height: 1.6; }

/* Keep the gear usable at the far-right edge of the existing New Chat control. */
.settings-btn#rozelSettingsOpen { z-index: 5; }
.settings-btn#rozelSettingsOpen:focus-visible { outline: 2px solid #e77cab; outline-offset: 2px; border-radius: 13px; }

html.rozel-reduce-motion *,
html.rozel-reduce-motion *::before,
html.rozel-reduce-motion *::after {
  scroll-behavior: auto !important;
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
}

@media (max-width: 700px) {
  #rozelSettingsOverlay { align-items: flex-end; padding: 0; }
  .rozel-settings-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: min(92dvh, 850px);
    min-height: 0;
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
  }
  .rozel-settings-sidebar {
    order: 2;
    padding: 9px 10px max(10px, env(safe-area-inset-bottom));
    border-right: 0;
    border-top: 1px solid rgba(255,255,255,.08);
    background: #0b0b0f;
  }
  .rozel-settings-brand, .rozel-settings-sidebar-foot { display: none; }
  .rozel-settings-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .rozel-settings-nav::-webkit-scrollbar { display: none; }
  .rozel-settings-nav button { flex: 0 0 auto; min-width: 68px; min-height: 53px; flex-direction: column; justify-content: center; gap: 3px; padding: 6px 8px; font-size: 9px; }
  .rozel-settings-nav .nav-icon { font-size: 15px; }
  .rozel-settings-main { order: 1; min-height: 0; }
  .rozel-settings-header { padding: 19px 19px 15px; }
  .rozel-settings-content { padding: 19px 18px 22px; }
}
@media (max-width: 380px) {
  .rozel-settings-nav button { min-width: 58px; padding-inline: 5px; }
  .rozel-settings-nav button span:last-child { font-size: 8px; }
  .rozel-settings-card { padding: 14px; }
}
