/* The world gate: bright key art, blue game chrome, and warm gold details. */
#landing {
  --gate-ink: #fff4d7; --gate-muted: #c4d5e3; --gate-gold: #e8c77d; --gate-edge: #a78748;
  --mist: #c4d5e3; --ui-mono: "Segoe UI", "Trebuchet MS", sans-serif;
  position: fixed; inset: 0; z-index: 100; overflow: auto; isolation: isolate;
  color: var(--gate-ink); background: #6cb4ec; font: 14px/1.5 "Segoe UI", "Trebuchet MS", sans-serif;
  scroll-behavior: smooth; scroll-padding-top: 24px; transition: opacity .28s ease, visibility .28s ease;
}
#landing *, #landing *::before, #landing *::after { box-sizing: border-box; }
#landing.gone { opacity: 0; visibility: hidden; pointer-events: none; }
#landing .landing-backdrop { position: fixed; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; object-position: center; }
#landing .landing-atmosphere { position: fixed; inset: 0; z-index: -2; pointer-events: none; background: linear-gradient(180deg, #123b611a, transparent 40%, #081e3526); }
#landing .landing-shell { min-height: 100%; }
#landing .landing-topbar { min-height: 68px; padding: 10px clamp(20px, 4vw, 72px); display: flex; align-items: center; gap: 36px; border-bottom: 1px solid #d4dcce40; background: linear-gradient(90deg, #142b40ed, #204975db); box-shadow: 0 3px 20px #14385830; }
#landing .brand-seal { display: flex; align-items: center; gap: 12px; }
#landing .brand-glyph { display: none; }
#landing .brand-copy { display: grid; }
#landing .brand-copy strong { color: var(--gate-ink); font: 500 30px/1 Georgia, serif; letter-spacing: .08em; }
#landing .brand-copy small { color: #d9e3ec; font-size: 8px; letter-spacing: .29em; margin-top: 5px; }
#landing .landing-nav { display: flex; align-self: stretch; align-items: center; gap: 32px; margin-left: 35px; }
#landing a { color: inherit; text-underline-offset: 5px; }
#landing .landing-nav a { position: relative; padding: 12px 0; color: #dbe9f4; text-decoration: none; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
#landing .landing-nav a[aria-current] { color: var(--gate-ink); }
#landing .landing-nav a[aria-current]::after { content: ""; position: absolute; bottom: -9px; left: 0; right: 0; height: 2px; background: var(--gate-gold); box-shadow: 0 0 9px #ffe7a270; }
#landing .landing-nav a:hover { color: #ffe4a3; }
#landing .realm-status { display: flex; align-items: center; gap: 9px; margin-left: auto; }
#landing .realm-status > span:last-child { display: grid; gap: 2px; }
#landing .realm-status small { font-size: 8px; letter-spacing: .18em; color: #c4d5e3; }
#landing .realm-status strong { font-size: 11px; font-weight: 500; color: #eff8ff; white-space: nowrap; }
#landing .status-orbit { display: grid; place-items: center; width: 19px; height: 19px; border: 1px solid #b4d5db50; border-radius: 50%; }
#landing .status-orbit i { width: 5px; height: 5px; background: var(--gate-gold); border-radius: 50%; animation: gate-pulse 1.6s ease-in-out infinite; }
#landing .realm-status[data-state="online"] .status-orbit i { background: #91ebbc; box-shadow: 0 0 8px #91ebbc80; animation: none; }
#landing .realm-status[data-state="offline"] .status-orbit i { background: #ffac91; }
#landing .landing-stage { min-height: calc(100svh - 68px); padding: 22px 24px 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#landing .landing-intro { position: relative; text-align: center; margin-bottom: 15px; filter: drop-shadow(0 2px 6px #15396370); }
#landing .realm-crest { display: block; width: 60px; height: 57px; margin: 0 auto -3px; color: #fff1ca; }
#landing .title { margin: 0; color: #fff3d5; font: 500 clamp(64px, 7.6vw, 116px)/.94 Georgia, "Times New Roman", serif; letter-spacing: .035em; text-shadow: 0 2px 0 #987c4b, 0 5px 18px #173a6380; }
#landing .intro-kicker { margin: 13px 0 0; color: #fff9e7; font-size: 11px; font-weight: 600; letter-spacing: .29em; text-transform: uppercase; text-shadow: 0 1px 5px #102b49; }
#landing .title-flourish { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 7px; font-size: 15px; color: #ffedbf; }
#landing .title-flourish span { width: 55px; height: 1px; background: linear-gradient(90deg, transparent, #ffedbf); }
#landing .title-flourish span:last-child { transform: rotate(180deg); }
#landing .login-card { position: relative; width: 366px; max-width: 100%; padding: 23px 27px 19px; background: linear-gradient(135deg, #223c53f5, #102236f5); border: 1px solid var(--gate-edge); box-shadow: 0 12px 35px #09203e50, inset 0 0 0 3px #162d41, inset 0 0 0 4px #9d824740; border-radius: 4px; }
#landing .card-corners { position: absolute; inset: 5px; pointer-events: none; border: 1px solid transparent; background: linear-gradient(var(--gate-gold), var(--gate-gold)) left top / 15px 1px no-repeat, linear-gradient(var(--gate-gold), var(--gate-gold)) left top / 1px 15px no-repeat, linear-gradient(var(--gate-gold), var(--gate-gold)) right bottom / 15px 1px no-repeat, linear-gradient(var(--gate-gold), var(--gate-gold)) right bottom / 1px 15px no-repeat, linear-gradient(var(--gate-gold), var(--gate-gold)) right top / 15px 1px no-repeat, linear-gradient(var(--gate-gold), var(--gate-gold)) right top / 1px 15px no-repeat, linear-gradient(var(--gate-gold), var(--gate-gold)) left bottom / 15px 1px no-repeat, linear-gradient(var(--gate-gold), var(--gate-gold)) left bottom / 1px 15px no-repeat; }
#landing .card-corners::before, #landing .card-corners::after { content: "◇"; position: absolute; color: var(--gate-gold); font-size: 11px; line-height: 1; background: #203950; }
#landing .card-corners::before { left: -5px; top: -5px; }
#landing .card-corners::after { right: -5px; bottom: -5px; }
#landing .login-header { text-align: center; margin-bottom: 17px; }
#landing .login-header h2 { margin: 0; color: var(--gate-ink); font: 500 25px/1.2 Georgia, serif; }
#landing .login-header > p { color: var(--gate-muted); margin: 5px 0 0; font-size: 12px; }
#landing #loginform { display: grid; gap: 12px; }
#landing .field { display: grid; gap: 6px; }
#landing .field label { font-size: 11px; color: #e3ebf2; font-weight: 600; letter-spacing: .035em; }
#landing input { width: 100%; min-height: 43px; padding: 10px 12px; background: #0a1c2bd4; color: #f5f9fc; border: 1px solid #678094; border-radius: 3px; box-shadow: inset 0 2px 4px #06172840; font-size: 16px; line-height: 1.2; transition: border-color .15s, box-shadow .15s; }
#landing input::placeholder { color: #a6b7c6; font-size: 13px; }
#landing input:hover { border-color: #a2c3d7; }
#landing input:focus { outline: 2px solid var(--gate-gold); outline-offset: 2px; border-color: var(--gate-gold); }
#landing .field-help { font-size: 10px; color: #bacbd9; }
#landing #lerr { color: #ffb9a9; font-size: 12px; line-height: 1.4; }
#landing #lerr:empty { display: none; }
#landing .btns { display: grid; gap: 9px; margin-top: 2px; }
#landing .btns button { position: relative; width: 100%; min-height: 43px; padding: 10px 28px; border-radius: 3px; font-size: 12px; font-weight: 600; transition: background .18s, box-shadow .18s, transform .18s; }
#landing #blog { color: #fff0c6; background: linear-gradient(110deg, #54432a, #2e302d 55%, #443923); border: 1px solid var(--gate-gold); box-shadow: inset 0 0 0 3px #1c2c33, inset 0 0 0 4px #b3924845, 0 3px 10px #081b2c40; text-transform: uppercase; letter-spacing: .13em; }
#landing #blog::before { content: "◇"; position: absolute; left: -5px; top: calc(50% - 8px); color: var(--gate-gold); background: #2b3433; font-size: 12px; line-height: 16px; }
#landing #blog b { position: absolute; right: 15px; font-size: 17px; line-height: 17px; font-weight: 400; }
#landing #blog:hover { background: linear-gradient(110deg, #705931, #4d472d); box-shadow: 0 0 18px #ebc66b30, inset 0 0 0 3px #2d392d; transform: translateY(-1px); }
#landing #breg { color: #e4f3fd; background: #23445c90; border: 1px solid #7395ad; }
#landing #breg:hover { background: #345f7b; border-color: #c4e7fd; transform: translateY(-1px); }
#landing a:focus-visible, #landing button:focus-visible { outline: 2px solid #ffdd8d; outline-offset: 4px; }
#landing .btns button:active { transform: translateY(1px); }
#landing .btns button:disabled, #landing .btns button[aria-disabled="true"] { cursor: wait; opacity: .65; transform: none; }
#landing[data-busy="true"][data-action="login"] #blog span, #landing[data-busy="true"][data-action="register"] #breg span { opacity: 0; }
#landing[data-busy="true"][data-action="login"] #blog::after, #landing[data-busy="true"][data-action="register"] #breg::after { content: ""; position: absolute; width: 16px; height: 16px; top: calc(50% - 8px); left: calc(50% - 8px); border: 2px solid #f4db9d40; border-top-color: #ffe3a1; border-radius: 50%; animation: gate-spin .7s linear infinite; }
#landing .login-note { display: flex; gap: 8px; padding-top: 13px; margin-top: 14px; border-top: 1px solid #a2b4c32e; }
#landing .note-mark { color: var(--gate-gold); font-size: 13px; }
#landing .login-note p, #landing .javascript-note { color: #c1d1dd; font-size: 11px; line-height: 1.55; margin: 0; }
#landing .login-note strong { color: #f2e6c9; font-weight: 500; }
#landing .javascript-note { margin-top: 12px; color: #ffe3a1; }
#landing .browser-note { margin: 12px 0 20px; padding: 4px 14px; color: #fff9e7; border-radius: 3px; background: #193750bd; font-size: 11px; letter-spacing: .035em; }
#landing .browser-note span { margin: 0 7px; color: var(--gate-gold); }
#landing .adventure-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: min(620px, 100%); }
#landing .adventure-features li { min-width: 0; display: grid; justify-items: center; gap: 3px; padding: 13px 10px; text-align: center; border: 1px solid #c7a969c9; background: linear-gradient(135deg, #203a4de8, #112537f2); box-shadow: inset 0 0 0 3px #21384a, 0 4px 15px #122b4538; }
#landing .adventure-features svg { width: 26px; height: 26px; margin-bottom: 3px; color: #f8e2a9; }
#landing .adventure-features strong { font-size: 10px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: #fff4d7; }
#landing .adventure-features small { font-size: 10px; color: #d1dfeb; }
#landing .world-guide { padding: 64px clamp(24px, 8vw, 140px); background: linear-gradient(145deg, #edf6f8, #d7e8ef); color: #24465b; border-top: 2px solid #d8c18b; text-align: center; }
#landing .card-kicker { margin: 0 0 10px; color: #77581f; font-size: 10px; font-weight: 700; letter-spacing: .2em; }
#landing .world-guide h2 { margin: 0 0 20px; color: #214056; font: 500 clamp(32px, 3vw, 45px)/1.15 Georgia, serif; }
#landing .intro-copy { max-width: 610px; margin: 0 auto; font-size: 15px; line-height: 1.8; }
#landing .world-highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1080px; margin: 35px auto; text-align: left; }
#landing .world-highlights article { background: #ffffffb3; border: 1px solid #8eb4c560; box-shadow: 0 5px 12px #274b5e08; }
#landing .world-highlights img { display: block; width: 100%; height: 145px; object-fit: cover; image-rendering: auto; }
#landing .world-highlights article > div { padding: 20px; }
#landing .world-highlights h3 { margin: 0 0 8px; font: 500 22px/1.2 Georgia, serif; }
#landing .world-highlights p { margin: 0; font-size: 13px; line-height: 1.7; }
#landing .play-guide { display: flex; align-items: center; gap: 50px; max-width: 1080px; margin: 40px auto 0; padding-top: 30px; border-top: 1px solid #8eb4c580; text-align: left; }
#landing .play-guide h3 { margin: 0 0 10px; font: 500 25px/1.2 Georgia, serif; }
#landing .play-guide p:last-child { max-width: 650px; margin: 0; font-size: 13px; line-height: 1.7; }
#landing .return-to-login { display: flex; align-items: center; gap: 25px; flex-shrink: 0; border: 1px solid #b6975f; padding: 13px 19px; background: #1f425b; color: #fff0d1; text-decoration: none; font-size: 12px; }
#landing .return-to-login:hover { background: #305b75; }
#landing .landing-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px clamp(24px, 4vw, 72px); background: #17344c; color: #c9dce9; }
#landing .world-note { margin: 0; font: italic 16px Georgia, serif; color: #f1dfb5; }
#landing .world-note span { margin-right: 7px; font-size: 11px; }
#landing .control-hints { display: flex; gap: 18px; }
#landing .control-hints span { white-space: nowrap; font-size: 10px; }
#landing .control-hints kbd { padding: 2px 5px; margin-right: 3px; border: 1px solid #97b9cd60; color: #f8e1a5; font: inherit; }
@keyframes gate-pulse { 50% { opacity: .4; } }
@keyframes gate-spin { to { transform: rotate(360deg); } }
@media (min-width: 1600px) and (min-height: 950px) {
  #landing .landing-stage { gap: 6px; }
  #landing .title { font-size: 132px; }
  #landing .login-card { width: 390px; padding: 28px 30px 23px; }
}
@media (max-width: 780px) {
  #landing .landing-topbar { min-height: 60px; gap: 20px; padding: 10px 20px; }
  #landing .brand-copy strong { font-size: 24px; }
  #landing .brand-copy small { font-size: 7px; }
  #landing .landing-nav { gap: 20px; margin-left: 0; }
  #landing .landing-nav a { font-size: 10px; }
  #landing .realm-status small { display: none; }
  #landing .landing-stage { min-height: calc(100svh - 60px); padding: 24px 18px; }
  #landing .title { font-size: clamp(52px, 13vw, 85px); }
  #landing .realm-crest { width: 48px; height: 45px; }
  #landing .intro-kicker { font-size: 9px; letter-spacing: .2em; }
  #landing .world-highlights { gap: 15px; }
  #landing .world-highlights article > div { padding: 15px; }
  #landing .world-highlights h3 { font-size: 19px; }
  #landing .play-guide { flex-direction: column; align-items: flex-start; gap: 20px; }
  #landing .landing-footer { flex-direction: column; gap: 15px; }
}
@media (max-width: 540px) {
  #landing .landing-backdrop { object-position: 49% center; }
  #landing .landing-nav { display: none; }
  #landing .landing-stage { padding: 19px 18px 24px; }
  #landing .landing-intro { margin-bottom: 12px; }
  #landing .realm-crest { width: 41px; height: 39px; }
  #landing .intro-kicker { margin-top: 10px; font-size: 8px; }
  #landing .login-card { width: 350px; padding: 22px 24px 19px; }
  #landing .adventure-features { gap: 7px; }
  #landing .adventure-features li { padding: 11px 5px; }
  #landing .adventure-features strong { font-size: 8px; letter-spacing: .03em; }
  #landing .adventure-features small { display: none; }
  #landing .adventure-features svg { width: 23px; height: 23px; }
  #landing .browser-note { font-size: 10px; }
  #landing .world-guide { padding: 42px 22px; }
  #landing .world-highlights { grid-template-columns: 1fr; margin-top: 26px; }
  #landing .world-highlights img { height: 150px; }
  #landing .control-hints { gap: 10px; flex-wrap: wrap; justify-content: center; }
}
@media (max-height: 950px) and (min-width: 781px) {
  #landing .realm-crest { width: 48px; height: 45px; }
  #landing .title { font-size: 100px; }
  #landing .login-card { padding: 20px 25px 16px; }
  #landing .login-header { margin-bottom: 12px; }
  #landing #loginform { gap: 9px; }
  #landing .field { gap: 4px; }
  #landing .field label, #landing .field-help { line-height: 1.3; }
  #landing .login-note { margin-top: 10px; padding-top: 10px; }
}
@media (max-height: 780px) and (min-width: 781px) {
  #landing .landing-stage { padding-top: 16px; padding-bottom: 20px; }
  #landing .realm-crest { width: 40px; height: 38px; }
  #landing .title { font-size: 80px; }
  #landing .intro-kicker { margin-top: 10px; font-size: 9px; }
  #landing .landing-intro { margin-bottom: 12px; }
  #landing .login-card { padding: 18px 25px 15px; }
  #landing .login-header { margin-bottom: 12px; }
  #landing .login-header h2 { font-size: 23px; }
  #landing #loginform { gap: 9px; }
  #landing .login-note { display: none; }
  #landing .browser-note { margin: 9px 0 13px; }
  #landing .adventure-features li { padding: 9px; }
  #landing .adventure-features svg { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  #landing { scroll-behavior: auto; transition: none; }
  #landing *, #landing *::before, #landing *::after { animation: none !important; transition: none !important; }
}

