/**
 * app.css – 공통 컴포넌트 및 bill_search / base 이관 스타일
 * P3: CSS 통합·컴포넌트화
 */

/* ========== 1. Forms ========== */
.pf-form,
.search-form {
  background: var(--pf-surface);
  padding: 2rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.pf-form h2,
.search-form h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--pf-text);
}

.pf-form-group,
.form-group {
  margin-bottom: 1rem;
}

.pf-form-group label,
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--pf-text-muted);
}

.form-control {
  border-color: var(--pf-input-border);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  border-color: var(--pf-input-focus);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.2);
}

.form-control.is-invalid,
.form-control.is-invalid:focus {
  border-color: var(--pf-input-error);
  box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.15);
}

.form-control.is-valid,
.form-control.is-valid:focus {
  border-color: var(--pf-input-success);
  box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.15);
}

/* ========== 2. Buttons ========== */
.pf-btn-sm {
  font-size: 0.875rem;
}

.pf-btn-xs {
  font-size: 12px;
}

.search-button,
.pf-btn-primary {
  background: var(--pf-primary);
  color: #fff;
  border: none;
  padding: 0.5rem 2rem;
  font-size: 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
}

.follow-button,
.pf-btn-success {
  background: #28a745;
  color: #fff;
  border: none;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.25rem;
  cursor: pointer;
  white-space: nowrap;
}

.unfollow-button,
.pf-btn-muted {
  background: var(--pf-text-muted);
  color: #fff;
  border: none;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.25rem;
  cursor: pointer;
}

/* ========== 3. Tables ========== */
.bill-table,
.pf-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  min-width: 720px;
}

.bill-table th,
.pf-table th {
  background: var(--pf-surface);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--pf-border);
}

.bill-table td,
.pf-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--pf-border);
}

.bill-title,
.pf-table-link {
  color: var(--pf-primary);
  text-decoration: none;
  font-weight: 500;
}

.pf-follow-form,
.follow-form {
  display: inline;
}

.table-responsive,
.pf-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Table column width utilities (인라인 style="width:10%" 대체) */
.pf-w-10 { width: 10%; }
.pf-w-12 { width: 12%; }
.pf-w-15 { width: 15%; }
.pf-w-16 { width: 16%; }
.pf-w-20 { width: 20%; }
.pf-w-30 { width: 30%; }
.pf-w-35 { width: 35%; }
.pf-w-50 { width: 50%; }
.pf-w-60 { width: 60%; }

/* ========== 4. Info boxes ========== */
.search-info,
.pf-info {
  background: var(--pf-surface-alt);
  padding: 1rem;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
}

