* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Malgun Gothic", sans-serif;
  background: #f4f5f7;
  color: #222;
}
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}
.flash {
  background: #fff3cd;
  border: 1px solid #ffe69c;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.flash-msg { font-size: 14px; }

h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 24px 0 8px; }
.muted { color: #777; font-size: 14px; }

.login-box {
  max-width: 360px;
  margin: 80px auto;
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  text-align: center;
}
.login-box form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.login-box input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
}
.login-box button {
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: #2f6fed;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}
.login-box button:hover { background: #2559c4; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-secondary, .btn-primary, .btn-link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}
.btn-secondary { background: #eee; color: #333; }

.btn-primary { background: #2f6fed; color: #fff; border: none; }
.btn-link { background: #2f6fed; color: #fff; margin-top: 10px; }
.btn-danger { background: #e0473f; color: #fff; border: none; border-radius: 8px; padding: 6px 10px; cursor: pointer; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}
.card-thumb { width: 100%; height: 160px; object-fit: cover; background: #eee; }
.card-thumb-empty { display: flex; align-items: center; justify-content: center; color: #999; font-size: 14px; }
.card-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.card-title-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-title { font-weight: bold; font-size: 15px; }
.match-badge { font-size: 12px; font-weight: bold; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.match-high { background: #e3f7e9; color: #0a8f4f; }
.match-mid { background: #fff6da; color: #9a7300; }
.match-low { background: #eee; color: #777; }
.card-address { font-size: 13px; color: #555; }
.card-line { font-size: 13px; color: #555; }
.card-rent { font-size: 16px; font-weight: bold; color: #2f6fed; }
.card-meta { font-size: 13px; color: #666; }
.card-status { font-size: 12px; color: #0a8f4f; font-weight: bold; }
.card-theme { font-size: 12px; color: #2f6fed; font-weight: bold; }

.wh-badge { display: inline-block; width: fit-content; font-size: 11px; font-weight: bold; padding: 2px 7px; border-radius: 999px; }
.wh-ok { background: #e3f7e9; color: #0a8f4f; }
.wh-no { background: #eee; color: #888; }
.wh-unknown { background: #eef1f7; color: #555; }

.match-checklist { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #eee; }
.checklist-item { display: flex; gap: 6px; font-size: 12px; align-items: flex-start; }
.checklist-icon { flex: 0 0 auto; font-weight: bold; }
.checklist-match .checklist-icon { color: #0a8f4f; }
.checklist-partial .checklist-icon { color: #c98a00; }
.checklist-mismatch .checklist-icon { color: #999; }
.checklist-text { color: #444; }

.homes-low-notice { font-size: 11px; color: #b23b3b; margin-top: 4px; }

.transit-result { margin-top: 6px; font-size: 12px; color: #444; white-space: pre-wrap; background: #f7f8fa; border-radius: 6px; padding: 8px 10px; }
.transit-checked-at { font-size: 11px; color: #999; margin-top: 4px; }

.transit-info { margin-top: 8px; padding-top: 8px; border-top: 1px solid #eee; }
.transit-info-text { font-size: 12px; color: #444; white-space: pre-wrap; }
.transit-info-notice { font-size: 11px; color: #999; margin-top: 2px; }

.card-photos { margin-top: 6px; }
.card-photos .card-thumb { height: 140px; border-radius: 8px; }
.photo-more { margin-top: 4px; font-size: 12px; color: #2f6fed; cursor: pointer; }
.photo-gallery { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.photo-gallery img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; }

.google-search-row { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.btn-google { background: #fff; color: #2f6fed; border: 1px solid #2f6fed; margin-top: 0; }
.google-search-notice { font-size: 11px; color: #999; }

.search-bar { display: flex; gap: 8px; margin-top: 12px; }
.search-bar input { flex: 1; max-width: 320px; padding: 8px 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.pagination { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.photo-preview { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-preview img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; }

.interest-actions { display: flex; gap: 8px; margin-top: 8px; }
.btn-interest {
  flex: 1;
  padding: 7px 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #555;
  font-size: 13px;
  cursor: pointer;
}
.btn-interest:hover { background: #f5f5f5; }
.btn-interest:disabled { opacity: 0.6; cursor: default; }
.btn-like.active { background: #ffe3e8; border-color: #ff8fa3; color: #d6336c; font-weight: bold; }
.btn-dislike.active { background: #ececec; border-color: #aaa; color: #555; font-weight: bold; }

.accordion-toggle { cursor: pointer; user-select: none; }
.accordion-arrow { display: inline-block; width: 14px; font-size: 14px; }

.panel {
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}
.thema-counts { padding-left: 20px; }

.admin-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #eee; font-size: 14px; }

.form { max-width: 560px; display: flex; flex-direction: column; gap: 14px; background: #fff; padding: 20px; border-radius: 12px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.form input, .form select, .form textarea {
  padding: 8px 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px;
}
.checkbox-line { flex-direction: row !important; align-items: center; gap: 6px !important; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }
.row-2 { display: flex; gap: 12px; }
.row-2 label { flex: 1; }
.form-actions { display: flex; gap: 12px; align-items: center; }
.form-actions button {
  padding: 10px 16px; border: none; border-radius: 8px; background: #2f6fed; color: #fff; cursor: pointer;
}

@media (max-width: 480px) {
  .row-2 { flex-direction: column; }
}

.filter-summary { font-size: 14px; color: #333; }
.admin-notice {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fff8e6;
  border: 1px solid #ffe6a8;
  border-radius: 8px;
}
.admin-notice-title { font-size: 12px; font-weight: bold; color: #9a7300; margin-bottom: 4px; }
.admin-notice-body { font-size: 14px; color: #333; white-space: pre-wrap; }

.comment-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.comment-form textarea { padding: 8px 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; resize: vertical; }
.comment-submitted-notice { color: #0a8f4f; font-weight: bold; font-size: 14px; }

.comment-history { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.comment-history-item { border-top: 1px solid #eee; padding-top: 8px; }
.comment-history-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; margin-bottom: 2px; }
.comment-time { color: #999; }
.comment-history-text { font-size: 14px; color: #333; white-space: pre-wrap; }

.comment-status-badge { font-size: 11px; font-weight: bold; padding: 2px 8px; border-radius: 999px; }
.comment-status-new { background: #ffe3e3; color: #c0392b; }
.comment-status-reviewed { background: #fff6da; color: #9a7300; }
.comment-status-applied { background: #e3f7e9; color: #0a8f4f; }

.badge-new { background: #e0473f; color: #fff; font-size: 11px; font-weight: bold; padding: 2px 7px; border-radius: 999px; margin-left: 4px; }

.badge-completed { background: #6b7280; color: #fff; font-size: 11px; font-weight: bold; padding: 2px 7px; border-radius: 999px; margin-left: 4px; }

.status-filter-bar { display: flex; gap: 8px; margin-top: 14px; }
.status-filter-bar a {
  padding: 6px 12px; border-radius: 999px; background: #eee; color: #333; text-decoration: none; font-size: 13px;
}
.status-filter-bar a.active { background: #2f6fed; color: #fff; }

.comment-admin-item { display: flex; flex-direction: column; gap: 6px; }
.comment-admin-text { font-size: 14px; color: #222; white-space: pre-wrap; }
.comment-admin-form { display: flex; flex-direction: column; gap: 10px; max-width: 480px; }
.comment-admin-form textarea { padding: 8px 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.comment-admin-form select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
