/* 全局文字统一增加 2px；仅覆盖字号，不改变颜色、间距、结构或功能。 */
:root { --top-height: 136px; }
body { font-size: 18px; }
body::before { font-size: clamp(20px, 1.8vw, 36px); }

.topbar {
  top: 10px;
  width: calc(100% - 28px);
  height: 124px;
  margin: 2px 14px 10px;
  padding: 0 36px;
  grid-template-columns: minmax(0, 79%) 0 minmax(0, 21%);
  gap: 0;
  border: 1px solid rgba(91, 142, 194, .28);
  border-radius: 22px;
  background: linear-gradient(145deg, #0d1c2f 0%, #07111e 58%, #030914 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(118, 176, 235, .18);
}
.topbar::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 auto 0 0;
  width: 79%;
  background:
    linear-gradient(155deg, rgba(101, 164, 255, .28) 0%, transparent 38%),
    linear-gradient(145deg, #2d74e7 0%, #225fc1 52%, #17479c 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 145px) 100%, 0 100%);
  border-radius: 21px 0 0 21px;
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), inset 0 -16px 28px rgba(4, 35, 96, .2), 10px 0 22px rgba(0, 0, 0, .25);
  pointer-events: none;
}
.brand-block {
  position: relative;
  top: 10px;
  z-index: 1;
  grid-column: 1;
  grid-template-columns: 80px max-content;
  grid-template-rows: auto auto;
  align-items: center;
  justify-content: start;
  justify-self: stretch;
  width: auto;
  height: 100px;
  margin-left: 48px;
  column-gap: 28px;
  row-gap: 5px;
  padding: 6px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.brand-block::after {
  display: none;
}
.brand-block::before { display: none; }
.brand-mark {
  display: grid;
  grid-column: 1;
  grid-row: 1 / 3;
  place-items: center;
  width: 80px;
  height: 80px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 13px;
  overflow: hidden;
  color: #1769ff;
  background: #000;
  box-shadow: 0 6px 14px rgba(0, 23, 70, .2), inset 0 1px 0 #fff, inset 0 -1px 2px rgba(34, 91, 154, .12);
}
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.brand-block h1 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin: 0;
  color: #fff;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 7px rgba(0, 20, 60, .24);
}
.brand-block h1 span {
  font-size: 44px;
  letter-spacing: 1px;
}
.brand-block h1 strong {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: .8px;
}
.brand-block p {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  justify-self: start;
  margin: 0;
  color: rgba(225, 239, 255, .8);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 2px;
}
.top-center { display: none; }
.top-actions {
  position: relative;
  z-index: 1;
  grid-column: 3;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: 38px 40px;
  gap: 8px;
  height: 86px;
  align-self: center;
  padding-left: 36px;
}
.top-actions #open-treasury { grid-column: 1; grid-row: 1; }
.top-actions #open-library { grid-column: 2; grid-row: 1; }
.top-actions #reset-all { grid-column: 3; grid-row: 1; }
.top-actions .config-menu-wrap { grid-column: 1 / 4; grid-row: 2; }
.top-actions > .ghost-button,
.top-actions .config-menu-wrap > .ghost-button {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.top-actions > .ghost-button {
  border-color: #31577d;
  background: linear-gradient(180deg, #16283b 0%, #0b1725 100%);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(126, 184, 238, .16), 0 6px 14px rgba(0, 0, 0, .24);
}
.top-actions .config-menu-wrap > .ghost-button {
  border-color: #3c8cff;
  background: linear-gradient(180deg, #2d7cff 0%, #1559ce 100%);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 8px 18px rgba(13, 79, 184, .34);
}
.top-actions .config-menu-wrap > .ghost-button { width: 100%; height: 100%; }
.notice { display: none; font-size: 14px; }
.tab-button { font-size: 14px; }
.layer-tabs .tab-button { visibility: hidden; }
.top-actions .ghost-button { font-size: 13px; padding-inline: 8px; }

.layer-rail::before { font-size: 15px; }
.layer-rail-button i { font-size: 15px; }
.layer-rail-button span { font-size: 16px; }
.layer-kicker { font-size: 10px; }
.layer-title { font-size: clamp(36px, 3.4vw, 56px); }
.layer-description { font-size: 15px; }
.group-label { font-size: 15px; }
.custom-button { font-size: 12px; }
.option-button { font-size: 13px; }
.group-hint { font-size: 14px; }
.group-action { font-size: 15px; }

.output-mode-tabs button { font-size: 16px; }
.output-heading small { font-size: 11px; }
.output-heading h2 { font-size: 24px; }
.output-heading em { font-size: 13px; }
.copy-button { font-size: 15px; }
.output-content { font-size: 14px; }
.footer-note { font-size: 15px; }
.scroll-rail button { font-size: 32px; }

.activation-mark { font-size: 24px; }
.activation-card h1 { font-size: 34px; }
.icon-button { font-size: 30px; }
.collection-toolbar h2 { font-size: 24px; }
.collection-close { font-size: 32px; }
.favorite-card-heading strong { font-size: 17px; }
.favorite-card-heading small,
.favorite-tag,
.treasury-card-heading span { font-size: 13px; }
.collection-drawer .favorite-action,
.treasury-actions .favorite-action { font-size: 14px; }
.treasury-toolbar h2 { font-size: 27px; }
.treasury-card p { font-size: 14px; }
.code-editor { font-size: 15px; }
#created-license { font-size: 14px; }

@media (max-width: 1450px) {
  .topbar {
    padding-inline: 26px;
    grid-template-columns: minmax(0, 79%) 0 minmax(0, 21%);
  }
  .brand-block {
    grid-template-columns: 72px max-content;
    width: auto;
    margin-left: 34px;
    column-gap: 24px;
    padding-inline: 22px;
  }
  .brand-mark { width: 72px; height: 72px; }
  .brand-block h1 span { font-size: 40px; }
  .brand-block h1 strong { font-size: 40px; }
  .brand-block p { font-size: 14px; }
  .tab-button { font-size: 13px; }
  .top-actions .ghost-button { font-size: 12px; padding-inline: 5px; }
}

@media (max-width: 1180px) {
  .topbar { padding-inline: 20px; grid-template-columns: minmax(0, 76%) 0 minmax(0, 24%); }
  .brand-block {
    grid-template-columns: 62px max-content;
    width: auto;
    margin-left: 22px;
    column-gap: 18px;
    padding-inline: 16px;
  }
  .brand-mark { width: 62px; height: 62px; }
  .brand-block h1 span { font-size: 34px; }
  .brand-block h1 strong { font-size: 34px; }
  .top-actions { padding-left: 30px; }
}
