/* 入口外壳样式：登录页 + 九模块选择页 + 右下角 HUD
 * 全局响应式断点：≥ 1024 桌面、768-1023 平板、< 768 手机
 */

/* ============ 通用 screen 切换 ============ */
.screen { display: none; min-height: 100vh; width: 100%; }
.screen.active { display: block; }

/* ============ 登录页 ============ */
#screen-login .login-page {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}
#screen-login .left {
  background:
    linear-gradient(180deg, rgba(26,29,26,.55) 0%, rgba(26,29,26,.30) 45%, rgba(26,29,26,.88) 100%),
    url('../assets/login-cover-psa.jpg') center/cover no-repeat,
    #1a1d1a;
  color: #ece9df;
  padding: 56px 72px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
/* 保留品牌红光晕(原斜纹改去 — 图片本身有木纹质感,叠斜纹会脏) */
#screen-login .left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 15% 85%, rgba(138,58,42,0.35), transparent 60%);
  pointer-events: none;
}
#screen-login .left > * { position: relative; z-index: 1; }
#screen-login .brand { display: flex; align-items: center; gap: 14px; }
#screen-login .brand-mark {
  width: 44px; height: 44px; border-radius: var(--r-md);
  background: #ece9df; color: #1a1d1a;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 22px; letter-spacing: -.02em;
}
#screen-login .brand-name { font-size: 15px; font-weight: 600; letter-spacing: .02em; }
#screen-login .brand-sub  { font-size: 11px; color: #9aa099; letter-spacing: .08em; margin-top: 3px; }
#screen-login .hero       { margin-top: auto; margin-bottom: 32px; }
#screen-login .hero h1    { font-family: 'Noto Sans SC'; font-size: 38px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 16px; }
#screen-login .hero p     { font-size: 14px; color: #b7bcb7; line-height: 1.8; max-width: 440px; margin: 0; }
#screen-login .brand-meta { display: flex; gap: 20px; padding-top: 24px; border-top: 1px solid #2a2e2a; }
#screen-login .brand-meta-item { flex: 1; }
#screen-login .brand-meta-item .k { font-size: 10px; color: #7b817b; letter-spacing: .1em; text-transform: uppercase; }
#screen-login .brand-meta-item .v { font-size: 18px; font-weight: 500; margin-top: 4px; font-family: 'Noto Sans SC'; }

#screen-login .right {
  padding: 56px 72px;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--bg);
}
#screen-login .login-box { max-width: 400px; width: 100%; margin: auto; }
#screen-login .login-box h2  { font-size: 24px; font-weight: 600; margin: 0 0 8px; letter-spacing: -.015em; }
#screen-login .login-box .hint { font-size: 13px; color: var(--ink-3); margin-bottom: 32px; }

#screen-login .field { margin-bottom: 18px; }
#screen-login .field label { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 6px; letter-spacing: .02em; }
#screen-login .field input {
  width: 100%; padding: 11px 14px; font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--panel); font-family: inherit; color: var(--ink);
}
#screen-login .field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
#screen-login .field .mono-mini { font-family: var(--font-mono); font-size: 10px; color: var(--ink-4); margin-top: 5px; }

#screen-login .row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ink-3); margin: 4px 0 22px; }
#screen-login .row a { color: var(--accent); text-decoration: none; }
#screen-login .row label { display: flex; align-items: center; gap: 6px; cursor: pointer; }

#screen-login button.submit {
  width: 100%; padding: 13px;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit;
  letter-spacing: .04em;
}
#screen-login button.submit:hover { background: var(--accent-ink); }

#screen-login .divider { text-align: center; margin: 24px 0; color: var(--ink-4); font-size: 11px; position: relative; }
#screen-login .divider::before, #screen-login .divider::after {
  content: ''; position: absolute; top: 50%; width: calc(50% - 40px); height: 1px; background: var(--line);
}
#screen-login .divider::before { left: 0; }
#screen-login .divider::after  { right: 0; }

#screen-login .alt { display: flex; gap: 10px; }
#screen-login .alt button {
  flex: 1; padding: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 12px; cursor: pointer; color: var(--ink-2); font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
#screen-login .foot { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line-2); font-size: 11px; color: var(--ink-4); line-height: 1.7; }