.search-info-warning,
.pf-info-warning {
  background: var(--pf-warning-bg) !important;
  border: 1px solid var(--pf-warning-border);
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.pf-info-summary {
  font-weight: 600;
  cursor: pointer;
}

.pf-info details ul,
.search-info details ul {
  margin-top: 8px;
  padding-left: 18px;
  line-height: 1.6;
}

.pf-info-hint {
  font-size: 12px;
  color: var(--pf-text-muted);
  margin-top: 6px;
}

.pf-follow-info {
  background: var(--pf-warning-bg);
  border: 1px solid var(--pf-warning-border);
  border-radius: 10px;
  padding: 12px 14px;
}
.pf-follow-info-title {
  font-weight: 700;
  color: var(--pf-text);
}
.pf-follow-info-desc {
  font-size: 0.92rem;
  color: var(--pf-text-muted);
  line-height: 1.45;
}

/* ========== Notification list ========== */
.pf-noti-list { margin: 0; padding: 0; }
.pf-noti-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--pf-border);
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--pf-surface);
}
.pf-noti-item--unread {
  background: color-mix(in srgb, var(--pf-primary, #2563eb) 4%, #fff);
  border-color: color-mix(in srgb, var(--pf-primary, #2563eb) 18%, transparent);
}
.pf-noti-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  background: var(--pf-surface-alt);
  color: var(--pf-primary);
}
.pf-noti-body { flex: 1; min-width: 0; }
.pf-noti-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pf-noti-actions .btn {
  min-width: 94px;
  white-space: nowrap;
}
.pf-noti-badge {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  padding: 1px 8px;
  border-radius: 10px;
  margin-bottom: 4px;
}
.pf-noti-badge--impact {
  background: color-mix(in srgb, var(--pf-primary, #2563eb) 12%, transparent);
  color: var(--pf-primary, #2563eb);
}
.pf-noti-badge--progress {
  background: color-mix(in srgb, #f59e0b 14%, transparent);
  color: #92400e;
}
.pf-noti-badge--aide-event {
  background: color-mix(in srgb, #10b981 14%, transparent);
  color: #065f46;
}
.pf-noti-msg {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  word-break: break-word;
}
.pf-noti-meta {
  font-size: 12px;
  color: var(--pf-text-muted);
  margin-top: 2px;
}
@media (max-width: 576px) {
  .pf-noti-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
  }
  .pf-noti-body {
    grid-column: 2;
  }
  .pf-noti-actions {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 2px;
  }
  .pf-noti-actions .btn {
    min-width: 0;
  }
}
.pf-industry-group {
  border: 1px solid var(--pf-border);
  border-radius: 10px;
  padding: 14px 16px 10px;
  background: #fafbfc;
}
.pf-industry-group-legend {
  font-size: .85rem;
  font-weight: 700;
  color: var(--pf-primary);
  padding: 0 6px;
  width: auto;
  margin-bottom: 6px;
}
.pf-industry-option {
  border: 1px solid var(--pf-border);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.pf-industry-option:hover {
  border-color: var(--pf-primary);
  box-shadow: 0 0 0 2px rgba(var(--pf-primary-rgb, 59,130,246), .1);
}
.pf-industry-option input[type="checkbox"] {
  accent-color: var(--pf-primary);
}
.pf-industry-option input[type="checkbox"]:checked + span {
  color: var(--pf-primary);
  font-weight: 600;
}

/* ========== 5. Empty / No results ========== */
.no-results,
.pf-empty {
  text-align: center;
  padding: 3rem;
  color: var(--pf-text-muted);
}

/* 인증·가입·OTP·활성화 카드 폭 */
.pf-auth-card { width: 100%; max-width: 420px; }
.pf-icon-lg { font-size: 4rem; }

/* ========== 6. Toolbar ========== */
.pf-toolbar {
  margin-bottom: 1rem;
  display: flex;
  justify-content: flex-end;
}

/* ========== 7. Progress bar (법안 진행률) ========== */
.pf-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pf-progress-inner {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pf-progress-bar {
  height: 6px;
  background: var(--pf-surface-alt);
  border-radius: 3px;
  width: 200px;
  position: relative;
}

.pf-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 3px;
}

.pf-progress-labels {
  position: absolute;
  top: -10px;
  font-size: 10px;
  color: var(--pf-text-muted);
}
.pf-progress-labels-0 { left: 0; }
.pf-progress-labels-25 { left: 25%; transform: translateX(-50%); }
.pf-progress-labels-50 { left: 50%; transform: translateX(-50%); }
.pf-progress-labels-75 { left: 75%; transform: translateX(-50%); }
.pf-progress-labels-100 { left: 100%; transform: translateX(-100%); }

.pf-progress-phase {
  font-size: 12px;
  color: var(--pf-text);
  font-weight: 600;
}

/* ========== 8. Cards (공통, 향후 확장) ========== */
.pf-card {
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: 0.5rem;
  overflow: hidden;
}

.pf-card-body {
  padding: 1rem;
}

.pf-card-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--pf-border);
  font-size: 0.875rem;
  color: var(--pf-text-muted);
}

/* ========== 9. Lists (공통, 향후 확장) ========== */
.pf-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pf-list-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--pf-border);
}

.pf-list-item:last-child {
  border-bottom: none;
}

.pf-list-item-meta {
  font-size: 0.875rem;
  color: var(--pf-text-muted);
}

.pf-pre-wrap {
  white-space: pre-wrap;
}

.pf-input-edit {
  width: 16em;
  display: inline-block;
}

/* ========== 11. Home & panels ========== */
@media (max-width: 768px) {
  .home-grid { display: block !important; }
  .home-grid > div { margin-bottom: 2rem; }
}
@media (min-width: 769px) {
  .home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--pf-space-24);
  }
}

.pf-panel {
  background-color: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: 8px;
  padding: var(--pf-space-16);
  margin-bottom: var(--pf-section-gap);
}

.pf-panel-title {
  margin-top: 0;
  color: var(--pf-text);
  font-size: var(--pf-font-section);
  font-weight: 700;
}

.pf-panel-grid {
  margin-top: var(--pf-space-12);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--pf-space-12);
}

.pf-panel-card {
  background: var(--pf-bg);
  border: 1px solid var(--pf-border);
  border-radius: 6px;
  padding: var(--pf-space-12);
}

.pf-panel-card-title { font-weight: 600; margin-bottom: 6px; }
.pf-panel-card ul { margin: 0; padding-left: 18px; }
.pf-panel-card li { font-size: 14px; line-height: 1.35; }
.pf-form-row { margin-bottom: var(--pf-space-16); }
.pf-party-h4 {
  color: var(--pf-primary);
  border-bottom: 1px solid var(--pf-border);
  padding-bottom: 5px;
  margin-top: 0;
}
.pf-badge-chair { background-color: #dc3545; color: white; padding: 2px 6px; font-size: 12px; border-radius: 4px; margin-left: 5px; }
.pf-badge-secretary { background-color: #17a2b8; color: white; padding: 2px 6px; font-size: 12px; border-radius: 4px; margin-left: 5px; }
.pf-staff-toggle { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--pf-border); }
.pf-party-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.pf-member-card { background-color: var(--pf-surface); border: 1px solid var(--pf-border); border-radius: 4px; padding: 10px; margin-bottom: 10px; }

/* 상임위 위원 명단: 모바일 1열 + 파티 아코디언 */
.pf-party-accordion-btn {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--pf-primary);
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: 0.375rem;
  cursor: pointer;
  text-align: left;
}
.pf-accordion-chevron {
  transition: transform 0.2s ease;
}
.pf-party-accordion-btn[aria-expanded="true"] .pf-accordion-chevron {
  transform: rotate(180deg);
}
.pf-member-row-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
}
.pf-member-link {
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  display: block;
}
.pf-member-link:hover { color: var(--pf-primary); }
.pf-member-meta {
  display: block;
  font-size: 0.875rem;
  color: var(--pf-text-muted);
  margin-top: 0.25rem;
}
.pf-member-staff-toggle {
  flex-shrink: 0;
  font-size: 1.25rem;
}
@media (max-width: 768px) {
  .pf-party-list.pf-party-cols {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .pf-party-list .pf-party-accordion-btn {
    display: flex;
  }
  .pf-party-list .pf-party-section-content.d-none {
    display: none !important;
  }
  .pf-party-list .pf-party-section-content.pf-party-section-open {
    display: block;
  }
  .pf-party-list .pf-party-section .pf-party-h4 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }
}
@media (min-width: 769px) {
  .pf-party-list .pf-party-accordion-btn {
    display: none !important;
  }
  .pf-party-list .pf-party-section-content,
  .pf-party-list .pf-party-section-content.d-none {
    display: block !important;
  }
}

/* Home: 통합 검색바 + 세그먼트 컨트롤 */
.pf-home-search-wrap {
  margin-bottom: var(--pf-section-gap);
}
.pf-home-search-hint {
  font-size: 0.8125rem;
  line-height: 1.4;
}
.pf-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pf-space-12);
  align-items: stretch;
}

.pf-search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.pf-search-input {
  min-height: 40px;
  padding-right: 44px;
}

.pf-search-icon-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: var(--pf-surface-alt);
  color: var(--pf-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.pf-search-icon-btn:hover {
  background: var(--bs-secondary);
  color: #fff;
}
.pf-search-icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.2);
}
.pf-search-segment {
  display: flex;
  border-radius: 0.375rem;
  overflow: hidden;
  border: 1px solid var(--pf-border);
  background: var(--pf-surface);
}
.pf-segment-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--pf-text-muted);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
  min-height: 44px;
}
.pf-segment-btn:hover {
  background: var(--pf-surface-alt);
  color: var(--pf-text);
}
.pf-segment-btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.25);
}
.pf-segment-btn.active {
  background: var(--pf-primary);
  color: #fff;
}
.pf-segment-btn + .pf-segment-btn {
  border-left: 1px solid var(--pf-border);
}
.pf-segment-btn.active + .pf-segment-btn,
.pf-segment-btn + .pf-segment-btn.active {
  border-left-color: transparent;
}
.pf-search-submit {
  min-height: 2.5rem;
  white-space: nowrap;
}

.pf-follow-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--pf-space-12);
  padding: var(--pf-card-padding);
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-card);
  margin-bottom: var(--pf-space-12);
}
.pf-follow-card.js-card-link {
  cursor: pointer;
}

