:root{
  --header-height: 58px;
}
body{
  margin:0;
  font-family:Meiryo, 'Yu Gothic', sans-serif;
  background:#eef3f9;
  color:#1f2937;
}
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#173b75;
  color:#fff;
  padding:4px 10px;
  position:sticky;
  top:0;
  z-index:1200;
  min-height:50px;
  box-sizing:border-box;
}
.topbar-left{display:flex;align-items:center;gap:10px;min-width:0}
.topbar-right{display:flex;align-items:center;gap:8px;flex-shrink:0}
.menu-button{
  width:36px;height:36px;font-size:20px;border:none;border-radius:10px;
  background:#fff;color:#173b75;cursor:pointer;font-weight:bold;
  box-shadow:0 3px 8px rgba(0,0,0,0.12);
}
.header-logo-wrap{height:36px;display:flex;align-items:center;justify-content:center;overflow:visible;flex-shrink:0}
.header-logo{height:36px;max-width:10px;object-fit:contain;display:block}
.brand-subtitle{font-size:15px;font-weight:bold;white-space:nowrap;line-height:1.1}
.user-label{white-space:nowrap;font-size:13px;line-height:1.1}
.logout-link{
  color:#fff;border:1px solid rgba(255,255,255,0.75);padding:6px 10px;text-decoration:none;border-radius:10px;
  transition:all .2s ease;font-size:12px;line-height:1.1;
}
.logout-link:hover{background:rgba(255,255,255,.12)}
.help-button{
  width:36px;height:36px;font-size:18px;border:none;border-radius:10px;
  background:#fff;color:#173b75;cursor:pointer;font-weight:bold;
  box-shadow:0 3px 8px rgba(0,0,0,0.12);
}
.slide-overlay{position:fixed;inset:0;background:rgba(15,23,42,.22);opacity:0;visibility:hidden;transition:.25s ease;z-index:1000}
.slide-overlay.active{opacity:1;visibility:visible}
.left-menu{
  position:fixed;top:var(--header-height);left:0;width:82%;max-width:980px;height:calc(100vh - var(--header-height));
  background:#fff;transform:translateX(-102%);transition:transform .28s cubic-bezier(.22,.8,.36,1);padding:12px;box-sizing:border-box;
  overflow:hidden;z-index:1100;box-shadow:8px 0 24px rgba(0,0,0,.18);display:flex;flex-direction:column;border-top-right-radius:14px;
}
.left-menu.open{transform:translateX(0)}
.tile-grid{flex:1;display:grid;grid-template-columns:repeat(4,1fr);gap:10px;align-content:start}
.tile-card{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#f3f7ff;border-radius:14px;padding:10px 8px;text-decoration:none;color:#173b75;min-height:78px;border:1px solid #dbe7fb;box-sizing:border-box}
.tile-emergency{background:#fff4f4;border-color:#f3c3c3;color:#a11a1a}
.tile-icon{font-size:14px;line-height:1;margin-bottom:5px}
.tile-name{font-size:13px;font-weight:bold;text-align:center;line-height:1.2}
.tile-meta{margin-top:5px}
.badge{display:inline-block;padding:3px 8px;border-radius:999px;font-size:10px;background:#e5e7eb;color:#374151}
.badge-blue{background:#dbeafe;color:#1d4ed8}
.badge-red{background:#fee2e2;color:#b91c1c}
@media (max-width: 1200px){.tile-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width: 900px){.header-logo{max-width:160px}.brand-subtitle{font-size:14px}.user-label{display:none}}

main{padding:16px}
.hero-card{
  background:#fff;
  border-radius:16px;
  box-shadow:0 8px 24px rgba(15,23,42,.08);
  padding:20px;
  margin-bottom:16px;
}
.hero-card h1{margin:0 0 10px;font-size:28px}
.hero-card p{margin:0;color:#475569;line-height:1.7}
.hero-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.hero-box{
  background:#fff;
  border-radius:16px;
  padding:18px 16px;
  box-shadow:0 8px 24px rgba(15,23,42,.08);
  border:1px solid #dbe7fb;
}
.hero-link{text-decoration:none;color:inherit;transition:transform .15s ease, box-shadow .15s ease}
.hero-link:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(15,23,42,.12)}
.hero-box-title{font-size:16px;font-weight:700;color:#173b75}
.hero-box-value{font-size:24px;font-weight:700;margin-top:8px;color:#0f172a}
.hero-box-text{margin-top:10px;font-size:13px;color:#475569;line-height:1.6}
.dashboard-main{max-width:1280px;margin:0 auto}
.dashboard-hero{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}
.hero-status-panel{
  min-width:250px;
  background:#f6f9ff;
  border:1px solid #dbe7fb;
  border-radius:14px;
  padding:14px 16px;
}
.hero-status-label{font-size:12px;color:#64748b;margin-bottom:6px}
.hero-status-value{font-size:20px;font-weight:700;color:#173b75}
.hero-status-sub{margin-top:6px;font-size:13px;color:#475569}
.dashboard-section{margin-bottom:18px}
.section-title-row{display:flex;justify-content:space-between;align-items:end;gap:12px;margin-bottom:12px}
.section-title-row h2,.dashboard-panel h2{margin:0;font-size:20px;color:#0f172a}
.section-note{font-size:12px;color:#64748b}
.dashboard-grid-main{grid-template-columns:repeat(3,minmax(0,1fr))}
.hero-box-primary{border-color:#93c5fd;background:#f8fbff}
.hero-box-alert{border-color:#fecaca;background:#fff7f7}
.dashboard-two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.dashboard-panel{
  background:#fff;
  border-radius:16px;
  box-shadow:0 8px 24px rgba(15,23,42,.08);
  padding:18px;
}
.dashboard-list{margin:14px 0 0;padding-left:20px;color:#334155;line-height:1.8}
.dashboard-sub-links{display:grid;gap:10px;margin-top:14px}
.sub-link-card{
  display:block;
  border:1px solid #dbe7fb;
  background:#f8fbff;
  border-radius:12px;
  padding:12px 14px;
  text-decoration:none;
}
.sub-link-title{display:block;font-weight:700;color:#173b75}
.sub-link-desc{display:block;margin-top:4px;font-size:13px;color:#475569}
@media (max-width: 1000px){
  .hero-grid,.dashboard-grid-main,.dashboard-two-col{grid-template-columns:1fr 1fr}
  .dashboard-hero{flex-direction:column}
  .hero-status-panel{min-width:auto;width:100%}
}
@media (max-width: 700px){
  main{padding:12px}
  .hero-grid,.dashboard-grid-main,.dashboard-two-col{grid-template-columns:1fr}
  .hero-card h1{font-size:24px}
}

/* === 2026-05 header: cybozu-style black one-line main navigation === */
:root{--header-height:64px;}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:64px;
  height:64px;
  padding:0 10px;
  background:linear-gradient(#2d2d2d,#111);
  color:#fff;
  position:sticky;
  top:0;
  z-index:1200;
  box-sizing:border-box;
  overflow:hidden;
}
.topbar-left{display:flex;align-items:center;gap:10px;min-width:270px;flex:0 0 auto;height:64px;}
.menu-button{
  width:42px;height:42px;font-size:25px;border:none;border-radius:8px;
  background:#f8fafc;color:#111827;cursor:pointer;font-weight:900;
  box-shadow:0 2px 6px rgba(0,0,0,.25);line-height:1;
}
.header-logo-link{display:inline-flex;align-items:center;justify-content:center;height:42px;width:154px;background:#fff;text-decoration:none;overflow:hidden;flex:0 0 auto;}
.header-logo{height:42px !important;max-height:42px !important;max-width:154px !important;width:auto !important;object-fit:contain;display:block;}
.brand-subtitle{font-size:18px;font-weight:800;white-space:nowrap;line-height:1.1;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.45);}
.topbar-app-menu{display:flex;align-items:center;justify-content:center;gap:18px;min-width:0;flex:1 1 auto;height:64px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;}
.topbar-app-link{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:74px;height:60px;padding:3px 4px;box-sizing:border-box;color:#fff;text-decoration:none;border-radius:8px;font-weight:800;text-shadow:0 1px 2px rgba(0,0,0,.75);white-space:nowrap;}
.topbar-app-link:hover{background:rgba(255,255,255,.14);color:#fff;}
.topbar-app-icon{font-size:25px;line-height:1;filter:drop-shadow(0 1px 1px rgba(0,0,0,.65));}
.topbar-app-label{font-size:12px;line-height:1.12;text-align:center;}
.topbar-right{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:0 0 auto;height:64px;min-width:250px;}
.user-label{white-space:nowrap;font-size:14px;line-height:1.1;color:#fff;}
.logout-link{color:#fff;border:1px solid rgba(255,255,255,.75);padding:7px 10px;text-decoration:none;border-radius:10px;background:rgba(255,255,255,.08);font-size:13px;line-height:1.1;white-space:nowrap;}
.logout-link:hover{background:rgba(255,255,255,.18)}
.help-button{width:42px;height:42px;font-size:24px;border:none;border-radius:10px;background:#f8fafc;color:#173b75;cursor:pointer;font-weight:900;box-shadow:0 2px 6px rgba(0,0,0,.25);}
.left-menu{top:var(--header-height);height:calc(100vh - var(--header-height));}
@media (max-width: 1280px){
  .topbar{gap:8px;padding:0 8px;}
  .topbar-left{min-width:250px;gap:8px;}
  .topbar-app-menu{gap:10px;justify-content:flex-start;}
  .topbar-app-link{min-width:68px;}
  .topbar-right{min-width:210px;}
  .brand-subtitle{font-size:16px;}
}
@media (max-width: 980px){
  .user-label{display:none;}
  .topbar-right{min-width:auto;}
  .brand-subtitle{display:none;}
  .topbar-left{min-width:auto;}
}

/* fix11: 左スライドインの開閉状態を active/open の混在に耐えるよう統一 */
.slide-overlay{pointer-events:none;}
.slide-overlay.active,.slide-overlay.open,.slide-overlay.is-open{opacity:1;visibility:visible;pointer-events:auto;}
.left-menu.active,.left-menu.is-open{transform:translateX(0);}

/* fix12: 左スライドイン 開閉の最終安定化 */
#menuOverlay.slide-overlay{
  position:fixed;
  inset:0;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  z-index:1000;
}
#menuOverlay.slide-overlay.active,
#menuOverlay.slide-overlay.open,
#menuOverlay.slide-overlay.is-open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
#leftMenu.left-menu{
  position:fixed;
  top:var(--header-height,58px);
  left:0;
  transform:translateX(-105%);
  z-index:1100;
}
#leftMenu.left-menu.open,
#leftMenu.left-menu.active,
#leftMenu.left-menu.is-open{
  transform:translateX(0) !important;
}
#appHeader.topbar{z-index:1200;}

/* === Yoshizaki academic identity: final header === */
:root{
  --header-height:118px;
  --brand-navy:#102b52;
  --brand-navy-deep:#0a1e3a;
  --brand-gold:#c6a15b;
  --brand-ivory:#f8f5ee;
}
#appHeader.topbar{
  min-height:118px;
  height:118px;
  padding:0 30px;
  gap:28px;
  overflow:hidden;
  background:
    radial-gradient(circle at 15% 20%,rgba(255,255,255,.07),transparent 30%),
    linear-gradient(135deg,var(--brand-navy-deep),var(--brand-navy));
  border-bottom:2px solid var(--brand-gold);
  box-shadow:0 5px 18px rgba(15,23,42,.18);
}
.topbar-brand-area{display:flex;align-items:center;gap:14px;min-width:430px;height:100%;flex:0 0 auto}
.menu-button{
  width:38px;height:38px;border-radius:10px;background:rgba(255,255,255,.96);color:var(--brand-navy-deep);
  font-size:21px;box-shadow:none;opacity:.96
}
.researcher-brand{display:flex;align-items:center;gap:15px;color:#fff;text-decoration:none;min-width:0}
.researcher-mark{width:78px;height:78px;display:block;flex:0 0 78px}
.researcher-mark svg{width:100%;height:100%;display:block;overflow:visible}
.researcher-mark path{fill:none;stroke-linecap:round;stroke-width:8.5}
.researcher-mark .enso-gold{stroke:var(--brand-gold)}
.researcher-mark .enso-white{stroke:#fff}
.researcher-mark .enso-dot{fill:var(--brand-gold)}
.researcher-copy{display:flex;flex-direction:column;line-height:1;white-space:nowrap}
.researcher-name{font-family:'Yu Mincho','Hiragino Mincho ProN','Noto Serif JP',serif;font-size:31px;letter-spacing:.11em;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.3)}
.researcher-roman{margin-top:9px;font-family:Georgia,'Times New Roman',serif;font-size:13px;letter-spacing:.19em;color:#e2c887}
.researcher-field{margin-top:7px;font-family:Georgia,'Times New Roman',serif;font-size:14px;letter-spacing:.06em;color:#f8f5ee}
.archive-brand{height:72px;padding-left:28px;border-left:1px solid rgba(255,255,255,.34);display:flex;flex-direction:column;justify-content:center;min-width:360px;flex:1 1 auto}
.archive-title{font-family:'Yu Mincho','Hiragino Mincho ProN','Noto Serif JP',serif;font-size:35px;letter-spacing:.08em;color:#fff;white-space:nowrap;line-height:1.15}
.archive-tagline{margin-top:10px;font-family:'Yu Mincho','Hiragino Mincho ProN','Noto Serif JP',serif;font-size:16px;letter-spacing:.15em;color:var(--brand-gold);white-space:nowrap}
.topbar-app-menu{height:100%;flex:0 0 150px;justify-content:flex-end;overflow:visible}
.topbar-app-link{width:130px;height:94px;gap:7px;color:#e5c47c;border-radius:14px;text-shadow:none}
.topbar-app-link:hover{background:rgba(255,255,255,.07);color:#f2d58e}
.document-line-icon{width:38px;height:44px;display:block}
.document-line-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.topbar-app-label{font-family:'Yu Mincho','Hiragino Mincho ProN','Noto Serif JP',serif;font-size:17px;letter-spacing:.06em}
.topbar-right,.user-label{display:none!important}
.left-menu{top:var(--header-height);height:calc(100vh - var(--header-height))}

@media (max-width:1180px){
  #appHeader.topbar{padding:0 18px;gap:18px}
  .topbar-brand-area{min-width:370px}
  .researcher-mark{width:66px;height:66px;flex-basis:66px}
  .researcher-name{font-size:27px}
  .archive-brand{min-width:260px;padding-left:20px}
  .archive-title{font-size:29px}
  .archive-tagline{font-size:14px}
  .topbar-app-menu{flex-basis:120px}
}
@media (max-width:900px){
  :root{--header-height:82px}
  #appHeader.topbar{min-height:82px;height:82px;padding:0 12px;gap:10px}
  .topbar-brand-area{min-width:0;flex:1 1 auto;gap:8px}
  .menu-button{width:34px;height:34px;font-size:19px}
  .researcher-brand{gap:9px}
  .researcher-mark{width:52px;height:52px;flex-basis:52px}
  .researcher-name{font-size:22px}
  .researcher-roman{font-size:9px;margin-top:6px}
  .researcher-field{display:none}
  .archive-brand{display:none}
  .topbar-app-menu{flex:0 0 78px}
  .topbar-app-link{width:76px;height:70px;gap:2px}
  .document-line-icon{width:25px;height:30px}
  .topbar-app-label{font-size:11px}
}
@media (max-width:520px){
  .researcher-name{font-size:19px;letter-spacing:.05em}
  .researcher-roman{font-size:8px;letter-spacing:.12em}
  .researcher-mark{width:44px;height:44px;flex-basis:44px}
  .menu-button{width:32px;height:32px}
}
/* Profile navigation addition */
#appHeader .topbar-app-menu{flex-basis:286px;gap:4px}
#appHeader .profile-line-icon svg{fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:1180px){#appHeader .topbar-app-menu{flex-basis:235px}}
@media(max-width:900px){
  #appHeader .topbar-app-menu{flex-basis:145px;gap:0}
  #appHeader .topbar-app-link{width:70px;min-width:70px}
}
@media(max-width:620px){
  #appHeader .topbar-app-menu{flex-basis:72px}
  #appHeader .topbar-app-link[href="/profile.php"]{display:none}
}
