@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap");

:root{
  --hub-bg:#060912;
  --hub-bg-2:#0b1222;
  --hub-bg-3:#0e1830;
  --hub-surface:rgba(12,18,34,.72);
  --hub-surface-2:rgba(14,22,40,.72);
  --hub-text:#e8edf9;
  --hub-muted:#9aa8c4;
  --hub-border:rgba(108,146,255,.34);
  --hub-border-soft:rgba(108,146,255,.18);
  --hub-shadow:0 18px 56px rgba(2,4,10,.55);
  --hub-shadow-soft:0 10px 26px rgba(2,4,10,.36);
  --hub-radius:18px;
  --hub-radius-sm:12px;
  --hub-primary:#5f8bff;
  --hub-primary-2:#65edff;
  --hub-primary-hover:#79a1ff;
  --hub-primary-rgb:95 139 255;
  --hub-secondary-rgb:101 237 255;
  --hub-danger:#ff6c7d;
  --hub-aura-1:rgba(98,153,255,.24);
  --hub-aura-2:rgba(72,220,255,.18);
  --hub-aura-3:rgba(69,95,255,.20);
  --hub-panel-gray-1:#101317;
  --hub-panel-gray-2:#171b21;
  --hub-panel-gray-3:#21262d;
  --hub-grad-soft:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .18),var(--hub-panel-gray-2) 52%,var(--hub-panel-gray-3));
  --hub-grad-base:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .24),var(--hub-panel-gray-2) 44%,var(--hub-panel-gray-3));
  --hub-grad-strong:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .34),var(--hub-panel-gray-2) 30%,var(--hub-panel-gray-3));
  --hub-input-bg:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .10),#111418 58%,#0d1014);
  --inst-logo-size:148px;
  --hub-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  --hub-serif:"Instrument Serif","Times New Roman","Noto Serif SC",serif;
  --hub-sans:"Noto Sans SC","Source Han Sans SC","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
}

@font-face{
  font-family:"WDXL Lubrifont SC";
  src:local("WDXL Lubrifont SC"), local("WDXL LubrifontSC");
  font-display:swap;
}

*{box-sizing:border-box}
html,body{
  margin:0;
  padding:0;
  color:var(--hub-text);
  background:
    radial-gradient(circle at 18% -4%, var(--hub-aura-1), transparent 34%),
    radial-gradient(circle at 92% 8%, var(--hub-aura-2), transparent 40%),
    radial-gradient(circle at 52% 120%, var(--hub-aura-3), transparent 45%),
    linear-gradient(160deg,var(--hub-bg),var(--hub-bg-2) 52%,var(--hub-bg-3));
}
body{
  font-family:var(--hub-sans)!important;
  min-height:100vh;
}
body.inst-modal-open{
  overflow:hidden;
}

.app-shell{
  max-width:1320px;
  margin:0 auto;
  padding:24px 20px 44px;
}
.flow-header{
  display:none;
  position:sticky;
  top:10px;
  z-index:20;
  margin:0 0 14px;
  padding:10px 12px;
  border:1px solid var(--hub-flow-header-border, var(--hub-border));
  border-radius:14px;
  background:var(--hub-flow-header-bg, linear-gradient(180deg,rgba(18,28,52,.84),rgba(10,16,30,.82)));
  box-shadow:var(--hub-flow-header-glow, 0 16px 34px rgba(4,10,22,.42));
  backdrop-filter:blur(8px);
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.flow-header.is-visible{
  display:flex;
}
.flow-header-left{
  min-width:0;
  display:flex;
  align-items:center;
  gap:10px;
}
.flow-header-logo-wrap{
  width:54px;
  height:54px;
  border-radius:12px;
  border:1px solid var(--hub-border-soft);
  background:rgba(255,255,255,.92);
  padding:6px;
  display:grid;
  place-items:center;
  overflow:hidden;
  flex:0 0 auto;
}
.flow-header-logo{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.flow-header-text{
  min-width:0;
  display:grid;
  gap:2px;
}
.flow-header-title{
  font:700 14px/1.25 var(--hub-sans);
  color:#ecf3ff;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.flow-header-sub{
  font:12px/1.35 var(--hub-mono);
  letter-spacing:.04em;
  color:#a9bddf;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.app-shell.has-flow-header .screen:not(#screen-institution) .top-brand{
  display:none;
}
.app-shell.has-flow-header .screen{
  min-height:calc(100vh - 132px);
}

.screen{
  display:none;
  min-height:calc(100vh - 68px);
}
.screen.active{
  display:block;
  animation:hubFade .24s ease-out;
}
@keyframes hubFade{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes hubSpin{
  to{ transform:rotate(360deg); }
}
@keyframes hubPendingBar{
  0%{ transform:translateX(-140%); }
  60%{ transform:translateX(210%); }
  100%{ transform:translateX(210%); }
}
@keyframes hubPendingSweep{
  0%{ transform:translateX(-130%); opacity:0; }
  18%{ opacity:.45; }
  54%{ opacity:.75; }
  100%{ transform:translateX(140%); opacity:0; }
}
@keyframes hubPendingText{
  0%{ opacity:.72; text-shadow:0 0 0 rgb(var(--hub-secondary-rgb) / 0); }
  50%{ opacity:1; text-shadow:0 0 12px rgb(var(--hub-secondary-rgb) / .34); }
  100%{ opacity:.72; text-shadow:0 0 0 rgb(var(--hub-secondary-rgb) / 0); }
}

.top-brand{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}
.brand-title{
  font-family:var(--hub-mono);
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--hub-muted);
}
.brand-status{
  font-family:var(--hub-mono);
  font-size:11px;
  letter-spacing:.06em;
  color:#c8d7f7;
  border:1px solid var(--hub-border);
  background:rgb(var(--hub-primary-rgb) / .14);
  border-radius:999px;
  padding:4px 10px;
}

.card{
  border:1px solid var(--hub-border);
  border-radius:var(--hub-radius);
  background:var(--hub-grad-base);
  box-shadow:var(--hub-shadow-soft);
  backdrop-filter:blur(8px);
}
.card.pad-lg{padding:26px}
.card.pad-md{padding:18px}

.btn-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}
.btn{
  appearance:none;
  border:1px solid var(--hub-border);
  border-radius:999px;
  background:rgb(var(--hub-primary-rgb) / .14);
  color:#dbe6ff;
  padding:10px 16px;
  font:600 14px/1 var(--hub-sans);
  cursor:pointer;
  transition:.15s ease;
}
.btn:hover{
  transform:translateY(-1px);
  border-color:rgb(var(--hub-primary-rgb) / .62);
  box-shadow:0 0 0 1px rgb(var(--hub-primary-rgb) / .32),0 10px 24px rgb(var(--hub-primary-rgb) / .22);
}
.btn:disabled{
  opacity:.42;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}
.btn.primary{
  border-color:transparent;
  background:linear-gradient(92deg,var(--hub-primary),var(--hub-primary-2));
  color:#061022;
  font-weight:800;
  box-shadow:0 0 0 1px rgb(var(--hub-primary-rgb) / .24),0 10px 24px rgb(var(--hub-primary-rgb) / .24);
}
.btn.primary:hover{
  background:linear-gradient(92deg,var(--hub-primary-hover),var(--hub-primary-2));
  box-shadow:0 0 0 1px rgb(var(--hub-primary-rgb) / .3),0 14px 28px rgb(var(--hub-primary-rgb) / .3);
}
.btn.ghost{
  background:transparent;
  border-color:var(--hub-border-soft);
}
.btn.danger{
  color:#ffc7ce;
  border-color:rgba(255,108,125,.45);
}

.disclaimer{
  border:1px solid var(--hub-border-soft);
  border-radius:var(--hub-radius-sm);
  background:var(--hub-grad-soft);
  color:#c5d4ee;
  padding:10px 12px;
  font-size:13px;
  line-height:1.55;
}
.disclaimer.weak{
  border-color:var(--hub-border-soft);
  background:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .14),var(--hub-panel-gray-2) 54%,var(--hub-panel-gray-3));
  color:#b9c9e4;
}
.disclaimer strong{
  font-weight:800;
  color:#e7f0ff;
}

