/* ==========================================================================================
   screens/protocol-db.css — 协议数据库 (js/screens/protocolDb.js, §37.403): 规程's official database window and the
   yellow plate that opens it from the lobby (under 成就统计; a right-column plate on short screens). Laid out after the
   owner's recording of 2026-11-30: a dark panel over the blurred lobby, the lockup on red art and the tabs at the left,
   the article at the right, × on the top right corner, the 卫戍百科 | 更新日志 capsule on the bottom edge. The 规程 lobby
   repaints the theme's mint in red (lobby.css), so the window names its own teal. Every font size follows
   设置 → 文字大小 (`--t`), floored in px for phones.
   ========================================================================================== */

/* ---- the lobby's plate ---- */
.hub-db {
  --pl-ink: rgba(36, 30, 18, .62);
  position: relative;
  display: flex;
  align-items: center;
  gap: .16rem;
  width: 100%;
  min-height: max(1.06rem, 32px, calc(64px * var(--sp-ui, 1)));
  padding: .16rem .34rem .2rem .3rem;
  font: inherit;
  text-align: left;
  color: #121110;
  cursor: var(--sp-cursor-pointer, pointer);
  overflow: hidden;
  background:
    linear-gradient(var(--pl-ink), var(--pl-ink)) left .08rem center / 2px 56% no-repeat,
    linear-gradient(var(--pl-ink), var(--pl-ink)) left .08rem top 22% / .06rem 2px no-repeat,
    linear-gradient(var(--pl-ink), var(--pl-ink)) left .08rem bottom 22% / .06rem 2px no-repeat,
    linear-gradient(var(--pl-ink), var(--pl-ink)) right .08rem center / 2px 56% no-repeat,
    linear-gradient(var(--pl-ink), var(--pl-ink)) right .08rem top 22% / .06rem 2px no-repeat,
    linear-gradient(var(--pl-ink), var(--pl-ink)) right .08rem bottom 22% / .06rem 2px no-repeat,
    linear-gradient(180deg, #efda9c, #dcc178 60%, #cfb064);
  border: 1px solid rgba(255, 244, 210, .55);
  box-shadow: 0 .05rem .18rem rgba(0, 0, 0, .5), inset 0 -2px 0 rgba(0, 0, 0, .12);
  transition: filter var(--t-fast), box-shadow var(--t-fast);
}
.hub-db:hover { filter: brightness(1.06); box-shadow: 0 .05rem .22rem rgba(0, 0, 0, .55), 0 0 .16rem rgba(239, 218, 156, .35); }
.hub-db:focus-visible { outline: 2px solid #f4e2a8; outline-offset: 2px; }
/* the official plate's sawtooth: teeth along the top and the bottom edge (drawn) */
.hub-db__teeth { position: absolute; inset: 0; pointer-events: none;
  background:
    conic-gradient(from -45deg at 50% 100%, rgba(74, 58, 26, .34) 0 90deg, transparent 90deg) left top / .3rem .13rem repeat-x,
    conic-gradient(from 135deg at 50% 0%, rgba(74, 58, 26, .5) 0 90deg, transparent 90deg) left bottom / .3rem .15rem repeat-x; }
.hub-db__mark { position: relative; z-index: 1; flex: none; display: block; width: .6rem; height: .6rem; overflow: hidden; }
/* the season's raised fist in black: the sprite's square fills the slot, its glow cut off (the square is 88 of 154 px) */
.hub-db__mark img { position: absolute; left: -37.5%; top: -37.5%; width: 175%; max-width: none; height: 175%; filter: brightness(0); }
.hub-db__svg { display: block; width: 100%; height: 100%; }
.hub-db__text { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .02rem; }
.hub-db__name { font-size: max(calc(.3 * var(--t)), 14px); font-weight: 900; letter-spacing: .06em; line-height: 1.12; color: #141210; overflow-wrap: anywhere; }
.hub-db[data-script="alphabetic"] .hub-db__name { font-size: max(calc(.24 * var(--t)), 13px); letter-spacing: .02em; }
.hub-db__en { font-family: var(--font-display); font-size: max(calc(.12 * var(--t)), 9px); font-weight: 700; letter-spacing: .08em; line-height: 1.1; color: rgba(20, 18, 16, .86); }
/* the small block at the top right (the official plate's lockup mark, drawn) */
.hub-db__tag { position: absolute; right: .2rem; top: .1rem; width: .3rem; height: .12rem;
  background:
    linear-gradient(#141210, #141210) left center / .1rem 100% no-repeat,
    linear-gradient(rgba(20, 18, 16, .7), rgba(20, 18, 16, .7)) right top 20% / .16rem 2px no-repeat,
    linear-gradient(rgba(20, 18, 16, .7), rgba(20, 18, 16, .7)) right bottom 20% / .16rem 2px no-repeat; }
/* the right column's plate on short screens (the left column gives way there, lobby.css); 盟约's (data-look="covenant",
   §37.406) stays the hub's own white plate with the glyph square, as its 干员调配 */
.lobby-hub .hub-plate--db { display: none; }
.lobby-hub .hub-plate.hub-plate--db:not([data-look="covenant"]) {
  --pl-ink: rgba(36, 30, 18, .62);
  background:
    linear-gradient(var(--pl-ink), var(--pl-ink)) left .07rem center / 2px 54% no-repeat,
    linear-gradient(var(--pl-ink), var(--pl-ink)) left .07rem top 23% / .06rem 2px no-repeat,
    linear-gradient(var(--pl-ink), var(--pl-ink)) left .07rem bottom 23% / .06rem 2px no-repeat,
    linear-gradient(var(--pl-ink), var(--pl-ink)) right .07rem center / 2px 54% no-repeat,
    linear-gradient(var(--pl-ink), var(--pl-ink)) right .07rem top 23% / .06rem 2px no-repeat,
    linear-gradient(var(--pl-ink), var(--pl-ink)) right .07rem bottom 23% / .06rem 2px no-repeat,
    linear-gradient(180deg, #efda9c, #d6b96d);
  border-color: rgba(255, 244, 210, .55);
}
.lobby-hub .hub-plate--db:not([data-look="covenant"]) .hub-plate__glyph { padding: 0; background: none; box-shadow: none; }
@media (max-height: 520px) {
  .lobby-hub .hub-plate--db { display: flex; }
}

/* ---- the window ---- */
.modal.pdb-veil { animation: none; padding: 0; background: rgba(3, 5, 5, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal__box.pdb { position: fixed; inset: 0; width: auto; max-height: none; background: transparent; border: 0; box-shadow: none; animation: none; }
.modal__box.pdb::after, .pdb > .modal__stripe { display: none; }
.pdb > .modal__body { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 0; color: #e3e7e6; }
.pdb {
  --pdb-teal: #22d3a6;
  --pdb-teal-dim: rgba(34, 211, 166, .22);
  --pdb-ink: #121514;
  --pdb-text: #dde2e1;
  --pdb-top: calc(var(--sa-t, 0px) + 14.6%);
  --pdb-bottom: calc(var(--sa-b, 0px) + 14.8%);
  --pdb-x: calc(max(var(--sa-l, 0px), var(--sa-r, 0px)) + 4.8%);
}
.pdb .rt-mint { color: var(--pdb-teal); }
.pdb__panel {
  position: absolute;
  left: var(--pdb-x);
  right: var(--pdb-x);
  top: var(--pdb-top);
  bottom: var(--pdb-bottom);
  display: grid;
  grid-template-columns: minmax(0, 25.6%) minmax(0, 1fr);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, rgba(26, 30, 29, .94), rgba(16, 19, 18, .96));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 .2rem .8rem rgba(0, 0, 0, .65);
}
/* the left column: the lockup on the season's red art, the tabs, PERSONNEL CHECKED */
.pdb-side { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: linear-gradient(180deg, #2a0f0b, #151817 32%, #131615); border-right: 1px solid rgba(255, 255, 255, .08); }
.pdb-side__head { position: relative; flex: none; display: flex; align-items: center; min-height: max(1.3rem, 32px, calc(72px * var(--sp-ui, 1))); padding: .2rem .3rem .3rem; }
.pdb-side__art { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 30% 22%; opacity: .8;
  -webkit-mask: linear-gradient(180deg, #000 40%, transparent 100%); mask: linear-gradient(180deg, #000 40%, transparent 100%); }
.pdb-side__head::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(150, 34, 22, .45), transparent 85%); mix-blend-mode: multiply; pointer-events: none; }
.pdb-side__lockup { position: relative; width: min(3.7rem, 100%); height: auto; filter: drop-shadow(0 .03rem .1rem rgba(0, 0, 0, .7)); }
.pdb-side__title { position: relative; font-size: max(calc(.3 * var(--t)), 14px); font-weight: 900; letter-spacing: .08em; color: #efe5c8; }
/* 盟约's window (§37.406): the lobby's emblem and title on its teal glow instead of 规程's red art */
.pdb__panel[data-family="covenant"] .pdb-side { background: linear-gradient(180deg, #0c2722, #151817 32%, #131615); }
.pdb__panel[data-family="covenant"] .pdb-side__head { gap: .16rem; }
.pdb__panel[data-family="covenant"] .pdb-side__head::before { background: linear-gradient(180deg, rgba(42, 158, 127, .32), transparent 85%); mix-blend-mode: normal; }
.pdb-side__glow { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: .55; pointer-events: none;
  -webkit-mask: linear-gradient(180deg, #000 40%, transparent 100%); mask: linear-gradient(180deg, #000 40%, transparent 100%); }
.pdb-side__emblem { position: relative; flex: none; display: grid; place-items: center; width: max(.9rem, 32px); height: max(.9rem, 32px); color: #e9f3ef; }
.pdb-side__emblem img, .pdb-side__emblem .icon { width: 100%; height: 100%; object-fit: contain; }
.pdb-side__titles { position: relative; min-width: 0; display: flex; flex-direction: column; gap: .02rem; }
.pdb__panel[data-family="covenant"] .pdb-side__title { color: #f2f5f4; letter-spacing: .06em; }
.pdb-side__title em { font-style: normal; color: #5df0c6; }
.pdb-side__ver { font-size: max(calc(.18 * var(--t)), 11px); letter-spacing: .06em; color: rgba(233, 243, 239, .62); }
.pdb-side__foot { flex: none; margin-top: auto; padding: .12rem .3rem .14rem; font-family: var(--font-display); font-size: max(calc(.12 * var(--t)), 9px); letter-spacing: .14em; color: rgba(255, 255, 255, .14); }
.pdb-tabs { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .3rem; padding: .3rem .3rem .2rem; scrollbar-width: none; }
.pdb-tabs::-webkit-scrollbar { display: none; }
.pdb-tab {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .14rem;
  min-height: max(.9rem, 32px, calc(52px * var(--sp-ui, 1)));
  padding: .06rem .4rem;
  font: inherit;
  font-size: max(calc(.27 * var(--t)), 14px);
  font-weight: 700;
  letter-spacing: .04em;
  color: #e9edec;
  cursor: var(--sp-cursor-pointer, pointer);
  background: linear-gradient(90deg, #1b1f1e, #3b4140);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3);
}
.pdb-tab:hover:not(.is-on) { border-color: rgba(255, 255, 255, .34); }
.pdb-tab:focus-visible { outline: 2px solid var(--pdb-teal); outline-offset: 2px; }
.pdb-tab.is-on { color: var(--pdb-teal); background: linear-gradient(90deg, rgba(34, 211, 166, .08), rgba(34, 211, 166, .26)); border-color: var(--pdb-teal); box-shadow: inset 0 0 .18rem rgba(34, 211, 166, .28); }
.pdb-tab__name { min-width: 0; overflow-wrap: anywhere; }
.pdb-tab__brk { display: none; font-weight: 300; font-size: 1.3em; line-height: 1; }
.pdb-tab.is-on .pdb-tab__brk { display: inline; }
.pdb-tab__arrow { display: none; position: absolute; left: .14rem; top: 50%; width: 0; height: 0; margin-top: -.07rem; border-left: .1rem solid var(--pdb-teal); border-top: .07rem solid transparent; border-bottom: .07rem solid transparent; }
.pdb-tab.is-on .pdb-tab__arrow { display: block; }
.pdb-tab__dots { position: absolute; right: .08rem; top: .07rem; width: .26rem; height: .1rem; opacity: .7;
  background: radial-gradient(circle, rgba(255, 255, 255, .5) 1px, transparent 1.6px) 0 0 / .065rem .05rem; }
/* 更新日志's timeline: a rule with a square per entry (white on the open one) */
.pdb-tabs--log { gap: .22rem; padding-left: .56rem; }
.pdb-tl { position: absolute; left: .3rem; top: .26rem; bottom: .2rem; width: 2px; background: rgba(255, 255, 255, .22); }
.pdb-tab--log { justify-content: flex-start; gap: .1rem; padding: .08rem .2rem .08rem .34rem; text-align: left; }
.pdb-tab--log .pdb-tab__arrow { left: .1rem; }
.pdb-tab__dot { position: absolute; left: -.31rem; top: 50%; width: .1rem; height: .1rem; margin-top: -.05rem; background: rgba(255, 255, 255, .4); }
.pdb-tab--log.is-on .pdb-tab__dot { left: -.35rem; width: .18rem; height: .18rem; margin-top: -.09rem; background: #f0f2f1; }
.pdb-tab__glyph { flex: none; display: grid; place-items: center; width: .46rem; height: .46rem; color: #151817; background: #cfd4d2; border-radius: 4px; }
.pdb-tab--log.is-on .pdb-tab__glyph { background: var(--pdb-teal); }
.pdb-tab__glyph .icon, .pdb-cyc { width: 66%; height: 66%; }
.pdb-cyc { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pdb-tab__text { min-width: 0; display: flex; flex-direction: column; line-height: 1.12; }
.pdb-tab__date { font-size: max(calc(.17 * var(--t)), 11px); font-weight: 600; letter-spacing: .02em; opacity: .85; }
/* the article */
.pdb-main { position: relative; min-width: 0; min-height: 0; display: flex; }
.pdb-article { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: .62rem 1.5rem .9rem .72rem;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.pdb-article:focus-visible { outline: 2px solid var(--pdb-teal); outline-offset: -3px; }
.pdb-h { display: flex; align-items: baseline; gap: .12rem; margin: .56rem 0 .2rem; font-size: max(calc(.3 * var(--t)), 15px); font-weight: 700; letter-spacing: .04em; line-height: 1.3; color: var(--pdb-teal); }
.pdb-h:first-child { margin-top: 0; }
.pdb-h > i { font-style: normal; font-size: .7em; }
.pdb-pic { margin: .06rem 0 .22rem; width: min(8rem, 100%); aspect-ratio: 16 / 9; background: #0b0d0d; box-shadow: 0 .04rem .16rem rgba(0, 0, 0, .45); }
/* the 玩法说明 pages are stored squashed to 1024²: shown stretched back to 16:9, as in the viewer */
.pdb-pic img { display: block; width: 100%; height: 100%; object-fit: fill; }
.pdb-p, .pdb-ul li { margin: 0 0 .18rem; font-size: max(calc(.225 * var(--t)), 13px); line-height: 1.72; color: var(--pdb-text); }
.pdb-p--note { text-decoration: underline; text-underline-offset: .18em; text-decoration-color: rgba(221, 226, 225, .6); }
.pdb-ul { margin: 0 0 .18rem; padding-left: .36rem; }
.pdb-ul li { margin-bottom: .06rem; }
.pdb-src { margin: .5rem 0 0; font-size: max(calc(.15 * var(--t)), 11px); line-height: 1.5; color: rgba(221, 226, 225, .48); }
.pdb-wait { margin: 1rem 0; text-align: center; font-size: max(calc(.22 * var(--t)), 13px); color: var(--pdb-text); }
/* × on the top right corner and the capsule on the bottom edge */
.pdb-close {
  position: absolute;
  z-index: 2;
  top: calc(var(--pdb-top) - .26rem);
  right: calc(var(--pdb-x) - .26rem);
  display: grid;
  place-items: center;
  width: max(.52rem, 32px, calc(44px * var(--sp-ui, 1)));
  height: max(.52rem, 32px, calc(44px * var(--sp-ui, 1)));
  padding: 0;
  color: #f2f4f3;
  cursor: var(--sp-cursor-pointer, pointer);
  background: rgba(28, 32, 31, .9);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .35);
}
.pdb-close:hover { color: var(--pdb-teal); border-color: var(--pdb-teal); }
.pdb-close:focus-visible { outline: 2px solid var(--pdb-teal); outline-offset: 2px; }
.pdb-close .icon { width: 56%; height: 56%; }
.pdb-switch {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: calc(var(--pdb-bottom) - .38rem);
  display: flex;
  gap: .06rem;
  padding: .06rem;
  transform: translateX(-50%);
  background: rgba(17, 19, 19, .96);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  box-shadow: 0 .06rem .24rem rgba(0, 0, 0, .6);
}
.pdb-switch__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .1rem;
  min-width: max(2.7rem, 32px, calc(132px * var(--sp-ui, 1)));
  height: max(.64rem, 32px, calc(44px * var(--sp-ui, 1)));
  padding: 0 .3rem;
  font: inherit;
  font-size: max(calc(.28 * var(--t)), 14px);
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
  color: #eceeed;
  cursor: var(--sp-cursor-pointer, pointer);
  background: none;
  border: 0;
  border-radius: 999px;
}
.pdb-switch__btn:hover:not(.is-on) { background: rgba(255, 255, 255, .08); }
.pdb-switch__btn:focus-visible { outline: 2px solid var(--pdb-teal); outline-offset: 1px; }
.pdb-switch__btn.is-on { color: #141716; background: #ece9e2; }
.pdb-switch__btn .icon, .pdb-switch__btn .pdb-sq { width: max(.26rem, 15px); height: max(.26rem, 15px); }
.pdb-sq { fill: currentColor; }
/* ---- 更新日志 ---- */
.pdb-home { position: relative; width: min(12rem, 100%); aspect-ratio: 1200 / 660; margin: 0 auto; overflow: hidden; background: #1b0907; box-shadow: 0 .04rem .2rem rgba(0, 0, 0, .5); }
.pdb-home__art { position: absolute; inset: 0; }
/* the lobby ground in a frame: its sun stands still and fits the frame (no 170vmax layer turning in a window) */
.pdb-home .hub-reg__rays { width: 170%; height: 300%; animation: none; }
.pdb-home .hub-reg__skyline { width: 104%; }
.pdb-home__logo { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .04rem; padding-bottom: 6%; }
.pdb-home__fist { width: 13%; height: auto; filter: drop-shadow(0 0 .14rem rgba(255, 91, 65, .5)); }
.pdb-home__word { width: 34%; height: auto; mix-blend-mode: screen; }
.pdb-home__wordtext { font-family: var(--font-display); font-size: max(calc(.34 * var(--t)), 16px); font-weight: 900; letter-spacing: .18em; color: #ff6a4d; }
.pdb-home__lockup { width: 30%; height: auto; filter: drop-shadow(0 .03rem .14rem rgba(0, 0, 0, .9)); }
.pdb-home__title { font-size: max(calc(.32 * var(--t)), 15px); letter-spacing: .1em; color: #efe5c8; }
.pdb-log { display: flex; flex-direction: column; gap: .3rem; }
.pdb-sec { display: flex; flex-direction: column; gap: .24rem; padding-bottom: .3rem; }
.pdb-sec__head { display: flex; align-items: center; gap: .26rem; min-height: max(.9rem, 32px, calc(56px * var(--sp-ui, 1))); padding: .06rem 1.9rem .06rem .1rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03) 60%, transparent); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.pdb-sec__icon { flex: none; display: grid; place-items: center; width: .74rem; height: .74rem; color: #f1f3f2;
  background:
    linear-gradient(rgba(255, 255, 255, .6), rgba(255, 255, 255, .6)) left top / .14rem 2px no-repeat,
    linear-gradient(rgba(255, 255, 255, .6), rgba(255, 255, 255, .6)) left top / 2px .14rem no-repeat,
    linear-gradient(rgba(255, 255, 255, .6), rgba(255, 255, 255, .6)) right bottom / .14rem 2px no-repeat,
    linear-gradient(rgba(255, 255, 255, .6), rgba(255, 255, 255, .6)) right bottom / 2px .14rem no-repeat,
    rgba(0, 0, 0, .25); }
.pdb-sec__icon .icon { width: 56%; height: 56%; }
.pdb-sec__name { flex: 1 1 auto; min-width: 0; margin: 0; font-size: max(calc(.36 * var(--t)), 17px); font-weight: 800; letter-spacing: .06em; color: #f3f5f4; }
.pdb-sec__mark { flex: none; font-family: var(--font-display); font-size: max(calc(.1 * var(--t)), 8px); line-height: 1.2; letter-spacing: .1em; text-align: right; color: rgba(255, 255, 255, .26); }
/* 新增 / 轮替: a teal or grey key cell, then the faces */
.pdb-sum { display: flex; flex-direction: column; border: 2px solid rgba(34, 211, 166, .6); background: rgba(14, 17, 16, .7); }
.pdb-sum__row { display: grid; grid-template-columns: 1.3rem minmax(0, 1fr); min-height: max(1.5rem, 32px, calc(90px * var(--sp-ui, 1))); }
.pdb-sum__row + .pdb-sum__row { border-top: 2px solid rgba(255, 255, 255, .12); }
.pdb-sum__k { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .06rem; padding: .1rem .12rem; text-align: center; overflow-wrap: break-word; font-size: max(calc(.28 * var(--t)), 14px); font-weight: 900; letter-spacing: .06em; }
.pdb-sum__k > i { display: grid; place-items: center; width: .26rem; height: .26rem; font-style: normal; font-size: .8em; line-height: 1; border-radius: 3px; }
.pdb-sum__row.is-new .pdb-sum__k { color: #0f1413; background: var(--pdb-teal); }
.pdb-sum__row.is-new .pdb-sum__k > i { color: var(--pdb-teal); background: #0f1413; }
.pdb-sum__row.is-out .pdb-sum__k { color: #eef0ef; background: linear-gradient(180deg, #4a4f4e, #383c3b); }
.pdb-sum__row.is-out .pdb-sum__k > i { color: #3e4342; background: #eef0ef; }
.pdb-sum__grid { display: flex; flex-wrap: wrap; align-content: center; gap: .18rem .22rem; padding: .16rem .24rem; }
.pdb-chip { display: flex; flex-direction: column; align-items: center; gap: .06rem; min-width: max(1.1rem, 32px, calc(66px * var(--sp-ui, 1))); max-width: 2.4rem; }
.pdb-chip--type, .pdb-chip--boss { min-width: max(1.5rem, 32px, calc(90px * var(--sp-ui, 1))); }
.pdb-chip__pic { position: relative; display: grid; place-items: center; width: .74rem; height: .74rem; overflow: hidden; background: #0b0e0d; border: 2px solid rgba(34, 211, 166, .75); }
.pdb-chip--bond .pdb-chip__pic { border-radius: 50%; background: radial-gradient(circle, #1f8f73, #0f3d33 70%); box-shadow: 0 0 .1rem rgba(34, 211, 166, .55); }
.pdb-chip__pic img { width: 100%; height: 100%; object-fit: cover; }
.pdb-chip--bond .pdb-chip__pic img { width: 78%; height: 78%; object-fit: contain; }
.pdb-chip--type .pdb-chip__pic img { width: 76%; height: 76%; object-fit: contain; }
.pdb-chip__txt, .pdb-card__txt, .pdb-op__txt { font-weight: 900; color: rgba(255, 255, 255, .7); }
.pdb-chip__name { max-width: 100%; font-size: max(calc(.17 * var(--t)), 11px); line-height: 1.2; text-align: center; color: #d9dedd; overflow-wrap: break-word; }
.pdb-chip.is-out .pdb-chip__pic { border-color: rgba(255, 255, 255, .3); background: #222625; box-shadow: none; }
.pdb-chip.is-out .pdb-chip__pic img { filter: grayscale(1) brightness(.75); }
.pdb-chip.is-out .pdb-chip__pic::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(45deg, transparent calc(50% - 1px), rgba(255, 255, 255, .55) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)); }
.pdb-chip.is-out .pdb-chip__name { color: rgba(217, 222, 221, .7); }
.pdb-group { display: flex; flex-direction: column; gap: .3rem; }
.pdb-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: .1rem; margin: .06rem 0 0; padding: .06rem .3rem .06rem .16rem; font-size: max(calc(.24 * var(--t)), 13px); font-weight: 700; color: #eef1f0;
  background: rgba(44, 50, 49, .92); border-radius: 999px; }
.pdb-pill .pdb-sq { width: max(.24rem, 14px); height: max(.24rem, 14px); }
/* a card: the framed face at the left, the lines at the right */
.pdb-card { display: grid; grid-template-columns: minmax(1.5rem, 1.9rem) minmax(0, 1fr); gap: .16rem .36rem; align-items: start; }
.pdb-card__face { display: flex; flex-direction: column; align-items: center; gap: .08rem; padding-top: .04rem; }
.pdb-card__pic { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; max-width: 1.8rem; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, rgba(34, 211, 166, .22), rgba(10, 14, 13, .95) 70%); border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 .03rem .12rem rgba(0, 0, 0, .5); }
.pdb-card__pic img { width: 100%; height: 100%; object-fit: cover; }
.pdb-card--bond .pdb-card__pic img { width: 62%; height: 62%; object-fit: contain; filter: drop-shadow(0 0 .08rem rgba(34, 211, 166, .7)); }
.pdb-card--type .pdb-card__pic img { width: 60%; height: 60%; object-fit: contain; }
.pdb-card--band .pdb-card__pic img { filter: saturate(.75) sepia(.2) hue-rotate(110deg); }
.pdb-card--boss .pdb-card__pic { border: 3px solid var(--pdb-teal); }
.pdb-card__c { position: absolute; inset: 4px; pointer-events: none; z-index: 1;
  background:
    linear-gradient(rgba(255, 255, 255, .45), rgba(255, 255, 255, .45)) left top / .12rem 1px no-repeat,
    linear-gradient(rgba(255, 255, 255, .45), rgba(255, 255, 255, .45)) left top / 1px .12rem no-repeat,
    linear-gradient(rgba(255, 255, 255, .45), rgba(255, 255, 255, .45)) right bottom / .12rem 1px no-repeat,
    linear-gradient(rgba(255, 255, 255, .45), rgba(255, 255, 255, .45)) right bottom / 1px .12rem no-repeat; }
.pdb-card__name { max-width: 100%; font-size: max(calc(.24 * var(--t)), 13px); font-weight: 700; text-align: center; color: #eef1f0; overflow-wrap: anywhere; }
.pdb-card__body { min-width: 0; display: flex; flex-direction: column; gap: .14rem; }
.pdb-lines { margin: 0; padding: 0; list-style: none; }
.pdb-lines li { position: relative; margin: 0 0 .06rem; padding-left: .3rem; font-size: max(calc(.21 * var(--t)), 12px); line-height: 1.65; color: var(--pdb-text); }
.pdb-lines li::before { content: ''; position: absolute; left: .04rem; top: .55em; width: .1rem; height: .1rem; background: var(--pdb-teal); }
.pdb-lines li.is-title { margin-top: .08rem; font-weight: 800; color: var(--pdb-teal); }
.pdb-lines li.is-title::before { background: #eef1f0; }
/* a bond's members, tier I first, in a bracket */
.pdb-ops { display: flex; flex-wrap: wrap; gap: .1rem; padding: .14rem .2rem; border-left: 2px solid rgba(255, 255, 255, .3); border-right: 2px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .04); }
.pdb-op { position: relative; display: grid; place-items: center; width: max(.84rem, 32px, calc(50px * var(--sp-ui, 1))); height: max(.84rem, 32px, calc(50px * var(--sp-ui, 1))); overflow: hidden; background: #2a201a; border: 2px solid #e98a2c; }
.pdb-op img { width: 100%; height: 100%; object-fit: cover; }
.pdb-op__tier { position: absolute; left: 1px; bottom: 1px; min-width: .24rem; padding: 0 .03rem; font-family: var(--font-display); font-size: max(calc(.13 * var(--t)), 9px); font-weight: 900; line-height: 1.25; text-align: center; color: #0f1312; background: #e9eceb; border-radius: 2px; }
.pdb-op--t1 .pdb-op__tier, .pdb-op--t2 .pdb-op__tier, .pdb-op--t3 .pdb-op__tier { background: #9fe6cf; }
.pdb-op--t4 .pdb-op__tier { background: #8ec9ff; }
.pdb-op--t5 .pdb-op__tier { background: #f5d36b; }
.pdb-op--t6 .pdb-op__tier { background: #ff9d57; }
/* 调整 1.0.1 (第三期下半): the change marks of its lists (PRTS's: + in a box, − in an outlined box, a pen, a half disc) */
.pdb-mk { flex: none; display: block; width: max(.24rem, 14px); height: max(.24rem, 14px); }
.pdb-mk__fill { fill: currentColor; }
.pdb-mk__line { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
/* the cut-outs in the ground they stand on (the pill's, the table head's) */
.pdb-mk__cut { fill: none; stroke: #2c3231; stroke-width: 2.2; stroke-linecap: round; }
.pdb-mk__ink { fill: #2c3231; }
.pdb-mk--add, .pdb-mk--more { color: var(--pdb-teal); }
.pdb-mk--out, .pdb-mk--remove { color: #d9dedd; }
.pdb-mk--adjust { color: #f0c36a; }
.pdb-mk--change { color: #8ec9ff; }
/* what changed: ↗ up in the window's teal, ↘ down in amber, ⇒ replaced in blue */
.pdb-arw { padding: 0 .03em; font-weight: 900; }
.pdb-arw--up { color: #2ee6b0; }
.pdb-arw--down { color: #ff9d57; }
.pdb-arw--to { color: #8ec9ff; }
/* a card's changes: a teal-ruled block leading its lines, each condition in teal over its lines */
.pdb-chg { display: flex; flex-direction: column; gap: .08rem; padding: .08rem .16rem .1rem; background: rgba(34, 211, 166, .06); border-left: 3px solid var(--pdb-teal); }
.pdb-chg__head { margin: 0; font-size: max(calc(.2 * var(--t)), 12px); font-weight: 800; line-height: 1.5; color: var(--pdb-teal); overflow-wrap: anywhere; }
.pdb-chg__lines { margin: 0; padding: 0; list-style: none; }
.pdb-chg__lines li { position: relative; padding-left: .22rem; font-size: max(calc(.21 * var(--t)), 12px); line-height: 1.6; color: #eef1f0; overflow-wrap: anywhere; }
.pdb-chg__lines li::before { content: ''; position: absolute; left: .03rem; top: .8em; width: .1rem; height: 2px; background: rgba(238, 241, 240, .55); }
/* rows: the face (avatar or icon with its tier), the name with its 盟约 tags, then the lines */
.pdb-rows { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .1rem; }
.pdb-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .08rem .2rem; padding: .1rem .16rem .12rem .12rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015) 70%, transparent); border-left: 2px solid rgba(34, 211, 166, .45); }
.pdb-row__body { min-width: 0; display: flex; flex-direction: column; gap: .03rem; }
.pdb-row__head { display: flex; flex-wrap: wrap; align-items: center; gap: .05rem .14rem; margin: 0; min-height: max(.4rem, 20px); }
.pdb-row__name { font-size: max(calc(.23 * var(--t)), 13px); font-weight: 800; letter-spacing: .03em; color: #eef1f0; }
.pdb-row__text { margin: 0; font-size: max(calc(.21 * var(--t)), 12px); line-height: 1.6; color: var(--pdb-text); overflow-wrap: anywhere; }
.pdb-row__text.is-chg { color: #eef1f0; }
.pdb-elite { display: inline-block; margin-right: .08rem; padding: 0 .06rem; font-size: .82em; font-weight: 800; line-height: 1.45; color: #1a1408; background: #f0c36a; border-radius: 2px; }
.pdb-row.is-out { border-left-color: rgba(255, 255, 255, .25); }
.pdb-row.is-out .pdb-op { border-color: rgba(255, 255, 255, .3); background: #222625; }
.pdb-row.is-out .pdb-op img { filter: grayscale(1) brightness(.75); }
.pdb-row.is-out .pdb-op::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(45deg, transparent calc(50% - 1px), rgba(255, 255, 255, .55) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)); }
.pdb-row.is-out .pdb-row__name { color: rgba(217, 222, 221, .7); }
.pdb-op--item, .pdb-op--enemy { border-color: rgba(255, 255, 255, .4); background: radial-gradient(circle at 50% 45%, rgba(34, 211, 166, .18), #121615 72%); }
.pdb-op--item img, .pdb-op--enemy img { object-fit: contain; }
.pdb-tags { display: inline-flex; flex-wrap: wrap; gap: .04rem; }
.pdb-tag { padding: 0 .07rem; font-size: max(calc(.16 * var(--t)), 11px); font-weight: 700; line-height: 1.5; white-space: nowrap; color: #bff3e2;
  background: rgba(34, 211, 166, .12); border: 1px solid rgba(34, 211, 166, .45); border-radius: 2px; }
/* the 盟约调整 table: 等阶 | 干员 | joined | left */
.pdb-tbl-box { max-width: 100%; overflow-x: auto; }
.pdb-tbl { width: 100%; border-collapse: collapse; font-size: max(calc(.21 * var(--t)), 12px); color: var(--pdb-text); }
.pdb-tbl th { padding: .06rem .12rem; font-weight: 800; text-align: left; white-space: nowrap; color: #eef1f0; background: #2c3231; border-bottom: 2px solid rgba(34, 211, 166, .6); }
.pdb-tbl td { padding: .05rem .12rem; vertical-align: middle; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.pdb-tbl tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .025); }
.pdb-tbl__tier { width: 1%; white-space: nowrap; text-align: center; font-family: var(--font-display); font-weight: 900; color: #eef1f0; }
.pdb-tbl__who { display: inline-flex; align-items: center; gap: .1rem; font-weight: 700; color: #eef1f0; }
.pdb-tbl .pdb-op { width: max(.56rem, 28px); height: max(.56rem, 28px); border-width: 1px; }
.pdb-tbl__none { color: rgba(221, 226, 225, .4); }
.pdb-pill--mark { gap: .08rem; padding-left: .12rem; }
/* 快速前往 (top right of the article) and ↑ (bottom right) */
.pdb-jump { position: absolute; z-index: 1; top: .5rem; right: -.2rem; display: flex; flex-direction: column; align-items: flex-end; gap: .06rem; }
.pdb-jump__btn { display: inline-flex; align-items: center; gap: .08rem; height: max(.5rem, 32px, calc(40px * var(--sp-ui, 1))); padding: 0 .2rem 0 .14rem; font: inherit; font-size: max(calc(.26 * var(--t)), 13px); font-weight: 800; letter-spacing: .04em; color: #0f1413;
  cursor: var(--sp-cursor-pointer, pointer); background: var(--pdb-teal); border: 0; box-shadow: 0 .03rem .12rem rgba(0, 0, 0, .5); }
.pdb-jump__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pdb-jump__btn .pdb-sq { width: max(.26rem, 15px); height: max(.26rem, 15px); padding: 2px; color: var(--pdb-teal); background: #0f1413; }
.pdb-jump__list { margin: 0; padding: .06rem; min-width: 2.4rem; max-height: 4.6rem; overflow-y: auto; list-style: none; background: rgba(15, 18, 17, .97); border: 1px solid rgba(34, 211, 166, .5); box-shadow: 0 .06rem .2rem rgba(0, 0, 0, .6); }
.pdb-jump__item { display: block; width: 100%; min-height: 32px; padding: .04rem .16rem; font: inherit; font-size: max(calc(.21 * var(--t)), 13px); font-weight: 700; text-align: left; color: #eef1f0; cursor: var(--sp-cursor-pointer, pointer); background: none; border: 0; }
.pdb-jump__item.is-sub { padding-left: .36rem; font-weight: 500; color: #cfd5d3; }
.pdb-jump__item:hover, .pdb-jump__item:focus-visible { color: #0f1413; background: var(--pdb-teal); outline: none; }
.pdb-up { position: absolute; z-index: 1; right: .22rem; bottom: .3rem; display: grid; place-items: center; width: max(.6rem, 32px, calc(44px * var(--sp-ui, 1))); height: max(.6rem, 32px, calc(44px * var(--sp-ui, 1))); padding: 0; color: #f2f4f3; cursor: var(--sp-cursor-pointer, pointer);
  background:
    linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, .5)) left top / .1rem 1px no-repeat,
    linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, .5)) left top / 1px .1rem no-repeat,
    linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, .5)) right bottom / .1rem 1px no-repeat,
    linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, .5)) right bottom / 1px .1rem no-repeat,
    rgba(20, 23, 22, .75);
  border: 0; }
.pdb-up:hover { color: var(--pdb-teal); }
.pdb-up:focus-visible { outline: 2px solid var(--pdb-teal); outline-offset: 2px; }
.pdb-up__svg { width: 70%; height: 70%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* phones in landscape: the panel takes the screen, the capsule stays on its edge */
@media (max-height: 520px) {
  .pdb { --pdb-top: calc(var(--sa-t, 0px) + 7%); --pdb-bottom: calc(var(--sa-b, 0px) + 13%); --pdb-x: calc(max(var(--sa-l, 0px), var(--sa-r, 0px)) + 2.4%); }
  .pdb__panel { grid-template-columns: minmax(0, 27%) minmax(0, 1fr); }
  .pdb-side__head { min-height: 0; padding: .12rem .18rem .16rem; }
  .pdb-tabs { gap: .14rem; padding: .14rem .16rem; }
  .pdb-tab { min-height: 32px; padding: .04rem .3rem; font-size: max(calc(.22 * var(--t)), 13px); }
  .pdb-tabs--log { padding-left: .44rem; }
  .pdb-side__foot { display: none; }
  .pdb-article { padding: .26rem .5rem .9rem .32rem; }
  .pdb-sec__mark { display: none; }
  .pdb-h { margin-top: .32rem; }
  .pdb-close { top: calc(var(--pdb-top) - .16rem); right: calc(var(--pdb-x) - .1rem); }
  .pdb-switch { bottom: calc(var(--pdb-bottom) - .34rem); }
  .pdb-switch__btn { min-width: max(2rem, 32px, calc(104px * var(--sp-ui, 1))); padding: 0 .2rem; font-size: max(calc(.22 * var(--t)), 13px); }
  .pdb-card { grid-template-columns: minmax(1.1rem, 1.4rem) minmax(0, 1fr); gap: .1rem .2rem; }
  .pdb-sum__row { grid-template-columns: 1.3rem minmax(0, 1fr); }
  .pdb-sum__k { padding: .08rem .06rem; }
  .pdb-sec__head { padding-right: .24rem; }
  /* under the corner's ×, which a phone's short top margin brings down to the panel's edge */
  .pdb-jump { top: calc(.2rem + 32px); right: 0; }
  .pdb-jump__list { max-height: min(4.6rem, 52vh); }
}
/* narrow windows (a phone held upright): the tabs above the article */
@media (max-aspect-ratio: 1/1) {
  .pdb__panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .pdb-side { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .pdb-side__foot { display: none; }
  .pdb-tabs { flex-direction: row; flex-wrap: wrap; gap: .1rem; padding: .1rem .16rem .14rem; }
  .pdb-tab { flex: 1 1 auto; }
  .pdb-tabs--log { padding-left: .16rem; }
  .pdb-tl, .pdb-tab__dot { display: none; }
  .pdb-card { grid-template-columns: minmax(0, 1fr); }
  .pdb-card__face { flex-direction: row; justify-content: flex-start; }
  .pdb-card__pic { width: 1.2rem; }
  /* the log's section heads keep their names on a line (they broke after every character): no mark, room on the right
     only where 快速前往 floats over the first head; the article's sides as on a phone held sideways */
  .pdb__panel[data-view="log"] .pdb-article { padding-right: .5rem; padding-left: .32rem; }
  .pdb-sec__mark { display: none; }
  .pdb-sec__head { padding-right: .24rem; }
  .pdb-log > .pdb-sec:first-child > .pdb-sec__head { padding-right: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-db { transition: none; }
}
