.personal-center { background: var(--canvas); color: var(--ink); min-height: 100dvh; padding: 30px clamp(20px,3%,44px); font-family: var(--font-sans); letter-spacing: 0; }
.personal-center[hidden] { display: none; }
.personal-center * { box-sizing: border-box; letter-spacing: 0; }
.pc-header { display: flex; align-items: center; gap: 22px; min-height: 58px; margin-bottom: 24px; }
.pc-header h1 { font-size: clamp(22px,2.4vw,28px); font-weight: 800; color: var(--ink); margin: 0; }
.pc-back, .pc-close { background: none; border: 0; padding: 6px; width: 42px; height: 44px; cursor: pointer; }
.pc-back img, .pc-close img { width: 22px; height: 22px; object-fit: contain; filter: brightness(0); opacity: .75; }
.pc-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; height: calc(100dvh - 150px); min-height: 480px; }
.pc-sidebar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; padding: 36px 20px 28px; }
.pc-avatar { display: grid; place-items: center; width: 108px; height: 108px; border: 4px solid var(--line); background: var(--shell-soft); color: var(--shell); border-radius: 50%; font-size: 38px; font-weight: 700; overflow: hidden; flex-shrink: 0; }
.pc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pc-sidebar h2 { font-size: 22px; font-weight: 700; text-align: center; overflow-wrap: anywhere; margin: 20px 0; }
.pc-actions { margin-top: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; }
.pc-command { background: var(--surface-sunken); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.pc-command:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.pc-command[aria-pressed=true] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.pc-content { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow-y: auto; min-width: 0; padding: 18px 26px; scrollbar-gutter: stable; }
.pc-book-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 24px; align-content: start; }
.pc-book-item { min-width: 0; text-align: center; }
.pc-book { width: 100%; max-width: 200px; padding: 12px 12px 0; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; box-shadow: var(--shadow-sm); }
.pc-book:hover { border-color: var(--accent); }
.pc-book-cover { aspect-ratio: 178/204; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 12px; background: var(--shell-soft); color: var(--shell); border-radius: var(--radius-sm); overflow-wrap: anywhere; }
.pc-book-cover strong { font-size: 22px; font-weight: 700; }
.pc-book-cover span { font-size: 14px; color: var(--muted); }
.pc-book-cover.pc-real-cover { padding: 0; aspect-ratio: 200/272; }
.pc-real-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
.pc-subject-chinese, .pc-subject-history { background: #f7e3e8; color: #a33151; }
.pc-subject-math, .pc-subject-science { background: #fbecc4; color: #755400; }
.pc-subject-biology, .pc-subject-geography { background: #d8ede0; color: #226b48; }
.pc-subject-morality, .pc-subject-human_geography { background: #e9e0f5; color: #694188; }
.pc-book-footer { display: flex; justify-content: center; align-items: center; gap: 7px; min-height: 40px; font-size: 16px; }
.pc-book-footer img { width: 22px; height: 22px; object-fit: contain; }
.pc-book-caption { margin: 10px auto 0; max-width: 200px; font-size: 15px; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.pc-study-link { border: 0; padding: 5px 8px; background: none; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.pc-book-state { font-size: 13px; color: var(--muted); }
.pc-status { font-size: 15px; margin: 12px 0 0; color: var(--success); }
.pc-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 320px; gap: 16px; }
.pc-empty img { width: 80px; height: 80px; object-fit: contain; }
.pc-dialog { background: var(--surface); color: var(--ink); width: min(920px, 94vw); max-height: 88dvh; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 24px; }
.pc-dialog::backdrop { background: rgba(20, 28, 42, .5); }
.pc-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.pc-dialog-header h2 { font-size: 22px; margin: 0; }
.pc-close { width: 34px; height: 34px; }
.pc-dialog-body { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.pc-dialog-body > p { width: 100%; margin: 0 0 8px; overflow-wrap: anywhere; }
.pc-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; width: 100%; }
.pc-filters label { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.pc-filters select { width: 100%; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 9px 8px; font: inherit; }
.pc-catalog-count { color: var(--muted); font-size: 13px; }
.pc-catalog-list { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; min-height: 150px; }
.pc-catalog-book { background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: left; color: var(--ink); display: flex; flex-direction: column; gap: 10px; font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.pc-catalog-book:hover { border-color: var(--accent); background: var(--accent-soft); }
.pc-catalog-book small { color: var(--muted); }
.pc-empty-message { grid-column: 1/-1; text-align: center; color: var(--muted); padding: 36px 10px; }
.pc-inline-error { color: var(--danger); }
.pc-avatar-preview { width: 190px; height: 190px; object-fit: contain; }
.personal-center :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 1150px) { .pc-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 20px; } .pc-book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } .pc-content { padding: 16px; } .pc-command { font-size: 14px; } }
@media (max-width: 760px) {
  .personal-center { padding: 18px; } .pc-header { gap: 12px; flex-wrap: wrap; margin-bottom: 16px; } .pc-header h1 { font-size: 22px; }
  .pc-layout { display: flex; flex-direction: column; height: auto; min-height: 0; } .pc-sidebar { padding: 20px 16px; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; } .pc-avatar { width: 64px; height: 64px; border-width: 3px; font-size: 26px; } .pc-sidebar h2 { font-size: 20px; text-align: left; margin: 0; } .pc-actions { grid-column: 1/-1; grid-template-columns: repeat(2, minmax(0, 1fr)); } .pc-content { overflow-y: visible; }
  .pc-book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; } .pc-book { padding: 8px 8px 0; } .pc-book-cover strong { font-size: 19px; } .pc-book-cover span { font-size: 13px; } .pc-book-footer { font-size: 15px; gap: 5px; } .pc-book-caption { font-size: 14px; } .pc-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pc-catalog-list { grid-template-columns: minmax(0, 1fr); } .pc-dialog { padding: 18px; }
}

/* 个人中心：单卡布局（账号信息 + 四项操作），不再展示已绑定教材 */
.pc-layout { display: block; height: auto; max-width: 620px; margin: 0 auto; }
.pc-layout .pc-sidebar { padding: 32px 24px 26px; }
.pc-phone { margin: -6px 0 22px; font-size: 14px; color: var(--muted); text-align: center; word-break: break-all; }
.pc-actions { margin-top: 0; }
.pc-form { display: grid; gap: 14px; max-width: 420px; margin: 4px auto 0; }
.pc-field { display: grid; gap: 7px; }
.pc-field > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.pc-input {
  width: 100%; height: 46px; padding: 0 14px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; outline: 0;
}
.pc-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pc-submit {
  margin-top: 4px; height: 46px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--accent); color: #fff; font: inherit; font-size: 15px; font-weight: 700;
}
.pc-submit:disabled { opacity: .6; cursor: default; }

@media (max-width: 640px) {
  .personal-center { padding: 14px 16px 28px; }
  .pc-header { gap: 10px; margin-bottom: 12px; min-height: 48px; }
  .pc-header h1 { font-size: 20px; font-weight: 800; }
  .pc-layout { max-width: 100%; }
  .pc-layout .pc-sidebar {
    display: flex; flex-direction: column; align-items: center; gap: 0;
    padding: 26px 18px 22px; border-radius: 22px;
    background: #fff; border: 1.5px solid #F1E5D3; box-shadow: 0 16px 34px -28px rgba(140, 100, 50, .9);
  }
  .pc-avatar { width: 88px; height: 88px; font-size: 32px; border-width: 3px; }
  .pc-sidebar h2 { font-size: 20px; margin: 14px 0 6px; text-align: center; }
  .pc-phone { margin: 0 0 20px; font-size: 13px; color: #8C7B65; }
  .pc-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pc-command {
    min-height: 46px; border-radius: 14px; font-size: 14px; font-weight: 700;
    background: #FFF7EC; border: 1.5px solid #F3E3CB; color: #8A5B22;
  }
  .pc-dialog { width: calc(100% - 28px); padding: 20px 18px; border-radius: 20px; }
  .pc-form { max-width: 100%; }
}

@media (max-width: 640px) {
  .personal-center { background: #F7F2E9; }
  .personal-center .pc-header h1 { color: #3A3026; }
  .pc-avatar { background: #FEF3DC !important; color: #B06A21 !important; border-color: #F3E3CB !important; }
  .pc-sidebar h2 { color: #3A3026; }
  .pc-dialog { background: #FFFDF9; border-color: #F1E5D3; }
  .pc-dialog-header h2 { color: #3A3026; }
  .pc-command:active { background: #FFEBD2; }
}

@media (max-width: 640px) {
  .pc-input { background: #FFFDF9; border: 1.5px solid #EFE1CB; border-radius: 14px; color: #3A3026; }
  .pc-input::placeholder { color: #B6A48C; }
  .pc-input:focus { border-color: #E9A24F; box-shadow: 0 0 0 3px rgba(233, 162, 79, .18); }
  .pc-submit {
    height: 48px; border-radius: 14px; font-size: 15px; font-weight: 800; color: #fff;
    background: linear-gradient(180deg, #F6B368, #E2872C);
    box-shadow: 0 12px 22px -14px rgba(196, 111, 30, .95);
  }
  .pc-dialog .pc-icon-btn, .pc-close { background: #F4EADB; color: #8A6A3E; }
}

@media (max-width: 640px) {
  .pc-dialog-header .pc-close { background: transparent !important; border-radius: 50%; }
  .pc-dialog-header .pc-close img { width: 26px; height: 26px; }
}
