:root {
  --primary-color: #1f4e78;
  --accent-color: #b71818;
  --sub-color: #2e75b6;
  --bg-light: #f2f5f8;
  --text-dark: #333333;
  --text-muted: #666666;
  --line: #e8edf1;
  --success: #28a745;
  --site-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --body-font-size: 14px;
  --body-line-height: 1.7;
  --main-title-font-size: 24px;
  --chapter-title-font-size: 18px;
  --sub-title-font-size: 15px;
  --body-font-weight: 400;
  --chapter-title-font-weight: 800;
  --sub-title-font-weight: 800;
  --paragraph-indent: 2em;
  --page-background-image: url("./images/jiangsu-university-ujs-banner-v3-premium.png");
  --page-background-position: center top;
  --page-background-size: cover;
  --page-background-attachment: fixed;
  --page-overlay-start: rgba(247, 249, 250, 0.86);
  --page-overlay-end: rgba(247, 249, 250, 0.92);
  --hero-background-image: url("./images/UJS新生攻略-01-shot.png");
  --hero-background-position: center center;
  --hero-background-size: cover;
  --hero-overlay-left: rgba(12, 32, 52, 0.7);
  --hero-overlay-right: rgba(31, 78, 120, 0.38);
  --overview-background-image: url("./images/UJS新生攻略-02-shot.png");
  --overview-background-position: center center;
  --overview-background-size: cover;
  --overview-overlay-left: rgba(255, 255, 255, 0.98);
  --overview-overlay-mid: rgba(255, 255, 255, 0.93);
  --overview-overlay-right: rgba(255, 255, 255, 0.86);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(var(--page-overlay-start), var(--page-overlay-end)),
    var(--page-background-image) var(--page-background-position) / var(--page-background-size) var(--page-background-attachment) no-repeat;
  color: var(--text-dark);
  font-family: var(--site-font-family);
  line-height: var(--body-line-height);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.menu-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: transparent;
  color: var(--primary-color);
  font-size: 16px;
  font-weight: 700;
}

.nav-title {
  min-width: 0;
  margin-left: 16px;
  margin-right: 12px;
  flex: 1 1 auto;
  overflow: hidden;
  color: #151515;
  font-size: 16px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.search-toggle-btn,
.join-group-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #bdd7ee;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.search-toggle-btn.active {
  background: #edf6ff;
}

.join-group-btn {
  border-color: #f3c36b;
  background: #fff8e8;
  color: #9a4f00;
}

.editor-tools-toggle,
.undo-edit-btn,
.content-edit-btn,
.bold-selection-btn,
.unbold-selection-btn,
.color-selection-btn,
.format-brush-btn,
.normal-text-btn,
.delete-section-btn,
.insert-table-btn,
.insert-image-btn,
.background-edit-btn {
  flex-shrink: 0;
  padding: 7px 12px;
  border: 1px solid #bdd7ee;
  border-radius: 8px;
  background: #edf6ff;
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.editor-tools-toggle,
.undo-edit-btn,
.content-edit-btn,
.bold-selection-btn,
.unbold-selection-btn,
.color-selection-btn,
.format-brush-btn,
.normal-text-btn,
.delete-section-btn,
.insert-table-btn,
.insert-image-btn,
.background-edit-btn,
.text-color-input {
  display: none;
}

body.local-editing .editor-tools-toggle,
body.local-editing .editor-toolbar .undo-edit-btn,
body.local-editing .editor-toolbar .content-edit-btn,
body.local-editing .editor-toolbar .bold-selection-btn,
body.local-editing .editor-toolbar .unbold-selection-btn,
body.local-editing .editor-toolbar .color-selection-btn,
body.local-editing .editor-toolbar .format-brush-btn,
body.local-editing .editor-toolbar .normal-text-btn,
body.local-editing .editor-toolbar .delete-section-btn,
body.local-editing .editor-toolbar .insert-table-btn,
body.local-editing .editor-toolbar .insert-image-btn,
body.local-editing .editor-toolbar .background-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.local-editing .editor-toolbar .text-color-input {
  display: block;
}

.editor-tools-toggle {
  margin-left: 8px;
  margin-right: 8px;
}

.content-edit-btn {
  margin-right: 8px;
}

.bold-selection-btn {
  margin-right: 8px;
}

.unbold-selection-btn,
.color-selection-btn,
.format-brush-btn,
.normal-text-btn,
.delete-section-btn,
.insert-table-btn {
  margin-right: 8px;
}

.delete-section-btn {
  border-color: #f0b7b7;
  background: #fff1f1;
  color: var(--accent-color);
}

.text-color-input {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  margin-right: 8px;
  padding: 2px;
  border: 1px solid #bdd7ee;
  border-radius: 8px;
  background: #ffffff;
}

.insert-image-btn {
  margin-right: 8px;
}

.hidden-file-input {
  display: none;
}

.background-edit-btn.active {
  background: var(--primary-color);
  color: #ffffff;
}

.search-panel {
  position: fixed;
  top: calc(56px + env(safe-area-inset-top));
  left: 0;
  right: 0;
  z-index: 98;
  padding: 12px 16px 14px;
  border-bottom: 1px solid #d7e7f5;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 24px rgba(19, 74, 126, 0.12);
}

.search-panel[hidden] {
  display: none;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 12px;
  border: 1px solid #bdd7ee;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--primary-color);
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #151515;
  font-size: 15px;
}

.search-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #e9f3fc;
  color: var(--primary-color);
  font-size: 20px;
  line-height: 1;
}

