* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #f6f7f9;
  color: #111;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

.container.app-shell-active {
  max-width: 860px;
}

.container.app-shell-active .top-bar {
  width: calc(100% - 144px);
  margin-left: 144px;
}

body.app-device-mode .container.app-shell-active {
  max-width: 600px;
}

body.app-device-mode .container.app-shell-active .top-bar {
  width: auto;
  margin-left: 0;
}

body.app-device-mode .brand-logo {
  width: 228px;
}

body.app-device-mode .service-notice {
  font-size: 7px;
}

.top-utility-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 12px;
  display: none !important;
}

.top-utility-left,
.top-utility-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-utility-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.top-utility-link {
  color: #b91c1c;
}

.top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 20px;
  margin: 0 0 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.top-bar-content {
  display: grid;
  gap: 10px;
}

.app-layout {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.app-main-column {
  min-width: 0;
}

.side-actions-card {
  position: sticky;
  top: 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  padding: 14px 10px;
}

.side-actions-title {
  font-size: 13px;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 10px;
}

.side-actions-list {
  display: grid;
  gap: 8px;
}

.side-action-btn {
  width: 100%;
  border: 1px solid #dbe3ef;
  background: #fff;
  color: #1f2937;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.side-action-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.side-action-danger {
  color: #b42318;
  border-color: #fecaca;
  background: #fff5f5;
}

.side-action-danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.app-quick-actions-card {
  margin-bottom: 16px;
  padding: 14px 16px;
}

.app-quick-actions-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.app-quick-action-btn {
  text-align: center;
  min-height: 44px;
}

body.app-device-mode .app-quick-actions-card {
  padding: 10px 12px;
}

body.app-device-mode .app-quick-actions-list {
  gap: 8px;
}

body.app-device-mode .app-quick-action-btn {
  min-height: 32px;
  padding: 7px 8px;
  font-size: 11px;
  border-radius: 10px;
}

.top-bar-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  cursor: pointer;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.brand-logo {
  width: 250px;
  height: auto;
  display: block;
  object-fit: contain;
}

.service-notice {
  font-size: 14px;
  font-weight: 800;
  color: #1d4ed8;
}

.profile-modal-close {
  font-size: 24px;
  line-height: 1;
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.profile-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
}

.profile-modal-card {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  margin: 80px auto 0;
  padding: 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
}

.profile-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.profile-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #111827;
}

.profile-modal-body {
  display: grid;
  gap: 14px;
}

.profile-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.profile-message {
  min-height: 18px;
  margin-top: 0;
}

.notice-modal-card {
  width: min(620px, calc(100vw - 32px));
}

.notice-modal-body {
  gap: 16px;
}

.notice-admin-panel {
  display: grid;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.notice-admin-actions {
  display: flex;
  justify-content: flex-end;
}

.notice-textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f3f4f6;
  font: inherit;
  resize: vertical;
}

.notice-textarea:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
}

.notice-list {
  display: grid;
  gap: 12px;
}

.notice-empty {
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}

.notice-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 14px 16px;
}

.notice-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.notice-item-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #111827;
}

.notice-item-date {
  flex: 0 0 auto;
  font-size: 12px;
  color: #6b7280;
}

.notice-item-body {
  font-size: 14px;
  line-height: 1.65;
  color: #374151;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  margin: 0 0 12px 0;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.auth-card {
  margin-top: 0;
}

.auth-screen {
  min-height: calc(100vh - 32px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-screen-card {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.auth-screen-brand {
  display: inline-flex;
  margin-bottom: 18px;
}

.auth-screen-copy {
  margin-bottom: 10px;
}

.auth-screen-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.auth-copy {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auth-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.kakao-btn {
  width: 100%;
  background: #fee500;
  color: #191919;
  border: 1px solid #f2d700;
}

.kakao-btn:hover {
  background: #f7db00;
}

.auth-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.auth-state {
  color: #166534;
  font-weight: 700;
}

.auth-message {
  min-height: 20px;
  margin-top: 10px;
  font-size: 13px;
  color: #1d4ed8;
  font-weight: 600;
}

.auth-message.error {
  color: #b91c1c;
}

.app-shell {
  transition: opacity 0.2s ease;
}

.select-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.select-col {
  display: grid;
  gap: 12px;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  width: 100%;
  height: 44px;
  padding: 0 36px 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f3f4f6;
  font-size: 14px;
  color: #111;
  appearance: none;
}

.select-wrap select:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
}

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  line-height: 1;
  color: #6b7280;
  pointer-events: none;
}

.check-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.check-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #111;
}

.check-chip input {
  width: 18px;
  height: 18px;
}

.query-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.query-block .section-title-row {
  margin-bottom: 6px;
}

.jeonse-fields {
  display: none;
}

.multi-family {
  display: none;
}

.multi-family-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.multi-family-title {
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

.multi-family-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 240px;
}

.multi-family-text {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.multi-family-inline input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f3f4f6;
  font-size: 14px;
}

.multi-family-inline input:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
}

