:root {
  --ink: #17202a;
  --muted: #6c6b69;
  --line: rgba(23, 32, 42, 0.08);
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #fffdf7;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  --cms-bg: #f3f6fb;
  --cms-panel: #ffffff;
  --cms-line: #e5eaf2;
  --cms-ink: #1f2937;
  --cms-muted: #6b7280;
  --cms-primary: #2563eb;
  --cms-primary-dark: #1d4ed8;
  --cms-danger: #dc2626;
  --cms-success: #16a34a;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.public-body,
.public-body * {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.public-body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  background: url('https://picsum.photos/1080/1920') center/cover no-repeat fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transform: translateZ(0);
}

.public-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(24px);
  z-index: 0;
}

.app-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  height: 95vh;
  height: 95dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  contain: layout paint size;
}

.follow-bar {
  background: linear-gradient(90deg, #7a7ffd, #5e72eb);
  color: white;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  font-size: 14px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

#followText {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
}

.follow-text-inline,
.notice-line,
.tip-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
}

.follow-text-inline {
  width: 100%;
}

.follow-text-body,
.notice-line-body,
.tip-line-body {
  min-width: 0;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: inherit;
}

.follow-text-icon,
.notice-line-icon,
.tip-line-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  font-size: 16px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.follow-text-icon-svg,
.notice-line-icon-svg,
.tip-line-icon-svg {
  width: 16px;
  height: 16px;
  display: block;
}

.follow-text-icon-svg,
.tip-line-icon-svg {
  color: currentColor;
}

.notice-line-icon-svg {
  color: #4e5ce9;
}

.follow-btn,
.auth-primary,
.auth-secondary,
.send-btn,
.img-btn,
.modal-btn,
.btn-cancel,
.btn-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-icon,
.back-icon,
.title-icon,
.entry-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  font-size: 16px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.ui-icon,
.back-icon-svg,
.title-icon-svg,
.entry-icon-svg,
.modal-icon-svg,
.auth-guide-svg {
  display: block;
  width: 20px;
  height: 20px;
}

.entry-icon-svg {
  width: 28px;
  height: 28px;
}

.modal-icon-svg,
.auth-guide-svg {
  width: 42px;
  height: 42px;
}

