:root {
  --ink: #0f1419;
  --ink-soft: #1a222c;
  --panel: #f4f1ea;
  --panel-2: #fffdf8;
  --line: rgba(15, 20, 25, 0.12);
  --text: #1c2430;
  --muted: #5c6b7a;
  --accent: #0d7377;
  --accent-dark: #095456;
  --accent-soft: rgba(13, 115, 119, 0.12);
  --warn: #b45309;
  --danger: #b42318;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(15, 20, 25, 0.12);
  --font-display: "Source Han Serif SC", "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-body: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(13, 115, 119, 0.18), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(180, 83, 9, 0.1), transparent 50%),
    linear-gradient(180deg, #e8eef0 0%, #dfe7ea 40%, #d5dee3 100%);
  line-height: 1.6;
}

#appRoot {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: 100dvh;
  overflow: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
}

.site-nav {
  flex-shrink: 0;
  background: rgba(15, 20, 25, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-nav-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  min-height: 56px;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.site-brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff !important;
  font-size: 1.15rem;
  justify-self: start;
}

.section-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  justify-self: center;
}

.section-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  line-height: 1;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.section-tab:hover {
  color: #fff;
}

.section-tab.active {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}

.site-nav-auth .nav-user {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  margin-right: 0.35rem;
}

.site-nav .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.35);
}

.site-nav .btn-teal {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.site-nav .btn-teal:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.site-nav-inner-simple {
  grid-template-columns: 1fr auto;
}

.site-nav-inner-simple .site-nav-auth {
  justify-self: end;
}

.hero-home {
  position: relative;
  overflow: hidden;
  background: #1a1f2e;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.hero-banner {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center top;
  vertical-align: middle;
}

.hero-actions {
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
}

@media (max-width: 767.98px) {
  .site-nav-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand auth"
      "tabs tabs";
    row-gap: 0.55rem;
  }

  .site-brand {
    grid-area: brand;
  }

  .site-nav-auth {
    grid-area: auth;
  }

  .section-tabs {
    grid-area: tabs;
    width: 100%;
    justify-content: stretch;
  }

  .section-tab {
    flex: 1;
    text-align: center;
    padding: 0.55rem 0.4rem;
    font-size: 0.86rem;
  }

  .site-nav-inner-simple {
    grid-template-areas: "brand auth";
    row-gap: 0;
  }
}

@media (max-width: 575.98px) {
  .auth-card {
    padding: 1.5rem 1.1rem;
  }
}

.panel {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(15, 20, 25, 0.06);
  min-height: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.panel-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-family: var(--font-display);
}

.panel-body {
  padding: 0.35rem 0;
}

.feed-item {
  display: block;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  transition: background 0.15s ease;
}

.feed-item:last-child {
  border-bottom: none;
}

.feed-item:hover {
  background: var(--accent-soft);
  color: inherit;
}

