:root {
  --page: #dfeef8;
  --page-2: #f6fbff;
  --ink: #101828;
  --muted: #667085;
  --soft: #8ca0b7;
  --blue: #007aff;
  --cyan: #72d3ee;
  --line: rgba(255, 255, 255, 0.68);
  --line-strong: rgba(255, 255, 255, 0.82);
  --glass: rgba(255, 255, 255, 0.26);
  --glass-strong: rgba(255, 255, 255, 0.42);
  --shadow: 0 30px 90px rgba(35, 74, 112, 0.18);
  --inner: inset 0 1px 0 rgba(255, 255, 255, 0.96), inset 0 -1px 0 rgba(64, 119, 164, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 255, 255, 0.78), transparent 18%),
    radial-gradient(circle at 86% 10%, rgba(124, 204, 244, 0.24), transparent 26%),
    linear-gradient(142deg, #d3e8f6 0%, #f6fbff 48%, #d9edf8 100%);
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 0 28%, rgba(255, 255, 255, 0.72) 34%, transparent 43%),
    linear-gradient(62deg, transparent 0 46%, rgba(116, 196, 235, 0.2) 53%, transparent 64%),
    linear-gradient(145deg, transparent 0 60%, rgba(255, 255, 255, 0.52) 68%, transparent 78%);
  filter: blur(20px);
  opacity: 0.82;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 22px 30px at 8% 18%, rgba(255, 255, 255, 0.7) 0 18%, rgba(255, 255, 255, 0.24) 42%, rgba(44, 134, 190, 0.13) 63%, transparent 72%),
    radial-gradient(ellipse 10px 14px at 11% 24%, rgba(255, 255, 255, 0.7) 0 22%, rgba(255, 255, 255, 0.2) 58%, transparent 72%),
    radial-gradient(ellipse 18px 25px at 21% 76%, rgba(255, 255, 255, 0.6) 0 20%, rgba(255, 255, 255, 0.2) 48%, rgba(44, 134, 190, 0.1) 65%, transparent 75%),
    radial-gradient(ellipse 28px 36px at 39% 16%, rgba(255, 255, 255, 0.68) 0 18%, rgba(255, 255, 255, 0.2) 45%, rgba(44, 134, 190, 0.12) 64%, transparent 74%),
    radial-gradient(ellipse 14px 18px at 52% 9%, rgba(255, 255, 255, 0.6) 0 20%, rgba(255, 255, 255, 0.17) 52%, transparent 74%),
    radial-gradient(ellipse 24px 34px at 66% 72%, rgba(255, 255, 255, 0.62) 0 18%, rgba(255, 255, 255, 0.18) 48%, rgba(44, 134, 190, 0.1) 66%, transparent 76%),
    radial-gradient(ellipse 16px 23px at 81% 30%, rgba(255, 255, 255, 0.65) 0 20%, rgba(255, 255, 255, 0.2) 48%, transparent 72%),
    radial-gradient(ellipse 32px 42px at 92% 83%, rgba(255, 255, 255, 0.62) 0 17%, rgba(255, 255, 255, 0.18) 48%, rgba(44, 134, 190, 0.1) 66%, transparent 76%);
  filter: drop-shadow(0 8px 12px rgba(61, 107, 148, 0.16));
  opacity: 0.62;
  mix-blend-mode: soft-light;
}

.rain-layer {
  position: fixed;
  inset: -30% 0 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.42;
  background:
    repeating-linear-gradient(
      105deg,
      transparent 0 42px,
      rgba(255, 255, 255, 0.3) 43px,
      rgba(255, 255, 255, 0.3) 44px,
      transparent 46px 118px
    ),
    repeating-linear-gradient(
      103deg,
      transparent 0 84px,
      rgba(56, 139, 196, 0.16) 85px,
      rgba(56, 139, 196, 0.16) 86px,
      transparent 88px 174px
    );
  background-size: 260px 420px, 340px 560px;
  animation: rainFall 9s linear infinite;
  mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 82%, transparent 100%);
}

