:root {
  --bg: #0b1020;
  --card: #151b2e;
  --card-border: #232b45;
  --text: #e6e9f2;
  --text-dim: #8b93ab;
  --green: #2ecc71;
  --yellow: #f1c40f;
  --red: #e74c3c;
  --gray: #4a5570;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "Noto Sans TC", sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 16px; /* 手機邊距縮小 */
  line-height: 1.4;
}

.header {
  display: flex;
  flex-direction: column; /* 手機上改為上下排列 */
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
}

.header h1 {
  margin: 0;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo {
  height: 28px;
  width: auto;
}

.header .meta {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header .version {
  font-size: 11px;
  padding: 2px 6px;
  background: var(--card-border);
  border-radius: 4px;
  font-family: monospace;
  align-self: flex-start;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* 手機上兩欄 */
  gap: 10px;
  margin-bottom: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 120px;
}

.card .label {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card .value {
  font-size: 22px;
  font-weight: 600;
}

.card .value.unavailable {
  font-size: 14px;
  color: var(--text-dim);
  font-style: italic;
  font-weight: 400;
}

.card .status {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card .footer {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: auto;
  border-top: 1px solid var(--card-border);
  padding-top: 6px;
}

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

.dot.green { background: var(--green); }
.dot.yellow { background: var(--yellow); }
.dot.red { background: var(--red); }
.dot.gray { background: var(--gray); }

/* 對照表：手機上允許橫向滾動，不換行 */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  white-space: nowrap;
}

table caption {
  text-align: left;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  background: var(--card);
  border-bottom: 1px solid var(--card-border);
}

th, td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
}

th {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
}

td.na { color: var(--text-dim); font-style: italic; }

.note {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
}