.pf-follow-card-body {
  flex: 1;
  min-width: 0;
}

.pf-follow-card-name {
  display: block;
  font-size: var(--pf-font-body);
  font-weight: 600;
  color: var(--pf-text);
  text-decoration: none;
  margin-bottom: 2px;
}

.pf-follow-card-name:hover {
  color: var(--pf-primary);
}

.pf-follow-card-meta {
  font-size: var(--pf-font-caption-lg);
  color: var(--pf-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pf-follow-card-action {
  flex-shrink: 0;
}

.pf-follow-card-action .btn {
  min-height: 32px;
  min-width: 32px;
  padding: 4px 8px;
}

.pf-panel-card-list {
  position: relative;
  margin: 0;
  padding-left: 18px;
}

.pf-panel-card-list.is-collapsed {
  max-height: 7.5em;
  overflow: hidden;
}

.pf-panel-card-list.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.2em;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--pf-bg));
  pointer-events: none;
}

.pf-panel-card-list.is-expanded {
  max-height: none;
}

.pf-panel-card-more {
  margin-top: var(--pf-space-8);
  padding: 0;
  border: none;
  background: transparent;
  font-size: var(--pf-font-caption-lg);
  color: var(--pf-primary);
  cursor: pointer;
}
@media (max-width: 480px) {
  .pf-search-bar {
    flex-direction: column;
  }
  .pf-search-input-wrap {
    width: 100%;
  }
  .pf-search-segment {
    width: 100%;
  }
  .pf-segment-btn {
    flex: 1;
  }
  .pf-search-input {
    min-height: 44px;
  }
}

/* ========== 12. Memo cards (aide/member detail) ========== */
.pf-memo-card {
  margin-bottom: 10px;
  padding: 1rem;
}
.pf-memo-label { display: block; margin-bottom: 0.5rem; }
.pf-memo-field { margin-bottom: 0.75rem; }
.pf-memo-submit { width: 100%; min-height: 44px; }

/* 12b. Memo: main free-text form */
.pf-memo-composer,
.pf-memo-feed {
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: 12px;
  padding: 16px;
}
.pf-memo-composer {
  margin-bottom: 16px;
}
.pf-memo-section-head {
  margin-bottom: 12px;
}
.pf-memo-section-head-feed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pf-memo-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--pf-text);
}
.pf-memo-section-copy {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--pf-text-muted);
}
.pf-memo-feed-count {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--pf-text-muted);
}
.pf-memo-main-form {
  margin-bottom: 0;
}
.pf-memo-main-input {
  min-height: 112px;
  resize: none;
  margin-bottom: 12px;
  padding: 14px 16px;
  line-height: 1.6;
  border-radius: 12px;
  background: var(--pf-bg);
}
.pf-memo-main-submit {
  min-height: 44px;
  border-radius: 10px;
}
.pf-memo-empty {
  padding: 2rem 0;
  font-size: 14px;
}

/* 12c. Memo: timeline */
.pf-memo-timeline {
  position: relative;
}
.pf-memo-tl-item {
  position: relative;
  padding: 0 0 16px 22px;
  margin-bottom: 16px;
}
.pf-memo-tl-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}
.pf-memo-tl-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: -16px;
  width: 1px;
  background: var(--pf-border);
}
.pf-memo-tl-item:last-child::before {
  display: none;
}
.pf-memo-tl-item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pf-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.pf-memo-tl-view,
.pf-memo-tl-edit-form {
  background: var(--pf-bg);
  border: 1px solid var(--pf-border);
  border-radius: 12px;
  padding: 14px;
}
.pf-memo-tl-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.pf-memo-tl-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--pf-text-muted);
}
.pf-memo-tl-author {
  margin-top: 2px;
  font-size: 12px;
  color: var(--pf-text-muted);
}
.pf-memo-tl-tag {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--pf-surface-alt);
  color: var(--pf-text-muted);
  border-radius: 10px;
}
.pf-memo-tl-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--pf-text);
  margin-bottom: 10px;
}
.pf-memo-tl-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pf-memo-tl-actions .btn-link {
  font-size: 13px;
  padding: 0;
  font-weight: 600;
  text-decoration: none;
}
.pf-memo-edit-input,
.pf-memo-tl-edit-form textarea {
  min-height: 96px;
  resize: vertical;
  border-radius: 10px;
}

@media (max-width: 768px) {
  .pf-memo-composer,
  .pf-memo-feed {
    padding: 14px;
    border-radius: 10px;
  }
  .pf-memo-main-input {
    min-height: 104px;
  }
  .pf-memo-tl-item {
    padding-left: 18px;
  }
  .pf-memo-tl-view,
  .pf-memo-tl-edit-form {
    padding: 12px;
  }
}

