/* 판(게시판) 공통 */
.pans-page {
  min-height: 100vh;
  background: var(--bg-primary, #0f172a);
  color: var(--text-primary, #f1f5f9);
  padding-bottom: 48px;
}
.pans-header {
  display: grid;
  grid-template-columns: minmax(40px, auto) 1fr minmax(40px, auto);
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  z-index: 20;
}
.pans-header-left {
  justify-self: start;
}
.pans-header-right {
  justify-self: end;
}
.pans-header-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  text-align: center;
  justify-self: center;
  min-width: 0;
}
.pans-header .btn-icon-plain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.btn-icon-plain {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
}
.pans-main {
  padding: 16px;
  max-width: 640px;
  margin: 0 auto;
}
.pan-card {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.pan-card-top {
  display: flex;
  gap: 12px;
  align-items: center;
}
.pan-card-body {
  flex: 1;
  min-width: 0;
}
.pan-card-code {
  margin-top: 4px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}
.pan-card-qr {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  margin-left: 2px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}
.pan-card-qr:active {
  transform: scale(0.96);
  filter: brightness(1.1);
}
.pan-card-qr:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
}
.pan-card-qr-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.pan-card-qr-svg {
  display: block;
}
.pan-card-img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}
/* Twemoji 프리셋(이모지): 작은 PNG가 잘리지 않게 */
.pan-card-img.pan-card-img--twemoji {
  object-fit: contain;
  padding: 6px;
  background: rgba(255, 255, 255, 0.08);
}
body.light-mode .pan-card-img.pan-card-img--twemoji {
  background: rgba(15, 23, 42, 0.06);
}
.pan-card-title {
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 4px;
}
.pan-card-meta {
  font-size: 12px;
  opacity: 0.7;
}
.pan-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.pan-card-thumb-btn {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  border-radius: 10px;
  flex-shrink: 0;
  align-self: flex-start;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
  color: inherit;
  font: inherit;
}
.pan-card-thumb-btn .pan-card-img {
  display: block;
}
.pan-card-thumb-btn:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.pan-card-title-btn {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0 0 4px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  display: block;
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.pan-card-title-btn .pan-card-title {
  display: block;
  text-align: left;
}
.pan-card-title-btn:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
  border-radius: 6px;
}

.pan-card-actions--icons {
  justify-content: flex-end;
}

.pan-card-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  cursor: pointer;
  flex: 0 0 auto;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.pan-card-icon-btn:active {
  filter: brightness(1.08);
}
.pan-card-icon-btn:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}
.pan-card-icon-svg {
  display: block;
  pointer-events: none;
}
.pan-card-icon-btn--danger {
  background: rgba(220, 38, 38, 0.28);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}
.pan-card-icon-btn:disabled,
.pan-card-icon-btn.pan-card-icon-btn--disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.35);
}
.pan-card-icon-btn__busy {
  font-size: 18px;
  line-height: 1;
}

.pan-chip {
  display: inline-block;
  vertical-align: middle;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
  border: 1px solid rgba(147, 197, 253, 0.5);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.btn-sm {
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.btn-sm.icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  -webkit-tap-highlight-color: transparent;
}

.btn-sm.icon-only .btn-icon {
  font-size: 18px;
  line-height: 1;
}
.btn-sm.primary {
  background: linear-gradient(135deg, #22c55e, #22d3ee);
  color: #0f172a;
  font-weight: 600;
}
.btn-sm.danger {
  background: #dc2626;
  color: #fff;
  font-weight: 600;
  border: 1px solid #b91c1c;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}
.btn-sm.danger:active {
  filter: brightness(0.95);
}
.fab-add-pan {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #22c55e, #22d3ee);
  color: #0f172a;
  font-size: 28px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.35);
  z-index: 30;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.open {
  display: flex;
}

/* 게시판 확인 모달 (native confirm 대체) */
.board-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.board-confirm-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.board-confirm-card {
  width: 100%;
  max-width: 320px;
  background: #1e293b;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
  transform: scale(0.96);
  transition: transform 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.22);
}
.board-confirm-overlay.active .board-confirm-card {
  transform: scale(1);
}
.board-confirm-title {
  padding: 22px 20px 8px;
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  color: #f1f5f9;
  letter-spacing: -0.02em;
}
.board-confirm-message {
  padding: 0 20px 20px;
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
  color: #94a3b8;
  white-space: pre-line;
}
.board-confirm-actions {
  display: flex;
  border-top: 0.5px solid rgba(255, 255, 255, 0.12);
}
.board-confirm-btn {
  flex: 1;
  padding: 15px 12px;
  border: none;
  background: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}
.board-confirm-btn:active {
  background: rgba(255, 255, 255, 0.08);
}
.board-confirm-btn-cancel {
  border-right: 0.5px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}
.board-confirm-btn-ok {
  color: #38bdf8;
}
.board-confirm-btn-ok.board-confirm-btn-destructive {
  color: #f87171;
}
body.light-mode .board-confirm-overlay {
  background: rgba(15, 23, 42, 0.4);
}
body.light-mode .board-confirm-card {
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}
body.light-mode .board-confirm-title {
  color: #0f172a;
}
body.light-mode .board-confirm-message {
  color: #64748b;
}
body.light-mode .board-confirm-actions {
  border-top-color: rgba(15, 23, 42, 0.1);
}
body.light-mode .board-confirm-btn-cancel {
  border-right-color: rgba(15, 23, 42, 0.1);
  color: #64748b;
}
body.light-mode .board-confirm-btn-ok {
  color: #0284c7;
}
body.light-mode .board-confirm-btn-ok.board-confirm-btn-destructive {
  color: #dc2626;
}
body.light-mode .board-confirm-btn:active {
  background: rgba(15, 23, 42, 0.06);
}

.modal-sheet {
  background: #1e293b;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 20px;
  color: #f1f5f9;
}
.modal-sheet h2 {
  margin: 0 0 16px;
  font-size: 18px;
}
.form-row {
  margin-bottom: 14px;
}
.form-row label {
  display: block;
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 6px;
}
.form-row input[type="text"],
.form-row input[type="url"],
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font-size: 15px;
  box-sizing: border-box;
}
.form-row textarea {
  min-height: 80px;
  resize: vertical;
}
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.qr-box {
  text-align: center;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  margin: 12px 0;
}
.qr-box canvas,
.qr-box img {
  max-width: 100%;
}
.join-url-text {
  font-size: 12px;
  word-break: break-all;
  opacity: 0.85;
  margin-top: 8px;
}

.qr-modal-qr-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 12px 0 0;
  flex-wrap: wrap;
}

.qr-modal-qr-row .qr-box {
  flex: 0 0 auto;
  margin: 0;
}

.join-url-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  width: 100%;
  box-sizing: border-box;
}

.join-url-row .join-url-text {
  flex: 1;
  min-width: 0;
  margin-top: 0;
}