.follow-btn {
  border: none;
  background: rgba(255, 255, 255, 0.25);
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.header {
  display: none;
  background: rgba(94, 114, 235, 0.9);
  color: white;
  padding: 18px 16px;
  padding-top: calc(18px + env(safe-area-inset-top));
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  position: relative;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.back-btn {
  position: absolute;
  left: 16px;
  top: calc(18px + env(safe-area-inset-top));
  padding: 0;
  border: none;
  background: transparent;
  color: white;
  font-size: 16px;
}

.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px 20px;
  overflow-y: auto;
}

.home-title {
  font-size: 26px;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
}

.home-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.board-list {
  width: 100%;
  display: grid;
  gap: 16px;
}

.entry-btn {
  width: 100%;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  background: rgba(94, 114, 235, 0.92);
  color: white;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 8px 25px rgba(94, 114, 235, 0.25);
  transition: transform 0.2s ease;
  display: block;
  transform: translateZ(0);
}

.entry-btn:active { transform: scale(0.95) translateZ(0); }

.entry-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.entry-icon {
  font-size: 22px;
}

.entry-label { line-height: 1.2; }

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notice-bar {
  background: linear-gradient(90deg, #f8f9ff, #eef2ff);
  color: #4e5ce9;
  padding: 12px 16px;
  font-size: 13px;
  text-align: center;
  font-weight: 600;
  border-radius: 12px;
  margin: 8px 12px;
  border: 1px solid rgba(94, 114, 235, 0.15);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(94, 114, 235, 0.08);
}

.notice-richtext {
  font-size: 13px;
  line-height: 1.7;
  text-align: left;
  font-weight: 600;
  color: inherit;
}

.notice-richtext > :first-child {
  margin-top: 0;
}

.notice-richtext > :last-child {
  margin-bottom: 0;
}

.notice-richtext p,
.notice-richtext div,
.notice-richtext ul,
.notice-richtext ol {
  margin: 0 0 8px;
}

.notice-richtext ul,
.notice-richtext ol {
  padding-left: 18px;
}

.notice-richtext a {
  color: #4054d8;
  word-break: break-all;
}

.notice-richtext img {
  display: block;
  width: auto;
  max-width: min(100%, 360px);
  max-height: 240px;
  height: auto;
  margin: 10px auto 0;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(94, 114, 235, 0.18);
  object-fit: contain;
  cursor: zoom-in;
}

.notice-image-entry {
  margin-top: 8px;
}

.notice-image-trigger {
  border: none;
  padding: 0;
  background: transparent;
  color: #4054d8;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: underline;
}

.input-tip {
  padding: 6px 16px;
  font-size: 12px;
  color: #888;
  background: rgba(255, 255, 255, 0.4);
  text-align: left;
  flex-shrink: 0;
}

.msg-container {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: rgba(249, 250, 252, 0.8);
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.empty-state {
  color: #8b8b8b;
  text-align: center;
  padding: 42px 16px;
  font-size: 14px;
}

.msg-item {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
  position: relative;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.my-msg {
  align-self: flex-end;
  background: rgba(94, 114, 235, 0.95);
  color: white;
  border-bottom-right-radius: 8px;
}

.other-msg {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border: 1px solid rgba(232, 233, 235, 0.6);
  border-bottom-left-radius: 8px;
}

.other-msg.is-reported {
  background: rgba(226, 232, 240, 0.95);
  border-color: rgba(203, 213, 225, 0.98);
  box-shadow: none;
  opacity: 0.82;
}

.msg-text {
  line-height: 1.6;
  white-space: pre-wrap;
}

.msg-text.is-reported {
  color: #94a3b8;
}

.msg-text + .message-image,
.copy-text + .message-image {
  margin-top: 10px;
}

.copy-text {
  display: inline-block;
  padding: 5px 10px;
  background: #f2f4f7 !important;
  color: #22c55e !important;
  border-radius: 10px;
  font-weight: 500;
  user-select: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-text.is-reported {
  color: #94a3b8 !important;
  background: #e2e8f0 !important;
  cursor: default !important;
  opacity: 0.82 !important;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
}

.copy-text.is-static {
  cursor: default !important;
  pointer-events: none;
}

.copy-text.is-login-required {
  color: #64748b !important;
  background: #eef2f7 !important;
}

.copy-text.copied {
  color: #999 !important;
  background: #eaeaea !important;
  text-decoration: none !important;
  cursor: default !important;
  opacity: 0.6 !important;
}

.copy-text.is-single-use-copy.copied {
  text-decoration: line-through !important;
  cursor: default !important;
}

.copy-text.is-repeatable-copy.copied {
  cursor: pointer !important;
}

.copy-text.simple-copied {
  color: #999 !important;
  background: #eaeaea !important;
  cursor: pointer !important;
  opacity: 0.6 !important;
}

.copy-text.is-reported.copied,
.copy-text.is-reported.simple-copied {
  color: #94a3b8 !important;
  background: #e2e8f0 !important;
  cursor: default !important;
  opacity: 0.82 !important;
}

.blur {
  filter: blur(6px);
  display: inline-block;
  padding: 0 2px;
  user-select: none;
  pointer-events: none;
}

.message-image {
  max-width: 160px;
  display: block;
  border-radius: 14px;
  cursor: pointer;
}

.message-image.is-reported {
  filter: grayscale(1);
  opacity: 0.46;
  cursor: default;
}

.del-btn {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #ff4757;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.del-btn.is-disabled,
.del-btn:disabled {
  cursor: default;
  opacity: 0.62;
}

.report-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(200, 200, 200, 0.4);
  color: #888;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.8;
}

.report-btn.is-disabled,
.report-btn:disabled {
  background: rgba(200, 200, 200, 0.48);
  color: #9a9a9a;
  cursor: default;
  opacity: 0.62;
}

.msg-item.is-reported .report-btn {
  background: rgba(200, 200, 200, 0.48);
  color: #9a9a9a;
}

.send-bar {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.send-input,
#previewNicknameInput,
#reportDetail {
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 26px;
  outline: none;
  font-size: 14px;
  background: rgba(242, 244, 247, 0.9);
}

.send-input { flex: 1; }
.public-body input[type="file"] { display: none; }

.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: 0.2s ease;
  background: rgba(242, 244, 247, 0.9);
}

.send-btn {
  background: rgba(94, 114, 235, 0.92);
  color: white;
}

.img-btn {
  color: #475569;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.modal-box {
  background: rgba(255, 255, 255, 0.95);
  width: 88%;
  max-width: 340px;
  border-radius: 28px;
  padding: 32px 26px;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: pop 0.35s ease;
}

@keyframes pop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: #5e72eb;
  min-height: 42px;
  line-height: 1;
  font-size: 40px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.modal-text {
  font-size: 16px;
  color: #333;
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.5;
}

.copy-content {
  font-size: 15px;
  color: #5e72eb;
  font-weight: 600;
  word-break: break-word;
  margin-bottom: 24px;
  line-height: 1.6;
}

.modal-btn {
  padding: 14px 32px;
  background: #5e72eb;
  color: #fff;
  border: none;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 600;
}

.report-title {
  font-size: 22px;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.2;
}

.title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  line-height: 1;
  font-size: 22px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.title-icon-svg {
  width: 22px;
  height: 22px;
}

.report-warning {
  font-size: 13px;
  color: #fff;
  background: rgba(255, 77, 79, 0.95);
  padding: 11px 15px;
  border-radius: 14px;
  margin-bottom: 20px;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(255, 77, 79, 0.2);
}

.report-select {
  width: 100%;
  height: 150px;
  border: 1px solid rgba(242, 244, 247, 0.6);
  border-radius: 20px;
  padding: 10px;
  overflow-y: auto;
  font-size: 15px;
  background: rgba(249, 250, 252, 0.85);
}

.report-option {
  padding: 15px;
  border-radius: 16px;
  cursor: pointer;
  margin-bottom: 6px;
  transition: 0.25s ease;
  font-weight: 500;
}

.report-option.active {
  background: rgba(94, 114, 235, 0.95);
  color: #fff;
  box-shadow: 0 4px 12px rgba(94, 114, 235, 0.2);
}

#reportDetail {
  width: 100%;
  margin-top: 12px;
  padding: 15px 18px;
  border-radius: 18px;
  border: 1px solid rgba(232, 233, 235, 0.5);
  font-size: 15px;
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  display: none;
}

.modal-btns {
  display: flex;
  gap: 14px;
  margin-top: 26px;
}

.btn-cancel,
.btn-confirm {
  flex: 1;
  padding: 17px;
  border: none;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 600;
}

.btn-cancel {
  background: rgba(242, 244, 247, 0.9);
  color: #555;
}

.btn-confirm {
  background: rgba(239, 68, 68, 0.95);
  color: white;
  box-shadow: 0 5px 15px rgba(239, 68, 68, 0.25);
}

.btn-cancel:active,
.btn-confirm:active {
  transform: scale(0.96);
}

.report-modal-box {
  width: 88%;
  max-width: 340px;
  padding: 32px 26px;
}

.report-modal-actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.img-preview-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.img-preview-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  object-fit: contain;
}

.follow-guide-box {
  background: #ffffff;
  width: 88%;
  max-width: 350px;
  border-radius: 28px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: pop 0.35s ease;
}

.follow-guide-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  line-height: 1;
}

.follow-guide-icon svg {
  display: block;
  width: 28px;
  height: 28px;
}

.follow-guide-title {
  font-size: 22px;
  font-weight: 800;
  color: #5e72eb;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
}

.follow-guide-step {
  display: flex;
  align-items: center;
  text-align: left;
  font-size: 15px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 18px;
  padding: 0 4px;
}

.pop-official {
  font-size: 17px;
  font-weight: 700;
  color: #5e72eb;
  background: #f0f4ff;
  padding: 6px 12px;
  border-radius: 12px;
  display: inline-block;
  margin: 0 4px;
  box-shadow: 0 2px 8px rgba(94, 114, 235, 0.12);
  border: 1px solid #d5dcff;
}

.follow-guide-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.copy-name-btn,
.follow-guide-close {
  padding: 14px 20px;
  border: none;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 600;
}

.copy-name-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.copy-name-btn.is-success {
  background: #000000;
}

.follow-guide-close {
  background: #f1f5f9;
  color: #475569;
}

.copy-name-btn:active,
.follow-guide-close:active {
  transform: scale(0.96);
}

.auth-guide-box {
  background: #ffffff;
  width: 88%;
  max-width: 350px;
  border-radius: 28px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: pop 0.35s ease;
}

.auth-guide-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #5e72eb;
  line-height: 1;
  font-size: 46px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.auth-guide-title {
  font-size: 22px;
  font-weight: 800;
  color: #5e72eb;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
}

.auth-guide-step {
  display: flex;
  align-items: center;
  text-align: left;
  font-size: 15px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 18px;
  padding: 0 4px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5e72eb, #7a7ffd);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-right: 12px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(94, 114, 235, 0.25);
}

.auth-guide-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.auth-primary,
.auth-secondary,
.auth-close {
  padding: 14px 20px;
  border: none;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 600;
}

.auth-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.auth-secondary {
  background: linear-gradient(135deg, #5e72eb, #7a7ffd);
  color: white;
  box-shadow: 0 4px 12px rgba(94, 114, 235, 0.25);
}

.auth-close {
  background: #f1f5f9;
  color: #475569;
}

.admin-body,
.admin-body * {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

.admin-body {
  margin: 0;
  min-height: 100vh;
  background: var(--cms-bg);
  color: var(--cms-ink);
}

.admin-login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 32%),
    radial-gradient(circle at right, rgba(59, 130, 246, 0.1), transparent 26%),
    var(--cms-bg);
}

.admin-login-layout {
  width: 100%;
  max-width: 1080px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 420px);
  gap: 28px;
  align-items: center;
}

