/* The deployment loading plate is the shared visual reference for menu UI. */
:root {
  --menu-plate-cut:8px;
  --menu-plate-edge:#50767e;
  --menu-plate-fill:linear-gradient(115deg,#162e38,#09151dfc 65%);
  --menu-plate-text:#e8f2f4;
  --menu-plate-muted:#b4c9d0;
  --menu-plate-accent:#b4f5f4;
  --menu-button-edge:#87aebb4d;
  --menu-button-fill:#afdae908;
  --menu-button-hover:#b1dbe916;
  --menu-plate-shape:polygon(var(--menu-plate-cut) 0,100% 0,100% calc(100% - var(--menu-plate-cut)),calc(100% - var(--menu-plate-cut)) 100%,0 100%,0 var(--menu-plate-cut));
  --menu-accent-edges:linear-gradient(var(--menu-plate-accent),var(--menu-plate-accent)) left 22%/2px 20px no-repeat,linear-gradient(#6bb6bf99,#6bb6bf99) right 78%/2px 20px no-repeat;
  --menu-accent-corners:linear-gradient(var(--menu-plate-accent),var(--menu-plate-accent)) 12px top/22px 1px no-repeat,linear-gradient(var(--menu-plate-accent),var(--menu-plate-accent)) left 12px/1px 22px no-repeat,linear-gradient(#6bb6bf99,#6bb6bf99) right 12px bottom/22px 1px no-repeat,linear-gradient(#6bb6bf99,#6bb6bf99) right bottom 12px/1px 22px no-repeat;
  --menu-plate-surface:var(--menu-plate-fill);
}

#main-menu.night-menu :is(.lobby-resources,.pilot-card,.pilot-account,#career-last,.hangar-shortcut,#pilot-compact,#pilot-license-dialog,#daily-quests-details,.career-dialog,.night-purchase-dialog,#panel-chassis,.night-shop-part,.menu-mode,.reward-dialog,.new-player-reward-list li) {
  --menu-card-frame:var(--menu-plate-edge); isolation:isolate; border:0; border-radius:0;
  background:var(--menu-card-frame); clip-path:var(--menu-plate-shape); color:var(--menu-plate-text); box-shadow:none;
}
#main-menu.night-menu :is(.lobby-resources,.pilot-account,#career-last,.hangar-shortcut,#pilot-compact,.night-shop-part,.menu-mode,.new-player-reward-list li) { position:relative; }
#main-menu.night-menu :is(.lobby-resources,.pilot-card,.pilot-account,#career-last,.hangar-shortcut,#pilot-compact,#pilot-license-dialog,#daily-quests-details,.career-dialog,.night-purchase-dialog,#panel-chassis,.night-shop-part,.menu-mode,.reward-dialog,.new-player-reward-list li)::before {
  content:''; display:block; position:absolute; inset:1px; z-index:-1; border:0;
  clip-path:var(--menu-plate-shape); background:var(--menu-plate-surface); pointer-events:none;
}
#main-menu.night-menu :is(.pilot-card,.pilot-account,#career-last,.night-shop-part) { --menu-plate-surface:var(--menu-accent-edges),var(--menu-plate-fill); }
#main-menu.night-menu :is(#pilot-license-dialog,#daily-quests-details,.career-dialog,.night-purchase-dialog,#panel-chassis,.reward-dialog) { --menu-plate-surface:var(--menu-accent-corners),var(--menu-plate-fill); }

/* The artwork may overhang equipment plates; clip the plate rather than the art. */
#main-menu.night-menu :is(.night-part-card,#night-picker-thumbnails .shop-product,.night-color-list .shop-product) {
  --choice-edge:var(--menu-plate-edge); --menu-plate-surface:var(--menu-accent-edges),var(--menu-plate-fill); isolation:isolate; background:transparent;
  border-color:transparent; border-bottom-width:1px; border-radius:0; box-shadow:none;
}
#main-menu.night-menu :is(.night-part-card,#night-picker-thumbnails .shop-product,.night-color-list .shop-product)::before,
#main-menu.night-menu :is(.night-part-card,#night-picker-thumbnails .shop-product,.night-color-list .shop-product)::after {
  content:''; position:absolute; pointer-events:none; clip-path:var(--menu-plate-shape);
}
#main-menu.night-menu :is(.night-part-card,#night-picker-thumbnails .shop-product,.night-color-list .shop-product)::before { inset:0; z-index:-2; background:var(--choice-edge); }
#main-menu.night-menu :is(.night-part-card,#night-picker-thumbnails .shop-product,.night-color-list .shop-product)::after { inset:1px; z-index:-1; background:var(--menu-plate-surface); }
#main-menu.night-menu :is(.night-part-card,#night-picker-thumbnails .shop-product,.night-color-list .shop-product) .shop-product-art { background:none; }
#main-menu.night-menu :is(.night-part-card,#night-picker-thumbnails .shop-product,.night-color-list .shop-product):is(.on,.inspecting,.is-selected) { --choice-edge:var(--menu-plate-accent); }

/* Shortcut badges stay outside their plates; the plate alone has clipped corners. */
#main-menu.night-menu #menu-lobby .hangar-reward-toggle { --choice-edge:var(--menu-plate-edge); --menu-plate-surface:var(--menu-plate-fill); isolation:isolate; background:transparent; border-color:transparent; border-radius:0; box-shadow:none; }
#main-menu.night-menu #menu-lobby .hangar-reward-toggle::before,
#main-menu.night-menu #menu-lobby .hangar-reward-toggle::after { content:''; position:absolute; clip-path:var(--menu-plate-shape); pointer-events:none; }
#main-menu.night-menu #menu-lobby .hangar-reward-toggle::before { inset:0; z-index:-2; background:var(--choice-edge); }
#main-menu.night-menu #menu-lobby .hangar-reward-toggle::after { inset:1px; z-index:-1; background:var(--menu-plate-surface); }
#main-menu.night-menu #menu-lobby .hangar-reward-toggle:hover { --choice-edge:var(--menu-plate-accent); }

