/* Smart Cross AT 会員の画面（デザイン案 AT\docs\SmartCross_AT_会員画面デザイン案.html の色と部品をもとに、実際の画面の大きさに合わせた） */
/* 明るい表示が初め（R5）。暗い表示と大きい文字は、設定の「見え方」で切り替える（この端末だけに覚える） */

* { box-sizing: border-box; }
html, body { margin: 0; }
.app { --bg: #F3F4F7; --card: #FFFFFF; --ink: #15181E; --sub: #596070; --line: #E3E6EC; --line2: #CDD2DC;
       --acc: #2A63D4; --onacc: #FFFFFF; --soft: #EAF0FC;
       --s1: #2a78d6; --neg: #e34948; --up: #1F65C2; --down: #C93636;
       --good: #0ca30c; --goodtx: #006300; --warn: #fab219; --crit: #d03b3b;
       --grid: #E6E8EC; --tipbg: #15181E; --tipfg: #FFFFFF; }
body.dark .app { --bg: #0F1114; --card: #1C1D21; --ink: #F0EFEC; --sub: #A8ADB7; --line: #2C2E33; --line2: #43464D;
       --acc: #5B8FF0; --onacc: #0B0F19; --soft: #1D2A44;
       --s1: #3987e5; --neg: #e66767; --up: #6AA6F0; --down: #EF7B7B;
       --good: #0ca30c; --goodtx: #3CC13C; --warn: #fab219; --crit: #e66767;
       --grid: #2C2E33; --tipbg: #F0EFEC; --tipfg: #15181E; }
body { background: #F3F4F7; }
body.dark { background: #0F1114; }
.app { min-height: 100vh; background: var(--bg); color: var(--ink); font-family: "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
       font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
body.bigtext .app { font-size: 18px; }
.noscript { padding: 24px; font: 16px/1.6 "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif; }
button { font: inherit; color: inherit; }
a { color: var(--acc); }
a.li, a.row, a.cd, a.btn { color: inherit; text-decoration: none; }
a.btn { color: var(--onacc); }
a.btn.gh { color: var(--ink); }

/* 枠組み: スマホは上の見出しと下のタブ、広い画面は左のメニュー */
.hd { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 20px; min-height: 58px;
      background: var(--bg); padding-top: max(10px, env(safe-area-inset-top)); }
.hd h1 { margin: 0; font-size: 1.3em; line-height: 1.3; }
.hd .back { font-size: 1.3em; color: var(--acc); font-weight: 700; padding: 4px 8px 4px 0; background: none; border: 0; cursor: pointer; }
.hd .r { margin-left: auto; }
.main { max-width: 640px; margin: 0 auto; padding: 4px 16px 110px; display: flex; flex-direction: column; gap: 14px; }
.tb { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; height: calc(66px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
      display: flex; background: var(--card); border-top: 1px solid var(--line); }
.tb a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .75em; font-weight: 700;
        color: var(--sub); text-decoration: none; }
.tb svg, .nav svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tb a.on { color: var(--acc); }
.nav { display: none; }
@media (min-width: 1000px) {
  .tb { display: none; }
  .nav { display: flex; position: fixed; left: 0; top: 0; bottom: 0; width: 230px; flex-direction: column; gap: 4px; padding: 22px 14px;
         background: var(--card); border-right: 1px solid var(--line); }
  .nav .logo { margin: 0 10px 22px; }
  .nav a { display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 14px; border-radius: 12px; color: var(--sub); font-weight: 700; text-decoration: none; }
  .nav a.on { background: var(--soft); color: var(--acc); }
  .nav svg { width: 22px; height: 22px; }
  .withnav .hd, .withnav .main { margin-left: 230px; }
  .withnav .hd { padding-left: 32px; }
  .main { padding-bottom: 40px; }
  .main.grid { max-width: 1060px; display: grid; grid-template-columns: 360px 1fr; align-items: start; }
  .main.grid > .wide { grid-column: 2; grid-row: 1 / span 4; }
}
.plain .main { max-width: 440px; padding-top: 40px; }

/* 部品 */
.cd { background: var(--card); border-radius: 18px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
body.dark .cd { box-shadow: none; }
.cd.tap { position: relative; padding-right: 40px; cursor: pointer; text-align: left; width: 100%; border: 0; display: block; }
.cd.tap::after { content: "›"; position: absolute; right: 16px; top: 50%; transform: translateY(-55%); font-size: 1.6em; color: var(--sub); }
.lb { font-size: .875em; color: var(--sub); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.num { font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -.01em; }
.hero { font-size: 2.25em; line-height: 1.15; }
.hero small { font-size: .5em; }
.h2n { font-size: 1.5em; line-height: 1.2; }
.up { color: var(--up); } .down { color: var(--down); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .8125em; font-weight: 700; background: var(--soft); color: var(--acc); white-space: nowrap; }
.chip.real { background: rgba(208,59,59,.12); color: var(--crit); }
.chip.ok { background: rgba(12,163,12,.12); color: var(--goodtx); }
.chip.warn { background: rgba(250,178,25,.18); color: #8A5300; }
.stat { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.25em; }
.stat i { width: 12px; height: 12px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(12,163,12,.18); }
.stat.off i { background: var(--crit); box-shadow: 0 0 0 4px rgba(208,59,59,.18); }
.sw { flex: none; width: 64px; height: 38px; border-radius: 19px; background: var(--line2); position: relative; cursor: pointer; border: 0; padding: 0; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 4px; left: 4px; width: 30px; height: 30px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.sw.on { background: var(--good); }
.sw.on::after { left: 30px; }
.sw.sm { width: 52px; height: 32px; }
.sw.sm::after { width: 24px; height: 24px; }
.sw.sm.on::after { left: 24px; }
.sw:disabled { opacity: .45; cursor: not-allowed; }
.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; border-radius: 16px; border: 0; background: var(--acc); color: var(--onacc);
       font-weight: 800; font-size: 1.0625em; cursor: pointer; text-align: center; padding: 8px 16px; text-decoration: none; }
.btn.gh { background: transparent; border: 2px solid var(--line2); color: var(--ink); }
.btn.dn { background: var(--crit); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.lnk { background: none; border: 0; color: var(--acc); font-weight: 700; cursor: pointer; padding: 6px 0; text-decoration: underline; }
.bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 5px; background: var(--s1); }
.bar.neg i { background: var(--neg); }
.seg { display: flex; background: var(--line); border-radius: 12px; padding: 3px; }
.seg button { flex: 1; text-align: center; padding: 8px 0; border-radius: 10px; font-weight: 700; color: var(--sub); cursor: pointer; font-size: .9375em; border: 0; background: none; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.grp { font-size: .8125em; font-weight: 700; color: var(--sub); margin: 6px 4px -6px; }
.list { background: var(--card); border-radius: 18px; overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 18px; border: 0; border-bottom: 1px solid var(--line); width: 100%;
      background: none; text-align: left; cursor: pointer; }
.li:last-child { border-bottom: 0; }
.li .m { flex: 1; min-width: 0; }
.li .v { color: var(--sub); text-align: right; }
.li .go { color: var(--sub); font-size: 1.4em; line-height: 1; }
.li.static { cursor: default; }
.ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--soft); color: var(--acc); }
.ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.w { background: rgba(250,178,25,.18); color: #A86F00; }
.tr { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 18px; border: 0; border-bottom: 1px solid var(--line); width: 100%; background: none;
      text-align: left; cursor: pointer; }
.tr:last-child { border-bottom: 0; }
.tr .m { flex: 1; min-width: 0; }
.tr .m b { display: block; }
.tr .v { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.tr .v small { display: block; font-size: .75em; font-weight: 700; }
.tr.skip .m b, .tr.skip .v { color: var(--sub); }
.tr .why { display: block; font-size: .8125em; color: var(--sub); }
.dir { display: inline-block; font-size: .75em; font-weight: 700; padding: 0 7px; border-radius: 6px; border: 1.5px solid var(--line2); color: var(--sub); margin-left: 4px; vertical-align: 1px; }
.step { display: flex; align-items: center; border: 2px solid var(--line2); border-radius: 14px; overflow: hidden; }
.step button { width: 56px; text-align: center; font-weight: 800; font-size: 1.4em; color: var(--acc); padding: 6px 0; cursor: pointer; user-select: none; border: 0; background: none; }
.step b { flex: 1; text-align: center; font-variant-numeric: tabular-nums; font-size: 1.125em; border-left: 2px solid var(--line2); border-right: 2px solid var(--line2); padding: 9px 0; }
.inp { display: block; width: 100%; border: 2px solid var(--line2); border-radius: 14px; padding: 14px 16px; background: var(--card); color: var(--ink); font-size: 1.0625em; }
.inp:focus { outline: 3px solid var(--soft); border-color: var(--acc); }
.inp.bad { border-color: var(--crit); }
.inp.code { font-size: 1.6em; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
label.f { display: block; }
label.f > span { display: block; font-size: .875em; color: var(--sub); margin-bottom: 6px; }
.chk { display: flex; gap: 12px; align-items: center; }
.chk::before { content: "✓"; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--good); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.chk.todo::before { content: attr(data-n); background: var(--acc); }
.chk.wait::before { content: attr(data-n); background: var(--line2); }
.agree { display: flex; gap: 12px; align-items: center; font-size: .9375em; cursor: pointer; }
.agree input { width: 26px; height: 26px; accent-color: var(--acc); flex: none; }
.center { text-align: center; }
.muted { color: var(--sub); }
.logo { font-weight: 900; letter-spacing: .06em; font-size: .9375em; }
.logo em { font-style: normal; color: var(--acc); }
.logo.big { font-size: 1.6em; }
.note { font-size: .8125em; color: var(--sub); line-height: 1.6; }
.big-ic { width: 84px; height: 84px; border-radius: 50%; margin: 10px auto 4px; display: flex; align-items: center; justify-content: center; background: var(--soft); color: var(--acc); }
.big-ic.r { background: rgba(208,59,59,.12); color: var(--crit); }
.big-ic svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.big-t { font-size: 1.375em; font-weight: 800; }
input[type=range] { width: 100%; height: 34px; accent-color: var(--acc); }
.sk { background: var(--line); border-radius: 8px; animation: skp 1.4s ease-in-out infinite; }
@keyframes skp { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.bn { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(250,178,25,.18); font-size: .875em; line-height: 1.55; }
.bn.info { background: var(--soft); }
.err { color: var(--crit); font-size: .875em; font-weight: 700; margin-top: 6px; line-height: 1.55; }
.ok-t { color: var(--goodtx); font-size: .875em; font-weight: 700; margin-top: 6px; }
.kv3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.kv3 > div { background: var(--bg); border-radius: 12px; padding: 8px 10px; }
.kv3 b { display: block; font-size: 1.125em; font-variant-numeric: tabular-nums; }
.badk { box-shadow: 0 0 0 2px var(--crit) inset; }
.terms h2 { font-size: 1.1em; margin: 18px 0 6px; }
.terms ol, .terms ul { padding-left: 22px; margin: 6px 0; }
.terms li { margin: 4px 0; }
.sep { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.gap6 > * + * { margin-top: 6px; }
.envbar { background: #8A5300; color: #fff; font-size: 12px; font-weight: 700; text-align: center; padding: 2px 8px; }

/* 確かめる小窓 */
.dlg-bg { position: fixed; inset: 0; z-index: 20; background: rgba(10,14,22,.45); display: flex; align-items: flex-end; justify-content: center; }
.dlg { width: 100%; max-width: 520px; background: var(--card); color: var(--ink); border-radius: 22px 22px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
       display: flex; flex-direction: column; gap: 12px; }
.dlg h2 { margin: 0; font-size: 1.25em; }
@media (min-width: 700px) { .dlg-bg { align-items: center; } .dlg { border-radius: 22px; } }

/* グラフ */
.chart { position: relative; margin-top: 8px; touch-action: pan-y; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .ln { fill: none; stroke: var(--s1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ar { fill: var(--s1); opacity: .10; }
.chart .zero { stroke: var(--line2); stroke-width: 1; }
.chart .ax { fill: var(--sub); font-size: 11px; font-family: "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif; }
.chart .pos { fill: var(--s1); } .chart .neg { fill: var(--neg); }
.chart .dot { fill: var(--s1); stroke: var(--card); stroke-width: 2; }
.chart .guide { stroke: var(--sub); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dim { opacity: .35; }
.chart .hide { display: none; }
.tip { position: absolute; top: 0; pointer-events: none; background: var(--tipbg); color: var(--tipfg); border-radius: 10px; padding: 6px 10px; font-size: 13px;
       line-height: 1.4; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -6px; display: none; z-index: 2; }
.tip.show { display: block; }
.tip b { font-variant-numeric: tabular-nums; display: block; }
