/* zaiko_hub — CSSは1枚だけ(tcg_os/kintai と同方針)。 */
* { box-sizing: border-box; }
body { margin: 0; font-family: "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
       background: #f4f6f9; color: #223; font-size: 15px; }
main { max-width: 1200px; margin: 0 auto; padding: 16px; }
a { color: #2f5aa8; text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
          background: #1f2d45; color: #fff; padding: 10px 16px; }
.topbar .brand { color: #fff; font-weight: 700; font-size: 17px; }
.topbar nav { display: flex; gap: 14px; flex-wrap: wrap; }
.topbar nav a { color: #cfd8ea; }
.topbar nav a:hover { color: #fff; text-decoration: none; }

.warn-bar { background: #fff3cd; color: #7a5b00; padding: 8px 16px; font-size: 13px; }
.flash { background: #d9edf7; color: #20567a; padding: 10px 16px; margin: 10px 16px 0;
         border-radius: 6px; }

h1 { font-size: 20px; margin: 12px 0; }
h2 { font-size: 16px; margin: 18px 0 8px; }

.card { background: #fff; border: 1px solid #dde3ec; border-radius: 8px;
        padding: 14px; margin-bottom: 14px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { background: #fff; border: 1px solid #dde3ec; border-radius: 8px;
        padding: 12px 18px; min-width: 130px; }
.stat .num { font-size: 26px; font-weight: 700; }
.stat .label { font-size: 12px; color: #667; }

table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { border: 1px solid #dde3ec; padding: 6px 8px; text-align: left;
         font-size: 14px; vertical-align: top; }
th { background: #eef2f8; font-weight: 600; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

input[type=text], input[type=number], input[type=password], select, textarea {
  border: 1px solid #becada; border-radius: 5px; padding: 5px 7px; font-size: 14px;
  font-family: inherit; }
textarea { width: 100%; }
button { background: #2f5aa8; color: #fff; border: 0; border-radius: 5px;
         padding: 6px 12px; font-size: 14px; cursor: pointer; }
button:hover { background: #24487f; }
button.ghost { background: #eef2f8; color: #2f5aa8; }
button.danger { background: #b23a3a; }
form.inline { display: inline; }

.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 9px;
         background: #e6ebf4; color: #445; }
.badge.low { background: #fde2e2; color: #922; }
.badge.ok { background: #def5e5; color: #1c6b3c; }
.warn-text { color: #b23a3a; font-size: 12px; }
.muted { color: #889; font-size: 12px; }

/* 受け取り箱 */
.msg-group { display: grid; grid-template-columns: 1fr 320px; gap: 12px; }
.msg-original { background: #f8f9fb; border: 1px solid #e2e7f0; border-radius: 6px;
                padding: 10px; font-size: 12px; white-space: pre-wrap; overflow-y: auto;
                max-height: 480px; color: #556; }
@media (max-width: 900px) { .msg-group { grid-template-columns: 1fr; } }
tr.low-conf { background: #fff5f5; }

/* 比較表 */
td.best { background: #def5e5; font-weight: 700; }
td.expired-cell { color: #aab; background: #f4f5f7; }
.cell-qty { font-size: 11px; color: #667; }
.cell-age { font-size: 11px; color: #99a; }
.cell-age.age-fresh { color: #1c6b3c; font-weight: 600; }   /* 3時間以内=最新 */
.cell-age.age-old { color: #b23a3a; font-weight: 600; }     /* 24時間以上=失効間近 */
td.sold { text-decoration: line-through; color: #aab; }

/* 公開ページ(英語・スマホ1カラム) */
.pub-wrap { max-width: 560px; margin: 0 auto; padding: 14px; }
.pub-title { font-size: 21px; font-weight: 700; margin: 6px 0 2px; }
.pub-note { color: #667; font-size: 13px; margin-bottom: 12px; }
.pub-item { display: flex; gap: 12px; align-items: center; background: #fff;
            border: 1px solid #dde3ec; border-radius: 10px; padding: 10px; margin-bottom: 10px; }
.pub-item img { width: 64px; height: 64px; object-fit: contain; border-radius: 6px;
                background: #f4f6f9; flex: none; }
.pub-item .noimg { width: 64px; height: 64px; border-radius: 6px; background: #eef2f8;
                   display: flex; align-items: center; justify-content: center; flex: none;
                   color: #99a; font-size: 22px; }
.pub-name { font-weight: 600; }
.pub-price { margin-left: auto; text-align: right; white-space: nowrap; }
.pub-price .jpy { font-size: 17px; font-weight: 700; }
.pub-price .cur { font-size: 12px; color: #667; }
.pub-stock { font-size: 12px; color: #1c6b3c; }
.cur-select { margin-bottom: 12px; }

.login-box { max-width: 340px; margin: 60px auto; }

/* 公開ページの見積もり */
.pub-qty { width: 64px; margin-top: 4px; border: 1px solid #becada; border-radius: 5px;
           padding: 4px 6px; font-size: 13px; }
.pub-quote-bar { position: sticky; bottom: 0; background: #fff; border: 1px solid #dde3ec;
                 border-radius: 10px; padding: 12px; margin-top: 12px;
                 box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
.pub-quote-bar select { padding: 6px; }
.pub-quote-warn { background: #fff3cd; color: #7a5b00; border-radius: 8px;
                  padding: 10px 14px; margin: 10px 0; font-size: 14px; }
.pub-quote-table th, .pub-quote-table td { font-size: 14px; }
.pub-quote-total th { background: #def5e5; font-size: 16px; }

/* 比較表のシリーズ切り替えタブ */
.series-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.series-tabs .tab { padding: 5px 12px; border-radius: 16px; background: #e6ebf4;
                    color: #2f5aa8; font-size: 13px; }
.series-tabs .tab:hover { text-decoration: none; background: #d5deee; }
.series-tabs .tab.active { background: #2f5aa8; color: #fff; }

/* 公開ページのシリーズ見出し */
.pub-series { font-size: 15px; font-weight: 700; color: #445; margin: 18px 0 8px;
              border-bottom: 2px solid #dde3ec; padding-bottom: 4px; }
.pub-pre { font-size: 12px; color: #a05a00; font-weight: 600; }

/* 公開ページの問い合わせボタン(上部+右下フローティング) */
.pub-contact { display: inline-block; background: #1f2d45; color: #fff; padding: 8px 18px;
               border-radius: 20px; font-weight: 600; font-size: 14px; }
.pub-contact:hover { text-decoration: none; background: #2f5aa8; }
.pub-fab { position: fixed; right: 16px; bottom: 16px; background: #1f2d45; color: #fff;
           padding: 11px 18px; border-radius: 24px; font-weight: 600; font-size: 14px;
           box-shadow: 0 3px 10px rgba(0,0,0,.25); z-index: 10; }
.pub-fab:hover { text-decoration: none; background: #2f5aa8; }

/* 相場推移グラフ */
.trend-chart { background: #fff; border: 1px solid #dde3ec; border-radius: 8px; }