.admin-login-hero {
  padding: 40px 36px;
  border-radius: 24px;
  background: linear-gradient(145deg, #0f172a, #1e293b);
  color: #e2e8f0;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.admin-login-hero .eyebrow {
  margin: 0 0 12px;
  color: #93c5fd;
  font-size: 12px;
  letter-spacing: 0.14em;
}

.admin-login-hero h1 {
  margin: 0 0 16px;
  font-size: 34px;
  line-height: 1.2;
  color: #f8fafc;
}

.admin-login-hero > p {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: #cbd5e1;
}

.admin-login-points {
  margin-top: 28px;
  display: grid;
  gap: 12px;
}

.admin-login-point {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.admin-side {
  background: #111827;
  color: #e5e7eb;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-block h1 {
  margin: 6px 0 10px;
  font-size: 22px;
  color: #f9fafb;
}

.brand-block .eyebrow {
  margin: 0;
  color: #93c5fd;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-block p:last-child {
  margin: 0;
  color: #9ca3af;
  line-height: 1.6;
}

.admin-nav {
  display: grid;
  gap: 8px;
}

.admin-nav a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 10px;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.admin-hint {
  margin-top: auto;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 6px;
  color: #cbd5e1;
  font-size: 13px;
}

.admin-main {
  padding: 24px;
  display: block;
}

.admin-login-card {
  width: 100%;
  max-width: 420px;
  margin: 0;
}

.admin-login-card,
.panel,
.toolbar,
.stat-card {
  background: var(--cms-panel);
  border: 1px solid var(--cms-line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.admin-login-card,
.panel {
  padding: 24px;
}

.admin-login-card h2,
.panel h3,
.toolbar h2 {
  margin: 0 0 16px;
}

.admin-login-card .muted {
  margin: 0 0 18px;
  color: var(--cms-muted);
  line-height: 1.6;
}

.admin-login-card form {
  display: grid;
  gap: 14px;
}

.admin-login-card .primary-btn {
  width: 100%;
  margin-top: 4px;
}

.toolbar {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.toolbar h2 {
  margin-bottom: 4px;
}

.toolbar .muted {
  color: var(--cms-muted);
}

.admin-app {
  display: grid;
  gap: 16px;
}

.settings-tab-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  padding: 6px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid var(--cms-line);
}

.settings-tab-btn {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--cms-muted);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.settings-tab-btn:hover {
  color: var(--cms-ink);
}

.settings-tab-btn.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(59, 130, 246, 0.9));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.settings-tab-panel {
  display: grid;
  gap: 16px;
}

.primary-btn,
.secondary-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 10px 16px;
  border: 1px solid transparent;
  font-weight: 600;
  line-height: 1;
}

.primary-btn {
  background: var(--cms-primary);
  color: white;
}

.primary-btn:hover {
  background: var(--cms-primary-dark);
}

.secondary-btn {
  background: #ffffff;
  color: var(--cms-ink);
  border-color: var(--cms-line);
}

.secondary-btn:hover {
  background: #f8fafc;
}

.danger-btn {
  background: #fff5f5;
  color: var(--cms-danger);
  border-color: #fecaca;
}

.danger-btn:hover {
  background: #fee2e2;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px;
}

.stat-card .muted {
  display: block;
  color: var(--cms-muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  color: var(--cms-ink);
}

.panel-head,
.inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stack {
  display: grid;
  gap: 14px;
}

.form-grid,
.board-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-body label {
  display: grid;
  gap: 8px;
  color: var(--cms-ink);
  font-size: 14px;
  font-weight: 500;
}

.admin-body input,
.admin-body textarea,
.admin-body select {
  width: 100%;
  border: 1px solid #d5dce6;
  border-radius: 10px;
  padding: 11px 12px;
  background: #ffffff;
  color: var(--cms-ink);
  outline: none;
}

.admin-body input:focus,
.admin-body textarea:focus,
.admin-body select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.admin-body textarea {
  resize: vertical;
  min-height: 88px;
}

.board-editor {
  padding: 18px;
  border: 1px solid var(--cms-line);
  border-radius: 14px;
  background: #fbfcfe;
}

.span-2 { grid-column: 1 / -1; }

.field-hint {
  font-size: 12px;
  color: var(--cms-muted);
  margin-top: -2px;
}

.editor-label {
  display: block;
  margin-bottom: 8px;
  color: var(--cms-ink);
  font-size: 14px;
  font-weight: 500;
}

.notice-editor-card {
  border: 1px solid #d5dce6;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.notice-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--cms-line);
  background: #f8fafc;
}

.editor-tool {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #d5dce6;
  border-radius: 10px;
  background: #ffffff;
  color: var(--cms-ink);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.editor-tool:hover {
  background: #f8fafc;
}

.editor-tool.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.editor-tool:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.editor-tool.is-danger {
  color: var(--cms-danger);
}

.editor-color-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #d5dce6;
  border-radius: 10px;
  background: #ffffff;
  color: var(--cms-ink);
  font-size: 13px;
  font-weight: 600;
}

.editor-color-input {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.editor-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.editor-color-input::-webkit-color-swatch {
  border: 1px solid #d5dce6;
  border-radius: 999px;
}

.notice-editor {
  min-height: 180px;
  padding: 14px 16px;
  outline: none;
  font-size: 14px;
  line-height: 1.75;
  color: var(--cms-ink);
}

.notice-editor.is-empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
}

.notice-editor p,
.notice-editor div,
.notice-editor ul,
.notice-editor ol {
  margin: 0 0 10px;
}

.notice-editor > :first-child {
  margin-top: 0;
}

.notice-editor > :last-child {
  margin-bottom: 0;
}

.notice-editor ul,
.notice-editor ol {
  padding-left: 20px;
}

.notice-editor a {
  color: var(--cms-primary);
  word-break: break-all;
}

.notice-editor img {
  display: block;
  width: auto;
  max-width: min(100%, 360px);
  max-height: 240px;
  height: auto;
  margin: 10px auto;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  object-fit: contain;
}

.check-line {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.check-line input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--cms-line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

thead th {
  background: #f8fafc;
  color: var(--cms-muted);
  font-size: 13px;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--cms-line);
  text-align: left;
  vertical-align: top;
}

tbody tr:hover {
  background: #fafcff;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 12px 16px;
  background: rgba(17, 24, 39, 0.92);
  color: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 12000;
}

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

@media (max-width: 1100px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .admin-login-layout {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-side {
    gap: 16px;
  }

  .admin-hint {
    margin-top: 0;
  }

  .admin-main {
    padding: 16px;
  }
}

@media (max-width: 640px) {
  .admin-login-screen {
    padding: 16px;
  }

  .admin-login-layout {
    gap: 16px;
  }

  .admin-login-hero,
  .admin-login-card {
    padding: 22px 18px;
  }

  .admin-login-hero h1 {
    font-size: 28px;
  }

  .admin-main,
  .admin-body {
    padding: 12px;
  }

  .form-grid,
  .board-editor,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .inline-actions,
  .panel-head,
  .toolbar,
  .modal-btns {
    flex-direction: column;
    align-items: stretch;
  }

  #reportModal .report-modal-actions {
    flex-direction: row;
  }
}

.admin-main {
  min-width: 0;
}

.admin-page {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.page-stack {
  display: grid;
  gap: 16px;
}

.admin-nav a.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(59, 130, 246, 0.88));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.2);
}

.toolbar > div,
.panel-head > div,
.board-card-head > div {
  min-width: 0;
}

.dashboard-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-shortcuts .secondary-btn {
  min-height: 52px;
  justify-content: center;
}

.panel-head .muted,
.board-card p {
  margin: 6px 0 0;
}

.inline-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.board-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.board-card,
.empty-card {
  background: var(--cms-panel);
  border: 1px solid var(--cms-line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.board-card {
  display: grid;
  gap: 14px;
}

.board-card-head,
.board-card-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.board-card-head h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  color: var(--cms-ink);
}

.board-card p {
  color: var(--cms-muted);
  font-size: 13px;
  line-height: 1.7;
}

.board-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.board-meta-item {
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #ecf1f7;
}

.board-meta-item span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--cms-muted);
}

