/* ===== Alternate main menu (js/altmenu.js, index.html #title). Every rule sits under #title.alt, so the classic title is untouched.
   Layout: serif NU LIGHT title + ニューライト over a vertical menu on the left, the moon emblem and pale line-art rings on the right,
   a thin frame with star marks, coordinate text in the corners, and the splat backdrop behind all of it (js/splat.js). */

#title .alt-only { display: none; }
#title.alt { --alt-ink: #ece3cc; --alt-dim: rgba(236, 227, 204, .5); --alt-line: rgba(236, 227, 204, .3); --alt-serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif; --alt-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace; }
#title.alt .alt-only { display: block; pointer-events: none; }
#title.alt .logo, #title.alt .mark, #title.alt .ticker, #title.alt .hero-card, #title.alt .title-main .logo { display: none !important; }
#title.alt::after { display: none; }
#title.alt::before { background:
  radial-gradient(ellipse 85% 95% at 68% 44%, transparent 45%, rgba(2, 3, 9, .72) 100%),
  linear-gradient(90deg, rgba(3, 4, 11, .55) 0, rgba(3, 4, 11, .12) 45%, rgba(3, 4, 11, 0) 60%),
  linear-gradient(0deg, rgba(3, 4, 11, .7) 0, transparent 20%),
  linear-gradient(180deg, rgba(3, 4, 11, .5) 0, transparent 14%); }
#title.alt.active { animation: altIn .9s var(--ease, ease) both; }
@keyframes altIn { from { opacity: 0; } to { opacity: 1; } }

/* --- title block: serif wordmark, Japanese line with rules and stars --- */
#title.alt .title-main { left: 7vw; top: 50%; translate: 0 -50%; width: min(40vw, 760px); text-align: center; margin: 0; }
#title.alt .alt-logo { display: block; margin: 0 0 clamp(14px, 4.4vh, 46px); color: var(--alt-ink); }
#title.alt .alt-en { display: block; font: 500 clamp(56px, 13vh, 170px)/.92 var(--alt-serif); letter-spacing: .035em; white-space: nowrap; color: #f4ecd8; text-shadow: 0 2px 34px rgba(0, 0, 0, .65), 0 0 70px rgba(236, 227, 204, .12); }
#title.alt .alt-jp { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: clamp(6px, 1.1vh, 14px); font: 500 clamp(15px, 2.3vh, 23px)/1 var(--alt-serif), 'Yu Gothic UI', 'Meiryo', 'Hiragino Sans', sans-serif; letter-spacing: .34em; color: var(--alt-ink); }
#title.alt .alt-jp i { display: block; width: clamp(60px, 11vw, 150px); height: 1px; background: linear-gradient(90deg, transparent, var(--alt-line) 30%, var(--alt-line) 70%, transparent); }
#title.alt .alt-jp::before, #title.alt .alt-jp::after { content: ''; width: 9px; height: 9px; flex: none; background: var(--alt-ink); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }

/* --- menu: centred serif rows, the focused row gets a band and a star --- */
#title.alt #titleMenu { display: grid; gap: 0; width: 100%; max-width: none; margin: 0; border: 0; }
#title.alt #titleMenu .menu-item, #title.alt #titleMenu .menu-item:not(.primary) {
  position: relative; display: block; width: min(430px, 88%); margin: .34em auto; padding: .62em 1.9em !important; border-radius: 0; isolation: isolate;
  border: 1px solid rgba(236, 227, 204, .32);
  background: transparent; box-shadow: none; clip-path: none; transform: none; overflow: visible;
  font: 500 clamp(15px, 2.4vh, 25px)/1.2 var(--alt-serif); letter-spacing: .12em; text-transform: none; text-align: center; color: #d6cdb6;
  transition: color .3s, text-shadow .3s, border-color .3s, background .3s, box-shadow .3s; cursor: pointer;
}
#title.alt #titleMenu .menu-item::before, #title.alt #titleMenu .menu-item::after { content: ''; position: absolute; pointer-events: none; animation: none; -webkit-mask: none; mask: none; }
/* inner hairline of the art-deco frame with a sparkle on each corner (the UI design sheet's menu buttons) */
#title.alt #titleMenu .menu-item::before { inset: 4px; z-index: -1; opacity: 1; transform: none; width: auto; height: auto; left: 4px; bottom: auto; border-radius: 0;
  border: 1px solid rgba(236, 227, 204, .16);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cpath d='M0-10L2-2 10 0 2 2 0 10-2 2-10 0-2-2z' fill='%23ece3cc'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cpath d='M0-10L2-2 10 0 2 2 0 10-2 2-10 0-2-2z' fill='%23ece3cc'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cpath d='M0-10L2-2 10 0 2 2 0 10-2 2-10 0-2-2z' fill='%23ece3cc'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cpath d='M0-10L2-2 10 0 2 2 0 10-2 2-10 0-2-2z' fill='%23ece3cc'/%3E%3C/svg%3E");
  background-position: left top, right top, left bottom, right bottom;
  background-size: 9px 9px; background-repeat: no-repeat; background-origin: border-box; }
#title.alt #titleMenu .menu-item::after { left: 3%; top: 50%; width: .5em; height: .5em; translate: 0 -50%; opacity: 0; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); background: #fff8e6; box-shadow: 0 0 14px rgba(255, 248, 230, .8); }
#title.alt #titleMenu .menu-item .arrow, #title.alt #titleMenu .menu-item .n, #title.alt #titleMenu .menu-item .mi-sub { display: none !important; }
#title.alt #titleMenu .menu-item > span:not(.n) { display: inline-flex; align-items: center; justify-content: center; gap: .62em; }
#title.alt #titleMenu .menu-item .en { white-space: nowrap; }
#title.alt #titleMenu .menu-item .sep { width: 4px; height: 4px; background: currentColor; opacity: .5; transform: rotate(45deg); }
#title.alt #titleMenu .menu-item .jp { font-family: 'Yu Gothic UI', 'Meiryo', 'Hiragino Sans', var(--alt-serif), sans-serif; font-size: .8em; letter-spacing: .14em; opacity: .85; }
#title.alt #titleMenu .menu-item.focus, #title.alt #titleMenu .menu-item:hover { color: #fff8e6; background: rgba(236, 227, 204, .07) !important; box-shadow: 0 0 30px rgba(255, 240, 210, .14), inset 0 0 24px rgba(255, 240, 210, .05) !important; border-color: rgba(236, 227, 204, .75) !important; padding-left: 1.9em; transform: none; text-shadow: 0 0 26px rgba(255, 240, 210, .45); }
#title.alt #titleMenu .menu-item.focus::before, #title.alt #titleMenu .menu-item:hover::before { opacity: 1; animation: none; border-color: rgba(236, 227, 204, .3); }
#title.alt #titleMenu .menu-item.focus::after, #title.alt #titleMenu .menu-item:hover::after { opacity: 1; }
#title.alt #titleMenu .menu-item.focus .jp, #title.alt #titleMenu .menu-item:hover .jp { opacity: 1; }
#title.alt #titleMenu .menu-item.focus .sep { opacity: .9; }
#title.alt #titleMenu .menu-item.more-row { font-size: clamp(12px, 1.8vh, 17px); letter-spacing: .3em; margin-top: .8em; padding: .52em 1.6em !important; color: rgba(214, 205, 182, .6); }
#title.alt #titleMenu .menu-item.more-row.focus { color: #fff8e6; }
#title.alt #titleMenu.more { max-height: 66vh; overflow-y: auto; scrollbar-width: none; padding: 4px 0; }
#title.alt #titleMenu.more::-webkit-scrollbar { display: none; }
#title.alt #titleMenu.more .menu-item.sm { font-size: clamp(13px, 2vh, 19px); padding: .52em 1.5em !important; width: min(380px, 84%); }
#title.alt .menu-item:active { transform: none; }

