/* =========================================================
   styles-hall.css —— 虚拟展厅新增视觉层
   阶段一：学院选择厅（portal）
   阶段二：球面主题厅（sphere，用户位于球心）
   转场：时光穿梭（warp）
   另含登录弹窗与控制台
   ========================================================= */

/* ---------- 阶段显隐 ---------- */
body[data-stage="portal"] .stage-sphere,
body[data-stage="portal"] .viewport,
body[data-stage="portal"] .progress,
body[data-stage="sphere"] .portal,
body[data-stage="sphere"] .viewport,
body[data-stage="sphere"] .progress,
body[data-stage="wall"] .portal,
body[data-stage="wall"] .stage-sphere { display: none !important; }

body[data-stage="portal"] .wall-only,
body[data-stage="sphere"] .wall-only { display: none !important; }
body[data-stage="boot"] .portal,
body[data-stage="boot"] .stage-sphere,
body[data-stage="boot"] .viewport,
body[data-stage="boot"] .progress { display: none !important; }

/* ---------- 顶栏补充 ---------- */
.topbar { z-index: 60; }

/* ---------- 上传的学院 LOGO：高度固定，宽度按原始比例，绝不裁剪 ---------- */
/* .brand-mark 默认是 44×44 的方形首字母徽标；有 LOGO 时改为「高度 44px、宽度自适应」，
   不再强制塞进正方形（原先 width:100% + object-fit:cover 会把宽幅 LOGO 裁成中间一条）。 */
.brand-mark.logo {
  width: auto;                     /* 覆盖 .brand-mark 的 44px 方框 */
  height: 44px;                    /* 高度 = 原徽标高度 */
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
  flex: 0 0 auto;                  /* 窄屏下也不被压缩，避免与标题重叠 */
}
.brand-mark.logo img {
  display: block;
  height: 44px;                    /* 高度不变，宽度按原始比例推导 */
  width: auto;
  max-width: min(240px, 36vw);     /* 超宽 LOGO 的上限；触顶时整体等比缩小，仍不裁剪 */
  object-fit: contain;
  border-radius: 0;
}

.who {
  font-size: 12.5px;
  color: var(--ink-dim);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}
.who b { color: var(--ink); font-weight: 600; }
.who .role-badge { margin-left: 6px; }

.role-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.role-badge.super { color: #ffd79a; background: rgba(255, 184, 107, 0.14); border-color: rgba(255, 184, 107, 0.35); }
.role-badge.college { color: #a9c8ff; background: rgba(110, 168, 255, 0.13); border-color: rgba(110, 168, 255, 0.32); }
.role-badge.suspended { color: #ff9d9d; background: rgba(255, 120, 120, 0.13); border-color: rgba(255, 120, 120, 0.32); }

/* =========================================================
   阶段一：学院选择厅
   ========================================================= */
.portal {
  position: fixed;
  inset: var(--topbar-h, 76px) 0 0 0;
  overflow: auto;
  background:
    radial-gradient(1100px 700px at 18% -10%, rgba(110, 168, 255, 0.16), transparent 62%),
    radial-gradient(900px 620px at 88% 8%, rgba(192, 139, 255, 0.14), transparent 60%),
    radial-gradient(800px 800px at 50% 120%, rgba(255, 184, 107, 0.08), transparent 65%),
    var(--bg-0);
}

.portal-aura {
  position: fixed;
  inset: var(--topbar-h, 76px) 0 0 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 20% 30%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.4px 1.4px at 68% 18%, rgba(255, 255, 255, 0.36), transparent),
    radial-gradient(1.6px 1.6px at 82% 62%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.2px 1.2px at 34% 74%, rgba(255, 255, 255, 0.32), transparent),
    radial-gradient(1.5px 1.5px at 8% 58%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1.3px 1.3px at 52% 88%, rgba(255, 255, 255, 0.28), transparent);
  opacity: 0.7;
  animation: auraDrift 26s ease-in-out infinite alternate;
}
@keyframes auraDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-14px, 10px, 0) scale(1.04); }
}

.portal-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 32px 72px;
}