.bm-qr-action-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.1s;
}

.bm-qr-action-btn:active {
  transform: scale(0.96);
}

.bm-qr-action-btn--compact {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-top: -2px;
}

.bm-qr-action-btn.is-copied {
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

/* --- 내판 관리 (boards_manage) — 나의 댓글·내 정보 화면과 톤 맞춤 --- */
.bm-page.pans-page {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  background-color: #0f172a;
  background-image:
    radial-gradient(circle at 0% 0%, #1e1b4b 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, #1e1b4b 0%, transparent 50%);
  color: #f8fafc;
  padding-bottom: 32px;
}

.bm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.bm-header-left,
.bm-header-right {
  display: flex;
  align-items: center;
  min-width: 44px;
}

.bm-header-right {
  justify-content: flex-end;
}

.bm-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  flex: 1;
  text-align: center;
  letter-spacing: -0.02em;
}

.bm-btn-icon {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition:
    background 0.15s,
    color 0.15s;
}

.bm-btn-icon:active {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

.bm-btn-add {
  color: #3b82f6;
}

.bm-btn-add:active {
  color: #60a5fa;
}

.bm-intro {
  padding: 18px 16px 8px;
  max-width: 640px;
  margin: 0 auto;
}

.bm-intro-text {
  font-size: 14px;
  line-height: 1.5;
  color: #94a3b8;
  margin: 0;
}

.bm-main.pans-main {
  padding-top: 8px;
}

.bm-page .pan-card {
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.bm-page .pan-card-title {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.bm-page .pan-card-meta {
  color: #94a3b8;
  opacity: 1;
}

.bm-page .pan-card-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.bm-page .pan-card-actions::-webkit-scrollbar {
  display: none;
}

.bm-page .pan-card-actions .btn-sm {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  min-height: 34px;
  box-sizing: border-box;
}

/* 보조 액션: primary/danger와 동일한 ‘버튼’ 실루엣 */
.bm-page .pan-card-actions .btn-sm:not(.primary):not(.danger) {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f1f5f9;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.bm-page .pan-card-actions .btn-sm:not(.primary):not(.danger):active {
  filter: brightness(1.08);
}

.bm-page .btn-sm {
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}

.bm-page .btn-sm.primary {
  background: #3b82f6;
  color: #fff;
  border: 1px solid rgba(37, 99, 235, 0.9);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.bm-page .pan-card-actions .btn-sm.primary {
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.35);
}

.bm-page .btn-sm.danger {
  background: #dc2626;
  color: #fff;
  font-weight: 600;
  border: 1px solid #b91c1c;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.4);
}

.bm-page .pan-card-actions .btn-sm.danger {
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.35);
}

.bm-page .pan-card-actions--icons {
  gap: 8px;
  justify-content: flex-end;
}
.bm-page .pan-card-icon-btn {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}
.bm-page .pan-card-icon-btn--danger {
  background: rgba(220, 38, 38, 0.38);
  border-color: rgba(248, 113, 113, 0.55);
  color: #fff;
}

.bm-page .pan-chip {
  background: rgba(59, 130, 246, 0.28);
  color: #bfdbfe;
  border: 1px solid rgba(147, 197, 253, 0.55);
}

.bm-empty,
.bm-error {
  text-align: center;
  padding: 40px 24px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(30, 41, 59, 0.35);
  margin-top: 8px;
}

.bm-empty-icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 12px;
  opacity: 0.85;
}

.bm-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: #f8fafc;
  margin: 0 0 8px;
}

.bm-empty-sub,
.bm-error p {
  font-size: 14px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}

.bm-error p {
  color: #fecaca;
}

/* Bottom sheet 모달 */
.bm-modal-sheet {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  padding: 8px 20px 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

/* QR 공유 모달: 상단·중앙만 스크롤, 닫기는 하단 고정 (짧은 화면에서 버튼 잘림 방지) */
#modal-qr .modal-sheet.bm-modal-sheet--qr {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  max-height: min(92vh, calc(100dvh - env(safe-area-inset-bottom, 0px) - 12px));
  overflow: hidden;
  padding-top: 8px;
  padding-bottom: 0;
}

#modal-qr .bm-qr-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#modal-qr .bm-qr-modal-footer {
  flex-shrink: 0;
  padding-top: 10px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: #1e293b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#modal-qr .qr-canvas-container {
  margin: 10px 0;
  padding: 10px;
}

#modal-qr .qr-action-row {
  margin-bottom: 14px;
}

#modal-qr .join-url-row {
  margin-bottom: 4px;
}

body.light-mode #modal-qr .bm-qr-modal-footer {
  background: #fff;
  border-top-color: rgba(15, 23, 42, 0.1);
}

.bm-modal-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  margin: 4px auto 16px;
}

.bm-modal-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.bm-modal-sheet h2.bm-modal-title {
  margin: 0 0 6px;
}

.bm-modal-desc {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 16px;
  line-height: 1.45;
}

.bm-modal-desc-spaced {
  margin-bottom: 14px;
}

.bm-field-group {
  margin-bottom: 16px;
}

.bm-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 8px;
}

.bm-hint {
  font-size: 12px;
  color: #94a3b8;
  margin: 0 0 8px;
  line-height: 1.4;
}

.bm-hint--inline {
  margin-top: 4px;
  margin-bottom: 6px;
  font-weight: 600;
  color: #cbd5e1;
}

.bm-image-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
}

.bm-image-row .bm-image-preview-wrap {
  margin-bottom: 0;
}

.bm-image-actions {
  flex: 1;
  min-width: min(160px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bm-image-actions .bm-file-label {
  margin-top: 0;
}

.bm-image-preview-wrap {
  position: relative;
  width: 100%;
  max-width: 160px;
  min-height: 120px;
  margin: 0 0 12px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}

.bm-image-preview-wrap.has-image {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.65);
}

.bm-image-preview-img {
  display: none;
  width: 100%;
  height: auto;
  max-height: 160px;
  object-fit: cover;
  aspect-ratio: 1;
  border-radius: 12px;
  vertical-align: middle;
}

.bm-image-preview-wrap.has-image .bm-image-preview-img {
  display: block;
}

.bm-image-preview-img.bm-image-preview-img--twemoji {
  object-fit: contain;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.bm-image-preview-empty {
  margin: 0;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
  text-align: center;
}

.bm-image-preview-wrap.has-image .bm-image-preview-empty {
  display: none;
}

.bm-preset-root {
  margin-top: 14px;
  margin-bottom: 12px;
  max-height: min(360px, 52vh);
  overflow-y: auto;
  padding: 4px 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.35);
}

#modal-board-presets.modal-overlay {
  z-index: 110;
  align-items: flex-end;
}

.bm-modal-sheet--presets {
  max-height: 88vh;
}

.bm-preset-root--modal {
  margin-top: 0;
  margin-bottom: 16px;
  max-height: min(52vh, 440px);
}