/* --- emblem: the game's own moon-and-girl art (img/ui/nulight-logo.webp), cropped above its wordmark and faded out,
   with pale line-art rings drawn in SVG around it --- */
#title.alt .alt-art { position: absolute; right: 3.5vw; top: 50%; translate: 0 -52%; width: min(50vw, 90vh); aspect-ratio: 1; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 42%); mask-image: linear-gradient(90deg, transparent 0, #000 42%); }   /* fades out on the left so the emblem never sits behind the menu text */
#title.alt .alt-art-clip { position: absolute; left: 0; top: 0; width: 100%; height: 44%; overflow: hidden; -webkit-mask-image: linear-gradient(#000 0, #000 62%, transparent 100%); mask-image: linear-gradient(#000 0, #000 62%, transparent 100%); }
#title.alt .alt-art img { display: block; width: 100%; height: auto; aspect-ratio: 1; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 0 40px rgba(0, 0, 0, .55)); }
#title.alt .alt-rings { position: absolute; left: 4%; top: -19%; width: 118%; height: 118%; overflow: visible; color: var(--alt-ink); opacity: .62; }
#title.alt .alt-rings > * { fill: none; stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
#title.alt .alt-rings circle.orb, #title.alt .alt-rings use.spark { fill: currentColor; stroke: none; }
#title.alt .alt-rings circle.orb { opacity: .8; }
#title.alt .alt-rings use.spark { opacity: .9; }
#title.alt .alt-rings use.sm { opacity: .6; }
#title.alt .alt-rings .ring-spin { transform-box: view-box; transform-origin: 50% 50%; animation: altSpin 220s linear infinite; }
#title.alt .alt-rings circle[stroke-dasharray] { opacity: .45; }
@keyframes altSpin { to { transform: rotate(360deg); } }

/* --- frame and corner marks --- */
#title.alt .alt-frame { position: absolute; inset: 20px; border: 1px solid var(--alt-line); }
#title.alt .alt-frame::before { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(236, 227, 204, .1); }
#title.alt .af-s { position: absolute; width: 16px; height: 16px; translate: -50% -50%; background: var(--alt-ink); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
#title.alt .af-s.tl { left: 0; top: 0; } #title.alt .af-s.tm { left: 50%; top: 0; } #title.alt .af-s.tr { left: 100%; top: 0; }
#title.alt .af-s.bl { left: 0; top: 100%; } #title.alt .af-s.bm { left: 50%; top: 100%; } #title.alt .af-s.br { left: 100%; top: 100%; }
#title.alt .alt-coord { position: absolute; font: 500 10px/1 var(--alt-mono); letter-spacing: .16em; color: var(--alt-dim); white-space: nowrap; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
#title.alt .c-tl { left: 3.7vw; top: 5.4vh; }
#title.alt .c-top { left: 58vw; top: 5.4vh; }
#title.alt .c-tr { right: 3.5vw; left: auto; top: 5.4vh; }

/* --- corners: version top right, actions bottom left, callsign and featured card right/left above them, prompts bottom right --- */
#title.alt .title-ver { top: calc(5.4vh + 22px); right: 3.5vw; bottom: auto; left: auto; font: 500 10px/1 var(--alt-mono); letter-spacing: .2em; color: var(--alt-dim); }
#title.alt .title-top { position: absolute; left: calc(40px + var(--safe-l, 0px)); right: auto; top: auto; bottom: calc(22px + var(--safe-b, 0px)); z-index: 2; }
#title.alt .title-top .tag { display: none; }
#title.alt .pcard { left: calc(40px + var(--safe-l, 0px)); right: auto; top: auto; bottom: calc(12vh); background: none; border: 0; box-shadow: none; backdrop-filter: none; padding: 0; clip-path: none; }
#title.alt .pcard .rc-tag, #title.alt .pcard .rc-title, #title.alt .pcard .rc-rank { color: var(--alt-ink); }
#title.alt .prompts { left: auto; right: 3.5vw; bottom: calc(4.2vh + var(--safe-b, 0px)); font: 500 10px/1 var(--alt-mono); letter-spacing: .22em; color: var(--alt-dim); }
#title.alt .prompts::before { content: 'PRESS START / INPUT'; color: rgba(236, 227, 204, .72); margin-right: 6px; }
#title.alt .feat-card { right: 3.5vw; bottom: 11vh; left: auto; background: rgba(6, 7, 12, .5); border: 1px solid var(--alt-line); border-left: 1px solid var(--alt-line); }
#title.alt .feat-card small, #title.alt .feat-card .fc-x b { color: var(--alt-ink); }