.board-meta-item strong {
  display: block;
  color: var(--cms-ink);
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.board-card-foot {
  align-items: center;
}

.board-card-foot .muted {
  font-size: 12px;
  word-break: break-all;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.is-success {
  background: #dcfce7;
  color: #166534;
}

.status-pill.is-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.status-pill.is-pending {
  background: #fef3c7;
  color: #b45309;
}

.status-pill.is-muted {
  background: #e5e7eb;
  color: #4b5563;
}

.empty-card {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.empty-card strong {
  font-size: 16px;
  color: var(--cms-ink);
}

.empty-card span {
  color: var(--cms-muted);
  line-height: 1.7;
}

.admin-body table {
  min-width: 720px;
}

.table-actions {
  flex-wrap: wrap;
}

.batch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--cms-line);
  border-radius: 14px;
  background: #ffffff;
}

.batch-summary {
  color: var(--cms-muted);
  font-size: 13px;
  font-weight: 600;
}

.table-check-cell {
  width: 52px;
  min-width: 52px;
  text-align: center;
}

.table-check-input {
  width: 16px;
  height: 16px;
  accent-color: var(--cms-primary);
  cursor: pointer;
}

.table-check-input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.table-subtext {
  margin-top: 6px;
  line-height: 1.6;
}

.content-cell {
  min-width: 220px;
}

.content-preview {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.text-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--cms-primary);
  text-decoration: none;
  font-weight: 600;
}