.rain-layer::before,
.rain-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 1.5px 7px at 12% 8%, rgba(255, 255, 255, 0.42), transparent 70%),
    radial-gradient(ellipse 1.2px 6px at 24% 28%, rgba(255, 255, 255, 0.32), transparent 72%),
    radial-gradient(ellipse 1.5px 8px at 38% 14%, rgba(92, 165, 212, 0.22), transparent 72%),
    radial-gradient(ellipse 1.3px 7px at 56% 36%, rgba(255, 255, 255, 0.34), transparent 72%),
    radial-gradient(ellipse 1.6px 9px at 74% 20%, rgba(255, 255, 255, 0.38), transparent 74%),
    radial-gradient(ellipse 1.2px 6px at 88% 42%, rgba(92, 165, 212, 0.18), transparent 72%);
  background-size: 220px 360px;
  animation: rainFallSoft 7s linear infinite;
}

.rain-layer::after {
  opacity: 0.62;
  transform: translateY(-180px);
  background-size: 300px 460px;
  animation-duration: 11s;
}

@keyframes rainFall {
  from {
    background-position: 0 -420px, 80px -560px;
  }
  to {
    background-position: -180px 420px, -120px 560px;
  }
}

@keyframes rainFallSoft {
  from {
    transform: translate3d(0, -240px, 0);
  }
  to {
    transform: translate3d(-120px, 360px, 0);
  }
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(20, 121, 255, 0.08);
  color: #145bb2;
}

.glass-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.14)),
    var(--glass);
  box-shadow: var(--shadow), var(--inner);
  backdrop-filter: blur(38px) saturate(1.65) contrast(1.05);
  -webkit-backdrop-filter: blur(38px) saturate(1.65) contrast(1.05);
}

.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 62px 84px at 14% 13%, rgba(255, 255, 255, 0.58) 0 14%, rgba(255, 255, 255, 0.2) 45%, rgba(38, 137, 194, 0.1) 67%, transparent 76%),
    radial-gradient(ellipse 34px 48px at 74% 16%, rgba(255, 255, 255, 0.5) 0 15%, rgba(255, 255, 255, 0.17) 45%, transparent 74%),
    radial-gradient(ellipse 40px 58px at 86% 78%, rgba(255, 255, 255, 0.46) 0 16%, rgba(255, 255, 255, 0.15) 45%, rgba(38, 137, 194, 0.08) 66%, transparent 76%),
    linear-gradient(118deg, rgba(255, 255, 255, 0.8), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 38%);
  opacity: 0.88;
}

.glass-panel::after {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.42);
  mask-image: linear-gradient(135deg, #000, transparent 58%);
}

.glass-panel > * {
  position: relative;
  z-index: 1;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1780px, 100%);
  height: 100vh;
  padding: 18px;
  margin: 0 auto;
}

.portal-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  min-height: 100vh;
  padding: 24px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.main-nav,
.side-nav {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 24px;
}

.main-nav {
  justify-self: center;
}

.side-nav {
  margin-bottom: 16px;
  background:
    radial-gradient(ellipse 36px 20px at 20% 20%, rgba(255, 255, 255, 0.58), transparent 70%),
    rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.nav-pill,
.side-nav-link {
  min-height: 40px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 850;
}

.nav-pill.active,
.side-nav-link.active {
  color: #102038;
  background:
    radial-gradient(ellipse 28px 18px at 22% 18%, rgba(255, 255, 255, 0.8), transparent 68%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(225, 246, 255, 0.34));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.98), 0 12px 24px rgba(35, 74, 112, 0.1);
}

.download-panel {
  align-self: start;
  min-height: 520px;
  padding: 34px;
  border-radius: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.download-head {
  text-align: center;
}

.download-head h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.05;
  letter-spacing: 0;
}

.download-grid {
  margin-top: 28px;
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.download-item {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background:
    radial-gradient(ellipse 70px 44px at 14% 10%, rgba(255, 255, 255, 0.7), transparent 72%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.16));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 20px 42px rgba(35, 74, 112, 0.11);
  backdrop-filter: blur(28px) saturate(1.55);
  -webkit-backdrop-filter: blur(28px) saturate(1.55);
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.download-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.98), 0 26px 52px rgba(35, 74, 112, 0.16);
}

.download-card {
  min-height: 138px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--ink);
  text-decoration: none;
  font-size: 22px;
  font-weight: 900;
  transition: background 160ms ease;
}

.download-card:hover {
  background: rgba(255, 255, 255, 0.2);
}

.download-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.download-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.download-time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.latest-note {
  color: #51718a;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.latest-note strong {
  margin-right: 6px;
  color: #1479ff;
  font-size: 12px;
}