.bm-preset-category {
  margin-bottom: 12px;
}

.bm-preset-category:last-child {
  margin-bottom: 0;
}

.bm-preset-cat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #94a3b8;
  margin: 0 0 6px 4px;
}

.bm-preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bm-preset-tile {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.1s;
}

.bm-preset-tile img {
  width: 32px;
  height: 32px;
  display: block;
  pointer-events: none;
}

.bm-preset-tile:active {
  transform: scale(0.96);
}

.bm-preset-tile:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
}

.bm-preset-tile.is-selected {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.22);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.bm-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.6);
  color: #f8fafc;
  font-size: 16px;
  box-sizing: border-box;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.bm-input::placeholder {
  color: #64748b;
}

.bm-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.bm-textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
}

.bm-file-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.bm-file-input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.bm-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.15s;
}

.bm-file-btn:active {
  background: rgba(255, 255, 255, 0.16);
}

.bm-file-name {
  font-size: 13px;
  color: #94a3b8;
  flex: 1;
  min-width: 120px;
}

.bm-check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.bm-check {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #3b82f6;
  cursor: pointer;
}

.bm-check-label {
  font-size: 14px;
  line-height: 1.45;
  color: #e2e8f0;
  cursor: pointer;
  margin: 0;
}

.bm-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.bm-btn-secondary,
.bm-btn-primary {
  flex: 1;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition:
    opacity 0.15s,
    transform 0.1s;
}

.bm-btn-secondary:active,
.bm-btn-primary:active {
  transform: scale(0.98);
}

.bm-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.bm-btn-primary {
  background: #3b82f6;
  color: #fff;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.bm-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.bm-btn-block {
  flex: none;
  width: 100%;
  margin-top: 16px;
}

.bm-modal-sheet .qr-box {
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#modal-members .modal-sheet.bm-modal-sheet--members {
  max-width: min(640px, 96vw);
  width: 100%;
}

.bm-members-list {
  max-height: min(65vh, 520px);
  overflow-y: auto;
  margin-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.bm-member-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  color: #e2e8f0;
}

.bm-member-main {
  flex: 1;
  min-width: 0;
}

.bm-member-name {
  font-weight: 600;
  font-size: 15px;
  color: #f1f5f9;
  margin-bottom: 4px;
  word-break: break-word;
  line-height: 1.35;
}

.bm-member-meta {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.35;
  word-break: break-all;
}

.bm-member-meta--solo {
  font-size: 14px;
  color: #cbd5e1;
}

.bm-member-row--owner {
  justify-content: flex-start;
  color: #94a3b8;
  font-size: 13px;
}

.bm-member-row--owner .bm-member-meta {
  font-size: 12px;
}

.bm-member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* pan.html — 판 내부 */
.pan-hero {
  height: 140px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.pan-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95), transparent);
}
.pan-hero-inner {
  position: absolute;
  bottom: 12px;
  left: 16px;
  right: 16px;
}
.pan-hero-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}
.pan-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* 참가 신청만 투명 배경 (글작성·즐겨찾기는 아이콘 버튼 실루엣 유지) */
.pan-toolbar #btn-join {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* 즐겨찾기·글작성: 정렬 버튼(pan-sort-btn)과 같은 둥근 사각형 */
.pan-toolbar #btn-favorite.btn-sm.icon-only,
.pan-toolbar #btn-write.btn-sm.icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.72);
  box-shadow: none !important;
  font-weight: 400;
}

.pan-toolbar #btn-favorite.btn-sm.icon-only .btn-icon,
.pan-toolbar #btn-write.btn-sm.icon-only .btn-icon {
  font-size: 20px;
  line-height: 1;
}

/* 즐겨찾기 on: 그라데이션 배경 없음, 별 색만 강조 */
.pan-toolbar #btn-favorite.btn-sm.icon-only.is-favorited {
  background: transparent !important;
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
}

.pan-toolbar #btn-favorite.btn-sm.icon-only.is-favorited .btn-icon {
  color: inherit;
}

.pan-toolbar #btn-join:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 판 글 목록: 최신순 / 좋아요순 (아이콘 토글) */
.pan-sort-group {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.pan-sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.1s ease;
}

.pan-sort-btn .pan-sort-icon {
  display: block;
  flex-shrink: 0;
}

.pan-sort-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.95);
}

.pan-sort-btn:active {
  transform: scale(0.96);
}

.pan-sort-btn.is-active {
  background: linear-gradient(135deg, #22c55e 0%, #14b8a6 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.38);
}

.pan-sort-btn:focus-visible {
  outline: 2px solid #5eead4;
  outline-offset: 2px;
}

body.light-mode .pan-sort-btn {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

body.light-mode .pan-sort-btn:hover {
  background: #e2e8f0;
  color: #334155;
}

body.light-mode .pan-sort-btn.is-active {
  color: #fff;
  border-color: transparent;
}

.pan-desc {
  opacity: 0.85;
}

.pan-posts-empty {
  text-align: center;
  opacity: 0.72;
  padding: 24px;
  margin: 0;
  color: inherit;
}
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 16px;
  max-width: 640px;
  margin: 0 auto;
}
.post-cell {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  text-align: left;
  color: inherit;
  width: 100%;
  box-sizing: border-box;
}
.post-cell-main {
  flex: 1;
  min-width: 0;
}
.post-cell-title {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 8px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-cell-author {
  margin: 0 0 8px;
}
.post-cell-stats {
  font-size: 12px;
  opacity: 0.75;
}
.post-cell-thumb-wrap {
  flex-shrink: 0;
  width: 96px;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a5f, #0f172a);
  align-self: flex-start;
}
.post-cell-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.detail-panel {
  position: fixed;
  inset: 0;
  background: var(--bg-primary, #0f172a);
  z-index: 50;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.detail-panel.open {
  display: flex;
}
.detail-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}
/* 게시글 상세: 하단 고정 액션 바 공간 */
#detail-panel[data-board-detail="1"] .detail-scroll {
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 12px));
}
.detail-card-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.detail-card-time {
  font-size: 13px;
  color: rgba(148, 163, 184, 0.95);
  flex-shrink: 0;
}
.detail-card-actions-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}
.detail-card-actions-row .detail-action-item {
  border: none;
  background: transparent;
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 8px 10px;
}
.detail-card-actions-row .detail-action-item:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
}
body.light-mode .detail-card-actions-row {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}
body.light-mode .detail-card-time {
  color: #64748b;
}
.detail-meta-row {
  font-size: 12px;
  opacity: 0.72;
  margin: 0 0 14px;
  line-height: 1.45;
}
.detail-meta-line {
  display: block;
}

.post-author-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.post-author-avatar {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
}

.post-author-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

/* 이모지 아바타: <span> 으로 렌더링되며 컬러 그라데이션 클래스(.sun, .ocean…)와 함께 사용 */
span.post-author-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  overflow: hidden;
}

