/* 简光OA 2.0 · 星系外壳:顶栏、全部功能、星系首页 */
[data-ai="off"] [data-ai-only] { display: none !important; }

/* ---------- 外壳与顶栏 ---------- */
.gx-shell { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.gx-top { gap: 10px; padding: 0 16px; }
.gx-top h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.gx-brand { display: flex; align-items: center; gap: 10px; flex: none; min-width: 0; color: var(--text); padding-right: 4px; }
.gx-brand b { font-size: 16px; letter-spacing: .04em; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.gx-brand:hover b { color: var(--cyan); }
.gx-back { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; padding: 0 13px 0 10px; border-radius: 999px;
  border: 1px solid var(--line2); background: rgba(94, 234, 212, .06); color: var(--cyan); font-size: 13.5px; white-space: nowrap; transition: background .12s, color .12s; }
.gx-back:hover { background: rgba(94, 234, 212, .15); color: #fff; }
.gx-back svg { width: 16px; height: 16px; }
body[data-page="home"] .gx-back,
body[data-page="home"] .gx-top #pageCode { display: none; }
.gx-launch { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; flex: none; height: 36px; padding: 0 8px 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--text2); font-size: 14px; cursor: pointer; transition: border-color .12s, background .12s, color .12s; }
.gx-launch:hover { border-color: rgba(94, 234, 212, .5); background: rgba(94, 234, 212, .08); color: #fff; }
.gx-launch svg { width: 17px; height: 17px; }
.gx-launch kbd, .lnc kbd { font: 11px var(--mono); letter-spacing: .04em; color: var(--mute); padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; white-space: nowrap; }
:is(.gx-launch, .gx-back, .gx-brand, .lnc-it, .lnc-ask, .gx-chip):focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.gx-shell .view:not(.full) { padding: 22px clamp(16px, 3vw, 40px) 130px; }
:root[data-experience="app"] .experience-voice { left: 16px; right: auto; }

/* ---------- 全部功能 ---------- */
.lnc { position: fixed; inset: 0; z-index: 110; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px;
  background: rgba(2, 5, 8, .62); backdrop-filter: blur(4px); animation: fadeIn .14s; }
.lnc-in { width: 680px; max-width: 100%; max-height: 80vh; display: flex; flex-direction: column; overflow: hidden; border-radius: 14px;
  background: var(--panel2); border: 1px solid var(--line2); box-shadow: 0 24px 70px rgba(0, 0, 0, .6), 0 0 40px rgba(94, 234, 212, .08); animation: popIn .16s ease-out; }
.lnc-q { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex: none; }
.lnc-q > svg { width: 19px; height: 19px; color: var(--cyan); flex: none; }
.lnc-q .inp { flex: 1; min-width: 0; height: 44px; padding: 0 4px; border: none; background: none; font-size: 17px; }
.lnc-q .inp:focus { box-shadow: none; }
.lnc-ask { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; flex: none; margin: 10px 12px 0; padding: 10px 14px; border-radius: 10px;
  border: 1px dashed rgba(129, 140, 248, .5); color: var(--text2); font-size: 14.5px; cursor: pointer; min-width: 0; }
.lnc-ask svg { width: 17px; height: 17px; color: var(--indigo); flex: none; }
.lnc-ask-q { min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lnc-ask:hover, .lnc-ask.on { border-style: solid; background: rgba(129, 140, 248, .1); color: #fff; }
.lnc-body { overflow: auto; padding: 4px 12px 16px; overscroll-behavior: contain; }
.lnc-body section { margin-top: 12px; }
.lnc-body h4 { margin: 0 4px 6px; font: 400 11.5px var(--mono); letter-spacing: .16em; color: var(--hud); }
.lnc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.lnc-it { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px;
  border: 1px solid transparent; background: rgba(255, 255, 255, .025); color: var(--text2); transition: border-color .1s, background .1s; }
.lnc-it svg { grid-row: 1 / 3; width: 20px; height: 20px; color: var(--cyan); }
.lnc-it b { font-size: 14.5px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lnc-it small { font: 10.5px var(--mono); letter-spacing: .1em; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lnc-it .badge { position: absolute; top: 7px; right: 8px; }
.lnc-it:hover, .lnc-it.on { border-color: rgba(94, 234, 212, .45); background: rgba(94, 234, 212, .08); }
.lnc-none { padding: 30px 0 18px; text-align: center; color: var(--dim); font-size: 14px; }

/* ---------- 星系首页 ---------- */
.gx .sm-hud, .gx .sm-corner { display: none; }
.gx-head { position: absolute; z-index: 5; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap;
  gap: 12px 20px; padding: 18px 20px 0; pointer-events: none; transition: padding-right .2s ease-out; }
.gx-hello { min-width: 0; max-width: 560px; }
.gx-hello h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; margin-top: 6px; font-size: 26px; font-weight: 600; letter-spacing: .02em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .65); }
.gx-hello h2 b { color: var(--cyan); font-weight: 600; overflow-wrap: anywhere; }
.gx-today { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; pointer-events: auto; }
.gx-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 5px; border-radius: 999px; border: 1px solid var(--line2);
  background: rgba(11, 15, 20, .8); backdrop-filter: blur(6px); color: var(--text2); font-size: 14px; cursor: pointer; white-space: nowrap; transition: border-color .12s, background .12s, color .12s; }
.gx-chip b { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; background: rgba(94, 234, 212, .16); color: var(--cyan); font: 600 13px var(--mono); }
.gx-chip:hover { border-color: rgba(94, 234, 212, .6); background: rgba(94, 234, 212, .1); color: #fff; }
.gx-chip.calm { padding: 0 14px; cursor: default; color: var(--dim); border-color: var(--line); }
.gx-chip.calm::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.gx-chip.calm:hover { background: rgba(11, 15, 20, .8); color: var(--dim); border-color: var(--line); }
.gx-find { display: flex; align-items: center; gap: 8px; pointer-events: auto; }
.gx-find .cnt { font: 12px var(--mono); color: var(--hud); white-space: nowrap; text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
.gx-search { position: relative; width: 260px; }
.gx-search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.gx-search .inp { height: 38px; padding-left: 36px; border-radius: 999px; background: rgba(8, 12, 17, .86); }
.gx-find .btn { width: 38px; height: 38px; padding: 0; border-radius: 50%; border-color: var(--line); background: rgba(8, 12, 17, .86); }
.gx-legend { left: 18px; bottom: 16px; max-width: 300px; }
.gx-legend .lg { margin-right: 10px; }
.gx-ask { position: absolute; z-index: 5; left: 50%; bottom: 26px; transform: translateX(-50%); width: max-content; max-width: min(640px, calc(100% - 720px));
  display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.gx-ask-h { font-size: 13px; letter-spacing: .06em; color: rgba(125, 243, 226, .85); text-shadow: 0 1px 10px rgba(0, 0, 0, .8); }
.gx-ask-c { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; pointer-events: auto; }
.gx-ask .ai-chip { background: rgba(11, 15, 20, .82); backdrop-filter: blur(6px); }
.gx .om-drawer { padding-bottom: 130px; }
.gx .om-drawer .gx-go { margin-top: 14px; }
.gx .om-drawer .gx-go .btn.pri { height: 40px; padding: 0 18px; font-size: 15px; }
@media (min-width: 901px) {
  .gx.picked .gx-head { padding-right: calc(min(350px, 92%) + 20px); }
}
@media (max-width: 1100px) {
  .gx-ask { max-width: calc(100% - 280px); bottom: 96px; }
}
@media (max-width: 900px) {
  .gx-legend { display: none; }
  .gx-ask { bottom: 26px; }
  .gx.picked .gx-find { display: none; }
}

/* ---------- 窄屏 ---------- */
@media (hover: none), (max-width: 760px) {
  .gx-launch kbd { display: none; }
}
@media (max-width: 640px) {
  .gx-top { gap: 6px; padding: 0 8px; }
  .gx-brand b, .gx-launch span { display: none; }
  body:not([data-page="home"]) .gx-brand { display: none; }
  .gx-launch { width: 36px; padding: 0; justify-content: center; }
  .gx-back { padding: 0 10px 0 8px; }
  .gx-shell .view:not(.full) { padding: 16px 12px 120px; }
  .gx-head { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 10px; padding: 12px 14px 0; }
  .gx-hello h2 { font-size: 21px; }
  .gx-today { margin-top: 10px; }
  .gx-find .cnt { display: none; }
  .gx-search { flex: 1; width: auto; }
  .gx-ask { left: 12px; right: 92px; bottom: 18px; transform: none; width: auto; max-width: none; align-items: flex-start; }
  .gx-ask-c { flex-wrap: nowrap; justify-content: flex-start; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .gx-ask-c::-webkit-scrollbar { display: none; }
  .gx.picked .gx-ask { display: none; }
  .lnc { padding: 8px; align-items: stretch; }
  .lnc-in { max-height: none; height: 100%; }
  .lnc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 浅色模式:星图画布已是浅色天空,压在画布上的文字用深色,浮层卡片用白底 ---------- */
:root[data-experience="app"][data-theme="light"] .om.gx .sm-cv { opacity: 1; }
:root[data-experience="app"][data-theme="light"] .gx-hello h2 { color: #22303f; }
:root[data-experience="app"][data-theme="light"] .gx-hello h2 b { color: #0d9488; }
:root[data-experience="app"][data-theme="light"] :is(.gx-hello .hud-code, .gx-find .cnt) { color: rgba(13, 148, 136, .78); }
:root[data-experience="app"][data-theme="light"] :is(.gx-chip, .gx-search .inp, .gx-find .btn) { background: rgba(255, 255, 255, .92); color: var(--text); }
:root[data-experience="app"][data-theme="light"] .gx .gx-ask .ai-chip { background: rgba(255, 255, 255, .92); color: var(--text); }
:root[data-experience="app"][data-theme="light"] .gx-chip.calm { color: var(--dim); }
:root[data-experience="app"][data-theme="light"] .gx-back { background: rgba(14, 118, 110, .07); }
:root[data-experience="app"][data-theme="light"] .lnc { background: rgba(23, 43, 67, .3); }
:root[data-experience="app"][data-theme="light"] .lnc-in { box-shadow: 0 24px 70px rgba(40, 60, 86, .25); }
:root[data-experience="app"][data-theme="light"] .lnc-it { background: #f6f9fc; }
:root[data-experience="app"][data-theme="light"] :is(.lnc-it:hover, .lnc-it.on) { background: rgba(14, 118, 110, .08); }
:root[data-experience="app"][data-theme="light"] :is(.gx-back:hover, .gx-launch:hover, .gx-chip:hover, .lnc-ask:hover, .lnc-ask.on) { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .lnc, .lnc-in { animation: none; }
  .gx-head, .gx-back, .gx-launch, .gx-chip, .lnc-it { transition: none; }
}