/* 12d. Aide summary/history panels */
.pf-aide-summary-card {
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: 12px;
  padding: 16px;
}
.pf-aide-summary-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.pf-aide-summary-name {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--pf-text);
}
.pf-aide-summary-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
}
.pf-aide-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pf-aide-summary-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  color: var(--pf-text);
  line-height: 1.45;
  font-size: 15px;
}
.pf-aide-summary-list i {
  margin-top: 2px;
  color: var(--pf-text-muted);
}
.pf-aide-summary-actions {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pf-aide-summary-follow-form {
  margin: 0;
}

.pf-aide-history-timeline {
  position: relative;
  padding-left: 18px;
}
.pf-aide-history-item {
  position: relative;
  padding-bottom: 14px;
}
.pf-aide-history-item:last-child {
  padding-bottom: 0;
}
.pf-aide-history-item::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 18px;
  bottom: -6px;
  width: 1px;
  background: var(--pf-border);
}
.pf-aide-history-item:last-child::before {
  display: none;
}
.pf-aide-history-item::after {
  content: "";
  position: absolute;
  left: -18px;
  top: 12px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pf-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.pf-aide-history-date {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pf-text-muted);
}
.pf-aide-history-card {
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: 10px;
  padding: 12px;
}
.pf-aide-history-office {
  font-size: 15px;
  font-weight: 600;
  color: var(--pf-text);
  line-height: 1.5;
}
.pf-aide-history-rank {
  margin-top: 4px;
  font-size: 13px;
  color: var(--pf-text-muted);
}
.pf-aide-history-empty {
  min-height: 160px;
  border: 1px dashed var(--pf-border);
  border-radius: 10px;
  color: var(--pf-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.pf-aide-history-empty i {
  font-size: 24px;
}

@media (max-width: 768px) {
  .pf-aide-summary-name {
    font-size: 1.9rem;
  }
  .pf-aide-summary-card {
    border-radius: 10px;
    padding: 14px;
  }
  .pf-aide-summary-list li {
    font-size: 14px;
  }
}

/* 보좌관 상세: 요약/메모/이력 탭 + 단일 폼 + 하단 저장 */
.pf-aide-detail {
  padding-bottom: 90px;
}
.pf-aide-tabs {
  display: flex;
  border-bottom: 2px solid var(--pf-border);
  margin-bottom: 1rem;
  gap: 0;
}
.pf-aide-tab {
  flex: 1;
  padding: 0.6rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--pf-text-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.pf-aide-tab:hover {
  color: var(--pf-text);
}
.pf-aide-tab.active {
  color: var(--pf-primary);
  border-bottom-color: var(--pf-primary);
}
.pf-aide-panel {
  display: none;
}
.pf-aide-panel.active {
  display: block;
}
.pf-memo-fields {
  padding-bottom: 1rem;
}
.pf-memo-save-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 0;
  background: var(--pf-bg);
  border-top: 1px solid var(--pf-border);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
  z-index: 100;
}
.pf-memo-save-bar .btn {
  min-height: 44px;
}

/* ========== 9b. App bar & bottom nav (모바일 최적화) ========== */
.pf-appbar {
  min-height: 56px;
  flex-shrink: 0;
  padding-top: env(safe-area-inset-top, 0px);
}
.pf-appbar .container {
  min-height: 56px;
}
.pf-appbar .navbar-brand,
.pf-appbar .pf-appbar-back {
  font-size: 1.25rem;
  padding: 0.5rem 0;
}
.pf-appbar .pf-appbar-back {
  font-size: 1.5rem;
  line-height: 1;
}

/* 하단 탭 높이: 아이콘+라벨+패딩+safe-area. main 하단 여백과 동기화 */
:root {
  --pf-bottom-nav-height: 52px;
}
.pf-main-with-bottom-nav {
  padding-bottom: calc(var(--pf-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 72px);
  transition: padding-bottom 0.3s ease;
}
.pf-main-with-bottom-nav.pf-nav-collapsed {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.pf-bottom-nav {
  min-height: var(--pf-bottom-nav-height);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease;
}
.pf-bottom-nav.pf-nav-hidden {
  transform: translateY(100%);
}
.pf-bottom-nav .nav-link {
  color: var(--pf-text-muted);
  font-size: 0.75rem;
  border: none;
  border-radius: 0;
  flex: 1;
  max-width: 120px;
  padding-top: 0.2rem !important;
  padding-bottom: 0.2rem !important;
}
.pf-bottom-nav .nav-link:hover {
  color: var(--pf-primary);
  background-color: transparent;
}
.pf-bottom-nav .nav-link.active {
  color: var(--pf-primary);
  font-weight: 600;
  background-color: transparent;
}
.pf-bottom-nav .nav-link i {
  font-size: 1.25rem;
}

.pf-notif-badge {
  min-width: 20px;
  height: 20px;
  line-height: 20px;
  padding: 0 6px;
  font-size: 11px;
  text-align: center;
}

.pf-password-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-decoration: none;
  z-index: 2;
}

/* ========== 10. Base layout: nav, grid, card-row, form-row, pre, overlay ========== */
.nav-tabs-custom {
  background-color: var(--pf-bg);
  border-bottom: 2px solid var(--pf-border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-tabs-custom .nav-link {
  padding: 0.75rem 1.5rem;
  color: var(--pf-text-muted);
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-tabs-custom .nav-link:hover {
  color: var(--pf-primary);
  border-bottom-color: var(--pf-primary);
  background-color: transparent;
}

.nav-tabs-custom .nav-link.active {
  color: var(--pf-primary);
  border-bottom-color: var(--pf-primary);
  background-color: transparent;
}

.grid-2 { display: grid; gap: 1rem; }
.grid-3 { display: grid; gap: 1rem; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.form-row-custom {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.form-row-custom > form { flex: 1; }

pre {
  max-width: 100%;
  overflow-x: auto;
}

/* Utilities: min-width, cursor (인라인 대체) */
.pf-min-w-0 { min-width: 0; }
.pf-cursor-pointer { cursor: pointer; }

/* Overlay & modal (showAngun 등) */
.pf-overlay {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 9999;
}

.pf-overlay-box {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 680px;
  width: 92%;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  background: var(--pf-bg);
  border: 1px solid var(--pf-border);
  color: var(--pf-text);
}

.pf-overlay-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.pf-overlay-body {
  max-height: 60vh;
  overflow: auto;
  line-height: 1.5;
  font-size: 14px;
}

.pf-overlay-body pre {
  white-space: pre-wrap;
  margin: 0;
}

.pf-overlay-actions {
  text-align: right;
  margin-top: 10px;
}

/* FAB: 모바일 전용, 하단 탭 위·safe-area 고려 */
.pf-fab {
  position: fixed;
  right: var(--pf-space-16);
  bottom: max(
    var(--pf-section-gap),
    calc(var(--pf-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + var(--pf-space-24))
  );
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-radius: 24px;
  background: var(--pf-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22), 0 1px 4px rgba(0, 0, 0, 0.12);
  transition: bottom 0.3s ease, padding 0.25s ease, border-radius 0.25s ease,
              width 0.25s ease, box-shadow 0.15s ease;
}
.pf-fab:hover {
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.15);
}
.pf-fab:active {
  transform: scale(0.96);
}
.pf-fab.pf-fab-draggable {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.pf-fab.pf-fab-dragging {
  transition: none !important;
  cursor: grabbing;
}
.pf-nav-hidden ~ .pf-fab,
body.pf-nav-is-hidden .pf-fab {
  bottom: max(
    var(--pf-section-gap),
    calc(env(safe-area-inset-bottom, 0px) + var(--pf-space-24))
  );
}
.pf-fab .pf-fab-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}
.pf-fab .pf-fab-label {
  white-space: nowrap;
  overflow: hidden;
  max-width: 100px;
  opacity: 1;
  transition: max-width 0.25s ease, opacity 0.2s ease, margin 0.25s ease;
}
.pf-fab.pf-fab-collapsed {
  width: 48px;
  padding: 0;
  border-radius: 50%;
}
.pf-fab.pf-fab-collapsed .pf-fab-label {
  max-width: 0;
  opacity: 0;
  margin: 0;
}
@media (min-width: 769px) {
  .pf-fab { display: none !important; }
}

/* Design token 적용: 카드·섹션 (8pt 그리드) */
.pf-card {
  padding: var(--pf-card-padding);
  border-radius: var(--pf-radius-card);
}
.pf-section-title {
  font-size: var(--pf-font-section);
  font-weight: 700;
  color: var(--pf-text);
}
.pf-page-title {
  font-size: var(--pf-font-page-title);
  font-weight: 700;
  color: var(--pf-text);
  margin-bottom: var(--pf-space-16);
}
.pf-section-gap { margin-bottom: var(--pf-section-gap); }
.pf-body-text { font-size: var(--pf-font-body); }
.pf-caption { font-size: var(--pf-font-caption); color: var(--pf-text-muted); }
.pf-caption-lg { font-size: var(--pf-font-caption-lg); color: var(--pf-text-muted); }

/* Button 규칙: Primary / Secondary / Destructive */
.btn-primary { background-color: var(--pf-primary); border-color: var(--pf-primary); color: #fff; }
.btn-secondary { background-color: var(--bs-secondary); border-color: var(--bs-secondary); }
.btn-danger, .btn-danger:hover { background-color: var(--pf-destructive); border-color: var(--pf-destructive); color: #fff; }
.text-danger, .text-danger:hover { color: var(--pf-destructive) !important; }

/* ========== QnA 질문 작성 폼 ========== */
.qna-compose {
  max-width: 760px;
  margin: 0 auto;
}
.qna-compose-subtitle {
  font-size: var(--pf-font-caption-lg);
  color: var(--pf-text-muted);
}
.qna-compose-back-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--pf-primary);
  text-decoration: none;
}
.qna-compose-back-link:hover {
  color: var(--pf-primary);
  text-decoration: underline;
}
.qna-compose-form {
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: 12px;
  padding: var(--pf-space-16);
}
.qna-compose-form .form-label {
  font-weight: 600;
  color: var(--pf-text);
}
.qna-compose-form .form-control,
.qna-compose-form .form-select {
  background: var(--pf-bg);
  color: var(--pf-text);
  border-color: var(--pf-border);
}
.qna-compose-field-hint {
  margin-top: 6px;
  font-size: var(--pf-font-caption);
  color: var(--pf-text-muted);
}
.qna-compose-note {
  font-size: var(--pf-font-caption-lg);
  color: var(--pf-text-muted);
}
.qna-compose-rule {
  background: var(--pf-warning-bg);
  border: 1px solid var(--pf-warning-border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: var(--pf-font-caption);
  color: var(--pf-text);
}
.qna-compose-rule ul {
  padding-left: 18px;
}
.qna-compose-submit {
  min-height: 44px;
  font-weight: 600;
}

/* ========== QnA 상세/삭제 공통 ========== */
.qna-detail {
  max-width: 760px;
  margin: 0 auto;
}
.qna-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.qna-detail-jump-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--pf-primary);
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--pf-primary) 28%, transparent);
  border-radius: 999px;
  padding: 3px 10px;
}
.qna-detail-jump-link:hover {
  color: var(--pf-primary);
  text-decoration: none;
  background: color-mix(in srgb, var(--pf-primary) 10%, transparent);
}
.qna-detail-card {
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: 12px;
  padding: var(--pf-space-16);
}
.qna-detail-header {
  margin-bottom: var(--pf-space-12);
}
.qna-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.qna-detail-title {
  font-size: var(--pf-font-section);
  font-weight: 700;
  color: var(--pf-text);
  margin: 2px 0 var(--pf-space-8);
  flex: 1;
  min-width: 0;
}
.qna-detail-menu .dropdown-toggle {
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: var(--pf-text-muted);
  border-radius: var(--pf-radius-btn);
}
.qna-detail-menu .dropdown-toggle:hover {
  background: var(--pf-surface-alt);
  color: var(--pf-text);
}
.qna-detail-menu .dropdown-toggle::after {
  display: none;
}
.qna-detail-menu .dropdown-item.danger {
  color: var(--pf-destructive);
}
.qna-detail-meta {
  font-size: var(--pf-font-caption);
  color: var(--pf-text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--pf-space-8);
}
.qna-detail-body {
  color: var(--pf-text);
  line-height: 1.7;
}
.qna-detail-owner-actions {
  display: flex;
  gap: 8px;
  margin-top: var(--pf-space-16);
}
.qna-answer-section-title {
  font-size: var(--pf-font-section);
  font-weight: 700;
  margin-bottom: var(--pf-space-12);
}
.qna-answer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: var(--pf-space-12);
}
.qna-answer-sort-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.qna-answer-sort-tab {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--pf-border);
  border-radius: 999px;
  background: var(--pf-surface);
  color: var(--pf-text-muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.qna-answer-sort-tab:hover {
  color: var(--pf-text);
  border-color: var(--pf-text-muted);
  text-decoration: none;
}
.qna-answer-sort-tab.active {
  background: var(--pf-primary);
  color: #fff;
  border-color: var(--pf-primary);
}
.qna-answer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qna-answer-card {
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: 10px;
  padding: 12px;
}
.qna-answer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.qna-answer-author {
  font-size: var(--pf-font-caption-lg);
  font-weight: 600;
  color: var(--pf-text);
}
.qna-answer-date {
  font-size: var(--pf-font-caption);
  color: var(--pf-text-muted);
}
.qna-answer-actions {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.qna-answer-content {
  color: var(--pf-text);
  line-height: 1.65;
}
.qna-answer-empty {
  background: var(--pf-surface);
  border: 1px dashed var(--pf-border);
  border-radius: 10px;
  padding: 14px;
  color: var(--pf-text-muted);
}
.qna-answer-compose-title {
  font-size: var(--pf-font-caption-lg);
  font-weight: 700;
  margin-bottom: 8px;
}
.qna-answer-compose-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.qna-answer-compose-toggle {
  flex-shrink: 0;
}
.qna-answer-compose .form-control {
  min-height: 120px;
  resize: vertical;
}
.qna-delete-summary {
  background: var(--pf-bg);
  border: 1px solid var(--pf-border);
  border-radius: 10px;
  padding: 12px;
}
.qna-delete-summary-label {
  font-size: var(--pf-font-caption);
  color: var(--pf-text-muted);
}
.qna-delete-summary-body {
  font-size: var(--pf-font-caption-lg);
  color: var(--pf-text-muted);
  line-height: 1.5;
}
.qna-danger-note {
  background: color-mix(in srgb, var(--pf-destructive) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--pf-destructive) 25%, transparent);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: var(--pf-font-caption);
  color: var(--pf-destructive);
  font-weight: 600;
}

/* ========== QnA 게시판: 정렬 탭 ========== */
.qna-sort-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: var(--pf-space-16);
}
.qna-sort-tab {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pf-text-muted);
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.qna-sort-tab:hover {
  color: var(--pf-text);
  border-color: var(--pf-text-muted);
  text-decoration: none;
}
.qna-sort-tab.active {
  background: var(--pf-primary);
  color: #fff;
  border-color: var(--pf-primary);
}

/* ========== QnA 게시판: 카테고리 배지 ========== */
.qna-category-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--pf-primary) 10%, transparent);
  color: var(--pf-primary);
  margin-bottom: 4px;
}

/* ========== QnA 게시판: 카드 상단 래퍼 ========== */
.qna-card-top {
  flex: 1;
  min-width: 0;
}
.qna-card-top .card-title {
  margin-bottom: 0;
}

/* ========== QnA 게시판: 답변 상태 배지 ========== */
.qna-answer-badge {
  display: inline-block;
  font-size: var(--pf-font-caption);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  line-height: 1.4;
}
.qna-answer-badge--none {
  background: color-mix(in srgb, #f59e0b 14%, transparent);
  color: #92400e;
}
.qna-answer-badge--has {
  background: var(--pf-surface-alt);
  color: var(--pf-text-muted);
}
.qna-answer-badge--hot {
  background: color-mix(in srgb, var(--pf-primary) 12%, transparent);
  color: var(--pf-primary);
}

/* ========== QnA 게시판 목록: 카드 + 컨텍스트 메뉴 ========== */
.qna-list .card {
  border-radius: var(--pf-radius-card);
  border: 1px solid var(--pf-border);
  overflow: visible;
  margin-bottom: var(--pf-section-gap);
}
.qna-list .card:last-child { margin-bottom: 0; }
.qna-list .card-body {
  padding: var(--pf-card-padding);
}
.qna-list .card-title {
  font-size: var(--pf-font-body);
  font-weight: 600;
  color: var(--pf-text);
  margin-bottom: var(--pf-space-8);
}
.qna-list .card-text {
  font-size: var(--pf-font-caption-lg);
  color: var(--pf-text-muted);
  display: -webkit-box;
  line-clamp: 1;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--pf-space-8);
}
.qna-list .qna-meta {
  font-size: var(--pf-font-caption);
  color: var(--pf-text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--pf-space-8);
}
.qna-list .badge.bg-secondary {
  font-size: var(--pf-font-caption);
  font-weight: 500;
}
.qna-list .pf-card-menu {
  position: absolute;
  top: var(--pf-space-8);
  right: var(--pf-space-8);
}
.qna-list .pf-card-menu .dropdown-toggle {
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: var(--pf-text-muted);
  border-radius: var(--pf-radius-btn);
}
.qna-list .pf-card-menu .dropdown-toggle:hover {
  background: var(--pf-surface-alt);
  color: var(--pf-text);
}
.qna-list .pf-card-menu .dropdown-toggle::after { display: none; }
.qna-list .pf-card-menu .dropdown-item.danger { color: var(--pf-destructive); }
.qna-list .pf-card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--pf-space-8);
  margin-bottom: 0;
}
.qna-list .pf-card-header-row .card-title { margin-bottom: 0; flex: 1; min-width: 0; }

