:root {
  --brand: #358D63;
  --brand-dark: #2c7553;
  --brand-soft: #eef7f2;
  --brand-line: #d7e9de;
  --text: #193328;
  --muted: #6d7f77;
  --line: #dfe8e2;
  --card: #ffffff;
  --bg: #f5f8f6;
  --danger: #c84b4b;
  --danger-soft: #fff5f5;
  --warn-soft: #fff7e8;
  --warn-text: #96651d;
  --shadow: 0 12px 30px rgba(26, 48, 38, 0.08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fbf9 0%, #f3f7f5 100%);
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.page-shell { max-width: 1680px; margin: 0 auto; padding: 20px; }
.hero-card, .card {
  background: var(--card);
  border: 1px solid rgba(53, 141, 99, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-card {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 24px 26px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(53, 141, 99, 0.12), rgba(53, 141, 99, 0.03));
}
.compact-hero h1 { font-size: 28px; }
.hero-card h1 { margin: 6px 0 8px; font-size: 31px; }
.hero-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.eyebrow {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: rgba(53, 141, 99, 0.12); color: var(--brand-dark); font-size: 13px; font-weight: 700;
}
.inline-form, .header-actions, .hero-actions, .list-tools, .dialog-actions, .row-actions, .history-actions, .print-actions {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.btn {
  border: 1px solid transparent; background: #fff; color: var(--text);
  border-radius: 999px; padding: 10px 16px; font: inherit; cursor: pointer;
  transition: .16s ease; box-shadow: 0 4px 16px rgba(26, 48, 38, 0.04);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { border-color: var(--brand-line); color: var(--brand-dark); background: #fff; }
.btn-ghost { background: #f5f8f6; color: var(--text); }
.danger-outline { border-color: #f0d2d2; color: var(--danger); }
.flash-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.flash-item { padding: 12px 14px; border-radius: 14px; font-size: 14px; }
.flash-success { background: var(--brand-soft); color: var(--brand-dark); }
.flash-danger { background: var(--danger-soft); color: var(--danger); }
.flash-warning { background: var(--warn-soft); color: var(--warn-text); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card {
  background: #fff; border: 1px solid rgba(53, 141, 99, 0.08); border-radius: 18px; box-shadow: var(--shadow);
  padding: 18px 18px 16px;
}
.stat-card span, .mobile-item-meta label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat-card strong { display: block; font-size: 28px; line-height: 1.1; }
.stat-card em { display: block; margin-top: 8px; color: var(--muted); font-style: normal; font-size: 13px; }
.layout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.single-main-grid { grid-template-columns: minmax(0, 1fr) 420px; }
.main-column, .side-column { display: flex; flex-direction: column; gap: 18px; }
.card-header {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 20px 22px 14px; border-bottom: 1px solid #edf3ef;
}
.card-header h2, .card-header h3, .section-head h3 { margin: 0; font-size: 20px; }
.muted, .section-head p { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.small { font-size: 12px; }
.sticky {
  position: sticky; top: 14px; z-index: 5;
  background: rgba(255,255,255,0.96); backdrop-filter: blur(8px);
}
.form-grid { display: grid; gap: 14px; padding: 20px 22px 10px; }
.settings-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
label span, .title-preview span { display: block; margin-bottom: 8px; font-size: 13px; color: var(--muted); font-weight: 700; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; color: var(--text); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
textarea { min-height: 82px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(53, 141, 99, 0.55); box-shadow: 0 0 0 4px rgba(53, 141, 99, 0.12); }
.title-preview { padding: 12px 14px; border: 1px dashed rgba(53, 141, 99, 0.25); background: var(--brand-soft); border-radius: 14px; }
.title-preview strong { display: block; line-height: 1.7; }
.title-sub { margin-top: 6px; color: var(--brand-dark); font-size: 13px; }
.card-section { padding: 6px 22px 22px; }
.section-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px;
}
.section-head p { margin-bottom: 0; }
.raw-text { min-height: 220px; font-family: Consolas, "Microsoft YaHei", monospace; line-height: 1.65; }
.count-badge, .status-badge {
  padding: 8px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 13px; font-weight: 700;
}
.large-badge { font-size: 14px; padding: 10px 14px; }
.status-submitted { background: var(--brand-soft); color: var(--brand-dark); }
.status-draft { background: var(--warn-soft); color: var(--warn-text); }
.status-updated { background: #eef6ff; color: #245ea7; }
.list-tools-gap { margin-bottom: 16px; }
.helper-inline { margin-bottom: 14px; line-height: 1.9; }
.helper-chip {
  display: inline-flex; align-items: center; margin: 0 8px 8px 0; padding: 4px 10px; border-radius: 999px;
  background: #f6f9f7; color: var(--muted); font-size: 12px; border: 1px solid #e6eeea;
}
.table-wrap, .preview-scroll { overflow: auto; }
.edit-table, .preview-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 1080px; }
.preview-table { min-width: 1160px; }
.edit-table th, .edit-table td, .preview-table th, .preview-table td {
  border-right: 1px solid #dfe7e2; border-bottom: 1px solid #dfe7e2; padding: 10px; vertical-align: middle; background: #fff;
}
.edit-table th:first-child, .edit-table td:first-child, .preview-table th:first-child, .preview-table td:first-child { border-left: 1px solid #dfe7e2; }
.edit-table thead th, .preview-table thead th {
  position: sticky; top: 0; z-index: 2; background: #f7faf8; font-weight: 800; text-align: center; vertical-align: middle;
}
.preview-table .title-row th, .preview-table thead tr:first-child th { background: #fff; font-size: 22px; padding: 16px 10px; }
.edit-table textarea { min-height: 54px; }
.left-cell { text-align: left !important; }
.check-col { width: 52px; text-align: center; }
.action-col { width: 130px; }
.empty-tip, .empty-history { text-align: center; color: var(--muted); padding: 20px !important; }
.footer-line { text-align: left !important; padding: 12px 14px !important; background: #fff; }
.footer-right { text-align: right !important; }
.single-card { max-width: 720px; margin: 30px auto; }
.side-card { overflow: hidden; }
.overview-mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; padding: 18px 22px 4px; }
.overview-mini-grid div { background: #f7faf8; border: 1px solid #e7efea; border-radius: 14px; padding: 14px 12px; text-align: center; }
.overview-mini-grid b { display: block; font-size: 24px; }
.overview-mini-grid span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.share-create-box { padding: 16px 22px 4px; }
.stack-form { display: flex; flex-direction: column; gap: 12px; }
.compact-stack textarea { min-height: 90px; }
.share-list, .history-list { display: flex; flex-direction: column; gap: 12px; padding: 10px 22px 22px; }
.share-item-card, .history-item {
  border: 1px solid #e6eeea; border-radius: 14px; padding: 14px; background: #fff;
}
.share-item-card.share-updated { border-color: #d8e6fa; background: #f8fbff; }
.share-item-card.share-draft { border-color: #f0e4c6; background: #fffdf8; }
.share-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.share-item-meta { color: var(--muted); font-size: 12px; line-height: 1.6; }
.share-actions-grid, .history-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.mini-link, .history-actions a { font-size: 13px; }
.danger-text { color: var(--danger); }
.item-dialog {
  width: min(980px, calc(100vw - 24px)); border: 1px solid rgba(53, 141, 99, 0.14); border-radius: 20px; padding: 0;
}
.item-dialog::backdrop { background: rgba(13, 34, 23, 0.36); backdrop-filter: blur(3px); }
.dialog-head {
  display: flex; justify-content: space-between; gap: 14px; align-items: flex-start;
  padding: 22px 24px 12px; border-bottom: 1px solid #edf3ef;
}
.dialog-head h3 { margin: 0; font-size: 22px; }
.dialog-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.dialog-close {
  width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f5f8f6; color: var(--text); font-size: 24px; cursor: pointer;
}
.dialog-grid {
  display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px 24px 10px;
}
.dialog-span-3 { grid-column: 1 / -1; }
.dialog-actions { padding: 6px 24px 22px; justify-content: flex-end; }
.quick-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip-btn {
  border: 1px solid #dce8e0; background: #f7faf8; color: var(--brand-dark); border-radius: 999px;
  padding: 6px 10px; font: inherit; font-size: 12px; cursor: pointer;
}
.readonly-table td { background: #fff; }
.row-actions { justify-content: center; }
.mini-btn {
  border: 1px solid #dce8e0; background: #fff; color: var(--brand-dark); border-radius: 999px;
  padding: 6px 10px; font-size: 12px; cursor: pointer;
}
.mini-btn.danger { border-color: #f0d2d2; color: var(--danger); }
.share-meta-inline {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px 0; flex-wrap: wrap;
}
.share-meta-left { font-weight: 700; }
.share-meta-right { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.share-meta-time { color: var(--muted); font-size: 12px; }
.mobile-card-list { display: none; }
.mobile-item-card {
  border: 1px solid #e6eeea; border-radius: 16px; padding: 14px; background: #fff; margin-bottom: 12px;
}
.mobile-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.mobile-item-content { font-weight: 700; line-height: 1.6; margin-bottom: 10px; }
.mobile-item-meta { display: flex; gap: 10px; line-height: 1.7; margin-bottom: 8px; }
.mobile-item-meta label { flex: 0 0 46px; margin: 0; }
.mobile-row-actions { justify-content: flex-start; margin-top: 8px; }
.calendar-grid {
  display: grid; gap: 12px; padding: 18px 22px 22px;
}
.calendar-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.calendar-grid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.calendar-grid.cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-cell {
  border: 1px solid #e5eeea; border-radius: 16px; background: #fff; min-height: 240px; display: flex; flex-direction: column;
}
.calendar-cell > header {
  padding: 14px 14px 10px; border-bottom: 1px solid #edf3ef; background: #f8fbf9;
  display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center;
}
.calendar-cell header strong { font-size: 15px; }
.calendar-cell header span { color: var(--muted); font-size: 13px; }
.calendar-cell header em { font-style: normal; color: var(--brand-dark); font-size: 12px; }
.calendar-items { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.calendar-item { border: 1px solid #e8efea; border-radius: 14px; padding: 10px; background: #fff; }
.calendar-time { color: var(--brand-dark); font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.calendar-content { line-height: 1.6; font-weight: 700; }
.calendar-meta { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.calendar-empty { color: var(--muted); min-height: 96px; display: flex; align-items: center; justify-content: center; }
.compact-calendar { padding-top: 6px; }
.compact-preview thead th:first-child { font-size: 16px; }
.small-preview-scroll .preview-table { min-width: 940px; }
.print-shell { max-width: 100%; padding: 0; background: #eef2ef; }
.print-toolbar {
  position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 20px; background: rgba(255,255,255,0.95); border-bottom: 1px solid #e5ede8;
}
.print-title { font-size: 18px; font-weight: 800; }
.print-paper {
  max-width: 1280px; margin: 18px auto 28px; background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 28px;
}
.print-doc-title { text-align: center; font-size: 24px; font-weight: 800; margin-bottom: 18px; }
.print-table thead tr:first-child th { font-size: 15px !important; }
.print-calendar-grid { padding: 0; }
.print-calendar-cell { min-height: 290px; }
.no-print { display: flex; }
@media (max-width: 1300px) {
  .layout-grid, .single-main-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .page-shell { padding: 12px; }
  .hero-card, .card-header, .dialog-grid, .section-head { gap: 12px; }
  .hero-card { flex-direction: column; align-items: flex-start; padding: 18px; }
  .hero-card h1 { font-size: 26px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .overview-mini-grid { grid-template-columns: 1fr; }
  .dialog-grid { grid-template-columns: 1fr; padding: 16px 18px 8px; }
  .card-header, .card-section { padding-left: 16px; padding-right: 16px; }
  .share-meta-inline { padding-left: 16px; padding-right: 16px; }
  .calendar-grid, .print-calendar-grid { grid-template-columns: 1fr !important; padding-left: 16px; padding-right: 16px; }
  .mobile-only-hidden { display: none; }
  .mobile-only-show { display: block; }
  .mobile-card-list { display: block; }
  .print-paper { border-radius: 0; margin: 0; padding: 18px 14px; }
}
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .print-paper { box-shadow: none; border-radius: 0; margin: 0; max-width: none; padding: 0; }
  .print-doc-title { margin: 0 0 12px; }
  .print-calendar-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 8px; }
  .print-calendar-cell { min-height: 190px; break-inside: avoid; }
}


.time-field-wrap { align-self: start; }
.time-suggest-inline { margin-top: 8px; }
.time-suggest-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.time-suggest-inline .quick-chips { margin-top: 0; }
@media (max-width: 900px) {
  .time-field-wrap { grid-column: 1 / -1; }
}


.lock-fieldset { border: 0; padding: 0; margin: 0; min-inline-size: 0; }
.lock-banner {
  margin: 0 22px 8px; padding: 14px 16px; border-radius: 16px; border: 1px solid #d7e9de;
  background: linear-gradient(135deg, rgba(53,141,99,.11), rgba(53,141,99,.04));
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.compact-lock-banner { margin-top: 12px; }
.lock-note {
  padding: 12px 14px; border-radius: 14px; background: #f7faf8; border: 1px dashed #d7e9de; color: var(--muted);
}
.suggest-list {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.suggest-list[hidden] { display: none; }
.suggest-item {
  border: 1px solid #dbe8df; background: #fff; color: var(--brand-dark);
  border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 12px; cursor: pointer;
}
.suggest-item:hover { background: var(--brand-soft); }
.calendar-cell.density-low > header { background: #f7fbf8; }
.calendar-cell.density-mid > header { background: #f3f8ff; }
.calendar-cell.density-high > header { background: #fff7eb; }
.calendar-toggle {
  margin: 0 12px 12px; border: 1px dashed #cfe1d6; background: #f8fbf9; color: var(--brand-dark);
  border-radius: 999px; padding: 8px 12px; font: inherit; cursor: pointer;
}
.calendar-meta { display: flex; flex-direction: column; gap: 4px; }
.calendar-item-extra { background: #fcfefd; }
.share-meta-compact { padding-top: 14px; }
.polished-mobile-card {
  border-radius: 18px; box-shadow: 0 10px 24px rgba(26, 48, 38, 0.06); border-color: #e3ece7;
}
.mobile-item-time { color: var(--muted); font-size: 12px; margin-top: 4px; }
.mobile-item-pill {
  display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 12px; font-weight: 700;
}
.mobile-item-grid { display: grid; gap: 8px; }
.mobile-row-actions-large .mini-btn { padding: 10px 14px; font-size: 13px; }
.print-lock-pill {
  display: inline-flex; margin-left: 10px; padding: 4px 10px; border-radius: 999px; font-size: 12px;
  background: var(--brand-soft); color: var(--brand-dark); vertical-align: middle;
}
.share-state-draft { border-left: 4px solid #dca537; }
.share-state-updated { border-left: 4px solid #4b87c8; }
.share-state-submitted { border-left: 4px solid var(--brand); }
.locked-tools { justify-content: flex-start; }
@media (max-width: 900px) {
  .share-mobile-hero { padding-bottom: 14px; }
  .share-mobile-hero h1 { font-size: 24px; }
  .share-tools { position: sticky; top: 12px; z-index: 6; background: rgba(255,255,255,.96); padding: 10px; border-radius: 16px; border: 1px solid #ebf2ee; }
  .mobile-item-grid { gap: 10px; }
  .mobile-item-meta { align-items: flex-start; }
  .mobile-item-meta label { flex-basis: 54px; color: var(--muted); }
}
@media print {
  .calendar-extra { display: contents !important; }
  .calendar-toggle, .print-lock-pill.no-print { display: none !important; }
}

.publish-box { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 12px; }
.publish-link-row { display: flex; gap: 10px; align-items: center; }
.publish-link-input {
  flex: 1; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 1px solid #dbe6df;
  background: #f9fcfa; color: var(--text); font: inherit;
}
.publish-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.public-shell { background: linear-gradient(180deg, #eef4f0 0%, #f6faf7 100%); }
.public-topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid #e4ece8;
}
.public-topbar-inner {
  max-width: 1320px; margin: 0 auto; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.public-kicker { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.public-title { font-size: 24px; font-weight: 900; line-height: 1.25; }
.public-subtitle { color: var(--muted); margin-top: 6px; }
.public-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tab-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.public-container { max-width: 1320px; margin: 0 auto; padding: 20px; }
.public-switcher { display: none; gap: 10px; margin-bottom: 14px; }
.public-hero-card {
  background: linear-gradient(135deg, rgba(53,141,99,.10), rgba(53,141,99,.03)); border: 1px solid #dfeae4;
  border-radius: 24px; padding: 24px 26px; box-shadow: 0 18px 40px rgba(34, 58, 47, .06);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px;
}
.public-hero-card h1 { margin: 0; font-size: 34px; line-height: 1.25; }
.public-meta-inline { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.public-meta-inline span, .public-badge {
  display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,.82); border: 1px solid #dce8e1; color: var(--brand-dark); font-size: 13px; font-weight: 700;
}
.public-table-wrap {
  background: #fff; border: 1px solid #e3ece7; border-radius: 24px; box-shadow: 0 20px 44px rgba(34, 58, 47, .06);
  overflow: auto; padding: 20px;
}
.public-preview-table { width: 100%; min-width: 1180px; border-collapse: separate; border-spacing: 0; }
.public-preview-table th, .public-preview-table td {
  border-right: 1px solid #dbe5df; border-bottom: 1px solid #dbe5df; padding: 12px 12px; background: #fff; vertical-align: middle;
}
.public-preview-table th:first-child, .public-preview-table td:first-child { border-left: 1px solid #dbe5df; }
.public-preview-table thead th { text-align: center; font-weight: 800; }
.public-preview-table thead .group-row th {
  background: linear-gradient(180deg, #ebf4ef, #e4efe9); color: var(--brand-dark); font-size: 16px; padding: 14px 8px;
}
.public-preview-table thead .sub-row th { background: #f7faf8; color: #234737; font-size: 14px; }
.public-preview-table tbody tr:nth-child(even) td { background: #fbfdfc; }
.public-preview-table .work-col { font-weight: 700; line-height: 1.72; }
.public-preview-table tfoot td { background: #fff; }
.public-calendar-grid { display: grid; gap: 14px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.public-calendar-grid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.public-calendar-grid.cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.public-calendar-cell {
  border: 1px solid #e2ebe6; border-radius: 20px; background: #fff; box-shadow: 0 14px 36px rgba(34, 58, 47, .05);
  overflow: hidden; min-height: 260px; display: flex; flex-direction: column;
}
.public-calendar-cell > header {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; background: #f8fbf9; border-bottom: 1px solid #eaf1ed;
}
.public-calendar-cell header strong { display: block; font-size: 16px; }
.public-calendar-cell header span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.public-calendar-cell header em { font-style: normal; color: var(--brand-dark); font-size: 12px; }
.public-calendar-items { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.public-calendar-item { border: 1px solid #e8efea; border-radius: 14px; padding: 11px 12px; background: #fff; }
.public-calendar-time { font-size: 12px; color: var(--brand-dark); font-weight: 800; margin-bottom: 6px; }
.public-calendar-content { font-weight: 800; line-height: 1.7; }
.public-calendar-extra { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; }
.public-mobile-cards { display: none; }
.public-mobile-day-card { background: #fff; border: 1px solid #e3ece7; border-radius: 20px; box-shadow: 0 12px 30px rgba(34, 58, 47, .05); overflow: hidden; margin-top: 14px; }
.public-mobile-day-card > header { padding: 14px 16px; background: #f8fbf9; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #edf3ef; }
.public-mobile-item-card { padding: 14px 16px; border-top: 1px solid #f0f4f1; }
.public-mobile-time { color: var(--brand-dark); font-size: 12px; font-weight: 800; margin-bottom: 6px; }
.public-mobile-content { font-weight: 800; line-height: 1.7; margin-bottom: 8px; }
.public-mobile-meta { display: grid; grid-template-columns: 56px 1fr; gap: 8px; color: var(--muted); line-height: 1.7; font-size: 13px; }
.public-mobile-meta label { color: var(--text); font-weight: 700; }
.public-calendar-cell.density-mid > header { background: #f3f8ff; }
.public-calendar-cell.density-high > header { background: #fff6e9; }

@media (max-width: 900px) {
  .publish-link-row { flex-direction: column; align-items: stretch; }
  .public-topbar { display: none; }
  .public-container { padding: 14px; }
  .public-switcher { display: flex; }
  .public-hero-card { padding: 18px; border-radius: 20px; }
  .public-hero-card h1 { font-size: 24px; }
  .public-calendar-grid { grid-template-columns: 1fr !important; }
  .public-table-wrap { display: none; }
  .public-mobile-cards { display: block; }
}

@media print {
  .public-topbar, .public-switcher { display: none !important; }
  .public-container { max-width: none; padding: 0; }
  .public-hero-card { box-shadow: none; border-radius: 0; border: 0; background: #fff; padding: 0 0 12px; }
  .public-table-wrap, .public-calendar-cell, .public-mobile-day-card { box-shadow: none; }
  .public-table-wrap { border: 0; border-radius: 0; padding: 0; overflow: visible; }
  .public-preview-table { min-width: 0; }
  .public-calendar-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}

.inline-form { display: inline-flex; margin: 0; }
.mini-link-btn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.login-shell { min-height: calc(100vh - 40px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: min(520px, 100%); background: #fff; border: 1px solid #dfe8e3; border-radius: 28px; box-shadow: 0 24px 60px rgba(20, 46, 36, .10); padding: 28px; }
.login-card h1 { margin: 8px 0 12px; }
.login-form { margin-top: 18px; }
.login-btn { width: 100%; justify-content: center; }
.login-tip { margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.login-tip code { background: #f4f7f5; border: 1px solid #e2ebe6; border-radius: 8px; padding: 2px 6px; }
