:root {
  --momo-navy: #1f2d4d;
  --momo-navy-deep: #14223c;
  --momo-blue: #2f64c8;
  --momo-steel: #3e5c7a;
  --momo-sky: #a8c6e8;
  --momo-cream: #f2e6d3;
  --momo-gold: #d4a85a;
  --momo-brown: #8b6b4f;
  --momo-bg: #f4f7fb;
  --momo-text: #18233a;
  --momo-muted: #6f7d91;
  --momo-line: #dce5ef;
  --momo-panel: #ffffff;
  --momo-shadow: 0 14px 34px rgba(31, 45, 77, 0.1);
}

html {
  background: var(--momo-bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  color: var(--momo-text);
  background:
    radial-gradient(circle at 92% 9%, rgba(168, 198, 232, 0.22), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #f7f1e8 62%, #eef6ff 100%);
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(47, 100, 200, 0.22);
  outline-offset: 2px;
}

.legacy-home {
  display: none !important;
}

.app-shell {
  display: block;
  min-height: 100vh;
}

.sidebar {
  height: 72px;
  min-height: 72px;
  padding: 0 clamp(18px, 3vw, 46px);
  background: rgba(31, 45, 77, 0.98);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 30px rgba(20, 34, 60, 0.18);
}

.brand {
  min-width: 218px;
}

.momo-sidebar-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: contain;
  padding: 3px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.brand strong {
  color: #fff;
  font-size: 17px;
  letter-spacing: 0;
}

.brand small {
  color: var(--momo-sky);
}

.nav-list {
  gap: 4px;
}

.nav-item {
  height: 72px;
  padding-inline: 15px;
  color: #b7c6d9;
  border-bottom-width: 3px;
  letter-spacing: 0;
}

.nav-item:hover {
  color: #fff;
  background: rgba(168, 198, 232, 0.08);
}

.nav-item.active {
  color: #fff;
  border-bottom-color: var(--momo-gold);
  background: rgba(168, 198, 232, 0.1);
}

.nav-item[data-view="submit"]::after,
.nav-item[data-view="aigc"]::after {
  color: var(--momo-navy);
  background: var(--momo-cream);
  box-shadow: none;
}

.main {
  min-height: calc(100vh - 72px);
  padding-bottom: 72px;
  background: transparent;
}

.view {
  width: min(100%, 1440px);
  margin-inline: auto;
}

#view-home {
  width: 100%;
  max-width: none;
}

.panel,
.report-item,
.upload-card,
.section-block,
.account-card,
.activity-card {
  border-color: var(--momo-line);
  box-shadow: var(--momo-shadow);
}

.eyebrow,
.momo-kicker {
  color: var(--momo-blue);
  font-weight: 800;
  letter-spacing: 0;
}

.primary-btn,
.submit-btn,
.recharge-confirm,
.login-primary,
.momo-primary-btn {
  color: #fff;
  background: linear-gradient(120deg, var(--momo-navy) 0%, var(--momo-blue) 100%);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(47, 100, 200, 0.2);
}

.primary-btn:hover,
.submit-btn:hover,
.recharge-confirm:hover,
.login-primary:hover,
.momo-primary-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.secondary-btn,
.momo-secondary-btn {
  color: var(--momo-navy);
  background: #fff;
  border-color: rgba(212, 168, 90, 0.68);
}

.segment.active,
.tab-btn.active,
.report-tab.active {
  color: var(--momo-navy);
  background: rgba(242, 230, 211, 0.7);
  border-color: var(--momo-gold);
}

.momo-home {
  display: grid;
  width: min(1320px, calc(100% - 48px));
  margin: 34px auto 0;
  gap: 24px;
}

.momo-home-hero,
.momo-home-panel,
.momo-promise {
  border: 1px solid rgba(220, 229, 239, 0.9);
  border-radius: 18px;
  box-shadow: var(--momo-shadow);
}

.momo-home-hero {
  position: relative;
  min-height: 550px;
  overflow: hidden;
  padding: 32px 38px 34px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 34%, rgba(168, 198, 232, 0.58) 0%, rgba(168, 198, 232, 0.12) 28%, transparent 48%),
    linear-gradient(128deg, #1f2d4d 0%, #263653 42%, #3e5c7a 74%, #f2e6d3 142%);
}

.momo-home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(126deg, transparent 0 32%, rgba(255, 255, 255, 0.045) 32.2% 43%, transparent 43.2%),
    radial-gradient(circle at 8% 90%, rgba(212, 168, 90, 0.15), transparent 25%);
}

.momo-hero-brand,
.momo-hero-content,
.momo-hero-footer {
  position: relative;
  z-index: 1;
}

.momo-hero-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.momo-logo-card {
  width: min(440px, 48%);
  padding: 9px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 26px rgba(20, 34, 60, 0.18);
}

.momo-logo-card img {
  display: block;
  width: 100%;
  height: 76px;
  object-fit: contain;
}

.momo-brand-chip {
  flex: 0 0 auto;
  padding: 10px 18px;
  color: var(--momo-brown);
  background: var(--momo-cream);
  border: 1px solid rgba(212, 168, 90, 0.38);
  border-radius: 999px;
  font-weight: 800;
}

.momo-hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 46%);
  align-items: center;
  gap: 32px;
  min-height: 285px;
}

.momo-hero-copy {
  padding-left: clamp(8px, 3vw, 42px);
}

.momo-hero-copy .momo-kicker {
  margin: 0 0 8px;
  color: #f0c86e;
  font-size: 14px;
}

