.member-page,
.member-page * {
  box-sizing: border-box;
}

.member-page {
  margin: 0;
  color: #17191c;
  background: #fff;
}

.member-main {
  min-height: 620px;
  padding: 56px 24px 90px;
  background: #f5f7f9;
}

.member-panel {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 34px 40px 40px;
  border-top: 3px solid #274d98;
  background: #fff;
}

.member-panel.compact {
  max-width: 520px;
}

.member-head {
  margin-bottom: 28px;
}

.member-head h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: 0;
}

.member-head p {
  margin: 0;
  color: #606a75;
  font-size: 14px;
  line-height: 1.7;
}

.member-form {
  display: grid;
  gap: 18px;
}

.member-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #aeb9c4;
}

.member-type-tabs label {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.member-type-tabs input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.member-type-tabs span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: #55606c;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

.member-type-tabs label + label span {
  border-left: 1px solid #aeb9c4;
}

.member-type-tabs input:checked + span {
  color: #fff;
  background: #183f86;
}

.member-type-tabs input:focus-visible + span {
  outline: 2px solid #4d9bd1;
  outline-offset: -3px;
}

.member-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 16px;
}

.member-field {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 7px;
}

.member-field.full {
  grid-column: 1 / -1;
}

.member-field label,
.member-field > span {
  font-size: 13px;
  font-weight: 700;
}

.member-field input,
.member-field select {
  width: 100%;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #bdc6cf;
  border-radius: 3px;
  background: #fff;
  font-size: 14px;
}

.member-field input:focus,
.member-field select:focus {
  border-color: #4d9bd1;
  outline: 2px solid #9bc8e8;
}

.member-field input[readonly] {
  border-color: #d5dae0;
  color: #5b6570;
  background: #f3f5f7;
  cursor: default;
}

.member-field small {
  display: block;
}

.member-help {
  color: #66717c;
  font-size: 12px;
  line-height: 1.5;
}

.member-email-guide {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border-left: 3px solid #274d98;
  color: #4b5662;
  background: #f4f7fa;
}

.member-email-guide p {
  min-width: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.member-email-guide a {
  flex: 0 0 auto;
  color: #183f86;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
}

.member-id-warning {
  margin: -6px 0 22px;
  padding: 13px 14px;
  border-left: 3px solid #d09224;
  color: #5f450f;
  background: #fff8e8;
  font-size: 13px;
  line-height: 1.65;
}

.member-email-sent {
  margin-bottom: 20px;
}

.member-consents {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.member-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.member-consent > span {
  flex: 1 1 auto;
}

.member-consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
}

.member-consent-view {
  flex: 0 0 auto;
  color: #174ea6;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.member-consent-view::after {
  content: " ↗";
  font-size: 11px;
}

.member-consent-view:hover,
.member-consent-view:focus-visible {
  color: #0b2f70;
}

.member-required-consent {
  margin: 0;
  padding: 11px 12px;
  border-left: 3px solid #274d98;
  color: #3d4853;
  background: #f4f7fa;
  font-size: 13px;
}

.member-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 3px;
  color: #fff;
  background: #183f86;
  font-weight: 800;
  cursor: pointer;
}

.member-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #aeb8c2;
  border-radius: 3px;
  color: #303943;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}

.member-action-link {
  text-decoration: none;
}

.member-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 20px;
  color: #485360;
  font-size: 14px;
}

.member-links a {
  text-decoration: underline;
}

.member-login-recovery {
  margin: -8px 0 18px;
  text-align: right;
  font-size: 13px;
}

.member-login-recovery a {
  color: #183f86;
  font-weight: 700;
  text-decoration: underline;
}

.member-social-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 16px;
  color: #7a8490;
  font-size: 12px;
}

.member-social-divider::before,
.member-social-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: #dce1e6;
}

.member-social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  border: 1px solid #0a66c2;
  border-radius: 3px;
  color: #0a4f94;
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.member-social-buttons {
  display: grid;
  gap: 10px;
}

.member-social-button:hover {
  color: #fff;
  background: #0a66c2;
}