.title-xl{
  margin:0;
  font-size:clamp(30px,4.8vw,56px);
  line-height:1.1;
  letter-spacing:.01em;
  font-weight:800;
  color:#f1f6ff;
}
.subtitle{
  margin:8px 0 0;
  color:var(--hub-muted);
  line-height:1.62;
  font-size:15px;
  max-width:860px;
}
.mono{
  font-family:var(--hub-mono);
  font-size:12px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#9db2de;
}
.hub-mono{
  font-family:var(--hub-mono);
  font-size:12px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#9db2de;
}
.hub-disclaimer{
  border:1px solid var(--hub-border-soft);
  border-radius:var(--hub-radius-sm);
  background:var(--hub-grad-soft);
  color:#c5d4ee;
  padding:10px 12px;
  font-size:13px;
  line-height:1.55;
}
.hub-disclaimer.weak{
  border-color:var(--hub-border-soft);
  background:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .12),var(--hub-panel-gray-2) 56%,var(--hub-panel-gray-3));
  color:#b9c9e4;
}
.hub-disclaimer strong{
  font-weight:800;
  color:#e7f0ff;
}
.sub-en{
  font-family:var(--hub-serif);
  letter-spacing:.03em;
}

.loading-wrap{
  min-height:calc(100vh - 80px);
  display:grid;
  place-items:center;
}
.loading-panel{
  width:min(760px,94vw);
  padding:36px 30px 30px;
  border-radius:24px;
  border:1px solid var(--hub-border);
  background:var(--hub-grad-strong);
  box-shadow:var(--hub-shadow);
  backdrop-filter:blur(12px) saturate(125%);
  position:relative;
  overflow:hidden;
}
.loading-title{
  margin:0;
  font-size:clamp(26px,4.6vw,44px);
  line-height:1.08;
  font-weight:900;
  position:relative;
  z-index:2;
}
.loading-copy{
  margin:10px 0 16px;
  color:rgb(var(--hub-secondary-rgb) / .78);
  line-height:1.72;
  font-size:14px;
  position:relative;
  z-index:2;
}
.loading-panel .disclaimer,
.loading-panel .progress-track,
.loading-panel .progress-meta{
  position:relative;
  z-index:2;
}
.loading-particles{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:1;
  opacity:.92;
}
.progress-track{
  height:10px;
  border-radius:999px;
  border:1px solid var(--hub-border-soft);
  background:rgb(var(--hub-primary-rgb) / .16);
  overflow:hidden;
}
.progress-fill{
  height:100%;
  width:0;
  background:linear-gradient(90deg,var(--hub-primary),var(--hub-primary-2));
  transition:width .18s linear;
}
.progress-meta{
  margin-top:10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:12px;
  font-family:var(--hub-mono);
  letter-spacing:.04em;
  color:#a9bbd9;
}

