:root{
  --font-body: Arial, Helvetica, sans-serif;
  --font-brand: 'Brandon Grotesque', 'BrandonGrotesque', 'Brandon Grot W01', Montserrat, Arial, sans-serif;
  --fern-green: #a5c422;
}
.hmd-brand{
  font-family: var(--font-brand);
  font-weight: inherit;
  letter-spacing: normal;
  text-transform: none;
}
.hmd-brand .hmd-md{ color: var(--fern-green); }
.hmd-brand sup{
  font-family: var(--font-brand);
  font-size: 0.65em;
  vertical-align: super;
  line-height: 0;
}
.hmd-tagline{
  color: var(--fern-green);
  font-style: normal;
}
.hmd-tagline sup.hmd-tm{
  color: #000;
  font-family: var(--font-body);
  font-size: 0.65em;
  font-weight: normal;
  vertical-align: super;
  line-height: 0;
}
  :root{
    --ink:#0E0A16; --ink-2:#171024; --ink-3:#221836;
    --tissue:#74C2B7; --tissue-pale:#C7EDE6;
    --pulse:#FF6A57; --pulse-hot:#FFC36B;
    --lilac:#A99BC4; --paper:#ECE7F4;
    --line:rgba(169,155,196,0.18);
    --maxw:1240px;
    --bar-h:102px;
    --font-sans: var(--font-body);
    --font-serif: var(--font-body);
    --font-mono: var(--font-body);
  }
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
    margin:0;
    background:
      radial-gradient(120% 90% at 78% 8%, rgba(116,194,183,0.10), transparent 55%),
      radial-gradient(90% 80% at 18% 90%, rgba(255,106,87,0.10), transparent 55%),
      var(--ink);
    color:var(--paper);
    font-family:var(--font-sans);
    font-size:17px; line-height:1.55; -webkit-font-smoothing:antialiased;
    overflow-x:hidden;
}
a{ color:inherit; }
.wrap{ max-width:var(--maxw); margin:0 auto; padding:0 28px; }

