:root {
  --orange: #F5A623; --orange-d: #C97A00; --bg: #F4F2EE; --card: #fff; --ink: #222; --sub: #707070; --line: #ECE9E3;
  --pos: #1B8A4B; --neg: #C62828; --warn-bg: #FFF4DC; --warn-line: #F5C568; --warn-ink: #7A5000;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { margin: 0; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font-family: system-ui, "Hiragino Sans", "Noto Sans JP", "Meiryo", sans-serif; font-size: 14px; line-height: 1.45; overscroll-behavior-y: contain; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.bar { flex: none; position: relative; background: var(--orange); color: #fff; font-weight: 700; font-size: 17px; text-align: center; padding: calc(12px + env(safe-area-inset-top)) 58px 11px; min-height: 48px; }
.re { position: absolute; right: 4px; bottom: 4px; background: transparent; border: 0; color: #fff; font-size: 12px; font-weight: 400; min-height: 38px; padding: 0 8px; white-space: nowrap; }
.re:disabled { opacity: .6; }
.back { position: absolute; left: 0; bottom: 0; width: 56px; height: 48px; background: transparent; border: 0; color: #fff; font-size: 30px; line-height: 1; }
.msg { flex: none; background: var(--warn-bg); border-bottom: 1px solid var(--warn-line); color: var(--warn-ink); padding: 8px 12px; font-size: 13px; }
.body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px; }
.body.flush { padding: 8px 0 0; }
.loading, .empty { text-align: center; color: var(--sub); padding: 36px 12px; }
.pad { padding: 0 8px; }

.tabs { flex: none; display: flex; background: #fff; border-top: 1px solid #ddd; padding-bottom: env(safe-area-inset-bottom); }
.tabs button, .tabs a { flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: transparent; border: 0; color: #888; font-size: 11px; text-decoration: none; }
.tabs svg { width: 23px; height: 23px; fill: currentColor; }
.tabs .on { color: var(--orange-d); font-weight: 700; }

.card { background: var(--card); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; }
.h { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: #A86A00; font-weight: 700; margin-bottom: 6px; }
.h span { color: var(--sub); font-weight: 400; }
.three { display: flex; }
.three > div { flex: 1 1 0; min-width: 0; font-size: 11px; color: var(--sub); border-right: 1px solid var(--line); padding-left: 8px; }
.three > div:first-child { padding-left: 0; }
.three > div:last-child { border-right: 0; }
.three b { display: block; font-size: 21px; line-height: 1.25; color: var(--ink); word-break: break-all; }
.three.m b { font-size: 17px; }
.three b small { font-size: 11px; font-weight: 400; }
.yest { font-size: 12px; color: var(--sub); border-top: 1px solid var(--line); margin-top: 7px; padding-top: 6px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.yest b { color: var(--ink); }
b.pos, .pos { color: var(--pos); }
b.neg, .neg { color: var(--neg); }
.big { font-size: 25px; font-weight: 700; line-height: 1.2; }
.big small { font-size: 13px; font-weight: 400; }
.two { display: flex; gap: 6px; margin-top: 5px; }
.two > div { flex: 1 1 0; min-width: 0; background: #FAF8F4; border-radius: 6px; padding: 5px 8px; font-size: 11px; color: var(--sub); }
.two b { display: block; font-size: 16px; color: var(--ink); }
.two b.pos, .three b.pos { color: var(--pos); }
.two b.neg, .three b.neg { color: var(--neg); }
.two small { display: block; font-size: 11px; }
.warn { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; min-height: 44px; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 9px; padding: 8px 12px; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--warn-ink); text-align: left; }
.stock { display: flex; align-items: center; gap: 10px; }
.stock .l { flex: 1 1 auto; min-width: 0; font-size: 12px; }
.stock .l div { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.donut { width: 66px; flex: none; }
.note { font-size: 11px; color: var(--sub); margin: 2px 4px 10px; }
.chart { display: block; width: 100%; height: auto; }
.legend { font-weight: 400; }

.search { display: block; width: 100%; background: #fff; border: 1px solid #ddd; border-radius: 20px; padding: 8px 14px; font-size: 16px; min-height: 42px; margin-bottom: 7px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 7px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; background: #fff; border: 1px solid #ddd; border-radius: 15px; padding: 5px 12px; min-height: 34px; font-size: 13px; color: #555; white-space: nowrap; }
.chips .on { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; }
.resbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.resbar select { background: transparent; border: 0; font-size: 12px; color: var(--sub); min-height: 32px; max-width: 60%; text-align: right; }

.it { display: flex; gap: 8px; width: 100%; background: #fff; border: 0; border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }
.ph { width: 52px; height: 52px; flex: none; object-fit: contain; background: #fff; border-radius: 5px; display: block; }
.ph-none { background: #E6E3DD; }
.mid { flex: 1 1 auto; min-width: 0; font-size: 11px; color: var(--sub); }
.ti { font-size: 13px; color: var(--ink); font-weight: 600; line-height: 1.3; margin-bottom: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.rt { width: 108px; flex: none; font-size: 11px; color: var(--sub); }
.rt div { display: flex; justify-content: space-between; gap: 4px; }
.rt .g { font-weight: 700; color: var(--ink); font-size: 13px; border-top: 1px solid var(--line); margin-top: 2px; padding-top: 1px; }
.chip { display: inline-block; background: #E8F5E9; color: #1B5E20; border-radius: 8px; padding: 0 6px; font-size: 10px; }
.chip.hold { background: #FFE9C9; color: #B25E00; }
.chip.off { background: #EEE; color: #555; }
.chip.auto { background: #E3ECFB; color: #1F4E9E; font-weight: 700; }
.memo { color: #B25E00; font-size: 10px; margin-top: 2px; }
.more { display: block; width: calc(100% - 16px); margin: 10px 8px 14px; background: #fff; border: 1px solid #ddd; border-radius: 8px; min-height: 44px; }

.head { display: flex; gap: 10px; }
.head .ph { width: 76px; height: 76px; }
.ti2 { font-size: 14px; font-weight: 600; word-break: break-word; }
.small { font-size: 11px; color: var(--sub); word-break: break-all; }
.calc div { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.calc .t { font-size: 17px; font-weight: 700; border-bottom: 0; }
.calc .memo { display: block; border: 0; padding: 2px 0 0; font-size: 12px; }
.in { width: 100%; border: 1px solid #bbb; border-radius: 8px; padding: 10px; font-size: 18px; min-height: 46px; text-align: right; background: #fff; }
.btn { display: block; width: 100%; background: var(--orange); color: #fff; border: 0; border-radius: 8px; min-height: 46px; font-weight: 700; font-size: 15px; margin-top: 7px; }
.btn:disabled { opacity: .6; }
.btn.sub { background: #fff; color: var(--ink); border: 1px solid #bbb; }
.ask { background: #FFF8E8; border: 1px solid var(--warn-line); border-radius: 8px; padding: 9px 10px; margin-top: 7px; }
.ng { color: var(--neg); font-size: 12px; margin-top: 5px; }
.ok { color: var(--pos); font-weight: 700; }

.sec-h { font-size: 13px; font-weight: 700; color: #A86A00; margin: 12px 4px 6px; }
.sk .sk-n { margin: 7px 0; }
.sk .btn { margin-top: 8px; }
.cand { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 7px; }
.msg-in { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); border-radius: 8px; padding: 8px 10px; font-size: 12px; margin: 0 0 8px; }
.month { background: #fff; border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; }
.month-g { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; margin-top: 6px; font-size: 12px; color: var(--sub); }
.month-g span { display: flex; justify-content: space-between; gap: 6px; }
.month-g b { color: var(--ink); font-weight: 600; }
.foot { text-align: center; padding: 6px 0 14px; }
.link { background: transparent; border: 0; color: var(--sub); text-decoration: underline; font-size: 12px; min-height: 40px; }

.setup { max-width: 420px; margin: 0 auto; padding: 18px 8px; }
.setup h2 { font-size: 18px; margin: 0 0 8px; }
.setup video { width: 100%; border-radius: 10px; background: #000; margin-top: 8px; display: block; }