.hero{
  border:1px solid var(--hub-border);
  border-radius:26px;
  min-height:calc(100vh - 120px);
  padding:clamp(56px,8vw,120px) clamp(34px,6vw,90px);
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:14px;
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at 14% -12%, rgba(100,159,255,.35), transparent 40%),
    radial-gradient(circle at 86% 0%, rgba(94,232,255,.26), transparent 44%),
    linear-gradient(180deg,rgba(22,34,64,.86),rgba(11,18,33,.82));
  box-shadow:var(--hub-shadow);
}
.hero::before,
.hero::after{
  content:"";
  position:absolute;
  inset:-30%;
  pointer-events:none;
  z-index:0;
}
.hero::before{
  background:
    radial-gradient(circle at 18% 22%, rgba(111,159,255,.42), transparent 34%),
    radial-gradient(circle at 86% 70%, rgba(88,238,255,.30), transparent 38%),
    radial-gradient(circle at 62% 42%, rgba(146,120,255,.22), transparent 44%);
  filter:blur(12px);
  animation:heroAuraFlow 16s ease-in-out infinite alternate;
}
.hero::after{
  background:
    radial-gradient(rgba(150,184,255,.22) 1px, transparent 1px),
    radial-gradient(rgba(96,235,255,.18) 1px, transparent 1px);
  background-size: 34px 34px, 56px 56px;
  background-position: 0 0, 14px 10px;
  mix-blend-mode:screen;
  opacity:.32;
  animation:heroGridDrift 24s linear infinite;
}
.hero > *{
  position:relative;
  z-index:2;
}
.hero .hero-particles{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:1;
  pointer-events:none;
  opacity:.88;
}
.hero .hero-main-title{
  margin:0;
  line-height:1.06;
  max-width:min(980px,90%);
  font-family:"WDXL Lubrifont SC", var(--hub-sans);
  text-wrap:balance;
}
.hero .hero-line{
  display:block;
}
.hero .hero-line-welcome{
  font-size:clamp(32px,4.8vw,58px);
  font-weight:700;
  color:transparent;
  -webkit-text-stroke:1.2px #9acfff;
  letter-spacing:.03em;
}
.hero .hero-welcome-en{
  margin-left:.38em;
  color:#8fdcff;
  -webkit-text-stroke:0;
  font-family:var(--hub-serif);
  font-size:.58em;
  letter-spacing:.06em;
  text-transform:uppercase;
  font-style:italic;
}
.hero .hero-line-cn{
  margin-top:.12em;
  font-size:clamp(46px,6.4vw,86px);
  font-weight:900;
  color:var(--hub-primary-2);
  text-shadow:0 0 22px rgba(101,237,255,.24);
}
.hero .hero-line-cn .hero-cn-main,
.hero .hero-line-cn .hero-cn-sub{
  display:inline-block;
  white-space:nowrap;
}
.hero .hero-line-cn .hero-cn-sub{
  margin-left:.22em;
}
.hero .hero-sub-en{
  margin:16px 0 0;
  font-family:var(--hub-serif);
  font-size:clamp(24px,3.6vw,44px);
  letter-spacing:.03em;
  text-transform:uppercase;
  color:#bfd0eb;
  max-width:min(950px,86%);
  line-height:1.24;
}
.hero .hero-status{
  min-height:22px;
  margin-top:2px;
  font-family:var(--hub-mono);
  font-size:12px;
  letter-spacing:.14em;
  color:#a9bddf;
  text-transform:uppercase;
}
.hero .hero-code-roll,
.hero .hero-system-status{
  display:inline-block;
  opacity:0;
  transform:translateY(8px);
  transition:opacity .28s ease, transform .28s ease;
}
.hero .hero-code-roll.is-visible,
.hero .hero-system-status.is-visible{
  opacity:1;
  transform:translateY(0);
}
.hero .hero-code-roll{
  color:#83acd9;
}
.hero .hero-system-status{
  color:#9cf7c6;
  font-weight:700;
  display:none;
}
.hero .tip{
  margin-top:2px;
  font-size:17px;
  color:#c6d2e6;
  line-height:1.6;
  max-width:min(760px,70%);
}
.hero .hero-brief{
  margin-top:4px;
  max-width:min(900px,80%);
  display:grid;
  gap:6px;
}
.hero .hero-brief-line{
  margin:0;
  font-size:15px;
  line-height:1.75;
  color:#bccce8;
  opacity:0;
  transform:translateY(14px);
}
.hero .hero-brief-cta{
  margin-top:4px;
  opacity:0;
  transform:translateY(14px);
}
.hero .hero-confirm-btn{
  appearance:none;
  border:1px solid rgba(118,188,255,.55);
  border-radius:999px;
  background:linear-gradient(90deg,rgba(31,56,96,.85),rgba(23,41,74,.86));
  color:#d9ecff;
  font-family:"Source Han Sans SC","Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif;
  font-size:13px;
  font-weight:700;
  line-height:1.1;
  letter-spacing:.04em;
  text-shadow:0 0 8px rgba(138,216,255,.75),0 0 20px rgba(98,190,255,.45);
  padding:11px 18px;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.hero .hero-confirm-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(131,205,255,.78);
  box-shadow:0 0 0 1px rgba(131,205,255,.3), 0 8px 24px rgba(8,16,32,.45);
}
.hero .hero-confirm-btn:active{
  transform:translateY(0);
}
.hero .disclaimer.weak{
  margin-top:22px;
  width:min(760px,72%);
}
.hero .hero-char{
  display:inline-block;
  opacity:0;
  transform:translateY(18px);
  filter:blur(6px);
  will-change:transform,opacity,filter;
}
.hero.hero-animate .hero-char{
  animation:heroCharIn .72s cubic-bezier(.22,.8,.28,1) forwards;
  animation-delay:calc(var(--char-i, 0) * 42ms + 120ms);
}
.hero .hero-sub-en,
.hero .hero-status,
.hero .tip,
.hero .hero-brief-line,
.hero .hero-brief-cta,
.hero .disclaimer.weak{
  opacity:0;
  transform:translateY(14px);
}
.hero.hero-animate .hero-sub-en{
  animation:heroTextIn .7s ease forwards;
  animation-delay:1s;
}
.hero.hero-animate .hero-status{
  animation:heroTextIn .7s ease forwards;
  animation-delay:1.2s;
}
.hero.hero-animate .tip{
  animation:heroTextIn .7s ease forwards;
  animation-delay:1.38s;
}
.hero.hero-animate .hero-brief-line{
  animation:heroTextIn .7s ease forwards;
  animation-delay:calc(1.5s + var(--line-i, 0) * 140ms);
}
.hero.hero-animate .hero-brief-cta{
  animation:heroTextIn .7s ease forwards;
  animation-delay:2.2s;
}
.hero.hero-animate .disclaimer.weak{
  animation:heroTextIn .7s ease forwards;
  animation-delay:2.64s;
}
@keyframes heroAuraFlow{
  0%{transform:translate3d(-3%, -2%, 0) scale(1)}
  50%{transform:translate3d(2%, 1%, 0) scale(1.04)}
  100%{transform:translate3d(4%, 3%, 0) scale(1.08)}
}
@keyframes heroGridDrift{
  from{transform:translate3d(0,0,0)}
  to{transform:translate3d(-56px,-34px,0)}
}
@keyframes heroCharIn{
  to{
    opacity:1;
    transform:translateY(0);
    filter:blur(0);
  }
}
@keyframes heroTextIn{
  to{
    opacity:1;
    transform:translateY(0);
  }
}