.post-author-avatar--emoji {
  background: rgba(255, 255, 255, 0.08);
}

.post-author-nickname {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.detail-meta-author {
  display: inline-flex;
  margin-right: 12px;
  margin-bottom: 4px;
}
.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
}
.detail-title-row .detail-title {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.detail-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-top: 2px;
}
.detail-title-actions[hidden] {
  display: none !important;
}
.detail-title-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  cursor: pointer;
  flex: 0 0 auto;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.detail-title-icon-btn:active {
  background: rgba(255, 255, 255, 0.12);
}
.detail-title-icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.detail-title-icon-btn--danger {
  background: rgba(220, 38, 38, 0.22);
  border-color: rgba(248, 113, 113, 0.4);
  color: #fecaca;
}
.detail-title-icon-btn--report {
  background: rgba(249, 115, 22, 0.16);
  border-color: rgba(251, 146, 60, 0.4);
  color: #fed7aa;
}
.detail-title-icon-btn[hidden] {
  display: none !important;
}
.detail-title-icon-svg {
  display: block;
  pointer-events: none;
}

/* ===== 신고 모달 ===== */
.report-overlay {
  position: fixed;
  inset: 0;
  z-index: 8200;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.report-overlay.hidden {
  display: none !important;
}
.report-modal {
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.5);
}
@media (min-width: 600px) {
  .report-overlay {
    align-items: center;
    padding: 20px;
  }
  .report-modal {
    border-radius: 20px;
  }
}
.report-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.report-modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f1f5f9;
}
.report-close-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.report-modal-scroll {
  overflow-y: auto;
  padding: 14px 18px 6px;
}
.report-question {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 6px;
}
.report-desc {
  margin: 0 0 14px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #94a3b8;
}
.report-reason-list {
  display: flex;
  flex-direction: column;
}
.report-reason-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 4px;
  cursor: pointer;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  -webkit-tap-highlight-color: transparent;
}
.report-reason-item:last-child {
  border-bottom: none;
}
.report-reason-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.report-reason-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.6);
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.15s ease;
}
.report-reason-item input[type="radio"]:checked + .report-reason-radio {
  border-color: #10b981;
}
.report-reason-item input[type="radio"]:checked + .report-reason-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #10b981;
}
.report-reason-label {
  font-size: 0.92rem;
  color: #e2e8f0;
}
.report-etc-input {
  width: 100%;
  box-sizing: border-box;
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.04);
  color: #f1f5f9;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
}
.report-etc-input.hidden {
  display: none !important;
}
.report-modal-footer {
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px));
}
.report-submit-btn {
  width: 100%;
  padding: 13px 0;
  border: none;
  border-radius: 12px;
  background: #10b981;
  color: #022c22;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.report-submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

body.light-mode .report-modal {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
}
body.light-mode .report-modal-title,
body.light-mode .report-question {
  color: #0f172a;
}
body.light-mode .report-close-btn {
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
}
body.light-mode .report-desc {
  color: #64748b;
}
body.light-mode .report-reason-label {
  color: #1e293b;
}
body.light-mode .report-reason-item {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}
body.light-mode .report-etc-input {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.16);
  color: #0f172a;
}
body.light-mode .detail-title-icon-btn--report {
  background: rgba(249, 115, 22, 0.1);
  border-color: rgba(234, 88, 12, 0.35);
  color: #c2410c;
}
.detail-article {
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.detail-title {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: inherit;
}
.detail-stats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.detail-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
}
.detail-stat-pill--muted {
  opacity: 0.65;
}
.detail-stat-emoji {
  font-size: 14px;
  line-height: 1;
}
.detail-stat-num {
  font-variant-numeric: tabular-nums;
  min-width: 1ch;
}
.detail-body {
  padding: 0 0 4px;
}
.detail-comments-block {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.detail-comments-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: inherit;
}
.comment-bar-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 60;
  box-sizing: border-box;
}
.comment-bar-fixed .comment-bar-input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.comment-bar-fixed .comment-bar-input::placeholder {
  color: rgba(248, 250, 252, 0.45);
}
.comment-bar-fixed .comment-bar-input:focus {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}
.btn-comment-send {
  flex-shrink: 0;
  padding: 12px 18px;
  border-radius: 22px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #34d399, #2dd4bf);
  color: #042f2e;
  box-shadow: 0 4px 14px rgba(45, 212, 191, 0.35);
  -webkit-tap-highlight-color: transparent;
}
.btn-comment-send:active {
  transform: scale(0.98);
}
.comment-list-mini {
  margin-top: 16px;
}
.comment-item-mini {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
  line-height: 1.5;
}
.comment-item-mini:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}
.comment-item-mini .nick {
  font-weight: 600;
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.comment-item-mini .btn-sm {
  margin-top: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
}

body.light-mode .pans-page,
body.light-mode .detail-panel {
  background: #f8fafc;
  color: #0f172a;
}

/* board.html 판 목록: 히어로 그라데이션·필터 버튼 (다크 전용 스타일 제거) */
body.light-mode .pan-hero-overlay {
  background: linear-gradient(
    to top,
    rgba(248, 250, 252, 0.98) 0%,
    rgba(248, 250, 252, 0.55) 42%,
    transparent 100%
  );
}

body.light-mode .pan-hero-title {
  color: #0f172a;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(255, 255, 255, 0.9);
}

body.light-mode .pan-toolbar {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

body.light-mode .pan-toolbar #btn-join {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.light-mode .pan-toolbar #btn-favorite.btn-sm.icon-only,
body.light-mode .pan-toolbar #btn-write.btn-sm.icon-only {
  background: #f1f5f9 !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  color: #64748b;
  box-shadow: none !important;
}

body.light-mode .pan-toolbar #btn-favorite.btn-sm.icon-only.is-favorited {
  background: transparent !important;
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.45);
}

body.light-mode .pans-page > .btn-sm:not(.primary),
body.light-mode .pan-toolbar .btn-sm:not(.primary) {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

body.light-mode .pans-page > .btn-sm.primary,
body.light-mode .pan-toolbar .btn-sm.primary {
  box-shadow: 0 2px 14px rgba(34, 197, 94, 0.28);
}

body.light-mode .pan-desc,
body.light-mode #pan-desc {
  color: #475569;
  opacity: 1 !important;
}

body.light-mode .pans-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

body.light-mode .pans-header .btn-icon-plain {
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  border: 1px solid rgba(15, 23, 42, 0.1);
}

body.light-mode .post-cell-stats {
  color: #64748b;
}

body.light-mode .pan-posts-empty {
  opacity: 1;
  color: #64748b;
}

body.light-mode .modal-overlay {
  background: rgba(15, 23, 42, 0.45);
}

body.light-mode .detail-panel .pans-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

