/* ===== Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fjalla+One&family=Noto+Sans:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');

/* ================= root variables ================= */
:root{
  /* Layout */
  --left: 33vw;
  --right: 67vw;
  --gap: 14px;
  --radius: 12px;
  --tabs-gap: 10px;
  --mf: 100%;

  /* Gun-safe brand */
  --gs-bg:   #21241e;   /* page bg */
  --gs-card: #3c4133;   /* card/panel bg */
  --gs-btn:  #970611;   /* buttons, active pills */
  --gs-sub:  #cfd4c8;   /* muted text */
  --gs-bd:   #4f5646;   /* borders */
  --gs-text: #D2D5CE;
  --ts-col:  #D2D5CE;
  --ts-white:  #ffffff;
  --bs-card-title-color: #ffffff;
  

  /* Back-compat */
  --stage-bg: var(--gs-bg);
  --accent:   var(--gs-btn);
  --accent-2: #eaeaea;
  --border:   var(--gs-bd);
  --muted:    var(--gs-sub);
}

/* ================= Base ================= */
html,body{height:100%;}
body{
  margin:0; overflow:hidden; background:var(--gs-bg);
  color:var(--ts-white);
  font-family: 'Roboto', -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  font-weight: 400;
}

h2,h3,h4,h5,h6{
  font-family: "Bebas Kai", "Bebas Neue", Impact, system-ui, sans-serif; 
  color:var(--ts-white);
  letter-spacing: 0.5px;
}

h1{
  font-family:"Fjalla One",Impact,system-ui,sans-serif;
  text-transform: uppercase;
  color:var(--ts-white);
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}

.card-title{
    color:var(--ts-white);
}

.drag-and-add-heading {
  font-family: "Noto Sans", sans-serif;
  text-transform: capitalize;
}

.ui-label{ font-weight: 500; }
.note{ font-weight: 300; }

.btn-danger{
  background-color: #970611;
  border-color: #970611;
}

/* App shell */
.app{display:flex; height:100vh; width:100vw;}
.app-hidden{ visibility: hidden; } /* hidden until boot videos end */
.no-scroll{ overflow: hidden !important; }

/* ===== Boot overlay ===== */



/* === FINAL FIXED CSS FOR BOOT SEQUENCE === */

/* Fullscreen overlay wrapper */
.boot-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
}

/* Stage container */
.boot-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Videos */
.boot-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  transition: opacity 0.6s ease;
  z-index: 1;
}

.boot-video.is-visible { opacity: 1; z-index: 1; }
.boot-video.is-hidden  { opacity: 0; z-index: 0; }

/* Loader + Label (always above videos) */
#bootProgressWrap,
#bootLabel {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;             /* ensures it's above everything */
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* When JS removes d-none → fade in */
#bootProgressWrap:not(.d-none),
#bootLabel:not(.d-none) {
  opacity: 1;
}

/* Loader bar styling */
#bootProgressWrap {
  bottom: 80px;
  width: 320px;
  height: 15px;
  background: #2a2e26;
  border-radius: 999px;
}

#bootProgress {
  background: #b30010;
  height: 100%;
  border-radius: inherit;
  color: #fff;
  font-weight: 600;
  text-align: center;
}

/* Label styling */
#bootLabel {
  bottom: 45px;
  font-size: 1rem;
  color: #ddd;
}

/* Optional: smoother fade */
.boot-progress, .boot-label {
  transition: opacity 0.4s ease;
}


.no-spin::-webkit-outer-spin-button,
.no-spin::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.no-spin[type=number] {
  -moz-appearance: textfield;
}



.custom-overlay {
  background-color: rgba(255, 255, 255, 0); 
  position: absolute;
  inset: 0;
  opacity: 1;             
  z-index: 9999;        
  display: none;           
  pointer-events: auto;   
}


.text-muted{
  color: var(--gs-text)!important;
}


