/* ============================================
   全局变量与基础重置
   ============================================ */
:root {
  --primary: #286ef1;
  --primary-gradient: linear-gradient(90deg, #3566ff, #00abfb);
  --dark-bg: #282e3c;
  --light-bg: #f8f8f9;
  --white: #ffffff;
  --text-main: #282e3c;
  --text-muted: #969db3;
  --border-color: #e8e8e8;
  --success: #26c267;
  --danger: #d0021b;
  --radius: 4px;
  --card-radius: 8px;
  --font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  /* 眼睛跟随效果专用变量 */
  --pupil-outer: 60px;
  --pupil-border: 15px;
  --black-ring-diameter: 110px;
  --big-ring-diameter: 300px;
  --big-ring-border: 20px;
  --arc-offset: 215px;
}
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--text-main);
  background-color: var(--light-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { border: none; cursor: pointer; font-family: inherit; }
input { font-family: inherit; outline: none; }
/* ============================================
   登录页面
   ============================================ */
.login-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.left-panel {
  flex: 0 0 35%;
  background: #000000;
  position: relative;
  overflow: hidden;
}
.left-panel::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.04;
  pointer-events: none;
  z-index: 1;
}
.eye-center { position: absolute; top: 50%; left: 50%; width: 0; height: 0; z-index: 5; }
.black-ring { position: absolute; left: 50%; top: 50%; width: var(--black-ring-diameter); height: var(--black-ring-diameter); margin-left: calc(var(--black-ring-diameter) / -2); margin-top: calc(var(--black-ring-diameter) / -2); border-radius: 50%; background: transparent; opacity: 0; pointer-events: none; }
.eye-pupil { position: absolute; left: 50%; top: 50%; width: var(--pupil-outer); height: var(--pupil-outer); margin-left: calc(var(--pupil-outer) / -2); margin-top: calc(var(--pupil-outer) / -2); border: var(--pupil-border) solid #ffffff; border-radius: 50%; background: transparent; transform: translate(0px, 0px); box-shadow: 0 0 12px rgba(255, 255, 255, 0.3), 0 0 30px rgba(255, 255, 255, 0.2); z-index: 10; will-change: transform; transition: none; pointer-events: none; }
.big-arc { position: absolute; width: var(--big-ring-diameter); height: var(--big-ring-diameter); border: var(--big-ring-border) solid #ffffff; border-radius: 50%; background: transparent; box-shadow: 0 0 10px rgba(255, 255, 255, 0.06), 0 0 30px rgba(255, 255, 255, 0.12); pointer-events: none; }
.top-arc-clip { position: absolute; top: 0; left: 0; width: 100%; height: 50%; overflow: hidden; pointer-events: none; z-index: 4; }
.top-arc-clip .big-arc { left: 50%; bottom: calc(-1 * var(--arc-offset)); transform: translateX(-50%); }
.bottom-arc-clip { position: absolute; top: 50%; left: 0; width: 100%; height: 50%; overflow: hidden; pointer-events: none; z-index: 3; }
.bottom-arc-clip .big-arc { left: 50%; top: calc(-1 * var(--arc-offset)); transform: translateX(-50%); }
.right-panel {
  flex: 0 0 65%;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 10px 0 16px -2px rgba(0,0,0,0.78);
}
.form-wrapper { width: 400px; max-width: 90vw; text-align: center; }
.login-logo { margin-bottom: 48px; }
.logo-text { font-size: 48px; font-weight: 700; color: #000000; letter-spacing: 8px; display: block; }
.logo-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.welcome-text { font-size: 20px; font-weight: 600; margin-bottom: 36px; color: var(--text-main); }
/* ===== 动态输入框组 ===== */
/* 层级约定（改这里务必保持顺序，否则标签会重新露出来）：
   输入文字 4 > 黑色方块 3 > 标签 2
   方块升起时是“真的盖住”标签，而不是靠颜色相同伪装；
   输入文字必须在方块之上，否则白色文字会被黑块吃掉。
   动效只使用 transform（不触发布局重排），两块动画共用同一时长与缓动。 */
.inputBox { position: relative; width: 100%; margin-bottom: 24px; }
/* 静止态的黑色下划线，升起的黑块会把它盖住 */
.inputBox::before { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: #333; z-index: 3; pointer-events: none; }
.inputBox input { position: relative; width: 100%; height: 54px; padding: 8px 16px; border: none; border-radius: 4px; background: transparent; color: #333; font-size: 14px; letter-spacing: 0.05em; z-index: 4; transition: color 0.26s ease; }
.inputBox .field-label { position: absolute; left: 16px; top: 50%; transform: translateY(-50%) scale(1); transform-origin: left center; pointer-events: none; font-size: 14px; color: #333; letter-spacing: 0.05em; z-index: 2; transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1); will-change: transform; }
/* 黑色方块：整块铺满，用 scaleY 从底部升起，避免动画 height 造成重排 */
.inputBox i.line { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; background: #222; transform: scaleY(0); transform-origin: bottom; z-index: 3; pointer-events: none; transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1); will-change: transform; }
.inputBox input:focus ~ .field-label,
.inputBox input:not(:placeholder-shown) ~ .field-label { transform: translateY(calc(-50% - 13px)) scale(0.86); }
.inputBox input:focus ~ i.line,
.inputBox input:not(:placeholder-shown) ~ i.line { transform: scaleY(1); }
.inputBox input:focus,
.inputBox input:not(:placeholder-shown) { color: #fff; }
.inputBox input::placeholder { color: transparent; }
@media (prefers-reduced-motion: reduce) {
  .inputBox .field-label,
  .inputBox i.line { transition: none; }
}
.inputBox input:-webkit-autofill, .inputBox input:-webkit-autofill:hover, .inputBox input:-webkit-autofill:focus, .inputBox input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #222 inset !important;
  -webkit-text-fill-color: #fff !important;
  border: none !important;
  transition: background-color 5000s ease-in-out 0s;
}
.inputBox input:-webkit-autofill ~ i.line { transform: scaleY(1); }
.inputBox input:-webkit-autofill ~ .field-label { transform: translateY(calc(-50% - 13px)) scale(0.86); }
.btn-login { width: 100%; height: 54px; background: #000000; color: var(--white); font-size: 16px; border-radius: var(--radius); margin-top: 8px; transition: background 0.2s, transform 0.1s; }
.btn-login:hover { background: #222222; }
.btn-login:active { transform: scale(0.98); }
.forget-link { text-align: right; margin-top: 8px; }
.forget-link a { font-size: 12px; color: var(--primary); }
.forget-link a:hover { text-decoration: underline; }
.footer-note { margin-top: 48px; font-size: 12px; color: var(--text-muted); }

/* ============================================
   主应用布局
   ============================================ */
#app { height: 100vh; display: flex; flex-direction: column; }
.top-bar {
  height: 50px; background: var(--white); border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
}
.top-bar-left { display: flex; align-items: center; gap: 8px; }
.logo-small { font-size: 20px; font-weight: 700; color: #000000; }
.site-name { font-size: 13px; color: var(--text-main); }
.top-bar-right { display: flex; align-items: center; gap: 24px; }
.top-link { font-size: 14px; color: #666; transition: color 0.2s; }
.top-link:hover { color: var(--primary); }
.side-nav {
  width: 220px; background: #000000; position: fixed;
  top: 50px; left: 0; bottom: 0; overflow-y: auto; padding: 16px 0; z-index: 90;
}
.nav-item {
  display: flex; align-items: center; height: 48px; padding: 0 24px;
  color: var(--text-muted); font-size: 14px; border-left: 3px solid transparent;
  transition: all 0.15s; cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,0.04); color: #d0d0d0; }
.nav-item.active {
  background: rgba(255,255,255,0.08); color: var(--white); border-left-color: #ffffff;
}
.nav-item .nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-right: 12px; flex: none; }
.nav-item .nav-icon svg { display: block; width: 100%; height: 100%; }
.content-area {
  margin-left: 220px; margin-top: 50px; min-height: calc(100vh - 50px);
  background: var(--light-bg); padding: 16px; overflow-y: auto;
}

/* ---- 卡片网格布局 ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 24px;
  height: 100%;
}
.card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 24px;
  position: relative;
  overflow: hidden;                /* 桌面端保持圆角裁切 */
}
/* 卡片定位 */
.card-basic { grid-column: 1 / 3; grid-row: 1 / 2; }
.card-announce { grid-column: 3 / 4; grid-row: 1 / 2; }
.card-security { grid-column: 3 / 4; grid-row: 2 / 3; }

/* ===== 基本信息卡片 ===== */
.card-basic {
  /*background: url('/assets/images/default-bg3.jpg') center/cover no-repeat, #e0e0e0;*/
  color: #333; z-index: 0;
}
.card-basic .avatar-wrapper { display: flex; flex-direction: column; align-items: center; text-align: center; height: 100%; justify-content: center; }
.card-basic .avatar-img {
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
  border: 2px solid #fff; box-shadow: 0 0 5px 4px rgba(0,0,0,0.44), 0 0 0 2px rgba(0,0,0,0.11); margin-bottom: 12px;
}
.card-basic .username-display { font-size: 18px; font-weight: 700; color: #222; }
.card-basic .bio-display { font-size: 13px; color: #000; font-weight: 400; margin-top: 4px; }
.card-basic .edit-btn {
  position: absolute; right: 0; top: 0; bottom: 0;
  writing-mode: vertical-rl; background: #000000; color: #ffffff; border: none; border-radius: 4px;
  font-size: 14px; cursor: pointer; padding: 12px 8px; display: flex; align-items: center; justify-content: center;
  letter-spacing: 2px; transition: background 0.2s; width: 36px; margin: auto 0;
}
.card-basic .edit-btn:hover { background: #222222; }
.card-basic .uid-display {
  position: absolute; left: 8px; bottom: 8px; font-size: 11px; color: #000000; z-index: 2; pointer-events: none;
}

/* ===== 安全控制台卡片 ===== */
.card-security {
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}
.card-security .card-header,
.card-announce .card-header {
  font-size: 16px; font-weight: 600; border-bottom: 1px solid #f0f0f0;
  padding-bottom: 12px; margin-bottom: 16px; display: flex; align-items: center;
}
.card-header .card-icon { width: 18px; height: 18px; margin-right: 8px; object-fit: contain; }
.card-security .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-security .security-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid #f0f0f0;
}
.card-security .security-row:last-child { border-bottom: none; }
.card-security .security-label { font-size: 13px; color: var(--text-muted); }
.card-security .security-value { font-size: 14px; font-weight: 500; color: var(--text-main); word-break: break-all; }
.status-red { color: #d0021b !important; font-weight: 500; }
.status-black { color: #000000 !important; font-weight: 500; }
.card-security .btn-more {
  margin-top: auto;
  width: 100%; padding: 10px 0;
  background: #000; color: #fff; border: none; border-radius: 4px;
  font-size: 14px; cursor: pointer; transition: background 0.2s;
}
.card-security .btn-more:hover { background: #222; }

/* 全站通告卡片的消息列表 */
.message-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
.message-item:last-child { border-bottom: none; }
.message-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-right: 12px; }
.message-dot.read { background: #d3d3d3; }
.message-content { flex: 1; }
.message-title { font-size: 14px; line-height: 1.4; }
.message-title.unread { font-weight: 600; }
.message-date { font-size: 12px; color: var(--text-muted); margin-left: 16px; }
.view-all { display: block; text-align: center; margin-top: 16px; font-size: 13px; color: var(--primary); }
.view-all:hover { text-decoration: underline; }


/* 编辑页表单样式 */
.edit-profile-card {
  grid-column: 1 / 3;   /* 占据左侧两列 */
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  background: #fafafa;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(40,110,241,0.1);
}
.save-btn {
  background: #000;
  color: #fff;
  padding: 10px 24px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.save-btn:hover {
  background: #222;
}
.btn-upload-disabled {
  background: #ccc;
  color: #666;
  padding: 10px 0;
  width: 100%;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: not-allowed;
}




/* ============================================
   【基本信息编辑】页面布局：3行3列网格
   ============================================ */
.edit-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto auto;    /* 三行高度由内容决定 */
  gap: 24px;
}
/* --- 左侧编辑卡片：占第一行前两列，与基本信息卡片等大 --- */
.card-edit-profile {
  grid-column: 1 / 3;
  grid-row: 1 / 2;
  background: url('/assets/images/default-bg3.jpg') center/cover no-repeat, #e0e0e0;
  color: #333;
  z-index: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 320px;           /* 保证视觉高度与主页面卡片相当 */
  align-self: start;
}
/* 头像区域（与基本信息卡片一致） */
.card-edit-profile .avatar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 8px;
  margin-bottom: 16px;
}
.card-edit-profile .avatar-img {
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 5px 4px rgba(0,0,0,0.44), 0 0 0 2px rgba(0,0,0,0.11);
  margin-bottom: 12px;
}
/* 表单区域 */
.card-edit-profile .edit-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1;
}
/* 输入框（灰黑色主题） */
.card-edit-profile .input-username,
.card-edit-profile .textarea-bio {
  background: #333;
  color: #fff;
  border: 1px solid #555;
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  text-align: center;
  padding: 8px 12px;
  transition: border-color 0.2s;
}
.card-edit-profile .input-username::placeholder,
.card-edit-profile .textarea-bio::placeholder {
  color: #aaa;
}
.card-edit-profile .input-username:focus,
.card-edit-profile .textarea-bio:focus {
  border-color: #888;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}
.card-edit-profile .input-username {
  width: 25ch;
}
.card-edit-profile .textarea-bio {
  width: 65ch;
  max-width: 100%;
  height: 6em;                /* 固定4行高度 */
  resize: none;               /* 禁止拖拽 */
}
/* 竖排“保存”按钮（位于卡片右侧） */
.card-edit-profile .save-btn {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  writing-mode: vertical-rl;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  padding: 12px 8px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 2px;
  transition: background 0.2s;
  width: 36px;
  margin: auto 0;
}
.card-edit-profile .save-btn:hover { background: #222; }
.card-edit-profile .save-btn:disabled { background: #666; cursor: not-allowed; }
/* --- 头像修改卡片：第一行第三列 --- */
.card-edit-avatar {
  grid-column: 3 / 4;
  grid-row: 1 / 2;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
/* --- 背景图修改卡片：第二行第三列 --- */
.card-edit-bg {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
/* 卡片标题（头像和背景共用） */
.card-edit-avatar .card-header,
.card-edit-bg .card-header {
  font-size: 16px; font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 12px; margin-bottom: 16px;
  display: flex; align-items: center;
}
.card-header .card-icon {
  width: 18px; height: 18px; margin-right: 8px; object-fit: contain;
}
/* 预览区域 */
.preview-area {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  background: #f5f5f5;
  border: 1px dashed #ccc;
  border-radius: 4px;
  min-height: 120px;
  margin-bottom: 16px;
  overflow: hidden;
}
.preview-area img {
  max-width: 100%; max-height: 100%; object-fit: contain;
}
.placeholder-text { color: #999; font-size: 13px; }
/* 上传按钮 */
.btn-upload {
  width: 100%;
  padding: 10px 0;
  background: #000; color: #fff;
  border: none; border-radius: 4px;
  font-size: 14px; cursor: pointer;
  transition: background 0.2s;
  margin-top: auto;
}
.btn-upload:hover { background: #222; }
.btn-upload:disabled { background: #ccc; color: #666; cursor: not-allowed; }
/* --- 返回首页按钮：第三行第三列 --- */
.btn-return-home {
  grid-column: 3 / 4;
  grid-row: 3 / 4;
  background: #000;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  cursor: pointer;
  padding: 14px 0;
  width: 75%;               /* 👈 从 100% 改为 75% */
  margin: 0 auto;           /* 👈 新增：水平居中 */
  display: block;           /* 👈 确保 margin auto 生效 */
  transition: background 0.2s;
}
.btn-return-home:hover { background: #222; }

/* 选图+保存按钮行 */
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: auto;
}
.btn-select,
.btn-save {
  flex: 1;
  padding: 10px 0;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  background: #000;
  color: #fff;
  transition: background 0.2s;
}
.btn-select:hover,
.btn-save:hover {
  background: #222;
}
.btn-select:disabled,
.btn-save:disabled {
  background: #666;
  cursor: not-allowed;
}

/* 内容区标题 */

.page-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;    /* 👈 增大间隙，原为 24px */
  color: var(--text-main);
}
.page-title a {
  color: inherit;
  text-decoration: none;
}
.page-title a:hover {
  text-decoration: underline;
}


/*.page-title a {
  color: inherit;          /* 继承父元素颜色 */
  /*text-decoration: none;   /* 去掉下划线 */
  /*cursor: pointer;
}
.page-title a:hover {
  text-decoration: underline; /* 鼠标悬停时可选择显示下划线 */
}
/* ============================================
   响应式断点
   ============================================ */
@media screen and (max-width: 1279px) {
  .left-panel { flex: 0 0 25%; }
  .right-panel { flex: 0 0 75%; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-basic { grid-column: 1 / 3; }
  .card-announce { grid-column: 1 / 2; grid-row: auto; }
  .card-security { grid-column: 2 / 3; grid-row: auto; }
  .edit-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-edit-profile { grid-column: 1 / 3; }
  .card-edit-avatar { grid-column: 1 / 2; grid-row: auto; }
  .card-edit-bg { grid-column: 2 / 3; grid-row: auto; }
  .btn-return-home { grid-column: 1 / 3; grid-row: auto; }
}
@media screen and (max-width: 700px) {
  :root {
    --pupil-outer: 48px; --pupil-border: 12px; --black-ring-diameter: 88px;
    --big-ring-diameter: 240px; --big-ring-border: 16px; --arc-offset: 172px;
  }
}
@media screen and (max-width: 480px) {
  :root {
    --pupil-outer: 38px; --pupil-border: 10px; --black-ring-diameter: 70px;
    --big-ring-diameter: 190px; --big-ring-border: 13px; --arc-offset: 136px;
  }
}
@media screen and (max-width: 360px) {
  :root {
    --pupil-outer: 32px; --pupil-border: 8px; --black-ring-diameter: 58px;
    --big-ring-diameter: 158px; --big-ring-border: 11px; --arc-offset: 113px;
  }
}

/* ============================================
   👇 移动端断点（≤800px）—— 修复滚动冲突
   ============================================ */
@media screen and (max-width: 800px) {
  /* html 的背景色会延伸到状态栏所在区域：
     登录页顶部是黑色面板，这里必须是黑的，否则 Safari 会在状态栏位置露出白条；
     添加到主屏幕后由 manifest 的 theme_color 接管，所以那时看不到白条。 */
  html, body {
    background: var(--light-bg);
    overflow: hidden;
    height: 100%;
  }
  html.page-login { background: #000000; }
  html.page-console { background: #ffffff; }
  /* 主应用外壳：固定全屏，利用弹性盒填充 */
  #app {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* 优先使用动态视口高度，浏览器会自动减去工具栏高度 */
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  /* 登录页面同样固定全屏 */
  .login-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* 优先使用动态视口高度，浏览器会自动减去工具栏高度 */
    flex-direction: column;
    overflow: hidden;
  }
  .left-panel {
    position: relative;
    flex: none;
    width: 100%;
    height: 135px;
    overflow: hidden;
    border-bottom: 3px solid rgba(255, 255, 255, 0.45);
  }
  .right-panel {
    flex: 1;
    width: 100%;
    box-shadow: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  :root {
    --pupil-outer: 36px;
    --pupil-border: 9px;
    --black-ring-diameter: 66px;
    --big-ring-diameter: 180px;
    --big-ring-border: 12px;
    --arc-offset: 130px;
  }
  .eye-center { top: 58%; left: 50%; }
  .form-wrapper { width: 80vw; }
  /* 侧边栏在移动端改为抽屉，具体样式见 console-shell.css */
  /* ===== 主内容区 —— 弹性填充，底部直接加 80px 空白 ===== */
  .content-area {
    flex: 1;                    /* 自动占满剩余高度，不需要 calc */
    margin-left: 0 !important;
    margin-top: 50px;           /* 工具栏高度 */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    /* 👇 这才是关键：底部留出 80px 空白，地址栏自动被空白填充 */
    padding: 16px 16px 120px;          
    padding-bottom: max(120px, env(safe-area-inset-bottom));
    box-sizing: border-box;
  }
  /* 卡片网格单列 */
  .card-grid {
    grid-template-columns: 1fr;
  }
  .card-basic,
  .card-announce,
  .card-security {
    grid-column: auto;
    grid-row: auto;
  }
  .card {
    overflow: visible;
  }
  .card-security {
    overflow: visible;
    height: auto;
    display: flex;
    flex-direction: column;
  }
  .card-security .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .card-security .btn-more {
    margin-top: auto;
  }
  /* 编辑页移动端适配 */
  .edit-card-grid {
    /*grid-template-columns: 1fr !important;
    width: 100%;
    max-width: 100%;*/
    display: flex;
    flex-direction: column;
    align-items: center;          /* 👈 子元素水平居中 */
    gap: 24px;
    width: 100%;
  }
  .card-edit-profile {
    min-height: 240px;
    width: 100%;
    overflow: hidden;
  }
  .card-edit-avatar,
  .card-edit-bg {
    /*
    grid-column: 1 / -1 !important;
    grid-row: auto !important;

    width: 100% !important;
    max-width: 400px !important;

    margin-left: auto !important;
    margin-right: auto !important;*/
    width: 90% !important;
    max-width: 400px !important;
    margin: 0 !important;         /* 清除可能干扰的外边距 */
    /* 覆盖之前的所有 Grid 定位 */
    grid-column: auto !important;
    grid-row: auto !important;
    justify-self: auto !important;

  }
  .btn-return-home {
   width: 75%;               /* 👈 从 100% 改为 75% */
    margin: 0 auto;           /* 👈 新增：水平居中 */
  display: block;           /* 👈 确保 margin auto 生效 */
    max-width: 100%;
    box-sizing: border-box;

  }
  .card-edit-profile .input-username {
    width: 90%;
    max-width: 100%;
  }
  .card-edit-profile .textarea-bio {
    height: 2.5em;
    min-height: 2.5em;
    max-height: 2.5em;
    overflow-y: hidden;
    resize: none;
    width: 90%;
    max-width: 100%;
  }
  .top-bar-right { gap: 12px; }
  .site-name { display: none; }
}