body.light-mode .detail-stat-pill {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

body.light-mode .detail-comments-block {
  border-top-color: rgba(15, 23, 42, 0.08);
}

body.light-mode .comment-bar-fixed {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-top-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 -6px 28px rgba(15, 23, 42, 0.07);
}

body.light-mode .comment-bar-fixed .comment-bar-input {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

body.light-mode .comment-bar-fixed .comment-bar-input::placeholder {
  color: #94a3b8;
}

body.light-mode .btn-detail-like {
  border-color: rgba(244, 63, 94, 0.28);
  background: #fff5f5;
  color: #9f1239;
}

body.light-mode .comment-item-mini {
  border-bottom-color: rgba(15, 23, 42, 0.07);
}
body.light-mode .pan-card,
body.light-mode .post-cell {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-mode .post-cell-thumb-wrap {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}
body.light-mode .modal-sheet {
  background: #fff;
  color: #0f172a;
}
body.light-mode .form-row input,
body.light-mode .form-row textarea,
body.light-mode .form-row select {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

body.light-mode .bm-page.pans-page {
  background-color: #f2f2f7;
  background-image: none;
  color: #1e293b;
}

body.light-mode .bm-header {
  background: rgba(242, 242, 247, 0.92);
  border-bottom-color: rgba(60, 60, 67, 0.12);
}

body.light-mode .bm-title {
  color: #1e293b;
}

body.light-mode .bm-btn-icon {
  color: #64748b;
}

body.light-mode .bm-btn-icon:active {
  background: rgba(0, 0, 0, 0.06);
  color: #1e293b;
}

body.light-mode .bm-btn-add {
  color: #2563eb;
}

body.light-mode .bm-intro-text {
  color: #64748b;
}

body.light-mode .bm-page .pan-card-qr {
  background: #fff;
  border-color: #cbd5e1;
  color: #334155;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}
body.light-mode .bm-page .pan-card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

body.light-mode .bm-page .pan-card-meta {
  color: #64748b;
}

body.light-mode .bm-page .btn-sm.primary {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
}

body.light-mode .bm-page .pan-card-actions .btn-sm:not(.primary):not(.danger) {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

body.light-mode .bm-page .pan-card-actions .btn-sm:not(.primary):not(.danger):active {
  background: #f1f5f9;
}

body.light-mode .bm-page .pan-card-icon-btn {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
body.light-mode .bm-page .pan-card-icon-btn:active {
  background: #f1f5f9;
  filter: none;
}
body.light-mode .bm-page .pan-card-icon-btn--danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.12);
}
body.light-mode .bm-page .pan-card-title-btn {
  color: #0f172a;
}

body.light-mode .bm-page .pan-card-icon-btn:disabled,
body.light-mode .bm-page .pan-card-icon-btn.pan-card-icon-btn--disabled {
  opacity: 0.4;
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
  filter: grayscale(0.5);
}

body.light-mode .bm-page .pan-chip {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e3a8a;
  border: 1px solid #3b82f6;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.18);
}

body.light-mode .bm-page .btn-sm.danger {
  background: #dc2626;
  color: #fff;
  border: 1px solid #991b1b;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.45);
}

body.light-mode .bm-empty,
body.light-mode .bm-error {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .bm-empty-title {
  color: #1e293b;
}

body.light-mode .bm-empty-sub {
  color: #64748b;
}

body.light-mode .bm-modal-sheet {
  background: #fff;
  color: #1e293b;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .bm-modal-handle {
  background: rgba(0, 0, 0, 0.15);
}

body.light-mode .bm-modal-desc,
body.light-mode .bm-hint--inline {
  color: #475569;
}

body.light-mode .bm-image-preview-wrap {
  border-color: rgba(100, 116, 139, 0.45);
  background: rgba(248, 250, 252, 0.9);
}

body.light-mode .bm-image-preview-wrap.has-image {
  border-color: rgba(148, 163, 184, 0.45);
  background: #fff;
}

body.light-mode .bm-image-preview-img.bm-image-preview-img--twemoji {
  background: rgba(241, 245, 249, 0.95);
}

body.light-mode .bm-image-preview-empty {
  color: #94a3b8;
}

body.light-mode .bm-preset-root {
  border-color: rgba(15, 23, 42, 0.1);
  background: #f8fafc;
}

body.light-mode .bm-preset-cat-label {
  color: #64748b;
}

body.light-mode .bm-preset-tile {
  background: #fff;
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

body.light-mode .bm-preset-tile:hover {
  background: #eff6ff;
  border-color: rgba(59, 130, 246, 0.45);
}

body.light-mode .bm-preset-tile.is-selected {
  border-color: #3b82f6;
  background: #dbeafe;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

body.light-mode .bm-hint,
body.light-mode .bm-file-name {
  color: #64748b;
}

body.light-mode .join-url-text {
  color: #475569;
  opacity: 1;
}

body.light-mode .bm-qr-action-btn {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.1);
  color: #334155;
}

body.light-mode .bm-qr-action-btn.is-copied {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

body.light-mode .bm-label,
body.light-mode .bm-check-label {
  color: #334155;
}

body.light-mode .bm-input {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

body.light-mode .bm-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

body.light-mode .bm-file-btn {
  background: #e2e8f0;
  color: #334155;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .bm-check-row {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .bm-btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .bm-member-row {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
  color: #334155;
}

body.light-mode .bm-member-row--owner {
  color: #64748b;
}

body.light-mode .bm-member-name {
  color: #0f172a;
}

body.light-mode .bm-member-meta {
  color: #64748b;
}

body.light-mode .bm-member-meta--solo {
  color: #475569;
}

/* --- 게시글 상세 헤더 (수정 + 좋아요) --- */
.detail-panel-header.pans-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 8px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.detail-panel-heading {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  min-width: 0;
}

.detail-panel-header .detail-panel-heading {
  flex: unset;
}

.detail-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  justify-self: end;
}

.btn-detail-like {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(244, 63, 94, 0.35);
  background: rgba(244, 63, 94, 0.1);
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

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

.btn-detail-like-icon {
  color: #fb7185;
  font-size: 15px;
  line-height: 1;
}

.btn-detail-like-text {
  line-height: 1;
}

.btn-detail-like.is-liked {
  background: rgba(244, 63, 94, 0.22);
  border-color: rgba(251, 113, 133, 0.65);
}

.btn-detail-like.is-liked .btn-detail-like-icon {
  color: #fda4af;
}

body.light-mode .btn-detail-like.is-liked {
  background: #ffe4e6;
  border-color: #fb7185;
}

body.light-mode .btn-detail-like.is-liked .btn-detail-like-icon {
  color: #e11d48;
}

/* --- 렌더된 HTML 본문 (Quill 출력) --- */
.post-body-html {
  line-height: 1.6;
  font-size: 15px;
  word-break: break-word;
}

.post-body-html p {
  margin: 0 0 12px;
}

.post-body-html img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.detail-body.post-body-html img {
  margin: 14px 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.detail-cover-wrap {
  margin: 0 0 14px;
}

.detail-cover-img {
  width: 100%;
  max-height: 42vh;
  object-fit: cover;
  display: block;
  border-radius: 14px;
}

.detail-body.post-body-html > p:first-child {
  margin-top: 0;
}

.post-body-html a {
  color: #38bdf8;
  text-decoration: underline;
}

.post-body-html .ql-video,
.post-body-html figure,
.post-body-html iframe {
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 200px;
  border: 0;
  border-radius: 8px;
  margin: 12px 0;
}

.post-body-html h1,
.post-body-html h2,
.post-body-html h3 {
  margin: 16px 0 8px;
  line-height: 1.3;
}

.post-body-html ul,
.post-body-html ol {
  margin: 0 0 12px;
  padding-left: 1.4em;
}

body.light-mode .post-body-html a {
  color: #2563eb;
}

/* Quill 배경색: 라이트 모드에서 노란 배경 + 흰 글자 대비 */
body.light-mode .post-body-html .ql-bg-yellow,
body.light-mode #detail-body .ql-bg-yellow {
  background-color: #fde047 !important;
  color: #0f172a !important;
}

/* --- 글 작성 패널 (CKEditor 5) --- */
.compose-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  flex-direction: column;
  background: var(--bg-primary, #0f172a);
  color: var(--text-primary, #f1f5f9);
}

.compose-panel.open {
  display: flex;
}

.compose-panel-header {
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}

/* 저장 아이콘: 배경 없음(투명), .btn-sm 기본 회색 배경도 제거 */
.compose-panel-header #btn-compose-save {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.compose-panel-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 8px;
}

.compose-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.compose-scroll > label[for="compose-title"],
.compose-scroll .compose-title-row,
.compose-scroll .compose-cover-help,
.compose-scroll > label[for="post-ckeditor"] {
  flex-shrink: 0;
}

.compose-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  opacity: 0.9;
}

.compose-title-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font-size: 16px;
  margin-bottom: 0;
}

.compose-title-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.post-ckeditor-mount {
  flex: 1 0 auto;
  /* 10줄(약 240px) + 툴바(약 48px) + 패딩 여유 → 안정적으로 10줄 표시 */
  min-height: 22rem;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* CKEditor 5 가 화면을 꽉 채우도록 설정 */
.post-ckeditor-mount .ck-editor {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  width: 100% !important;
}
.post-ckeditor-mount .ck-editor__main {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 18rem !important;
}

#btn-compose-back {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.compose-title-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 10px;
}

.compose-title-row .compose-title-input {
  flex: 1;
  min-width: 0;
}

.compose-cover-box {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.compose-cover-box:active {
  transform: scale(0.99);
}

.compose-cover-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  /* pointer-events:none 이면 일부 WebView에서 파일 선택 다이얼로그가 열리지 않음 */
}

/* 글이미지 선택 시트 (이미지 / 이모티콘) */
.compose-cover-sheet {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.compose-cover-sheet.hidden {
  display: none !important;
}

.compose-cover-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.compose-cover-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: min(88vh, 640px);
  background: #1e293b;
  border-radius: 20px 20px 0 0;
  padding: 8px 16px 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  color: #f1f5f9;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compose-cover-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  margin: 4px auto 4px;
}

.compose-cover-sheet-title {
  font-size: 16px;
  font-weight: 700;
  margin: 4px 0 8px;
  text-align: center;
}

.compose-cover-sheet-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compose-cover-sheet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

label.compose-cover-sheet-btn {
  margin: 0;
  box-sizing: border-box;
}

.compose-cover-sheet-btn:active {
  transform: scale(0.99);
}

.compose-cover-sheet-back {
  align-self: flex-start;
  padding: 6px 10px;
  margin-bottom: 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.compose-cover-sheet-step-emoji {
  min-height: 0;
  flex: 1 1 auto;
}

.compose-cover-emoji-section {
  margin-bottom: 16px;
}

.compose-cover-emoji-section:last-child {
  margin-bottom: 6px;
}

.compose-cover-emoji-section-title {
  margin: 0 0 8px;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(226, 232, 240, 0.92);
}

.compose-cover-emoji-subgrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

body.light-mode .compose-cover-emoji-section-title {
  color: #475569;
}

.compose-cover-emoji-grid {
  display: block;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  padding: 4px 2px 8px;
  -webkit-overflow-scrolling: touch;
}

.compose-cover-emoji-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.compose-cover-emoji-cell:active {
  transform: scale(0.96);
  background: rgba(56, 189, 248, 0.2);
}

.compose-cover-sheet-dismiss {
  margin-top: 4px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

body.light-mode .compose-cover-sheet-panel {
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.12);
}

body.light-mode .compose-cover-sheet-handle {
  background: rgba(15, 23, 42, 0.15);
}

body.light-mode .compose-cover-sheet-btn {
  border-color: rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #0f172a;
}

body.light-mode .compose-cover-emoji-cell {
  border-color: rgba(15, 23, 42, 0.12);
  background: #f1f5f9;
}

body.light-mode .compose-cover-sheet-dismiss {
  background: #e2e8f0;
  color: #475569;
}

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

.compose-cover-img.hidden {
  display: none;
}

.compose-cover-placeholder {
  font-size: 11px;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.9);
  line-height: 1.3;
  text-align: center;
}

.compose-cover-info {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  z-index: 10;
  cursor: pointer;
  transition: background 0.15s;
}

.compose-cover-info:hover {
  background: rgba(255, 255, 255, 0.22);
}

.compose-cover-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.compose-cover-remove.hidden {
  display: none;
}

.compose-cover-help {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(148, 163, 184, 0.95);
}

.compose-cover-help b {
  color: rgba(226, 232, 240, 0.95);
  font-weight: 800;
}

.post-ckeditor-mount .ck.ck-editor {
  flex: 1 1 auto;
  /* 툴바 포함 전체 편집기 영역 — 10줄 본문 + 툴바 보장 */
  min-height: 22rem;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 12px;
  overflow: hidden;
  height: auto !important;
  max-height: min(80vh, max(28rem, calc(100dvh - 130px)), calc(100vh - 130px));
}

.post-ckeditor-mount .ck.ck-editor__main {
  flex: 1 1 auto;
  min-height: 18rem;
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  overflow: hidden;
}

.post-ckeditor-mount .ck.ck-toolbar {
  flex-shrink: 0;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 41, 59, 0.95);
}

.post-ckeditor-mount .ck.ck-toolbar .ck-toolbar__separator {
  background: rgba(255, 255, 255, 0.12);
}

.post-ckeditor-mount .ck.ck-button:not(.ck-disabled):hover,
.post-ckeditor-mount .ck.ck-button.ck-on {
  background: rgba(56, 189, 248, 0.15);
}

.post-ckeditor-mount .ck.ck-icon {
  color: #cbd5e1;
}

.post-ckeditor-mount .ck.ck-button.ck-on .ck.ck-icon {
  color: #38bdf8;
}

.post-ckeditor-mount .ck.ck-dropdown__panel {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.12);
}

.post-ckeditor-mount .ck.ck-editor__main > .ck-editor__editable {
  flex: 1 1 auto !important;
  /* 10줄 보장: 16px 글자 × line-height 1.5 × 10 = 240px(15rem) + 패딩(≈3rem) ≒ 18rem */
  min-height: 18rem !important;
  max-height: min(72vh, max(26rem, calc(100dvh - 170px)), calc(100vh - 170px)) !important;
  height: auto !important;
  overflow-y: auto !important;
  border: none;
  font-size: 16px;
  line-height: 1.5;
  background: rgba(15, 23, 42, 0.5);
  color: #f1f5f9;
}

/* WebView/CKEditor 렌더링 편차 대응: inline editable에도 직접 높이 고정 */
#compose-panel #post-ckeditor .ck-editor__editable_inline {
  min-height: 18rem !important;
}

.post-ckeditor-mount .ck.ck-editor__editable.ck-focused {
  box-shadow: none;
  border-color: transparent;
}

.post-ckeditor-mount .ck.ck-placeholder::before {
  color: #64748b;
}

body.light-mode .compose-panel {
  background: #f8fafc;
  color: #0f172a;
}

body.light-mode .compose-title-input {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

body.light-mode .compose-cover-box {
  border-color: rgba(15, 23, 42, 0.22);
  background: rgba(15, 23, 42, 0.04);
}

body.light-mode .compose-cover-placeholder {
  color: rgba(30, 41, 59, 0.88);
}

body.light-mode .compose-cover-remove {
  border-color: rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.82);
  color: #0f172a;
}

body.light-mode .compose-cover-help {
  color: #64748b;
}

body.light-mode .compose-cover-help b {
  color: #0f172a;
}

body.light-mode .post-ckeditor-mount {
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .post-ckeditor-mount .ck.ck-toolbar {
  background: #f1f5f9;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .post-ckeditor-mount .ck.ck-toolbar .ck-toolbar__separator {
  background: rgba(0, 0, 0, 0.1);
}

body.light-mode .post-ckeditor-mount .ck.ck-icon {
  color: #475569;
}

body.light-mode .post-ckeditor-mount .ck.ck-button.ck-on .ck.ck-icon {
  color: #2563eb;
}

body.light-mode .post-ckeditor-mount .ck.ck-dropdown__panel {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .post-ckeditor-mount .ck.ck-editor__main > .ck-editor__editable {
  background: #fff;
  color: #0f172a;
}

/* 본문 영역: 뷰포트 기준으로도 최소 높이 확보(플렉스 외 보조) */
/* Removed manual min-height calculation to rely on pure flex */

body.light-mode .post-ckeditor-mount .ck.ck-placeholder::before {
  color: #94a3b8;
}

/* --- 판 입장 (join_board) --- */
.join-board-lead {
  margin: 0 16px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #94a3b8;
}

.join-board-card {
  margin: 0 16px 20px;
  padding: 18px 16px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 41, 59, 0.45);
  box-sizing: border-box;
}

.join-board-card-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.join-board-card-hint {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 16px;
  line-height: 1.5;
}

.join-board-card-hint strong {
  color: #e2e8f0;
  font-weight: 600;
}

.join-board-omni {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.join-board-omni-input {
  width: 100%;
  box-sizing: border-box;
  font-size: 16px;
  padding: 14px 14px;
  border-radius: 12px;
}

.join-board-toolbar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.join-board-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.6);
  color: #e2e8f0;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.join-board-icon-btn svg {
  pointer-events: none;
  display: block;
}

.join-board-icon-btn:hover {
  background: rgba(51, 65, 85, 0.75);
  border-color: rgba(255, 255, 255, 0.18);
}

.join-board-icon-btn:active {
  transform: scale(0.97);
}

label.join-board-icon-btn {
  margin: 0;
}

.btn-join-primary {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #34d399, #2dd4bf);
  color: #042f2e;
  box-shadow: 0 4px 16px rgba(45, 212, 191, 0.35);
}

.btn-join-primary:active {
  transform: scale(0.99);
}

.join-board-details {
  margin: 0 16px 24px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.35);
  overflow: hidden;
}

.join-board-details-summary {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  list-style: none;
}

.join-board-details-summary::-webkit-details-marker {
  display: none;
}

.join-board-details-summary::after {
  content: "▾";
  float: right;
  opacity: 0.6;
  font-size: 12px;
}

.join-board-details[open] .join-board-details-summary::after {
  content: "▴";
}

.join-board-details-body {
  padding: 0 16px 16px;
}

.join-board-hint--tight {
  margin-top: 0;
  margin-bottom: 10px;
}

.join-board-page .join-board-section {
  margin: 0 16px 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.join-board-h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #f1f5f9;
}

.join-board-hint {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 12px;
  line-height: 1.45;
}

.join-board-mono {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  word-break: break-all;
}

.join-board-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.join-board-input {
  flex: 1;
  min-width: 0;
}

.join-board-input-block {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.join-search-input-wrap {
  position: relative;
}

.join-search-input {
  padding-right: 86px;
}

/* type="search" 의 브라우저 기본 X 지우기 아이콘 숨김.
   우측에 별도의 커스텀 지우기/검색 버튼이 있어 중복으로 보이는 문제 방지. */
.join-search-input::-webkit-search-cancel-button,
.join-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.join-search-input::-ms-clear,
.join-search-input::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}

.join-search-icon-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.join-search-clear-btn {
  right: 44px;
}

.join-search-submit-btn {
  right: 8px;
}

body.light-mode .join-search-icon-btn {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
  color: #0f172a;
}

.join-board-row .btn-sm {
  flex-shrink: 0;
  align-self: center;
}

.join-board-err {
  font-size: 13px;
  color: #fecaca;
  margin: 10px 0 0;
}

.join-board-file-input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.join-board-file-label {
  display: inline-block;
  margin-top: 4px;
  cursor: pointer;
  text-align: center;
  padding: 10px 18px;
  border-radius: 12px;
}

.join-search-results {
  margin-top: 12px;
  max-height: min(50vh, 320px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.join-search-empty {
  font-size: 14px;
  color: #94a3b8;
  margin: 8px 0;
}

.join-search-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  margin-bottom: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 41, 59, 0.55);
  color: #e2e8f0;
  font: inherit;
  cursor: pointer;
  box-sizing: border-box;
}

.join-search-item:active {
  transform: scale(0.99);
}

.join-search-item-title {
  font-size: 15px;
  font-weight: 600;
}

.join-search-item-meta {
  font-size: 12px;
  opacity: 0.75;
}

#pan-error a {
  color: #93c5fd;
  text-decoration: underline;
}

body.light-mode .join-board-lead {
  color: #64748b;
}

body.light-mode .join-board-card {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

body.light-mode .join-board-card-title {
  color: #0f172a;
}

body.light-mode .join-board-card-hint {
  color: #64748b;
}

body.light-mode .join-board-card-hint strong {
  color: #0f172a;
}

body.light-mode .join-board-icon-btn {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.12);
  color: #334155;
}

body.light-mode .join-board-icon-btn:hover {
  background: #e2e8f0;
}

body.light-mode .join-board-details {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-mode .join-board-details-summary {
  color: #334155;
}

body.light-mode .join-board-page .join-board-section {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .join-board-h2 {
  color: #0f172a;
}

body.light-mode .join-board-hint {
  color: #64748b;
}

body.light-mode .join-search-item {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
  color: #1e293b;
}

body.light-mode .join-search-empty {
  color: #64748b;
}

body.light-mode #pan-error a {
  color: #2563eb;
}

/* ========== 판 게시글 상세(board.html): 뉴스형 흰 배경 + 하단 고정 푸터 ========== */
#detail-panel[data-board-detail="1"] {
  background: #0f172a;
  color: #f1f5f9;
}

#detail-panel[data-board-detail="1"] .detail-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#detail-panel[data-board-detail="1"] .detail-scroll {
  background: transparent;
}

#detail-panel[data-board-detail="1"] .board-detail-footer-bar {
  padding-bottom: env(safe-area-inset-bottom, 0px);
  min-height: calc(54px + env(safe-area-inset-bottom, 0px));
  height: auto;
  box-sizing: border-box;
  align-items: center;
}

