/* Naval game main menu, matching the existing Changa / amber console identity.
   DESIGN_VARIANCE: 6 / MOTION_INTENSITY: 5 / VISUAL_DENSITY: 3.
   Deliberate night scene: the main menu is game UI, not a marketing page.
   Layer scale: environment 0, menu 1, persistent controls 2; existing intro 100.
   Controls have small 3px mechanical corners; no marketing cards or hero panels. */
.launcher-view {
  color-scheme: dark;
  --menu-ink: #f2eee0;
  --menu-muted: #c1c9c7;
  --menu-accent: #ffd16b;
  --menu-edge: #71817c;
  background: #0b1419;
  color: var(--menu-ink);
  font-family: var(--label);
}
.launcher-view .sea-texture { display: none; }
.launcher-view #app { max-width: none; padding: 0; min-height: 100dvh; isolation: isolate; }
.command-backdrop { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.command-scene {
  position: absolute;
  width: max(100vw, 175dvh);
  aspect-ratio: 1660 / 949;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.command-scene > img { width: 100%; height: 100%; object-fit: cover; }
.command-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, #09111644, transparent 28%, #09111622 70%, #091116eb),
    radial-gradient(ellipse at 50% 42%, #09111642 0 18%, transparent 65%);
}
/* A light sweep over the illustration's radar glass; it is ambient scenery. */
.command-radar {
  position: absolute;
  left: 2.3%; top: 53.2%; width: 18.4%; height: 29%;
  border-radius: 50%;
  overflow: hidden;
  opacity: .46;
  mix-blend-mode: screen;
}
.command-sweep {
  width: 100%; height: 100%; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 76%, #ffbc3210 85%, #ffcb5a90 99%, transparent);
}
.launcher-view .runtime-launcher {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  width: 100%;
  margin: 0;
  padding: clamp(40px, 8dvh, 100px) 24px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.menu-title { margin-bottom: clamp(30px, 5dvh, 58px); }
.launcher-view .menu-title h1 {
  font-family: var(--label);
  font-size: clamp(66px, 9vw, 116px);
  font-weight: 800;
  line-height: 1.18;
  color: var(--menu-accent);
  text-shadow: 0 3px 0 #805822, 0 6px 0 #30271d, 0 12px 28px #071014;
}
.menu-title > p {
  display: inline-block;
  margin-top: 14px;
  padding: 3px 24px 5px;
  color: #f2eee0;
  background: #11191ee6;
  border-block: 1px solid #8d784b;
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 700;
  line-height: 1.5;
}
.main-menu { display: grid; gap: 10px; width: min(100%, 362px); }
.menu-control {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 62px;
  padding: 12px 36px;
  border: 1px solid #71817c;
  border-radius: 3px;
  color: #f2eee0;
  background: #101c22ed;
  box-shadow: inset 0 1px 0 #c5d5cb17, 0 3px 0 #080f13;
  font-family: var(--label);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  transition: transform .16s, color .16s, background-color .16s, border-color .16s;
  text-decoration: none;
}
.menu-control::before {
  content: '';
  position: absolute;
  inset-inline-start: 15px;
  width: 0; height: 0;
  border-block: 5px solid transparent;
  border-right: 7px solid currentColor;
  opacity: 0;
  transform: translateX(5px);
  transition: opacity .16s, transform .16s;
}
.menu-control[data-selected="true"] {
  color: #20251f;
  background: #ffd16b;
  border-color: #f6dc98;
  box-shadow: inset 0 1px 0 #fff3cb, 0 4px 0 #795a2c, 0 8px 22px #09111670;
  transform: translateX(-7px);
}
.menu-control[data-selected="true"]::before { opacity: 1; transform: none; }
.menu-control:focus-visible { outline: 2px solid #f2eee0; outline-offset: 5px; }
.menu-control:not(:disabled):active { transform: translateX(-7px) translateY(2px); }
.menu-control:disabled { opacity: 1; cursor: wait; }
.menu-guide { font-size: 17px; }
.menu-help {
  color: var(--menu-muted);
  font-family: Cairo, Tahoma, sans-serif;
  font-size: 12px;
  line-height: 1.8;
  margin-top: 24px;
  min-height: 44px;
  max-width: 380px;
  text-shadow: 0 2px 8px #091116;
}
/* The old web header becomes the edge controls of the title screen. */
.launcher-view .topbar {
  position: fixed;
  z-index: 2;
  inset: auto 30px 16px auto;
  height: 48px;
  max-width: none;
  margin: 0;
  padding: 0;
}
.launcher-view .brand { display: none; }
.launcher-view .top-actions { gap: 10px; }
.launcher-view .connection { font: 12px/1.5 Cairo, sans-serif; color: #c1c9c7; max-width: 180px; }
.launcher-view .connection.offline { color: #ffd16b; }
.launcher-view .icon-button {
  min-width: 68px;
  min-height: 44px;
  padding: 7px 12px;
  background: #0d181ee6;
  border: 1px solid #71817c;
  border-radius: 3px;
  color: #c1c9c7;
  font-size: 0;
}
.launcher-view .icon-button::after { font: 500 12px/1.5 var(--label); }
.launcher-view #sound-toggle::after { content: 'الصوت'; }
.launcher-view #haptics-toggle::after { content: 'الاهتزاز'; }
.launcher-view .icon-button[aria-pressed="true"] { color: #ffd16b; border-color: #b5934d; background: #3b311bdb; }
.launcher-view .icon-button:focus-visible { outline: 2px solid #ffd16b; outline-offset: 4px; }
.menu-footer { position: fixed; z-index: 1; inset: auto 30px 28px; color: #b5c1c1; pointer-events: none; font-size: 12px; }
.menu-version { position: absolute; left: 0; bottom: 0; font: 12px/1.5 'Courier New', monospace; }
.menu-keys { display: flex; justify-content: center; gap: 18px; font-size: 11px; }
.menu-keys > span { display: inline-flex; align-items: center; gap: 6px; }
.menu-keys kbd { border: 1px solid #71817c; border-radius: 3px; padding: 1px 5px; background: #0d181ee6; font: 11px/1.6 'Courier New', monospace; }
@media (prefers-reduced-motion: no-preference) {
  .command-sweep { animation: menu-radar-sweep 7s linear infinite; }
  .menu-title { animation: menu-arrive .5s ease-out both; }
  .main-menu { animation: menu-arrive .45s .1s ease-out both; }
  .launcher-view:has(> .intro) :is(.menu-title, .main-menu) { animation: none; }
  @keyframes menu-radar-sweep { to { transform: rotate(1turn); } }
  @keyframes menu-arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .menu-control, .menu-control::before { transition: none; }
}
@media (max-width: 767px) and (orientation: portrait) {
  /* Frame the left-hand instruments in portrait instead of cropping to empty sea. */
  .command-scene { left: -12vw; transform: translateY(-50%); }
}
@media (max-width: 767px) {
  .launcher-view .runtime-launcher { padding: 34px 28px 112px; }
  .launcher-view .menu-title h1 { font-size: clamp(57px, 14.5vw, 84px); }
  .menu-title { margin-bottom: 30px; }
  .menu-title > p { margin-top: 12px; font-size: 18px; padding-inline: 20px; }
  .main-menu { max-width: 330px; }
  .menu-control { min-height: 57px; font-size: 21px; padding: 12px 27px; }
  .menu-guide { font-size: 15px; }
  .menu-help { font-size: 11px; margin-top: 20px; }
  .command-backdrop::after { background: linear-gradient(to bottom, #09111666, #09111640 65%, #091116ed); }
  .launcher-view .topbar { inset: auto 20px 14px 20px; justify-content: center; }
  .launcher-view .connection { max-width: 135px; font-size: 10px; }
  .menu-footer { inset: auto 20px 78px; font-size: 10px; }
  .menu-keys { display: none; }
  .menu-version { left: 0; font-size: 10px; opacity: .85; }
}
@media (max-height: 610px) {
  .launcher-view .runtime-launcher { padding-top: 24px; padding-bottom: 92px; }
  .menu-title { margin-bottom: 22px; }
  .launcher-view .menu-title h1 { font-size: clamp(50px, 10vw, 74px); }
  .menu-title > p { margin-top: 8px; font-size: 16px; }
  .menu-control { min-height: 52px; padding-block: 9px; }
  .menu-help { margin-top: 15px; min-height: 36px; }
}
@media (max-height: 450px) and (min-width: 640px) {
  .launcher-view .runtime-launcher { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; align-content: center; padding: 24px 32px 85px; }
  .menu-title { grid-row: 1 / 3; margin: 0; }
  .main-menu { justify-self: center; }
  .menu-help { grid-column: 2; justify-self: center; margin-top: 12px; min-height: 0; }
  .menu-keys { display: none; }
}