/* --- narrow screens: the emblem backs off to the right, the menu centres --- */
@media (max-width: 900px) {
  #title.alt .title-main { left: 50%; translate: -50% -50%; width: 88vw; }
  #title.alt .alt-en { font-size: clamp(44px, 14vw, 90px); }
  #title.alt .alt-art { width: 110vw; right: -36vw; top: 26%; translate: 0 -50%; opacity: .32; }
  #title.alt .c-top, #title.alt .c-tr { display: none; }
  #title.alt .feat-card { display: none; }
}
@media (max-height: 640px) {
  #title.alt .alt-en { font-size: clamp(44px, 12vh, 90px); }
  #title.alt .alt-logo { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #title.alt .alt-rings .ring-spin { animation: none; }
  #title.alt.active { animation-duration: .01s; }
}

/* Celestial minimal: a quieter title, clear action hierarchy, and one orbital accent. */
#title.alt::before {
  background: radial-gradient(ellipse at 72% 42%, rgba(61, 82, 120, .15), transparent 44%),
    linear-gradient(90deg, rgba(4, 8, 17, .94), rgba(5, 9, 19, .72) 46%, rgba(4, 7, 16, .35));
}
#title.alt .title-main::before { display: none; }
#title.alt .alt-en { color: #f5f1e8; text-shadow: 0 4px 36px rgba(0, 0, 0, .7); }
#title.alt .alt-jp { color: rgba(229, 234, 241, .7); }
#title.alt .alt-frame { border-color: rgba(210, 223, 241, .15); }
#title.alt .alt-frame::before, #title.alt .af-s.tm, #title.alt .af-s.bm { display: none; }
#title.alt .alt-art { opacity: .65; }
#title.alt .alt-rings { opacity: .38; }
#title.alt #titleMenu .menu-item, #title.alt #titleMenu .menu-item:not(.primary) {
  border: 1px solid rgba(210, 222, 237, .2); background: rgba(9, 15, 27, .32); color: #e5e7e8;
  letter-spacing: .08em; transition: background .18s ease, border-color .18s ease, color .18s ease;
}
#title.alt #titleMenu .menu-item::before { display: none; }
#title.alt #titleMenu .menu-item.focus, #title.alt #titleMenu .menu-item:hover, #title.alt #titleMenu .menu-item:focus-visible {
  background: rgba(189, 211, 239, .12) !important; border-color: rgba(224, 235, 250, .68) !important;
  box-shadow: none !important; text-shadow: none; color: #fff;
}
#title.alt #titleMenu .menu-item.primary { border-color: rgba(225, 213, 182, .65); background: rgba(226, 213, 181, .13); }
#title.alt .menu-item .ico { width: 17px; height: 17px; margin-right: .7em; vertical-align: -.12em; color: #d9d3bc; }
#title.alt .chip { background: rgba(9, 15, 27, .65); border-color: rgba(210, 222, 237, .25); box-shadow: none; }
#title.alt .pcard { color: #e5e8ec; }
@media (prefers-reduced-motion: reduce) { #title.alt #titleMenu .menu-item { transition: none; } }
