/* 全局全屏入口 · 嵌入顶栏/页内，或固定右上角 */



.kcs-fs-slot {

  display: inline-flex;

  align-items: center;

  flex-shrink: 0;

}



/* 无页内专用按钮时：固定右上角 */

.kcs-fs-slot--right {

  position: fixed;

  top: clamp(16px, 2.2vh, 26px);

  right: clamp(16px, 1.8vw, 24px);

  left: auto;

  z-index: 2147483000;

}



.kcs-fs-fab {

  position: static;

  width: 34px;

  height: 34px;

  padding: 0;

  border: 1px solid rgba(120, 130, 160, 0.35);

  border-radius: 10px;

  background: rgba(255, 255, 255, 0.92);

  color: #3d4a6b;

  box-shadow: 0 4px 12px rgba(40, 50, 90, 0.1);

  cursor: pointer;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  flex-shrink: 0;

  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;

  backdrop-filter: blur(8px);

  -webkit-backdrop-filter: blur(8px);

}



.kcs-fs-fab--floating {

  position: static;

}



.kcs-fs-fab:hover {

  transform: translateY(-1px);

  box-shadow: 0 6px 16px rgba(40, 50, 90, 0.16);

  background: #fff;

}



.kcs-fs-fab:active {

  transform: translateY(0);

}



.kcs-fs-fab svg {

  width: 16px;

  height: 16px;

  display: block;

  pointer-events: none;

}



.kcs-fs-fab[hidden] {

  display: none !important;

}



.teacher-topbar-actions .kcs-fs-fab,

.top-actions .kcs-fs-fab {

  width: 32px;

  height: 32px;

  border-radius: 9px;

  position: static;

  top: auto;

  right: auto;

  left: auto;

  bottom: auto;

}



.identity-title-actions {

  grid-column: 3;

  display: inline-flex;

  align-items: center;

  gap: 6px;

  justify-self: start;

  margin-left: 8px;

}



.kcs-fs-fab--hub,

.kcs-fs-fab--map {

  width: 30px;

  height: 30px;

  border-radius: 50%;

  border: 1px solid rgba(120, 130, 160, 0.32);

  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(240, 245, 255, 0.55));

  box-shadow: inset 0 1px rgba(255, 255, 255, 0.72), 0 2px 8px rgba(40, 50, 90, 0.08);

  position: relative;

  z-index: 6;

  pointer-events: auto;

}



.kcs-fs-fab--hub svg,

.kcs-fs-fab--map svg {

  width: 14px;

  height: 14px;

}



.task-route-top-end {

  display: inline-flex;

  align-items: center;

  gap: 10px;

  justify-self: end;

}



.teacher-topbar-actions {

  gap: 10px;

}



.teacher-topbar-actions .teacher-topbar-meta {

  margin-right: 2px;

}



.kcs-fs-modal {

  position: fixed;

  inset: 0;

  z-index: 2147483646;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 20px;

  background: rgba(28, 34, 56, 0.42);

  backdrop-filter: blur(4px);

  -webkit-backdrop-filter: blur(4px);

}



.kcs-fs-modal[hidden] {

  display: none !important;

}



.kcs-fs-modal__panel {

  width: min(360px, 100%);

  padding: 22px 20px 16px;

  border-radius: 16px;

  background: #fff;

  box-shadow: 0 18px 40px rgba(20, 28, 60, 0.22);

  text-align: center;

}



.kcs-fs-modal__title {

  margin: 0 0 8px;

  font-size: 17px;

  font-weight: 700;

  color: #24304f;

}



.kcs-fs-modal__text {

  margin: 0 0 18px;

  font-size: 14px;

  line-height: 1.55;

  color: #5a657f;

}



.kcs-fs-modal__actions {

  display: flex;

  gap: 10px;

  justify-content: center;

}



.kcs-fs-modal__actions .btn {

  min-width: 108px;

  position: relative;

  z-index: 2;

  pointer-events: auto;

  cursor: pointer;

}



/* 纯 iframe 嵌入（无壳）：藏右上角，避免预览误点。壳/首页/管理后台靠 JS 显示 */
html.kcs-embed-mode:not(.kcs-shell-embed):not(.kcs-fs-right-on) .kcs-fs-slot--right {

  display: none !important;

}

/* 壳模式：右上角退出全屏必须可见（首页、管理员等无页内按钮时） */
html.kcs-shell-embed .kcs-fs-slot--right:not([hidden]),
html.kcs-fs-right-on .kcs-fs-slot--right:not([hidden]) {

  display: inline-flex !important;

}



html.kcs-embed-mode,

html.kcs-embed-mode body {

  height: 100%;

  overflow: hidden;

}



html.kcs-embed-mode #app {

  min-height: 100vh;

}



@media (max-width: 720px) {

  .kcs-fs-slot--right {

    top: 10px;

    right: 10px;

  }



  .kcs-fs-fab {

    width: 32px;

    height: 32px;

  }



  .task-route-top-end {

    gap: 6px;

  }

}

/* 选文件导致退出全屏后：一键恢复（需用户点击才有手势） */
.kcs-fs-restore-bar {
  position: fixed;
  left: 50%;
  bottom: clamp(18px, 3vh, 36px);
  transform: translateX(-50%);
  z-index: 2147483645;
  pointer-events: none;
}

/* 嵌入 / 壳 / 登录页：禁止整页滚动条，避免「不是全屏」观感 */
html.kcs-embed-mode,
html.kcs-embed-mode body,
html.kcs-shell-embed,
html.kcs-shell-embed body {
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}

html.kcs-embed-mode #app,
html.kcs-shell-embed #app,
#view-welcome.auth-view.active,
#view-login.auth-view.active,
#view-register.auth-view.active {
  height: 100% !important;
  min-height: 100% !important;
  overflow: hidden !important;
}

.welcome-auth-shell {
  min-height: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}

/* 登录页也保证右上角最小化按钮可见 */
html.kcs-fs-right-on #kcs-fs-slot-right {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.kcs-fs-restore-bar[hidden] {
  display: none !important;
}

.kcs-fs-restore-bar__btn {
  pointer-events: auto;
  min-height: 44px;
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #ff9f1a 0%, #ff4d6d 100%);
  box-shadow: 0 10px 28px rgba(255, 80, 60, 0.42);
}

.kcs-fs-restore-bar__btn:hover {
  filter: brightness(1.05);
}