#detail-panel[data-board-detail="1"] .detail-footer .detail-action-item {
  border: none;
  background: transparent;
  font: inherit;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  color: inherit;
}

#detail-panel[data-board-detail="1"] .detail-footer .detail-action-item:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
  border-radius: 10px;
}

#detail-panel[data-board-detail="1"] .board-detail-footer-time {
  font-size: 13px;
  color: #94a3b8;
}

/* 라이트 모드: 화면 전체 흰 바탕 (로컬 스토리지 테마와 일치) */
body.light-mode #detail-panel[data-board-detail="1"] {
  background: #ffffff !important;
  color: #0f172a !important;
}

body.light-mode #detail-panel[data-board-detail="1"] .detail-header {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  backdrop-filter: none;
}

body.light-mode #detail-panel[data-board-detail="1"] .back-btn {
  background: transparent;
  border: none;
  color: #0f172a;
}

body.light-mode #detail-panel[data-board-detail="1"] .detail-scroll {
  background: #ffffff;
}

body.light-mode #detail-panel[data-board-detail="1"] .detail-title {
  color: #0f172a;
}

body.light-mode #detail-panel[data-board-detail="1"] .detail-meta-row {
  color: #64748b;
}

body.light-mode #detail-panel[data-board-detail="1"] .post-body-html {
  color: #1e293b;
}