.momo-hero-copy h2 {
  margin: 0;
  color: #fff;
  font-size: 58px;
  line-height: 1.06;
  letter-spacing: 0;
}

.momo-hero-copy > strong {
  display: block;
  margin-top: 14px;
  color: var(--momo-sky);
  font-size: 30px;
  line-height: 1.25;
}

.momo-hero-copy > p:last-child {
  max-width: 630px;
  margin: 18px 0 0;
  color: #dce8f5;
  font-size: 17px;
  line-height: 1.8;
}

.momo-hero-owl {
  justify-self: center;
  width: min(100%, 455px);
  max-height: 310px;
  object-fit: contain;
  filter: drop-shadow(0 18px 18px rgba(15, 29, 54, 0.22));
}

.momo-hero-footer {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 280px;
  align-items: stretch;
  gap: 18px;
}

.momo-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.momo-hero-metrics > div {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.momo-hero-metrics strong {
  color: #fff;
  font-size: 26px;
  line-height: 1.1;
}

.momo-hero-metrics span {
  margin-top: 7px;
  color: #c8d5e4;
  font-size: 13px;
}

.momo-primary-btn,
.momo-secondary-btn {
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.momo-hero-footer .momo-primary-btn {
  color: var(--momo-navy);
  background: linear-gradient(112deg, #fff 0%, var(--momo-cream) 100%);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 12px 26px rgba(20, 34, 60, 0.18);
}

.momo-home-panel {
  padding: 30px;
  background: rgba(255, 255, 255, 0.96);
}

.momo-section-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.momo-section-heading .momo-kicker {
  margin: 0 0 7px;
  font-size: 13px;
}

.momo-section-heading h2 {
  margin: 0;
  color: var(--momo-navy);
  font-size: 28px;
  line-height: 1.25;
}

.momo-section-heading > span {
  margin-top: 8px;
  color: var(--momo-muted);
  line-height: 1.7;
}

.momo-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.momo-step-grid button {
  position: relative;
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 11px;
  padding: 20px;
  color: var(--momo-navy);
  background: #fbfdff;
  border: 1px solid var(--momo-line);
  border-radius: 14px;
  cursor: pointer;
}

.momo-step-grid button:hover,
.momo-service-grid button:hover {
  border-color: var(--momo-sky);
  box-shadow: 0 10px 24px rgba(31, 45, 77, 0.08);
  transform: translateY(-2px);
}

.momo-step-number {
  position: absolute;
  top: 14px;
  left: 16px;
  color: #a4b5c8;
  font-size: 13px;
  font-weight: 800;
}

.momo-step-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--momo-navy);
  background: linear-gradient(135deg, var(--momo-cream), #edf5ff);
}

.momo-step-icon::before {
  font-size: 24px;
  font-style: normal;
  font-weight: 800;
}

.momo-upload-icon::before {
  content: "↑";
}

.momo-detect-icon::before {
  content: "⌕";
}

.momo-report-icon::before {
  content: "▥";
}

.momo-step-grid strong {
  font-size: 17px;
}

.momo-service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.momo-service-grid button {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 9px;
  padding: 22px;
  color: var(--momo-navy);
  text-align: left;
  background: linear-gradient(160deg, #fff 0%, #f7faff 100%);
  border: 1px solid var(--momo-line);
  border-radius: 14px;
  cursor: pointer;
}

.momo-step-grid button,
.momo-service-grid button {
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.momo-service-badge {
  min-width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0 9px;
  color: var(--momo-navy);
  background: var(--momo-cream);
  border-radius: 10px;
  font-weight: 900;
}

.momo-service-grid strong {
  font-size: 19px;
}

.momo-service-grid small {
  color: var(--momo-muted);
  font-size: 13px;
}

.momo-report-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  align-items: center;
  gap: 34px;
}

.momo-report-copy h2 {
  margin: 5px 0 12px;
  color: var(--momo-navy);
  font-size: 30px;
}

.momo-report-copy > p:not(.momo-kicker) {
  max-width: none;
  margin: 0 0 22px;
  color: var(--momo-muted);
  line-height: 1.85;
}

.momo-report-copy .momo-secondary-btn {
  padding-left: 0;
}

.momo-report-demo {
  position: relative;
  min-height: 210px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 14px;
  padding: 24px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--momo-navy), var(--momo-steel));
  border-radius: 16px;
}

.momo-score {
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
}

.momo-score strong {
  font-size: 35px;
}

.momo-score span {
  margin-top: 5px;
  color: #cbd8e7;
}

.momo-score-red strong {
  color: #ff776b;
}

.momo-score-blue strong {
  color: #a8c6e8;
}

.momo-risk-lines {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 0.75fr 0.92fr 0.58fr;
  gap: 7px;
}

.momo-risk-lines i {
  height: 8px;
  border-radius: 999px;
  background: rgba(168, 198, 232, 0.62);
}

.momo-risk-lines i:nth-child(2),
.momo-risk-lines i:nth-child(4) {
  background: rgba(212, 168, 90, 0.78);
}

.momo-promise {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 25px 30px;
  background: linear-gradient(110deg, #fff 0%, #f9fbff 62%, #f8eedf 100%);
}

.momo-promise img {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.momo-promise .momo-kicker {
  margin: 0 0 5px;
  font-size: 12px;
}

.momo-promise h2 {
  margin: 0;
  color: var(--momo-navy);
  font-size: 23px;
}

.momo-promise p:last-child {
  margin: 7px 0 0;
  color: var(--momo-muted);
}

.momo-promise > strong {
  padding: 11px 16px;
  color: var(--momo-brown);
  background: rgba(242, 230, 211, 0.74);
  border-radius: 999px;
  white-space: nowrap;
}

.service-widget,
.service-float {
  color: #fff;
  background: linear-gradient(135deg, var(--momo-navy), var(--momo-steel));
  border-color: rgba(168, 198, 232, 0.42);
}

@media (max-width: 980px) {
  .brand {
    min-width: 175px;
  }

  .brand small {
    display: none;
  }

  .nav-item {
    padding-inline: 10px;
    font-size: 13px;
  }

  .momo-home {
    width: min(100% - 30px, 900px);
  }

  .momo-home-hero {
    min-height: 520px;
  }

  .momo-hero-content {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 42%);
  }

  .momo-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .momo-report-panel {
    grid-template-columns: 1fr;
  }

  .momo-promise {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .momo-promise img {
    width: 70px;
    height: 70px;
  }

  .momo-promise > strong {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    scrollbar-width: none;
  }

  body::-webkit-scrollbar,
  .main::-webkit-scrollbar {
    display: none;
  }

  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 250;
    height: calc(64px + env(safe-area-inset-top));
    min-height: calc(64px + env(safe-area-inset-top));
    display: grid !important;
    place-items: end center;
    padding: env(safe-area-inset-top) 92px 13px;
    color: #fff;
    background: var(--momo-navy);
    border: 0;
    box-shadow: none;
  }

  .topbar > div:first-child {
    min-width: 0;
    text-align: center;
  }

  .topbar .eyebrow,
  .top-actions {
    display: none !important;
  }

  .topbar h1 {
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    color: #fff;
    font-size: 20px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar {
    height: calc(68px + env(safe-area-inset-bottom)) !important;
    min-height: calc(68px + env(safe-area-inset-bottom)) !important;
    padding: 0 4px env(safe-area-inset-bottom) !important;
    background: rgba(31, 45, 77, 0.985) !important;
    border-top-color: rgba(255, 255, 255, 0.11) !important;
  }

  .nav-list {
    height: 68px !important;
    min-height: 68px !important;
  }

  .nav-item {
    height: 68px !important;
    min-height: 68px !important;
    gap: 4px !important;
    padding: 8px 1px 5px !important;
    color: #b7c6d9 !important;
    font-size: 10px !important;
  }

  .nav-item.active {
    color: var(--momo-sky) !important;
  }

  .nav-item.active::before {
    top: 4px;
    width: 28px;
    height: 3px;
    background: var(--momo-gold);
  }

  .nav-item[data-view="submit"]::after,
  .nav-item[data-view="aigc"]::after {
    color: var(--momo-navy) !important;
    background: var(--momo-gold) !important;
  }

  .main {
    min-height: 100vh;
    padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
  }

  .view,
  #view-home {
    width: 100%;
  }

  .momo-home {
    width: 100%;
    margin: 0;
    gap: 12px;
    padding: 12px 12px 0;
  }

  .momo-home-hero,
  .momo-home-panel,
  .momo-promise {
    border-radius: 16px;
  }

  .momo-home-hero {
    min-height: 0;
    padding: 14px;
  }

  .momo-hero-brand {
    gap: 8px;
  }

  .momo-logo-card {
    width: min(68%, 310px);
    padding: 5px 8px;
    border-radius: 9px;
  }

  .momo-logo-card img {
    height: 50px;
  }

  .momo-brand-chip {
    max-width: 31%;
    padding: 7px 9px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .momo-hero-content {
    min-height: 205px;
    grid-template-columns: minmax(0, 1.15fr) minmax(120px, 0.85fr);
    gap: 4px;
  }

  .momo-hero-copy {
    padding-left: 2px;
  }

  .momo-hero-copy .momo-kicker {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .momo-hero-copy h2 {
    font-size: 30px;
  }

  .momo-hero-copy > strong {
    margin-top: 8px;
    font-size: 17px;
  }

  .momo-hero-copy > p:last-child {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.65;
  }

  .momo-hero-owl {
    width: 100%;
    max-height: 190px;
  }

  .momo-hero-footer {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .momo-hero-metrics {
    gap: 8px;
  }

  .momo-hero-metrics > div {
    min-height: 68px;
    padding: 10px 13px;
    border-radius: 10px;
  }

  .momo-hero-metrics strong {
    font-size: 20px;
  }

  .momo-hero-metrics span {
    margin-top: 4px;
    font-size: 11px;
  }

  .momo-primary-btn,
  .momo-secondary-btn {
    min-height: 48px;
    border-radius: 10px;
  }

  .momo-home-panel {
    padding: 20px 16px;
  }

  .momo-section-heading h2,
  .momo-report-copy h2 {
    font-size: 23px;
  }

  .momo-section-heading > span {
    font-size: 13px;
  }

  .momo-step-grid {
    gap: 8px;
    margin-top: 18px;
  }

  .momo-step-grid button {
    min-height: 116px;
    gap: 8px;
    padding: 18px 5px 10px;
    border-radius: 11px;
  }

  .momo-step-number {
    top: 9px;
    left: 10px;
    font-size: 10px;
  }

  .momo-step-icon {
    width: 39px;
    height: 39px;
  }

  .momo-step-grid strong {
    font-size: 13px;
  }

  .momo-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 18px;
  }

  .momo-service-grid button {
    min-height: 128px;
    gap: 6px;
    padding: 15px;
    border-radius: 11px;
  }

  .momo-service-badge {
    min-width: 36px;
    height: 36px;
    border-radius: 9px;
  }

  .momo-service-grid strong {
    font-size: 16px;
  }

  .momo-service-grid small {
    font-size: 11px;
  }

  .momo-report-panel {
    gap: 18px;
  }

  .momo-report-copy > p:not(.momo-kicker) {
    font-size: 13px;
    line-height: 1.75;
  }

  .momo-report-demo {
    min-height: 170px;
    gap: 9px;
    padding: 15px;
    border-radius: 12px;
  }

  .momo-score {
    min-height: 90px;
    padding: 12px;
  }

  .momo-score strong {
    font-size: 29px;
  }

  .momo-promise {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 13px;
    padding: 18px 16px;
  }

  .momo-promise img {
    width: 54px;
    height: 54px;
  }

  .momo-promise h2 {
    font-size: 18px;
  }

  .momo-promise p:last-child {
    font-size: 12px;
    line-height: 1.6;
  }

  .momo-promise > strong {
    grid-column: 1 / -1;
    justify-self: stretch;
    padding: 9px 12px;
    text-align: center;
    font-size: 12px;
  }

  .workspace-grid,
  .report-layout,
  .aigc-layout,
  .account-layout,
  .activity-layout {
    width: calc(100% - 24px);
    max-width: none;
    margin-inline: auto;
  }

  .panel {
    border-radius: 14px;
  }

  .service-widget,
  .service-float {
    right: 12px !important;
    bottom: calc(82px + env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 390px) {
  .nav-item {
    font-size: 9px !important;
  }

  .momo-home {
    padding-inline: 8px;
  }

  .momo-logo-card img {
    height: 44px;
  }

  .momo-brand-chip {
    font-size: 10px;
  }

  .momo-hero-content {
    grid-template-columns: minmax(0, 1.12fr) minmax(105px, 0.88fr);
  }

  .momo-hero-copy h2 {
    font-size: 26px;
  }

  .momo-hero-copy > strong {
    font-size: 15px;
  }

  .momo-service-grid button {
    padding: 13px;
  }
}

/* Report detail package */
.detail-report-content {
  padding: 24px;
  background: #f5f8fc;
}

.report-doc {
  display: grid;
  gap: 18px;
  color: #12213a;
}

.report-doc-head,
.credential-head {
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, #14233f 0%, #315f75 100%);
  color: #fff;
  box-shadow: 0 18px 46px rgba(20, 35, 63, 0.18);
}

.report-doc-head span,
.credential-head span {
  display: block;
  margin-bottom: 8px;
  color: #a8c6e8;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 5px;
  text-transform: uppercase;
}

.report-doc-head h3,
.credential-title {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.report-doc-head p,
.credential-head p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
}

.report-meta-grid,
.risk-distribution,
.advice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.report-score-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.report-meta-grid div,
.score-tile,
.risk-count,
.report-section,
.report-risk-segment,
.credential-statement,
.advice-grid article {
  border: 1px solid #dce6f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(27, 44, 72, 0.06);
}

.report-meta-grid div,
.score-tile,
.risk-count {
  padding: 16px;
}

.report-meta-grid span,
.score-tile span,
.risk-count span {
  display: block;
  color: #6c788b;
  font-size: 13px;
}

.report-meta-grid strong,
.score-tile strong,
.risk-count strong {
  display: block;
  margin-top: 5px;
  color: #10203a;
  word-break: break-word;
}

.score-tile strong {
  font-size: 40px;
  line-height: 1;
}

.score-tile.duplicate strong {
  color: #1d4ed8;
}

.score-tile.private-corpus strong {
  color: #078b9c;
}

/* Private-corpus full-text similarity report */
.corpus-reader-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.corpus-reader-heading h3,
.corpus-reader-heading p {
  margin: 0;
}

.corpus-reader-heading p {
  margin-top: 5px;
  color: #64748b;
}

.corpus-reader-heading > span {
  flex: 0 0 auto;
  padding: 6px 11px;
  border-radius: 999px;
  background: #ecf8f8;
  color: #087c83;
  font-size: 13px;
  font-weight: 700;
}

.corpus-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.corpus-summary-grid article {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce6f2;
  border-radius: 10px;
  background: #f9fbfd;
}

.corpus-summary-grid span,
.corpus-summary-grid small,
.corpus-summary-grid strong {
  display: block;
}

.corpus-summary-grid span,
.corpus-summary-grid small {
  color: #64748b;
}

.corpus-summary-grid span {
  font-size: 13px;
}

.corpus-summary-grid strong {
  margin: 4px 0;
  color: #12213a;
  font-size: 26px;
}

.corpus-summary-grid small {
  line-height: 1.5;
}

.corpus-color-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 14px;
}

.corpus-selection-record {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #d9e5ef;
  border-radius: 10px;
  color: #60738d;
  background: #f7fafd;
  font-size: 12px;
  line-height: 1.65;
}

.corpus-selection-record strong {
  color: #244f80;
}

.corpus-color-legend i {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 6px;
  border-radius: 2px;
  vertical-align: -1px;
}

.corpus-color-legend i.high {
  background: #d92d20;
}

.corpus-color-legend i.medium {
  background: #e58a00;
}

.corpus-color-legend i.qualified {
  background: #172033;
}

.corpus-reader-tip {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 13px;
}

.corpus-fulltext {
  max-height: 680px;
  margin-top: 14px;
  overflow: auto;
  padding: 20px;
  border: 1px solid #d8e2ed;
  border-left: 5px solid #1d65d8;
  border-radius: 8px;
  background: #fff;
}

.corpus-paragraph {
  margin: 0 0 14px;
  color: #172033;
  font-size: 16px;
  line-height: 2.05;
  text-align: justify;
}

.corpus-paragraph:last-child {
  margin-bottom: 0;
}

.corpus-sentence {
  display: inline;
  margin: 0;
  padding: 2px 1px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #172033;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
}

button.corpus-sentence.has-evidence {
  cursor: pointer;
}

button.corpus-sentence.has-evidence:hover,
button.corpus-sentence.has-evidence:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.corpus-sentence.high {
  background: #fff0ee;
  color: #d92d20;
  font-weight: 700;
}

.corpus-sentence.medium {
  background: #fff5df;
  color: #b76600;
  font-weight: 700;
}

.corpus-sentence sup {
  margin-left: 2px;
  font-size: 10px;
  font-weight: 800;
}

.corpus-sentence-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin: 0 2px;
  padding: 0 4px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  vertical-align: 1px;
}

.corpus-sentence-tag.citation {
  background: #e9f3ff;
  color: #175cd3;
}

.corpus-sentence-tag.pending {
  background: #fff0e8;
  color: #b54708;
}

.corpus-sentence-tag.term {
  background: #eef7f1;
  color: #087443;
}

.corpus-detail-backdrop {
  position: fixed;
  z-index: 1098;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
}

.corpus-detail-drawer {
  position: fixed;
  z-index: 1099;
  top: 0;
  right: 0;
  width: min(520px, 94vw);
  height: 100vh;
  overflow: auto;
  padding: 24px;
  border-left: 1px solid #d8e2ed;
  background: #fff;
  box-shadow: -18px 0 50px rgba(15, 23, 42, 0.2);
}

.corpus-detail-backdrop[hidden],
.corpus-detail-drawer[hidden] {
  display: none;
}

body.corpus-detail-open {
  overflow: hidden;
}

.corpus-detail-drawer > h3 {
  margin: 0 42px 16px 0;
}

.corpus-detail-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #d8e2ed;
  border-radius: 50%;
  background: #fff;
  color: #334155;
  font-size: 24px;
  cursor: pointer;
}

.corpus-detail-score {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.corpus-detail-score > div {
  padding: 14px;
  border: 1px solid #dce6f2;
  border-radius: 10px;
  background: #f8fafc;
}

.corpus-detail-score span,
.corpus-detail-score strong {
  display: block;
}

.corpus-detail-score span,
.corpus-detail-location {
  color: #64748b;
  font-size: 13px;
}

.corpus-detail-score strong {
  margin-top: 3px;
  color: #d92d20;
  font-size: 28px;
}

.corpus-detail-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.corpus-detail-status {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.corpus-detail-status.citation {
  background: #e9f3ff;
  color: #175cd3;
}

.corpus-detail-status.term {
  background: #eef7f1;
  color: #087443;
}

.corpus-detail-drawer section,
.corpus-detail-sources article {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dce6f2;
  border-radius: 10px;
  background: #fff;
}

.corpus-detail-drawer h4,
.corpus-detail-drawer p {
  margin: 0;
}

.corpus-detail-drawer h4 {
  margin-bottom: 6px;
}

.corpus-detail-warning,
.corpus-detail-note {
  margin-top: 12px !important;
  padding: 11px 12px;
  border-left: 4px solid #e58a00;
  background: #fff8e8;
  color: #7a4a00;
}

.corpus-detail-note {
  border-left-color: #2e90fa;
  background: #eff8ff;
  color: #175cd3;
}

.corpus-detail-sources article > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.corpus-detail-sources article > div span,
.corpus-detail-sources small {
  color: #64748b;
  font-size: 12px;
}

.corpus-detail-sources article p + p {
  margin-top: 8px;
}

.aigc-reader-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.aigc-reader-heading h3,
.aigc-reader-heading p {
  margin: 0;
}

.aigc-reader-heading p,
.aigc-reader-heading > span {
  color: #64748b;
  font-size: 13px;
}

.aigc-reader-heading > span {
  flex: none;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef4fb;
  color: #244f80;
  font-weight: 700;
}

.aigc-color-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 14px;
}

.aigc-color-legend i {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 6px;
  border-radius: 2px;
  vertical-align: -1px;
}

.aigc-color-legend i.red {
  background: #d92d20;
}

.aigc-color-legend i.orange {
  background: #e58a00;
}

.aigc-color-legend i.purple {
  background: #7f56d9;
}

.aigc-color-legend i.black {
  background: #172033;
}

.aigc-color-legend i.gray {
  background: #98a2b3;
}

.aigc-reader-tip,
.aigc-calculation-note {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
}

.aigc-calculation-note {
  padding: 10px 12px;
  border-left: 4px solid #7f56d9;
  background: #f9f5ff;
  color: #53389e;
}

.aigc-fulltext {
  max-height: 680px;
  margin-top: 14px;
  overflow: auto;
  padding: 20px;
  border: 1px solid #d8e2ed;
  border-left: 5px solid #7f56d9;
  border-radius: 8px;
  background: #fff;
}

.aigc-paragraph {
  margin: 0 0 14px;
  color: #172033;
  font-size: 16px;
  line-height: 2.05;
  text-align: justify;
}

.aigc-paragraph:last-child {
  margin-bottom: 0;
}

.aigc-sentence {
  display: inline;
  margin: 0;
  padding: 2px 1px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #172033;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
}

button.aigc-sentence {
  cursor: pointer;
}

button.aigc-sentence:hover,
button.aigc-sentence:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.aigc-sentence.red {
  background: #fff0ee;
  color: #d92d20;
  font-weight: 700;
}

.aigc-sentence.orange {
  background: #fff5df;
  color: #b76600;
  font-weight: 700;
}

.aigc-sentence.purple {
  background: #f4f0ff;
  color: #6941c6;
  font-weight: 700;
}

.aigc-sentence.black {
  color: #172033;
}

.aigc-sentence.gray {
  background: #f2f4f7;
  color: #98a2b3;
}

.aigc-sentence sup {
  margin-left: 2px;
  font-size: 10px;
  font-weight: 800;
}

.aigc-detail-backdrop {
  position: fixed;
  z-index: 1098;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
}

.aigc-detail-backdrop[hidden],
.aigc-detail-drawer[hidden] {
  display: none;
}

body.aigc-detail-open {
  overflow: hidden;
}

.aigc-detail-score strong {
  color: #6941c6;
}

.aigc-detail-drawer[data-level="red"] .aigc-detail-score strong {
  color: #d92d20;
}

.aigc-detail-drawer[data-level="orange"] .aigc-detail-score strong {
  color: #b76600;
}

.aigc-trace-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.aigc-trace-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f4f0ff;
  color: #6941c6;
  font-size: 12px;
  font-weight: 700;
}

.aigc-detail-disclaimer {
  margin-top: 14px !important;
  padding: 11px 12px;
  border-left: 4px solid #7f56d9;
  background: #f9f5ff;
  color: #53389e;
}

.corpus-match-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.corpus-match-card {
  padding: 12px 14px;
  border: 1px solid #d8e5ee;
  border-left: 4px solid #078b9c;
  border-radius: 8px;
  background: #f7fbfc;
}

.corpus-match-card strong,
.corpus-match-card span {
  display: block;
}

.corpus-match-card span {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.corpus-match-card p {
  margin: 8px 0 0;
}

.score-tile.aigc.red strong {
  color: #d92d20;
}

.score-tile.aigc.orange strong {
  color: #b76600;
}

.score-tile.aigc.purple strong {
  color: #6941c6;
}

.score-tile.aigc.black strong {
  color: #172033;
}

.report-section,
.report-risk-segment,
.credential-statement,
.advice-grid article {
  padding: 20px;
}

.report-section h3,
.report-risk-segment h4 {
  margin: 0 0 12px;
  color: #10203a;
}

.report-section.two-cols,
.advice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.risk-distribution {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.risk-count strong {
  font-size: 34px;
}

.risk-count.high strong {
  color: #ef4d3f;
}

.risk-count.medium strong {
  color: #d49a29;
}

.risk-count.low strong {
  color: #7063d8;
}

.report-risk-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 12px;
  color: #647187;
  font-size: 13px;
}

.report-risk-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 2px;
  vertical-align: middle;
}

.report-risk-legend .high {
  background: #ef4d3f;
}

.report-risk-legend .medium {
  background: #d49a29;
}

.report-risk-legend .low {
  background: #7063d8;
}

.report-risk-legend .unmarked {
  background: #d8e1ec;
}

.report-segment-list {
  display: grid;
  gap: 14px;
}

.segment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.segment-head em {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #245bd6;
  font-style: normal;
  font-weight: 800;
}

.report-risk-segment.high .segment-head em {
  background: #fff0ed;
  color: #ef4d3f;
}

.report-risk-segment.medium .segment-head em {
  background: #fff7e6;
  color: #b7791f;
}

.segment-text {
  margin: 0 0 12px;
  padding: 14px 16px;
  border-left: 4px solid #9fb7d8;
  border-radius: 8px;
  background: #f6f9fd;
  color: #334155;
}

.marked-tip {
  margin: 0 0 14px;
  color: #617089;
  font-size: 14px;
  line-height: 1.7;
}

.marked-paper {
  display: grid;
  max-height: 520px;
  gap: 10px;
  overflow: auto;
  padding: 16px;
  border: 1px solid #dce5ef;
  border-left: 5px solid #1d65d8;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9fc 100%);
}

.marked-line {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 54px;
  gap: 8px;
  align-items: flex-start;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e8f1;
  border-radius: 6px;
  background: #fff;
  color: #16233a;
  line-height: 1.8;
  text-align: left;
}

.marked-line span {
  padding-top: 2px;
  color: #6d7a8c;
  font-size: 13px;
}

.marked-line mark {
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(224, 231, 240, 0.7);
  color: inherit;
  word-break: break-word;
}

.marked-line em {
  color: #10233f;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.marked-line.high mark {
  background: rgba(239, 68, 68, 0.17);
  color: #b42318;
}

.marked-line.medium mark {
  background: rgba(212, 168, 90, 0.22);
  color: #8a5a17;
}

.marked-line.low mark {
  background: rgba(124, 95, 210, 0.14);
  color: #5238a5;
}

.segment-suggestion {
  margin: 0;
  color: #0f8b66;
  font-weight: 700;
}

.report-empty-box {
  padding: 22px;
  border: 1px dashed #c9d7e8;
  border-radius: 12px;
  background: #fbfdff;
  color: #6b7688;
}

.analysis-source-table {
  overflow: hidden;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #e1e9f3;
  background: #fff;
}

.analysis-source-table .table-row {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.8fr;
}

.analysis-source-table .table-row + .table-row {
  border-top: 1px solid #e1e9f3;
}

.analysis-source-table .table-row span {
  padding: 12px;
  color: #42526b;
  text-align: left;
  word-break: break-word;
}

.analysis-source-table .table-head {
  background: #f4f7fb;
  font-weight: 800;
}

.report-method-list {
  margin: 0;
  padding-left: 20px;
  color: #42526b;
}

.report-method-list li + li {
  margin-top: 8px;
}

.credential-sheet {
  display: grid;
  gap: 18px;
}

.credential-statement {
  position: relative;
  min-height: 220px;
}

.credential-statement p {
  color: #334155;
}

.credential-seal {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 14px;
  border: 1px dashed rgba(32, 95, 177, 0.36);
  border-radius: 12px;
  background: #f6f9ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
  word-break: break-all;
}

.report-disclaimer {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff8ed;
  color: #7c4a12;
  font-size: 13px;
}

@media (max-width: 760px) {
  .detail-report-content {
    padding: 12px;
  }

  .report-doc-head,
  .credential-head {
    padding: 20px;
    border-radius: 16px;
  }

  .report-meta-grid,
  .report-score-tiles,
  .risk-distribution,
  .corpus-summary-grid,
  .report-section.two-cols,
  .advice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-doc-head h3,
  .credential-title {
    font-size: 30px;
  }

  .score-tile strong {
    font-size: 32px;
  }

  .report-mode-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .report-mode-tabs::-webkit-scrollbar {
    display: none;
  }

  .report-tab {
    white-space: nowrap;
  }

  .segment-head {
    display: block;
  }

  .segment-head em {
    display: inline-block;
    margin-top: 8px;
  }

  .corpus-reader-heading,
  .aigc-reader-heading {
    display: block;
  }

  .corpus-reader-heading > span,
  .aigc-reader-heading > span {
    display: inline-block;
    margin-top: 10px;
  }

  .corpus-fulltext,
  .aigc-fulltext {
    max-height: 560px;
    padding: 14px;
  }

  .corpus-detail-drawer {
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(82vh, 760px);
    padding: 20px 16px;
    border-top: 1px solid #d8e2ed;
    border-left: 0;
    border-radius: 16px 16px 0 0;
  }
}

/* Compact self-built library entry below the paper input */
.submit-corpus-inline {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  margin: 12px 0 18px;
}

.submit-corpus-trigger {
  flex: 0 0 auto;
  min-width: 86px;
  padding: 8px 17px;
  border: 1.5px solid #72b6a2;
  border-radius: 999px;
  color: #087459;
  background: #f3fbf8;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.submit-corpus-trigger:hover:not(:disabled),
.submit-corpus-trigger:focus-visible {
  border-color: #087459;
  color: #05614a;
  background: #e8f8f2;
}

.submit-corpus-trigger:disabled {
  cursor: wait;
  opacity: .58;
}

.submit-corpus-inline-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  align-items: center;
  min-width: 0;
}

.submit-corpus-inline-copy > span {
  padding: 3px 8px;
  border-radius: 999px;
  color: #3f5e82;
  background: #e7eef6;
  font-size: 12px;
  font-weight: 700;
}

.submit-corpus-inline-copy p {
  flex: 1 1 320px;
  margin: 0;
  color: #60738d;
  font-size: 12px;
  line-height: 1.55;
}

.submit-corpus-inline[data-state="ready"] .submit-corpus-inline-copy > span {
  color: #087459;
  background: #d9f4ea;
}

.submit-corpus-inline[data-state="empty"] .submit-corpus-trigger,
.submit-corpus-inline[data-state="paused"] .submit-corpus-trigger {
  border-color: #dda849;
  color: #94610d;
  background: #fffaf0;
}

.submit-corpus-inline[data-state="empty"] .submit-corpus-inline-copy > span,
.submit-corpus-inline[data-state="paused"] .submit-corpus-inline-copy > span {
  color: #94610d;
  background: #f8eac8;
}

.submit-corpus-inline[data-state="error"] .submit-corpus-trigger {
  border-color: #d78c87;
  color: #a83b35;
  background: #fff7f6;
}

.submit-corpus-inline[data-state="error"] .submit-corpus-inline-copy > span {
  color: #a83b35;
  background: #f9dfdc;
}

@media (max-width: 640px) {
  .submit-corpus-inline {
    align-items: flex-start;
    margin-top: 10px;
  }

  .submit-corpus-inline-copy p {
    flex-basis: 100%;
  }
}

/* Submit page self-built library */
body.private-corpus-modal-open {
  overflow: hidden;
}

.corpus-library-modal {
  z-index: 1200;
  padding: 24px;
}

.corpus-library-dialog {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1080px, calc(100vw - 48px));
  max-height: min(820px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid #d5e1ed;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16, 43, 84, .24);
}

.corpus-library-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #dce6ef;
}

.corpus-library-header h2,
.corpus-library-header p {
  margin: 0;
}

.corpus-library-header h2 {
  color: #102b54;
  font-size: 24px;
}

.corpus-library-header > div > p:last-child {
  margin-top: 6px;
  color: #60738d;
  font-size: 13px;
}

.corpus-library-close {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #cedae6;
  border-radius: 10px;
  color: #526a85;
  background: #f7fafd;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.corpus-library-close:hover,
.corpus-library-close:focus-visible {
  border-color: #2166c2;
  color: #1556ad;
}

.corpus-library-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 18px;
  padding: 14px 24px;
  border-bottom: 1px solid #dce6ef;
  background: #f7fafd;
}

.corpus-library-summary div {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.corpus-library-summary span,
.corpus-library-summary p {
  color: #71839a;
  font-size: 12px;
}

.corpus-library-summary strong {
  color: #153b6a;
  font-size: 17px;
}

.corpus-library-summary p {
  grid-column: 1 / -1;
  margin: 0;
}

.corpus-library-body {
  display: grid;
  grid-template-columns: minmax(290px, .8fr) minmax(420px, 1.35fr);
  gap: 16px;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
  background: #f4f7fa;
}

.library-upload-panel,
.library-list-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d8e3ee;
  border-radius: 15px;
  background: #fff;
}

.corpus-library-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 63px;
  padding: 13px 16px;
  border-bottom: 1px solid #e2eaf2;
}

.corpus-library-section-head span,
.corpus-library-section-head strong {
  display: block;
}

.corpus-library-section-head span {
  color: #2166c2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.corpus-library-section-head strong {
  margin-top: 2px;
  color: #102b54;
  font-size: 16px;
}

.library-upload-panel > .field {
  display: block;
  padding: 14px 16px 0;
}

.library-upload-zone {
  position: relative;
  display: grid;
  min-height: 150px;
  margin: 14px 16px;
  padding: 20px;
  place-content: center;
  border: 1px dashed #8fb4d2;
  border-radius: 14px;
  background: #f7fbff;
  text-align: center;
  cursor: pointer;
}

.library-upload-zone:hover {
  border-color: #0b8b9b;
  background: #f2fbfa;
}

.library-upload-zone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.library-upload-zone strong {
  color: #17365f;
  font-size: 16px;
}

.library-upload-zone p {
  margin: 8px 0 0;
  color: #72839a;
  font-size: 13px;
}

.library-upload-button {
  width: calc(100% - 32px);
  margin-inline: 16px;
}

.library-privacy-note {
  margin: 10px 16px 16px;
  color: #60738d;
  font-size: 12px;
  line-height: 1.65;
}

.corpus-library-selection-tools {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #e2eaf2;
}

.corpus-library-selection-tools button {
  padding: 6px 12px;
  border: 1px solid #b8cce0;
  border-radius: 8px;
  color: #28567f;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.corpus-library-selection-tools button:hover:not(:disabled) {
  border-color: #16856d;
  color: #087459;
  background: #f0fbf7;
}

.corpus-library-selection-tools button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.library-list {
  display: grid;
  gap: 10px;
  max-height: 355px;
  padding: 12px 14px 16px;
  overflow-y: auto;
}

.library-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #dbe6f0;
  border-radius: 12px;
  background: #fbfdff;
}

