/* ヒマラボ 共通デザインシステム(DESIGN.md参照)
   文字が主役。アイコン・絵文字・影は使わない。差し色はアプリ側で --accent を上書き。 */
:root {
  --bg: #f6f5f2;
  --ink: #20211f;
  --sub: #6b6d66;
  --line: #dcdad3;
  --soft: #edece7;
  --card: #ffffff;
  --accent: #20211f;
  --accent-text: #ffffff;
  --good: #237a4b;
  --bad: #bb3a3a;
}
* { box-sizing: border-box; }
button, .btn, .chip, input[type=range] { touch-action: manipulation; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.6;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.wrap { max-width: 480px; margin: 0 auto; padding: 14px 16px 48px; }
.topbar { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0 14px; }
.topbar .appname { font-size: 18px; font-weight: 800; color: var(--ink); text-decoration: none; }
.topbar .brand { font-size: 13px; color: var(--sub); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
h1 { font-size: 24px; font-weight: 800; margin: 0 0 4px; line-height: 1.35; }
h2 { font-size: 17px; font-weight: 800; margin: 0 0 10px; }
.lead { color: var(--sub); font-size: 14px; margin: 0 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 16px; margin: 0 0 14px; }
.btn {
  display: block; width: 100%; min-height: 50px; padding: 12px 16px;
  border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-text);
  font-size: 17px; font-weight: 700; font-family: inherit; cursor: pointer;
  text-align: center; text-decoration: none; line-height: 1.5;
}
.btn:active { opacity: .85; }
.btn:disabled { opacity: .4; }
.btn.sub { background: var(--card); color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.btn + .btn { margin-top: 10px; }
input[type=text], input[type=tel], input[type=number], select, textarea {
  width: 100%; font-size: 16px; font-family: inherit; color: var(--ink);
  padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  -webkit-appearance: none; appearance: none;
}
input[type=range] { width: 100%; min-height: 44px; }
label { font-size: 13px; color: var(--sub); display: block; margin: 0 0 6px; }
.field { margin: 0 0 14px; }
.num { font-variant-numeric: tabular-nums; }
.result-num { font-size: 52px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--accent); }
.result-unit { font-size: 18px; font-weight: 700; margin-left: 2px; }
.result-label { font-size: 13px; color: var(--sub); }
.rank { font-size: 22px; font-weight: 800; }
.note { font-size: 12px; color: var(--sub); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.bar { height: 14px; background: var(--soft); border-radius: 7px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.share-box { border: 1px dashed var(--line); border-radius: 10px; padding: 12px; font-size: 14px; white-space: pre-wrap; background: var(--soft); margin: 0 0 10px; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 9px 14px; border-radius: 22px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 15px; font-family: inherit; cursor: pointer;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 700; }
table.plain { width: 100%; border-collapse: collapse; font-size: 14px; }
table.plain td, table.plain th { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; }
table.plain td.r, table.plain th.r { text-align: right; font-variant-numeric: tabular-nums; }
.footer { margin-top: 28px; font-size: 12px; color: var(--sub); }
.footer a { color: var(--sub); }
