/* f7goods 作者手册 — 仿庭域手册 UI */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Noto Sans SC', 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  color: #2A2430;
  background:
    radial-gradient(ellipse 70% 55% at 18% 28%, rgba(160, 80, 200, 0.45), transparent 55%),
    radial-gradient(ellipse 60% 50% at 82% 72%, rgba(80, 60, 180, 0.4), transparent 50%),
    linear-gradient(145deg, #4a2878 0%, #321a58 45%, #221038 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none;
  background:
    linear-gradient(125deg, transparent 42%, rgba(255,255,255,0.05) 43%, transparent 44%),
    linear-gradient(28deg, transparent 62%, rgba(200,160,255,0.07) 63%, transparent 64%);
  z-index: 0;
}

.page {
  position: relative; z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.1rem 2.8rem;
}

.chrome {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.9rem; gap: 0.5rem; flex-wrap: wrap;
  font-size: 0.78rem;
}
.chrome .tag {
  color: #E8C4FF; letter-spacing: 0.14em; font-weight: 600; font-size: 0.74rem;
}
.chrome-tools { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.chrome a, .chrome-btn {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 0.38rem 0.78rem;
  font-family: inherit; font-size: 0.78rem; cursor: pointer;
  min-height: 36px; display: inline-flex; align-items: center;
}
.chrome a:hover, .chrome-btn:hover { color: #fff; }
.chrome-name {
  min-width: 6.5em; text-align: center;
  font-size: 0.9rem; font-weight: 600; color: #F5EFFF;
}
.chrome-tools .search-btn {
  background: rgba(255,255,255,0.92);
  border-color: rgba(255,255,255,0.55);
  color: #2A2040; font-weight: 700;
}

/* ── 手册主面板（仿庭域手册外框） ── */
.handbook {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 26%),
    linear-gradient(168deg, #E0DAEA 0%, #D2CCDE 38%, #C4BDD2 100%);
  border: 3px solid #2F4A52;
  border-radius: 10px;
  padding: 1.55rem 1.7rem 1.7rem;
  min-height: 620px;
  box-shadow:
    0 0 0 8px rgba(16, 28, 40, 0.42),
    0 0 0 9px rgba(90, 70, 120, 0.25),
    0 28px 60px rgba(0,0,0,0.48),
    inset 0 1px 0 rgba(255,255,255,0.45);
  --clip-center: 86px;
  --hb-pad-x: 1.7rem;
}
/* 顶栏金属夹签 */
.handbook::before {
  content: '';
  position: absolute;
  top: -22px;
  left: calc(var(--clip-center) - 30px);
  width: 60px; height: 24px;
  background: linear-gradient(180deg, #F4F0FA 0%, #C8C0D8 35%, #7A7290 70%, #4A4458 100%);
  border-radius: 4px 4px 0 0;
  border: 1px solid #2F4A52;
  border-bottom: none;
  z-index: 6;
}
.handbook::after {
  content: '';
  position: absolute;
  top: -14px;
  left: calc(var(--clip-center) - 10px);
  width: 20px; height: 12px;
  background: #1E2830;
  border-radius: 2px;
  z-index: 7;
}
/* 底部书签 */
.hb-ribbon {
  position: absolute;
  left: 40px;
  bottom: -16px;
  width: 24px;
  height: 40px;
  background: linear-gradient(180deg, #E85A66 0%, #C43D4A 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
  z-index: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.22);
}

/* 右上标题 — 仿庭域手册 */
.hb-title-static {
  position: absolute;
  top: 0.75rem;
  right: 1.6rem;
  text-align: right;
  z-index: 4;
  pointer-events: none;
}
.hb-title-static h1 {
  font-family: 'Noto Serif SC', Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #2A2038;
  line-height: 1.05;
  text-indent: 0.22em;
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}
.hb-title-static span {
  display: block;
  margin-top: 0.35rem;
  font-family: 'Noto Sans SC', system-ui, sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.48em;
  color: rgba(42, 32, 56, 0.22);
  font-weight: 700;
  text-indent: 0.48em;
}

/* ── 主体 ── */
.hb-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, 290px) 1fr;
  gap: 1.75rem;
  margin-top: 3.8rem;
  align-items: start;
  min-height: 540px;
}

/* ── 左：挂牌档案卡 ── */
.idcard-wrap {
  position: relative;
  padding-top: 48px;
  min-height: 540px;
  margin-top: -3.4rem;
  align-self: start;
  z-index: 3;
  display: flex;
  flex-direction: column;
}
/* 卡片顶夹 */
.idcard-clip {
  position: absolute;
  top: 2px;
  left: calc(var(--clip-center) - var(--hb-pad-x) - 36px);
  width: 72px; height: 28px;
  background: linear-gradient(180deg, #F6F2FA 0%, #D0C8DC 40%, #6E6680 78%, #3E3848 100%);
  border: 1px solid #2F4A52;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  z-index: 4;
  transform: rotate(-3.2deg);
  transform-origin: bottom center;
}
.idcard-clip::after {
  content: '';
  position: absolute;
  left: 50%; top: 7px;
  transform: translateX(-50%);
  width: 16px; height: 15px;
  border: 2px solid #2A2040;
  border-radius: 3px;
  background: #E0DAEA;
}
/* 夹与卡之间的挂牌颈 */
.idcard-wrap::before {
  content: '';
  position: absolute;
  top: 24px;
  left: calc(var(--clip-center) - var(--hb-pad-x) - 9px);
  width: 18px; height: 28px;
  background: linear-gradient(180deg, #5C5470, #3A3048);
  border-radius: 0 0 3px 3px;
  z-index: 3;
  transform: rotate(-3.2deg);
  transform-origin: top center;
}

/* 深色厚外框 + 纸色内页 */
.idcard {
  flex: 1 1 auto;
  min-height: 490px;
  background: linear-gradient(155deg, #6B5568 0%, #4C3C50 42%, #3A2E42 100%);
  border-radius: 12px;
  padding: 14px;
  box-shadow:
    0 16px 40px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 0 0 1px rgba(0,0,0,0.2);
  transform: rotate(-3.2deg);
  transform-origin: top center;
  display: flex;
  flex-direction: column;
}
.idcard-inner {
  flex: 1;
  background: linear-gradient(175deg, #FBF7F0 0%, #F3ECE0 48%, #E9E0D2 100%);
  border-radius: 4px;
  padding: 1.15rem 1.05rem 1.05rem;
  color: #2A2430;
  display: flex;
  flex-direction: column;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.6),
    inset 0 0 0 2px rgba(42,36,48,0.06);
}

/* 头像 + 名称 + 等级条 */
.id-head {
  display: flex; gap: 0.85rem; align-items: flex-start;
  margin-bottom: 0.95rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(42,36,48,0.12);
}
.id-avatar {
  width: 78px; height: 78px;
  border-radius: 4px;
  background: linear-gradient(160deg, #EDE6DA, #D8CDBE);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  overflow: hidden; flex-shrink: 0;
  display: grid; place-items: center;
  font-family: 'Noto Serif SC', Georgia, serif;
  font-weight: 700; font-size: 1.3rem; color: #5a5048;
}
.id-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.id-head-text { flex: 1; min-width: 0; padding-top: 0.15rem; }
.id-name {
  font-family: 'Noto Serif SC', Georgia, serif;
  font-weight: 700; font-size: 1.15rem; line-height: 1.3;
  color: #1F1A28; letter-spacing: 0.02em;
}
.id-sub {
  margin-top: 0.35rem;
  font-size: 0.78rem; color: #5C544C;
  letter-spacing: 0.04em; font-weight: 600;
}

/* 行：标签左 / 值右（对照标识、编号、人数） */
.id-rows { margin-bottom: 0.7rem; }
.id-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 0.28rem;
}
.id-row .k {
  font-size: 0.86rem; font-weight: 700; color: #3A3248;
  letter-spacing: 0.08em; flex-shrink: 0;
}
.id-row .v,
.id-row .v-inline {
  font-size: 0.9rem; color: #2A2430; font-weight: 600;
  text-align: right; min-width: 0;
}
.id-row .v.num {
  color: #D94F5C; font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.id-goal {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #2A2430;
}
.id-goal .intro-clamp .intro-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.id-goal .v { font-size: 0.88rem; line-height: 1.7; }
.id-goal .v.muted { color: #8A8078; }
.intro-toggle {
  appearance: none; border: none; background: none;
  color: #5A3FA0; font-family: inherit;
  font-size: 0.76rem; font-weight: 700; cursor: pointer;
  padding: 0.25rem 0 0;
}
.intro-toggle:hover { color: #D94F5C; }

.id-nums {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(42,36,48,0.12);
}
.id-nums .id-row { margin-bottom: 0.4rem; }

.contact-link {
  color: #3E2E5A; font-weight: 700;
  text-decoration: underline; text-underline-offset: 2px;
  word-break: break-all;
  font-size: 0.86rem;
}
.contact-link:hover { color: #D94F5C; }
.contact-link .ext { font-size: 0.75em; opacity: 0.7; }
.id-row .v-inline { text-align: right; }

/* ── 右：三格 — 仿庭域中心/名册/之争 ── */
.hb-tiles {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.85rem;
  height: 460px;
  min-height: 430px;
  margin-top: -0.35rem;
  margin-left: 0.1rem;
  align-self: start;
  position: relative;
  z-index: 2;
}

.tile {
  position: relative;
  display: block;
  text-decoration: none;
  color: #fff;
  border-radius: 2px;
  overflow: hidden;
  border: 2px solid #243040;
  background: #120E1C;
  min-height: 0;
  box-shadow:
    0 8px 22px rgba(0,0,0,0.3),
    inset 0 0 0 1px rgba(255,255,255,0.05);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.36);
}
.tile-main { grid-row: 1 / 3; }

.tile-cover {
  position: absolute; inset: 0;
  overflow: hidden;
  background: linear-gradient(160deg, #3a2f52, #1c1528);
}
.tile-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: saturate(0.95) brightness(0.9);
}
.tile-cover .empty-ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: rgba(232,196,255,0.38);
  font-size: 0.85rem; letter-spacing: 0.12em;
  text-align: center; padding: 1rem;
}

/* 标签条：仿参考图厚色带 */
.tile-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(30,22,48,0.15) 0%, #221832 20%, #140E20 100%);
  padding: 0.85rem 0.55rem 0.95rem;
  text-align: center;
  border-top: 2px solid rgba(255,255,255,0.06);
}
.tile-label b {
  display: block;
  font-family: 'Noto Serif SC', Georgia, serif;
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  font-weight: 700;
  letter-spacing: 0.32em;
  color: #F8F4FF;
  text-indent: 0.32em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.tile-label span {
  display: block;
  margin-top: 0.3rem;
  font-family: 'Noto Sans SC', system-ui, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  color: rgba(232,196,255,0.38);
  text-indent: 0.32em;
  font-weight: 700;
}

/* 搜索 */
.as-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(16,10,32,0.55);
  backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 12vh 1rem 1rem;
}
.as-mask.open { display: flex; }
.as-panel {
  width: min(400px, 100%);
  background: linear-gradient(165deg, #E0DAEA, #C8C0D4);
  border: 2px solid #2F4A52;
  border-radius: 10px;
  padding: 0.95rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}
.as-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.55rem;
}
.as-head h3 {
  font-family: 'Noto Serif SC', Georgia, serif;
  font-size: 0.98rem; color: #2A2038; letter-spacing: 0.1em;
}
.as-close {
  border: none; background: none; color: #3E2E5A;
  font-size: 1.3rem; cursor: pointer; font-family: inherit; line-height: 1;
}
.as-input {
  width: 100%;
  border: 1px solid #8A80A0;
  background: #FFFCF7;
  color: #221C2C;
  border-radius: 6px;
  padding: 0.65rem 0.8rem;
  font-family: inherit; font-size: 0.95rem; outline: none;
  min-height: 42px;
}
.as-input:focus { border-color: #5A3FA0; }
.as-list {
  margin-top: 0.55rem; max-height: 260px; overflow: auto;
  display: grid; gap: 0.35rem;
}
.as-item {
  appearance: none;
  border: 1px solid rgba(62,46,90,0.2);
  background: rgba(255,252,247,0.8);
  color: #221C2C;
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  font-family: inherit; font-size: 0.88rem;
  text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 0.55rem;
  min-height: 44px;
}
.as-item:hover { background: #FFFCF7; border-color: #5A3FA0; }
.as-mini {
  width: 30px; height: 30px; border-radius: 4px;
  overflow: hidden; flex-shrink: 0; background: #ddd4c6;
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.8rem; color: #5a5048;
}
.as-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.as-meta b { display: block; font-weight: 700; }
.as-meta small { display: block; opacity: 0.65; font-size: 0.72rem; margin-top: 0.1rem; }
.as-empty { font-size: 0.82rem; color: #6A6280; padding: 0.5rem; text-align: center; }

/* 移动端 */
@media (max-width: 720px) {
  .page { padding: 0.75rem 0.65rem 2.1rem; }
  .chrome { margin-bottom: 0.7rem; }
  .chrome a, .chrome-btn { min-height: 40px; padding: 0.42rem 0.7rem; }
  .handbook {
    padding: 1.15rem 0.9rem 1.3rem;
    min-height: 0; margin-top: 0.5rem;
  }
  .handbook::before { left: 22px; width: 44px; height: 18px; }
  .handbook::after { left: 34px; width: 14px; height: 9px; }
  .hb-ribbon { left: 18px; bottom: -12px; width: 16px; height: 28px; }
  .hb-title-static { position: static; text-align: left; margin: 0.25rem 0 0.95rem; }
  .hb-title-static h1 { font-size: 1.5rem; letter-spacing: 0.16em; text-indent: 0; }
  .hb-title-static span { font-size: 0.7rem; letter-spacing: 0.3em; text-indent: 0; }
  .hb-body { grid-template-columns: 1fr; margin-top: 0; gap: 1.05rem; min-height: 0; }
  .idcard-wrap { margin-top: 0; min-height: 0; padding-top: 34px; }
  .idcard-clip { left: 14px; width: 56px; height: 24px; }
  .idcard-wrap::before { left: 30px; top: 20px; height: 18px; width: 14px; }
  .idcard { transform: rotate(-2deg); min-height: 0; padding: 9px; }
  .idcard-inner { padding: 1rem 0.9rem 0.9rem; }
  .id-avatar { width: 60px; height: 60px; }
  .id-name { font-size: 1.05rem; }
  .id-row .k { font-size: 0.8rem; }
  .id-row .v, .id-goal .v { font-size: 0.86rem; }
  .hb-tiles {
    margin-top: 0; margin-left: 0;
    height: auto; min-height: 0;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
  }
  .tile-main { grid-column: 1 / -1; grid-row: auto; min-height: 230px; }
  .tile { min-height: 148px; }
  .tile-label { padding: 0.7rem 0.45rem 0.8rem; }
  .tile-label b { font-size: 1rem; letter-spacing: 0.22em; text-indent: 0.22em; }
  .tile-label span { font-size: 0.56rem; letter-spacing: 0.22em; text-indent: 0.22em; }
}

@media (max-width: 400px) {
  .hb-tiles { grid-template-columns: 1fr; }
  .tile { min-height: 135px; }
  .tile-main { min-height: 175px; }
}
