/* Mediterranean app navigation frame — structural UI only */
:root{--med-frame:1000px;--med-green:#1E7A5E;--med-green-dark:#0B4E37;--med-soft:#EAF5EF;--med-border:#C8E6D0;--med-text:#0D1F17}
html{scroll-padding-top:76px}
body{padding-top:64px!important;padding-bottom:88px!important}
.med-topbar{position:fixed;inset:0 0 auto 0;z-index:5000;background:#fff;border-bottom:1px solid var(--med-border);box-shadow:0 2px 10px rgba(10,60,35,.06)}
.med-topbar-inner{width:min(var(--med-frame),calc(100% - 28px));height:64px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:14px}
.med-brand{display:inline-flex;align-items:center;gap:9px;min-width:0;color:var(--med-text);text-decoration:none;font-size:14px;font-weight:800}
.med-brand img{width:42px;height:42px;display:block;border-radius:10px;flex:0 0 auto}
.med-brand span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.med-menu-wrap{position:relative;flex:0 0 auto}
.med-menu-toggle{width:44px;height:44px;border:0;background:transparent;border-radius:11px;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:var(--med-text)}
.med-menu-toggle:hover,.med-menu-toggle:focus-visible{background:var(--med-soft);outline:none}
.med-menu-toggle span{display:block;width:22px;height:2.5px;border-radius:99px;background:currentColor;transition:transform .18s ease,opacity .18s ease}
.med-menu-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(7.5px) rotate(45deg)}
.med-menu-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
.med-menu-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-7.5px) rotate(-45deg)}
.med-dropdown{position:absolute;right:0;top:calc(100% + 8px);width:230px;background:#fff;border:1px solid var(--med-border);border-radius:14px;box-shadow:0 14px 34px rgba(10,60,35,.16);padding:7px;display:none}
.med-dropdown.open{display:block}
.med-dropdown a{display:flex;align-items:center;gap:10px;min-height:43px;padding:9px 11px;border-radius:9px;color:#315443;text-decoration:none;font-size:14px;font-weight:700}
.med-dropdown a:hover,.med-dropdown a:focus-visible,.med-dropdown a.active{background:var(--med-soft);color:var(--med-green);outline:none}
.med-menu-icon{width:19px;height:19px;display:block;flex:0 0 19px}
.med-menu-divider{height:1px;background:#DDEBE2;margin:6px}
.med-bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:5100;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));background:#fff;border-top:1px solid var(--med-border);padding:7px max(8px,calc((100vw - 720px)/2 + 8px)) calc(7px + env(safe-area-inset-bottom,0px));box-shadow:0 -4px 16px rgba(10,60,35,.05)}
.med-bottom-nav a{min-width:0;min-height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:5px 3px;border-radius:12px;color:#648573;text-decoration:none;font-size:10.5px;font-weight:800;line-height:1.1}
.med-bottom-nav a:hover,.med-bottom-nav a:focus-visible,.med-bottom-nav a.active{background:var(--med-soft);color:var(--med-green);outline:none}
.med-bottom-nav svg{width:24px;height:24px;display:block;flex:0 0 auto}
.med-bottom-nav .med-nav-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.med-home-launch{width:min(720px,calc(100% - 28px));margin:18px auto 26px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.med-home-launch a{min-height:62px;background:#fff;border:1px solid var(--med-border);border-radius:16px;box-shadow:0 2px 12px rgba(10,60,35,.06);display:flex;align-items:center;justify-content:center;text-align:center;padding:12px;color:var(--med-green);text-decoration:none;font-size:13px;font-weight:800}
.med-home-launch a:hover,.med-home-launch a:focus-visible{background:var(--med-soft);outline:2px solid rgba(30,122,94,.12)}
/* Page separation without changing the existing functional DOM. */
.page-home>.shell{display:none!important}
.page-generator>.shell{grid-template-columns:1fr!important;max-width:760px!important}
.page-generator>.shell>.sidebar{display:none!important}
.page-generator>.shell>.main-col{padding-left:0!important}
.page-profile>.shell{grid-template-columns:1fr!important;max-width:660px!important}
.page-profile>.shell>.main-col{display:none!important}
.page-profile>.shell>.sidebar{width:100%!important}
.page-contact .contact-shell{width:min(760px,calc(100% - 28px));margin:24px auto;display:flex;flex-direction:column;gap:16px}
.page-contact .contact-card{background:#fff;border:1px solid var(--med-border);border-radius:20px;padding:20px;box-shadow:0 2px 12px rgba(10,60,35,.07)}
.page-contact .contact-card h2{font-size:15px;color:var(--med-text);margin:0 0 10px}.page-contact .contact-card p{font-size:13px;color:#3A5C49;line-height:1.7;margin:0}.page-contact .contact-card a{color:var(--med-green);font-weight:700}
@media(max-width:600px){body{padding-top:58px!important;padding-bottom:82px!important}.med-topbar-inner{height:58px;width:calc(100% - 24px)}.med-brand{font-size:13px}.med-brand img{width:38px;height:38px}.med-dropdown{width:min(230px,calc(100vw - 24px))}.med-bottom-nav{padding-left:5px;padding-right:5px}.med-bottom-nav a{min-height:54px;font-size:9.5px}.med-bottom-nav svg{width:22px;height:22px}.med-home-launch{grid-template-columns:1fr;margin-top:14px}.page-generator>.shell,.page-profile>.shell{padding-left:14px!important;padding-right:14px!important}}
/* ── Global Mediterranean fixed page background ───────────── */
html{
  min-height:100%;
  background:#F7FBF8!important;
}
body{
  min-height:100vh;
  background-color:transparent!important;
  background-image:none!important;
  position:relative;
  isolation:isolate;
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background-color:#F7FBF8;
  background-image:url('images/mediterranean-background-v1.jpg');
  background-position:center center;
  background-repeat:no-repeat;
  background-size:cover;
  transform:translateZ(0);
}

/* ── Desktop navigation alignment — Kidney-style ─────────── */
@media (min-width:601px){
  /* Full-width top background; brand + hamburger aligned to the 720px page axis. */
  .med-topbar-inner{
    width:100%!important;
    max-width:720px!important;
    margin:0 auto!important;
    box-sizing:border-box!important;
    padding-left:14px!important;
    padding-right:14px!important;
  }

  /* Full-width bottom dock; navigation items aligned to the same 720px axis. */
  .med-bottom-nav{
    padding-left:calc((100vw - 720px)/2 + 9px)!important;
    padding-right:calc((100vw - 720px)/2 + 9px)!important;
  }
}



/* ── MedTable dropdown — Kidney clone ─────────────────── */
.med-menu-wrap{position:relative;flex:0 0 auto}
.med-menu-toggle{
  width:44px!important;height:44px!important;border:0!important;background:transparent!important;
  border-radius:11px!important;cursor:pointer!important;display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:center!important;gap:5px!important;color:#0D1F17!important
}
.med-menu-toggle:hover,.med-menu-toggle:focus-visible{background:#EAF5EF!important;outline:none!important}
.med-menu-toggle span{display:block!important;width:22px!important;height:2.5px!important;border-radius:99px!important;background:currentColor!important;transition:transform .18s ease,opacity .18s ease!important}
.med-menu-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(7.5px) rotate(45deg)!important}
.med-menu-toggle[aria-expanded="true"] span:nth-child(2){opacity:0!important}
.med-menu-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-7.5px) rotate(-45deg)!important}
.med-dropdown{position:absolute!important;right:0!important;top:calc(100% + 8px)!important;width:220px!important;background:#fff!important;border:1px solid #C8E6D0!important;border-radius:14px!important;box-shadow:0 14px 34px rgba(10,60,35,.14)!important;padding:7px!important}
.med-dropdown a{display:flex!important;align-items:center!important;gap:10px!important;min-height:44px!important;padding:9px 11px!important;border-radius:9px!important;color:#284B38!important;text-decoration:none!important;font-size:13px!important;line-height:1.2!important;font-weight:700!important;letter-spacing:.025em!important;text-transform:uppercase!important}
.med-dropdown a:hover,.med-dropdown a:focus-visible{background:#EAF5EF!important;color:#1E7A5E!important;outline:none!important}
.med-dropdown a.active{background:#F0FAF4!important;color:#1E7A5E!important}
.med-dropdown .med-menu-divider{height:1px!important;background:#E2EFE7!important;margin:6px 4px!important}
.med-dropdown .med-menu-icon{width:18px!important;height:18px!important;flex:0 0 18px!important;stroke-width:2!important}
@media(max-width:600px){.med-dropdown{width:min(230px,calc(100vw - 28px))!important}}
