/* Moonlight's quiet entrance is separate from the live-world HUD. */
.sea-entrance { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; overflow: auto; overscroll-behavior: contain; background: #10243b; color: #f8f7f3; isolation: isolate; }
.sea-entrance::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 78% 38%,#1e345d 0,transparent 60%); pointer-events: none; }
.sea-entrance-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: min(1184px,100%); margin-inline: auto; padding: max(24px,env(safe-area-inset-top)) 32px 16px; }
.sea-entrance-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 650; letter-spacing: -.045em; white-space: nowrap; }
.sea-entrance-brand img { display: block; width: 40px; height: 40px; }
.sea-entrance-parent { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: #bac9df; font-size: 12px; text-decoration: none; white-space: nowrap; }
.sea-entrance-parent img { width: 24px; height: 24px; border-radius: 7px; }
.sea-entrance-parent:hover { color: #fff; }
.sea-entrance-main { display: grid; grid-template-columns: 1fr 1.08fr; align-items: center; gap: 24px; flex: 1; width: min(1120px,100%); margin-inline: auto; padding: 32px 32px 56px; }
.sea-entrance-art { grid-column: 2; grid-row: 1; width: 100%; max-width: 560px; justify-self: end; }
.sea-entrance-art img { display: block; width: 100%; height: auto; }
.sea-entrance-preview { margin:0; position:relative; }
.sea-entrance-preview img { aspect-ratio:8/5; object-fit:cover; border-radius:24px; border:1px solid #c4d4ff38; box-shadow:0 18px 60px #06122538; }
.sea-entrance-preview figcaption { margin-top:10px; color:#bac9df; font-size:12px; line-height:1.5; }
.sea-first-step .sea-first-step-copy { margin:6px 0 0; font-size:13px; font-weight:400; line-height:1.6; word-break:keep-all; }
.sea-entrance-copy { grid-column: 1; grid-row: 1; position: relative; z-index: 1; }
.sea-entrance-eyebrow { margin-bottom: 18px; color: #b7c9e2; font-size: 13px; letter-spacing: .02em; }
.sea-entrance-title { font-size: clamp(36px,3.6vw,48px); font-weight: 600; line-height: 1.3; letter-spacing: -.055em; }
.sea-entrance-title span { display: block; }
.sea-entrance-description { margin-top: 22px; color: #c4cede; font-size: 15px; line-height: 1.9; word-break: keep-all; }
.sea-entrance-description span { display: block; }
.sea-entrance-enter { display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; width: min(100%,312px); min-height: 56px; margin-top: 32px; padding: 15px 20px; border: 1px solid #739aff55; border-radius: 17px; background: #1755e8; color: #fff; box-shadow: 0 8px 28px #04163040,inset 0 1px 0 #ffffff20; font-size: 15px; font-weight: 600; line-height: 1.5; }
.sea-entrance-enter:hover:enabled { background: #2866f5; }
.sea-entrance-enter:active:enabled { background: #1243bd; }
.sea-entrance-enter:disabled { opacity: .7; cursor: wait; }
.sea-entrance-enter:focus-visible,.sea-entrance a:focus-visible { outline-color: #c4d4ff; }
.sea-entrance-enter .sea-icon { width: 20px; height: 20px; }
.sea-entrance-note { margin-top: 12px; color: #a3b4cb; font-size: 12px; line-height: 1.7; }
.sea-entrance-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: min(1120px,100%); margin-inline: auto; padding: 0 32px max(24px,env(safe-area-inset-bottom)); color: #90a5c0; font-size: 12px; line-height: 1.6; }
.sea-entrance-footer p { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.sea-entrance-footer > span { color: #afbed1; white-space: nowrap; }
.sea-platform-symbol { border-radius: 0 !important; }
.sea-brand-parent { display: inline-flex; align-items: center; gap: 3px; }
.sea-brand .sea-brand-parent img { width: 12px; height: 12px; border-radius: 3px; }
.sea-loading-brand { flex-direction: column; gap: 8px; }
.sea-loading-brand > .sea-platform-symbol { width: 56px; height: 56px; }
.sea-loading-brand > span { font-size: 22px; }
.sea-loading-brand small { color: var(--sea-muted); font-size: 11px; }
.sea-loading-inner > .sea-primary { margin-top: 24px; }
.sea-loading-scene { --loading-fill: 0; width: min(240px,72vw); margin: 20px auto 12px; }
.sea-loading-scene svg { display: block; width: 100%; overflow: hidden; }
.sea-loading-symbol { position: relative; width: 92px; aspect-ratio: 1; margin: 0 auto 8px; }
.sea-loading-symbol img { position: absolute; inset: 0; display: block; }
.sea-loading-symbol img:first-child { opacity: .2; }
.sea-loading-symbol-fill { clip-path: inset(calc(100% - var(--loading-fill) * 100%) 0 0); transition: clip-path .45s ease; }
.sea-loading-wave { animation: sea-loading-tide 3s linear infinite; }
.sea-loading-wave-back { animation-duration: 4.2s; animation-direction: reverse; opacity: .8; }
.sea-loading-wave-low { animation-duration: 5s; opacity: .6; }
.sea-loading-scene[data-state="error"] .sea-loading-wave { animation-play-state: paused; }
@keyframes sea-loading-tide { to { transform: translateX(96px); } }
@media (prefers-reduced-motion: reduce) {
  .sea-loading-wave { animation: none; }
  .sea-loading-symbol-fill { transition: none; }
}
.sea-invite-brand .sea-platform-symbol { border-radius: 0; }
@media (max-width: 699px) {
  .sea-entrance-header { padding: max(14px,env(safe-area-inset-top)) 22px 0; gap: 12px; }
  .sea-entrance-brand { gap: 7px; font-size: 16px; }
  .sea-entrance-brand img { width: 32px; height: 32px; }
  .sea-entrance-parent { font-size: 11px; gap: 5px; }
  .sea-entrance-parent img { width: 22px; height: 22px; }
  .sea-entrance-main { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 0; width: 100%; max-width: 460px; padding: 0 28px 24px; }
  .sea-entrance-art { align-self: center; width: min(100%,330px); height: clamp(146px,29dvh,264px); max-width: none; margin-bottom: 4px; }
  .sea-entrance-art img { width: 100%; height: 100%; object-fit: contain; }
  .sea-entrance-preview { height:auto; margin-bottom:16px; }
  .sea-entrance-preview img { height:auto; object-fit:contain; border-radius:18px; }
  .sea-entrance-preview figcaption { margin-top:6px; font-size:11px; text-align:right; }
  .sea-entrance-eyebrow { margin-bottom: 10px; font-size: 11px; }
  .sea-entrance-title { font-size: clamp(29px,8.3vw,38px); line-height: 1.3; }
  .sea-entrance-description { margin-top: 16px; font-size: 13px; line-height: 1.8; }
  .sea-entrance-enter { width: 100%; max-width: none; min-height: 54px; margin-top: 24px; border-radius: 16px; font-size: 14px; }
  .sea-entrance-note { font-size: 11px; text-align: center; }
  .sea-entrance-footer { padding: 0 28px max(18px,env(safe-area-inset-bottom)); justify-content: center; font-size: 10px; }
  .sea-entrance-footer p { gap: 14px; }
  .sea-entrance-footer > span { display: none; }
}
@media (max-width: 699px) and (max-height: 650px) {
  .sea-entrance-header { padding-top: max(8px,env(safe-area-inset-top)); }
  .sea-entrance-main { padding-top: 0; padding-bottom: 14px; }
  .sea-entrance-art { height: 130px; margin-bottom: 0; }
  .sea-entrance-eyebrow { margin-bottom: 8px; }
  .sea-entrance-title { font-size: 29px; }
  .sea-entrance-description { margin-top: 12px; font-size: 12px; }
  .sea-entrance-enter { margin-top: 18px; }
  .sea-entrance-footer { padding-bottom: max(12px,env(safe-area-inset-bottom)); }
}
@media (min-width: 700px) and (max-height: 600px) {
  .sea-entrance-header { padding-top: 12px; }
  .sea-entrance-main { padding-block: 12px 24px; }
  .sea-entrance-art { max-width: 400px; }
  .sea-entrance-title { font-size: 34px; }
  .sea-entrance-description { margin-top: 16px; font-size: 13px; }
  .sea-entrance-enter { margin-top: 20px; }
  .sea-entrance-footer { padding-bottom: 12px; }
}

@media (orientation: landscape) and (max-height: 500px) and (max-width: 950px),
       (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  .sea-entrance, #sea-loading {
    --sea-entrance-left: max(18px, calc(12px + env(safe-area-inset-left, 0px)));
    --sea-entrance-right: max(18px, calc(12px + env(safe-area-inset-right, 0px)));
    --sea-entrance-top: max(8px, env(safe-area-inset-top, 0px));
    --sea-entrance-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }
  .sea-entrance-header {
    flex: none;
    width: min(960px, 100%);
    padding: var(--sea-entrance-top) var(--sea-entrance-right) 0 var(--sea-entrance-left);
  }
  .sea-entrance-brand { gap: 8px; font-size: 16px; }
  .sea-entrance-brand img { width: 32px; height: 32px; }
  .sea-entrance-main {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;
    justify-content: stretch;
    gap: clamp(12px, 3vw, 32px);
    flex: 1 0 auto;
    width: min(960px, 100%);
    max-width: none;
    padding: 6px var(--sea-entrance-right) var(--sea-entrance-bottom) var(--sea-entrance-left);
  }
  .sea-entrance-art {
    justify-self: center;
    width: 100%;
    max-width: 400px;
    height: clamp(128px, calc(100dvh - 66px - var(--sea-entrance-top) - var(--sea-entrance-bottom)), 326px);
    margin: 0;
  }
  .sea-entrance-art img { width: 100%; height: 100%; object-fit: contain; }
  .sea-entrance-preview { height:auto; margin:0; }
  .sea-entrance-preview img { height:auto; object-fit:contain; }
  .sea-entrance-copy { min-width: 0; }
  .sea-entrance-eyebrow { margin-bottom: 8px; font-size: 12px; }
  .sea-entrance-title { font-size: clamp(26px, 4.8vw, 36px); line-height: 1.23; }
  .sea-entrance-description { margin-top: 10px; font-size: 13px; line-height: 1.6; }
  .sea-entrance-enter {
    gap: 12px;
    width: min(100%, 264px);
    min-height: 48px;
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 15px;
    font-size: 14px;
    text-align: left;
  }
  .sea-entrance-enter .sea-icon { flex: 0 0 20px; }
  .sea-entrance-note { margin-top: 6px; font-size: 11px; text-align: start; }
  .sea-entrance-footer { display: none; }

  #sea-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: auto;
    overscroll-behavior: contain;
    padding: var(--sea-entrance-top) var(--sea-entrance-right) var(--sea-entrance-bottom) var(--sea-entrance-left);
  }
  .sea-loading-inner { flex: none; width: min(100%, 420px); max-width: none; margin-block: auto; }
  .sea-loading-scene { width: min(100%, 200px); margin: 12px auto 8px; }
  .sea-loading-symbol { width: clamp(48px, 17dvh, 70px); margin-bottom: 4px; }
  .sea-loading-symbol img { width: 100%; height: 100%; }
  #sea-load-text { font-size: 20px; }
  #sea-load-detail { margin-top: 6px; overflow-wrap: anywhere; }
  #sea-loading > button { flex: none; width: min(100%, 280px); margin-top: 8px; }
  .sea-loading-inner > .sea-primary { margin-top: 12px; }
}

@media (orientation:landscape) and (max-height:360px) {
  .sea-first-step .sea-first-step-copy { display:none; }
}