.download-mark {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(ellipse 24px 16px at 30% 22%, rgba(255, 255, 255, 0.54), transparent 70%),
    linear-gradient(145deg, rgba(35, 145, 255, 0.96), rgba(0, 122, 255, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 14px 30px rgba(20, 121, 255, 0.2);
}

.latest-download {
  flex: 0 0 auto;
  padding: 8px 11px;
  margin-left: auto;
  border-radius: 999px;
  color: #1479ff;
  background: rgba(20, 121, 255, 0.08);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.download-history {
  border-top: 1px solid rgba(80, 130, 170, 0.12);
}

.download-history summary {
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  list-style: none;
  transition: background 160ms ease;
}

.download-history summary::-webkit-details-marker {
  display: none;
}

.download-history summary:hover {
  background: rgba(255, 255, 255, 0.22);
}

.history-summary-title {
  color: #31536f;
}

.history-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.history-chevron {
  margin-left: auto;
  color: #1479ff;
  font-size: 20px;
  line-height: 1;
  transition: transform 160ms ease;
}

.download-history[open] .history-chevron {
  transform: rotate(180deg);
}

.history-list {
  padding: 2px 12px 12px;
  display: grid;
  gap: 2px;
}

.history-item {
  position: relative;
  padding: 10px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  transition: background 160ms ease;
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.44);
}

.history-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border: 2px solid rgba(20, 121, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
}

.history-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.history-main small {
  color: var(--muted);
}

.history-download {
  flex: 0 0 auto;
  margin-left: auto;
  color: #1479ff;
  font-size: 12px;
  font-weight: 850;
}

.workspace {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
}

.sidebar,
.reader {
  min-height: 0;
  border-radius: 32px;
}

.sidebar {
  padding: 18px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.14)),
    rgba(220, 244, 255, 0.18);
}

.search-box {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 22px;
  background:
    radial-gradient(ellipse 34px 22px at 18% 18%, rgba(255, 255, 255, 0.72), transparent 62%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), inset 0 -1px 0 rgba(64, 119, 164, 0.08), 0 16px 36px rgba(35, 74, 112, 0.1);
  backdrop-filter: blur(28px) saturate(1.7);
  -webkit-backdrop-filter: blur(28px) saturate(1.7);
}

.search-box span {
  color: #3b82f6;
  font-size: 20px;
  line-height: 1;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.search-box input::placeholder {
  color: rgba(102, 112, 133, 0.72);
}

.sidebar-head,
.reader-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-head {
  position: relative;
  padding: 0 3px;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.sidebar-head > div {
  width: 100%;
}

.sidebar-head .icon-button {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.eyebrow {
  margin: 0 0 5px;
  color: #2f6fd6;
  font-size: 12px;
  font-weight: 800;
}

.sidebar h2,
.title-stack h2,
.empty-state h3,
.login-card h1 {
  margin: 0;
  letter-spacing: 0;
}

.sidebar h2 {
  font-size: 20px;
  line-height: 1.2;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.26));
  color: #3b82f6;
  font-size: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 12px 28px rgba(45, 58, 76, 0.08);
}

.category-tabs {
  margin: 16px 0 16px;
  padding: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 22px;
  background:
    radial-gradient(ellipse 36px 20px at 20% 20%, rgba(255, 255, 255, 0.58), transparent 70%),
    rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 12px 28px rgba(35, 74, 112, 0.08);
}

.category-tab {
  flex: 1 1 auto;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.category-tab.active {
  color: #102038;
  border-color: rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(ellipse 26px 16px at 22% 18%, rgba(255, 255, 255, 0.8), transparent 65%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(225, 246, 255, 0.34));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.98), inset 0 -1px 0 rgba(64, 119, 164, 0.08), 0 12px 24px rgba(35, 74, 112, 0.1);
}

.template-list {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
}

.template-card {
  position: relative;
  width: 100%;
  min-height: 48px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0);
  border-radius: 22px;
  background: transparent;
  color: inherit;
  text-align: left;
  overflow: hidden;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.template-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 36px 22px at 18% 20%, rgba(255, 255, 255, 0.72), transparent 64%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.42), transparent 42%, rgba(108, 193, 232, 0.12));
  opacity: 0;
  transition: opacity 160ms ease;
}

.template-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.18);
}

.template-card:hover::before,
.template-card.active::before {
  opacity: 1;
}

.template-card.active {
  border-color: rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(ellipse 42px 26px at 16% 18%, rgba(255, 255, 255, 0.78), transparent 68%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(218, 243, 255, 0.28));
  box-shadow: inset 3px 0 0 rgba(0, 122, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.96), inset 0 -1px 0 rgba(64, 119, 164, 0.08), 0 18px 36px rgba(35, 74, 112, 0.12);
}

