/* カード */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* KPIグリッド */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
}

/* セクション見出し */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 12px;
}

.section-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

/* ボタン */
.btn-icon-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--accent-primary-dim);
  color: var(--accent-primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
  cursor: pointer;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 20px;
  background-color: var(--accent-primary);
  color: #0A0A0C;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-text {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.button-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* フォーム入力 */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.input-field {
  width: 100%;
  padding: 11px 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px; /* iOSの自動ズーム防止のため16pxに近いサイズを維持 */
}

.input-field:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* フィルターチップ */
.search-bar-wrapper {
  margin-bottom: 12px;
}

.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 8px;
}

.chip {
  padding: 6px 14px;
  border-radius: 20px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.chip.active {
  background-color: var(--accent-primary-dim);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* 分析メタバナー */
.meta-banner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 14px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.meta-label {
  font-size: 11px;
  color: var(--text-secondary);
}

.meta-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
}

.meta-divider {
  width: 1px;
  height: 32px;
  background-color: var(--border-subtle);
}

.chart-placeholder {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-input);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
}

/* スペックリスト */
.spec-list {
  list-style: none;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
}

.spec-list li:last-child {
  border-bottom: none;
}

.spec-list span {
  color: var(--text-secondary);
}

/* 空状態 */
.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-secondary);
}

/* モーダル（ボトムシート風） */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}

.modal.open {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
}

.modal-sheet {
  position: relative;
  z-index: 1;
  max-height: 90vh;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-bottom);
}

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

.modal-header h2 {
  font-size: 16px;
  font-weight: 600;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

