﻿.board-page {
  padding: 24px 0 40px;
}

.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.tab {
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #334155;
  text-decoration: none;
  font-size: 14px;
}

.tab.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 14px;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.title {
  font-size: 24px;
  font-weight: 900;
  margin: 0;
}

.write-btn {
  background: #0ea5e9;
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.list {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

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

.inspection-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0;
}

.inspection-view-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.inspection-view-toggle--single {
  width: 38px;
  height: 38px;
  color: #475569;
  cursor: pointer;
}

.inspection-view-toggle__icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.inspection-view-toggle__icon--one {
  display: none;
}

.inspection-view-toggle[data-current-columns="1"] .inspection-view-toggle__icon--one {
  display: block;
}

.inspection-view-toggle[data-current-columns="1"] .inspection-view-toggle__icon--two {
  display: none;
}

.inspection-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.inspection-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.08);
}

.inspection-card__thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #eef2f6;
}

.inspection-card__thumb--empty {
  display: grid;
  place-items: center;
  color: #98a2b3;
  font-size: 13px;
}

.inspection-card__info {
  padding: 12px;
  border-top: 2px solid #d7eaf7;
}

.inspection-card__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  min-height: 40px;
}

.inspection-card__desc {
  margin-top: 7px;
  font-size: 12px;
  color: #64748b;
  min-height: 32px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 150px 180px;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #eef2f7;
  text-decoration: none;
  color: inherit;
}

.row:last-child {
  border-bottom: 0;
}

.row.header {
  background: #f8fafc;
  font-weight: 700;
  color: #475569;
}

.subject {
  font-weight: 700;
}

.private-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #c2410c;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.muted {
  color: #64748b;
  font-size: 13px;
}

.muted-right {
  text-align: right;
}

.board-meta__label {
  display: none;
}

.inspection-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  margin-right: 10px;
  vertical-align: middle;
}

.empty {
  padding: 28px;
  text-align: center;
  color: #64748b;
}

@media (max-width: 860px) {
  .board-page {
    padding: 14px 0 28px;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
  }

  .tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 42px;
    padding: 8px 10px;
    font-size: 13px;
    text-align: center;
    line-height: 1.25;
    word-break: keep-all;
    letter-spacing: -0.01em;
  }

  .head {
    margin: 4px 0 12px;
  }

  .title {
    font-size: 18px;
  }

  .write-btn {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .list {
    border-radius: 16px;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 14px;
  }

  .row.header {
    display: none;
  }

  .row:not(.header) {
    position: relative;
  }

  .subject {
    font-size: 18px;
    line-height: 1.45;
    margin-bottom: 2px;
  }

  .board-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
  }

  .board-meta__label {
    display: inline-block;
    min-width: 40px;
    color: #94a3b8;
    font-weight: 600;
  }

  .board-meta__value {
    min-width: 0;
  }

  .muted-right {
    text-align: left !important;
  }

  .inspection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }

  .inspection-toolbar {
    justify-content: flex-start;
  }

  .inspection-card__info {
    padding: 10px;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
  }

  .inspection-card__title {
    min-height: 0;
    font-size: 14px;
  }

  .inspection-card__desc {
    margin-top: 6px;
    min-height: 0;
  }
}

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

@media (max-width: 520px) {
  .tabs {
    gap: 6px;
  }

  .tab {
    min-height: 40px;
    padding: 8px 6px;
    font-size: 12px;
  }

  .head {
    align-items: center;
  }

  .title {
    font-size: 17px;
  }

  .write-btn {
    padding: 8px 11px;
    font-size: 12px;
  }

  .row {
    padding: 15px 12px;
  }

  .subject {
    font-size: 16px;
  }

  .muted,
  .board-meta {
    font-size: 12px;
  }

  .board-meta__label {
    min-width: 36px;
  }

  .inspection-toolbar {
    margin-top: 0;
  }

  .inspection-view-toggle--single {
    width: 36px;
    height: 36px;
  }

  .inspection-grid[data-mobile-columns="1"] {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .inspection-grid[data-mobile-columns="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inspection-grid[data-mobile-columns="1"] .inspection-card {
    width: fit-content;
    max-width: 100%;
  }

  .inspection-grid[data-mobile-columns="1"] .inspection-card__thumb {
    width: auto;
    max-width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    background: #fff;
  }

  .inspection-grid[data-mobile-columns="1"] .inspection-card__info {
    padding: 12px;
  }

  .inspection-grid[data-mobile-columns="1"] .inspection-card__title {
    font-size: 16px;
  }

  .inspection-grid[data-mobile-columns="1"] .inspection-card__desc {
    font-size: 13px;
    line-height: 1.55;
  }
}
