.ocsee-auth-dialog {
  position: fixed;
  inset: 0;
  width: min(480px, calc(100vw - 48px));
  max-width: none;
  max-height: min(760px, calc(100dvh - 40px));
  margin: auto clamp(24px, 5vw, 72px) auto auto;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y;
  color: #201d1c;
  background: #f9f6f1;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(35, 20, 27, .18);
  font-family: Inter, Arial, sans-serif;
  user-select: text;
  animation: ocsee-auth-enter .42s cubic-bezier(.22, 1, .36, 1) both;
}
.ocsee-auth-dialog::backdrop {
  background: rgba(37, 23, 30, .16);
  backdrop-filter: blur(1px) saturate(.94);
  animation: ocsee-auth-dim .34s ease-out both;
}
.ocsee-auth-dialog[open] { display: block; }
.ocsee-auth-dialog[data-mode=register] { width: min(620px, calc(100vw - 48px)); max-height: min(790px, calc(100dvh - 32px)); }
.ocsee-auth-symbols { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.ocsee-auth-frame { position: relative; max-height: inherit; padding: 36px 42px 34px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; scrollbar-color: #b9afa6 transparent; scrollbar-width: thin; }
.ocsee-auth-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #97124e 50%, transparent);
  opacity: 0;
  pointer-events: none;
  animation: ocsee-auth-glint .65s ease-out both;
}
.ocsee-auth-close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #5d5652;
  font: 24px/1 Inter, Arial, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ocsee-auth-close:hover { background: rgba(151, 18, 78, .07); color: #97124e; }
.ocsee-auth-brand { position: relative; display: flex; align-items: center; height: 36px; }
.ocsee-auth-brand img { display: block; width: 36px; height: 36px; }
.ocsee-auth-dialog h2 { position: relative; margin: 28px 0 26px; font-size: 34px; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.ocsee-auth-dialog[data-mode=register] .ocsee-auth-heading { display: flex; align-items: center; gap: 10px; margin: 0 48px 20px 0; }
.ocsee-auth-dialog[data-mode=register] .ocsee-auth-brand { flex: none; width: 34px; height: 34px; }
.ocsee-auth-dialog[data-mode=register] .ocsee-auth-brand img { width: 34px; height: 34px; }
.ocsee-auth-dialog[data-mode=register] h2 { min-width: 0; margin: 0; font-size: 30px; }
.ocsee-auth-dialog form[hidden], .ocsee-auth-dialog fieldset[hidden], .ocsee-auth-dialog [hidden] { display: none !important; }
.ocsee-auth-dialog form:not([hidden]) { position: relative; animation: ocsee-auth-form-enter .3s ease-out both; }
.ocsee-auth-dialog fieldset { display: grid; gap: 18px; min-width: 0; margin: 0; padding: 0; border: 0; }
#ocsee-register-form fieldset { gap: 14px; }
#ocsee-register-form .ocsee-auth-field input:not([type=checkbox]) { height: 48px; }
.ocsee-auth-section { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; color: #756b65; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.ocsee-auth-section::after { content: ''; height: 1px; flex: 1; background: #ded6cd; }
.ocsee-auth-section-security { margin-top: 22px; }
.ocsee-auth-field { display: grid; gap: 7px; min-width: 0; color: #4c4541; font-size: 12px; font-weight: 700; line-height: 1.3; letter-spacing: .005em; }
.ocsee-auth-input-wrap { position: relative; display: block; }
.ocsee-auth-field-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: #746a64;
  pointer-events: none;
  transition: color .18s ease;
}
.ocsee-auth-input-wrap:focus-within .ocsee-auth-field-icon { color: #97124e; }
.ocsee-auth-field input:not([type=checkbox]) {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 14px 0 45px;
  border: 1px solid #d8d0c8;
  border-radius: 10px;
  outline: none;
  background: #fdfbf8;
  color: #201d1c;
  font: 400 15px/1.3 Inter, Arial, sans-serif;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ocsee-auth-field input:not([type=checkbox]):focus {
  border-color: #97124e;
  box-shadow: 0 0 0 3px rgba(151, 18, 78, .09);
}
.ocsee-auth-field input::placeholder { color: #6d645d; opacity: 1; }
.ocsee-auth-has-reveal input { padding-right: 54px !important; }
.ocsee-auth-reveal {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #766f69;
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}
.ocsee-auth-reveal:hover { color: #97124e; background: rgba(151, 18, 78, .07); }
.ocsee-auth-reveal svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ocsee-auth-agreement { display: flex; align-items: flex-start; gap: 9px; margin: 20px 0 0; color: #59514d; font-size: 12px; line-height: 1.45; }
.ocsee-auth-agreement input { width: 16px; height: 16px; margin-top: 1px; flex: none; accent-color: #97124e; cursor: pointer; }
.ocsee-auth-agreement a { color: #97124e; text-underline-offset: 3px; }
.ocsee-auth-error { min-height: 20px; margin: 12px 0 0; color: #a31542; font-size: 13px; line-height: 1.45; animation: ocsee-auth-message-enter .18s ease-out both; }
.ocsee-auth-submit, .ocsee-auth-next {
  width: 100%;
  min-height: 50px;
  margin-top: 16px;
  border: 0;
  border-radius: 10px;
  background: #97124e;
  color: #fff;
  font: 700 13px Inter, Arial, sans-serif;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.ocsee-auth-submit:hover, .ocsee-auth-next:hover { background: #7d103f; transform: translateY(-1px); }
.ocsee-auth-submit:disabled { opacity: .65; cursor: wait; transform: none; }
.ocsee-auth-dialog form[aria-busy=true] .ocsee-auth-submit::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 9px; vertical-align: -2px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: ocsee-auth-spin .7s linear infinite; }
.ocsee-auth-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 0; padding-top: 18px; border-top: 1px solid #e5ddd5; color: #645c57; text-align: left; font-size: 12px; }
.ocsee-auth-switch button, .ocsee-auth-back {
  padding: 4px 0;
  border: 0;
  background: none;
  color: #97124e;
  font: 700 13px Inter, Arial, sans-serif;
  cursor: pointer;
}
.ocsee-auth-step { display: flex; align-items: center; gap: 12px; margin: 0 0 24px; color: #746b65; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ocsee-auth-step::after { content: ''; height: 1px; flex: 1; background: #d8d0c7; }
.ocsee-auth-actions-row { display: flex; align-items: center; gap: 10px; }
.ocsee-auth-actions-row .ocsee-auth-back { min-width: 62px; margin-top: 14px; text-align: left; }
@media (min-width: 601px) {
  #ocsee-register-form fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  #ocsee-register-step2 .ocsee-auth-field:last-child { grid-column: 1 / -1; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-frame { padding: 30px 36px 28px; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-heading { margin-bottom: 20px; }
}
.ocsee-auth-dialog button:focus-visible, .ocsee-auth-dialog a:focus-visible { outline: 3px solid #97124e; outline-offset: 3px; }
@keyframes ocsee-auth-enter { from { opacity: 0; clip-path: inset(0 8% 0 8% round 16px); filter: blur(5px); } to { opacity: 1; clip-path: inset(0 0 0 0 round 16px); filter: blur(0); } }
@keyframes ocsee-auth-dim { from { background: rgba(37, 23, 30, 0); backdrop-filter: blur(0); } to { background: rgba(37, 23, 30, .16); backdrop-filter: blur(1px) saturate(.94); } }
@keyframes ocsee-auth-glint { 0% { opacity: 0; transform: scaleX(0); } 35% { opacity: .7; } 70% { opacity: .7; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1); } }
@keyframes ocsee-auth-form-enter { from { opacity: .25; filter: blur(4px); } to { opacity: 1; filter: blur(0); } }
@keyframes ocsee-auth-message-enter { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ocsee-auth-spin { to { transform: rotate(360deg); } }
@media (max-width: 900px) { .ocsee-auth-dialog { margin: auto; } }
@media (max-width: 600px) {
  .ocsee-auth-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  .ocsee-auth-frame { padding: 28px 24px 27px; }
  .ocsee-auth-field input:not([type=checkbox]) { font-size: 16px; }
  .ocsee-auth-dialog h2 { margin: 24px 0 24px; font-size: 30px; }
  .ocsee-auth-dialog[data-mode=register] { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-close { top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-frame { height: 100%; min-height: 0; padding: max(24px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom)); }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-section { margin-bottom: 12px; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-section-security { margin-top: 20px; }
  .ocsee-auth-dialog[data-mode=register] #ocsee-register-form fieldset { gap: 12px; }
}
@media (max-width: 360px) { .ocsee-auth-frame { padding-right: 19px; padding-left: 19px; } .ocsee-auth-dialog[data-mode=register] .ocsee-auth-frame { padding-right: 19px; padding-left: 19px; } }
@media (max-width: 360px) and (max-height: 650px) {
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-frame { padding-top: 20px; }
  .ocsee-auth-dialog h2 { margin: 18px 0 20px; font-size: 28px; }
  .ocsee-auth-step { margin-bottom: 18px; }
  .ocsee-auth-dialog fieldset { gap: 12px; }
  .ocsee-auth-field input:not([type=checkbox]) { height: 46px; }
  .ocsee-auth-submit, .ocsee-auth-next { min-height: 46px; margin-top: 12px; }
  .ocsee-auth-switch { margin-top: 16px; padding-top: 12px; }
}
@media (max-width: 600px) {
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-frame { display: flex; flex-direction: column; padding: max(12px, env(safe-area-inset-top)) 18px max(12px, env(safe-area-inset-bottom)); }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-heading { flex: none; gap: 9px; margin: auto 44px 13px 0; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-brand { width: 28px; height: 28px; margin: 0; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-brand img { width: 28px; height: 28px; }
  .ocsee-auth-dialog[data-mode=register] h2 { flex: 1; margin: 0; font-size: clamp(20px, 5.5vw, 25px); line-height: 1.08; }
  .ocsee-auth-dialog[data-mode=register] #ocsee-register-form { flex: none; width: 100%; margin-bottom: auto; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-section { display: none; }
  .ocsee-auth-dialog[data-mode=register] #ocsee-register-form fieldset { gap: 6px; }
  .ocsee-auth-dialog[data-mode=register] #ocsee-register-step2 { margin-top: 6px; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-field { display: block; font-size: 0; line-height: 0; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-field input:not([type=checkbox]) { height: 48px; font-size: 16px; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-field input::placeholder { font-size: 14px; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-agreement { margin-top: 12px; font-size: 11px; line-height: 1.4; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-submit { min-height: 48px; margin-top: 12px; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-switch { justify-content: center; margin-top: 12px; padding: 0; border: 0; font-size: 0; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-switch button { min-height: 32px; font-size: 12px; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-close { top: calc(8px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); }
}
@media (max-width: 360px) {
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-frame { padding-right: 16px; padding-left: 16px; }
  .ocsee-auth-dialog[data-mode=register] h2 { font-size: 20px; }
  .ocsee-auth-dialog[data-mode=register] #ocsee-register-form fieldset { gap: 5px; }
  .ocsee-auth-dialog[data-mode=register] #ocsee-register-step2 { margin-top: 5px; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-field input:not([type=checkbox]) { height: 46px; }
}
@media (max-width: 600px) and (max-height: 620px) {
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-frame { padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-heading { margin-bottom: 9px; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-brand { display: flex; width: 24px; height: 24px; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-brand img { width: 24px; height: 24px; }
  .ocsee-auth-dialog[data-mode=register] h2 { font-size: 20px; }
  .ocsee-auth-dialog[data-mode=register] #ocsee-register-form fieldset { gap: 3px; }
  .ocsee-auth-dialog[data-mode=register] #ocsee-register-step2 { margin-top: 3px; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-field input:not([type=checkbox]) { height: 42px; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-agreement { margin-top: 8px; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-submit { min-height: 44px; margin-top: 8px; }
  .ocsee-auth-dialog[data-mode=register] .ocsee-auth-switch { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { .ocsee-auth-dialog, .ocsee-auth-dialog::backdrop, .ocsee-auth-frame::before, .ocsee-auth-dialog form, .ocsee-auth-dialog fieldset, .ocsee-auth-error, .ocsee-auth-dialog form[aria-busy=true] .ocsee-auth-submit::before { animation: none; } .ocsee-auth-field input, .ocsee-auth-field-icon, .ocsee-auth-reveal, .ocsee-auth-submit, .ocsee-auth-next { transition: none; } }

/* Read the current agreement inside the account dialog, keeping the form intact. */
.ocsee-auth-dialog[data-view=agreement]{width:min(680px,calc(100vw - 32px));height:min(760px,calc(100dvh - 32px));max-height:none;margin:auto}
.ocsee-auth-dialog[data-view=agreement]>.ocsee-auth-frame,
.ocsee-auth-dialog[data-view=agreement]>.ocsee-auth-close{display:none!important}
.ocsee-agreement-view{display:flex;flex-direction:column;height:100%;min-height:0;background:#f9f6f1}
.ocsee-agreement-header{display:flex;align-items:center;gap:10px;flex:none;min-height:72px;padding:12px 22px;border-bottom:1px solid #e5ddd5}
.ocsee-agreement-header button{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:10px;background:transparent;color:#5d5652;cursor:pointer;touch-action:manipulation}
.ocsee-agreement-header button:hover{background:rgba(151,18,78,.07);color:#97124e}
.ocsee-auth-dialog .ocsee-agreement-header h2{min-width:0;margin:0;font-size:21px;line-height:1.25;letter-spacing:-.02em;overflow-wrap:anywhere}
.ocsee-agreement-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:22px 32px 34px;color:#514a47;font-size:15px;line-height:1.7;scrollbar-color:#b9afa6 transparent;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.ocsee-agreement-scroll:focus-visible{outline:2px solid #97124e;outline-offset:-3px}
.ocsee-agreement-content{max-width:68ch;margin:0 auto;overflow-wrap:anywhere}
.ocsee-agreement-content p,.ocsee-agreement-content ul,.ocsee-agreement-content ol,.ocsee-agreement-content blockquote{margin:0 0 1em}
.ocsee-agreement-content li{margin:0 0 .35em}
.ocsee-agreement-content h2,.ocsee-agreement-content h3,.ocsee-agreement-content h4{margin:1.4em 0 .5em;color:#201d1c;font-size:1.15em;line-height:1.3}
.ocsee-agreement-content a{color:#97124e;text-underline-offset:3px}
.ocsee-agreement-content>*:last-child{margin-bottom:0}
.ocsee-agreement-error{max-width:68ch;margin:0 auto;color:#a31542}
.ocsee-agreement-error p{margin:0 0 14px}
.ocsee-agreement-error button{min-height:44px;padding:0 18px;border:0;border-radius:10px;background:#97124e;color:#fff;font:700 13px Inter,Arial,sans-serif;cursor:pointer}
#ocsee-agreement-status{max-width:68ch;margin:0 auto;color:#645c57}
@media(max-width:600px){.ocsee-auth-dialog[data-view=agreement]{width:calc(100vw - 24px);height:calc(100dvh - 24px)}.ocsee-agreement-header{min-height:66px;padding:10px 16px}.ocsee-auth-dialog .ocsee-agreement-header h2{font-size:19px}.ocsee-agreement-scroll{padding:18px 22px 28px;font-size:14px}}
@media(max-width:360px){.ocsee-agreement-scroll{padding-right:17px;padding-left:17px}}

/* Existing-session checks use the account dialog without credential fields. */
.ocsee-session-check #ocsee-session-status,
.ocsee-session-check .ocsee-auth-error { margin: 0; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.ocsee-session-check .ocsee-auth-submit { font-size: 14px; }