.member-social-button:focus-visible {
  outline: 2px solid #78b5ed;
  outline-offset: 2px;
}

.member-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 2px;
  color: #fff;
  background: #0a66c2;
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.member-social-button:hover .member-social-icon {
  color: #0a66c2;
  background: #fff;
}

.member-social-button.kakao {
  border-color: #fee500;
  color: #191919;
  background: #fee500;
}

.member-social-button.kakao:hover {
  border-color: #f2da00;
  color: #191919;
  background: #f2da00;
}

.member-social-button.kakao .member-social-icon,
.member-social-button.kakao:hover .member-social-icon {
  border-radius: 50%;
  color: #fee500;
  background: #191919;
}

.member-errors {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid #e0aaaa;
  color: #9b1c1c;
  background: #fff3f3;
  font-size: 14px;
  line-height: 1.65;
}

.member-notice {
  padding: 18px;
  border: 1px solid #bad2e4;
  color: #214d6a;
  background: #f0f7fc;
  line-height: 1.7;
}

.member-success {
  margin: 0 0 20px;
  padding: 13px 15px;
  border: 1px solid #9bc9aa;
  color: #176334;
  background: #edf8f0;
  font-size: 14px;
}

.member-profile {
  width: 100%;
  border-top: 2px solid #274d98;
  border-collapse: collapse;
}

.member-profile th,
.member-profile td {
  padding: 14px 16px;
  border-bottom: 1px solid #dfe4e9;
  text-align: left;
  font-size: 14px;
}

.member-profile th {
  width: 150px;
  background: #f7f9fb;
}

.member-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.member-actions form {
  margin: 0;
}

.member-actions .member-primary {
  width: auto;
  min-height: 42px;
  padding: 0 18px;
}

.member-logout-form {
  margin-left: auto !important;
}

.member-confirm-field {
  padding-top: 18px;
  border-top: 1px solid #dfe4e9;
}

.member-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.member-form-actions .member-primary {
  width: auto;
  min-width: 150px;
  padding: 0 22px;
}

.member-form-actions a.member-primary {
  text-decoration: none;
}

.member-inquiry-panel {
  width: min(100%, 960px);
}

.member-section-head,
.member-inquiry-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.member-section-head > div,
.member-inquiry-view-head > div {
  min-width: 0;
}

.member-section-head .member-secondary {
  flex: 0 0 auto;
}

.member-result-count {
  margin: 0 0 10px;
  color: #5c6671;
  font-size: 13px;
}

.member-inquiry-table-wrap {
  overflow-x: auto;
  border-top: 2px solid #274d98;
}

.member-inquiry-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.member-inquiry-table th,
.member-inquiry-table td {
  padding: 14px 13px;
  border-bottom: 1px solid #dfe4e9;
  text-align: center;
  font-size: 13px;
}

.member-inquiry-table th {
  color: #424d58;
  background: #f7f9fb;
  font-weight: 700;
}

.member-inquiry-table th:nth-child(1) { width: 130px; }
.member-inquiry-table th:nth-child(3) { width: 110px; }
.member-inquiry-table th:nth-child(4) { width: 110px; }

.member-inquiry-title {
  text-align: left !important;
}

.member-inquiry-title a {
  display: block;
  color: #172c4f;
  font-weight: 700;
  line-height: 1.55;
  text-decoration: none;
}

.member-inquiry-title a:hover {
  text-decoration: underline;
}

.member-inquiry-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 3px;
  box-sizing: border-box;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.member-inquiry-status.status-new { background: #b42318; }
.member-inquiry-status.status-reviewing { background: #9a5b00; }
.member-inquiry-status.status-replied { background: #18794e; }
.member-inquiry-status.status-closed { background: #66717c; }

.member-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 24px;
}

.member-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid #c8d0d8;
  color: #37414c;
  background: #fff;
  font-size: 13px;
  text-decoration: none;
}

.member-pagination a.active {
  border-color: #183f86;
  color: #fff;
  background: #183f86;
}

.member-empty-state {
  padding: 58px 20px;
  border-top: 2px solid #274d98;
  border-bottom: 1px solid #dfe4e9;
  text-align: center;
}

.member-empty-state strong {
  display: block;
  font-size: 18px;
}

.member-empty-state p {
  margin: 10px 0 22px;
  color: #66717c;
  font-size: 13px;
}

.member-empty-state .member-primary {
  display: inline-flex;
  width: auto;
  min-width: 130px;
  padding: 0 20px;
}

.member-list-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 26px;
}

.member-inquiry-view-head {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 2px solid #274d98;
}

.member-inquiry-view-head p {
  margin: 0 0 5px;
  color: #274d98;
  font-size: 12px;
  font-weight: 800;
}

.member-inquiry-view-head h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: 0;
}

