/* CRYOTALE R18 — DESKTOP AUTH COMPOSITION ONLY.
 * Use the user's approved logo art, keep R17 Shuangyin background and bottom-left four feature tiles.
 * No mobile alteration, no changes to auth scripts, input ids or network behavior.
 */
@media (min-width:851px) {
  /* Top left: crop-based logo taken from supplied brand artwork, no repeated subtitle below. */
  #auth-view .intro-panel .brand {
    position:absolute;z-index:6;
    top:clamp(16px,2.7vh,34px);left:clamp(15px,2.1vw,42px);
    right:auto;transform:none;margin:0;padding:0;
    display:block;width:clamp(200px,16.1vw,302px);height:clamp(80px,6.4vw,112px);
    background:url('/static/cryo_login_r18_v1/cryo-r18-brand.png?v=20261107-r18-logo01') center / contain no-repeat;
    filter:brightness(1.30) contrast(1.12) drop-shadow(0 2px 5px rgba(1,12,35,.75)) drop-shadow(0 0 13px rgba(95,202,255,.38));
    mix-blend-mode:screen;
    border:0;line-height:0;font-size:0;pointer-events:none;
  }
  #auth-view .intro-panel .brand > span {opacity:0!important;pointer-events:none}
  /* Leave bottom-left four-feature box completely intact; remove only redundant hero copy. */
  #auth-view .intro-content > .eyebrow,
  #auth-view .intro-content > h1,
  #auth-view .intro-content > p {display:none!important}

  /* Compact glass card in the right-hand clear sky, with welcome line floating above. */
  #auth-view .auth-panel,
  #auth-view:has(#register-tab.active) .auth-panel {
    position:absolute;display:flex;flex-direction:column;align-items:stretch;
    top:52%;bottom:auto;left:auto;
    right:clamp(27px,5.5vw,125px);
    width:clamp(310px,25.8vw,395px);max-width:calc(100vw - 34px);
    height:auto;min-height:0;margin:0;padding:0;
    transform:translateY(-50%) rotate(-.65deg);transform-origin:center;
    overflow:visible;z-index:5;
  }
  #auth-view .cryo-r18-welcome {
    position:relative;z-index:2;display:flex;flex-direction:column;
    align-items:center;justify-content:center;gap:0;
    width:calc(100% + 30px);margin:0 -15px clamp(12px,2vh,21px);
    padding:5px 5px 8px;
    font-family:'STKaiti','KaiTi','Kaiti SC','Noto Serif CJK SC','Songti SC','SimSun',serif;
    font-size:clamp(28px,2.18vw,39px);font-weight:700;letter-spacing:.045em;
    line-height:1.22;text-align:center;white-space:nowrap;
    color:#f2faff;
    text-shadow:0 2px 5px rgba(4,24,66,.82),0 0 16px rgba(95,205,255,.60);
  }
  #auth-view .cryo-r18-welcome > span:last-child {
    display:block;background:none!important;
    color:#f1faff!important;-webkit-text-fill-color:#f1faff;
    text-shadow:0 1px 2px rgba(0,24,63,.88),0 0 8px rgba(145,224,255,.7),0 0 27px rgba(66,165,255,.53);
    filter:none;
  }
  #auth-view .cryo-r18-welcome-mark {
    position:relative;font:400 21px/1 'Segoe UI Symbol','Noto Sans Symbols 2',sans-serif;
    margin:0 auto -1px;color:#b3eaff;text-shadow:0 0 11px #45bfff;
  }
  #auth-view .cryo-r18-welcome::before,
  #auth-view .cryo-r18-welcome::after {
    content:"";position:absolute;top:58%;width:34px;height:12px;
    border-top:1.5px solid rgba(205,238,255,.88);border-radius:85% 85% 0 0;
    box-shadow:0 -3px 8px rgba(56,169,255,.28);pointer-events:none;
  }
  #auth-view .cryo-r18-welcome::before {left:0;transform:rotate(-15deg)}
  #auth-view .cryo-r18-welcome::after {right:0;transform:rotate(15deg)}

  #auth-view .auth-box {
    flex:0 1 auto;align-self:stretch;
    width:100%;height:auto;min-height:0;max-height:min(72dvh,690px);
    padding:clamp(15px,1.35vw,23px) clamp(17px,1.75vw,27px) clamp(13px,1.4vw,19px);
    margin:0;overflow-y:auto;overscroll-behavior:contain;
    border:1.2px solid rgba(173,234,255,.87);border-radius:18px;
    background:linear-gradient(140deg,rgba(7,25,55,.13),rgba(3,16,45,.105) 57%,rgba(4,17,47,.14));
    backdrop-filter:blur(1.35px) brightness(.73);
    -webkit-backdrop-filter:blur(1.35px) brightness(.73);
    box-shadow:0 0 0 1px rgba(78,186,252,.13),inset 0 1px 0 rgba(225,251,255,.28),
      inset 0 0 20px rgba(72,172,234,.05),0 0 17px rgba(63,190,255,.49),0 0 35px rgba(50,114,255,.15),0 11px 30px rgba(5,14,41,.18);
  }
  #auth-view .auth-box::before {height:2px;background:linear-gradient(90deg,transparent 7%,#98e7ff 41%,#d1f9ff 52%,#70c4ff 75%,transparent 95%);box-shadow:0 0 13px #5db9ffad}
  #auth-view .auth-box::after {font-size:17px;right:13px;top:6px}
  #auth-view .auth-panel .tabs {margin:0 0 clamp(10px,1.8vh,17px);padding:0 2px 7px;gap:5px}
  #auth-view .auth-panel .tab {min-height:40px;padding:6px 8px;font-size:13px;letter-spacing:.03em;border-radius:9px}
  #auth-view .auth-panel .auth-form {gap:2px}
  #auth-view .auth-panel .auth-form label,
  #auth-view .auth-panel .cryo-secure-row label,
  #auth-view .auth-panel #invite-row label {font-size:11px;margin:4px 0 1px}
  #auth-view .auth-panel .auth-form input,
  #auth-view .auth-panel .cryo-secure-row input,
  #auth-view .auth-panel #invite-row input {
    height:42px;min-height:42px;padding:7px 12px;border-radius:8px;
    background:rgba(8,25,56,.29);border:1px solid rgba(152,218,252,.65);
    box-shadow:inset 0 1px 0 rgba(229,248,255,.07);
    font-size:13px;
  }
  #auth-view .auth-panel .primary-btn {
    min-height:45px;margin-top:clamp(11px,1.7vh,17px);border-radius:9px;
    font-size:14px;letter-spacing:.035em;
    box-shadow:0 0 13px rgba(95,216,255,.48),0 5px 18px rgba(46,132,235,.18),inset 0 1px 0 #fff9;
  }
  #auth-view .auth-panel .cryo-action-tools {margin:clamp(9px,1.8vh,16px) auto 1px;gap:8px 13px}
  #auth-view .auth-panel .cryo-link-button {font-size:11px}
  #auth-view .auth-panel .cryo-secure-row {max-width:100%}
}
/* A shorter desktop gets its own safe compact spacing: register / email actions scroll within the box. */
@media (min-width:851px) and (max-height:690px) {
  #auth-view .auth-panel,#auth-view:has(#register-tab.active) .auth-panel {top:51%;width:clamp(295px,24.5vw,365px)}
  #auth-view .cryo-r18-welcome {font-size:clamp(25px,2.1vw,33px);margin-bottom:7px}
  #auth-view .cryo-r18-welcome-mark {font-size:15px}
  #auth-view .auth-box {max-height:calc(100dvh - 103px);padding-top:11px;padding-bottom:9px}
  #auth-view .auth-panel .tabs {margin-bottom:8px}
}
@media (min-width:851px) and (max-width:1090px) {
  #auth-view .auth-panel,#auth-view:has(#register-tab.active) .auth-panel {right:25px;width:318px}
  #auth-view .cryo-r18-welcome {font-size:27px;width:100%;margin-left:0;margin-right:0}
  #auth-view .cryo-r18-welcome::before,#auth-view .cryo-r18-welcome::after {width:14px}
  #auth-view .intro-panel .brand {width:210px;height:90px}
}
/* Mobile styling deliberately unchanged until a separate portrait-screen redesign is approved. */
@media (max-width:850px) {#auth-view .cryo-r18-welcome {display:none!important}}