.inst-layout{
  margin-top:clamp(32px,6vh,72px);
  display:flex;
  justify-content:center;
  align-items:flex-start;
}
.inst-layout.jump-highlight{
  animation:instAreaFocus .8s ease;
}
.inst-grid-shell{
  width:min(1180px,100%);
  border-color:rgb(var(--hub-primary-rgb) / .42);
  background:var(--hub-grad-base);
  backdrop-filter:blur(10px) saturate(118%);
  box-shadow:0 16px 40px rgba(3,8,18,.44);
}
.inst-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  justify-items:center;
  perspective:920px;
}
.inst-card{
  width:100%;
  max-width:248px;
  border:1px solid rgb(var(--hub-primary-rgb) / .42);
  border-radius:16px;
  background:linear-gradient(170deg,rgb(var(--hub-primary-rgb) / .24),var(--hub-panel-gray-2) 58%,var(--hub-panel-gray-3));
  padding:16px 14px 14px;
  min-height:220px;
  cursor:pointer;
  transition:.18s ease;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  text-align:center;
  color:#d8e7ff;
  transform:translateY(0) scale(.98);
  box-shadow:0 12px 26px rgba(7,14,30,.3);
  position:relative;
  overflow:hidden;
  backdrop-filter:blur(7px);
}
.inst-card::before{
  content:"";
  position:absolute;
  inset:-26% -18% auto;
  height:70%;
  background:radial-gradient(circle at 40% 10%, rgb(var(--hub-secondary-rgb) / .28), transparent 64%);
  pointer-events:none;
}
.inst-card > *{
  position:relative;
  z-index:1;
}
.inst-logo-wrap{
  width:var(--inst-logo-size);
  height:var(--inst-logo-size);
  border-radius:18px;
  border:1px solid rgba(77,109,157,.18);
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(240,246,255,.96));
  display:grid;
  place-items:center;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 8px 18px rgba(10,24,46,.12);
  padding:12px;
}
.inst-card:hover{
  transform:translateY(-4px) scale(1);
  border-color:rgb(var(--hub-primary-rgb) / .76);
  box-shadow:0 0 0 1px rgb(var(--hub-primary-rgb) / .32),0 16px 34px rgba(9,18,36,.42);
}
.inst-grid.has-active .inst-card:not(.active){
  opacity:.5;
  transform:translateY(0) scale(.95);
  filter:saturate(.7) brightness(.9);
}
.inst-card.active{
  border-color:var(--hub-primary);
  box-shadow:0 0 0 1px rgb(var(--hub-primary-rgb) / .72), 0 20px 36px rgba(8,16,32,.48);
  background:linear-gradient(170deg,rgb(var(--hub-primary-rgb) / .34),var(--hub-panel-gray-2) 52%,var(--hub-panel-gray-3));
  transform:translateY(-9px) scale(1.05);
  z-index:3;
}
.inst-card.picked{
  animation:instCardPick .34s cubic-bezier(.2,.8,.24,1);
}
.inst-logo{width:100%;height:100%;object-fit:fill}
.inst-code{font-family:var(--hub-mono);font-size:12px;letter-spacing:.06em;color:#9cb8e0}
.inst-name{font-size:16px;line-height:1.35;font-weight:800;margin:0;color:#edf4ff}
.inst-slogan{margin:0;font-size:12px;line-height:1.5;color:#b4c7e5}
.inst-card-tags{
  margin-top:auto;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:6px;
}
.inst-mini-tag{
  font-size:10px;
  font-family:var(--hub-mono);
  letter-spacing:.02em;
  padding:3px 7px;
  border-radius:999px;
  border:1px solid rgb(var(--hub-primary-rgb) / .42);
  background:rgb(var(--hub-primary-rgb) / .24);
  color:#cde1ff;
}
@keyframes instCardPick{
  0%{transform:translateY(0) scale(.98)}
  62%{transform:translateY(-14px) scale(1.08)}
  100%{transform:translateY(-9px) scale(1.05)}
}
@keyframes instAreaFocus{
  0%{box-shadow:0 0 0 0 rgba(109,186,255,0)}
  35%{box-shadow:0 0 0 2px rgba(109,186,255,.34)}
  100%{box-shadow:0 0 0 0 rgba(109,186,255,0)}
}

.inst-detail{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
  z-index:130;
  opacity:0;
  pointer-events:none;
  transition:opacity .22s ease;
}
.inst-detail.open{
  opacity:1;
  pointer-events:auto;
}
.inst-detail-backdrop{
  position:absolute;
  inset:0;
  border:0;
  background:rgba(3,8,17,.72);
  backdrop-filter:blur(6px);
  cursor:pointer;
}
.inst-detail-panel{
  position:relative;
  z-index:1;
  width:min(760px,94vw);
  border:1px solid rgb(var(--hub-primary-rgb) / .45);
  border-radius:22px;
  background:var(--hub-grad-strong);
  box-shadow:0 30px 80px rgba(2,6,14,.65);
  padding:24px 24px 20px;
  text-align:center;
}
.inst-detail-close{
  appearance:none;
  position:absolute;
  top:10px;
  right:10px;
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgb(var(--hub-primary-rgb) / .42);
  background:rgb(var(--hub-primary-rgb) / .22);
  color:#dce9ff;
  font-size:20px;
  line-height:1;
  cursor:pointer;
}
.inst-detail-code{
  margin:0 0 12px;
}
.logo-lg-wrap{
  width:var(--inst-logo-size);
  height:var(--inst-logo-size);
  margin:0 auto 14px;
  border-radius:26px;
  border:1px solid rgba(90,122,170,.22);
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(237,244,255,.96));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 14px 28px rgba(8,18,38,.26);
  display:grid;
  place-items:center;
  padding:18px;
}
.inst-detail .logo-lg{
  width:100%;
  height:100%;
  object-fit:fill;
}
.inst-detail-title{
  margin:0;
  font-size:28px;
  line-height:1.3;
  color:#edf4ff;
}
.inst-detail-en{
  margin:8px 0 0;
  color:#aac0e6;
  font-size:13px;
  font-family:var(--hub-mono);
  letter-spacing:.04em;
}
.inst-detail-slogan-zh{
  margin:12px 0 0;
  color:#f2f7ff;
  font-weight:700;
}
.inst-detail-slogan-en{
  margin:5px 0 0;
  color:#b9cce8;
}
.inst-detail-intro{
  margin:14px auto 0;
  color:#b7c9e5;
  line-height:1.75;
  max-width:620px;
}
.inst-world-block{
  margin:14px auto 0;
  max-width:620px;
  text-align:left;
  border:1px solid rgba(109,155,233,.26);
  border-radius:14px;
  background:rgba(16,25,44,.58);
  padding:12px 14px 10px;
}
.inst-world-title{
  margin:0 0 8px;
  font-size:12px;
  font-family:var(--hub-mono);
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#cfe0ff;
}
.inst-world-list{
  margin:0;
  padding-left:18px;
  color:#bfd2ef;
  font-size:13px;
  line-height:1.68;
}
.tag-row{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:12px;
  justify-content:center;
}
.tag{
  font-size:11px;
  color:#deebff;
  border:1px solid rgba(116,161,236,.35);
  border-radius:999px;
  padding:3px 8px;
  background:rgba(22,35,62,.78);
  font-family:var(--hub-mono);
  letter-spacing:.02em;
}
.inst-detail .btn-row{
  justify-content:center;
  margin-top:16px;
}

.role-grid{
  margin-top:16px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.role-card{
  border:1px solid var(--hub-border-soft);
  border-radius:var(--hub-radius);
  background:var(--hub-grad-base);
  padding:18px 16px;
  cursor:pointer;
  transition:.14s ease;
}
.role-card:hover{
  transform:translateY(-1px);
  border-color:rgb(var(--hub-primary-rgb) / .58);
  box-shadow:0 0 0 1px rgb(var(--hub-primary-rgb) / .28), var(--hub-shadow-soft);
}
.role-card.active{
  border-color:var(--hub-primary-2);
  box-shadow:0 0 0 1px rgb(var(--hub-secondary-rgb) / .75),0 0 24px rgb(var(--hub-primary-rgb) / .26);
  background:var(--hub-grad-strong);
}
.role-card h3{
  margin:0 0 8px;
  font-size:20px;
  color:#f0f6ff;
}
.role-card ul{
  margin:0;
  padding-left:18px;
  color:#b2c2db;
  line-height:1.66;
  font-size:14px;
}
.role-intro{
  margin:12px 0 2px;
  max-width:760px;
  color:#bccce8;
  line-height:1.72;
  display:grid;
  gap:6px;
}
.role-intro p{
  margin:0;
}
.role-copy{
  display:grid;
  gap:6px;
  color:#bfd0eb;
  line-height:1.62;
  font-size:14px;
}
.role-copy p{
  margin:0;
}
.role-probe{
  color:#e7f1ff;
  font-weight:700;
}

.form-grid{
  margin-top:16px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px 14px;
}
.field{
  display:grid;
  gap:6px;
}
.field.full{grid-column:1 / -1}
.field label{
  font-size:12px;
  color:#a5b7d6;
  font-family:var(--hub-mono);
  letter-spacing:.04em;
  text-transform:uppercase;
}
.field-note{
  margin-top:2px;
  color:#9fb4d7;
  font-size:12px;
  line-height:1.45;
}
.field input,
.field select,
.field textarea{
  border:1px solid var(--hub-border-soft);
  border-radius:10px;
  background:var(--hub-input-bg);
  color:#e6eefc;
  padding:10px 11px;
  font-size:14px;
  font-family:var(--hub-sans);
  outline:none;
}
.field select option,
.theme-select option{
  color:#1a2230;
  background:#f2f5fb;
}
.field select optgroup,
.theme-select optgroup{
  color:#1a2230;
  background:#e8edf6;
  font-weight:700;
}
.field textarea{
  min-height:90px;
  resize:vertical;
  line-height:1.6;
}
.field input:focus,
.field select:focus,
.field textarea:focus{
  border-color:rgb(var(--hub-primary-rgb) / .8);
  box-shadow:0 0 0 3px rgb(var(--hub-primary-rgb) / .22);
}

.avatar-drop{
  border:1px dashed var(--hub-border);
  border-radius:12px;
  background:var(--hub-surface-2);
  min-height:220px;
  display:grid;
  place-items:center;
  text-align:center;
  color:#b3c4df;
  cursor:pointer;
  overflow:hidden;
  position:relative;
  padding:12px;
}
.avatar-drop.drag{
  border-color:rgb(var(--hub-primary-rgb) / .75);
  background:rgb(var(--hub-primary-rgb) / .2);
}
.avatar-preview{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:10px;
  display:block;
}
.avatar-drop .hint{
  font-size:13px;
  line-height:1.65;
}
body.avatar-crop-open{
  overflow:hidden;
}
.avatar-crop-modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(4,8,16,.72);
  backdrop-filter:blur(6px);
  z-index:220;
}
.avatar-crop-modal.open{
  display:flex;
}
.avatar-crop-panel{
  width:min(560px,96vw);
  border:1px solid var(--hub-border);
  border-radius:18px;
  background:var(--hub-grad-strong);
  box-shadow:var(--hub-shadow);
  padding:14px;
  display:grid;
  gap:10px;
}
.avatar-crop-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.avatar-crop-head h3{
  margin:0;
  font:700 16px/1.2 var(--hub-sans);
  color:#e9f1ff;
}
.avatar-crop-close{
  appearance:none;
  border:1px solid var(--hub-border-soft);
  border-radius:999px;
  background:rgb(var(--hub-primary-rgb) / .2);
  color:#dce8ff;
  padding:6px 11px;
  font:600 12px/1 var(--hub-sans);
  cursor:pointer;
}
.avatar-crop-stage{
  border:1px solid var(--hub-border-soft);
  border-radius:14px;
  background:#0f1318;
  padding:10px;
  display:grid;
  place-items:center;
}
.avatar-crop-stage canvas{
  width:min(420px,86vw);
  height:auto;
  border-radius:10px;
  cursor:grab;
  touch-action:none;
}
.avatar-crop-stage canvas.dragging{
  cursor:grabbing;
}
.avatar-crop-meta{
  font:12px/1.5 var(--hub-sans);
  color:#b7c9e7;
}
.avatar-crop-controls{
  display:grid;
  gap:6px;
}
.avatar-crop-controls label{
  font:600 12px/1 var(--hub-mono);
  color:#a9bddf;
  letter-spacing:.04em;
}
.avatar-crop-controls input[type="range"]{
  width:100%;
}
.avatar-crop-actions{
  justify-content:flex-end;
  margin-top:0;
}

.ai-layout{
  margin-top:14px;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:14px;
  align-items:start;
  position:relative;
  height:clamp(560px,calc(100vh - 220px),900px);
  min-height:560px;
  --drawer-w:min(460px,42vw);
  --drawer-tab-w:32px;
}
.chat-card,
.field-card{
  border:1px solid var(--hub-border);
  border-radius:var(--hub-radius);
  background:var(--hub-grad-base);
  box-shadow:var(--hub-shadow-soft);
  min-height:640px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  backdrop-filter:blur(8px) saturate(120%);
}
.chat-card{
  min-height:0;
  height:100%;
  margin-right:var(--drawer-tab-w);
  transition:margin-right .24s ease;
  position:relative;
}
.ai-layout.drawer-open .chat-card{
  margin-right:var(--drawer-w);
}
.field-drawer{
  position:absolute;
  top:0;
  right:0;
  height:100%;
  width:var(--drawer-tab-w);
  z-index:5;
  overflow:hidden;
  transition:width .24s ease;
  will-change:width;
}
.field-drawer.is-open{
  width:var(--drawer-w);
}
.field-drawer .field-card{
  height:100%;
  min-height:0;
  width:calc(var(--drawer-w) - var(--drawer-tab-w));
  max-width:calc(var(--drawer-w) - var(--drawer-tab-w));
  margin-left:var(--drawer-tab-w);
  border:1px solid rgb(var(--hub-primary-rgb) / .46);
  border-radius:16px 0 0 16px;
  background:
    linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .34),var(--hub-panel-gray-2) 28%,var(--hub-panel-gray-3)),
    linear-gradient(120deg,rgb(var(--hub-secondary-rgb) / .13),transparent 48%);
  backdrop-filter:blur(16px) saturate(145%);
  opacity:0;
  transform:translateX(10px);
  pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
}
.field-drawer.is-open .field-card{
  opacity:1;
  transform:translateX(0);
  pointer-events:auto;
  box-shadow:0 0 0 1px rgb(var(--hub-primary-rgb) / .26),0 24px 42px rgba(0,0,0,.44);
}
.field-drawer-tab{
  appearance:none;
  position:absolute;
  left:0;
  top:50%;
  height:auto;
  transform:translateY(-50%);
  z-index:2;
  border:1px solid rgb(var(--hub-primary-rgb) / .46);
  border-right:1px solid rgb(var(--hub-primary-rgb) / .46);
  border-radius:10px 0 0 10px;
  padding:10px 4px;
  min-height:108px;
  width:var(--drawer-tab-w);
  background:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .34),var(--hub-panel-gray-2) 52%,var(--hub-panel-gray-3));
  color:#e4eeff;
  font:700 12px/1.05 var(--hub-mono);
  letter-spacing:.06em;
  display:flex;
  align-items:center;
  justify-content:center;
  writing-mode:vertical-rl;
  text-orientation:mixed;
  cursor:pointer;
  pointer-events:auto;
  box-shadow:0 0 0 1px rgb(var(--hub-primary-rgb) / .2),0 10px 20px rgb(var(--hub-primary-rgb) / .2);
}
.field-drawer-tab:hover{
  border-color:rgb(var(--hub-primary-rgb) / .72);
  box-shadow:0 0 0 1px rgb(var(--hub-primary-rgb) / .3),0 12px 24px rgb(var(--hub-primary-rgb) / .3);
}
.panel-head{
  border-bottom:1px solid var(--hub-border-soft);
  padding:12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  background:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .22),var(--hub-panel-gray-2));
}
.panel-title{
  margin:0;
  font-size:14px;
  letter-spacing:.06em;
  text-transform:uppercase;
  font-family:var(--hub-mono);
  color:#c2d3f3;
}
.ai-mode-copy{
  max-width:920px;
  color:#b7c9e8;
}
.chat-stream{
  flex:1 1 auto;
  min-height:0;
  padding:14px;
  overflow:auto;
  background:
    linear-gradient(rgb(var(--hub-primary-rgb) / .12) 1px,transparent 1px),
    linear-gradient(90deg,rgb(var(--hub-primary-rgb) / .12) 1px,transparent 1px),
    linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .2),var(--hub-panel-gray-3));
  background-size:26px 26px,26px 26px,auto;
}
.bubble{
  max-width:88%;
  border:1px solid var(--hub-border-soft);
  border-radius:14px;
  padding:10px 11px;
  margin-bottom:10px;
  font-size:14px;
  line-height:1.65;
  white-space:pre-wrap;
  word-break:break-word;
}
.bubble.ai{
  background:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .36),var(--hub-panel-gray-2) 52%,var(--hub-panel-gray-3));
  color:#dce9ff;
  margin-right:auto;
}
.bubble.user{
  background:linear-gradient(96deg,var(--hub-primary),var(--hub-primary-2));
  color:#051024;
  margin-left:auto;
  border-color:transparent;
  font-weight:600;
}
.bubble.pending{
  position:relative;
  overflow:hidden;
  background:
    linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .36),var(--hub-panel-gray-2) 52%,var(--hub-panel-gray-3)),
    linear-gradient(120deg,rgb(var(--hub-secondary-rgb) / .14),transparent 52%);
  border-color:rgb(var(--hub-primary-rgb) / .5);
  box-shadow:0 0 0 1px rgb(var(--hub-primary-rgb) / .2),0 12px 26px rgb(var(--hub-primary-rgb) / .2);
}
.bubble.pending::after{
  content:"";
  position:absolute;
  top:0;
  left:-16%;
  width:44%;
  height:100%;
  background:linear-gradient(115deg,transparent 0%,rgb(var(--hub-secondary-rgb) / .36) 48%,transparent 100%);
  filter:blur(1px);
  animation:hubPendingSweep 1.8s ease-in-out infinite;
  pointer-events:none;
}
.pending-line{
  display:flex;
  align-items:center;
  gap:8px;
  font-family:var(--hub-mono);
  font-size:12px;
  letter-spacing:.05em;
  color:#d6e7ff;
}
.pending-line span:last-child{
  animation:hubPendingText 1.5s ease-in-out infinite;
}
.pending-spinner{
  width:16px;
  height:16px;
  border-radius:50%;
  border:2px solid rgb(var(--hub-primary-rgb) / .28);
  border-top-color:var(--hub-primary-2);
  border-right-color:rgb(var(--hub-secondary-rgb) / .72);
  box-shadow:0 0 0 1px rgb(var(--hub-primary-rgb) / .26),0 0 14px rgb(var(--hub-secondary-rgb) / .26);
  animation:hubSpin .85s linear infinite;
}
.pending-bar{
  margin-top:8px;
  height:8px;
  border-radius:999px;
  overflow:hidden;
  border:1px solid rgb(var(--hub-primary-rgb) / .32);
  background:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .2),var(--hub-panel-gray-2));
}
.pending-bar > i{
  display:block;
  height:100%;
  width:36%;
  background:linear-gradient(90deg,var(--hub-primary),var(--hub-primary-2));
  filter:drop-shadow(0 0 8px rgb(var(--hub-secondary-rgb) / .4));
  animation:hubPendingBar 1.2s ease-in-out infinite;
}
.chat-reminder{
  margin:4px 0 10px;
  border:1px solid rgb(var(--hub-primary-rgb) / .34);
  border-radius:12px;
  background:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .16),var(--hub-panel-gray-2));
  padding:10px 11px;
}
.chat-reminder-title{
  font:700 12px/1 var(--hub-mono);
  letter-spacing:.06em;
  color:#d9e8ff;
  margin-bottom:6px;
}
.chat-reminder-body{
  font-size:13px;
  line-height:1.55;
  color:#bdd0ed;
}
.chat-input{
  border-top:1px solid var(--hub-border-soft);
  padding:10px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  background:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .18),var(--hub-panel-gray-2));
}
.chat-input textarea{
  border:1px solid var(--hub-border-soft);
  border-radius:10px;
  min-height:72px;
  max-height:180px;
  resize:vertical;
  padding:10px;
  font:14px/1.6 var(--hub-sans);
  outline:none;
  background:var(--hub-input-bg);
  color:#e8efff;
}
.chat-input textarea:focus{
  border-color:rgb(var(--hub-primary-rgb) / .8);
  box-shadow:0 0 0 3px rgb(var(--hub-primary-rgb) / .22);
}

