/* ========================================
   기업 검색 – Apple 디자인 시스템
   모바일 특화, 다크모드 지원
   ======================================== */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-secondary: #f2f2f7;
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --text-tertiary: #aeaeb2;
  --accent: #007aff;
  --accent-light: rgba(0, 122, 255, 0.1);
  --border: rgba(0, 0, 0, 0.06);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-secondary: #2c2c2e;
    --text-primary: #f5f5f7;
    --text-secondary: #98989d;
    --text-tertiary: #636366;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.4);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
    system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* ── 뷰 전환 ── */
.view {
  display: none;
  min-height: 100dvh;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}
.view.active {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
}

#result-view.active {
  height: 100dvh;
  overflow: hidden;
}

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

/* ========================================
   검색 화면
   ======================================== */
#search-view {
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.search-container {
  width: 100%;
  max-width: 420px;
}

.logo {
  text-align: center;
  margin-bottom: 40px;
}

.logo-mark {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 16px;
  position: relative;
}

.logo-biz {
  display: inline-block;
  background: #1a1a1a;
  color: #fff;
  font-size: 36px;
  font-weight: 800;
  padding: 10px 4px 10px 16px;
  border-radius: 14px 0 0 14px;
  letter-spacing: -1px;
  line-height: 1;
}

.logo-eye {
  display: inline-block;
  background: #007aff;
  color: #fff;
  font-size: 36px;
  font-weight: 800;
  padding: 10px 16px 10px 4px;
  border-radius: 0 14px 14px 0;
  letter-spacing: -1px;
  line-height: 1;
}

.beta-badge {
  position: absolute;
  top: -6px;
  right: -36px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #ff9500;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.logo-subtitle {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 12px;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
  font-style: italic;
}

.logo .subtitle {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-secondary);
}

.search-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  pointer-events: none;
}

#search-input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 44px;
  border: none;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 17px;
  color: var(--text-primary);
  outline: none;
  transition: box-shadow 0.2s;
}

#search-input::placeholder {
  color: var(--text-tertiary);
}

#search-input:focus {
  box-shadow: 0 0 0 3px var(--accent-light), var(--shadow);
}

#search-input.shake {
  animation: shake 0.4s ease;
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.3), var(--shadow);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ── 검색 기록 ── */
.search-history {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  justify-content: center;
}

.history-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  border: none;
  white-space: nowrap;
}

.history-chip:active {
  transform: scale(0.96);
  background: var(--surface-secondary);
}

.history-chip .chip-biz {
  font-size: 11px;
  color: var(--text-tertiary);
}

.history-chip .chip-remove {
  margin-left: 2px;
  font-size: 14px;
  color: var(--text-tertiary);
  line-height: 1;
}

.history-chip .chip-remove:hover {
  color: var(--text-primary);
}

#search-btn {
  height: 52px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

#search-btn:active {
  opacity: 0.85;
  transform: scale(0.98);
}

/* ========================================
   로딩 화면
   ======================================== */
