
*{box-sizing:border-box}
body{margin:0;font-family:"Hiragino Sans","Yu Gothic UI",Meiryo,sans-serif;font-size:14px;line-height:1.6;color:#1f2430;background:#f4f5f8}
a{color:#3056c9;text-decoration:none}a:hover{text-decoration:underline}
header{background:#232a3b;color:#fff;padding:0 20px;display:flex;align-items:center;gap:18px;flex-wrap:wrap;min-height:48px}
header .brand{font-weight:700;margin-right:8px}
header a{color:#cfd6ea}header .sp{flex:1}
header form{margin:0}header button{background:none;border:0;color:#cfd6ea;cursor:pointer;font:inherit;padding:0}
main{max-width:1040px;margin:0 auto;padding:20px}
h1{font-size:20px;margin:4px 0 16px}h2{font-size:16px;margin:26px 0 10px;padding-bottom:4px;border-bottom:2px solid #dfe3ee}
.card{background:#fff;border:1px solid #e1e4ec;border-radius:8px;padding:16px;margin-bottom:14px}
table{width:100%;border-collapse:collapse;background:#fff;border:1px solid #e1e4ec;border-radius:8px}
th,td{text-align:left;padding:8px 10px;border-bottom:1px solid #eceef4;vertical-align:top}
th{background:#f0f2f8;font-weight:600;white-space:nowrap}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}
label{display:block;font-weight:600;margin:12px 0 4px}
.hint{font-weight:400;color:#6a7286;font-size:12px;display:block}
input[type=text],input[type=password],input[type=number],select,textarea{width:100%;padding:7px 9px;border:1px solid #c5cad8;border-radius:6px;font:inherit;background:#fff}
textarea{min-height:110px;font-family:Consolas,"Yu Gothic UI",monospace;font-size:13px}
textarea.tall{min-height:320px}
input[type=number]{max-width:140px}
.row{display:flex;gap:16px;flex-wrap:wrap}.row>div{flex:1;min-width:150px}
.check{font-weight:400;display:flex;gap:6px;align-items:center;margin:8px 0}
button,.btn{background:#3056c9;color:#fff;border:0;border-radius:6px;padding:8px 16px;font:inherit;cursor:pointer;display:inline-block}
button.sub,.btn.sub{background:#e6e9f2;color:#1f2430}button.warn{background:#c0392b}
.actions{margin-top:18px;display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.tag{display:inline-block;padding:1px 8px;border-radius:10px;font-size:12px;background:#e6e9f2}
.tag.on{background:#d9f2e3;color:#176b3a}.tag.off{background:#f5dede;color:#8e2a20}.tag.paid{background:#fff0c9;color:#7a5600}
.msg{padding:10px 14px;border-radius:6px;margin-bottom:14px;background:#e3efff;border:1px solid #b9d2f5}
.msg.err{background:#fde8e6;border-color:#f0b9b3}
code{background:#eef0f6;padding:2px 6px;border-radius:4px;word-break:break-all}
/* 縦方向を逆順に並べると、開いたときに一番下（最新の会話）までスクロールされた状態になる。中身は1つの箱にまとめてあるので、表示順は変わらない */
.talk{background:#8fa7c9;border-radius:8px;padding:14px;max-height:62vh;overflow-y:auto;display:flex;flex-direction:column-reverse}
.b{display:flex;margin:8px 0}.b .in{max-width:76%}
.b .tx{padding:8px 12px;border-radius:14px;background:#fff;white-space:pre-wrap;word-break:break-word}
.b .mt{font-size:11px;color:#f3f6fb;margin:2px 4px}
.b.user{justify-content:flex-start}
.b.ai,.b.staff,.b.system{justify-content:flex-end}.b.ai .mt,.b.staff .mt,.b.system .mt{text-align:right}
.b.ai .tx{background:#9be27d}.b.staff .tx{background:#ffd98a}.b.system .tx{background:#dfe4ee;color:#444}
.b.noctx .tx{opacity:.75}
/* 売上・コストの集計 */
.cards{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:6px}.cards a.card{flex:1;min-width:170px;color:inherit;margin-bottom:0}
.cards a.card:hover{border-color:#3056c9;text-decoration:none}.big{font-size:22px;font-weight:700}
.tabs{display:flex;gap:6px;margin-bottom:6px}.tabs a{padding:5px 14px;border-radius:16px;background:#e6e9f2;color:#1f2430}
.tabs a.cur{background:#3056c9;color:#fff}
.crumbs{display:flex;flex-wrap:wrap;gap:4px;align-items:center}.crumbs .pn{margin-left:auto;display:flex;gap:14px}
.scroll{overflow-x:auto}.scroll table{min-width:640px}
th.grp{text-align:center}td.zero{color:#b5bac8}td.minus{color:#c0392b}
tr.sum td{font-weight:700;background:#f7f8fb}
/* 表記・規約のページ */
.legal h2{font-size:15px;margin:22px 0 6px;padding-bottom:2px;border-bottom:1px solid #dfe3ee}.legal h2:first-child{margin-top:0}
.legal p{margin:6px 0}.legal ul{margin:6px 0;padding-left:1.4em}