header.bar{ position:sticky; top:0; z-index:40;
    background:#ffffff; border-bottom:1px solid #e7e2ee; }
.bar .wrap{ display:flex; align-items:center; justify-content:center; height:var(--bar-h); }
.bar-inner{ display:flex; align-items:center; justify-content:center; width:100%; position:relative; }
.menu-btn{ display:none; align-items:center; justify-content:center; width:44px; height:44px; padding:0;
    border:none; background:transparent; cursor:pointer; flex-shrink:0; border-radius:6px; color:var(--ink); }
.menu-btn.info-menu-btn{ display:flex; position:absolute; right:0; top:50%; transform:translateY(-50%); z-index:2; }
.menu-btn:focus-visible{ outline:2px solid var(--pulse); outline-offset:2px; }
.menu-icon{ display:block; width:20px; height:2px; background:currentColor; border-radius:1px; position:relative; transition:background .15s; }
.menu-icon::before, .menu-icon::after{ content:""; position:absolute; left:0; width:20px; height:2px; background:currentColor; border-radius:1px; transition:transform .15s, top .15s; }
.menu-icon::before{ top:-6px; }
.menu-icon::after{ top:6px; }
body.mobile-menu-open #mobileMenuBtn .menu-icon{ background:transparent; }
body.mobile-menu-open #mobileMenuBtn .menu-icon::before{ top:0; transform:rotate(45deg); }
body.mobile-menu-open #mobileMenuBtn .menu-icon::after{ top:0; transform:rotate(-45deg); }
body.info-menu-open #infoMenuBtn .menu-icon{ background:transparent; }
body.info-menu-open #infoMenuBtn .menu-icon::before{ top:0; transform:rotate(45deg); }
body.info-menu-open #infoMenuBtn .menu-icon::after{ top:0; transform:rotate(-45deg); }
.bar-spacer{ display:none; width:44px; flex-shrink:0; }
.mobile-menu-backdrop{ display:none; position:fixed; inset:var(--bar-h) 0 0 0; z-index:45; background:rgba(14,10,22,.55); border:none; padding:0; cursor:pointer; }
body.mobile-menu-open .mobile-menu-backdrop{ display:block; }
@media (max-width:768px){
    body.mobile-menu-open .mobile-menu-backdrop{ left:min(300px,92vw); }
}
.brand{ display:flex; align-items:center; justify-content:center; text-decoration:none; line-height:0; flex:1; }
.brand-logo{ display:block; height:90px; width:auto; max-width:min(675px, 78vw); object-fit:contain; }
.btn{ font-family:var(--font-body); font-size:12.5px; letter-spacing:.06em; text-transform:uppercase;
    text-decoration:none; padding:11px 18px; border-radius:2px; border:1px solid var(--line); transition:.2s; white-space:nowrap; cursor:pointer; background:none; color:inherit; }
.btn:hover{ border-color:var(--tissue); color:var(--tissue-pale); }
.btn.solid{ background:var(--pulse); color:#190a06; border-color:var(--pulse); font-weight:500; }
.btn.solid:hover{ background:var(--pulse-hot); border-color:var(--pulse-hot); color:#190a06; }
.hero{ position:relative; padding-top:0; }
.hero .wrap{ max-width:none; padding:0; }
.hero .grid{ display:block; min-height:calc(100vh - var(--bar-h)); }

.stage-shell{ position:relative; align-self:stretch; height:calc(100vh - var(--bar-h)); height:calc(100dvh - var(--bar-h)); min-height:320px; contain:layout size style; }
#stage{ position:relative; width:100%; height:100%; min-height:320px; border-radius:0; overflow:hidden;
    border:1px solid var(--line); background:radial-gradient(120% 120% at 50% 30%, #1b1430, #0c0813 70%); }
#brain-canvas{ position:absolute; inset:0; width:100%; height:100%; display:block; cursor:grab; aspect-ratio:auto; }
#brain-canvas:active{ cursor:grabbing; }

.viewer-empty{ position:absolute; inset:0; z-index:5; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; text-align:center; padding:30px; pointer-events:none; }
.viewer-empty.hide{ display:none; }
.viewer-empty .ico{ width:46px; height:46px; opacity:.6; }
.viewer-empty h4{ font-family:var(--font-body); font-weight:400; font-size:22px; margin:0; }
.viewer-empty p{ color:var(--lilac); font-size:14px; max-width:38ch; margin:0; }

.toolbar{ position:absolute; top:14px; left:14px; right:14px; z-index:6; display:flex; gap:8px; flex-wrap:wrap; align-items:flex-start; pointer-events:none; }
.toolbar > *{ pointer-events:auto; }
.tool-btn{ font-family:var(--font-body); font-size:11px; letter-spacing:.06em; text-transform:uppercase;
    background:rgba(23,16,36,.74); border:1px solid var(--line); color:var(--lilac); padding:8px 11px; border-radius:3px;
    cursor:pointer; backdrop-filter:blur(6px); transition:.15s; display:inline-flex; gap:7px; align-items:center; }
.tool-btn:hover{ color:var(--paper); border-color:rgba(169,155,196,.4); }
.tool-btn[data-active="true"]{ color:var(--tissue-pale); border-color:var(--tissue); }

.panel{ position:absolute; z-index:6; background:rgba(18,12,30,.82); border:1px solid var(--line);
    border-radius:5px; padding:13px 14px; backdrop-filter:blur(8px); width:222px; }
.panel h5{ font-family:var(--font-body); font-size:10.5px; letter-spacing:.14em; text-transform:uppercase;
    color:var(--lilac); margin:0 0 11px; display:flex; justify-content:space-between; align-items:center; }
.panel.slices{ left:14px; bottom:14px; }
.panel.structures{ right:14px; top:60px; bottom:14px; width:236px; display:flex; flex-direction:column; }
.panel.cover{ right:14px; top:60px; bottom:auto; width:236px; max-width:calc(100vw - 28px); min-height:248px; }
.panel.panel-pending{ visibility:hidden; pointer-events:none; }
.panel.structures .struct-list{ min-height:160px; }
.panel.painting{ min-height:280px; }
.panel.slices{ min-height:196px; }
.panel.cover .cover-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:13px; margin-top:8px; }
.panel.cover .cover-section{ margin-top:10px; padding-top:8px; border-top:1px solid rgba(255,255,255,.08); font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:rgba(255,255,255,.45); }
.panel.cover .cover-row + .cover-row{ margin-top:6px; }
.panel.cover .cover-hint{ font-size:11.5px; color:var(--lilac); line-height:1.45; margin:10px 0 0; }
.panel.painting{ left:14px; top:60px; width:248px; max-height:calc(100% - 88px); overflow-y:auto; }
.panel.painting h5{ display:flex; justify-content:space-between; align-items:center; }
.panel.painting .hint{ font-size:11.5px; color:var(--lilac); line-height:1.5; margin:0 0 12px; }
.panel.painting .row{ margin-bottom:11px; } .panel.painting .row:last-child{ margin-bottom:0; }
.panel.painting .lab2{ display:flex; justify-content:space-between; font-size:12px; color:var(--lilac); margin-bottom:5px; }
.panel.painting .twocol{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.panel.painting .flip-row{ display:flex; align-items:center; justify-content:space-between; font-size:12.5px; margin-bottom:11px; }
.panel.painting .ghostbtn{ width:100%; margin-top:2px; }
.panel.painting textarea{ width:100%; height:50px; background:var(--ink-3); color:var(--paper); border:1px solid var(--line);
    border-radius:4px; font-family:var(--font-body); font-size:10px; padding:6px; resize:none; box-sizing:border-box; }
.slice-row{ margin-bottom:12px; }
.slice-row:last-child{ margin-bottom:0; }
.slice-row .lab{ display:flex; align-items:center; justify-content:space-between; font-size:12.5px; margin-bottom:6px; }
.slice-row .lab .name{ display:flex; align-items:center; gap:8px; }
.slice-row .dotc{ width:9px; height:9px; border-radius:2px; }
.switch{ position:relative; width:30px; height:16px; border-radius:9px; background:var(--ink-3); border:1px solid var(--line); cursor:pointer; transition:.15s; flex:none; }
.switch::after{ content:""; position:absolute; top:1px; left:1px; width:12px; height:12px; border-radius:50%; background:var(--lilac); transition:.15s; }
.switch[data-on="true"]{ background:rgba(116,194,183,.3); border-color:var(--tissue); }
.switch[data-on="true"]::after{ left:15px; background:var(--tissue); }
input[type=range]{ -webkit-appearance:none; appearance:none; width:100%; height:3px; border-radius:2px; background:var(--ink-3); outline:none; }
input[type=range]::-webkit-slider-thumb{ -webkit-appearance:none; width:13px; height:13px; border-radius:50%; background:var(--paper); border:2px solid var(--ink); cursor:pointer; }
input[type=range]::-moz-range-thumb{ width:13px; height:13px; border-radius:50%; background:var(--paper); border:2px solid var(--ink); cursor:pointer; }
input[type=range]:disabled{ opacity:.35; }
.opacity-row{ margin-top:4px; }
.opacity-row .lab{ display:flex; justify-content:space-between; font-size:12.5px; margin-bottom:6px; }

.struct-list{ overflow-y:auto; margin:0; padding:0; list-style:none; flex:1; }
.struct-list li{ display:flex; align-items:center; gap:9px; padding:7px 4px; border-radius:3px; cursor:pointer; font-size:13px; transition:.12s; }
.struct-list li:hover{ background:rgba(169,155,196,.08); }
.struct-list li[data-sel="true"]{ background:rgba(255,106,87,.12); }
.struct-list li .eye{ width:14px; height:14px; flex:none; opacity:.5; }
.struct-list li[data-vis="false"]{ opacity:.4; }
.struct-list .nm{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.struct-empty{ color:var(--lilac); font-size:12.5px; line-height:1.5; }

.label-card{ position:absolute; left:14px; bottom:14px; z-index:7; width:230px; background:rgba(23,16,36,.94);
border:1px solid var(--line); border-left:2px solid var(--pulse); border-radius:4px; padding:13px 14px;
backdrop-filter:blur(8px); opacity:0; transform:translateY(8px); transition:.22s; pointer-events:none; }
.label-card.show{ opacity:1; transform:none; }
.label-card .rtype{ font-family:var(--font-body); font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:var(--pulse); margin:0 0 5px; }
.label-card .rname{ font-family:var(--font-body); font-size:18px; margin:0 0 6px; line-height:1.15; }
.label-card .rdesc{ font-size:12.5px; color:var(--lilac); margin:0; line-height:1.5; }

.skull-bone-tip, .anatomy-tip{ position:fixed; z-index:10001; pointer-events:none; max-width:240px;
padding:8px 12px; border-radius:4px; background:rgba(23,16,36,.94); border:1px solid var(--line);
border-left:2px solid var(--pulse); color:var(--paper); font-family:var(--font-body); font-size:15px;
line-height:1.2; backdrop-filter:blur(8px); box-shadow:0 8px 24px rgba(0,0,0,.35);
transform:translate(12px, 12px); opacity:0; transition:opacity .12s; }
.skull-bone-tip.show, .anatomy-tip.show{ opacity:1; }

.stage-loading{ position:absolute; inset:0; z-index:8; display:flex; align-items:center; justify-content:center;
font-family:var(--font-body); font-size:12px; letter-spacing:.18em; text-transform:uppercase;
color:var(--lilac); background:rgba(12,8,19,.85); transition:opacity .4s; text-align:center; padding:24px; }
.stage-loading.hide{ opacity:0; pointer-events:none; }
#stage.drop{ outline:2px dashed var(--tissue); outline-offset:-8px; }

@media (max-width:980px){
.hero .grid{ grid-template-columns:1fr; }
.stage-shell{ order:-1; margin-bottom:30px; }
.panel.structures{ position:relative; right:auto; top:auto; bottom:auto; width:100%; max-height:200px; margin-top:10px; }
.panel.painting{ position:relative; left:auto; top:auto; width:100%; max-height:280px; margin-top:10px; }
}
@media (max-width:768px){
:root{ --bar-h:235px; }
.bar .wrap{ padding:0 8px; overflow:visible; }
header.bar{ overflow:visible; }
.bar-inner{ justify-content:center; }
.bar-spacer{ display:none !important; }
.menu-btn{ display:flex; width:56px; height:56px; }
#mobileMenuBtn{ position:absolute; left:0; top:50%; transform:translateY(-50%); z-index:3; }
.menu-btn.info-menu-btn{ width:56px; height:56px; z-index:3; }
#mobileMenuBtn:not(.is-ready){ visibility:hidden; pointer-events:none; }
.brand{
  position:absolute; left:50%; transform:translateX(-50%);
  width:100vw; flex:none; z-index:1;
}
.brand-logo{ height:210px; width:auto; max-width:none; margin:0 auto; display:block; }
.menu-icon, .menu-icon::before, .menu-icon::after{ width:24px; }
.menu-icon::before{ top:-7px; }
.menu-icon::after{ top:7px; }
.panel.cover .cover-row{ font-size:14px; margin-top:10px; }
.panel.cover .switch{ width:36px; height:20px; }
.panel.cover .switch::after{ width:16px; height:16px; }
.panel.cover .switch[data-on="true"]::after{ left:17px; }
#attribution{ font-size:9px; max-width:calc(100vw - 24px); line-height:1.35; }
}
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }
#buildBadge{ position:fixed; right:12px; bottom:130px; z-index:9999; font-family:var(--font-body);
    font-size:10.5px; letter-spacing:.04em; color:var(--lilac); background:rgba(14,10,22,.88);
    border:1px solid var(--line); border-radius:4px; padding:6px 10px; backdrop-filter:blur(6px); pointer-events:none; }
#buildBadge b{ color:var(--tissue-pale); } #buildBadge.warn b{ color:var(--pulse); }

/* ===== CLEAN MODE: hide all visible text/UI chrome, leaving only the 3D canvas. =====
     Elements are hidden via CSS rather than removed from the DOM, so existing JS that
     references them by id (toolbar buttons, panels, badge) keeps working without errors —
     it just has nothing visible to click. Functionality (drag-to-rotate, auto-rotate,
     occipital highlight) still runs; there is simply no on-screen UI for it anymore. */
.toolbar, .panel:not(#coverPanel), #buildBadge, #emptyState, footer, .label-card { display:none !important; }
@media (min-width:769px){
    #coverPanel.panel.cover.is-ready{ display:flex !important; flex-direction:column; }
}
@media (max-width:768px){
    #coverPanel.panel.cover{ display:none !important; }
    #coverPanel.panel.cover.is-ready.mobile-visible{
      display:flex !important; flex-direction:column;
      position:fixed !important; top:var(--bar-h) !important; left:0 !important; right:auto !important; bottom:0 !important;
      width:min(300px, 92vw) !important; max-width:none !important; margin:0 !important;
      border-radius:0 8px 8px 0 !important; z-index:12002 !important; max-height:none !important;
      overflow-y:auto; -webkit-overflow-scrolling:touch; pointer-events:auto; touch-action:manipulation;
    }
    #coverPanel.panel.cover.is-ready.mobile-visible .cover-row{ cursor:pointer; -webkit-tap-highlight-color:transparent; }
    #coverPanel.panel.cover.is-ready.mobile-visible .switch{ flex:none; touch-action:manipulation; }
}
#stage { top:0 !important; }

#attribution{ position:fixed; left:10px; bottom:8px; z-index:9998; font-size:10px; line-height:1.4;
    color:rgba(255,255,255,.45); font-family:var(--font-body); pointer-events:none; max-width:340px; }
#attribution a{ color:rgba(255,255,255,.6); text-decoration:underline; pointer-events:auto; }
#attribution .attribution-legal{ display:block; margin-top:6px; pointer-events:auto; }
#attribution .attribution-link{
    font:inherit; font-family:inherit; color:rgba(255,255,255,.6); text-decoration:underline;
    background:none; border:none; padding:0; cursor:pointer;
}
#attribution .attribution-link:hover{ color:rgba(255,255,255,.85); }

.hidden-seo-content{
    position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden;
}
.hidden-seo-content a{ color:inherit; }
.sr-only{
    position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
    clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

.admin-button-container{
    position:fixed; bottom:20px; right:20px; z-index:10000;
    display:flex; flex-direction:column; align-items:stretch; gap:8px;
}
.admin-btn{
    display:inline-block; padding:12px 30px; background-color:#2c3e50; color:#fff;
    border:none; border-radius:5px; cursor:pointer; font-size:16px; font-family:var(--font-body);
    text-decoration:none; min-height:44px; line-height:1.2; text-align:center;
    transition:background-color .3s ease; box-shadow:0 2px 8px rgba(0,0,0,.35);
}
.admin-btn:hover{ background-color:#1a252f; color:#fff; }
.admin-btn:disabled{ opacity:.55; cursor:not-allowed; }
@media (max-width:768px){
    .admin-button-container{ bottom:16px; right:16px; }
    .admin-btn{ padding:10px 22px; font-size:15px; }
    #buildBadge{ bottom:280px; right:10px; }
}

.info-menu-panel{
    display:none; position:fixed; top:var(--bar-h); right:12px; z-index:12000; min-width:240px;
    background:rgba(18,12,30,.96); border:1px solid var(--line); border-radius:8px;
    padding:8px 0; box-shadow:0 12px 40px rgba(0,0,0,.45); backdrop-filter:blur(10px);
}
body.info-menu-open .info-menu-panel{ display:block; }
.info-menu-panel button{
    display:block; width:100%; text-align:left; padding:12px 18px; border:none; background:transparent;
    color:var(--paper); font-family:var(--font-body); font-size:15px; cursor:pointer;
}
.info-menu-panel button:hover{ background:rgba(255,255,255,.06); color:var(--tissue-pale); }
.info-menu-backdrop{
    display:none; position:fixed; inset:0; z-index:11999; background:transparent; border:none; padding:0; cursor:default;
}
body.info-menu-open .info-menu-backdrop{ display:block; }

.hmd-modal{
    display:none; position:fixed; inset:0; z-index:13000; background:rgba(8,6,14,.72);
    align-items:center; justify-content:center; padding:20px; box-sizing:border-box;
}
.hmd-modal.is-open{ display:flex; }
.hmd-modal-box{
    position:relative; background:#fff; color:#2c2c2c; border-radius:8px; width:min(520px,100%);
    max-height:min(88vh,720px); overflow-y:auto; padding:28px 26px 24px; box-shadow:0 20px 50px rgba(0,0,0,.35);
}
.hmd-modal-box.wide{ width:min(640px,100%); }
.hmd-modal-box h2{ margin:0 0 14px; font-family:var(--font-body); font-weight:600; font-size:26px; color:#2c3e50; }
.hmd-modal-box h3{ margin:18px 0 8px; font-size:17px; color:#2c3e50; }
.hmd-modal-box p, .hmd-modal-box li{ font-size:15px; line-height:1.55; color:#333; }
.hmd-modal-box ul{ margin:0 0 12px; padding-left:20px; }
.hmd-modal-close{
    position:absolute; top:10px; right:12px; width:40px; height:40px; border:none; background:transparent;
    font-size:28px; line-height:1; color:#666; cursor:pointer; border-radius:6px;
}
.hmd-modal-close:hover{ background:#f0f0f0; color:#222; }
.hmd-modal-box .form-group{ margin-bottom:14px; }
.hmd-modal-box label{ display:block; font-size:14px; font-weight:600; margin-bottom:6px; color:#2c3e50; }
.hmd-modal-box input[type=text], .hmd-modal-box input[type=password]{
    width:100%; box-sizing:border-box; padding:10px 12px; border:1px solid #ccc; border-radius:4px; font-size:15px;
}
.hmd-modal-box .login-btn{
    width:100%; padding:12px; background:#2c3e50; color:#fff; border:none; border-radius:5px;
    font-size:16px; cursor:pointer; margin-top:6px;
}
.hmd-modal-box .login-btn:hover{ background:#1a252f; }
.hmd-modal-box .error-message{ color:#c0392b; margin-top:12px; font-size:14px; display:none; }
.hmd-modal-box .toggle-password{
    display:inline-block; margin-top:6px; font-size:13px; color:#2c3e50; cursor:pointer; text-decoration:underline;
}
.loc-map-wrap{ margin:12px 0 16px; border-radius:8px; overflow:hidden; border:1px solid #ddd; background:#eef3f8; }
.loc-map-wrap img{ display:block; width:100%; height:auto; vertical-align:top; }
.loc-cards{ display:grid; gap:12px; }
.loc-card{
    display:block; padding:14px 16px; border:1px solid #e0e0e0; border-radius:6px; text-decoration:none; color:inherit;
    transition:background .15s, border-color .15s;
}
.loc-card:hover{ background:#f7faf5; border-color:#a5c422; }
.loc-card strong{ display:block; font-size:16px; color:#2c3e50; margin-bottom:4px; }
.loc-card span{ font-size:14px; color:#555; }

.hmd-modal-box.welcome-box{ text-align:center; width:min(480px,100%); }
.welcome-logo{ display:block; width:min(350px,88%); height:auto; margin:0 auto 20px; }
.welcome-box p{ text-align:left; margin:0 0 12px; }
.welcome-box .welcome-all{ margin-top:14px; padding-top:14px; border-top:1px solid #e8e8e8; font-weight:500; }
.welcome-dismiss-row{
    display:flex; align-items:center; gap:10px; margin:18px 0 16px; text-align:left; font-size:14px; color:#444;
}
.welcome-dismiss-row input{ width:18px; height:18px; flex-shrink:0; cursor:pointer; }
.welcome-mobile-only{ display:none; }
.welcome-desktop-only{ display:block; }
@media (max-width:768px){
    .welcome-mobile-only{ display:block; }
    .welcome-desktop-only{ display:none; }
}