.multi-family-list {
  margin-top: 12px;
  max-height: 240px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  font-size: 13px;
  color: #111;
}

.multi-family-item {
  padding: 6px 4px;
  border-bottom: 1px solid #f3f4f6;
}

.multi-family-item:last-child {
  border-bottom: none;
}

.jeonse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.unit-note {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #111;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.detail-link:hover {
  background: #f3f4f6;
}

.jeonse-grid {
  display: grid;
  gap: 12px;
}

.jeonse-item {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #111;
}

.jeonse-item-wide {
  grid-column: 1 / -1;
}

.housing-choice-row {
  gap: 12px;
  flex-wrap: nowrap;
  align-items: center;
}

.housing-choice-chip {
  gap: 5px;
  font-size: 12px;
}

.housing-choice-chip input {
  width: 14px;
  height: 14px;
}

.housing-choice-chip span {
  white-space: nowrap;
}

.detail-choice-row {
  gap: 12px;
  flex-wrap: nowrap;
  align-items: center;
}

.detail-choice-chip {
  gap: 5px;
  font-size: 12px;
}

.detail-choice-chip input {
  width: 14px;
  height: 14px;
}

.detail-choice-chip span {
  white-space: nowrap;
}

.detail-auto-input {
  background: #eef2ff;
  color: #1e3a8a;
  font-weight: 700;
}

.one-home-section {
  margin-top: -4px;
}

.one-home-card {
  padding: 14px 16px;
  border: 1px solid #dbe4ff;
  border-radius: 12px;
  background: #f8fbff;
}

.one-home-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 6px;
}

.one-home-copy {
  font-size: 12px;
  color: #475569;
  margin-bottom: 12px;
}

.one-home-group {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.one-home-select-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.one-home-row {
  gap: 10px;
  align-items: center;
}

.one-home-note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #1d4ed8;
  font-weight: 600;
}

.jeonse-label {
  font-weight: 600;
  color: #374151;
}

.jeonse-item input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f3f4f6;
  font-size: 14px;
}

.jeonse-item input:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
}

.jeonse-item input[type='password'],
.jeonse-item input[type='email'] {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f3f4f6;
  font-size: 14px;
}

.jeonse-item input[type='password']:focus,
.jeonse-item input[type='email']:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
}

.btn {
  width: 100%;
  height: 52px;
  padding: 0 24px;
  border: none;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn:hover:not(:disabled) {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.ghost {
  background: #fff;
  color: #111;
  border: 1px solid #e5e7eb;
  box-shadow: none;
}

.action-card {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
}

.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 3px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.result-card {
  padding: 12px 16px;
}

.result-area {
  min-height: 40px;
  transition: all 0.3s ease;
}

.result-area.success {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
}

.result-area.error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  border-radius: 12px;
  padding: 12px;
}

.result-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 12px;
  gap: 12px;
}

.result-meta strong {
  color: #2563eb;
}

.result-apt {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 16px;
}

.result-apt-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.result-apt-addr {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 12px;
}

.apt-info-section {
  margin-top: 4px;
}

.apt-info-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 10px;
}

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

.apt-info-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid #e5e7eb;
}

.apt-info-row:first-child {
  border-top: 0;
}

.apt-info-label {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
}

.apt-info-value {
  font-size: 12px;
  color: #111827;
  line-height: 1.6;
  word-break: keep-all;
}

@media (max-width: 640px) {
  .apt-info-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.price-section {
  margin-top: 12px;
}

.price-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #ef4444;
  margin-bottom: 8px;
}

.price-section-note {
  margin-bottom: 8px;
  font-size: 12px;
  color: #6b7280;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.price-table th,
.price-table td {
  padding: 8px 6px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.price-table th:first-child,
.price-table td:first-child {
  text-align: left;
}

.price-table th {
  color: #6b7280;
  font-weight: 500;
}

.price-table td {
  font-weight: 600;
}

.loan-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed #e5e7eb;
}

.loan-title {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
}

.loan-subtitle {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 10px;
}

.loan-group {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
}

.loan-group-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.loan-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  font-size: 12px;
  text-align: center;
  margin-bottom: 6px;
}