body.light-mode #detail-panel[data-board-detail="1"] .detail-footer {
  background: #ffffff !important;
  border-top: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: none;
}

body.light-mode #detail-panel[data-board-detail="1"] .board-detail-footer-time {
  color: #64748b;
}

body.light-mode #detail-panel[data-board-detail="1"] .detail-action-item {
  color: #64748b;
}

body.light-mode #detail-panel[data-board-detail="1"] .detail-action-item:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

body.light-mode #detail-panel[data-board-detail="1"] .detail-action-item.liked {
  color: #2563eb;
}

body.light-mode #detail-panel[data-board-detail="1"] .detail-title-icon-btn {
  border-color: rgba(15, 23, 42, 0.18);
  color: #0f172a;
  background: #f8fafc;
}

body.light-mode
  #detail-panel[data-board-detail="1"]
  .detail-title-icon-btn--danger {
  background: #fee2e2;
  border-color: rgba(220, 38, 38, 0.35);
  color: #b91c1c;
}

/* style.css의 .detail-body 큰 패딩 덮어쓰기 */
#detail-panel[data-board-detail="1"] .post-body-html.detail-body {
  padding: 4px 0 20px;
}

.qr-canvas-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.qr-box canvas, .qr-box img {
  display: block;
  max-width: 100%;
  height: auto;
}

