@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

:root {
  --brand-green: #4E5851;
  --brand-green-dark: #3B4A45;
  --brand-orange: #FF7800;
  --bg-page: #FAFBFC;
  --bg-card: #FFFFFF;
  --text-main: #1F2A28;
  --text-sub: #6B7A76;
  --border-line: #E5E8E7;
  --tag-bg: #FFF4DD;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Noto Sans TC', sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 20px 80px;
}

@media (min-width: 700px) {
  #app {
    max-width: 840px;
    padding: 0 32px 80px;
  }
}

.topbar {
  padding: 24px 0 8px;
}

.logo {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: rgba(46, 58, 53, 0.75);
}

.page-title {
  font-size: 26px;
  font-weight: 900;
  margin: 8px 0 8px;
}

.page-desc {
  color: var(--text-sub);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 28px;
}

.section {
  margin-bottom: 28px;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-green-dark);
  margin: 0 0 12px;
}

.bank-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.filter-chip {
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  color: var(--text-sub);
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 13px;
  font-weight: 700;
  border-radius: 20px;
  padding: 7px 14px;
  cursor: pointer;
}

.filter-chip.active {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: #FFFFFF;
}

.card-scroll-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 4px 10px;
  margin: 0 -4px;
  scroll-snap-type: x proximity;
}

@media (min-width: 700px) {
  .card-scroll-row {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

.card-tile {
  flex-shrink: 0;
  width: 168px;
  cursor: pointer;
}

.card-tile.hidden {
  display: none;
}

.card-visual {
  position: relative;
  width: 168px;
  height: 106px;
  border-radius: 14px;
  padding: 14px;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  scroll-snap-align: start;
}

.card-tile.selected .card-visual {
  outline: 3px solid var(--brand-orange);
  outline-offset: 2px;
}

.card-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.card-tile.selected .card-check {
  opacity: 1;
  background: var(--brand-orange);
}

.card-visual-bank {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.85;
}

.card-visual-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.card-note {
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.5;
  margin-top: 8px;
}

.selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.selected-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--tag-bg);
  color: var(--brand-green-dark);
  font-size: 13px;
  font-weight: 700;
  border-radius: 20px;
  padding: 6px 8px 6px 14px;
}

.selected-chip .remove-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: rgba(59, 74, 69, 0.15);
  color: var(--brand-green-dark);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.btn-primary {
  display: block;
  width: 100%;
  background: var(--brand-orange);
  color: #FFFFFF;
  border: none;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 700;
  padding: 14px;
  cursor: pointer;
  margin: 8px 0 32px;
}

.btn-primary:active { opacity: 0.9; }

.result-section table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
}

.result-section th {
  background: var(--bg-page);
  color: var(--brand-green-dark);
  font-weight: 700;
  text-align: left;
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-line);
}

.result-section td {
  padding: 10px 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-line);
}

.result-section tr:last-child td { border-bottom: none; }

.result-section td.num { text-align: right; font-family: 'Inter', sans-serif; font-weight: 700; }

.gap-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.gap-card {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 16px;
  padding: 14px 16px;
}

.gap-card .gap-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.gap-card .gap-title .badge {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--brand-green-dark);
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  padding: 2px 8px;
  margin-right: 8px;
}

.gap-card .gap-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
}

.no-gap {
  font-size: 14px;
  color: var(--text-sub);
  padding: 16px;
  text-align: center;
}

.disclaimer {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.7;
}
