/* 価格・在庫の監視の体験版。色は common/base.css のトークンだけを使う */
.pm { max-width: 1180px; margin: 0 auto; padding: 20px var(--gutter) 64px; }

/* 作業の流れ（1→2→3） */
.pm-steps { display: flex; align-items: center; gap: 10px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; width: fit-content; max-width: 100%; margin: 0 auto 22px; box-shadow: var(--shadow-s); }
.pm-steps button { display: flex; align-items: center; gap: 8px; padding: 7px 16px 7px 8px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.pm-steps button:disabled { cursor: default; opacity: .55; }
.pm-steps button:not(:disabled):hover { background: var(--sunken); color: var(--ink); }
.pm-steps .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); font-size: 13px; }
.pm-steps button[aria-current="step"] { background: var(--brand); color: #fff; }
.pm-steps button[aria-current="step"] .n { background: var(--accent); color: #fff; }
.pm-steps button.done .n { background: var(--ok-soft); color: var(--ok); }
.pm-steps-line { width: 22px; height: 2px; background: var(--line-2); flex: none; }

.scr-head { max-width: 780px; margin-bottom: 18px; }
.scr-head h2 { font-size: 24px; font-weight: 800; line-height: 1.4; }
.scr-lead { margin-top: 6px; color: var(--ink-2); line-height: 1.85; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px 20px; box-shadow: var(--shadow-s); min-width: 0; }
.card h3 { font-size: 16.5px; font-weight: 800; line-height: 1.5; }
.card-lead { margin-top: 3px; font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }
.card-note { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.btn-big { min-height: 50px; padding: 0 26px; font-size: 16px; border-radius: 12px; }
.empty-msg { padding: 40px 20px; text-align: center; color: var(--ink-3); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-l); }
.empty-msg.slim { padding: 16px; }

/* ロボットの仕事の流れ */
.pipe { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; counter-reset: p; }
.pipe li { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-content: start; padding: 12px 12px 12px; border-radius: var(--r-m); background: var(--surface); border: 1.5px solid var(--line); box-shadow: var(--shadow-s); transition: border-color .2s, background .2s, box-shadow .2s; }
.pipe li:not(:last-child)::after { content: ""; position: absolute; right: -10px; top: 24px; width: 10px; height: 2px; background: var(--line-2); }
.pipe .pn { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); color: var(--ink-3); transition: background .2s, color .2s; }
.pipe .pn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pipe .pt { font-weight: 800; font-size: 15px; align-self: center; }
.pipe .pd { grid-column: 1 / -1; margin-top: 6px; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }
.pipe li.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.pipe li.on .pn { background: var(--accent); color: #fff; }
.pipe li.past .pn { background: var(--ok-soft); color: var(--ok); }
.pipe li:last-child .pn { background: var(--sunken); }
.pipe li.on:last-child { border-color: var(--bad); background: var(--bad-soft); box-shadow: 0 0 0 3px var(--bad-soft); }
.pipe li.on:last-child .pn { background: var(--bad); }

.run-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: stretch; }
.day-card { display: flex; flex-direction: column; }
.days { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 14px 0 12px; }
.day { text-align: center; }
.day button, .day .day-in { width: 100%; display: grid; justify-items: center; gap: 1px; padding: 8px 2px 8px; border-radius: var(--r-m); border: 1.5px solid var(--line); background: var(--paper); }
.day .dn { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); color: var(--ink-3); font-weight: 800; font-size: 14px; }
.day .dd { font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin-top: 2px; }
.day .ds { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.day.done button { background: var(--ok-soft); border-color: transparent; }
.day.done button:hover { border-color: var(--ok); }
.day.done .dn { background: var(--ok); color: #fff; }
.day.done .ds { color: var(--ok); }
.day.stop button { background: var(--bad-soft); border-color: transparent; }
.day.stop button:hover { border-color: var(--bad); }
.day.stop .dn { background: var(--bad); color: #fff; }
.day.stop .ds { color: var(--bad); }
.day.next .day-in { border-color: var(--accent); background: var(--accent-soft); }
.day.next .dn { background: var(--accent); color: #fff; }
.day.next .ds { color: var(--accent-deep); }
.how { list-style: none; display: grid; gap: 6px; margin: 0 0 18px; padding: 12px 14px; background: var(--paper); border-radius: var(--r-m); font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.how li { padding-left: 1.2em; position: relative; }
.how li::before { content: ""; position: absolute; left: 3px; top: .65em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.run-btns { margin-top: auto; display: grid; gap: 8px; }
.run-btns .btn-big { width: 100%; }
.run-sub { display: flex; gap: 8px; flex-wrap: wrap; justify-content: space-between; }

.log-card { display: flex; flex-direction: column; }
.meters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 10px; }
.meter { padding: 8px 10px; border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); min-width: 0; }
.meter .m-l { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.meter b { display: block; font-size: 17px; line-height: 1.35; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 5px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.log { margin-top: 10px; height: 232px; overflow-y: auto; background: var(--brand); color: var(--on-brand); border-radius: var(--r-m); padding: 10px 12px; font-size: 12.5px; line-height: 1.6; }
.log-idle { color: var(--on-brand-2); padding: 6px 2px; }
.ln { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 8px; padding: 2px 0; animation: ln-in .18s ease-out; }
.ln .lvl { font-size: 11px; font-weight: 700; color: var(--on-brand-2); padding-top: 1px; }
.ln.lv-warn .lvl, .ln.lv-warn .msg { color: var(--warn-line); }
.ln.lv-err .lvl, .ln.lv-err .msg { color: var(--bad-line); }
.ln .msg { overflow-wrap: anywhere; }
@keyframes ln-in { from { opacity: 0; transform: translateY(3px); } }

/* 結果のカード */
.result { margin-top: 16px; border-color: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft), var(--shadow-s); }
.result.stop { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft), var(--shadow-s); }
.res-head { display: flex; gap: 14px; align-items: flex-start; }
.res-head p { margin-top: 4px; font-size: 14px; color: var(--ink-2); line-height: 1.75; }
.res-head .res-sub { font-size: 13px; color: var(--ink-3); }
.res-ico { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.res-ico .ico { width: 22px; height: 22px; stroke-width: 2.2; }
.res-ico.ok { background: var(--ok-soft); color: var(--ok); }
.res-ico.bad { background: var(--bad-soft); color: var(--bad); }
.res-top { margin-top: 14px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.res-list { list-style: none; margin-top: 6px; display: grid; gap: 6px; }
.res-list li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-s); background: var(--paper); font-size: 13.5px; min-width: 0; }
.res-list .rn { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-list .rv { color: var(--ink-2); white-space: nowrap; font-feature-settings: "tnum"; }
.res-btns { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.res-done { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); }

/* 読み取りの例 */
.sample { margin-top: 16px; }
.sample-list { margin-top: 12px; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.sm-row { display: grid; grid-template-columns: minmax(0, 5fr) 28px minmax(0, 5fr); gap: 10px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 13.5px; }
.sm-row:first-child { border-top: 0; }
.sm-head { background: var(--sunken); font-size: 12px; font-weight: 700; color: var(--ink-3); padding-top: 7px; padding-bottom: 7px; }
.sm-seen { display: block; min-width: 0; overflow-wrap: anywhere; }
.sm-k { font-style: normal; display: inline-block; margin-right: 8px; vertical-align: 1px; font-size: 11px; font-weight: 700; padding: 0 7px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-2); }
.sm-seen s { color: var(--ink-3); }
.sm-arrow { text-align: center; color: var(--ink-3); }
.sm-read b { font-weight: 800; }
.sm-read small { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.55; }

/* 2・3 共通：日の切り替え */
.bar-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.daytabs { display: flex; gap: 6px; flex-wrap: wrap; }
.daytabs button { display: grid; gap: 0; justify-items: center; padding: 6px 14px; border-radius: var(--r-m); border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 12px; line-height: 1.4; }
.daytabs button b { font-size: 14px; }
.daytabs button:hover { background: var(--sunken); }
.daytabs button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.daytabs button.stop { border-color: var(--bad-line); color: var(--bad); }
.daytabs button.stop[aria-pressed="true"] { background: var(--bad); border-color: var(--bad); color: #fff; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--sunken); gap: 2px; }
.seg button { padding: 7px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-s); }

/* しきい値 */
.thr { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 14px 18px; margin-bottom: 14px; }
.thr-head { font-size: 14.5px; }
.thr-opts { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.thr-opts button { min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); font-weight: 700; font-size: 14px; color: var(--ink-2); }
.thr-opts button:hover { background: var(--sunken); }
.thr-opts button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.thr .card-note { flex-basis: 100%; margin-top: 0; }
.thr-result { flex-basis: 100%; margin: 0; padding: 8px 10px; border-radius: var(--r-s); background: var(--brand-soft); font-size: 13px; line-height: 1.7; color: var(--ink); }
.thr-result:empty { display: none; }

/* 種類の印（色は状態のトークンから） */
.kchip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; background: var(--sunken); color: var(--ink-2); }
.k-down { --kc: var(--ok); } .k-up { --kc: var(--bad); } .k-out { --kc: var(--ink-2); } .k-back { --kc: var(--c1); }
.k-new { --kc: var(--accent-deep); } .k-end { --kc: var(--c4); } .k-name { --kc: var(--c4); } .k-low { --kc: var(--warn); }
.k-move { --kc: var(--ink-3); } .k-warn { --kc: var(--warn); }
.kchip[class*="k-"] { background: color-mix(in srgb, var(--kc) 13%, var(--surface)); color: var(--kc); }
.kind-tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.ktile { padding: 9px 12px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--kc); box-shadow: var(--shadow-s); }
.ktile span { display: block; font-size: 12px; font-weight: 700; color: var(--kc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ktile b { font-size: 24px; line-height: 1.3; font-weight: 800; }
.ktile b small { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.ktile.zero { opacity: .5; box-shadow: none; }

.sec-t { font-size: 16px; font-weight: 800; margin: 6px 0 10px; }
.quiet-t { margin-top: 26px; color: var(--ink-2); margin-bottom: 0; }
.quiet-t + .card-note { margin-bottom: 10px; margin-top: 2px; }
.chg-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.chg { position: relative; display: grid; gap: 6px; padding: 14px 16px 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-s); overflow: hidden; min-width: 0; }
.chg::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--kc); }
.chg.quiet { background: var(--paper); box-shadow: none; }
.chg.quiet::before { opacity: .45; }
.chg-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chg-code { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.chg-name { font-size: 15.5px; font-weight: 800; line-height: 1.5; }
.chg-ba { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.ba { display: grid; line-height: 1.35; min-width: 0; }
.ba i { font-style: normal; font-size: 11px; color: var(--ink-3); font-weight: 600; }
.ba b { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.ba.b b { color: var(--ink-2); font-weight: 600; }
.chg-ba.is-price .ba b { font-size: 18px; }
.ba-arrow { color: var(--ink-3); }
.pct { font-weight: 800; font-size: 15px; padding: 1px 9px; border-radius: 999px; }
.pct.dn { background: var(--ok-soft); color: var(--ok); }
.pct.up { background: var(--bad-soft); color: var(--bad); }
.chg-spark { margin-left: auto; }
.chg-notes { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.chg-notes span::before { content: "・"; color: var(--ink-3); }
.spark { overflow: visible; }
.sp-line { fill: none; stroke: var(--ink-3); stroke-width: 1.6; stroke-linejoin: round; }
.sp-dot { fill: var(--ink-3); }
.sp-dot.dn { fill: var(--ok); } .sp-dot.up { fill: var(--bad); }

.stop-box { border-color: var(--bad-line); background: var(--bad-soft); }
.stop-box h3 { color: var(--bad); }
.stop-box p { margin-top: 6px; font-size: 14px; color: var(--ink-2); line-height: 1.8; }
.stop-box .stop-why-t { margin-top: 14px; font-weight: 700; color: var(--ink); font-size: 13.5px; }
.stop-box ul { margin: 6px 0 0 1.3em; display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.first-box p { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.cat-tiles { list-style: none; margin-top: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cat-tiles li { padding: 10px 12px; border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); }
.cat-tiles b { display: block; font-size: 22px; line-height: 1.3; }
.cat-tiles span { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }

/* 価格の推移 */
.trend-card { display: grid; gap: 4px; }
.chart { margin-top: 12px; padding: 10px 6px 4px; border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); }
.chart-title { padding: 0 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.chart-title small { color: var(--ink-3); font-size: 12px; }
.chart-svg { width: 100%; height: auto; max-height: 300px; }
.ch-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.ch-y, .ch-x2 { font-size: 11.5px; fill: var(--ink-3); }
.ch-x { font-size: 12px; fill: var(--ink-2); font-weight: 700; }
.ch-line { fill: none; stroke: var(--brand-2); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ch-dot { fill: var(--brand-2); stroke: var(--surface); stroke-width: 2.5; }
.ch-dot.dn { fill: var(--ok); } .ch-dot.up { fill: var(--bad); } .ch-dot.out { fill: var(--ink-3); }
.ch-v { font-size: 12.5px; font-weight: 800; fill: var(--ink); font-feature-settings: "tnum"; }
.ch-v.dn { fill: var(--ok); } .ch-v.up { fill: var(--bad); }
.trend-list { margin-top: 12px; display: grid; gap: 6px; }
.tr-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 14px; align-items: center; text-align: left; padding: 8px 12px; border-radius: var(--r-m); border: 1.5px solid var(--line); background: var(--surface); }
.tr-row:hover { background: var(--paper); }
.tr-row[aria-selected="true"] { border-color: var(--brand-2); box-shadow: 0 0 0 2px var(--brand-soft); }
.tr-name { display: grid; min-width: 0; line-height: 1.4; }
.tr-name b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-name small { color: var(--ink-3); font-size: 11.5px; }
.tr-nums { display: grid; gap: 0; font-size: 12.5px; text-align: right; }
.tr-nums i { font-style: normal; font-size: 11px; color: var(--ink-3); margin-right: 6px; }

/* 3. 書き出す */
.exp-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.ex-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ex-warn { margin-top: 12px; padding: 9px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 13.5px; font-weight: 600; line-height: 1.7; }
.draft-card .seg { margin-top: 12px; }
.draft { margin: 12px 0 0; padding: 14px 16px; max-height: 360px; overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); font-family: var(--font); font-size: 13px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.draft.empty { color: var(--ink-3); }
.draft-btns { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.preview { margin-top: 24px; }
.preview h3 { font-size: 16px; font-weight: 800; }
.table-wrap { margin-top: 10px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.table-wrap th { background: var(--brand); color: #fff; font-weight: 700; text-align: left; padding: 7px 9px; white-space: nowrap; }
.table-wrap td { padding: 6px 9px; border-top: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.table-wrap td.wrap { white-space: normal; min-width: 260px; max-width: 420px; }
.table-wrap td.r { text-align: right; font-weight: 700; }
.table-wrap td.dn { color: var(--ok); } .table-wrap td.up { color: var(--bad); }
.table-wrap tr.q td { color: var(--ink-3); background: var(--paper); }
.table-wrap td.none { text-align: center; color: var(--ink-3); padding: 20px; }

@media (max-width: 1000px) {
  .pipe { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pipe li:nth-child(3n)::after, .pipe li:last-child::after { display: none; }
  .kind-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .run-grid, .exp-grid { grid-template-columns: minmax(0, 1fr); }
  .chg-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .pm { padding-top: 14px; }
  .pm-steps { gap: 2px; padding: 4px; width: 100%; justify-content: space-between; margin-bottom: 18px; }
  .pm-steps button { flex-direction: column; gap: 2px; padding: 5px 4px; font-size: 11.5px; flex: 1; border-radius: 14px; }
  .pm-steps-line { width: 10px; }
  .scr-head h2 { font-size: 20px; }
  .scr-lead { font-size: 14px; line-height: 1.8; }
  .card { padding: 14px; border-radius: var(--r-m); }
  .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pipe li { padding: 10px; }
  .pipe li::after { display: none !important; }
  .pipe .pd { font-size: 12px; }
  .days { gap: 4px; }
  .day button, .day .day-in { padding: 6px 0; }
  .day .dd { font-size: 11.5px; }
  .day .ds { font-size: 11px; }
  .meters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log { height: 200px; font-size: 12px; }
  .ln { grid-template-columns: 34px minmax(0, 1fr); gap: 6px; }
  .res-head { gap: 10px; }
  .res-list li { flex-wrap: wrap; gap: 4px 8px; }
  .res-list .rn { flex-basis: 100%; white-space: normal; }
  .res-btns .btn { flex: 1 1 100%; }
  .sm-row { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 12px; }
  .sm-arrow { display: none; }
  .sm-head { display: none; }
  .sm-read::before { content: "→ "; color: var(--ink-3); }
  .bar-row { gap: 10px; }
  .daytabs { width: 100%; }
  .daytabs button { flex: 1; padding: 6px 2px; min-width: 0; }
  .daytabs button span { font-size: 11px; white-space: nowrap; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 8px 6px; }
  .thr { padding: 12px 14px; }
  .thr-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 6px; }
  .thr-opts button { padding: 0 4px; font-size: 13.5px; }
  .kind-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .ktile { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; }
  .ktile b { font-size: 20px; }
  .chg { padding: 12px 14px 12px 16px; }
  .chg-spark { margin-left: 0; }
  .cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .tr-row .spark { display: none; }
  .tr-nums { text-align: right; }
  .ex-btns .btn { width: 100%; white-space: normal; }
  .btn-big { width: 100%; }
  .draft { font-size: 12.5px; padding: 12px; max-height: 300px; }
}

/* 知らせ（トースト）が出ている間も、その下のボタンを押せるようにする。スクロールで止まる位置は、固定の帯の裏を避ける */
.toast { pointer-events: none; }
.run-btns .btn, .res-btns .btn { scroll-margin: 24px 0 calc(var(--dock-h, 80px) + 40px); }
@media (max-width: 900px) { .exp-grid.stop .draft-card { order: -1; } }
