/* Load after layout20.css. Only the main menu and its existing settings/overlay hosts. */
#currentWelcome:has(> .main-menu21):not([hidden]) {
  position:fixed!important; inset:0!important; z-index:1000!important;
  display:block!important; width:auto!important; height:auto!important;
  margin:0!important; padding:0!important; overflow:auto!important;
  background:#111c18!important; isolation:isolate;
}
#currentWelcome > .main-menu21 {
  position:relative; min-height:100%; width:100%; box-sizing:border-box;
  overflow:hidden; background:#111c18; color:#f4e5be;
  font:1rem/1.35 var(--fantasy-copy,Georgia,serif); text-align:left;
}
.main-menu21 *, .main-menu21 *::before, .main-menu21 *::after {box-sizing:border-box}
#currentWelcome .main-menu21__art {
  position:absolute; inset:0; display:block; width:100%; height:100%;
  object-fit:cover; object-position:50% 50%; margin:0; border:0;
}
.main-menu21::after {
  content:''; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(90deg,rgba(9,19,15,.68),rgba(9,19,15,.24) 31%,transparent 54%);
}
#currentWelcome .main-menu21__content {
  position:relative; z-index:1; width:min(360px,calc(100% - 56px));
  margin:0; padding:0; padding-top:max(9vh,48px);
  margin-left:clamp(28px,4.5vw,64px); padding-bottom:32px;
}
#currentWelcome .main-menu21__title {
  display:block; font-family:var(--fantasy-title,'Cinzel',Georgia,serif);
  font-size:clamp(2.6rem,4.1vw,3.5rem); font-weight:400;
  line-height:.98; letter-spacing:-.025em; margin:0;
  text-shadow:0 2px 4px #000,0 0 22px #09130f;
}
.main-menu21__title > span {display:block}
#currentWelcome .main-menu21__chapter {
  margin:14px 0 26px; color:#dfc998; font-size:1rem; letter-spacing:.12em;
  text-shadow:0 2px 4px #000; font-variant:small-caps;
}
.main-menu21__actions {display:flex; flex-direction:column; align-items:stretch; gap:10px; width:min(100%,280px)}
#currentWelcome .main-menu21__saved {display:flex; flex-direction:column; gap:2px; margin:0 0 3px; text-shadow:0 2px 4px #000; overflow-wrap:anywhere}
.main-menu21__name {font-size:1.15rem; color:#f4e5be}
.main-menu21__detail {font-size:.95rem; color:#e1d1aa}
#currentWelcome .main-menu21__primary,
#currentWelcome .main-menu21__secondary {
  display:block; position:static; width:100%; min-height:50px; margin:0; padding:10px 18px;
  border:1px solid #b49b63; border-radius:4px;
  color:#f5e8c8; font:1.15rem/1.2 var(--fantasy-copy,Georgia,serif);
  text-align:center; text-shadow:0 1px 2px #000; cursor:pointer;
  background:linear-gradient(#40533a,#263a2c); box-shadow:inset 0 1px #f3deb52b,0 3px 9px #0006;
}
#currentWelcome .main-menu21__secondary {background:#1a2b23; border-color:#8d805e; color:#e4d8b8; font-size:1rem}
#currentWelcome .main-menu21__primary:hover {background:linear-gradient(#536747,#344d36); border-color:#e7cf92}
#currentWelcome .main-menu21__secondary:hover {background:#2a3d2f; border-color:#c0ac7b}
.main-menu21__links {display:flex; align-items:center; flex-wrap:wrap; gap:0 18px; margin-top:13px; width:min(100%,320px)}
#currentWelcome .main-menu21__link {
  display:inline-flex; align-items:center; justify-content:flex-start; position:static;
  min-height:50px; width:auto; margin:0; padding:5px 0; background:transparent;
  border:0; border-radius:2px; box-shadow:none; color:#e4d5ad;
  font:1rem/1.25 var(--fantasy-copy,Georgia,serif); text-decoration:none;
  text-shadow:0 2px 3px #000; cursor:pointer;
}
#currentWelcome .main-menu21__link:hover {color:#fff2cc; text-decoration:underline; text-underline-offset:4px}
#currentWelcome .main-menu21 :is(button,a):focus-visible {outline:3px solid #fae6aa; outline-offset:4px}
/* Keep the native settings button, its listeners and panel. */
body:has(#currentWelcome:not([hidden]) > .main-menu21) .top {
  position:fixed!important; inset:0 0 auto!important; z-index:1100!important;
  display:block!important; height:0!important; min-height:0!important;
  padding:0!important; margin:0!important; background:none!important;
  border:0!important; box-shadow:none!important; pointer-events:none;
}
body:has(#currentWelcome:not([hidden]) > .main-menu21) .top > :not(#settingsButton) {display:none!important}
body:has(#currentWelcome:not([hidden]) > .main-menu21) #settingsButton {
  position:absolute!important; top:max(16px,env(safe-area-inset-top))!important;
  right:max(16px,env(safe-area-inset-right))!important;
  display:grid!important; place-items:center; visibility:visible!important;
  width:50px!important; height:50px!important; margin:0!important; padding:12px!important;
  pointer-events:auto; background:#17281feb!important; border:1px solid #9a895c!important;
  border-radius:4px; color:#ecdcb3;
}
body:has(#currentWelcome:not([hidden]) > .main-menu21) #settingsButton:focus-visible {outline:3px solid #fae6aa; outline-offset:3px}
body:has(#currentWelcome:not([hidden]) > .main-menu21) .overlay {z-index:2000!important}
@media (max-width:899px) {
  #currentWelcome .main-menu21__art {position:relative; inset:auto; width:100%; height:auto; aspect-ratio:2/1; object-fit:contain}
  .main-menu21::after {height:clamp(0px,50vw,450px); bottom:auto; background:linear-gradient(transparent 72%,#111c18)}
  #currentWelcome .main-menu21__content {
    width:min(360px,calc(100% - 48px)); margin:0 auto;
    padding:12px 0 max(24px,env(safe-area-inset-bottom));
  }
  #currentWelcome .main-menu21__title {font-size:2.6rem; line-height:1}
  #currentWelcome .main-menu21__chapter {margin:10px 0 20px; font-size:.95rem}
  .main-menu21__actions {width:100%}
  .main-menu21__links {width:100%; margin-top:8px; gap:0 20px}
}

/* Tall desktop windows retain both escape and refuge instead of cropping the story. */
@media(min-width:900px) and (max-aspect-ratio:3/2){#currentWelcome .main-menu21__art{position:relative;inset:auto;width:100%;height:auto;aspect-ratio:2/1;object-fit:contain}.main-menu21::after{height:50vw;bottom:auto;background:linear-gradient(transparent 75%,#111c18)}#currentWelcome .main-menu21__content{width:min(360px,calc(100% - 48px));margin:0 auto;padding:12px 0 24px}#currentWelcome .main-menu21__title{font-size:2.6rem;line-height:1}#currentWelcome .main-menu21__chapter{margin:10px 0 20px}.main-menu21__actions{width:100%}.main-menu21__links{width:100%;margin-top:8px}}

/* Existing game identity, with only the approved primary menu actions. */
.main-menu21__brand{display:flex;align-items:center;gap:12px;margin-bottom:26px}
#currentWelcome .main-menu21__mark{display:block;width:72px;height:72px;object-fit:contain;flex:none;filter:drop-shadow(0 2px 5px #0009)}
#currentWelcome .main-menu21__brand .main-menu21__title{font-size:clamp(2.4rem,3.4vw,3rem)}
@media(max-width:899px),(min-width:900px) and (max-aspect-ratio:3/2){.main-menu21__brand{margin-bottom:22px}#currentWelcome .main-menu21__mark{width:64px;height:64px}#currentWelcome .main-menu21__brand .main-menu21__title{font-size:2.6rem}}