.feed-item .title {
  display: block;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.feed-item .meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.empty-hint {
  padding: 1.5rem 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  flex-shrink: 0;
  margin-top: 0;
  padding: 0.75rem 0 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.beian-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  white-space: nowrap;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.site-footer a,
.site-footer a:visited {
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.site-footer img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.auth-shell {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: center;
  padding: 2rem 0 3rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

main.container,
.main-stage {
  flex: 1 1 0;
  width: 100%;
  min-height: 0;
}

/* 中间主内容区：占满剩余高度，内部滚动，不撑开整页 */
.main-stage {
  display: flex;
  flex-direction: column;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem 0.75rem 0.75rem;
  box-sizing: border-box;
  overflow: hidden;
}

.main-stage .section-panels {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.main-stage .section-panel.active {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.main-stage .section-panel .panel-header {
  flex-shrink: 0;
}

.main-stage .section-panel .panel-body,
.main-stage .section-panel .list-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
  .main-stage {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.auth-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin-bottom: 0.35rem;
}

.auth-card .sub {
  color: var(--muted);
  margin-bottom: 1.35rem;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-accent:hover,
.btn-accent:focus {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem var(--accent-soft);
}

.admin-bar {
  background: #fff7ed;
  border: 1px solid #fcd9a8;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

.admin-bar .form-check-label {
  font-size: 0.95rem;
}

/* —— 仅手机：桌面拦截 —— */
.desktop-block {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  background: var(--ink);
  color: #fff;
}

.desktop-block[hidden] {
  display: none !important;
}

.desktop-block-msg {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
}

html.desktop-blocked body {
  background: var(--ink);
}

html.desktop-blocked #appRoot {
  display: none !important;
}

/* —— 列表行 —— */
.list-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
}

.list-row {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  padding: 0.95rem 2rem 0.95rem 1rem;
  color: inherit;
  cursor: pointer;
}

.list-row:last-child {
  border-bottom: none;
}

.list-row:active {
  background: var(--accent-soft);
}

.list-row-title {
  display: block;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.35;
  margin-bottom: 0.25rem;
  padding-right: 0.5rem;
}

.list-row-meta {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.list-row-chevron {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
}

.swipe-item {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.swipe-item:last-child {
  border-bottom: none;
}

.swipe-actions {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 76px;
  display: flex;
  background: #c62828;
  opacity: 0;
  pointer-events: none;
}

.swipe-item.is-revealing .swipe-actions,
.swipe-item.is-open .swipe-actions {
  opacity: 1;
  pointer-events: auto;
}

.swipe-delete {
  appearance: none;
  border: 0;
  width: 100%;
  height: 100%;
  background: #c62828;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
}

.swipe-content.list-row {
  position: relative;
  z-index: 1;
  border-bottom: none;
  touch-action: pan-y;
  background: var(--panel-2);
}

.swipe-content.list-row:active {
  background: var(--accent-soft);
}

/* —— 底部升起详情面板 —— */
body.sheet-open {
  overflow: hidden;
}

.detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(15, 20, 25, 0.45);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.detail-backdrop.is-open {
  opacity: 1;
}

.detail-backdrop[hidden],
.detail-sheet[hidden] {
  display: none !important;
}

.detail-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  height: 80vh;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: var(--panel-2);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(15, 20, 25, 0.22);
  transform: translateY(105%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.detail-sheet.is-open {
  transform: translateY(0);
}

.detail-sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(15, 20, 25, 0.18);
  margin: 0.65rem auto 0.25rem;
  flex-shrink: 0;
}

.detail-sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.55rem 1rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.detail-sheet-head-text {
  flex: 1;
  min-width: 0;
}

.detail-sheet-head h3 {
  margin: 0;
  font-size: 1.08rem;
  font-family: var(--font-display);
  line-height: 1.35;
}

.detail-sheet-meta {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.detail-sheet-close {
  appearance: none;
  border: 0;
  background: rgba(15, 20, 25, 0.06);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--muted);
  flex-shrink: 0;
}

.detail-sheet-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 1.1rem 1.35rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
}

.detail-text {
  white-space: pre-wrap;
  margin-bottom: 0.75rem;
}

.schedule-detail .schedule-field {
  margin-bottom: 0.85rem;
}

.schedule-detail .k {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.schedule-detail .v {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.55;
}

.detail-images {
  display: grid;
  gap: 0.65rem;
}

.detail-images img {
  display: block;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.publish-form .form-label {
  font-size: 0.9rem;
  font-weight: 600;
}

.publish-form textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.publish-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.publish-slot {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 20, 25, 0.04);
  border: 1px dashed rgba(15, 20, 25, 0.22);
}

.publish-slot-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.publish-slot-pick {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  color: var(--muted);
  padding: 0;
}

.publish-slot-plus {
  font-size: 1.6rem;
  line-height: 1;
  color: var(--accent);
  font-weight: 500;
}

.publish-slot-hint {
  font-size: 0.75rem;
}

.publish-slot-preview {
  position: absolute;
  inset: 0;
}

.publish-slot-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.publish-slot-preview .remove-thumb {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 1.4rem;
  height: 1.4rem;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 20, 25, 0.65);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
}

.manage-body {
  padding: 0.85rem 1rem 1.1rem !important;
}

.manage-block {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.manage-block:last-child {
  border-bottom: none;
}

.manage-block strong {
  display: block;
  margin-bottom: 0.35rem;
}

.manage-publish-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.publisher-list {
  font-size: 0.9rem;
}

.publisher-list li {
  padding: 0.15rem 0;
}

.forum-detail .forum-post-images {
  margin-bottom: 0.85rem;
}

.forum-detail .forum-post-content {
  margin-bottom: 1rem;
}

.forum-replies {
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
  margin-bottom: 1rem;
}

.forum-replies-title {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
}

.forum-reply {
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(28, 36, 48, 0.06);
}

.forum-reply:last-child {
  border-bottom: none;
}

.forum-reply-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.forum-reply-body {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}

.forum-reply-empty {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 0.35rem 0 0.55rem;
}

.forum-reply-composer {
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.forum-reply-login {
  font-size: 0.9rem;
  color: var(--muted);
}

.forum-reply-login a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.schedule-detail .schedule-field {
  margin-bottom: 0.85rem;
}

.schedule-detail .k {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.schedule-detail .v {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.55;
}

