/* スマホ版 I-Hub。色はパソコン版と同じトークン。閉じた Fold は 1 列、開くと 2 列 */
:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #f3f3f1;
  --line: #e6e6e2;
  --fg: #1d1f23;
  --fg-2: #555b63;
  --fg-3: #8d939b;
  --ok: #22a35a;
  --warn: #c98a04;
  --danger: #d92d3a;
  --link: #2563eb;
  --primary: #1d1f23;
  --on-primary: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a20;
    --surface-2: #1d2128;
    --line: #2a2f38;
    --fg: #e8eaee;
    --fg-2: #aab1bc;
    --fg-3: #7a828e;
    --ok: #3ccf7c;
    --warn: #f0b429;
    --danger: #f26b75;
    --link: #7aa7ff;
    --primary: #e8eaee;
    --on-primary: #111318;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

header#top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) max(14px, env(safe-area-inset-right, 0px)) 8px max(14px, env(safe-area-inset-left, 0px));
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.pc { margin-left: auto; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); }
.pc.on { color: var(--ok); }
.pc.off { color: var(--fg-3); }
.icon-btn { font-size: 18px; padding: 2px 8px; color: var(--fg-2); }

main#app {
  padding: 12px max(14px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 84px) max(14px, env(safe-area-inset-left, 0px));
  max-width: 1100px; margin: 0 auto;
}
nav#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface); border-top: 1px solid var(--line);
}
nav#tabs button { padding: 12px 0; font-size: 13px; color: var(--fg-3); font-weight: 600; }
nav#tabs button.on { color: var(--fg); }

/* 開いた Fold・タブレット: 左に一覧、右に詳しく */
.cols { display: grid; gap: 14px; }
@media (min-width: 700px) {
  .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
  .cols > .side { position: sticky; top: 64px; }
}

.banner { border-radius: 10px; padding: 10px 12px; font-size: 13px; background: var(--surface-2); color: var(--fg-2); margin-bottom: 12px; }
.banner.warn { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--fg); }
.section { margin: 14px 0 6px; font-size: 12px; font-weight: 700; color: var(--fg-3); letter-spacing: 0.04em; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.task { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; }
.task .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.task .t { font-weight: 650; line-height: 1.4; }
.task .m { font-size: 12px; color: var(--fg-3); display: flex; gap: 8px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 0 7px; border-radius: 999px; line-height: 19px; white-space: nowrap; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn { border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px; font-size: 13.5px; font-weight: 600; background: var(--surface); }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.btn:disabled { opacity: 0.45; }
.field { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
textarea.field { min-height: 96px; resize: vertical; }
.kinds { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.kinds button { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; background: var(--surface); }
.kinds button.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.hint { font-size: 12px; color: var(--fg-3); margin: 6px 0; }
.empty { color: var(--fg-3); text-align: center; padding: 28px 0; font-size: 13.5px; }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 70px); transform: translateX(-50%); background: var(--primary); color: var(--on-primary); padding: 8px 14px; border-radius: 999px; font-size: 13px; z-index: 10; max-width: 90vw; }
.item { display: flex; gap: 10px; align-items: center; }
.item img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #fff; flex: none; }
.weather { display: flex; gap: 12px; align-items: center; }
.weather .temp { font-size: 22px; font-weight: 800; }

/* Markdown（メモ・結果・秘書の返事） */
.md { font-size: 14.5px; line-height: 1.8; overflow-wrap: anywhere; }
.md h1 { font-size: 1.3em; margin: 0.4em 0 0.6em; }
.md h2 { font-size: 1.12em; margin: 1.2em 0 0.4em; padding-bottom: 0.2em; border-bottom: 1px solid var(--line); }
.md h3 { font-size: 1.02em; margin: 1em 0 0.3em; }
.md p, .md ul, .md ol { margin: 0.5em 0; }
.md ul, .md ol { padding-left: 1.3em; }
.md a { color: var(--link); }
.md img { max-width: 100%; border-radius: 8px; }
.md pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-x: auto; font-size: 12.5px; }
.md code { background: var(--surface-2); border-radius: 4px; padding: 0 4px; font-size: 0.9em; }
.md pre code { background: none; padding: 0; }
.md table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 0.92em; }
.md th, .md td { border: 1px solid var(--line); padding: 5px 8px; vertical-align: top; }
.md th { background: var(--surface-2); }
.md blockquote { margin: 0.6em 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--fg-2); }
