/* V3 runtime bridge for the exact V2 board viewer presentation. */
body.board-page.student-board-page {
  min-height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.board-page .student-board-shell {
  display: block;
}

body.board-page .student-board-layout {
  display: block;
  min-height: 0;
}

body.board-page[data-board-has-selection="true"] #studentBoardHub,
body.board-page[data-board-has-selection="true"] .student-board-list-card {
  display: none !important;
}

body.board-page:not([data-board-has-selection="true"]) #studentBoardDetail,
body.board-page:not([data-board-has-selection="true"]) .board-redesign-board-header {
  display: none !important;
}

body.board-page .student-board-detail {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

body.board-page .board-inline-status-bar:empty,
body.board-page .board-policy-meta:empty {
  display: none;
}

body.board-page .student-board-view-switch button[disabled] {
  cursor: default;
  opacity: 1;
}

body.board-page .student-board-view-switch button.is-active {
  color: #fff;
  background: var(--primary);
}

body.board-page #postContainer[data-view="detail"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.board-page #postContainer[data-view="shelf"] {
  display: block;
}

body.board-page .post-card .student-board-post-copy {
  white-space: pre-wrap;
}

body.board-page .student-board-author-identity,
body.board-page .student-board-author-copy {
  display: flex;
  align-items: center;
}

body.board-page .student-board-author-identity {
  min-width: 0;
  gap: 10px;
}

body.board-page .author-avatar {
  align-items: center;
  background: #e7efff;
  border: 1px solid #c7d8ff;
  border-radius: 50%;
  color: #315fd6;
  display: inline-flex;
  flex: 0 0 34px;
  font-size: 0.82rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  overflow: hidden;
  width: 34px;
}

body.board-page .author-avatar-image {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

body.board-page .student-board-author-copy {
  align-items: flex-start;
  flex-direction: column;
}

body.board-page .author-info {
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.board-page button.post-image-wrap {
  appearance: none;
  border: 1px solid var(--border);
  color: inherit;
}

body.board-page .post-card .board-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

body.board-page .post-card .board-row-actions button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-main);
  font-weight: 700;
  cursor: pointer;
}

body.board-page #writeModal[hidden] {
  display: none !important;
}

body.board-page #writeModal:not([hidden]) {
  display: flex;
}

body.board-page #postContentEditor:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
}

body.board-page #imagePreview {
  display: none;
}

body.board-page #imagePreview.active {
  display: block;
}

body.board-page #imageDropzone.dragover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

body.board-page #studentBoardPostCurrentFiles[hidden] {
  display: none !important;
}

body.board-page #studentBoardCommentPanel:not([hidden]) {
  transform: translateX(0);
  visibility: visible;
  position: fixed;
  z-index: 1960 !important;
  pointer-events: auto;
}

body.board-page #studentBoardCommentBackdrop:not([hidden]) {
  display: block;
  position: fixed;
  z-index: 1950 !important;
}

body.board-page #studentBoardCommentForm[hidden] {
  display: none !important;
}

body.board-page #studentBoardCommentForm:not([hidden]) {
  display: flex;
}

body.board-page .board-comment-compose-body label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-weight: 700;
}

body.board-page .board-comment-compose-body textarea,
body.board-page .board-comment-compose-body select {
  width: 100%;
}

body.board-page .student-board-comment-compose-open {
  margin: 0 22px 22px;
}

body.board-page .spotlight-overlay[hidden] {
  display: none !important;
}

body.board-page .spotlight-overlay:not([hidden]) {
  display: flex;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
}

body.board-page .student-board-spotlight-body[data-empty]::before {
  content: "첨부 이미지가 없는 글입니다.";
  color: rgba(255, 255, 255, 0.72);
}

body.board-page .student-board-spotlight-body img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.board-page .student-board-spotlight-avatar {
  flex-basis: 40px;
  width: 40px;
  height: 40px;
}

body.board-page .student-board-spotlight[data-spotlight-layout="text"] .spotlight-content {
  width: min(960px, calc(100vw - 120px));
  height: min(78dvh, 700px);
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

body.board-page .student-board-spotlight[data-spotlight-layout="text"] .spotlight-media-shell {
  display: contents;
}

body.board-page .student-board-spotlight[data-spotlight-layout="text"] .student-board-spotlight-body {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  overflow: visible;
  pointer-events: none;
}

body.board-page .student-board-spotlight[data-spotlight-layout="text"] .student-board-spotlight-body::before {
  content: none;
}

body.board-page .student-board-spotlight[data-spotlight-layout="text"] .spotlight-nav {
  pointer-events: auto;
}

body.board-page .student-board-spotlight[data-spotlight-layout="text"] .spotlight-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  padding: clamp(28px, 4dvh, 40px) clamp(34px, 5vw, 64px);
  border-left: 0;
}

body.board-page .student-board-spotlight[data-spotlight-layout="text"] .spotlight-info > .author-info {
  flex: 0 0 auto;
  justify-content: flex-start;
}

body.board-page .student-board-spotlight[data-spotlight-layout="text"] #studentBoardSpotlightTitle {
  margin: 0 0 5px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.25;
}

body.board-page .student-board-spotlight[data-spotlight-layout="text"] #studentBoardSpotlightMeta {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

body.board-page .student-board-spotlight[data-spotlight-layout="text"] .spotlight-text-scroll {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  margin-top: 18px;
  overflow-y: auto;
  padding: clamp(22px, 4vw, 38px);
  border-color: #d9e2ee;
  background: #f8fafc;
}

body.board-page .student-board-spotlight[data-spotlight-layout="text"] .spotlight-reactions,
body.board-page .student-board-spotlight[data-spotlight-layout="text"] .spotlight-return-btn {
  flex: 0 0 auto;
}

body.board-page .student-board-spotlight[data-spotlight-layout="text"] .spotlight-text-content {
  color: #172033;
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 600;
  line-height: 1.8;
}

@media (max-width: 760px) {
  body.board-page .student-board-spotlight[data-spotlight-layout="text"] .spotlight-content {
    width: 100%;
    height: min(88dvh, 700px);
  }

  body.board-page .student-board-spotlight[data-spotlight-layout="text"] .spotlight-info {
    padding: 64px 20px 22px;
  }

  body.board-page .student-board-spotlight[data-spotlight-layout="text"] .spotlight-text-scroll {
    margin-top: 18px;
    padding: 20px;
  }
}

body.board-page .board-admin-kpi-grid > span.board-admin-kpi {
  cursor: default;
}

body.board-page dialog.board-teacher-login-overlay[open] {
  display: block;
  width: min(462px, calc(100vw - 32px));
  max-width: none;
  height: auto;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid rgb(148 163 184 / 26%);
  border-radius: 14px;
  background: #101827;
  color: #f8fafc;
  box-shadow: 0 24px 70px rgb(15 23 42 / 45%);
}

body.board-page dialog.board-teacher-login-overlay::backdrop {
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

body.board-page .student-teacher-login-form {
  display: grid;
  gap: 10px;
  text-align: left;
}

body.board-page .student-teacher-login-form input {
  width: 100%;
}

body.board-page[data-board-role="admin"] #studentBoardAdminMode {
  display: none;
}

@media (max-width: 900px) {
  body.board-page #postContainer[data-view="detail"] {
    grid-template-columns: minmax(0, 1fr);
  }
}