/* The gate uses the same ink and brass as the in-world interface. */
#landing .landing-topbar { background: linear-gradient(100deg,#10262ef5,#203c43ed); border-bottom-color: #a0804966; }
#landing .login-card { background: linear-gradient(145deg,#203c43f5,#10262ef5); border-color: #a08049; border-radius: 8px; box-shadow: 0 18px 50px #03122266,inset 0 1px #dfc38b33; }
#landing input { border-radius: 5px; }
#landing .btns button { border-radius: 5px; }

/* THE LOADING GATE - the landing art stays up as the loading screen, so the wait looks like
   arrival rather than a black screen. Sits above the shell; the form is hidden under it. */
/* The shell goes fully out, not faded: at .12 its headings still ghosted through and collided
   with the loading title (measured on the first capture). */
#landing[data-loading="1"] .landing-shell { opacity: 0; pointer-events: none; transition: opacity .25s ease; }
/* A scrim, because the landing art is BRIGHT - a 3px track and thin serif text vanished against
   the sky. Darkening behind the block keeps the art visible and the readout legible. */
#worldload::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 60% 42% at 50% 50%, rgba(6,12,18,.78), rgba(6,12,18,.34) 62%, rgba(6,12,18,.12)); }
#worldload { position: fixed; inset: 0; z-index: 4; display: grid; place-content: center; gap: 14px;
  justify-items: center; text-align: center; pointer-events: none; }
#worldload .wl-title { font: 300 30px/1.2 Georgia, serif; letter-spacing: .06em; color: #f0ead8;
  text-shadow: 0 2px 18px rgba(0,0,0,.7); }
#worldload .wl-track { width: min(420px, 62vw); height: 5px; border-radius: 2px; overflow: hidden;
  background: rgba(240,234,216,.18); box-shadow: 0 1px 10px rgba(0,0,0,.5); }
#worldload .wl-fill { height: 100%; width: 0%; border-radius: 2px; background: linear-gradient(90deg,#b99a5b,#e8d9a8);
  transition: width .18s linear; }
#worldload .wl-note { font: 12px/1.4 ui-monospace, monospace; letter-spacing: .08em; color: #ded5bb;
  text-shadow: 0 1px 8px rgba(0,0,0,.7); }
@media (prefers-reduced-motion: reduce) { #worldload .wl-fill { transition: none; } }