#main-menu.night-menu :is(.career-button,.gear-btn,.pilot-account button,.night-picker-back,.night-picker-chevron,.night-purchase-actions button,.night-shop-part-actions button,.night-shop-tabs button,.shop-back,.menu-modes-back,.menu-row-chevron,.career-dialog button,.reward-action,#daily-quests-close,#pilot-license-close) {
  border-color:var(--menu-button-edge); border-radius:0; background:var(--menu-button-fill);
  color:var(--menu-plate-muted); box-shadow:none;
  transition:background .15s,border-color .15s,color .15s;
}
#main-menu.night-menu :is(.career-button,.gear-btn,.pilot-account button,.night-picker-back,.night-picker-chevron,.night-purchase-actions button,.night-shop-part-actions button,.night-shop-tabs button,.shop-back,.menu-modes-back,.menu-row-chevron,.career-dialog button,.reward-action,#daily-quests-close,#pilot-license-close):hover:not(:disabled) {
  border-color:#9bcfdb99; background:var(--menu-button-hover); color:#effcff;
}
#main-menu.night-menu :is(button,input,select):focus-visible { outline:2px solid var(--menu-plate-accent); outline-offset:-3px; }
#main-menu.night-menu :is(.night-shop-tabs button,.career-dialog button)[aria-pressed=true] { border-color:var(--menu-plate-accent); color:var(--menu-plate-accent); }
#main-menu.night-menu .new-player-reward-list [data-state=current] { --menu-card-frame:var(--menu-plate-accent); box-shadow:none; }

/* Keep primary actions distinct within the shared menu theme. */
#main-menu.night-menu :is(#btn-play,.menu-modes-deploy,[data-night-purchase-confirm]) { border:1px solid var(--ui-action); border-radius:0; background:var(--ui-action); color:var(--ui-on-action); box-shadow:none; }
#main-menu.night-menu #btn-play {
  --deploy-ink:#10191d;
  min-height:78px; padding:14px 82px 14px 22px; border:0;
  clip-path:var(--menu-plate-shape); color:var(--deploy-ink);
  background:var(--ui-action) var(--menu-deploy-image,url('../../../assets/generated/menu-ui/deploy-v3.png')) center / 100% 100% no-repeat;
  font-size:36px; font-style:italic; line-height:1; text-align:left;
  transition:filter .16s,transform .16s;
}
/* The sprinting Night silhouette is part of the generated artwork. */
#main-menu.night-menu #btn-play::after { display:none; }
#main-menu.night-menu #btn-play:hover:not(:disabled) { filter:brightness(1.1); transform:translateY(-1px); box-shadow:none; }
#main-menu.night-menu #btn-play:active:not(:disabled) { filter:brightness(.94); transform:translateY(1px); }
#main-menu.night-menu #btn-play:focus-visible { outline:2px solid var(--deploy-ink); outline-offset:-4px; }
#main-menu.night-menu #btn-play:disabled { filter:grayscale(.8); opacity:.55; transform:none; }
#main-menu.night-menu :is(#btn-play,.menu-modes-deploy,[data-night-purchase-confirm],[data-night-color-buy],[data-night-part-buy],#new-player-rewards .new-player-claim .reward-primary,#new-player-recovery .reward-primary) { font-family:var(--ui-display); font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
#main-menu.night-menu :is([data-night-color-buy],[data-night-part-buy]) { font-size:26px; }
#main-menu.night-menu [data-night-purchase-confirm] { font-size:22px; }
#main-menu.night-menu [data-night-purchase-preview] { border-color:var(--menu-plate-accent); color:var(--menu-plate-accent); }
#main-menu.night-menu .pilot-sync-gate > div { border-color:var(--menu-plate-edge); border-radius:0; background:var(--menu-plate-surface); clip-path:var(--menu-plate-shape); }

body.main-menu #settings { background:var(--menu-plate-fill); color:var(--menu-plate-text); }
body.main-menu #settings :is(.set-preset,.set-row) { position:relative; isolation:isolate; border:0; border-radius:0; background:var(--menu-plate-edge); clip-path:var(--menu-plate-shape); }
body.main-menu #settings :is(.set-preset,.set-row)::before { content:''; position:absolute; inset:1px; z-index:-1; background:var(--menu-plate-fill); clip-path:var(--menu-plate-shape); pointer-events:none; }
body.main-menu #settings :is(.set-close,.set-tab,.set-autobtn,.set-privacy-button,.set-choices button) { border-radius:0; border-color:var(--menu-button-edge); }
body.main-menu #settings :is(.set-close,.set-autobtn,.set-privacy-button) { background:var(--menu-button-fill); color:var(--menu-plate-muted); }

@media(max-width:1024px),(max-height:700px){
  #main-menu.night-menu #btn-play { min-height:48px; padding:10px 56px 10px 16px; font-size:25px; }
  #main-menu.night-menu #menu-lobby > .lobby-bottom .menu-mode { background:none; clip-path:none; }
  #main-menu.night-menu #menu-lobby > .lobby-bottom .menu-mode::before { display:none; }
}

@media(prefers-reduced-motion:reduce){
  #main-menu.night-menu :is(button,input,select) { transition:none; }
  #main-menu.night-menu #btn-play { transition:none; }
  #main-menu.night-menu #btn-play:is(:hover,:active):not(:disabled) { transform:none; }
}