/* 登录页响应式 */
@media (max-width: 768px) {
  #screen-login .login-page { grid-template-columns: 1fr; }
  #screen-login .left { padding: 28px 24px 36px; min-height: 280px; }
  #screen-login .left .hero h1 { font-size: 24px; }
  #screen-login .left .brand-meta { display: none; }
  #screen-login .right { padding: 32px 24px; }
}

/* ============ 模块选择页 ============ */
#screen-select .topbar {
  height: 60px; background: var(--bg-elev); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 32px;
  position: sticky; top: 0; z-index: 10;
}
#screen-select .brand-mini { display: flex; align-items: center; gap: 10px; }
/* C 档章 2: 统一用 `和` 字符 + 红底白字 + r-md (7px) · 跟 chrome.jsx HX_Brand 一致 */
#screen-select .brand-mini .brand-mark {
  width: 28px; height: 28px; border-radius: var(--r-md);
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; letter-spacing: -.02em;
}
#screen-select .brand-t { font-size: 13px; font-weight: 600; }
#screen-select .brand-t .mono-mini { font-family: var(--font-mono); font-size: 10px; color: var(--ink-4); letter-spacing: .04em; margin-top: 2px; }

#screen-select .profile { margin-left: auto; display: flex; align-items: center; gap: 14px; }
#screen-select .profile .me {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--panel);
}
#screen-select .me-avatar {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  background: var(--accent-soft); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px;
}
#screen-select .me-text .n { font-size: 12px; font-weight: 600; }
#screen-select .me-text .r { font-family: var(--font-mono); font-size: 10px; color: var(--ink-4); }

#screen-select .wrap { max-width: 1240px; margin: 0 auto; padding: 40px 32px 80px; }

#screen-select .hello { margin-bottom: 32px; }
#screen-select .hello .kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--accent); text-transform: uppercase; margin-bottom: 8px; }
#screen-select .hello h1 { margin: 0 0 8px; font-size: 28px; font-weight: 600; letter-spacing: -.015em; }
#screen-select .hello p  { margin: 0; font-size: 14px; color: var(--ink-3); line-height: 1.7; max-width: 680px; }

#screen-select .strip {
  display: flex; gap: 20px;
  padding: 18px 24px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  margin-bottom: 32px;
}
#screen-select .strip-item { flex: 1; padding-right: 20px; border-right: 1px solid var(--line-2); }
#screen-select .strip-item:last-child { border-right: none; }
#screen-select .strip-item .k { font-family: var(--font-mono); font-size: 10px; color: var(--ink-4); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
#screen-select .strip-item .v { font-size: 15px; font-weight: 500; }
#screen-select .strip-item .s { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); margin-top: 2px; }

#screen-select .section-h { display: flex; align-items: flex-end; justify-content: space-between; margin: 0 0 16px; }
#screen-select .section-h .eye { font-family: var(--font-mono); font-size: 10px; color: var(--ink-4); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
#screen-select .section-h h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
#screen-select .section-h .right { font-size: 12px; color: var(--ink-3); }

#screen-select .recent { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 44px; }
#screen-select .recent .r-item {
  padding: 10px 14px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
}
#screen-select .recent .r-item:hover { border-color: var(--accent); }
#screen-select .r-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
#screen-select .r-mono { font-family: var(--font-mono); font-size: 10px; color: var(--ink-4); }

/* 2026-05-20 · PR 10 J-01 后续 · 九宫格 3×3(9 模块)→ 5×2(10 模块 · jarvi 拍 Y "随便,你定,美观即可")
   响应式: desktop 5 列 · 中尺寸 1280-1599 → 4 列 · ≤1023 → 2 列 · ≤767 → 1 列 */
#screen-select .grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 44px;
}
@media (max-width: 1599px) {
  #screen-select .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
#screen-select .mod-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; cursor: pointer; position: relative;
  transition: all .15s;
  display: flex; flex-direction: column; gap: 12px; min-height: 200px;
  text-decoration: none; color: inherit;
}
#screen-select .mod-card:hover { transform: translateY(-1px); border-color: var(--ink-4); box-shadow: 0 6px 18px rgba(26,29,26,.06); }
#screen-select .mod-card.highlighted { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--panel) 50%); }
#screen-select .mod-card.locked      { opacity: .55; cursor: not-allowed; }
#screen-select .mod-card.locked:hover{ transform: none; border-color: var(--line); box-shadow: none; }