.template-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.45;
}

.template-card h3 > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.new-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background:
    radial-gradient(ellipse 18px 10px at 24% 18%, rgba(255, 255, 255, 0.82), transparent 68%),
    linear-gradient(145deg, rgba(255, 189, 46, 0.96), rgba(255, 118, 70, 0.92));
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), 0 10px 20px rgba(255, 118, 70, 0.16);
}

.title-badge {
  min-height: 22px;
  padding: 3px 9px;
  font-size: 11px;
  vertical-align: middle;
}

.reader {
  display: grid;
  grid-template-rows: auto auto 1fr;
  padding: 30px 34px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.13)),
    rgba(226, 246, 255, 0.16);
}

.title-stack {
  min-width: 0;
}

.title-stack h2 {
  font-size: clamp(30px, 2.3vw, 42px);
  line-height: 1.08;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  background:
    radial-gradient(ellipse 36px 18px at 28% 18%, rgba(255, 255, 255, 0.52), transparent 68%),
    linear-gradient(145deg, rgba(35, 145, 255, 0.96), rgba(0, 122, 255, 0.92)),
    var(--blue);
  color: #fff;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), 0 18px 44px rgba(20, 121, 255, 0.22);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.meta-row {
  min-height: 34px;
  margin: 14px 0 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.pill {
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(95, 125, 156, 0.14);
  border-radius: 999px;
  background:
    radial-gradient(ellipse 26px 14px at 18% 20%, rgba(255, 255, 255, 0.62), transparent 68%),
    rgba(255, 255, 255, 0.3);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.content-view {
  min-height: 0;
  margin: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 32px;
  background:
    radial-gradient(ellipse 92px 62px at 12% 10%, rgba(255, 255, 255, 0.62), transparent 70%),
    radial-gradient(ellipse 58px 92px at 86% 22%, rgba(255, 255, 255, 0.34), transparent 72%),
    radial-gradient(ellipse 120px 78px at 76% 88%, rgba(108, 193, 232, 0.08), transparent 76%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.14));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(64, 119, 164, 0.08), 0 22px 56px rgba(35, 74, 112, 0.1);
  backdrop-filter: blur(26px) saturate(1.5);
  -webkit-backdrop-filter: blur(26px) saturate(1.5);
}

.content-pre {
  margin: 0;
  padding: 28px 30px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: #17243a;
  font-size: 16px;
  line-height: 1.9;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.empty-state {
  height: 100%;
  min-height: 320px;
  padding: 28px;
  display: grid;
  place-content: center;
  text-align: center;
}

.empty-state.compact {
  min-height: 160px;
  padding: 16px;
}

.empty-state h3 {
  font-size: 22px;
}

.empty-state p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 50;
  max-width: min(360px, calc(100vw - 52px));
  padding: 13px 16px;
  border: 1px solid rgba(95, 125, 156, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  box-shadow: 0 18px 44px rgba(47, 95, 145, 0.14);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 22px;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(360px, 100%);
  padding: 22px;
  border-radius: 26px;
}

.login-card h1 {
  font-size: 30px;
  line-height: 1.18;
}

.login-note {
  margin: 12px 0 22px;
  color: var(--muted);
  line-height: 1.7;
}

.password-field {
  display: grid;
}

.password-field input {
  height: 48px;
  padding: 0 13px;
  border: 1px solid rgba(95, 125, 156, 0.18);
  border-radius: 16px;
  outline: 0;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.login-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.09);
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
}

.login-card .primary-button {
  width: 100%;
  margin-top: 12px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(20, 121, 255, 0.28);
  background-clip: content-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
    padding: 12px;
  }

  .portal-shell {
    min-height: 100vh;
    padding: 12px;
  }

  .main-nav {
    justify-self: stretch;
  }

  .nav-pill,
  .side-nav-link {
    flex: 1;
  }

  .download-panel {
    min-height: auto;
    padding: 22px;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .latest-download {
    display: none;
  }

  .workspace {
    grid-template-columns: 1fr;
    height: auto;
  }

  .sidebar {
    max-height: none;
    overflow: visible;
  }

  .template-list {
    overflow: visible;
    padding-right: 0;
  }

  .reader {
    min-height: 620px;
    padding: 22px;
  }

  .reader-top {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button {
    width: 100%;
  }
}
