/* In the original integrated page, add ONE explicit new-tab link.
   It is invisible on other site pages because JS injects it only into the DB root. */
#gmd-unified-root #gmcw-fullview-launch{
  display:flex;justify-content:flex-end;align-items:center;
  margin:6px 0 6px;font-family:"Microsoft YaHei","PingFang SC",sans-serif;
}
#gmd-unified-root #gmcw-fullview-launch a{
  display:inline-flex;align-items:center;min-height:32px;
  padding:5px 12px;text-decoration:none;border-radius:8px;
  background:#ebf3ff;color:#1d5cb0;border:1px solid #bcd4f6;
  font-weight:800;font-size:12px;
}
#gmd-unified-root #gmcw-fullview-launch a:hover{background:#286bd0;color:#fff}
/* GMCW Fullview V1.0: enabled only on opt-in existing unified database pages.
   We DO NOT modify Kadence theme files, existing WordPress page templates,
   data JSON, CSS for regular visitors, or inner application filters. */
body.gmcw-full-mode:has(#gmd-unified-root) #wpadminbar{display:none!important;}
html:has(body.gmcw-full-mode #gmd-unified-root){margin-top:0!important;}
body.gmcw-full-mode:has(#gmd-unified-root){
  background:#f1f5fa!important;
  margin:0!important;
}
body.gmcw-full-mode:has(#gmd-unified-root) #masthead,
body.gmcw-full-mode:has(#gmd-unified-root) .site-header,
body.gmcw-full-mode:has(#gmd-unified-root) .site-header-wrap,
body.gmcw-full-mode:has(#gmd-unified-root) #colophon,
body.gmcw-full-mode:has(#gmd-unified-root) .site-footer,
body.gmcw-full-mode:has(#gmd-unified-root) #secondary,
body.gmcw-full-mode:has(#gmd-unified-root) .widget-area,
body.gmcw-full-mode:has(#gmd-unified-root) .entry-header,
body.gmcw-full-mode:has(#gmd-unified-root) .entry-footer,
body.gmcw-full-mode:has(#gmd-unified-root) .post-navigation,
body.gmcw-full-mode:has(#gmd-unified-root) .comments-area,
body.gmcw-full-mode:has(#gmd-unified-root) .kadence-breadcrumbs,
body.gmcw-full-mode:has(#gmd-unified-root) .kadence-scroll-to-top {display:none!important;}

/* Remove Kadence's built-in max-width and its top/bottom page whitespace. */
body.gmcw-full-mode:has(#gmd-unified-root) #wrapper,
body.gmcw-full-mode:has(#gmd-unified-root) #inner-wrap,
body.gmcw-full-mode:has(#gmd-unified-root) #primary,
body.gmcw-full-mode:has(#gmd-unified-root) .site-main,
body.gmcw-full-mode:has(#gmd-unified-root) .content-area,
body.gmcw-full-mode:has(#gmd-unified-root) .content-container,
body.gmcw-full-mode:has(#gmd-unified-root) .site-container,
body.gmcw-full-mode:has(#gmd-unified-root) .entry-content-wrap,
body.gmcw-full-mode:has(#gmd-unified-root) .entry-content,
body.gmcw-full-mode:has(#gmd-unified-root) .single-content{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
}
body.gmcw-full-mode:has(#gmd-unified-root) .content-bg,
body.gmcw-full-mode:has(#gmd-unified-root) .site-content{
  padding:0!important;margin:0!important;max-width:none!important;
}
/* Small exit/header strip. It is part of the database, not the WordPress menu. */
body.gmcw-full-mode #gmcw-fullview-bar{
  position:relative!important;z-index:1100!important;
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;box-sizing:border-box;
  width:100%;height:45px;padding:0 18px;
  background:#fff;color:#20436a;
  border-bottom:1px solid #dce6f4;
  font-family:"Microsoft YaHei","PingFang SC","Segoe UI",sans-serif;
}
body.gmcw-full-mode #gmcw-fullview-bar .gmcw-fullview-left,
body.gmcw-full-mode #gmcw-fullview-bar .gmcw-fullview-right{
  display:flex;align-items:center;gap:10px;min-width:0;
}
body.gmcw-full-mode #gmcw-fullview-bar .gmcw-fullview-title{
  font-size:14px;letter-spacing:.01em;font-weight:800;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
body.gmcw-full-mode #gmcw-fullview-bar .gmcw-fullview-mark{
  width:26px;height:26px;display:grid;place-items:center;border-radius:7px;
  font-size:17px;font-weight:900;color:#fff;background:#286bd0;
}
body.gmcw-full-mode #gmcw-fullview-bar a{
  font-size:12px;line-height:1.25;text-decoration:none;white-space:nowrap;
  color:#315f9a;background:#f4f8fd;border:1px solid #d6e3f3;
  padding:6px 10px;border-radius:8px;
}
body.gmcw-full-mode #gmcw-fullview-bar a:hover,
body.gmcw-full-mode #gmcw-fullview-bar a:focus-visible{
  color:#fff;background:#286bd0;border-color:#286bd0;
}
/* Keep original database tabs and app UI; compress the non-functional banner. */
body.gmcw-full-mode #gmd-unified-root{
  box-sizing:border-box!important;
  width:calc(100% - 22px)!important;max-width:none!important;
  min-width:0!important;margin:7px auto 10px!important;
}
body.gmcw-full-mode #gmd-unified-root .gmd-intro,
body.gmcw-full-mode #gmd-unified-root .gmd-bottom {display:none!important;}
body.gmcw-full-mode #gmd-unified-root .gmd-switch{
  margin:0 0 7px!important;padding:4px 6px!important;
  gap:7px!important;border-radius:11px!important;
}
body.gmcw-full-mode #gmd-unified-root .gmd-tab{
  min-height:49px!important;padding:7px 10px!important;border-radius:8px!important;
}
body.gmcw-full-mode #gmd-unified-root .gmd-tab-icon{
  width:28px!important;height:28px!important;flex-basis:28px!important;
}
body.gmcw-full-mode #gmd-unified-root .gmd-tab-name {font-size:14px!important;}
body.gmcw-full-mode #gmd-unified-root .gmd-tab-description {display:none!important;}
/* The existing task page uses a viewport-locked layout. Account for 45px toolbar. */
body.gmcw-full-mode #gmd-unified-root.gmd-quest-mode{
  height:calc(100dvh - 55px)!important;
  min-height:0!important;
  margin-top:6px!important;margin-bottom:0!important;
}
/* Responsive: preserve the original mobile database layout. */
@media(max-width:760px){
  body.gmcw-full-mode #gmcw-fullview-bar{padding:0 8px;height:43px;gap:6px;}
  body.gmcw-full-mode #gmcw-fullview-bar .gmcw-fullview-title{font-size:12px;}
  body.gmcw-full-mode #gmcw-fullview-bar .gmcw-fullview-mark{display:none;}
  body.gmcw-full-mode #gmcw-fullview-bar a{font-size:11px;padding:6px;}
  body.gmcw-full-mode #gmd-unified-root{width:calc(100% - 8px)!important;margin:3px auto!important;}
  body.gmcw-full-mode #gmd-unified-root .gmd-switch{gap:4px!important;padding:3px!important;}
  body.gmcw-full-mode #gmd-unified-root .gmd-tab{min-height:44px!important;padding:5px!important;}
  body.gmcw-full-mode #gmd-unified-root .gmd-tab-name{font-size:12px!important;}
  body.gmcw-full-mode #gmd-unified-root.gmd-quest-mode{height:calc(100dvh - 46px)!important;}
}

/* V1.1: release extra Kadence article wrappers in full-screen mode only. */
body.gmcw-full-mode:has(#gmd-unified-root) article.entry,
body.gmcw-full-mode:has(#gmd-unified-root) .content-wrap,
body.gmcw-full-mode:has(#gmd-unified-root) .site,
body.gmcw-full-mode:has(#gmd-unified-root) .site-content-wrap{
  width:100%!important;max-width:none!important;min-width:0!important;
  padding:0!important;margin:0!important;
}
body.gmcw-full-mode:has(#gmd-unified-root) .kadence-header-cart,
body.gmcw-full-mode:has(#gmd-unified-root) #main-header,
body.gmcw-full-mode:has(#gmd-unified-root) #mobile-header{
  display:none!important;
}
/* Preserve keyboard navigation and avoid covering the database detail drawer. */
body.gmcw-full-mode #gmcw-fullview-bar a:focus-visible,
#gmd-unified-root #gmcw-fullview-launch a:focus-visible {
  outline:2px solid #1754ac;
  outline-offset:2px;
}