a, .more-link{ color: var(--gs-text); text-decoration:none; }
a:hover, .more-link:hover{ color:#f0f0f0; text-decoration:none; }

/* Remove default blue focus */
.btn:focus, .form-control:focus, .nav-link:focus, .btn-check:focus + .btn {
  box-shadow: 0 0 0 .2rem rgba(128,0,12,.25) !important;
  border-color: var(--gs-btn) !important;
}

/* ================= LEFT MENU ================= */
.menu{
  width:var(--left);
  flex: 0 0 var(--left);
  min-width: var(--left);
  max-width: var(--left);
  background:var(--gs-bg);
  border-right:1px solid var(--gs-bd);
  display:flex; flex-direction:column; overflow:hidden;
}
.menu-inner{
  height:100%;
  display:flex; flex-direction:column;
  gap:var(--gap);
  padding: 0px 16px 0px 16px; overflow-y:auto;
  scrollbar-gutter: stable both-edges;
}

.safe-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.safe-head .cmv-logo{ height:32px; width:auto; }
.safe-head .title-right{ margin:0; flex:1; text-align:right; }
.safe-logo-top{ display:block; height:32px; width:auto; margin-bottom:.5rem; }
.safe-subhead{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.safe-subhead .title-right{ margin:0; text-align:right; }

/* Brand bar (menu screen) */
.menu-header .cmv-logo{ height:32px; width:auto; display:block; }
.menu-header .menu-back{ margin-top:.5rem; }

.brandbar{ display:flex; align-items:center; justify-content:space-between; }
.brand-logo{ height:28px; width:auto; }
.icon-btn{
  width:40px; height:40px; display:flex; align-items:center; justify-content:center;
  border-radius:8px; color:var(--gs-text);
  border:1px solid var(--gs-bd); background:var(--gs-card);
}
.icon-btn.active{ background:var(--gs-btn); color:#fff; border-color:var(--gs-btn); }

/* Tabs row — single line */
.btn-tabs{
  display:flex; align-items:center;
  gap:var(--tabs-gap);
  flex-wrap:nowrap; overflow-x:auto; white-space:nowrap;
  scrollbar-width: thin; padding: 10px 10px 10px 0px;
}
.btn-tabs .nav-link{
  border-radius:999px; padding:.5rem .9rem;
  color: var(--gs-text);
  border:1px solid var(--gs-bd);
  background:var(--gs-card);
  flex:0 0 auto;
  font-family:"Bebas Kai","Bebas Neue",Impact,system-ui,sans-serif;
  letter-spacing:.2px;
}
.btn-tabs .nav-link.active{
  background: var(--gs-btn);
  color:#fff;
  border-color: var(--gs-btn);
}

/* Brand button (maroon) */
.btn-brand{ background: var(--gs-btn); border-color: var(--gs-btn); color:#fff; }
.btn-brand:hover{ filter: brightness(1.08); color:#fff; }

/* Selected panel footer */
.selected-panel{ display: none; flex-direction: column; } /* keep column layout */
.selected-panel .sp-body{ flex:1 1 auto; max-height: 56vh; overflow:auto; }
.selected-panel .sp-footer {
  padding: .6rem .8rem;
  border-top: 1px solid var(--gs-bd);
  background: #353a2e;
  display: flex;
  gap: 10px;
}


.controls{ display:flex; align-items:center; gap:8px; }
.view-toggle .btn{
  width:40px; height:40px; display:flex; align-items:center; justify-content:center;
  border-radius:8px;
  color: var(--gs-text);
  background:var(--gs-card);
  border-color: var(--gs-bd);
}
.view-toggle .btn.active{
  background: var(--gs-btn);
  color:#fff;
  border-color: var(--gs-btn);
}

/* ================= Cards grid/list ================= */
.cards{
  --cols: 2;
  display:grid;
  grid-template-columns: repeat(var(--cols), minmax(0,1fr));
  gap:var(--gap);
}
.cards[data-view="list"]{ --cols: 1; }

.card{
  border-radius:var(--radius);
  border:1px solid var(--gs-bd);
  background:var(--gs-card);
  color:var(--gs-text);
  user-select: none;
}
.card .text-secondary{ color:var(--gs-sub) !important; }
.card-img-top{ border-top-left-radius:var(--radius); border-top-right-radius:var(--radius); }
.card-toggle{ cursor:pointer; }
.card img, .card-body { pointer-events: auto; }
/* ================= RIGHT STAGE ================= */
.stage-wrap{
  width:var(--right);
  display:flex; flex-direction:column; height:100vh; overflow:hidden;
  background:var(--gs-bg);
}

.toolbar a{ color: var(--accent-2); }
.toolbar a:hover{ color:#fff; }

.stage{
  position:relative; flex:1 1 auto;
  background:var(--stage-bg); overflow:visible;
}
.stage > img{ width:100%; height:100%; object-fit:cover; opacity:.25; }
.spinner-wrap{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; pointer-events:none; }

/* ================= Stage top toolbar (centered) ================= */


.vrule{ width:1px; height:28px; background: var(--gs-bd); }

/* ================= Stage footer controls ================= */
.stage-footer{
  position:absolute; right:16px; bottom:12px; z-index:2;
  display:flex; gap:16px; align-items:center; opacity:.95;
  border:1px solid var(--gs-bd);
}
.stage-controls{
  position:absolute; right:1rem; bottom:3.75rem;
  background: var(--gs-card);
  border:1px solid var(--gs-bd);
  border-radius:999px;
  box-shadow:0 6px 20px rgba(0,0,0,.25);
  overflow:visible;
}
.stage-controls .btn{
  background:transparent; color:var(--gs-text); border:0;
  font-family:"Bebas Kai","Bebas Neue",Impact,system-ui,sans-serif;
}
.stage-controls .dropdown-menu{
  z-index:2000; background:var(--gs-card); color:var(--gs-text); border-color:var(--gs-bd);
}
.dropup .dropdown-menu.show{
  inset:auto auto calc(100% + .5rem) 0 !important;
  transform:none !important;
}

/* Rounded dropdown card */
.dropdown-menu.rounded-card{
  border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.28);
  border:1px solid var(--gs-bd);
  padding:.5rem;
  background:var(--gs-card); color:var(--gs-text);
}
.dropdown-menu.rounded-card .dropdown-item{
  border-radius:10px; padding:.55rem .75rem; color:var(--gs-text);
}
.dropdown-menu.rounded-card .dropdown-item:hover{ background:#34392c; }

/* Zoom slider (also used by custom sliders) */
.zoom-panel { width: 280px; padding: .6rem .8rem; }
.zoom-row { display:flex; align-items:center; gap:.6rem; }
.zoom-range{
  -webkit-appearance:none; width:100%; height:6px; border-radius:999px;
  background:#2f332a; outline:none;
}
.zoom-range::-webkit-slider-thumb{
  -webkit-appearance:none; width:18px; height:18px; border-radius:50%;
  background:#d9d9d9; border:2px solid #262a22; box-shadow:0 2px 6px rgba(0,0,0,.25);
}
.zoom-range::-moz-range-thumb{
  width:18px; height:18px; border-radius:50%;
  background:#d9d9d9; border:2px solid #262a22;
}

/* ====== Custom Safe sliders styled like zoom ====== */
.range-box{
  width:100%;
  background:#2a2e26;
  border:1px solid var(--gs-bd);
  border-radius:999px;
  padding:.4rem .6rem;
  display:flex; align-items:center; gap:.6rem;
}
.range-box .range-btn{
  width:28px; height:28px; border-radius:999px; border:1px solid var(--gs-bd);
  background:transparent; color:#e0e0e0; display:flex; align-items:center; justify-content:center;
}
.range-box .range-btn:hover{ background:#34392c; }
.range-box .zoom-range{ flex:1; }

/* ================= Product Details modal ================= */
.product-modal .modal-content{ border-radius:14px; background:var(--gs-card); color:var(--gs-text); border:1px solid var(--gs-bd); }
.product-modal .modal-header{ border-bottom:0; padding-bottom:.25rem; }
.product-modal .modal-title{ font-weight:700; font-family:"Bebas Kai","Bebas Neue",Impact,system-ui,sans-serif; }
.product-modal .product-img{ position:relative; border-radius:12px; overflow:hidden; background:#2b2e27; }
.product-modal .product-img img{ width:100%; height:auto; display:block; }
.product-modal .brand{ color: var(--gs-sub); font-weight:500; }
.product-modal .title{ font-weight:700; font-size:1.05rem; }
.product-modal .cta-room{ border-radius:8px; border:1px solid var(--gs-bd); background: var(--gs-card); color: var(--gs-text); }
.product-modal .size-line{ font-size:.875rem; color: var(--gs-sub); }
.product-modal .accordion-button{ font-weight:700; color: #fff; background:var(--gs-card); }
.product-modal .accordion-button:not(.collapsed){ background: var(--gs-card); color:#fff; box-shadow:none; }
.product-modal .spec-row{ border-bottom:1px solid var(--gs-bd); padding:.9rem 0; background-color: transparent!important;}
.accordion-item{ background-color: transparent!important;}
.product-modal .spec-key{ color: var(--gs-text); margin-left: 10px; }
.product-modal .spec-val{ color:#fff; text-align: left;}
.product-modal .modal-footer{ justify-content:space-between; border-top:0; padding-top:0; }

/* ================= Size chips ================= */
.size-row .label { color:var(--gs-sub); }
.size-chips{ display:flex; flex-wrap:wrap; gap:.5rem; }
.btn-size{
  background:#2a2e26 !important; border:1px solid var(--gs-bd) !important; color:#fff !important;
  padding:.35rem .6rem; line-height:1; border-radius:.6rem; font-size:.875rem;
}
.btn-size:hover{ background:#34392c !important; }
.btn-size.active{ background:#4b513f !important; border-color:#606853 !important; font-weight:600; }
.card-hr{ height:1px; background:var(--gs-bd); margin:.75rem 0; }

.menu-card{ min-width: 220px; }
.menu-heading{ font-weight:700; color:#fff; padding:.25rem .5rem .5rem; }
.menu-powered{ font-size:.85rem; color:var(--gs-sub); display:flex; gap:.35rem; align-items:center; }

.rating-stars .btn{
  width:34px; height:34px; padding:0; display:flex; align-items:center; justify-content:center;
  border:0; background:transparent; color:#9aa090;
}
.rating-stars .btn.active,
.rating-stars .btn:hover,
.rating-stars .btn:hover ~ .btn { color:#fff; }

/* ================= Filters offcanvas ================= */
.filters-offcanvas{ width:360px; max-width:90vw; border-right:1px solid var(--gs-bd); background:var(--gs-card); color:var(--gs-text); }
.filters-offcanvas .offcanvas-body{ padding:16px; }
.filters-offcanvas .rak-logo{ height:28px; width:auto; }
.filters-offcanvas .list-btn{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; padding:10px 4px; width:100%; background:transparent; border:0;
  border-radius:8px; color:#fff; text-align:left;
}
.filters-offcanvas .list-btn:hover{ background:#34392c; }
.filters-offcanvas .f-row{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 4px; margin:0; border-radius:8px; cursor:pointer;
}
.filters-offcanvas .f-row:hover{ background:#34392c; }
.filters-offcanvas .form-check-input{ float:none; margin:0; width:18px; height:18px; border-radius:4px; background:#262a22; border-color:var(--gs-bd); }
.filters-offcanvas .form-check-input:checked{ background-color:var(--gs-btn); border-color:var(--gs-btn); }
.filters-offcanvas .overflow-auto{ scrollbar-width: thin; }
.filters-offcanvas .overflow-auto::-webkit-scrollbar{ width:8px; }
filters-offcanvas .overflow-auto::-webkit-scrollbar-thumb{ background:#3a3f32; border-radius:999px; }

/* ================= Selected panel ================= */
.selected-panel {
  position: absolute;
  left: 1rem;
  bottom: 5.75rem;
  width: 360px;
  max-width: 48vw;
  max-height: calc(100% - 2rem);
  background: var(--gs-card);
  border: 1px solid var(--gs-bd);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
  display: none;
  overflow: hidden;
  color: #fff;
}
.selected-panel .sp-header{ display:flex; align-items:center; justify-content:space-between; padding:.6rem .8rem; border-bottom:1px solid var(--gs-bd); background:#353a2e; }
.selected-panel .sp-body{ max-height:56vh; overflow:auto; }
.selected-panel .sp-section{ padding:10px 14px 4px; text-transform:uppercase; font-size:.78rem; font-weight:700; color:var(--gs-sub); }
.selected-panel .sp-item{ display:flex; gap:10px; align-items:flex-start; padding:10px 14px; }
.selected-panel .sp-thumb{ width:48px; height:48px; object-fit:cover; border-radius:8px; background:#2b2e27; }
.selected-panel .sp-title{ font-weight:700; margin:0; }
.selected-panel .sp-brand{ font-size:.85rem; color:var(--gs-sub); }
.selected-panel .sp-actions .btn{ color:#bfc5b6; }
.selected-panel .sp-actions .btn:hover{ color:#970611; }
#selectedToggle {
  /* position:absolute; 
  right:1rem; 
  top:.75rem;  */
  
  border: 1px solid var(--gs-bd);
  border-radius: 999px;
  background: var(--gs-card);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
  color: #fff;
}
#deleteelements {
  /* position: absolute;
  bottom: max(1rem, 2vh);
  left: max(1rem, 2vw);
  z-index: 9999; */
  display: none;
}

.bottom-elements {
  position: absolute;
  bottom: max(1rem, 2vh);
  left: max(1rem, 2vw);
  z-index: 9999;
  display: inherit;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.bottom-text {
  position: fixed;
  bottom: max(1rem, 2vh);
  right: max(1rem, 2vw);
  z-index: 9999;
}

.bottom-text img {
  width: 150px;
}


.menu-inner::-webkit-scrollbar {
  width: 8px;
}

.menu-inner::-webkit-scrollbar-track {
  background: var(--gs-bg);
  border-radius: 8px;
}

.menu-inner::-webkit-scrollbar-thumb {
  background-color: var(--gs-btn);
  border-radius: 8px;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  opacity: 0.6;
}

.menu-inner:hover::-webkit-scrollbar-thumb,
.menu-inner::-webkit-scrollbar-thumb:hover {
  opacity: 1;
}




/* highlight selected card */
.card.is-selected{ border:2px solid var(--gs-btn); outline-offset:0; border-radius:.75rem; }

/* Sticky aside header */
.menu-sticky{
  position: sticky; top: 0; z-index: 25;
  background: var(--gs-bg);
  border-bottom: 1px solid var(--gs-bd);
  padding: 20px 0px 10px 0px;
}

/* Wizard cards */
.safe-setup{ background: var(--gs-bg); border:1px solid var(--gs-bd); border-radius:12px; padding:12px; }
.safe-grid{ display:grid; grid-template-columns:1fr; gap:10px; }
.safe-option{
  display:flex; gap:10px; align-items:center; text-align:left;
  width:100%; border:1px solid var(--gs-bd); background:var(--gs-card);
  color:#fff; border-radius:10px; padding:10px;
}
.safe-option:hover{ background:#34392c; }
.safe-option .thumb{ width:140px; border-radius:8px; }
.safe-option .title{ font-family:"Bebas Kai","Bebas Neue",Impact,system-ui,sans-serif; font-size:1.25rem; }
.safe-option .desc{ color:var(--gs-sub); font-size:.9rem; }

.predef-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.predef-item,.manufacturer-item{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:6px; border:1px solid var(--gs-bd); background:var(--gs-card);
  color:#fff; border-radius:10px; padding:10px;
}
.predef-item .thumb,.manufacturer-item .thumb{ width:100%; border-radius:8px; }
.predef-item.active,.manufacturer-item.active{ border:1px solid var(--gs-btn); }

/* ===== FORCE ONLY ACTIVE TAB-PANES VISIBLE ===== */
.tab-content > .tab-pane{ display:none !important; }
.tab-content > .tab-pane.show.active{ display:block !important; }
.tab-content > .tab-pane.show.active.d-flex{ display:flex !important; }


/* ==== Iframe ====*/

.iframe-class{
  width:100%; 
  height:100vh; 
  border:0;
}


.selected-item {
  border: 1px solid var(--gs-bd);
  border-radius: 10px;
  background: var(--gs-card);
  padding: .6rem .75rem;
}

.item-thumb {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
}

.qty-controls button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.qty-val {
  min-width: 20px;
  text-align: center;
  font-weight: 600;
}


#deleteelements {
  transition: opacity 0.3s ease, transform 0.2s ease;
}
#deleteelements:hover {
  opacity: 0.85;
  transform: scale(1.05);
}


.product-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  position: relative;
}
.product-color::after, .product-image::after {
  content: attr(data-title);
  position: absolute;
  bottom: 130%;  
  left: 50%;
  transform: translateX(-50%);
  background-color: #000;
  color: #fff;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
  z-index: 10;
}
.product-color::before, .product-image::before {
  content: "";
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #000 transparent transparent transparent;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.product-color:hover::after,
.product-color:hover::before,
.product-image:hover::after,
.product-image:hover::before {
  opacity: 1;
}
.product-color.active, .product-image.active {
  outline: 2px solid rgb(221, 218, 218);
  outline-offset: 2px;
}
.product-image {
  width: 50px;
  position: relative;
}
.product-image img {
  width: 100%;
}



/* small screens */
@media (max-width: 992px){
  .app{ flex-direction:column; }
  .menu,.stage-wrap{ width:100vw; }
  body{ overflow:auto; }
}

/*@media (max-width: 1200px){*/
  
/*}*/

/* Tablet ~992px */
@media (max-width: 992px){
      .menu {
        flex: 1 1 var(--left);
        border: none;
        max-width: var(--mf);
        order: 2;
      }
      .stage-wrap{
        height: 50vh;
      }
      .menu-inner{
        margin: 0px 16px 0px 16px;
      }
      .selected-panel {
        left: 3rem;
        bottom: 4.75rem; 
        max-width: 100vw;
      }
      .selected-panel .sp-body {
        max-height: 23vh;
      }
     
      .navbar.d-lg-none {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
        width: 100%;
      }
      .iframe-class{
        height:50vh; 
      }
      .stage-controls {
        bottom: 1.75rem;
      }
      #selectedToggle {
        bottom: 1.75rem;
      }
  
}

/* Mobile ~768px and below => 50/50 */
@media (max-width: 768px){
  .menu {
    flex: 1 1 var(--left);
    border: none;
    max-width: var(--mf);
    order: 2;
  }
  .stage-wrap{
    height: 50vh;
  }
  .menu-inner{
    margin: 0px 16px 0px 16px;
  }
  .selected-panel {
    left: 7rem;
    bottom: 1.75rem; 
    max-width: 100vw;
    width: 250px;
  }
  .selected-panel .sp-body {
    max-height: 23vh;
  }
  
  .bottom-text {
     bottom: max(26rem, 2vh);
  }
  
  .bottom-text img {
    width: 70px;
   }
 
  .navbar.d-lg-none {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
  }
  .iframe-class{
    height:50vh; 
  }
  .stage-controls {
    bottom: 1.75rem;
  }
  #selectedToggle {
    bottom: 1.75rem;
  }
  #bootProgressWrap { bottom: 56px; width: 70vw; height: 10px; }
  #bootLabel        { bottom: 28px; font-size: .9rem; }
  .boot-video{ object-fit: contain; }
}


@media (orientation: portrait) {
  #bootIntro { object-position: 40% 50%; }  /* x% y% — tweak until it looks right */
  #bootBrand { object-position: 50% 45%; }
}


@media screen 
  and (orientation: portrait)
  and (min-height: 3800px)
  and (max-height: 3900px) {

  .app {
    display: flex;
    flex-direction: column; /* Stack vertically */
    height: 100vh;
    width: 100vw;
    overflow: hidden;
  }

  /* 🟩 Stage (iframe area) — order 1, upper half */
  .stage-wrap {
    order: 1;
    width: 100vw;
    height: 50vh; /* Half of screen height */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--gs-bg);
  }

  /* 🟦 Menu section — order 2, lower half */
     .menu {
      order: 2;
      width: 100%;
      height: 50vh;
      max-width: 100%;
      display: flex;
      flex-direction: column;
      overflow: hidden; /* 👈 prevent unwanted internal scroll */
    }
    
    .menu-inner {
      flex: 1; /* 👈 fills all available height automatically */
      display: flex;
      flex-direction: column;
      gap: var(--gap);
      padding: 0 10px;
      overflow-y: auto;
      box-sizing: border-box; /* 👈 ensures padding is included in total height */
    }
      
  .stage-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
  }

 .selected-panel {
    left: 7rem;
    bottom: 1.75rem; 
    max-width: 100vw;
    width: 250px;
  }
  
  .selected-panel .sp-body {
    max-height: 23vh;
  }

 
  .stage-controls {
    bottom: 1.75rem;
  }
  
  #selectedToggle {
    bottom: 1.75rem;
  }
  
  #bootProgressWrap { bottom: 56px; width: 70vw; height: 10px; }
  #bootLabel        { bottom: 28px; font-size: .9rem; }
  .boot-video{ object-fit: contain; }
  
}