.loan-row-head {
  font-weight: 600;
  color: #111;
}

.loan-row-muted {
  color: #6b7280;
}

.loan-amount {
  font-weight: 700;
  color: #111;
}

.jeonse-limit {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed #e5e7eb;
}

.jeonse-limit-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.jeonse-limit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.jeonse-limit-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  background: #fff;
}

.jeonse-limit-name {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.jeonse-limit-value {
  font-size: 14px;
  font-weight: 700;
  color: #111;
}

.jeonse-limit-note {
  margin-top: 8px;
  font-size: 11px;
  color: #9ca3af;
}

.info-text {
  text-align: center;
  margin-top: 24px;
  padding: 12px;
  font-size: 12px;
  color: #6b7280;
}

.info-text p {
  margin: 0;
}

/* 스플래시 스크린 */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.splash-content {
  text-align: center;
}

.splash-logo-container {
  width: 350px;
  max-width: 80%;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease;
}

.splash-logo-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 모바일 최적화 */
@media (max-width: 480px) {
  .container {
    padding: 12px;
  }

  .container.app-shell-active {
    max-width: 600px;
  }

  .container.app-shell-active .top-bar {
    width: auto;
    margin-left: 0;
  }

  .brand-logo {
    width: 250px;
  }

  .card {
    padding: 16px;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-screen {
    min-height: calc(100vh - 24px);
  }

  .select-row {
    grid-template-columns: 1fr;
  }

  .action-card {
    grid-template-columns: 1fr;
  }

  .query-row {
    grid-template-columns: 1fr;
  }
}

.amount-inline-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.amount-inline-field .amount-input {
  flex: 0 0 220px;
  min-width: 0;
}

.amount-word-badge {
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 600;
  color: #35507c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .amount-inline-field {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .amount-inline-field .amount-input {
    flex-basis: auto;
    width: 100%;
  }

  .amount-word-badge {
    white-space: normal;
  }
}

.auth-screen {
  min-height: calc(100vh - 32px);
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.login-shell {
  width: 100%;
  min-height: calc(100vh - 32px);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.login-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 74px;
  border-bottom: 1px solid #e5e7eb;
}

.login-header-title {
  font-size: 18px;
  font-weight: 500;
  color: #111827;
  letter-spacing: 0.08em;
}

.login-close-btn {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #111827;
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
}

.login-body {
  padding: 28px 22px 40px;
}

.login-brand-lockup {
  display: flex;
  justify-content: center;
  margin: 10px 0 28px;
}

.login-brand-logo {
  width: 240px;
  height: auto;
  display: block;
}

.login-form-card {
  display: grid;
  gap: 12px;
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 4px;
}

.login-tab {
  height: 46px;
  border: none;
  background: #f9fafb;
  color: #6b7280;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

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

.auth-mode-panel {
  display: grid;
  gap: 12px;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field-label {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
}

.login-field input {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border: 1px solid #d1d5db;
  border-radius: 0;
  background: #fff;
  font-size: 18px;
  color: #111827;
}

.login-field input:focus {
  outline: none;
  border-color: #ef4444;
}

.login-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 15px;
  color: #111827;
}

.login-check input {
  width: 18px;
  height: 18px;
  accent-color: #ef4444;
}

.auth-actions-stack {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.login-primary-btn {
  background: #ef3340;
  box-shadow: 0 8px 18px rgba(239, 51, 64, 0.18);
}

.login-primary-btn:hover:not(:disabled) {
  background: #db2532;
}

.login-secondary-btn {
  height: 48px;
  font-size: 15px;
}

.login-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  color: #9ca3af;
  font-size: 14px;
}

.login-consent-box {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
}

.login-consent-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #374151;
}

.login-consent-item input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.login-consent-item a {
  color: #111827;
  font-weight: 700;
  text-decoration: underline;
}

.login-link-btn {
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
}

.login-auth-message {
  text-align: center;
  margin-top: 16px;
  min-height: 20px;
}

@media (max-width: 480px) {
  .top-utility-bar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .top-utility-left,
  .top-utility-right {
    width: 100%;
    justify-content: space-between;
  }

  .top-utility-btn {
    flex: 1 1 auto;
  }

  .top-bar {
    padding: 16px;
  }

  .app-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .side-actions-card {
    position: static;
    padding: 14px 12px;
  }

  .side-actions-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-action-btn {
    text-align: center;
  }

  .brand-logo {
    width: 220px;
  }

  .service-notice {
    font-size: 13px;
  }

  .login-shell {
    min-height: calc(100vh - 24px);
    border-radius: 16px;
  }

  .login-body {
    padding: 24px 18px 32px;
  }

  .login-brand-logo {
    width: 220px;
  }

  .profile-modal-card {
    width: calc(100vw - 24px);
    margin-top: 48px;
    padding: 20px 18px;
  }
}

html {
  -webkit-text-size-adjust: 100%;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  body {
    font-size: clamp(14px, 3.5vw, 16px);
  }

  .container,
  .container.app-shell-active,
  body.app-device-mode .container.app-shell-active {
    max-width: 100%;
    padding: clamp(10px, 3.2vw, 16px);
  }

  .container.app-shell-active .top-bar,
  body.app-device-mode .container.app-shell-active .top-bar {
    width: auto;
    margin-left: 0;
  }

  .top-bar,
  .card,
  .auth-card,
  .auth-screen-card,
  .app-quick-actions-card,
  .profile-modal-card,
  .notice-modal-card {
    padding: clamp(14px, 3.8vw, 20px);
    border-radius: clamp(12px, 3vw, 18px);
  }

  .top-bar-content,
  .auth-mode-panel,
  .login-form-card,
  .profile-modal-form,
  .notice-modal-form {
    gap: clamp(10px, 2.6vw, 14px);
  }

  .brand-logo,
  body.app-device-mode .brand-logo {
    width: clamp(170px, 42vw, 250px);
  }

  .service-notice,
  body.app-device-mode .service-notice {
    font-size: clamp(10px, 2.5vw, 14px);
    line-height: 1.45;
  }

  .section-title,
  .apt-info-title {
    font-size: clamp(17px, 4.2vw, 22px);
  }

  .section-title-row,
  .profile-modal-header,
  .notice-modal-header {
    gap: clamp(8px, 2vw, 12px);
  }

  .query-block .section-title-row,
  .apt-info-row,
  .profile-modal-row {
    gap: clamp(8px, 2.4vw, 12px);
  }

  .select-wrap select,
  .jeonse-item input,
  .login-field input,
  .multi-family-inline input,
  .detail-auto-input,
  .amount-inline-field .amount-input,
  .notice-textarea,
  .profile-modal-input {
    font-size: clamp(14px, 3.6vw, 16px);
  }

  .select-wrap select,
  .jeonse-item input,
  .login-field input,
  .multi-family-inline input,
  .detail-auto-input,
  .amount-inline-field .amount-input,
  .profile-modal-input {
    min-height: clamp(44px, 11vw, 58px);
  }

  .notice-textarea {
    min-height: clamp(120px, 28vw, 180px);
  }

  .login-tab,
  .top-utility-btn,
  .side-action-btn,
  .app-quick-action-btn,
  .login-secondary-btn {
    min-height: clamp(38px, 9vw, 46px);
    font-size: clamp(12px, 3.1vw, 15px);
  }

  .app-layout {
    grid-template-columns: clamp(88px, 22vw, 126px) minmax(0, 1fr);
    gap: clamp(10px, 2.8vw, 18px);
  }

  .side-actions-card {
    top: clamp(10px, 3vw, 20px);
    padding: clamp(10px, 2.8vw, 14px) clamp(8px, 2.4vw, 10px);
    border-radius: clamp(14px, 3vw, 20px);
  }

  .side-actions-title {
    font-size: clamp(11px, 2.7vw, 13px);
    margin-bottom: clamp(8px, 2vw, 10px);
  }

  .side-actions-list {
    gap: clamp(6px, 1.8vw, 8px);
  }

  .side-action-btn {
    padding: clamp(8px, 2.3vw, 10px) clamp(8px, 2.6vw, 12px);
    border-radius: clamp(10px, 2.5vw, 12px);
  }

  .app-quick-actions-list,
  .auth-grid,
  .query-row,
  .action-card,
  .one-home-select-row,
  .select-row {
    gap: clamp(8px, 2.4vw, 12px);
  }

  .apt-info-row {
    grid-template-columns: clamp(86px, 24vw, 140px) minmax(0, 1fr);
  }

  .apt-info-label,
  .apt-info-value,
  .price-section-title,
  .price-section-note,
  .loan-title,
  .loan-note,
  .login-field-label,
  .login-check,
  .login-links,
  .amount-word-badge {
    font-size: clamp(12px, 3vw, 14px);
  }

  .price-table {
    font-size: clamp(11px, 2.8vw, 12px);
  }
}