@media (max-width: 768px) {
  .qna-compose-form {
    padding: var(--pf-space-12);
    border-radius: 10px;
  }
  .qna-detail-card {
    padding: var(--pf-space-12);
    border-radius: 10px;
  }
  .qna-detail-owner-actions {
    flex-wrap: wrap;
  }
  .qna-answer-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .qna-answer-sort-tabs {
    width: 100%;
  }
  .qna-answer-sort-tab {
    text-align: center;
    flex: 1;
  }
  .qna-answer-compose-head {
    flex-wrap: wrap;
  }
  .qna-answer-card {
    padding: 10px;
  }
  .qna-sort-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .qna-sort-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* ========== 11. Mobile – form-control, nav, grid, tables ========== */
@media (max-width: 768px) {
  .form-control { font-size: 16px; /* Prevent iOS zoom on focus */ }
  textarea.form-control { min-height: 100px; }

  .home-grid > div {
    margin-bottom: var(--pf-section-gap);
  }

  .home-grid .pf-page-title {
    font-size: var(--pf-font-page-title);
    font-weight: 700;
    margin-bottom: var(--pf-space-16);
  }

  .home-grid .pf-section-title {
    font-size: var(--pf-font-section);
    font-weight: 700;
    margin-bottom: var(--pf-space-12);
  }

  .pf-home-search-wrap {
    margin-top: var(--pf-space-16);
    margin-bottom: var(--pf-section-gap);
  }

  .pf-home-search-hint {
    margin-bottom: var(--pf-space-8);
  }

  .pf-search-bar {
    gap: var(--pf-space-12);
  }

  .pf-search-input {
    min-height: 44px;
  }

  .pf-search-icon-btn {
    width: 36px;
    height: 36px;
  }

  .pf-search-segment {
    min-height: 44px;
  }

  .pf-follow-card {
    padding: var(--pf-space-12);
    margin-bottom: var(--pf-space-12);
  }

  .pf-follow-card:last-child {
    margin-bottom: 0;
  }

  .pf-panel-card { padding: var(--pf-space-12); }
  .pf-panel-card-title { font-size: 15px; margin-bottom: 8px; }
  .pf-panel-card li { font-size: 14px; line-height: 1.5; }

  .pf-btn-desktop-only { display: none !important; }

  .nav-tabs-custom {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .nav-tabs-custom .nav-link {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .form-row-custom {
    flex-direction: column;
    gap: 1rem;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ========== 12. Mobile – Tables ========== */
@media (max-width: 768px) {
  .bill-table th,
  .bill-table td,
  .pf-table th,
  .pf-table td {
    white-space: nowrap;
  }

  .bill-title,
  .pf-table-link {
    display: -webkit-box;
  line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    max-width: 38ch;
  }
}

/* ========== 13. Bill search – 카드 리스트 (테이블 제거, 카드만 사용) ========== */
.pf-bill-cards {
  display: block;
}
.pf-bill-card {
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.pf-bill-card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
}
.pf-bill-card-body {
  flex: 1;
  min-width: 0;
}
.pf-bill-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.35rem 0;
  line-height: 1.4;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pf-bill-card-title a {
  color: var(--pf-primary);
  text-decoration: none;
}
.pf-bill-card-title a:hover {
  text-decoration: underline;
}
.pf-bill-card-meta {
  font-size: 0.8125rem;
  color: var(--pf-text-muted);
  margin-bottom: 0.35rem;
}
.pf-bill-card-progress {
  margin-bottom: 0.35rem;
}
.pf-bill-status-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.25rem;
  background: var(--pf-surface-alt);
  color: var(--pf-text);
  margin-right: 0.35rem;
}
.pf-bill-phase {
  font-size: 0.75rem;
}
.pf-bill-card-industry {
  font-size: 0.8125rem;
  color: var(--pf-text-muted);
}
.pf-bill-card-actions {
  flex-shrink: 0;
}
.pf-bill-card-actions .follow-form {
  display: inline;
}

/* ========== 14. Bill detail – 관련 업계 태그 ========== */
.pf-industry-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pf-primary, #2563eb);
  background: color-mix(in srgb, var(--pf-primary, #2563eb) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--pf-primary, #2563eb) 22%, transparent);
  border-radius: 20px;
  white-space: nowrap;
}
.pf-industry-tag--sm {
  padding: 2px 8px;
  font-size: 11px;
}
.pf-industry-tag--mine {
  color: #fff;
  background: var(--pf-primary, #2563eb);
  border-color: var(--pf-primary, #2563eb);
}
.pf-profile-interests-card {
  border-style: dashed;
}
.pf-profile-interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pf-profile-interest-tag {
  margin: 0;
}

/* ========== 15. Aides bill-detail (aides/bill_detail.html 전용) ========== */
.bill-detail { max-width: 900px; margin: 0 auto; }
.bill-detail .bill-header { background-color: var(--pf-surface); padding: 2rem; border-radius: 0.5rem; margin-bottom: 2rem; }
.bill-detail .bill-title { font-size: 1.75rem; font-weight: 600; color: var(--pf-text); margin-bottom: 1rem; }
.bill-detail .bill-meta { display: flex; gap: 2rem; flex-wrap: wrap; margin-bottom: 1rem; }
.bill-detail .meta-item { display: flex; flex-direction: column; }
.bill-detail .meta-label { font-size: 0.875rem; color: var(--pf-text-muted); margin-bottom: 0.25rem; }
.bill-detail .meta-value { font-size: 1rem; color: var(--pf-text); font-weight: 500; }
.bill-detail .bill-content { background-color: var(--pf-bg); padding: 2rem; border: 1px solid var(--pf-border); border-radius: 0.5rem; margin-bottom: 2rem; }
.bill-detail .content-section { margin-bottom: 2rem; }
.bill-detail .content-section:last-child { margin-bottom: 0; }
.bill-detail .section-title { font-size: 1.25rem; font-weight: 600; color: var(--pf-text); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--pf-border); }
.bill-detail .section-content { line-height: 1.8; color: var(--pf-text-muted); }
.bill-detail .proposers-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.bill-detail .proposer-tag { background-color: var(--pf-surface-alt); padding: 0.25rem 0.75rem; border-radius: 0.25rem; font-size: 0.875rem; }
.bill-detail .action-buttons { display: flex; gap: 1rem; margin-top: 1.5rem; }
.bill-detail .follow-button, .bill-detail .unfollow-button { padding: 0.5rem 1.5rem; font-size: 1rem; border: none; border-radius: 0.25rem; cursor: pointer; transition: background-color 0.15s ease-in-out; }
.bill-detail .follow-button { background-color: #28a745; color: white; }
.bill-detail .follow-button:hover { background-color: #218838; }
.bill-detail .unfollow-button { background-color: var(--pf-text-muted); color: white; }
.bill-detail .unfollow-button:hover { background-color: #5a6268; }
.bill-detail .external-link { display: inline-flex; align-items: center; padding: 0.5rem 1.5rem; background-color: var(--pf-primary); color: white; text-decoration: none; border-radius: 0.25rem; transition: background-color 0.15s ease-in-out; }
.bill-detail .external-link:hover { background-color: #0056b3; }
.bill-detail .back-link { display: inline-block; margin-bottom: 1rem; color: var(--pf-primary); text-decoration: none; }
.bill-detail .back-link:hover { text-decoration: underline; }
.bill-detail .status-badge { display: inline-block; padding: 0.375rem 0.75rem; font-size: 0.875rem; font-weight: 500; border-radius: 0.25rem; background-color: #17a2b8; color: white; }
.pf-bill-empty-msg { text-align: center; color: var(--pf-text-muted); padding: 2rem 0; }

/* ========== 16. Bill detail (bills/bill_detail.html) – 타임라인, 스티키 액션 바 ========== */
.pf-bill-detail-content {
  padding-bottom: 80px;
}
.pf-bill-timeline {
  position: relative;
  padding: 0 0.5rem;
}
.pf-bill-timeline-step {
  position: relative;
}
.pf-bill-timeline-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pf-surface-alt);
  border: 2px solid var(--pf-border);
  transition: background 0.2s, border-color 0.2s;
}
.pf-bill-timeline-step.active .pf-bill-timeline-dot {
  background: var(--pf-primary);
  border-color: var(--pf-primary);
}
.pf-bill-timeline-step small {
  font-size: 0.7rem;
  color: var(--pf-text-muted);
}
.pf-bill-timeline-step.active small {
  color: var(--pf-text);
  font-weight: 500;
}
.pf-bill-summary-preview {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--pf-text-muted);
}
.pf-bill-detail-action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--pf-bottom-nav-height, 72px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--pf-bg);
  border-top: 1px solid var(--pf-border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  z-index: 900;
  padding: 0.75rem 0;
  transition: bottom 0.3s ease;
}
body.pf-nav-is-hidden .pf-bill-detail-action-bar {
  bottom: 0;
}
.pf-bill-detail-action-bar .container {
  max-width: 100%;
}

/* ========== 17. 명함집 (cards/list) – 리멤버 스타일 ========== */
.bc-header {
  margin-bottom: var(--pf-space-16);
}
.bc-header-title {
  font-size: var(--pf-font-page-title);
  font-weight: 700;
  color: var(--pf-text);
  margin: 0 0 4px 0;
}
.bc-header-count {
  font-size: var(--pf-font-caption-lg);
  color: var(--pf-text-muted);
}

.bc-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: var(--pf-space-24);
}
.bc-filter-chip {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pf-text-muted);
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.bc-filter-chip:hover {
  color: var(--pf-text);
  border-color: var(--pf-text-muted);
  text-decoration: none;
}
.bc-filter-chip.active {
  background: var(--pf-primary);
  color: #fff;
  border-color: var(--pf-primary);
}

.bc-date-group {
  margin-bottom: var(--pf-space-24);
}
.bc-date-label {
  font-size: var(--pf-font-caption);
  font-weight: 600;
  color: var(--pf-text-muted);
  padding: 0 0 8px 2px;
}

.bc-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.bc-edit-btn {
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pf-primary);
  background: transparent;
  border: 1px solid var(--pf-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.bc-edit-btn:hover {
  background: var(--pf-primary);
  color: #fff;
}

.bc-card-row {
  display: flex;
  align-items: center;
}
.bc-card-row .bc-card {
  flex: 1;
  min-width: 0;
}

.bc-checkbox-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  cursor: pointer;
}
.bc-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--pf-primary);
  cursor: pointer;
}

.bc-delete-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--pf-bottom-nav-height, 56px);
  padding: 12px var(--pf-space-16);
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--pf-surface);
  border-top: 1px solid var(--pf-border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bc-delete-bar span {
  font-size: 15px;
  font-weight: 600;
  color: var(--pf-text);
}
.bc-delete-btn {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--pf-destructive, #dc3545);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.bc-delete-btn:hover {
  opacity: 0.85;
}

.bc-card-list {
  display: flex;
  flex-direction: column;
}

.bc-card {
  display: flex;
  align-items: center;
  gap: var(--pf-space-12);
  padding: 14px 4px;
  border-bottom: 1px solid var(--pf-border);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}
.bc-card:first-child {
  border-top: 1px solid var(--pf-border);
}
.bc-card:hover {
  background: var(--pf-surface);
  text-decoration: none;
  color: inherit;
}
.bc-card:active {
  background: var(--pf-surface-alt);
}

.bc-card-body {
  flex: 1;
  min-width: 0;
}
.bc-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--pf-text);
  line-height: 1.3;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bc-card-title {
  font-size: 14px;
  color: var(--pf-text-muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bc-card-org {
  font-size: 14px;
  color: var(--pf-text-muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bc-card-phone {
  font-size: 13px;
  color: var(--pf-text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.bc-card-right {
  flex-shrink: 0;
}
.bc-card-thumb {
  width: 64px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--pf-border);
  background: var(--pf-surface);
}
.bc-card-thumb-placeholder {
  width: 64px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid var(--pf-border);
  background: var(--pf-surface);
  color: var(--pf-text-muted);
  font-size: 1.25rem;
}

.bc-thumb-preview {
  cursor: zoom-in;
}

.bc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}
.bc-modal-content {
  position: relative;
  z-index: 1;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bc-modal-img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  object-fit: contain;
}
.bc-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.bc-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.bc-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--pf-text-muted);
}
.bc-empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: var(--pf-space-12);
}
.bc-empty p {
  margin-bottom: var(--pf-space-16);
}

/* ========== 18. 명함 등록 (cards/new) – 촬영/앨범 선택 UI ========== */
.cn-screen {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
}

.cn-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
}
.cn-hero-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--pf-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--pf-primary);
  margin-bottom: var(--pf-space-16);
}
.cn-hero-title {
  font-size: var(--pf-font-page-title);
  font-weight: 700;
  color: var(--pf-text);
  margin: 0 0 8px 0;
}
.cn-hero-desc {
  font-size: 15px;
  color: var(--pf-text-muted);
  line-height: 1.6;
  margin: 0;
}