.qr-action-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.bm-qr-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bm-qr-action-btn:active {
  transform: scale(0.95);
}

.bm-qr-action-btn--share {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

.bm-qr-action-btn--download {
  background: #10b981;
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.join-url-row {
  margin-bottom: 20px;
}

.join-url-box {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 6px 6px 6px 14px;
  min-height: 44px;
}

.join-url-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  padding-right: 8px;
}

.join-url-copy-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.join-url-copy-btn:active {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(0.92);
}

body.light-mode .qr-canvas-container {
  background: #f1f5f9;
}

body.light-mode .bm-qr-action-btn--share {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

body.light-mode .join-url-box {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

body.light-mode .join-url-text {
  color: #475569;
}

body.light-mode .join-url-copy-btn {
  background: #cbd5e1;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

body.light-mode .join-url-copy-btn:active {
  background: #94a3b8;
}

/* --- QR 인식 중 로딩 오버레이 --- */
.qr-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
}

.qr-loading-overlay[hidden] {
  display: none !important;
}

.qr-loading-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: #34d399;
  border-radius: 50%;
  animation: qr-loading-spin 0.8s linear infinite;
}

.qr-loading-text {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes qr-loading-spin {
  to { transform: rotate(360deg); }
}

body.light-mode .qr-loading-overlay {
  background: rgba(255, 255, 255, 0.7);
  color: #0f172a;
}
body.light-mode .qr-loading-spinner {
  border-color: rgba(0, 0, 0, 0.08);
  border-top-color: #059669;
}

/* --- QR 실시간 스캔 오버레이 (LOTTO 스타일) --- */
.qr-scanner-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 2000;
  display: flex;
  flex-direction: column;
}

.qr-scanner-overlay[hidden] {
  display: none !important;
}

.qr-scanner-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
  z-index: 2002;
}

.qr-scanner-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.qr-scanner-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}

#qr-reader-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

#qr-reader {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
}

#qr-reader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.qr-scanner-focus {
  position: absolute;
  width: 250px;
  height: 250px;
  border: 4px solid #34d399;
  border-radius: 24px;
  box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.5);
  z-index: 2001;
  pointer-events: none;
}

.qr-scanner-focus::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 4px solid #34d399;
  border-radius: 22px;
  animation: qr-scanner-pulse 1.5s ease-out infinite;
}

@keyframes qr-scanner-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.15); opacity: 0; }
}

.qr-scanner-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 20px 60px;
  text-align: center;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  z-index: 2002;
}

.qr-scanner-hint {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

body.light-mode .qr-scanner-overlay {
  background: #000;
}