.text-link:hover {
  color: var(--cms-primary-dark);
}

.filter-toolbar {
  display: grid;
  gap: 14px;
  margin: 18px 0 16px;
  padding: 16px;
  border: 1px solid var(--cms-line);
  border-radius: 14px;
  background: #f8fafc;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px dashed #cbd5e1;
  background: transparent;
  color: var(--cms-muted);
  font-weight: 600;
}

.ghost-btn:hover {
  background: #f8fafc;
  color: var(--cms-ink);
}

.list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--cms-line);
}

.list-summary {
  color: var(--cms-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.pagination.is-disabled {
  opacity: 1;
}

.pagination-meta,
.pagination-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  min-width: 0;
}

.pagination-actions {
  justify-content: flex-end;
}

.page-size-control {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.page-size-select {
  width: 124px;
  height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid #d5dce6;
  border-radius: 10px;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 10px 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--cms-ink);
  font-size: 13px;
  font-weight: 600;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.page-size-select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.page-size-select:hover {
  background-color: #f8fafc;
}

.pager-pages {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.pager-button {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #ffffff;
  color: var(--cms-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.pager-button.is-nav {
  min-width: 68px;
}

.pager-button:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.pager-button.is-active {
  background: var(--cms-primary);
  border-color: var(--cms-primary);
  color: #ffffff;
}

.pager-button:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.pager-ellipsis {
  color: var(--cms-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 0 2px;
}

.pager-status {
  color: var(--cms-muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.table-empty {
  text-align: center;
  color: var(--cms-muted);
  padding: 32px 16px;
}

.security-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.integration-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 18px;
}

.readonly-item {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--cms-line);
  background: #f8fafc;
  display: grid;
  gap: 8px;
}

.readonly-item span {
  color: var(--cms-muted);
  font-size: 13px;
}

.readonly-item strong {
  color: var(--cms-ink);
  line-height: 1.6;
  word-break: break-word;
}

.panel-note {
  padding: 14px 16px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 1100px) {
  .dashboard-shortcuts,
  .board-list-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .admin-side {
    min-width: 0;
    padding: 20px 16px;
  }

  .admin-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .admin-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .board-card-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid,
  .security-overview,
  .integration-overview {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .admin-body {
    padding: 0;
  }

  .admin-main {
    padding: 12px;
  }

  .toolbar {
    padding: 18px 16px;
  }

  .toolbar,
  .panel-head,
  .board-card-foot {
    align-items: stretch;
  }

  .dashboard-shortcuts,
  .board-card-meta,
  .board-list-grid {
    grid-template-columns: 1fr;
  }

  .filter-grid,
  .security-overview,
  .integration-overview {
    grid-template-columns: 1fr;
  }

  .board-card,
  .empty-card,
  .panel {
    padding: 16px;
  }

  .status-pill {
    width: fit-content;
  }

  .batch-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .filter-actions,
  .pagination-meta,
  .pagination-actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .list-footer,
  .pagination,
  .pagination-meta,
  .pagination-actions,
  .pager-pages {
    width: 100%;
  }

  .list-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-top: 12px;
  }

  .pagination {
    min-width: 0;
    justify-content: space-between;
  }

  .page-size-control {
    width: 100%;
    justify-content: space-between;
  }

  .pager-status {
    text-align: right;
  }

  .page-size-select {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  .pager-button {
    flex: 0 0 auto;
  }

  .pager-button.is-nav {
    min-width: 62px;
  }

  .pager-pages {
    justify-content: center;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 520px) {
  .public-body {
    align-items: stretch;
    background-position: center;
  }

  .app-box {
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    margin: 0;
  }

  .home {
    justify-content: flex-start;
    padding-top: 48px;
  }

  .entry-btn {
    width: 100%;
  }
}