.cn-tips {
  margin: 0 var(--pf-space-16) var(--pf-space-16);
  padding: 14px 16px;
  background: var(--pf-warning-bg, #fff8e1);
  border: 1px solid var(--pf-warning-border, #ffe082);
  border-radius: 12px;
}
.cn-tips-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--pf-text);
  margin-bottom: 8px;
}
.cn-tips-title i {
  color: #f59e0b;
  margin-right: 4px;
}
.cn-tips-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--pf-text-muted);
  line-height: 1.7;
}

.cn-actions {
  display: flex;
  gap: 12px;
  padding: 0 var(--pf-space-16);
}
.cn-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 12px;
  border-radius: 16px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s;
}
.cn-action-btn:active {
  transform: scale(0.97);
}
.cn-action-btn i {
  font-size: 2rem;
}
.cn-action-primary {
  background: var(--pf-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 123, 255, 0.3);
}
.cn-action-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}
.cn-action-secondary {
  background: var(--pf-surface);
  color: var(--pf-text);
  border: 1px solid var(--pf-border);
}
.cn-action-secondary:hover {
  background: var(--pf-surface-alt);
}

.cn-hint {
  text-align: center;
  font-size: var(--pf-font-caption);
  color: var(--pf-text-muted);
  margin: var(--pf-space-16) 0 0 0;
  padding-bottom: var(--pf-space-24);
}