.member-inquiry-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-bottom: 1px solid #dfe4e9;
}

.member-inquiry-meta > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  min-width: 0;
}

.member-inquiry-meta dt,
.member-inquiry-meta dd {
  margin: 0;
  padding: 13px 14px;
  font-size: 13px;
}

.member-inquiry-meta dt {
  color: #4b5662;
  background: #f5f7f9;
  font-weight: 700;
}

.member-inquiry-meta dd {
  overflow-wrap: anywhere;
}

.member-inquiry-message,
.member-inquiry-reply {
  margin-top: 32px;
}

.member-inquiry-message h2,
.member-inquiry-reply h2 {
  margin: 0 0 13px;
  font-size: 19px;
  letter-spacing: 0;
}

.member-inquiry-message > div,
.member-inquiry-answer-body {
  min-height: 130px;
  padding: 20px;
  border: 1px solid #d6dce3;
  color: #28323c;
  background: #fff;
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.member-inquiry-reply.answered .member-inquiry-answer-body {
  border-left: 3px solid #18794e;
  background: #f5faf7;
}

.member-inquiry-reply.waiting {
  padding: 20px;
  border-left: 3px solid #9a5b00;
  background: #fff9ee;
}

.member-inquiry-reply.waiting p {
  margin: 0;
  color: #67501e;
  font-size: 14px;
  line-height: 1.7;
}

.member-inquiry-reply-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.member-inquiry-reply-head time {
  margin-bottom: 13px;
  color: #66717c;
  font-size: 12px;
}

.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 767px) {
  .member-main {
    padding: 28px 16px 60px;
  }

  .member-panel {
    padding: 26px 20px 32px;
  }

  .member-head h1 {
    font-size: 25px;
  }

  .member-form-grid {
    grid-template-columns: 1fr;
  }

  .member-field.full {
    grid-column: auto;
  }

  .member-profile,
  .member-profile tbody,
  .member-profile tr,
  .member-profile th,
  .member-profile td {
    display: block;
    width: 100%;
  }

  .member-profile th {
    padding-bottom: 5px;
    border-bottom: 0;
  }

  .member-profile td {
    padding-top: 5px;
  }

  .member-actions,
  .member-form-actions {
    align-items: stretch;
    justify-content: stretch;
    flex-direction: column;
  }

  .member-actions form,
  .member-actions .member-primary,
  .member-secondary,
  .member-form-actions .member-primary {
    width: 100%;
  }

  .member-logout-form {
    margin-left: 0 !important;
  }

  .member-email-guide {
    align-items: flex-start;
  }

  .member-section-head,
  .member-inquiry-view-head {
    align-items: flex-start;
  }

  .member-inquiry-table-wrap {
    overflow: visible;
  }

  .member-inquiry-table,
  .member-inquiry-table tbody,
  .member-inquiry-table tr,
  .member-inquiry-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .member-inquiry-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .member-inquiry-table tr {
    padding: 13px 0;
    border-bottom: 1px solid #dfe4e9;
  }

  .member-inquiry-table td {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    padding: 5px 0;
    border: 0;
    text-align: left;
  }

  .member-inquiry-table td::before {
    content: attr(data-label);
    color: #66717c;
    font-size: 12px;
    font-weight: 700;
  }

  .member-inquiry-title {
    text-align: left !important;
  }

  .member-inquiry-meta {
    grid-template-columns: 1fr;
  }

  .member-inquiry-reply-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .member-inquiry-reply-head time {
    margin: -7px 0 12px;
  }
}
