:root {
  color-scheme: light;
  --bg: #f4f4f5;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #667085;
  --border: #d7d7da;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --accent: #262626;
  --shadow: 0 2px 10px rgba(15, 23, 42, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Noto Sans", "Noto Sans SC", sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--accent);
  color: #fff;
  padding: calc(16px + env(safe-area-inset-top)) 16px 14px;
  box-shadow: var(--shadow);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-logo {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
}

.header-copy {
  min-width: 0;
}

.app-header h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.app-header h1 span,
.disclaimer h2 span {
  display: block;
}

.meta {
  display: grid;
  gap: 2px;
  margin: 8px 0 0;
  color: #d4d4d8;
  font-size: 13px;
}

.app-main {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 14px 12px 32px;
}

.search-panel,
.fault-card,
.disclaimer,
.empty-state {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-panel {
  padding: 12px;
}

.field-label,
.filters span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.search-input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #bfc3c9;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.search-input {
  padding: 10px 12px;
}

.search-input::placeholder {
  color: #767b84;
  opacity: 1;
  white-space: pre-line;
}

select {
  padding: 9px 10px;
}

.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.result-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  padding: 12px 2px 8px;
  color: var(--muted);
  font-size: 15px;
}

.result-summary strong {
  color: var(--text);
  font-size: 22px;
}

.visible-count {
  flex: 0 0 auto;
  font-size: 13px;
  text-align: right;
}

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

.fault-card {
  overflow: hidden;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.brand-series {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.fault-type {
  flex: 0 0 auto;
  align-self: start;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.fault-code {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
}

.fault-name {
  padding: 12px;
}

.fault-name p {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.fault-name p + p {
  margin-top: 2px;
}

.info-block {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.info-block.risk {
  background: var(--danger-bg);
  color: var(--danger);
}

.info-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
}

.info-title span,
.info-text span {
  display: block;
}

.info-text {
  margin: 0;
}

.note {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
}

.empty-state p {
  margin: 0;
}

.empty-state p + p {
  margin-top: 4px;
}

.show-more {
  display: grid;
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.show-more[hidden] {
  display: none;
}

.show-more span {
  display: block;
}

.disclaimer {
  margin-top: 18px;
  padding: 14px;
}

.disclaimer h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.disclaimer p {
  margin: 0;
  color: var(--muted);
}

.disclaimer p + p {
  margin-top: 6px;
}

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