/* 미리보기 화면 */
#cn-preview {
  justify-content: center;
  align-items: center;
  padding: var(--pf-space-16);
  gap: var(--pf-space-24);
}
.cn-preview-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pf-space-16) 0;
}
.cn-preview-img {
  max-width: 100%;
  max-height: 50vh;
  border-radius: 12px;
  border: 1px solid var(--pf-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  object-fit: contain;
}
.cn-preview-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}
.cn-preview-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s;
}
.cn-preview-btn:active {
  transform: scale(0.97);
}
.cn-preview-retake {
  background: var(--pf-surface);
  color: var(--pf-text);
  border: 1px solid var(--pf-border);
}
.cn-preview-retake:hover {
  background: var(--pf-surface-alt);
}
.cn-preview-submit {
  background: var(--pf-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 123, 255, 0.3);
}
.cn-preview-submit:hover {
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* 로딩 화면 */
#cn-loading {
  justify-content: center;
  align-items: center;
}
.cn-loading-wrap {
  text-align: center;
  padding: 3rem 1rem;
}
.cn-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--pf-border);
  border-top-color: var(--pf-primary);
  border-radius: 50%;
  animation: cn-spin 0.8s linear infinite;
  margin: 0 auto var(--pf-space-24);
}
@keyframes cn-spin {
  to { transform: rotate(360deg); }
}
.cn-loading-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--pf-text);
  margin: 0 0 6px 0;
}
.cn-loading-sub {
  font-size: 14px;
  color: var(--pf-text-muted);
  margin: 0;
}