.portal-head { text-align: center; margin-bottom: 44px; }
.portal-kicker {
  margin: 0 0 12px;
  font-size: 11.5px;
  letter-spacing: 5px;
  color: var(--accent);
  opacity: 0.85;
}
.portal-head h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(120deg, #eef2ff 10%, #9dc0ff 55%, #d5aaff 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.portal-desc {
  margin: 0 auto;
  max-width: 620px;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.75;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.college-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 24px 22px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018) 46%, rgba(255, 255, 255, 0.006)),
    rgba(13, 16, 26, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s, box-shadow 0.35s;
}
.college-card::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 60%;
  background: radial-gradient(closest-side, rgba(110, 168, 255, 0.22), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.college-card:hover,
.college-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(110, 168, 255, 0.42);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(110, 168, 255, 0.18), 0 0 46px rgba(110, 168, 255, 0.16);
  outline: none;
}
.college-card:hover::before { opacity: 1; }

.college-logo {
  height: 62px;                    /* 高度固定 */
  width: auto;                     /* 有 LOGO 时宽度按比例；无 LOGO 时由 min-width 保证正方形 */
  min-width: 62px;
  max-width: 190px;                /* 超宽 LOGO 的上限；触顶时整体等比缩小 */
  align-self: flex-start;          /* 卡片是列向 flex，避免被拉伸到整行宽 */
  border-radius: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  font-size: 26px;
  font-weight: 700;
  color: #eaf1ff;
  background: linear-gradient(140deg, rgba(110, 168, 255, 0.42), rgba(192, 139, 255, 0.34));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.college-logo img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; }
/* 已上传 LOGO：撤掉渐变底与边框，让 LOGO 自己按原始比例呈现。
   注意 img 必须用**显式高度**：容器是 grid + place-items:center 时，网格项不会被拉伸，
   `height:100%` 的百分比参照高度是 indefinite，会被当作 auto —— 于是高度反由宽度推出，
   比容器还高、被 overflow 上下各切掉一截。 */