.search-results {
  max-width: 960px;
  max-height: min(56vh, 520px);
  margin: 10px auto 0;
  overflow: auto;
}

.search-empty {
  padding: 14px 4px;
  color: var(--muted-color);
  font-size: 14px;
  text-align: center;
}

.search-result-item {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid #d9e8f5;
  border-radius: 8px;
  background: #ffffff;
  color: #24313d;
  text-align: left;
}

.search-result-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--primary-color);
  font-size: 14px;
}

.search-result-item span {
  display: -webkit-box;
  overflow: hidden;
  color: #4f5e6b;
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.content-edit-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #ffffff;
}

.format-brush-btn.active {
  background: #fff8ef;
  border-color: #f3c69b;
  color: #8a3b0e;
}

.editor-toolbar {
  position: fixed;
  top: calc(56px + env(safe-area-inset-top));
  left: 0;
  right: 0;
  z-index: 99;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 14px;
  border-bottom: 1px solid #dbe6f0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 18px rgba(20, 42, 56, 0.08);
}

.editor-toolbar[hidden] {
  display: none;
}

.editor-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-right: 10px;
  border-right: 1px solid #e5edf4;
}

.editor-toolbar-group > span {
  color: #70808d;
  font-size: 12px;
  font-weight: 800;
}

.editor-toolbar-group.danger {
  border-right: 0;
}

body.editor-tools-open .container {
  margin-top: 112px;
}

.background-editor-panel {
  position: fixed;
  top: calc(68px + env(safe-area-inset-top));
  right: max(14px, calc((100vw - 720px) / 2 - 180px));
  z-index: 160;
  width: min(320px, calc(100vw - 28px));
  padding: 14px;
  border: 1px solid #d6e5f2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 30px rgba(20, 42, 56, 0.16);
}

.background-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--primary-color);
}

.background-editor-head button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f8;
  color: #5b6973;
  font-size: 18px;
  line-height: 1;
}

.background-editor-field {
  display: grid;
  gap: 6px;
  color: #44515c;
  font-size: 13px;
  font-weight: 800;
}

.background-editor-field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cfdce7;
  border-radius: 8px;
  background: #ffffff;
  color: #1d2b36;
  font: inherit;
}