.field-body{
  padding:12px;
  overflow:auto;
  flex:1;
}
.progress-box{
  border:1px solid var(--hub-border-soft);
  border-radius:10px;
  background:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .2),var(--hub-panel-gray-2));
  padding:10px;
  margin-bottom:10px;
}
.progress-box .meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:12px;
  font-family:var(--hub-mono);
  color:#b2c3df;
  margin-bottom:8px;
}
.progress-box .bar{
  height:8px;
  border-radius:999px;
  overflow:hidden;
  border:1px solid var(--hub-border-soft);
  background:#0f1318;
}
.progress-box .bar > i{
  display:block;
  width:0;
  height:100%;
  background:linear-gradient(90deg,var(--hub-primary),var(--hub-primary-2));
  transition:width .16s ease;
}
.field-group{
  border:1px solid var(--hub-border-soft);
  border-radius:10px;
  margin-bottom:10px;
  overflow:hidden;
  background:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .16),var(--hub-panel-gray-2));
}
.field-group > summary{
  cursor:pointer;
  list-style:none;
  padding:9px 10px;
  border-bottom:1px solid var(--hub-border-soft);
  font-size:12px;
  font-family:var(--hub-mono);
  letter-spacing:.05em;
  text-transform:uppercase;
  color:#bdd0f0;
  background:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .22),var(--hub-panel-gray-2));
}
.field-group[open] > summary{background:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .3),var(--hub-panel-gray-2))}
.field-group > summary::-webkit-details-marker{display:none}
.field-group .group-inner{
  padding:9px;
  display:grid;
  gap:8px;
}
.mini{
  display:grid;
  gap:4px;
}
.mini label{
  font-size:11px;
  color:#9eb1d2;
  font-family:var(--hub-mono);
  letter-spacing:.04em;
  text-transform:uppercase;
}
.mini input,
.mini textarea{
  border:1px solid var(--hub-border-soft);
  border-radius:8px;
  background:rgba(9,14,26,.92);
  color:#e4edff;
  padding:8px 9px;
  font:13px/1.5 var(--hub-sans);
  outline:none;
}
.mini textarea{
  min-height:78px;
  resize:vertical;
}
.mini input:focus,
.mini textarea:focus{
  border-color:rgb(var(--hub-primary-rgb) / .8);
  box-shadow:0 0 0 3px rgb(var(--hub-primary-rgb) / .22);
}