.college-logo.has-logo {
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
.college-logo.has-logo img { height: 62px; width: auto; max-width: 190px; }

.college-name {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: 0.3px;
  color: var(--ink);
}
.college-intro {
  margin: 6px 0 0;
  font-size: 12.8px;
  line-height: 1.6;
  color: var(--ink-faint);
  min-height: 1.6em;
}
.college-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.college-stat { font-size: 12.5px; color: var(--ink-dim); }
.college-stat b { color: #bcd4ff; font-weight: 650; font-size: 15px; margin-right: 3px; }
.college-go {
  font-size: 12.5px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.3s;
}
.college-card:hover .college-go { transform: translateX(4px); }

.portal-empty {
  text-align: center;
  color: var(--ink-faint);
  padding: 60px 0 20px;
  font-size: 14px;
}
.portal-foot {
  margin-top: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.portal-foot-tip { font-size: 12.5px; color: var(--ink-faint); }

/* =========================================================
   阶段二：球面主题厅
   ========================================================= */
.stage-sphere {
  position: fixed;
  inset: var(--topbar-h, 76px) 0 0 0;
  overflow: hidden;
  background:
    radial-gradient(900px 620px at 50% 46%, rgba(110, 168, 255, 0.12), transparent 65%),
    radial-gradient(1400px 900px at 50% 130%, rgba(60, 30, 110, 0.4), transparent 70%),
    var(--bg-0);
  touch-action: manipulation;
}

/* 球面外的「球壳」光晕，暗示用户位于球心 */
.stage-sphere::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 60%, rgba(6, 8, 14, 0.38) 88%, rgba(4, 5, 10, 0.78) 100%);
}

.sphere-wrap {
  position: absolute;
  inset: 0;
}

/* 标签列阵：**每列 3 个**（从上往下），放不下的另起一列，各列从左往右依次排开。
   `safe center` 保证内容溢出时仍能从开头滚到，不会被居中裁掉。 */
.sphere {
  position: absolute;
  inset: 0;
  display: grid;
  grid-auto-flow: column;                 /* 先填满一列，再往右开新列 */
  grid-template-rows: repeat(3, auto);    /* 与 views/sphere.js 的 ROWS = 3 对应 */
  align-items: stretch;
  align-content: safe center;
  justify-content: safe center;
  column-gap: var(--orb-gap-x, 22px);
  row-gap: var(--orb-gap-y, 18px);
  padding: var(--orb-pad-y, 24px) var(--orb-pad-x, 28px);
  overflow: auto;
  scrollbar-width: none;
}
.sphere::-webkit-scrollbar { width: 0; height: 0; display: none; }

.orb {
  position: relative;
  flex: 0 0 auto;
  width: var(--orb-w, 264px);
  /* min-height 而非固定高度：窄屏上标签变窄、标题换行更多时会自动长高，不会被裁 */
  min-height: var(--orb-h, 158px);
  outline: none;
  /* --near: 0（在背面）~ 1（正前方）；现在是一排标签，一律全亮 */
  --near: 1;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.orb:hover, .orb:focus-visible { transform: translateY(-8px); }
.orb:focus-visible .orb-inner {
  box-shadow: 0 0 0 2px rgba(140, 185, 255, 0.7), 0 20px 46px rgba(0, 0, 0, 0.55);
}

/* 晃动层：幅度(--sw-x / --sw-y / --sw-r)与周期(--sway-dur)由 JS 逐张随机写入，
   起始相位用负延迟错开 —— 所以整排各晃各的，不会同步摆动 */
.orb-float {
  width: 100%;
  height: 100%;
  animation: orbSway var(--sway-dur, 12s) ease-in-out var(--sway-delay, 0s) infinite;
  will-change: transform;
}
@keyframes orbSway {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
  22%  { transform: translate3d(var(--sw-x, 8px), calc(var(--sw-y, 8px) * -0.7), 0) rotate(var(--sw-r, 1deg)); }
  47%  { transform: translate3d(calc(var(--sw-x, 8px) * -0.55), calc(var(--sw-y, 8px) * -1), 0) rotate(calc(var(--sw-r, 1deg) * -0.6)); }
  71%  { transform: translate3d(calc(var(--sw-x, 8px) * -1), calc(var(--sw-y, 8px) * 0.55), 0) rotate(calc(var(--sw-r, 1deg) * -1)); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) { .orb-float { animation: none; } }
.orb-inner {
  width: 100%;
  height: 100%;
  padding: clamp(10px, 1.1vw, 16px) clamp(12px, 1.4vw, 20px);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(3px, 0.5vw, 5px);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, calc(0.06 + 0.34 * var(--near)));
  background:
    linear-gradient(158deg, rgba(255, 255, 255, calc(0.03 + 0.09 * var(--near))), rgba(255, 255, 255, 0.012) 60%),
    rgba(12, 15, 25, calc(0.55 + 0.3 * var(--near)));
  box-shadow:
    0 0 calc(6px + 46px * var(--near)) rgba(110, 168, 255, calc(0.05 + 0.42 * var(--near))),
    0 0 calc(2px + 18px * var(--near)) rgba(192, 139, 255, calc(0.04 + 0.3 * var(--near))),
    0 18px 44px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  opacity: calc(0.32 + 0.68 * var(--near));
  filter: saturate(calc(0.6 + 0.5 * var(--near)));
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
  overflow: hidden;
}
.orb-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 90% at 50% -20%, rgba(160, 200, 255, calc(0.28 * var(--near))), transparent 70%);
  pointer-events: none;
}
.orb:hover .orb-inner, .orb:focus-visible .orb-inner {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow:
    0 0 60px rgba(120, 175, 255, 0.45),
    0 0 120px rgba(160, 120, 255, 0.24),
    0 22px 54px rgba(0, 0, 0, 0.55);
}
.orb-year {
  font-size: clamp(9.5px, 0.42vw + 6px, 12.5px);
  letter-spacing: clamp(1.6px, 0.2vw, 3px);
  color: color-mix(in srgb, #9dc0ff calc(35% + 65% * var(--near)), #6b7590);
  font-variant-numeric: tabular-nums;
}
.orb-name {
  font-size: clamp(12px, 0.75vw + 8px, 17.5px);
  font-weight: 650;
  line-height: 1.35;
  color: #eaf1ff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.orb-sub {
  font-size: clamp(10px, 0.4vw + 6.5px, 12px);
  color: var(--ink-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sphere-hud {
  position: absolute;
  left: 0; right: 0; top: 0;
  padding: 22px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 4;
  pointer-events: none;
}
.sphere-college {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: #dbe6ff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
}
.sphere-hint { font-size: 12.5px; color: var(--ink-faint); }
.sphere-hint kbd {
  display: inline-block;
  padding: 1px 6px;
  margin: 0 1px;
  font-size: 11px;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-dim);
}

.sphere-caption {
  position: absolute;
  left: 0; right: 0;
  bottom: 12%;
  text-align: center;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s, transform 0.4s;
}
.sphere-caption.show { opacity: 1; transform: none; }
.sphere-caption .cap-year {
  display: block;
  font-size: 12px;
  letter-spacing: 5px;
  color: var(--accent);
  margin-bottom: 8px;
}
.sphere-caption .cap-name {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: 1px;
  color: #f2f6ff;
  text-shadow: 0 0 34px rgba(110, 168, 255, 0.55), 0 4px 22px rgba(0, 0, 0, 0.8);
}
.sphere-caption .cap-sub { margin: 0; font-size: 13px; color: var(--ink-dim); }

.sphere-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: 14.5px;
  z-index: 4;
}

.sphere-back {
  position: absolute;
  left: 30px;
  bottom: 30px;
  z-index: 5;
}

/* =========================================================
   时光穿梭转场
   ========================================================= */
.warp-canvas {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}
.warp {
  position: fixed;
  inset: 0;
  z-index: 201;
  display: grid;
  place-items: center;
  pointer-events: none;
  text-align: center;
}
.warp-year {
  position: absolute;
  font-size: clamp(46px, 9vw, 110px);
  font-weight: 800;
  letter-spacing: 8px;
  color: rgba(220, 234, 255, 0.9);
  text-shadow: 0 0 60px rgba(110, 168, 255, 0.75);
  opacity: 0;
  transform: scale(0.6);
}
.warp-name {
  position: relative;
  font-size: clamp(26px, 4.4vw, 52px);
  font-weight: 750;
  letter-spacing: 3px;
  color: #ffffff;
  text-shadow: 0 0 40px rgba(120, 175, 255, 0.9), 0 0 90px rgba(180, 120, 255, 0.5);
  opacity: 0;
  transform: scale(0.72);
}
.warp.play .warp-year { animation: warpYear 1.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
.warp.play .warp-name { animation: warpName 1.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes warpYear {
  0%   { opacity: 0; transform: scale(0.5) translateY(10px); filter: blur(6px); }
  28%  { opacity: 0.85; transform: scale(1); filter: blur(0); }
  72%  { opacity: 0.7; transform: scale(1.5); }
  100% { opacity: 0; transform: scale(3.4); filter: blur(12px); }
}
@keyframes warpName {
  0%   { opacity: 0; transform: scale(0.7); filter: blur(10px); }
  30%  { opacity: 1; transform: scale(1.06); filter: blur(0); }
  55%  { opacity: 1; transform: scale(1.14); }
  100% { opacity: 0; transform: scale(2.6); filter: blur(14px); }
}

/* 作品墙入场：由转场接管 */
.viewport { transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
body.wall-enter .viewport { opacity: 0; transform: scale(1.06); }
body.wall-enter .topbar { opacity: 0; }

/* =========================================================
   登录 / 注册弹窗
   ========================================================= */
.modal-x {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-dim);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.modal-x:hover { background: rgba(255, 255, 255, 0.1); color: var(--ink); }

.auth-card { width: min(430px, 92vw); position: relative; text-align: left; }
.auth-card h3 { margin: 0 0 6px; font-size: 20px; }
.auth-card .modal-sub { margin-top: 0; }

.auth-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.auth-tab {
  flex: 1;
  padding: 9px 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-dim);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.22s, color 0.22s;
}
.auth-tab.active { background: linear-gradient(135deg, rgba(110, 168, 255, 0.9), rgba(160, 120, 255, 0.85)); color: #07080d; font-weight: 650; }

.auth-fields { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; font-size: 12.5px; color: var(--ink-dim); }
.field input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus {
  outline: none;
  border-color: rgba(110, 168, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(110, 168, 255, 0.14);
}
.field-tip { font-size: 11.5px; color: var(--ink-faint); font-style: normal; }

/* =========================================================
   管理控制台
   ========================================================= */
.console { position: fixed; inset: 0; z-index: 150; }
.console-mask {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 12, 0.55);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.25s ease both;
}
@keyframes fadeIn { from { opacity: 0; } }

.console-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(560px, 94vw);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #10141f, #0a0d15);
  border-left: 1px solid var(--line-strong);
  box-shadow: -30px 0 70px rgba(0, 0, 0, 0.6);
  animation: slideIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes slideIn { from { transform: translateX(30px); opacity: 0.4; } }

.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}
.console-head .modal-x { position: static; }
.console-id { display: flex; align-items: center; gap: 10px; }
.console-id strong { font-size: 16px; }

.console-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 18px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.c-tab {
  padding: 9px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-dim);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.c-tab.active { color: var(--ink); border-bottom-color: var(--accent); }

.console-body { flex: 1; overflow: auto; padding: 18px 22px 30px; }
.console-msg {
  margin: 0 22px 18px;
  padding: 10px 14px;
  border-radius: 11px;
  font-size: 13px;
  background: rgba(110, 168, 255, 0.12);
  border: 1px solid rgba(110, 168, 255, 0.3);
  color: #bcd4ff;
}
.console-msg.err { background: rgba(255, 110, 110, 0.12); border-color: rgba(255, 110, 110, 0.34); color: #ffb3b3; }

.c-section { margin-bottom: 26px; }
.c-section > h4 {
  margin: 0 0 12px;
  font-size: 12.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}

.c-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.026);
  margin-bottom: 9px;
}
.c-row.dim { opacity: 0.55; }
.c-row-main { flex: 1; min-width: 0; }
.c-row-title { font-size: 14px; color: var(--ink); font-weight: 550; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.c-row-sub { font-size: 11.8px; color: var(--ink-faint); margin-top: 3px; }
.c-row-actions { display: flex; gap: 6px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }

.mini {
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-dim);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.mini:hover { background: rgba(255, 255, 255, 0.12); color: var(--ink); }
.mini.danger { color: #ffb3b3; border-color: rgba(255, 120, 120, 0.32); }
.mini.danger:hover { background: rgba(255, 110, 110, 0.16); }
.mini.on { color: #a9c8ff; border-color: rgba(110, 168, 255, 0.42); background: rgba(110, 168, 255, 0.14); }
.mini:disabled { opacity: 0.4; cursor: not-allowed; }

.c-logo-preview {
  height: 54px;                    /* 高度固定，宽度按 LOGO 原始比例 */
  width: auto;
  min-width: 54px;
  max-width: 180px;                /* 超宽 LOGO 的上限；触顶时整体等比缩小 */
  border-radius: 15px;
  object-fit: contain;             /* 不裁剪 */
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}
.c-field { display: grid; gap: 7px; margin-bottom: 14px; }
.c-field span { font-size: 12.4px; color: var(--ink-dim); }
.c-field input {
  padding: 10px 13px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.c-field input:focus { outline: none; border-color: rgba(110, 168, 255, 0.6); box-shadow: 0 0 0 3px rgba(110, 168, 255, 0.13); }
.c-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.c-empty { color: var(--ink-faint); font-size: 13px; padding: 10px 0 4px; }

.tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-faint);
}
.tag.hidden-tag { color: #ffb3b3; border-color: rgba(255, 120, 120, 0.34); }
.tag.self-tag { color: #ffd79a; border-color: rgba(255, 184, 107, 0.34); }

/* 小屏收敛 */
@media (max-width: 760px) {
  .topbar { height: auto; min-height: 68px; flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  /* 用实测高度而非写死的 68px（顶部栏会折行，写死会把页面顶到屏幕外） */
  .portal, .stage-sphere { inset: auto 0 0 0; top: var(--topbar-h, 68px); }
  .portal-inner { padding: 32px 18px 60px; }
  .sphere-back { left: 16px; bottom: 18px; }
  /* 只有按钮组允许折行；主题条必须保持单行横向滚动。
     若给 .wall-only 整体 flex-wrap:wrap，主题条会折成很矮的窄块，
     顶部栏高度会从 ~118px 膨胀到 260px+，把作品墙挤到屏幕外。 */
  .controls.wall-only { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .controls.wall-only::-webkit-scrollbar { height: 0; display: none; }
  .topic-bar.wall-only { flex-wrap: nowrap; }
}