#screen-select .mod-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
#screen-select .mod-num {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  padding: 3px 7px; border-radius: var(--r-pill);
  background: var(--chip); color: var(--ink-3); letter-spacing: .06em;
}
#screen-select .mod-card.highlighted .mod-num { background: var(--accent); color: #fff; }
#screen-select .mod-status     { font-family: var(--font-mono); font-size: 10px; color: var(--ink-4); letter-spacing: .04em; }
#screen-select .mod-status.ok  { color: var(--ok); }
#screen-select .mod-status.dev { color: var(--warn); }

#screen-select .mod-title { font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
#screen-select .mod-sub   { font-size: 12px; color: var(--ink-3); line-height: 1.7; flex: 1; }

#screen-select .mod-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px dashed var(--line-2);
  font-size: 11px; color: var(--ink-4); font-family: var(--font-mono);
}
#screen-select .mod-foot .go { color: var(--accent); font-family: inherit; font-weight: 500; display: flex; align-items: center; gap: 4px; }
#screen-select .mod-card.highlighted .mod-foot .go { color: var(--accent-ink); }

#screen-select .tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
#screen-select .tag {
  font-family: var(--font-mono); font-size: 10px;
  padding: 2px 6px; border-radius: 3px;
  background: var(--bg); color: var(--ink-3); border: 1px solid var(--line-2);
}
#screen-select .tag.hot { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

/* 模块选择页响应式 */
@media (max-width: 1023px) {
  #screen-select .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  #screen-select .topbar { padding: 0 18px; }
  #screen-select .wrap { padding: 24px 18px 80px; }
  #screen-select .hello h1 { font-size: 22px; }
  #screen-select .strip { flex-direction: column; gap: 12px; padding: 16px 18px; }
  #screen-select .strip-item { padding-right: 0; padding-bottom: 12px; border-right: none; border-bottom: 1px solid var(--line-2); }
  #screen-select .strip-item:last-child { padding-bottom: 0; border-bottom: none; }
  #screen-select .grid { grid-template-columns: 1fr; }
  #screen-select .profile .me-text { display: none; }
}

/* ============ 右下角 HUD ============ */
.nav-hud {
  position: fixed; right: 16px; bottom: 16px; z-index: 9999;
  background: rgba(26,29,26,0.78);
  color: #ece9df;
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border-radius: var(--r-pill);
  padding: 6px;
  display: flex; gap: 4px; align-items: center;
  font: 500 12px/1 var(--font-sans);
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  transition: transform .25s ease, opacity .25s;
  max-width: calc(100vw - 32px);
}
.nav-hud.collapsed { transform: translateX(calc(100% - 40px)); opacity: .85; }

.nav-hud .nav-hud-toggle {
  background: transparent; color: inherit; border: 0;
  width: 28px; height: 28px; border-radius: var(--r-pill); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex: 0 0 auto;
}
.nav-hud .nav-hud-toggle:hover { background: rgba(255,255,255,0.1); }

.nav-hud a, .nav-hud button {
  background: transparent; color: inherit; border: 0;
  padding: 6px 12px; border-radius: var(--r-pill); cursor: pointer;
  text-decoration: none; font: inherit;
  white-space: nowrap;
}
.nav-hud a.active, .nav-hud button.active { background: var(--shell-accent); color: #fff; }
.nav-hud a:hover:not(.active), .nav-hud button:hover:not(.active) { background: rgba(255,255,255,0.08); }
/* C 档:占位模块 link 视觉弱化 (M02/M08/M09 走九宫格主入口,HUD 只是 dev 快捷) */
.nav-hud a.placeholder { opacity: 0.55; }
.nav-hud a.placeholder:hover { opacity: 0.85; }

/* HUD 在窄屏：只显示图标式缩略 */
@media (max-width: 600px) {
  .nav-hud { right: 8px; bottom: 8px; padding: 4px; gap: 2px; font-size: 11px; }
  .nav-hud a, .nav-hud button { padding: 5px 8px; }
}

/* A.3 章 11: 登录页(未登录态)强制隐藏 user-menu chip + nav-hud
 * sync() 切换到 #login 时给 body 加 data-screen="login" */
body[data-screen="login"] .nav-hud,
body[data-screen="login"] .user-menu { display: none !important; }