.library-select-control {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  cursor: pointer;
}

.library-select-control input {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 1;
  width: 21px;
  height: 21px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  transform: translateY(-50%);
}

.library-checkmark {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1.5px solid #9fb6cc;
  border-radius: 6px;
  background: #fff;
}

.library-select-control input:checked + .library-checkmark {
  border-color: #08916e;
  background: #08916e;
}

.library-select-control input:checked + .library-checkmark::after {
  content: "✓";
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.library-select-control:focus-within .library-checkmark {
  outline: 3px solid rgba(33, 102, 194, .18);
  outline-offset: 2px;
}

.library-item-copy {
  min-width: 0;
}

.library-item-copy strong,
.library-item-copy > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-item-copy strong {
  color: #17365f;
}

.library-item-copy > span {
  margin-top: 5px;
  color: #72839a;
  font-size: 12px;
}

.library-delete-btn {
  padding: 8px 13px;
  border: 1px solid #e2a9a6;
  border-radius: 8px;
  background: #fff;
  color: #b43d38;
  cursor: pointer;
}

.library-empty {
  padding: 34px 20px;
  border: 1px dashed #cbd8e5;
  border-radius: 12px;
  color: #71839a;
  text-align: center;
}

.corpus-library-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 20px;
  border-top: 1px solid #dce6ef;
  background: #fff;
}