.preview-toolbar{
  border:1px solid var(--hub-border);
  border-radius:var(--hub-radius);
  background:var(--hub-grad-base);
  box-shadow:var(--hub-shadow-soft);
  padding:12px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
}
.toolbar-left{
  display:grid;
  gap:8px;
}
.toolbar-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  font-size:12px;
  color:#aec1e0;
  font-family:var(--hub-mono);
  letter-spacing:.04em;
}
.toolbar-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}
.theme-select{
  border:1px solid var(--hub-border-soft);
  border-radius:999px;
  padding:9px 12px;
  font:600 12px/1 var(--hub-mono);
  color:#d8e6ff;
  background:#101419;
}
.preview-mobile-toggle{
  border-color:rgb(var(--hub-primary-rgb) / .36);
}
.preview-mobile-toggle:hover{
  border-color:rgb(var(--hub-primary-rgb) / .62);
  box-shadow:0 0 0 1px rgb(var(--hub-primary-rgb) / .28),0 10px 22px rgb(var(--hub-primary-rgb) / .22);
}
.preview-mobile-toggle.is-active{
  border-color:rgb(var(--hub-primary-rgb) / .78);
  background:linear-gradient(94deg,rgb(var(--hub-primary-rgb) / .3),rgb(var(--hub-secondary-rgb) / .24));
  box-shadow:0 0 0 1px rgb(var(--hub-primary-rgb) / .34),0 12px 26px rgb(var(--hub-primary-rgb) / .28);
}

