/* 清爽实用：在原有主题体系上统一导航、搜索和资源列表。 */
:root {
  --sidebar-width: 168px;
  --sidebar-collapsed-width: 64px;
  --ui-surface: #ffffff;
  --ui-muted: #f4f5f7;
  --ui-border: #e8e8ed;
  --ui-ink: #292735;
  --ui-secondary: #696674;
  --ui-page: #f8f8fa;
  --ui-shadow: 0 12px 32px rgb(35 26 44 / 8%);
}
html[data-palette="rose"] { --primary-color: #af4268; --primary-soft: #f8eaf0; --secondary-color: #5a65a6; --ring: #af4268; }
html[data-theme="dark"] {
  --ui-surface: #22232c; --ui-muted: #292b35; --ui-border: #383a47;
  --ui-ink: #f0eef5; --ui-secondary: #b0adbf; --ui-page: #191a21;
  --ui-shadow: 0 12px 32px rgb(0 0 0 / 24%);
}
html[data-theme="dark"][data-palette="rose"] { --primary-color: #f0a4bf; --primary-soft: #402d38; --ring: #f0a4bf; }
html { scroll-padding-top: 76px; }
body {
  color: var(--ui-ink); background-color: var(--ui-page); padding-top: 56px;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6; transition: background-color 180ms ease;
}
body::before { background: none; }
html[data-theme="dark"] body::before { background: rgb(16 17 23 / 35%); }
::selection { background: var(--primary-soft); color: var(--primary-color); }
input { caret-color: var(--primary-color); }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, .card:focus-visible {
  outline: 2px solid var(--primary-color); outline-offset: 4px;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 3000; background: var(--ui-surface); color: var(--primary-color); padding: 12px 18px; border-radius: 8px; }
.skip-link:focus { top: 10px; }
/* Persistent desktop navigation. */
#sidebar, html[data-theme="dark"] #sidebar {
  top: 0; height: 100dvh; width: var(--sidebar-width); padding: 24px 14px 18px;
  background: var(--ui-surface); border-right: 1px solid var(--ui-border); border-radius: 0;
  backdrop-filter: none; -webkit-backdrop-filter: none; will-change: auto;
  transition: width 180ms ease; overflow: hidden;
}
.sidebar-header { flex-shrink: 0; gap: 6px; padding: 0 2px 22px; margin: 0; border: 0; min-height: 58px; }
.sidebar-brand { gap: 10px; overflow: visible; }
.brand-mark, .brand-icon { width: 36px; height: 36px; min-width: 36px; box-shadow: none; }
.sidebar-brand-text { color: var(--ui-ink); font-size: 22px; font-weight: 750; letter-spacing: 1px; }
#toggle-sidebar, html[data-theme="dark"] #toggle-sidebar { width: 28px; height: 32px; min-width: 28px; padding: 5px; color: var(--ui-secondary); background: transparent; border: 0; box-shadow: none; }
.sidebar-caption { color: var(--ui-secondary); font-size: 11px; padding: 4px 12px 16px; white-space: nowrap; }
#sidebar ul {
  display: flex; flex-direction: column; gap: 5px; width: 100%; padding: 0; margin: 0;
  flex: 1 1 0; min-height: 0; overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain; scrollbar-gutter: auto;
  scrollbar-width: none; -ms-overflow-style: none;
}
#sidebar ul::-webkit-scrollbar { display: none; }
#sidebar ul::-webkit-scrollbar-track { background: transparent; }
#sidebar ul::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--ui-secondary) 38%, transparent); border-radius: 8px; }
#sidebar .sidebar-tools { flex-shrink: 0; }
#sidebar li { flex-shrink: 0; width: 100%; margin: 0; }
#sidebar li a, html[data-theme="dark"] #sidebar li a {
  display: flex; flex-direction: row; align-items: center; justify-content: flex-start; width: 100%;
  gap: 12px; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 9px;
  background: transparent; color: var(--ui-secondary); font-size: 14px; font-weight: 500;
  box-shadow: none; transform: none; transition: background-color 160ms ease, color 160ms ease;
}
#sidebar li a .svg-icon { width: 18px; height: 18px; color: inherit; font-size: 18px; }
#sidebar li a:hover, html[data-theme="dark"] #sidebar li a:hover { background: var(--ui-muted); color: var(--ui-ink); }
#sidebar li a.active, html[data-theme="dark"] #sidebar li a.active { background: var(--primary-soft); color: var(--primary-color); font-weight: 650; box-shadow: none; }
#sidebar:not(.hidden) .sidebar-tools, html[data-theme="dark"] #sidebar:not(.hidden) .sidebar-tools {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 12px 0 0; border-top: 1px solid var(--ui-border);
  border-radius: 0; background: transparent; box-shadow: none; margin-top: auto;
}
#sidebar:not(.hidden) .sidebar-tool-button { min-height: 48px; gap: 7px; padding: 10px 6px; flex-direction: row; color: var(--ui-secondary); border-radius: 8px; }
#sidebar:not(.hidden) .sidebar-tool-button .svg-icon { width: 16px; height: 16px; color: inherit; }
#sidebar:not(.hidden) .sidebar-tool-button .sidebar-label { font-size: 11px; font-weight: 500; letter-spacing: 0; }
#sidebar:not(.hidden) .sidebar-tool-button:hover { transform: none; box-shadow: none; background: var(--ui-muted); color: var(--primary-color); }
#sidebar:not(.hidden) .sidebar-tool-button:hover .svg-icon { transform: none; }
#sidebar:not(.hidden) .sidebar-tool-button::after { display: none; }
#sidebar.hidden, html[data-theme="dark"] #sidebar.hidden {
  width: var(--sidebar-collapsed-width); min-width: var(--sidebar-collapsed-width);
  max-width: var(--sidebar-collapsed-width); padding-inline: 8px;
}
#sidebar.hidden .sidebar-caption, #sidebar.hidden .sidebar-brand { display: none; }
#sidebar.hidden .sidebar-header { justify-content: center; padding: 0 0 10px; }
/* Remove label layout space while retaining accessible control names. */
#sidebar.hidden .sidebar-label {
  position: absolute; width: 1px; height: 1px; max-width: none; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 1; transform: none;
}
#sidebar.hidden li a, html[data-theme="dark"] #sidebar.hidden li a {
  width: 40px; min-height: 40px; margin-inline: auto; padding: 0; gap: 0; justify-content: center;
}
#sidebar.hidden .sidebar-tools {
  display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: 40px;
  justify-items: center; gap: 6px; min-width: 0; margin-top: 12px; padding: 8px 0 0;
  border-top: 1px solid var(--ui-border); border-radius: 0; background: transparent; box-shadow: none;
}
#sidebar.hidden .sidebar-tools .sidebar-tool-button {
  display: flex; position: relative; flex-direction: row; align-items: center; justify-content: center;
  width: 40px; min-width: 40px; max-width: 40px; height: 40px; min-height: 40px;
  padding: 0; gap: 0; border: 0; border-radius: 10px; color: var(--ui-secondary);
  background: var(--reading-glass); background-image: var(--glass-glint); box-shadow: var(--glass-inset);
}
#sidebar.hidden .sidebar-tools .sidebar-tool-button .svg-icon {
  flex: 0 0 18px; width: 18px; height: 18px; margin: 0;
}
#sidebar.hidden .sidebar-tools .sidebar-tool-button::after { display: none; }
#sidebar.hidden .sidebar-tools .sidebar-tool-button:hover { color: var(--secondary-color); background-color: var(--secondary-soft); }
/* Quiet utility bar. */
#scrolling-text { left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); height: 56px; background: var(--ui-page); border: 0; backdrop-filter: none; }
body.sidebar-collapsed #scrolling-text { left: var(--sidebar-collapsed-width); width: calc(100% - var(--sidebar-collapsed-width)); }
#scrolling-text .top-bar-inner { padding: 0 36px; }
#scrolling-text .time-hm { color: var(--ui-ink); font-size: 15px; font-weight: 650; }
#scrolling-text .time-sec, #scrolling-text .time-sep { display: none; }
#scrolling-text .time-meta .tm-row1 { color: var(--ui-secondary); font-size: 12px; opacity: 1; }
#scrolling-text .top-bar-center { color: var(--ui-secondary); font-size: 12px; }
.games-toggle { background: var(--ui-surface); border: 1px solid var(--ui-border); box-shadow: none; color: var(--ui-secondary); font-size: 12px; min-height: 34px; border-radius: 8px; }
.games-toggle:hover { color: var(--primary-color); background: var(--primary-soft); transform: none; }
/* Search is the main arrival action. */
#content { display: block; width: min(100%, 1320px); max-width: 1320px; margin: 0 auto; padding: 32px 40px 28px; }
.welcome { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; text-align: center; gap: 16px; margin-bottom: 24px; }
.welcome h1 { font-size: clamp(24px, 2.35vw, 32px); line-height: 1.4; font-weight: 750; letter-spacing: -.025em; text-wrap: balance; color: var(--ui-ink); }
.welcome p { color: var(--ui-secondary); font-size: 13px; margin-top: 8px; }
.welcome-settings { position: absolute; right: 0; top: 8px; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px; border: 0; background: transparent; color: var(--ui-secondary); font-size: 12px; white-space: nowrap; border-radius: 8px; }
.welcome-settings:hover { background: var(--ui-surface); color: var(--primary-color); }
.search-main { display: grid; grid-template-columns: 120px minmax(0, 720px) 120px; justify-content: center; gap: 18px; width: 100%; margin: 0 0 40px; align-items: stretch; }
.search-area { display: block; grid-column: 2; grid-row: 1; width: 100%; max-width: none; min-width: 0; }
#search-tabs { display: flex; justify-content: flex-start; flex-wrap: nowrap; gap: 4px; margin: 0 0 10px; padding: 0; overflow-x: auto; scrollbar-width: none; }
#search-tabs button, html[data-theme="dark"] #search-tabs button { flex: 0 0 auto; min-height: 32px; padding: 4px 13px; border: 0; border-radius: 6px; background: transparent; color: var(--ui-secondary); font-size: 12px; box-shadow: none; backdrop-filter: none; }
#search-tabs button:first-child { margin-left: 0; }
#search-tabs button.active { color: var(--primary-color); background: var(--primary-soft); font-weight: 650; box-shadow: none; }
#search-tabs button:hover { transform: none; box-shadow: none; color: var(--primary-color); }
#search-bar, html[data-theme="dark"] #search-bar { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 7px 6px 18px; background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: 12px; box-shadow: none; backdrop-filter: none; }
#search-bar:focus-within { border-color: var(--primary-color); box-shadow: none; }
.search-leading-icon { width: 19px; height: 19px; color: var(--ui-secondary); }
#search-input { width: 100%; min-width: 0; padding: 0; color: var(--ui-ink); background: transparent; font-size: 14px; border: 0; outline: none; }
#search-input::placeholder, html[data-theme="dark"] #search-input::placeholder { color: var(--ui-secondary); opacity: 1; }
#search-input:focus-visible { outline: 0; }
#search-button { display: flex; align-items: center; justify-content: center; width: 42px; min-width: 42px; height: 42px; border-radius: 8px; background: var(--primary-color); color: var(--ui-surface); border: 0; box-shadow: none; }
#search-button:hover { transform: none; filter: brightness(.94); }
kbd { padding: 0 5px; margin-right: 3px; border: 1px solid var(--ui-border); border-bottom-width: 2px; border-radius: 4px; font-family: inherit; background: var(--ui-surface); }
.countdown-container:first-child { grid-column: 1; grid-row: 1; }
.countdown-container:last-child { grid-column: 3; grid-row: 1; }
.countdown-container, html[data-theme="dark"] .countdown-container { min-width: 0; padding: 12px 8px; margin: 0; border: 0; border-radius: 12px; background: var(--ui-muted); backdrop-filter: none; box-shadow: none; }
.countdown-container:hover { transform: none; box-shadow: none; }
.countdown-container .countdown-days { color: var(--ui-secondary); font-size: 11px; margin: 0 0 4px; }
.countdown { font-size: 12px; line-height: 1.5; }
#kaoyan, #kaogong { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; }
.countdown-edit { display: block; margin: 5px auto 0; padding: 3px 0; font-size: 10px; background: transparent; border: 0; color: var(--ui-secondary); text-underline-offset: 4px; }
.countdown-edit:hover { color: var(--primary-color); text-decoration: underline; }
/* Sections are open, aligned lists rather than stacked glass panels. */
.column, .column.active, html[data-theme="dark"] .column { width: 100%; padding: 0; margin: 0 0 40px; background: transparent; border: 0; box-shadow: none; border-radius: 0; scroll-margin-top: 76px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0 0 16px; }
.section-heading h2 { font-size: 20px; line-height: 1.4; color: var(--ui-ink); font-weight: 700; letter-spacing: -.02em; }
.section-count { color: var(--ui-secondary); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.module-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0 0 12px; border: 0; border-bottom: 1px solid var(--ui-border); border-radius: 0; background: transparent; }
.module-tab { width: auto; min-height: 36px; padding: 8px 14px; font-size: 12px; font-weight: 500; color: var(--ui-secondary); border: 0; border-radius: 7px; }
.module-tab:hover { background: var(--ui-muted); color: var(--ui-ink); }
.module-tab.active { color: var(--primary-color); background: var(--primary-soft); font-weight: 650; border: 0; box-shadow: none; }
.sub-column { border: 0; padding: 0; margin: 0; }
#offen-links .sub-column + .sub-column { margin-top: 30px; }
.sub-column h3, .column:not([data-no-tabs]) .sub-column h3 { display: flex; justify-content: flex-start; gap: 8px; margin: 0 0 12px; font-size: 14px; font-weight: 650; text-align: left; color: var(--ui-ink); }
.column:not([data-no-tabs]) .sub-column h3 { display: none; }
body.searching .column .sub-column h3 { display: flex; margin-top: 18px; }
.sub-column h3 .svg-icon { color: var(--primary-color); background: transparent; padding: 0; width: 17px; height: 17px; border-radius: 0; }
.section-note { margin: -4px 0 14px; color: var(--ui-secondary); font-size: 11px; }
.card-container { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.card, html[data-theme="dark"] .card {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto auto;
  column-gap: 11px; row-gap: 3px; align-content: center; align-items: center; justify-content: stretch;
  min-height: 74px; height: auto; padding: 12px; text-decoration: none;
  background: var(--ui-surface); color: var(--ui-ink); border: 1px solid var(--ui-border); border-radius: 12px;
  font-size: 13px; font-weight: 600; line-height: 1.45; text-align: left; word-break: normal;
  box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.card::before, .card::after { display: none; }
.card img, .card img.fallback-icon { grid-column: 1; grid-row: 1 / 3; width: 30px; height: 30px; max-width: 30px; padding: 0; margin: 0; border: 0; border-radius: 7px; background: transparent; object-fit: contain; box-shadow: none; }
.card-label { text-align: left; grid-column: 2; grid-row: 1; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.5; overflow-wrap: anywhere; }
.card-description { text-align: left; grid-column: 2; grid-row: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: var(--ui-secondary); font-weight: 400; }
.card:hover, html[data-theme="dark"] .card:hover { background: var(--ui-surface); border-color: var(--primary-color); transform: none; color: var(--primary-color); box-shadow: none; }
.card:hover img { transform: none; background: transparent; border: 0; }
.card:active { transform: none; background: var(--primary-soft); }
.badge-new { display: none; }
.frequent-count { display: none; }
.campus-directory { display: block; }
.campus-group + .campus-group { margin-top: 16px; }
.campus-group h4 { font-size: 11px; font-weight: 500; color: var(--ui-secondary); margin: 0 0 8px; }
body.searching .campus-group:not(:has(.card:not(.is-hidden))) { display: none; }
.search-feedback { padding: 10px 12px; border: 1px solid var(--ui-border); border-radius: 8px; background: var(--ui-surface); color: var(--ui-ink); font-size: 12px; }
.search-feedback button { color: var(--primary-color); min-height: 32px; }
[hidden], .card.is-hidden, .column.is-filtered-out, .sub-column.is-empty { display: none !important; }
.search-history-item { background: var(--ui-surface); border-color: var(--ui-border); }
.site-footer { border-top: 1px solid var(--ui-border); padding: 22px 0 0; color: var(--ui-secondary); font-size: 11px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer p { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.site-footer strong { color: var(--ui-ink); font-size: 14px; font-weight: 650; }
.site-footer button { padding: 5px 0; border: 0; background: transparent; color: var(--ui-secondary); font-size: inherit; }
.site-footer button:hover { color: var(--primary-color); text-decoration: underline; }
.floating-button { width: 40px; height: 40px; right: 16px; background: var(--ui-surface); color: var(--ui-secondary); border: 1px solid var(--ui-border); border-radius: 10px; box-shadow: none; }
.floating-button:hover { background: var(--primary-soft); color: var(--primary-color); transform: none; }
#create-desktop-shortcut { bottom: 120px; }
#open-contact-modal { bottom: 70px; }
#scroll-to-top { bottom: 20px; }
/* Existing settings retain their functions with opaque, readable surfaces. */
.modal { background: rgb(20 18 28 / 38%); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal-content-wrapper { background: var(--ui-surface); color: var(--ui-ink); border: 0; border-radius: 16px; box-shadow: var(--ui-shadow); }
.modal .title { background: var(--ui-surface); color: var(--ui-ink); border-bottom: 1px solid var(--ui-border); font-size: 18px; }
.modal .title .svg-icon { color: var(--primary-color); }
.modal-close { color: var(--ui-secondary); min-width: 40px; min-height: 40px; }
.modal-footer { background: var(--ui-surface); border-top-color: var(--ui-border); }
.theme-option, .palette-btn, .bg-btn { min-height: 42px; }
@media (max-width: 1150px) and (min-width: 981px) { :root { --sidebar-width: 172px; } #content { padding-inline: 28px; } .search-main { grid-template-columns: 98px minmax(0,1fr) 98px; gap: 10px; } #search-tabs button { padding-inline: 9px; } }
@media (max-width: 980px) {
  body, body.sidebar-collapsed { padding-left: 0; padding-top: 106px; }
  #scrolling-text, body.sidebar-collapsed #scrolling-text { left: 0; width: 100%; height: 52px; }
  #scrolling-text .top-bar-inner { padding-inline: 22px; }
  #scrolling-text .top-bar-center { display: none; }
  .top-bar-actions { display: flex; gap: 6px; margin-left: auto; }
  .top-bar-actions .icon-button, .top-bar-actions .lang-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; background: transparent; color: var(--ui-secondary); border: 0; border-radius: 6px; box-shadow: none; font-size: 12px; }
  .top-bar-actions .about-open { display: none; }
  .top-bar-actions .games-toggle { width: 36px; height: 36px; min-height: 36px; padding: 0; background: transparent; border: 0; }
  .games-toggle-label { display: none; }
  header.nav-main { display: block !important; position: fixed; top: 52px; left: 0; right: 0; height: 50px; padding: 0 16px; z-index: 998; background: var(--ui-surface); border-bottom: 1px solid var(--ui-border); box-shadow: none; border-radius: 0; backdrop-filter: none; }
  header.nav-main .nav-actions { display: none; }
  header.nav-main nav { display: flex; overflow-x: auto; justify-content: flex-start; gap: 4px; width: 100%; height: 100%; padding: 4px 0; scrollbar-width: none; }
  header.nav-main nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px; margin: 0; border-radius: 7px; color: var(--ui-secondary); background: transparent; font-size: 12px; flex: 0 0 auto; text-decoration: none; }
  header.nav-main nav a.active { color: var(--primary-color); background: var(--primary-soft); font-weight: 650; }
  header.nav-main nav a .svg-icon { display: none; }
  #content { padding: 28px 24px; }
  .column { scroll-margin-top: 122px; }
  html { scroll-padding-top: 122px; }
}
@media (max-width: 600px) {
  #scrolling-text .top-bar-inner { padding-inline: 16px; }
  #scrolling-text .time-meta .tm-row1 { font-size: 10px; }
  #scrolling-text .time-hm { font-size: 14px; }
  .top-bar-actions { gap: 1px; }
  .top-bar-actions .icon-button, .top-bar-actions .lang-toggle, .top-bar-actions .games-toggle { width: 32px; }
  #content { padding: 24px 16px 90px; }
  .welcome { margin-bottom: 18px; }
  .welcome h1 { font-size: 23px; letter-spacing: -.03em; }
  .welcome p { font-size: 11px; line-height: 1.7; margin-top: 7px; }
  .welcome-settings { display: none; }
  .search-main { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-bottom: 30px; }
  .search-area { display: block; grid-column: 1 / -1; }
  #search-tabs { gap: 1px; margin-bottom: 9px; }
  #search-tabs button { min-height: 34px; font-size: 11px; padding-inline: 11px; }
  #search-bar { min-height: 54px; padding-left: 14px; gap: 10px; }
  #search-input { font-size: 13px; }
  .countdown-container { padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; text-align: left; align-content: center; }
  .countdown-days { grid-column: 1; align-self: center; }
  .countdown { grid-column: 2; grid-row: 1 / 3; }
  #kaoyan, #kaogong { font-size: 24px; }
  .countdown-edit { grid-column: 1; margin: 0; text-align: left; font-size: 10px; }
  .column { margin-bottom: 30px; }
  .section-heading h2 { font-size: 18px; }
  .section-heading { margin-bottom: 14px; }
  .card-container { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .card { min-height: 72px; padding: 11px 10px; column-gap: 9px; font-size: 12px; grid-template-columns: 28px minmax(0,1fr); }
  .card img, .card img.fallback-icon { width: 28px; height: 28px; max-width: 28px; }
  .card-description { font-size: 9px; }
  .module-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 4px; padding-bottom: 10px; scrollbar-width: thin; }
  .module-tab { min-height: 38px; padding-inline: 12px; font-size: 11px; }
  .section-note { font-size: 10px; line-height: 1.7; }
  .campus-directory { gap: 14px; }
  .site-footer { padding-right: 24px; font-size: 10px; }
  .site-footer p { gap: 10px; }
  #create-desktop-shortcut { display: none; }
  .floating-button { right: 10px; width: 36px; height: 36px; }
  #open-contact-modal { bottom: 66px; }
  #scroll-to-top { bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  #sidebar, body, .card, .modal, .modal-content-wrapper, .sidebar-tool-button, .svg-icon { transition: none; animation: none; }
}

#sidebar li a.active::before { display: none; }
#sidebar li a.active .svg-icon { color: var(--primary-color); }
@media (min-width: 601px) and (max-width: 850px) { .search-main { grid-template-columns: minmax(0,1fr); } .search-area { grid-column: 1 / -1; } .welcome-settings { display: none; } }

html[data-theme="dark"] #search-tabs button.active { background: var(--primary-soft); color: var(--primary-color); }
.modal .content, .modal .modal-content { background: var(--ui-surface); color: var(--ui-ink); }
.countdown-setting-item { --countdown-accent: var(--primary-color); background: var(--ui-muted); }
.countdown-setting-item input { color: var(--ui-ink); }
/* 回到原版的通透导航：紧凑搜索、纵向图标卡片和有层次的按钮。 */
:root {
  --sidebar-width: 168px;
  --reading-glass: rgb(255 255 255 / 70%);
  --navigation-glass: rgb(255 255 255 / 72%);
  --ui-ink: #172033;
  --ui-secondary: #3d4453;
  --button-on-accent: #fff;
}
html[data-theme="dark"] {
  --reading-glass: rgb(25 30 44 / 82%);
  --navigation-glass: rgb(25 30 44 / 80%);
  --ui-ink: #f2f4fb; --ui-secondary: #d1d6e3;
  --button-on-accent: #202538;
}
body { padding-top: 44px; }
#content { padding: 28px 28px 40px; }
#content.shifted { margin-inline: auto; }
/* Keep the page heading available to assistive technology without a large hero. */
.welcome { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.welcome-settings { display: none; }
.start-panel, html[data-bg]:not([data-bg="none"]) .start-panel { width: min(100%, 1160px); margin-inline: auto; min-width: 0; padding: 0; margin-bottom: 24px; background: none; border: 0; backdrop-filter: none; }
.search-main { grid-template-columns: 132px minmax(0, 720px) 132px; justify-content: space-between; align-items: center; gap: 24px; margin: 0; }
#search-tabs { justify-content: center; gap: 7px; margin-bottom: 10px; padding: 2px; }
#search-tabs button, html[data-theme="dark"] #search-tabs button {
  padding: 6px 14px; min-height: 34px; background: var(--navigation-glass); color: var(--ui-secondary);
  border: 1px solid color-mix(in srgb, var(--ui-surface) 65%, transparent); border-radius: 999px;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
#search-tabs button.active, html[data-theme="dark"] #search-tabs button.active {
  color: var(--button-on-accent); background: var(--secondary-color); border-color: transparent; font-weight: 650;
  box-shadow: 0 3px 8px color-mix(in srgb, var(--secondary-color) 20%, transparent);
}
#search-bar, html[data-theme="dark"] #search-bar {
  min-height: 54px; background: var(--reading-glass); border: 1px solid color-mix(in srgb, var(--ui-surface) 65%, transparent);
  border-radius: 12px; backdrop-filter: none; -webkit-backdrop-filter: none;
}
#search-bar:focus-within { border-color: var(--secondary-color); }
#search-button { color: var(--button-on-accent); background: var(--secondary-color); box-shadow: none; border-radius: 9px; }
.countdown-container, html[data-theme="dark"] .countdown-container {
  padding: 14px 10px; min-height: 102px; background: var(--reading-glass); border-radius: 12px;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.countdown-container .countdown-days { font-size: 13px; font-weight: 650; }
#kaoyan, #kaogong { font-size: 22px; }
.countdown-edit { padding: 2px 6px; min-height: 24px; margin-top: 4px; border-radius: 6px; background: transparent; color: var(--ui-secondary); font-size: 10px; }
.countdown-edit:hover { text-decoration: none; color: var(--primary-color); background: var(--primary-soft); }
/* The topbar and sidebar share the wallpaper material. */
#scrolling-text, body.sidebar-collapsed #scrolling-text { left: 0; width: 100%; height: 44px; background: var(--navigation-glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid color-mix(in srgb, var(--ui-surface) 40%, transparent); }
#scrolling-text .top-bar-inner { padding-inline: 16px; }
#scrolling-text .time-hm { color: var(--primary-color); font-size: 20px; font-weight: 650; }
#scrolling-text .time-sec, #scrolling-text .time-sep { display: inline; color: var(--ui-secondary); }
#scrolling-text .time-sep { animation: none; opacity: .6; font-size: 14px; }
#scrolling-text .time-meta .tm-row1 { font-size: 12px; }
#sidebar, html[data-theme="dark"] #sidebar { top: 44px; height: calc(100dvh - 44px); padding: 12px 12px 14px; background: var(--navigation-glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 0 14px 14px 0; }
.sidebar-header { min-height: 42px; padding: 0 2px 9px; margin-bottom: 12px; border-bottom: 1px solid color-mix(in srgb, var(--ui-secondary) 16%, transparent); }
.sidebar-caption { display: none; }
.sidebar-brand { gap: 7px; }
.sidebar-brand-text { font-size: 20px; letter-spacing: 0; }
.brand-mark, .brand-icon { width: 32px; height: 32px; min-width: 32px; }
#toggle-sidebar, html[data-theme="dark"] #toggle-sidebar { width: 30px; height: 32px; min-width: 30px; border-radius: 9px; background: var(--reading-glass); }
#sidebar ul { gap: 6px; }
#sidebar li a, html[data-theme="dark"] #sidebar li a { min-height: 46px; padding: 11px 14px; gap: 12px; background: var(--reading-glass); color: var(--ui-secondary); border: 1px solid color-mix(in srgb, var(--ui-surface) 42%, transparent); border-radius: 11px; }
#sidebar li a.active, html[data-theme="dark"] #sidebar li a.active { color: var(--button-on-accent); background: linear-gradient(115deg, var(--primary-color), var(--secondary-color)); border-color: transparent; box-shadow: 0 4px 10px color-mix(in srgb, var(--primary-color) 16%, transparent); }
#sidebar li a.active .svg-icon { color: inherit; }
#sidebar:not(.hidden) .sidebar-tools, html[data-theme="dark"] #sidebar:not(.hidden) .sidebar-tools { margin-top: 12px; padding: 9px 3px; gap: 5px; border: 0; border-radius: 12px; background: var(--reading-glass); }
#sidebar:not(.hidden) .sidebar-tool-button { padding: 6px 3px; min-height: 42px; gap: 6px; flex-direction: column; }
#sidebar:not(.hidden) .sidebar-tool-button .sidebar-label { font-size: 10px; }
/* Original vertical cards show recognizable icons and stronger website names. */
.column, .column.active, html[data-theme="dark"] .column { width: min(100%, 1160px); margin-inline: auto; margin-bottom: 24px; padding: 18px; border-radius: 14px; background: var(--reading-glass); border: 1px solid color-mix(in srgb, var(--ui-surface) 46%, transparent); box-shadow: none; }
html[data-bg="none"] .column { background: var(--ui-surface); border-color: var(--ui-border); }
html[data-bg]:not([data-bg="none"]) .column { backdrop-filter: none; -webkit-backdrop-filter: none; }
.section-heading h2 { font-size: 18px; }
.section-heading { margin-bottom: 12px; }
#offen-links > .section-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.sub-column h3 { justify-content: center; font-size: 16px; margin: 0 0 14px; }
.sub-column h3 .svg-icon { width: 28px; height: 28px; padding: 5px; border-radius: 8px; color: var(--secondary-color); background: var(--secondary-soft); }
#offen-links .section-note { display: none; }
#offen-links .sub-column + .sub-column { margin-top: 22px; padding-top: 20px; border-top: 1px solid color-mix(in srgb, var(--ui-secondary) 18%, transparent); }
.card-container { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.card, html[data-theme="dark"] .card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 78px; padding: 10px 8px; border: 1px solid var(--ui-border); border-radius: 11px;
  background: color-mix(in srgb, var(--ui-surface) 91%, transparent); color: var(--ui-ink);
  font-size: 14px; font-weight: 650; line-height: 1.4; text-align: center;
  box-shadow: 0 2px 7px rgb(24 30 46 / 4%);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
.card-label { text-align: center; flex: 0 0 auto; width: 100%; }
.card-description { display: none; }
.card img, .card img.fallback-icon { width: 28px; height: 28px; max-width: 28px; padding: 0; border-radius: 7px; }
.card::before { display: block; position: absolute; left: 0; top: 0; width: 100%; height: 3px; content: ''; border-radius: 11px 11px 0 0; background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); transform: scaleX(0); transform-origin: left; transition: transform 180ms ease; }
.card:hover::before, .card:focus-visible::before { transform: scaleX(1); }
.badge-new { display: block; top: 4px; left: 4px; padding: 2px 5px; font-size: 9px; border-radius: 5px; background: #d84c35; color: #fff; box-shadow: 0 2px 6px rgb(180 50 30 / 16%); animation: none; }
.frequent-count { display: inline-flex; position: absolute; top: 6px; right: 6px; padding: 2px 5px; min-width: 19px; height: 18px; border-radius: 999px; background: linear-gradient(115deg,var(--primary-color),var(--secondary-color)); color: var(--button-on-accent); font-size: 10px; line-height: 1; font-weight: 700; box-shadow: 0 2px 5px rgb(30 20 55 / 14%); }
/* Keep access groups in the DOM while presenting one compact campus grid. */
.campus-directory { display: grid; }
.campus-group, .campus-group .card-container { display: contents; }
.campus-group + .campus-group { margin: 0; }
.campus-group h4 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.module-tabs { gap: 7px; padding: 5px; background: color-mix(in srgb,var(--ui-surface) 55%,transparent); border: 0; border-radius: 9px; }
.module-tab { min-height: 36px; padding: 7px 13px; border-radius: 7px; font-weight: 600; }
.module-tab.active { color: var(--primary-color); background: var(--ui-surface); border: 1px solid color-mix(in srgb,var(--secondary-color) 22%,transparent); box-shadow: 0 2px 6px rgb(24 30 46 / 6%); }
.floating-button { backdrop-filter: none; -webkit-backdrop-filter: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--primary-color); color: var(--button-on-accent); box-shadow: 0 6px 16px rgb(30 20 45 / 15%); }
.floating-button:hover { color: var(--button-on-accent); background: var(--primary-color); }
#create-desktop-shortcut { bottom: 132px; } #open-contact-modal { bottom: 76px; } #scroll-to-top { bottom: 20px; }
.games-toggle { min-height: 34px; padding: 6px 13px; color: var(--button-on-accent); background: linear-gradient(110deg,var(--secondary-color),color-mix(in srgb,var(--accent-color) 76%,#102b3e)); border: 0; border-radius: 999px; box-shadow: 0 3px 9px rgb(30 40 90 / 12%); }
.games-toggle:hover { color: var(--button-on-accent); background: linear-gradient(110deg,var(--secondary-color),color-mix(in srgb,var(--accent-color) 76%,#102b3e)); }
.site-footer { width: min(100%, 1160px); margin-inline: auto; padding: 16px; border-radius: 12px; border: 0; background: var(--reading-glass); backdrop-filter: none; -webkit-backdrop-filter: none; }
/* Preserve the improved settings and mobile controls. */
.theme-option { border-radius: 9px; min-height: 42px; }
.theme-option.active { color: var(--button-on-accent); background: var(--secondary-color); border-color: transparent; box-shadow: none; }
.palette-btn, .bg-btn { border-width: 2px; border-color: transparent; border-radius: 9px; padding: 6px; gap: 6px; background: var(--ui-muted); }
.palette-btn.active, .bg-btn.active { border-width: 2px; border-color: var(--primary-color); background: var(--primary-soft); box-shadow: none; }
.palette-btn.active .btn-label, .bg-btn.active .btn-label { color: var(--primary-color); font-weight: 650; }
.modal .modal-footer button { min-height: 42px; border-radius: 9px; background: var(--secondary-color); color: var(--button-on-accent); box-shadow: none; }
.modal .modal-footer button:hover { background: var(--secondary-color); color: var(--button-on-accent); filter: brightness(.96); }
.modal button.modal-close { width: 36px; height: 36px; min-height: 36px; border-radius: 9px; }
#topTwText { display: inline-block; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
@media (hover: hover) and (pointer: fine) {
  #search-tabs button:hover:not(.active) { transform: translateY(-1px); background: var(--ui-surface); color: var(--secondary-color); }
  #sidebar li a:hover:not(.active) { background: var(--ui-surface); color: var(--secondary-color); }
  .card:hover, html[data-theme="dark"] .card:hover { transform: translateY(-2px); border-color: color-mix(in srgb,var(--secondary-color) 34%,transparent); background: var(--ui-surface); box-shadow: 0 6px 16px rgb(30 35 70 / 10%); color: var(--ui-ink); }
  #sidebar:not(.hidden) .sidebar-tool-button:hover { color: var(--secondary-color); background: var(--secondary-soft); }
}
@media (max-width: 980px) {
  body, body.sidebar-collapsed { padding-top: 106px; }
  #scrolling-text, body.sidebar-collapsed #scrolling-text { height: 52px; }
  .top-bar-actions .games-toggle { min-height: 36px; width: 36px; padding: 0; background: transparent; color: var(--ui-secondary); box-shadow: none; }
  #scrolling-text .time-sec, #scrolling-text .time-sep { display: none; }
  #content { padding: 22px 20px 40px; }
  .search-main { grid-template-columns: 100px minmax(0,1fr) 100px; gap: 14px; }
  #search-tabs button { padding-inline: 10px; }
}
@media (min-width: 601px) and (max-width: 850px) { .search-main { grid-template-columns: minmax(0,1fr); } .search-area { grid-column: 1 / -1; } }
@media (max-width: 600px) {
  #content { padding: 20px 12px 82px; }
  .search-main { grid-template-columns: minmax(0,1fr); gap: 0; }
  .search-area { grid-column: 1 / -1; }
  #search-tabs { justify-content: flex-start; gap: 5px; margin-bottom: 9px; }
  #search-tabs button, html[data-theme="dark"] #search-tabs button { min-height: 34px; padding: 5px 11px; font-size: 11px; }
  .column, .column.active, html[data-theme="dark"] .column { padding: 14px 12px; margin-bottom: 20px; border-radius: 12px; }
  .card-container { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
  .card, html[data-theme="dark"] .card { min-height: 78px; padding: 9px 5px; gap: 7px; font-size: 12px; }
  .card img, .card img.fallback-icon { width: 26px; height: 26px; max-width: 26px; }
  .sub-column h3 { font-size: 15px; }
  #offen-links .sub-column + .sub-column { margin-top: 18px; padding-top: 16px; }
  .module-tab { font-size: 11px; padding-inline: 10px; }
  .floating-button { width: 40px; height: 40px; }
  .palette-grid, .bg-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
  .palette-grid .palette-btn { min-height: 62px; }
  .palette-grid .palette-btn .psw { height: 20px; min-height: 20px; max-height: 20px; aspect-ratio: auto; flex: 0 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .tw-cursor { animation: none; }
  #search-tabs button, .card, .card::before { transition: none; }
  #search-tabs button:hover, .card:hover, html[data-theme="dark"] .card:hover { transform: none; }
}

@media (min-width: 981px) and (max-width: 1150px) { :root { --sidebar-width: 160px; } }

/* Lightweight glass: static highlights, no canvas or continuous effect loop. */
:root {
  --glass-glint: linear-gradient(145deg, rgb(255 255 255 / 50%), rgb(255 255 255 / 10%) 35%, transparent 58%);
  --glass-edge: rgb(255 255 255 / 76%);
  --choice-edge: rgba(50, 60, 82, .22);
  --choice-hover-edge: rgba(50, 60, 82, .46);
  --choice-active-edge: var(--primary-color);
  --choice-radius: 10px;
  --glass-card: rgb(255 255 255 / 58%);
  --glass-control: rgb(255 255 255 / 54%);
  --glass-dialog: rgb(255 255 255 / 90%);
  --glass-side: rgb(255 255 255 / 28%);
  --glass-shade: rgb(35 42 60 / 10%);
  --glass-inset: inset 0 1px 0 var(--glass-edge), inset 1px 0 0 var(--glass-side), inset 0 -1px 0 var(--glass-shade);
}
html[data-theme="dark"] {
  --glass-glint: linear-gradient(145deg, rgb(255 255 255 / 12%), rgb(255 255 255 / 2%) 35%, transparent 58%);
  --glass-edge: rgb(255 255 255 / 24%);
  --choice-edge: rgba(255, 255, 255, .34);
  --choice-hover-edge: rgba(255, 255, 255, .56);
  --choice-active-edge: rgba(255, 255, 255, .46);
  --glass-card: rgb(34 35 44 / 58%);
  --glass-control: rgb(34 35 44 / 54%);
  --glass-dialog: rgb(25 30 44 / 94%);
  --glass-side: rgb(255 255 255 / 10%);
  --glass-shade: rgb(0 0 0 / 30%);
}
#scrolling-text, body.sidebar-collapsed #scrolling-text,
#sidebar, html[data-theme="dark"] #sidebar {
  background-image: var(--glass-glint);
  box-shadow: var(--glass-inset);
}
#search-bar, html[data-theme="dark"] #search-bar,
.countdown-container, html[data-theme="dark"] .countdown-container {
  background-image: var(--glass-glint);
  box-shadow: var(--glass-inset), 0 5px 14px rgb(20 30 48 / 8%);
}
#sidebar li a:not(.active), #search-tabs button:not(.active),
#toggle-sidebar, html[data-theme="dark"] #toggle-sidebar,
#sidebar:not(.hidden) .sidebar-tools, html[data-theme="dark"] #sidebar:not(.hidden) .sidebar-tools {
  background-image: var(--glass-glint);
  box-shadow: var(--glass-inset);
}
#search-button, .floating-button {
  background-image: linear-gradient(155deg, rgb(255 255 255 / 24%), transparent 60%);
  box-shadow: var(--glass-inset), 0 4px 10px rgb(20 30 48 / 12%);
}
#sidebar li a.active, #search-tabs button.active, html[data-theme="dark"] #search-tabs button.active {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 35%), inset 0 -1px 0 rgb(20 30 48 / 16%), 0 3px 8px rgb(20 30 48 / 10%);
}
/* Navigation and settings choices share the same outline and interaction tokens. */
#sidebar li a, html[data-theme="dark"] #sidebar li a {
  border: 1px solid var(--choice-edge); border-radius: var(--choice-radius);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
#sidebar li a.active, html[data-theme="dark"] #sidebar li a.active { border-color: var(--choice-active-edge); }
#sidebar li a:focus-visible, html[data-theme="dark"] #sidebar li a:focus-visible { border-color: var(--choice-hover-edge); }
@media (hover: hover) and (pointer: fine) {
  #sidebar li a:hover:not(.active), html[data-theme="dark"] #sidebar li a:hover:not(.active) { border-color: var(--choice-hover-edge); }
}
/* Only fixed navigation uses native blur. Its fallback must survive the glass cascade. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #scrolling-text, body.sidebar-collapsed #scrolling-text,
  #sidebar, html[data-theme="dark"] #sidebar {
    background-color: var(--ui-surface);
  }
}
/* Extend the same static glass material to directory and dialog surfaces. */
.column, .column.active, html[data-theme="dark"] .column, html[data-bg="none"] .column,
.site-footer {
  background-color: var(--reading-glass);
  background-image: var(--glass-glint);
  border-color: var(--glass-side);
  box-shadow: var(--glass-inset);
}
.card, html[data-theme="dark"] .card {
  background-color: var(--glass-card);
  background-image: var(--glass-glint);
  border-color: var(--glass-side);
  box-shadow: var(--glass-inset);
}
.module-tabs, .module-tab, .countdown-setting-item,
.theme-option:not(.active), .palette-btn:not(.active), .bg-btn:not(.active) {
  background-color: var(--glass-control);
  background-image: var(--glass-glint);
  box-shadow: var(--glass-inset);
}
.module-tab.active {
  background-color: color-mix(in srgb, var(--primary-soft) 82%, transparent);
  border-color: color-mix(in srgb, var(--primary-color) 24%, transparent);
}
.theme-option.active, .palette-btn.active, .bg-btn.active {
  background-image: var(--glass-glint);
  box-shadow: var(--glass-inset);
}
.modal-content-wrapper {
  background-color: var(--glass-dialog);
  background-image: var(--glass-glint);
  box-shadow: var(--glass-inset), 0 18px 48px rgb(15 23 42 / 20%);
}
.modal .title, .modal .content, .modal .modal-content, .modal .modal-footer {
  background: transparent;
}
.modal input, .modal select, .modal textarea {
  background-color: var(--glass-control);
  color: var(--ui-ink);
}
.modal .modal-close, .modal .modal-footer button {
  background-image: var(--glass-glint);
}
@media (hover: hover) and (pointer: fine) {
  .card:hover, html[data-theme="dark"] .card:hover {
    background-color: color-mix(in srgb, var(--ui-surface) 78%, transparent);
    background-image: var(--glass-glint);
    box-shadow: var(--glass-inset), 0 4px 10px rgb(20 30 48 / 8%);
  }
  .module-tab:hover, .theme-option:hover, .palette-btn:hover, .bg-btn:hover {
    background-image: var(--glass-glint);
  }
}
@media (max-width: 980px) {
  header.nav-main {
    background-color: var(--navigation-glass);
    background-image: var(--glass-glint);
    box-shadow: var(--glass-inset);
  }
  header.nav-main nav a { background-image: var(--glass-glint); }
}
/* Motion preferences stop animation above; they do not change the desktop glass material. */
/* Keep the cheaper static material on small screens. */
@media (max-width: 980px) {
  #scrolling-text, body.sidebar-collapsed #scrolling-text,
  #sidebar, html[data-theme="dark"] #sidebar {
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
}
@media (prefers-reduced-transparency: reduce) {
  :root, html[data-theme="dark"] {
    --reading-glass: var(--ui-surface); --navigation-glass: var(--ui-surface); --glass-glint: none;
    --glass-card: var(--ui-surface); --glass-control: var(--ui-surface); --glass-dialog: var(--ui-surface);
  }
  #scrolling-text, body.sidebar-collapsed #scrolling-text,
  #sidebar, html[data-theme="dark"] #sidebar {
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
}

/* Centered utility dialogs: one focal point and one primary action. */
.utility-modal { place-items: center; padding: 24px 16px; }
:is(#desktop-shortcut-modal, #contact-author-modal) .modal-content-wrapper {
  width: 100%; max-width: 400px; max-height: calc(100dvh - 48px); margin: 0; padding: 0;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  border: 0; border-radius: 24px; background-color: var(--glass-dialog);
  background-image: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--secondary-soft) 70%, transparent), transparent 65%), var(--glass-glint);
  box-shadow: var(--glass-inset), 0 20px 56px rgb(12 18 36 / 22%);
}
:is(#desktop-shortcut-modal, #contact-author-modal) .modal-content {
  flex: 0 0 auto; height: auto; min-height: 0; max-height: none;
  margin: 0; padding: 36px 32px 0; overflow: visible; text-align: center;
}
:is(#desktop-shortcut-modal, #contact-author-modal) .title {
  display: block; padding: 0; margin: 0; border: 0; border-radius: 0;
  background: transparent; color: var(--ui-ink); font-size: 25px; font-weight: 750; line-height: 1.45;
}
.utility-modal .modal-close {
  top: 14px; right: 14px; width: 32px; height: 32px; min-width: 32px; min-height: 32px;
  padding: 0; border: 0; border-radius: 50%; color: var(--ui-secondary);
  background: var(--glass-control); font-size: 22px; line-height: 1;
}
.utility-modal .modal-close:hover { color: var(--ui-ink); background: var(--secondary-soft); }
.shortcut-emblem { margin: 0 auto 18px; width: 80px; height: 80px; }
.shortcut-brand-image { display: block; width: 80px; height: 80px; }
.utility-modal .utility-lead {
  margin: 9px auto 0; max-width: 30ch; color: var(--ui-secondary);
  font-size: 14px; line-height: 1.8; text-wrap: pretty;
}
:is(#desktop-shortcut-modal, #contact-author-modal) .modal-footer {
  display: block; flex: 0 0 auto; margin: 0; padding: 24px 32px 28px;
  border: 0; background: transparent; text-align: center;
}
:is(#desktop-shortcut-modal, #contact-author-modal) .modal-footer .utility-action {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 48px; padding: 12px 18px; margin: 0;
  border: 0; border-radius: 12px; text-decoration: none; white-space: nowrap;
  background: var(--secondary-color); background-image: var(--glass-glint); color: var(--button-on-accent);
  font-size: 14px; line-height: 1.6; font-weight: 650; box-shadow: var(--glass-inset), 0 5px 12px rgb(20 30 48 / 10%);
  transition: transform 160ms ease, filter 160ms ease;
}
:is(#desktop-shortcut-modal, #contact-author-modal) .modal-footer .utility-action:hover { transform: translateY(-1px); filter: brightness(1.04); }
:is(#desktop-shortcut-modal, #contact-author-modal) .modal-footer .utility-action:active { transform: translateY(0); }
.utility-modal .utility-meta { margin: 12px 0 0; color: var(--ui-secondary); font-size: 12px; line-height: 1.6; }
.utility-modal .utility-status { margin: 12px 0 0; color: var(--ui-ink); font-size: 13px; line-height: 1.8; }
.utility-status:empty { display: none; }
.shortcut-howto { margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--glass-shade); }
.shortcut-howto summary { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; list-style: none; cursor: pointer; color: var(--ui-secondary); font-size: 12px; }
.shortcut-howto summary::-webkit-details-marker { display: none; }
.shortcut-howto summary:hover { color: var(--secondary-color); }
.shortcut-howto summary .svg-icon { width: 12px; height: 12px; }
.shortcut-howto[open] summary .svg-icon { transform: rotate(90deg); }
.shortcut-help { padding-top: 8px; text-align: left; color: var(--ui-secondary); font-size: 12px; line-height: 1.8; }
.shortcut-help ol { margin: 0; padding-left: 18px; }
.shortcut-help li + li { margin-top: 6px; }
.utility-modal .shortcut-help p { margin: 10px 0 0; font-size: 12px; line-height: 1.8; }
#contact-author-modal .modal-content { padding-top: 38px; }
#contact-author-modal .wechat-panel { display: block; width: 232px; margin: 24px auto 0; text-align: center; }
#contact-author-modal .wechat-qr-frame {
  display: block; width: 232px; padding: 10px; border: 0; border-radius: 16px;
  background: #fff; box-shadow: 0 6px 20px rgb(15 23 42 / 10%);
}
#contact-author-modal .wechat-qr-image {
  display: block; width: 212px; height: auto; max-width: 100%; max-height: none;
  margin: 0; padding: 0; aspect-ratio: 1; border-radius: 0; box-shadow: none;
}
#contact-author-modal .wechat-hint {
  display: block; max-width: none; margin: 16px -28px 0; color: var(--ui-secondary);
  font-size: 13px; line-height: 1.8;
}
@media (max-width: 600px) {
  .utility-modal { padding: 16px; }
  :is(#desktop-shortcut-modal, #contact-author-modal) .modal-content-wrapper { max-height: calc(100dvh - 32px); }
  :is(#desktop-shortcut-modal, #contact-author-modal) .modal-content { padding-inline: 24px; }
  :is(#desktop-shortcut-modal, #contact-author-modal) .modal-footer { padding-inline: 24px; }
  :is(#desktop-shortcut-modal, #contact-author-modal) .title { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(#desktop-shortcut-modal, #contact-author-modal) .modal-footer .utility-action { transition: none; }
  :is(#desktop-shortcut-modal, #contact-author-modal) .modal-footer .utility-action:hover { transform: none; }
}

/* About: brand introduction, helpful guidance and progressively disclosed details. */
#about-modal .modal-content-wrapper {
  width: min(560px, 100%); max-width: 560px; max-height: calc(100dvh - 48px);
  margin: 0; padding: 0; border: 0; border-radius: 24px;
  background-color: var(--glass-dialog); background-image: var(--glass-glint);
  box-shadow: var(--glass-inset), 0 20px 56px rgb(12 18 36 / 22%);
}
#about-modal .modal-content {
  min-height: 0; height: auto; max-height: none; margin: 0; padding: 32px 32px 0;
  overflow-y: auto; overscroll-behavior: contain;
}
.about-identity { display: flex; align-items: center; gap: 15px; padding-right: 16px; }
.about-brand { flex: 0 0 64px; width: 64px; height: 64px; }
.about-brand-image { display: block; width: 64px; height: 64px; }
#about-modal .title { display: block; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--ui-ink); font-size: 25px; font-weight: 750; line-height: 1.5; text-align: left; }
#about-modal .about-identity p { margin: 3px 0 0; color: var(--ui-secondary); font-size: 12px; line-height: 1.8; }
#about-modal .about-introduction { margin: 22px 0 0; color: var(--ui-secondary); font-size: 14px; line-height: 1.9; text-wrap: pretty; }
.about-guide { display: grid; gap: 18px; margin-top: 25px; }
.about-guide-row { display: flex; align-items: flex-start; gap: 12px; }
.about-guide-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; color: var(--secondary-color); background: var(--secondary-soft); }
.about-guide-icon .svg-icon { width: 17px; height: 17px; }
#about-modal .about-guide h3 { margin: 0; color: var(--ui-ink); font-size: 14px; font-weight: 650; line-height: 1.6; }
#about-modal .about-guide p { margin: 4px 0 0; color: var(--ui-secondary); font-size: 12px; line-height: 1.8; }
#about-modal .about-local-note { display: flex; align-items: flex-start; gap: 8px; margin: 22px 0 0; color: var(--ui-secondary); font-size: 11px; line-height: 1.8; }
.about-local-note > .svg-icon { flex: 0 0 15px; width: 15px; height: 15px; margin-top: 2px; }
.about-details { margin-top: 22px; border-top: 1px solid var(--glass-shade); }
.about-details > details { padding: 10px 0; border-bottom: 1px solid var(--glass-shade); }
.about-details summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 25px; cursor: pointer; list-style: none; color: var(--ui-secondary); font-size: 12px; line-height: 1.8; }
.about-details summary::-webkit-details-marker { display: none; }
.about-details summary .svg-icon { flex-shrink: 0; width: 13px; height: 13px; }
.about-details details[open] summary .svg-icon { transform: rotate(90deg); }
.about-details summary:hover { color: var(--secondary-color); }
.about-details summary:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 4px; border-radius: 4px; }
.about-history { display: grid; gap: 8px; margin: 12px 0 4px; padding-left: 18px; color: var(--ui-secondary); font-size: 12px; line-height: 1.8; }
#about-modal .about-legal { margin: 12px 0 4px; color: var(--ui-secondary); font-size: 12px; line-height: 1.9; }
#about-modal .modal-footer { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; gap: 8px; margin: 0; padding: 22px 32px 20px; border: 0; background: none; }
#about-modal .modal-footer .about-confirm { width: min(100%, 320px); min-height: 44px; margin: 0; padding: 11px 20px; border: 0; border-radius: 11px; background: var(--secondary-color); background-image: var(--glass-glint); color: var(--button-on-accent); font-size: 14px; font-weight: 650; line-height: 1.6; box-shadow: var(--glass-inset); }
#about-modal .modal-footer .about-feedback { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: auto; min-height: 30px; margin: 0; padding: 5px 10px; border: 0; border-radius: 7px; background: none; color: var(--ui-secondary); font-size: 12px; line-height: 1.6; box-shadow: none; }
.about-feedback .svg-icon { width: 14px; height: 14px; }
.about-feedback .about-feedback-arrow { width: 11px; height: 11px; }
#about-modal .modal-footer .about-feedback:hover { color: var(--primary-color); background: var(--primary-soft); }
@media (max-width: 600px) {
  #about-modal .modal-content-wrapper { max-height: calc(100dvh - 32px); border-radius: 20px; }
  #about-modal .modal-content { padding: 28px 24px 0; }
  .about-identity { gap: 11px; padding-right: 8px; }
  .about-brand, .about-brand-image { width: 54px; height: 54px; }
  .about-brand { flex-basis: 54px; }
  #about-modal .title { font-size: 23px; }
  #about-modal .about-identity p { font-size: 11px; }
  #about-modal .about-introduction { margin-top: 18px; font-size: 13px; }
  .about-guide { margin-top: 21px; gap: 15px; }
  #about-modal .modal-footer { padding: 18px 24px 16px; }
}