.corpus-library-footer p {
  margin: 0;
  color: #60738d;
  font-size: 12px;
  line-height: 1.55;
}

.corpus-library-footer > div {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

@media (max-width: 820px) {
  .corpus-library-modal {
    align-items: end;
    padding: 0;
  }

  .corpus-library-dialog {
    width: 100%;
    max-height: 94vh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
  }

  .corpus-library-body {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .library-list-panel {
    order: -1;
    margin-bottom: 14px;
  }

  .library-upload-panel,
  .library-list-panel {
    flex: 0 0 auto;
  }

  .library-list {
    max-height: 340px;
  }
}

@media (max-width: 540px) {
  .corpus-library-header {
    padding: 17px 16px 14px;
  }

  .corpus-library-header h2 {
    font-size: 20px;
  }

  .corpus-library-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px 16px;
  }

  .corpus-library-body {
    padding: 12px;
  }

  .corpus-library-footer {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 16px 14px;
  }

  .corpus-library-footer > div,
  .corpus-library-footer button {
    width: 100%;
  }
}

@media print {
  body {
    background: #fff !important;
  }

  .top-nav,
  .mobile-topbar,
  .bottom-tabbar,
  .service-dock,
  .service-panel,
  .corpus-library-modal,
  .corpus-detail-backdrop,
  .corpus-detail-drawer,
  .aigc-detail-backdrop,
  .aigc-detail-drawer,
  .panel-head .action-group,
  .report-mode-tabs {
    display: none !important;
  }

  .app-shell,
  .view,
  .panel,
  .detail-report-content {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .corpus-fulltext,
  .aigc-fulltext {
    max-height: none !important;
    overflow: visible !important;
  }
}