.book-wrap{
  margin-top:14px;
  border:1px solid var(--hub-border);
  border-radius:22px;
  padding:14px;
  background:var(--hub-grad-base);
  box-shadow:var(--hub-shadow);
}
.book-stage{
  min-height:0;
  display:block;
  overflow:auto;
  padding:8px 6px;
}
.book-page{
  display:none;
  width:100%;
}
.book-page.is-active{display:block}
.book-nav{
  margin-top:10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
}
.page-indicator{
  font-family:var(--hub-mono);
  font-size:12px;
  color:#b0c3e5;
  letter-spacing:.06em;
}
.export-note{
  margin-top:8px;
  font-size:12px;
  color:#9db2d8;
  font-family:var(--hub-mono);
}

.book-wrap .page{
  margin:0;
  box-shadow:0 18px 40px rgba(0,0,0,.45);
}
#screen-preview.preview-mobile-mode .book-stage{
  overflow-x:hidden;
  overflow-y:auto;
  padding:8px 0;
}
#screen-preview.preview-mobile-mode .book-page{
  width:100%;
}
#screen-preview.preview-mobile-mode .book-wrap .page{
  width:var(--page-w) !important;
  max-width:none !important;
}
.book-wrap .watermark .wm-text{
  font-size:clamp(58px,8vw,84px);
  white-space:normal;
  text-align:center;
  line-height:1.06;
}
.book-wrap .avatar-img{overflow:hidden}
.book-wrap .avatar-img img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.book-wrap .cover-avatar .avatar-img{
  width:88px;
  height:88px;
  border-radius:50%;
  border:2px dashed var(--thin);
  margin:0 auto;
  background:rgba(0,0,0,.03);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
}

