/* 見本の画面。色と部品は今の画面（src/Page.html）を簡略に移したもの。
   状態の色の意味：黄＝手が要る／緑＝動いている・済み／赤＝失敗／灰＝未確認。 */
:root {
  --bg: #EEF6F5;
  --bg-grad: linear-gradient(135deg, #E9F7F0 0%, #EAF3FC 55%, #F1EFFC 100%);
  --surface: #FFFFFF;
  --surface-2: #F5F8FB;
  --line: #E6EBF1;
  --ink: #152033;
  --ink-2: #536079;
  --accent: #0B7A53;
  --on-accent: #FFFFFF;
  --statusbar: #0B6B48;
  --shadow: 0 1px 2px rgba(28, 52, 84, .05), 0 12px 32px rgba(28, 52, 84, .08);
  --shadow-s: 0 1px 2px rgba(28, 52, 84, .06), 0 4px 12px rgba(28, 52, 84, .06);
  --ok: #0B6B48;         --ok-soft: #E1F5EC;
  --attention: #7A5200;  --attention-soft: #FCEFC4;
  --alert: #B42318;      --alert-soft: #FCE7E4;
  --unknown: #536079;    --unknown-soft: #ECEFF4;
  --neutral: #536079;    --neutral-soft: #EEF2F6;
  --bar: #3B6FE0;        --bar-soft: #E5EEFF;
  --font: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  --r: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1320;
    --bg-grad: linear-gradient(135deg, #0B1620 0%, #0D1526 55%, #13142A 100%);
    --surface: #172133;
    --surface-2: #1D293D;
    --line: #2A3750;
    --ink: #EAF0F8;
    --ink-2: #A7B4C8;
    --accent: #5FD3A4;
    --on-accent: #06281B;
    --statusbar: #0C1320;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .05);
    --shadow-s: 0 0 0 1px rgba(255, 255, 255, .06);
    --ok: #62D3A4;         --ok-soft: rgba(98, 211, 164, .15);
    --attention: #F3C94F;  --attention-soft: rgba(243, 201, 79, .16);
    --alert: #FF9C92;      --alert-soft: rgba(255, 122, 107, .17);
    --unknown: #A7B4C8;    --unknown-soft: rgba(167, 180, 200, .15);
    --neutral: #A7B4C8;    --neutral-soft: rgba(167, 180, 200, .13);
    --bar: #6E96F0;        --bar-soft: rgba(110, 150, 240, .2);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg) var(--bg-grad) fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.muted { color: var(--ink-2); }

/* 時刻・電波の帯の下（ホーム画面から開いた時だけ高さがつく） */
.statusbar {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  height: env(safe-area-inset-top, 0px);
  background: var(--statusbar);
}

.tone-ok { --t: var(--ok); --t-soft: var(--ok-soft); }
.tone-attention { --t: var(--attention); --t-soft: var(--attention-soft); }
.tone-alert { --t: var(--alert); --t-soft: var(--alert-soft); }
.tone-unknown { --t: var(--unknown); --t-soft: var(--unknown-soft); }
.tone-neutral { --t: var(--neutral); --t-soft: var(--neutral-soft); }

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: calc(env(safe-area-inset-top, 0px) + 20px);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 40px);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 18px;
}
main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.eyebrow { font-size: 14px; font-weight: 800; letter-spacing: .08em; color: var(--accent); }
.top h1 { font-size: 28px; font-weight: 800; line-height: 1.3; }
.top-side { display: flex; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 20px;
  border: 0; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-s); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 800; white-space: nowrap;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn-main { background: var(--accent); color: var(--on-accent); }
.btn:disabled { opacity: .6; cursor: progress; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.panel { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px 18px; min-width: 0; }
.panel-head { margin-bottom: 10px; }
.panel h2 { font-size: 19px; font-weight: 800; line-height: 1.4; }
.notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.notice-title { font-weight: 800; }
.notice-text { font-size: 15px; color: var(--ink-2); }

/* ログイン */
.login { max-width: 460px; display: flex; flex-direction: column; gap: 10px; }
.login .k { display: block; margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.login input {
  width: 100%; max-width: 240px; margin-top: 6px; padding: 10px 14px;
  border: 2px solid var(--line); border-radius: 14px; background: var(--surface-2); color: var(--ink);
  font: inherit; font-size: 28px; font-weight: 800; letter-spacing: .3em; font-variant-numeric: tabular-nums;
}
.login input:focus { border-color: var(--accent); outline: none; }
.msg { min-height: 1.6em; font-size: 15px; font-weight: 700; color: var(--ink-2); }
.msg.is-bad { color: var(--alert); }

/* 答え（今やることはあるか） */
.answer h2 { font-size: 24px; color: var(--t); }

/* タイル */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { padding: 16px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.tile-label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.tile-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; line-height: 1.25; }
.tile-value b { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile-value span { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.tile-note { margin-top: 6px; font-size: 13.5px; font-weight: 700; color: var(--t); }
.tone-neutral > .tile-note { font-weight: 500; }

/* やること */
.todo-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.todo-name { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.todo-text { font-size: 18px; font-weight: 800; }
.todo-none { font-size: 22px; font-weight: 800; color: var(--ok); }

/* 業務カード */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.card { padding: 18px; background: var(--surface-2); border-radius: 18px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.card-name { flex: 1 1 4em; font-size: 19px; font-weight: 800; }
.state { padding: 3px 11px; border-radius: 999px; background: var(--t-soft); color: var(--t); font-size: 13.5px; font-weight: 800; }
.state.tone-unknown { border: 1px dashed var(--t); }
.row { padding-top: 12px; }
.k { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.v { display: block; font-size: 16.5px; font-weight: 600; }
.v.is-blank { color: var(--ink-2); font-weight: 500; }
.meter { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.meter-track { flex: 1; height: 8px; border-radius: 999px; background: var(--bar-soft); overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 999px; background: var(--bar); }
.meter-num { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.notes { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.notes .tone-muted { opacity: .8; }
.notes .tone-alert { color: var(--alert); font-weight: 700; }
.foot { font-size: 13px; text-align: right; }

/* 端末の一覧 */
.device-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.device-name { font-weight: 800; }
.device-meta { font-size: 13.5px; color: var(--ink-2); }
.badge { margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 12.5px; font-weight: 800; }

@media (min-width: 760px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