.background-editor-values {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.background-editor-values span {
  flex: 1;
  padding: 7px 8px;
  border-radius: 8px;
  background: #f4f8fb;
  color: #51606b;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.background-editor-slider {
  display: grid;
  gap: 7px;
  margin: 10px 0;
  color: #44515c;
  font-size: 13px;
  font-weight: 800;
}

.background-editor-slider input {
  width: 100%;
  accent-color: var(--primary-color);
}

.background-editor-panel p {
  margin: 0 0 12px;
  color: #687682;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  text-indent: 0;
}

.background-editor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.background-editor-actions button {
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.background-editor-actions .secondary {
  background: #eef3f7;
  color: #435260;
}

.background-editor-actions .primary {
  background: var(--primary-color);
  color: #ffffff;
}

.background-editor-status {
  min-height: 18px;
  margin-top: 9px;
  color: #2c7a43;
  font-size: 12px;
  font-weight: 800;
}

body.background-editing {
  cursor: grab;
}

body.background-editing.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.background-edit-target {
  outline: 2px dashed #2e75b6;
  outline-offset: 4px;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 199;
  visibility: hidden;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.drawer-overlay.active {
  visibility: visible;
  opacity: 1;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  width: 80%;
  max-width: 320px;
  height: 100%;
  background: #ffffff;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.14);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
}

.drawer.active {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  padding: 24px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.book-cover {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 65px;
  height: 85px;
  margin-right: 14px;
  padding: 6px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e6f0fa, #b9d3ee);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.title-mini {
  color: var(--primary-color);
  font-size: 10px;
  font-weight: 800;
}

.sub-mini {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 6px;
  transform: scale(0.9);
}

.header-meta h2 {
  margin-bottom: 4px;
  color: #000000;
  font-size: 18px;
}

.header-meta p {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.drawer-subheader {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
}

.menu-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0 30px;
}

.menu-part-title {
  padding: 12px 20px 6px;
  color: #3194a0;
  font-size: 14px;
  font-weight: 800;
}

.menu-item {
  display: block;
  padding: 10px 20px;
  color: var(--text-dark);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.menu-item:hover,
.menu-item.active {
  background: #f5f5f5;
  color: var(--primary-color);
  font-weight: 800;
}

.container {
  max-width: 720px;
  min-height: calc(100vh - 56px);
  margin: 56px auto 0;
  padding: 24px 16px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(3px);
}

.cover-hero {
  overflow: hidden;
  width: 100vw;
  margin: -24px calc(50% - 50vw) 22px;
  border-radius: 0;
  background: #eef3f7;
}

.cover-hero img {
  display: block;
  width: 100%;
  height: clamp(420px, calc(100vh - 56px), 860px);
  object-fit: cover;
  object-position: center top;
}

.main-title {
  position: relative;
  overflow: hidden;
  margin: 16px 0 32px;
  padding: 42px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary-color);
  font-size: var(--main-title-font-size);
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.main-title span {
  display: block;
  color: #51606b;
  font-size: 14px;
  font-weight: 400;
}

.intro-school-image {
  overflow: hidden;
  margin: 8px 0 18px;
  border-radius: 8px;
  background: #eef3f7;
}

.intro-school-image img {
  display: block;
  width: 100%;
  height: auto;
}

.part-divider {
  margin: 40px 0 20px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent-color);
  color: var(--accent-color);
  font-size: 20px;
  font-weight: 800;
}

.chapter-section {
  margin-bottom: 36px;
  scroll-margin-top: 76px;
}

.chapter-section.hero-overview {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  padding: 18px 14px;
  border: 1px solid #e4ebf2;
  border-radius: 8px;
  background: #ffffff;
}

.chapter-section.hero-overview .chapter-title,
.chapter-section.hero-overview p,
.chapter-section.hero-overview .bullet-item {
  position: relative;
}

body.content-editing [contenteditable="true"] {
  outline: 1px dashed #2e75b6;
  outline-offset: 3px;
  background: rgba(237, 246, 255, 0.55);
  cursor: text;
}

body.content-editing [contenteditable="true"]:focus {
  outline: 2px solid #2e75b6;
  background: #ffffff;
}

.chapter-title {
  margin: 24px 0 14px;
  padding-left: 10px;
  border-left: 4px solid var(--primary-color);
  color: var(--primary-color);
  font-size: var(--chapter-title-font-size);
  font-weight: var(--chapter-title-font-weight);
  line-height: 1.45;
}

.sub-title {
  margin: 16px 0 8px;
  color: var(--sub-color);
  font-size: var(--sub-title-font-size);
  font-weight: var(--sub-title-font-weight);
}

p {
  margin-bottom: 12px;
  color: var(--text-dark);
  font-size: var(--body-font-size);
  font-weight: var(--body-font-weight);
  text-align: justify;
  text-indent: var(--paragraph-indent);
}

.meta-line {
  color: #87919a;
  font-size: 12px;
  text-indent: 0;
}

.no-list,
.no-indent,
ul p {
  text-indent: 0;
}

.tip-box {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--bg-light);
}

.tip-title {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 800;
}

.tip-title::before {
  content: "📌";
  margin-right: 5px;
}

.tip-content {
  color: #444444;
  font-size: 13px;
  list-style: none;
}

.tip-content li {
  position: relative;
  margin-bottom: 4px;
  padding-left: 14px;
}

.tip-content li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: 800;
}

ul {
  margin-bottom: 16px;
  padding-left: 0;
  list-style: none;
}

li {
  margin-bottom: 8px;
  font-size: 14px;
}

.bullet-item {
  position: relative;
  margin-bottom: 10px;
  padding-left: 16px;
  text-align: justify;
}

.bullet-item::before {
  content: "▪";
  position: absolute;
  left: 0;
  color: var(--sub-color);
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px;
  font-size: 13.5px;
}

.checklist-item input {
  flex-shrink: 0;
  margin-top: 4px;
  margin-right: 10px;
  accent-color: var(--primary-color);
}

.table-scroll {
  margin: 16px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.data-table {
  width: 100%;
  min-width: 360px;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table th {
  background: #f4f8fb;
  color: var(--primary-color);
  font-weight: 800;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.asset-block {
  margin: 20px 0 26px;
  padding: 14px;
  border: 1px solid #e3ebf2;
  border-radius: 8px;
  background: #fbfdff;
}

.asset-title {
  margin: 0 0 12px;
  color: var(--primary-color);
  font-size: 15px;
  font-weight: 800;
}

.media-card {
  position: relative;
  margin: 12px 0 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.media-card:last-child {
  margin-bottom: 0;
}

.media-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.media-card img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 760px;
  margin: 0 auto;
  background: #f6f8fa;
  object-fit: contain;
}

.media-card.is-long-image .media-link {
  position: relative;
  max-height: 520px;
  overflow: hidden;
}

.media-card.is-long-image .media-link::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 110px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff);
  content: "";
}

.media-card figcaption {
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.inline-image-card {
  overflow: hidden;
  margin: 14px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.inline-image-card img {
  display: block;
  width: 100%;
  height: auto;
}

.inline-image-card figcaption {
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.image-action {
  padding: 9px 10px;
  border-top: 1px solid var(--line);
  color: var(--sub-color);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.doc-list {
  display: grid;
  gap: 10px;
}

.doc-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--text-dark);
  text-decoration: none;
}

.doc-card:active {
  background: #eef5fb;
}

.doc-card:hover {
  border-color: #b9d3ee;
  background: #f2f8fd;
}

.doc-badge {
  min-width: 46px;
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--primary-color);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.doc-name {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.doc-action {
  color: var(--sub-color);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  backdrop-filter: blur(4px);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  visibility: visible;
  opacity: 1;
}

.modal-card {
  position: relative;
  width: min(85vw, 340px);
  padding: 24px 20px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  text-align: center;
  transform: scale(0.88);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #fff8ef;
  box-shadow: 0 4px 10px rgba(31, 78, 120, 0.3);
}

.modal-avatar img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.modal-card h3 {
  margin-bottom: 8px;
  color: var(--primary-color);
  font-size: 18px;
}

.modal-card p {
  margin-bottom: 16px;
  color: #555555;
  font-size: 14px;
  text-align: center;
  text-indent: 0;
}

.wx-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px dashed #b9d3ee;
  border-radius: 8px;
  background: #f4f6f9;
  color: #222222;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 16px;
  font-weight: 800;
}

.copy-btn {
  width: 100%;
  padding: 10px 20px;
  border-radius: 20px;
  background: var(--primary-color);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  transition: background 0.2s ease, transform 0.2s ease;
}

.copy-btn:active {
  transform: scale(0.98);
}

.copy-btn.success {
  background: var(--success);
}

.close-modal-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  color: #999999;
  font-size: 22px;
  line-height: 1;
}

.floating-helper {
  position: fixed;
  right: max(18px, calc((100vw - 720px) / 2 - 150px));
  bottom: 88px;
  z-index: 90;
  display: grid;
  justify-items: center;
  width: 132px;
  background: transparent;
  filter: drop-shadow(0 10px 18px rgba(20, 42, 56, 0.18));
  transform-origin: bottom center;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.floating-helper:hover {
  filter: drop-shadow(0 14px 22px rgba(20, 42, 56, 0.22));
  transform: translateY(-3px);
}

.floating-helper img {
  display: block;
  width: 108px;
  height: auto;
  animation: helper-float 3.2s ease-in-out infinite, helper-wave 4.8s ease-in-out infinite;
}

.helper-bubble {
  position: relative;
  max-width: 132px;
  margin-bottom: 6px;
  padding: 8px 10px;
  border: 1px solid #f3c69b;
  border-radius: 8px;
  background: #fff8ef;
  color: #8a3b0e;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  animation: helper-bubble 2.8s ease-in-out infinite;
}

.helper-bubble::after {
  position: absolute;
  right: 34px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid #f3c69b;
  border-bottom: 1px solid #f3c69b;
  background: #fff8ef;
  content: "";
  transform: rotate(45deg);
}

@keyframes helper-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes helper-wave {
  0%,
  100% {
    transform: rotate(0deg);
  }

  45% {
    transform: rotate(-1.5deg);
  }

  55% {
    transform: rotate(1.5deg);
  }
}

@keyframes helper-bubble {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.035);
  }
}

.page-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 16px 28px;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.page-footer p {
  margin: 0 0 4px;
  color: #8a939a;
  font-size: 12px;
  text-align: center;
  text-indent: 0;
}

@media (min-width: 760px) {
  .container,
  .page-footer {
    box-shadow: 0 0 24px rgba(20, 42, 56, 0.06);
  }
}

@media (max-width: 760px) {
  .topbar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .nav-title {
    margin-left: 10px;
    margin-right: 8px;
    font-size: 14px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .search-toggle-btn,
  .join-group-btn {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .search-toggle-btn span {
    display: none;
  }

  .join-group-btn {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cover-hero img {
    height: auto;
    min-height: 0;
    object-fit: contain;
    object-position: center top;
  }

  body {
    background-attachment: scroll;
  }

  .floating-helper {
    right: 8px;
    bottom: 18px;
    width: 96px;
  }

  .floating-helper img {
    width: 78px;
  }

  .helper-bubble {
    max-width: 96px;
    padding: 6px 8px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