@media (max-width:1120px){
  .inst-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:980px){
  :root{--inst-logo-size:136px}
  .inst-layout{justify-content:center}
  .inst-grid-shell{width:min(860px,100%)}
  .inst-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .inst-detail-panel{width:min(680px,94vw)}
  .role-grid{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr}
  .ai-layout{
    grid-template-columns:1fr;
    height:clamp(520px,calc(100vh - 220px),860px);
    min-height:520px;
    --drawer-w:min(420px,calc(100vw - 88px));
    --drawer-tab-w:30px;
  }
  .chat-card,.field-card{min-height:0}
  .book-stage{min-height:0}
}
@media (max-width:680px){
  :root{--inst-logo-size:122px}
  .app-shell{padding:14px 12px 28px}
  .flow-header{
    top:8px;
    padding:8px 10px;
    border-radius:12px;
  }
  .flow-header-logo-wrap{
    width:46px;
    height:46px;
    border-radius:10px;
    padding:5px;
  }
  .flow-header-title{
    font-size:13px;
  }
  .flow-header-sub{
    font-size:11px;
    white-space:normal;
    max-height:2.7em;
  }
  .app-shell.has-flow-header .screen{
    min-height:calc(100vh - 122px);
  }
  .ai-layout{
    height:calc(100vh - 210px);
    min-height:480px;
    --drawer-tab-w:28px;
    --drawer-w:min(94vw,420px);
  }
  .ai-layout.drawer-open .chat-card{
    margin-right:var(--drawer-tab-w);
  }
  .chat-card{
    background:var(--hub-grad-strong);
  }
  .chat-stream{
    background:
      linear-gradient(rgb(var(--hub-primary-rgb) / .1) 1px,transparent 1px),
      linear-gradient(90deg,rgb(var(--hub-primary-rgb) / .1) 1px,transparent 1px),
      linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .26),var(--hub-panel-gray-3));
  }
  .bubble.ai{
    background:linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .42),var(--hub-panel-gray-2) 52%,var(--hub-panel-gray-3));
  }
  .field-drawer .field-card{
    border-radius:14px 0 0 14px;
    background:
      linear-gradient(180deg,rgb(var(--hub-primary-rgb) / .4),var(--hub-panel-gray-2) 24%,var(--hub-panel-gray-3)),
      linear-gradient(120deg,rgb(var(--hub-secondary-rgb) / .18),transparent 52%);
    backdrop-filter:blur(16px) saturate(145%);
  }
  .inst-grid{grid-template-columns:1fr}
  .inst-card{
    max-width:360px;
    min-height:208px;
  }
  .inst-detail{
    padding:14px;
  }
  .inst-detail-panel{
    width:100%;
    border-radius:18px;
    padding:20px 16px 16px;
  }
  .logo-lg-wrap{border-radius:20px}
  .inst-detail-title{font-size:24px}
  .hero{
    border-radius:18px;
    min-height:72vh;
    padding:28px 18px 22px;
    gap:10px;
  }
  .hero .hero-main-title{max-width:100%}
  .hero .hero-line-welcome{font-size:clamp(28px,8.2vw,42px)}
  .hero .hero-line-cn{font-size:clamp(38px,11vw,56px)}
  .hero .hero-line-cn .hero-cn-main,
  .hero .hero-line-cn .hero-cn-sub{display:block}
  .hero .hero-line-cn .hero-cn-sub{
    margin-left:0;
    margin-top:.12em;
  }
  .hero .hero-sub-en,
  .hero .hero-status,
  .hero .tip,
  .hero .hero-brief-cta,
  .hero .hero-brief,
  .hero .disclaimer.weak{max-width:100%;width:100%}
  .toolbar-actions{justify-content:flex-start}
  .preview-toolbar{grid-template-columns:1fr}
  .book-wrap{padding:10px;border-radius:16px}
}
