* { box-sizing: border-box; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: #f7f7fb;
  margin: 0;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 92vw;        /* 화면 폭의 92% 사용 */
  margin-left: auto;
  margin-right: auto;
  padding: 16px;
}

.topbar { background: #0f172a; color: #fff; }
.card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  width: 100%;
  max-width: 100%;
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
.table th, .table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: top;
}

.btn {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
}
.btn.primary { background: #2563eb; border-color: #2563eb; color: #fff; }

.search {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.row { display: flex; gap: 10px; align-items: center; }
input, select, textarea {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  width: 100%;
}
label { font-size: 12px; color: #555; }
.grid { display: grid; gap: 8px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.small { font-size: 12px; color: #666; }
.thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #eee;
  margin-right: 4px;
}

/* 모달 스타일 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;

  width: 92vw;        /* 화면 폭의 92% */
  max-width: 92vw;
  max-height: 90vh;
  overflow: auto;
  border-radius: 12px;
}
.modal.show { display: flex; }
.modal .panel {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 16px;
}

.alert {
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 12px;
  border-radius: 8px;
  margin: 12px 0;
}
footer { color: #666; margin: 20px 0; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
hr { border: none; border-top: 1px solid #eee; margin: 12px 0; }
.badge-green {
  background: #dcfce7;
  color: #166534;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 12px;
}

/* 사용자 정의 요소 */
.main-wrap {
  max-width: 90vw;
  margin: 2vh auto;
}
.textarea-large {
  min-height: 40vh;
  height: 55vh;
  max-height: 70vh;
  resize: vertical;
}
.detail-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px 0;
  cursor: zoom-in;
}

/* 작은 화면(모바일) 대응 */
@media (max-width: 768px) {
  .container,
  .topbar .container,
  footer.container,
  .modal {
    max-width: 100vw;
    width: 100vw;
  }
  .modal { max-height: 100vh; border-radius: 0; }
}
