:root {
  --foreground: #111;
  --muted-foreground: #6b7280;
  --border: #e5e7eb;
  --muted: #f1f2f4;
  --card: #fff;
  --radius: 12px;
  --success: #15803d;
  --warning: #b45309;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--foreground);
  background: var(--card);
  font-size: 14px;
  line-height: 1.45;
}
.ph { max-width: 380px; margin: 0 auto; padding: 16px 16px 12px; }
.ph-top { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.ph-big { font-size: 40px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.ph-big .unit { font-size: 15px; font-weight: 400; letter-spacing: 0; }
.caption { font-size: 11px; color: var(--muted-foreground); }
.num { font-variant-numeric: tabular-nums; }
.bar { height: 4px; border-radius: 99px; background: var(--muted); margin: 8px 0 6px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--foreground); border-radius: 99px; transition: width .4s; }
.refresh { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 0; min-height: 44px; }
.sessionline { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-bottom: 12px; min-height: 32px; }
.sessionline[hidden] { display: none; }
.sessionline .linkbtn { min-height: 32px; }
.refresh #stand { white-space: nowrap; }
.linkbtn { border: 0; background: none; color: inherit; font: inherit; font-size: 13px; font-weight: 500; min-height: 44px; padding: 0 10px; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:disabled { opacity: .45; }
.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); padding: 4px 0; margin-bottom: 12px; }
.card h2 { font-size: 11px; font-weight: 500; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .04em; margin: 8px 16px 0; }
.btnpair { display: flex; gap: 8px; flex: 1; justify-content: flex-end; }
.btnpair .btn { flex: 1; max-width: 130px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border); min-height: 44px; }
.card > .row:first-of-type, .card > h2 + .row { border-top: 0; }
.row b { font-weight: 500; font-size: 13px; text-align: right; }
.dot::before { content: "● "; font-size: 9px; }
.dot.ok::before { color: var(--success); }
.dot.warn::before { color: var(--warning); }
.act { display: flex; gap: 8px; padding: 12px 16px 16px; }
.btn { flex: 1; min-height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--foreground); font: inherit; font-size: 13px; font-weight: 500; padding: 0 16px; }
.btn.primary { background: var(--foreground); color: #fff; border-color: var(--foreground); }
.btn.small { flex: 0 0 auto; min-height: 44px; min-width: 96px; }
.btn:disabled { opacity: .45; }
.btn.sent { border-color: var(--success); color: var(--success); }
input[type="range"] { width: calc(100% - 32px); margin: 4px 16px 8px; accent-color: var(--foreground); height: 44px; }
input[type="range"]:disabled { opacity: .4; }
.err { color: #b91c1c; font-size: 13px; }
.row.col { flex-direction: column; align-items: stretch; gap: 6px; }
.row.col label { font-size: 13px; color: var(--muted-foreground); }
.row.col input { font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--foreground); min-height: 44px; }
.row.col input:focus { outline: 2px solid var(--foreground); outline-offset: -1px; }
#loginErr { margin: 0 16px 12px; }
#k-foot { margin: 4px 16px 12px; }
@media (max-width: 360px) {
  .ph { padding: 16px 12px 12px; }
  .row { gap: 8px; padding: 10px 12px; }
  .btn.small { padding: 0 10px; }
}
@media (prefers-color-scheme: dark) {
  :root { --foreground: #f3f4f6; --muted-foreground: #9ca3af; --border: #26292f; --muted: #1c1e24; --card: #101216; }
  .btn.primary { background: #f3f4f6; color: #101216; border-color: #f3f4f6; }
}