#loading-view {
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.loading-container {
  text-align: center;
  width: 100%;
  max-width: 320px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-spinner.done {
  animation: none;
  border: none;
  background: #34c759;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.loading-spinner.done svg {
  width: 28px;
  height: 28px;
}

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.progress-wrap {
  margin-bottom: 32px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--surface-secondary);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #007aff, #5856d6);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
  font-size: 17px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.progress-percent {
  font-size: 14px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.cancel-btn {
  padding: 10px 28px;
  border: none;
  border-radius: 20px;
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s;
}

.cancel-btn:active {
  background: var(--border);
}

/* ========================================
   결과 화면
   ======================================== */
.result-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  padding-top: calc(12px + var(--safe-top));
  background: rgba(245, 245, 247, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  .result-header {
    background: rgba(0, 0, 0, 0.85);
  }
}

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--surface-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

.back-btn svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.header-info {
  flex: 1;
  min-width: 0;
}

.header-info h2 {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-info p {
  font-size: 12px;
  color: var(--text-primary);
  margin-top: 2px;
  line-height: 1.4;
}

.refresh-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--surface-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

.refresh-btn svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.refresh-btn:active {
  opacity: 0.7;
}

.cache-info {
  margin-left: auto;
  flex-shrink: 1;
  min-width: 0;
}

.cache-text {
  font-size: 11px;
  color: var(--text-primary);
  white-space: nowrap;
}

/* ── 탭 바 ── */
.tab-bar {
  display: flex;
  position: sticky;
  top: calc(60px + var(--safe-top));
  z-index: 9;
  background: var(--bg);
  padding: 0 16px;
  gap: 4px;
  border-bottom: 0.5px solid var(--border);
}

.tab {
  flex: 1;
  padding: 12px 0;
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.tab.active {
  color: var(--accent);
  font-weight: 600;
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -0.5px;
  left: 20%;
  right: 20%;
  height: 2.5px;
  border-radius: 2px;
  background: var(--accent);
}

/* ── 탭 콘텐츠 ── */
.tab-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
}

.tab-panel {
  display: none;
  animation: fadeIn 0.25s ease;
}

.tab-panel.active {
  display: block;
}

/* ── 카드 ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--surface-secondary);
  border-bottom: 2px solid var(--accent);
  border-radius: var(--radius) var(--radius) 0 0;
  letter-spacing: -0.2px;
}

.card-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.card-title .unit {
  margin-left: auto;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-primary);
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 16px;
  border-top: 0.5px solid var(--border);
  gap: 12px;
}

.card-row:first-child {
  border-top: none;
}

.card-label {
  font-size: 14px;
  color: var(--text-primary);
  flex-shrink: 0;
  max-width: 40%;
}

.card-value {
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  word-break: break-all;
  flex: 1;
}

.card-value .link-value {
  color: inherit;
  text-decoration: none;
}

.card-value .link-value:active {
  opacity: 0.6;
}

.card-value .link-tel {
  color: inherit;
  text-decoration: none;
  font-size: 13px;
}

.card-value .link-tel:active {
  opacity: 0.6;
}

.card-value .text-muted {
  color: var(--text-primary);
  font-size: 13px;
}

/* ── 등급 배지 ── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.badge-blue {
  background: var(--accent-light);
  color: var(--accent);
}

.badge-green {
  background: rgba(52, 199, 89, 0.12);
  color: #34c759;
}

.badge-orange {
  background: rgba(255, 149, 0, 0.12);
  color: #ff9500;
}

.badge-red {
  background: rgba(255, 59, 48, 0.12);
  color: #ff3b30;
}

/* ── 재무 테이블 ── */
.finance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}

.finance-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  border-bottom: 0.5px solid var(--border);
  background: var(--surface);
}

.finance-table th:first-child {
  width: 40%;
}

.finance-table th:not(:first-child) {
  width: 20%;
  text-align: right;
}

.finance-table td {
  padding: 10px 12px;
  border-bottom: 0.5px solid var(--border);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.finance-table td:first-child {
  text-align: left;
}

.finance-table tr:last-child td {
  border-bottom: none;
}

.finance-table .row-label {
  color: var(--text-primary);
  font-size: 14px;
  word-break: keep-all;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-table .num {
  text-align: right !important;
  font-weight: 500;
  white-space: nowrap;
}

.finance-table .num.negative {
  color: #ff3b30;
}

/* ── 대표자 카드 ── */
.ceo-card {
  padding: 20px 16px;
}

.ceo-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.ceo-position {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.ceo-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 0.5px solid var(--border);
}

.ceo-detail-label {
  font-size: 14px;
  color: var(--text-primary);
}

.ceo-detail-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ========================================
   에러 화면
   ======================================== */
#error-view {
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.error-container {
  text-align: center;
}

.error-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(255, 59, 48, 0.12);
  color: #ff3b30;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

#error-message {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.retry-btn {
  padding: 12px 32px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.retry-btn:active {
  opacity: 0.85;
}

/* ── 등급 카드 그리드 ── */
.rating-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

.rating-grid > .rating-card:first-child {
  grid-column: 1 / -1;
}

.rating-card {
  padding: 16px;
  background: var(--surface);
}

.rating-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.rating-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.rating-card:not(:first-child) .rating-value {
  font-size: 22px;
}

.rating-score {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

.rating-desc {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 6px;
}

.rating-date {
  font-size: 11px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* ── 등급 스케일 바 ── */
.scale-bar {
  display: flex;
  gap: 2px;
  margin: 10px 0;
  border-radius: 6px;
  overflow: hidden;
}

.scale-item {
  flex: 1;
  padding: 5px 2px;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  background: var(--surface-secondary);
  color: var(--text-primary);
  transition: transform 0.2s;
}

.scale-item.active {
  transform: scaleY(1.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  z-index: 1;
  border-radius: 4px;
}

.scale-label {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-blue-text { color: #007aff; }
.badge-green-text, .green-text { color: #34c759; }
.badge-orange-text, .orange-text { color: #ff9500; }
.badge-red-text { color: #ff3b30; }
.teal-text { color: #5ac8fa; }

@media (prefers-color-scheme: dark) {
  .badge-blue-text { color: #409cff; }
  .teal-text { color: #70d7ff; }
}

/* ── 기업 선택 모달 ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-sheet {
  width: 100%;
  max-width: 500px;
  max-height: 85dvh;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--surface-secondary);
  font-size: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--safe-bottom);
}

.select-item {
  padding: 14px 20px;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.select-item:active {
  background: var(--surface-secondary);
}

.select-item-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.select-item-meta {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.select-item-biz {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.select-status {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-left: 6px;
  vertical-align: middle;
}

/* ── 뉴스 카드 ── */
/* ── 뉴스 테이블 ── */
.news-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.news-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 13px;
  border-bottom: 2px solid var(--accent);
  background: var(--surface);
  white-space: nowrap;
}

.news-table td {
  padding: 12px;
  border-bottom: 0.5px solid var(--border);
  color: var(--text-primary);
  vertical-align: top;
}

.news-table tbody tr:hover {
  background: var(--surface-secondary);
}

.news-table tr.new-row {
  background: rgba(255, 59, 48, 0.04);
}

.news-table tr.new-row .news-date-cell::after {
  content: 'NEW';
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: #ff3b30;
  border-radius: 3px;
  padding: 1px 4px;
  margin-left: 4px;
  vertical-align: middle;
}

.news-date-cell {
  white-space: nowrap;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  min-width: 90px;
}

.news-title-cell {
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
}

.news-desc-cell {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  opacity: 0.7;
}

.news-source-cell {
  white-space: nowrap;
  font-weight: 600;
  font-size: 12px;
}

.news-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 4px 6px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.news-refresh-btn:active {
  background: var(--border);
}

.news-refresh-btn svg {
  color: var(--text-primary);
}

.news-loading {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-primary);
  font-size: 14px;
}

/* ── 공모사업 테이블 ── */
.support-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.support-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 13px;
  border-bottom: 2px solid var(--accent);
  background: var(--surface);
  white-space: nowrap;
}

.support-table td {
  padding: 12px;
  border-bottom: 0.5px solid var(--border);
  color: var(--text-primary);
  vertical-align: top;
}

.support-table tbody tr:hover {
  background: var(--surface-secondary);
}

/* ── 분야 필터 칩 ── */
.support-search-input {
  flex: 1;
  min-width: 200px;
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
}

.support-search-input:focus {
  border-color: var(--accent);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.field-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.urgent-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #ff3b30;
  margin-left: 4px;
}

.support-field-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
}


.support-title-cell {
  font-weight: 600;
  line-height: 1.4;
  max-width: 400px;
}

/* ── 페이저 ── */
.pager {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.page-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.page-btn.disabled {
  opacity: 0.3;
  cursor: default;
}

.page-btn:not(.disabled):not(.active):hover {
  background: var(--surface-secondary);
}

.support-period-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 12px;
}

/* ── AI 요약 ── */
.ai-content {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
}

.ai-content p {
  margin-bottom: 6px;
}

.ai-section {
  font-size: 14px;
  font-weight: 700;
  margin: 14px 0 4px;
}

.ai-content ul {
  margin: 6px 0;
  padding-left: 20px;
}

.ai-content li {
  margin-bottom: 4px;
}

.share-btn {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.share-btn:active {
  background: var(--surface-secondary);
}

/* ── 토스트 ── */
.toast {
  position: fixed;
  bottom: calc(40px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 12px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  max-width: 90%;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .toast {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
  }
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── 빈 상태 ── */
.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-tertiary);
  font-size: 15px;
}
