/* 部品の形。色と文字は tokens.css の変数だけを使う。 */
*, *::before, *::after { box-sizing: border-box; border-radius: var(--radius); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--chart); color: var(--ink);
  font-family: var(--font-ja); font-size: var(--text); font-weight: var(--weight-body);
  line-height: var(--leading); font-feature-settings: "palt" 0;
}
a { color: var(--tide); text-underline-offset: 3px; }
a:hover { color: var(--sea); }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- 上の帯 ---------- */
.band { background: var(--sea); color: var(--chart); position: sticky; top: 0; z-index: 20; }
.band__in {
  max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; gap: 24px; min-height: var(--band-h);
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--chart); text-decoration: none; }
.logo:hover { color: var(--chart); }
.logo__word { font-weight: var(--weight-head); letter-spacing: 0.24em; font-size: 18px; }
.logo__frame, .logo__mast { fill: none; stroke: var(--chart); stroke-width: 2; }
.logo__wave { fill: none; stroke: var(--logo-wave); stroke-width: 2.5; stroke-linecap: square; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a {
  color: var(--chart); text-decoration: none; padding: 8px 14px; min-height: 40px;
  display: inline-flex; align-items: center; transition: background var(--fast) var(--ease);
}
.nav a:hover { background: var(--sea-line); color: var(--chart); }
.nav a[aria-current="page"] { background: var(--chart); color: var(--sea); font-weight: var(--weight-strong); }
.band__tools { flex: 1 1 240px; display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.cmdk-open {
  display: flex; align-items: center; gap: 8px; min-height: 40px; min-width: 300px; padding: 0 12px;
  background: transparent; border: var(--rule-thin) solid var(--sea-line); color: var(--sea-muted);
  cursor: pointer; text-align: left; font-size: var(--text-sm);
}
.cmdk-open:hover { border-color: var(--sea-muted); }
.cmdk-open span:first-of-type { flex: 1; }
.kbd { font-family: var(--font-num); font-size: var(--text-2xs); border: var(--rule-thin) solid var(--sea-line); padding: 0 6px; }
.icon-search circle, .icon-search path { fill: none; stroke: currentColor; stroke-width: 1.6; }
.shop-btn {
  min-height: 40px; padding: 0 12px; background: transparent; color: var(--chart);
  border: var(--rule-thin) solid var(--sea-line); display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: var(--text-sm);
}
.shop-btn__dot { width: 8px; height: 8px; background: var(--logo-wave); display: inline-block; }
.shop-menu { position: absolute; right: var(--gutter); top: calc(100% - 4px); background: var(--paper); color: var(--ink); max-height: calc(100vh - var(--band-h) - 16px); overflow: auto;
  border: var(--rule-thin) solid var(--ink); min-width: 240px; padding: 6px 0; z-index: 30; }
.shop-menu button { display: block; width: 100%; text-align: left; min-height: var(--tap); padding: 0 16px; background: none; border: 0; cursor: pointer; }
.shop-menu button:hover, .shop-menu button[aria-current="true"] { background: var(--chart); }
.shop-menu hr { border: 0; border-top: var(--rule-thin) solid var(--rule); margin: 6px 0; }
.icon-btn { display: none; }

/* ---------- 下地と見出し ---------- */
.page { max-width: var(--page-max); margin: 0 auto; padding: 40px var(--gutter) 64px; }
.eyebrow { margin: 0 0 4px; font-family: var(--font-num); font-size: var(--text-xs); color: var(--ink-3); letter-spacing: 0.08em; }
.stub-tag { display: inline-block; border: var(--rule-thin) dashed var(--ink-3); color: var(--ink-2); padding: 0 6px; font-family: var(--font-ja); letter-spacing: 0; }
h1, h2, h3 { margin: 0; }
.h1 { font-size: 44px; font-weight: var(--weight-head); line-height: 1.2; letter-spacing: -0.01em; }
.h2 { font-size: 20px; font-weight: var(--weight-head); letter-spacing: 0.04em; }
.h3 { font-size: var(--text-sm); color: var(--ink-3); font-weight: var(--weight-strong); letter-spacing: 0.06em; margin-bottom: 12px; }
.lead { margin: 12px 0 0; color: var(--ink-2); max-width: 36em; }
.accent { color: var(--signal); }
.head-rule { border-bottom: var(--rule-thick) solid var(--ink); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 20px;
  font-weight: var(--weight-strong); text-decoration: none; white-space: nowrap; cursor: pointer;
  border: var(--line-state) solid var(--sea); background: var(--paper); color: var(--sea);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn:hover { background: var(--chart); color: var(--sea); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--sea); color: var(--chart); }
.btn--primary:hover { background: var(--ink); color: var(--chart); }
.btn--signal { background: var(--signal); border-color: var(--signal); color: var(--paper); }
.btn--signal:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- 状態（色＋線の形＋言葉） ---------- */
.state { display: inline-block; justify-self: start; padding: 0 8px; font-size: var(--text-xs); font-weight: var(--weight-strong); border: var(--line-state) solid currentColor; white-space: nowrap; }
.state--on_sale { color: var(--tide); }
.state--sold_out { color: var(--signal); }
.state--checking { color: var(--ink-2); border-style: dashed; border-color: var(--ink-3); }
.state--stopped { color: var(--ink-3); border-style: dotted; }

/* ---------- ホーム ---------- */
.today { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 32px; align-items: end; padding-bottom: 28px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: var(--rule-thin) solid var(--ink); background: var(--paper); }
.tile { padding: 16px 18px; border-right: var(--rule-thin) solid var(--rule); min-width: 0; }
.tile:last-child { border-right: 0; }
.tile__label { margin: 0; font-size: var(--text-xs); color: var(--ink-3); }
.tile__value { margin: 4px 0 0; font-family: var(--font-num); font-size: clamp(18px, 1.2vw + 10px, 26px); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile__value--text { font-family: var(--font-ja); font-size: var(--text-sm); white-space: normal; color: var(--ink-2); }
.tile__value a, .tile__link { color: inherit; }
.tile__list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; font-size: var(--text-2xs); }
.tile__list a { color: var(--ink-2); }
.outlook__nums { margin: 10px 0 0; font-size: var(--text-sm); }
.tile__note { margin: 2px 0 0; font-size: var(--text-xs); color: var(--ink-2); }
.tone-good { color: var(--tide); font-weight: var(--weight-strong); }
.tone-signal { color: var(--signal); font-weight: var(--weight-strong); }
.cols { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 36px; }
.col-main { flex: 999 1 560px; min-width: 0; }
.col-side { flex: 1 1 320px; min-width: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.sec-head a { font-size: var(--text-sm); }

.next { list-style: none; margin: 0; padding: 0; border-top: var(--rule-thin) solid var(--ink); }
.next li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 20px 0; border-bottom: var(--rule-thin) solid var(--rule); }
.next__no { font-family: var(--font-num); font-size: 30px; font-weight: 600; color: var(--ink-3); }
.next__no--urgent { color: var(--signal); }
.next__title { margin: 0; font-weight: var(--weight-strong); font-size: 17px; overflow-wrap: anywhere; }
.next__detail { margin: 2px 0 0; color: var(--ink-2); font-size: var(--text-sm); }
.next__empty { padding: 28px 0; color: var(--ink-2); }

.panel { background: var(--paper); border: var(--rule-thin) solid var(--rule); }
.log { padding: 4px 20px; }
.log__row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: var(--rule-thin) dashed var(--rule); }
.log__row:last-child { border-bottom: 0; }
.log__time { font-family: var(--font-num); font-size: var(--text-xs); color: var(--ink-3); }
.log__text { margin: 0; font-size: var(--text-sm); overflow-wrap: anywhere; }

.outlook { padding: 20px; }
.outlook__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: var(--text-xs); color: var(--ink-3); }
.outlook__bar { position: relative; height: 28px; margin-top: 10px; background: var(--chart-deep); }
.outlook__bar span { position: absolute; top: 0; bottom: 0; }
.ol-now { left: 0; top: 10px !important; bottom: 10px !important; background: var(--ink-3); }
.ol-review { width: 0; border-left: var(--rule-thin) dashed var(--ink-3); }
.ol-band { top: 6px !important; bottom: 6px !important; background: var(--tide-soft); }
.ol-mid { width: 3px; background: var(--tide); }
.ol-goal { width: 1px; top: -6px !important; bottom: -6px !important; background: var(--ink); }
.outlook__scale { position: relative; height: 18px; margin-top: 8px; font-family: var(--font-num); font-size: var(--text-2xs); color: var(--ink-3); }
.outlook__scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.outlook__scale span:first-child { transform: none; }
.outlook__scale span:last-child { transform: translateX(-100%); }
.outlook__top span { white-space: nowrap; }
.outlook__locked { padding: 20px; color: var(--ink-2); font-size: var(--text-sm); }

/* ---------- 商品 ---------- */
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 20px; }
.ph .h1 { font-size: 36px; }
.ph__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.filters button { min-height: 40px; padding: 0 16px; background: var(--paper); color: var(--ink); border: var(--rule-thin) solid var(--rule-strong); cursor: pointer; font-size: var(--text-sm); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--chart); border-color: var(--ink); }
.filters .f-signal { color: var(--signal); border-color: var(--signal); font-weight: var(--weight-strong); }
.split { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.list-wrap { flex: 999 1 560px; min-width: 0; overflow-x: auto; }
.list { min-width: 640px; border-top: var(--rule-thin) solid var(--ink); }
.row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 110px 110px 120px; gap: 16px; align-items: center; padding: 14px 12px; border-bottom: var(--rule-thin) solid var(--rule); }
.list.no-amounts .row { grid-template-columns: 64px minmax(0, 1fr) 110px 120px; }
.row--head { padding: 10px 12px; font-size: var(--text-xs); color: var(--ink-3); border-bottom-color: var(--ink); }
.row--item { width: 100%; background: transparent; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; transition: background var(--fast) var(--ease); }
.row--item:hover { background: var(--paper); }
.row--item[aria-current="true"] { background: var(--paper); outline: 2px solid var(--tide); outline-offset: -2px; }
.r { text-align: right; }
.thumb { width: 64px; height: 64px; background: var(--thumb); display: block; }
.thumb--lg { width: 96px; height: 96px; flex: none; }
.p-name { display: block; font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.p-code { display: block; font-family: var(--font-num); font-size: var(--text-2xs); color: var(--ink-3); overflow-wrap: anywhere; }
.amt-neg { color: var(--signal); }
.amt-pos { color: var(--tide); }
.detail { flex: 1 1 380px; min-width: 0; background: var(--paper); border: var(--rule-thin) solid var(--ink); position: sticky; top: calc(var(--band-h) + 16px); }
.detail__sec { padding: 20px 24px; border-bottom: var(--rule-thin) solid var(--rule); }
.detail__sec:last-child { border-bottom: 0; }
.detail__head { display: flex; gap: 16px; align-items: flex-start; }
.detail__name { margin: 2px 0 8px; font-size: 20px; font-weight: var(--weight-head); line-height: 1.35; overflow-wrap: anywhere; }
.bd { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; font-size: var(--text-sm); }
.bd .num { text-align: right; }
.bd__sub { color: var(--ink-2); }
.bd__total { font-weight: var(--weight-strong); border-top: var(--rule-thin) solid var(--ink); padding-top: 6px; }
.note { margin: 12px 0 0; font-size: var(--text-xs); color: var(--ink-2); }
.track { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: var(--rule-thick) solid var(--ink); font-size: var(--text-sm); display: flex; flex-direction: column; gap: 12px; }
.track time { font-family: var(--font-num); font-size: var(--text-2xs); color: var(--ink-3); display: block; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.msg { margin: 10px 0 0; font-size: var(--text-xs); color: var(--ink-2); min-height: 1em; }

/* ---------- ⌘K ---------- */
.cmdk { border: var(--rule-thin) solid var(--ink); padding: 0; width: min(640px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); margin-top: 12vh; }
.cmdk::backdrop { background: var(--scrim); }
.cmdk__in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: var(--rule-thick) solid var(--ink); }
.cmdk__in input { flex: 1; min-height: 56px; border: 0; background: transparent; outline: none; font-size: 17px; }
.cmdk__list { list-style: none; margin: 0; padding: 6px 0; max-height: 50vh; overflow: auto; }
.cmdk__list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; min-height: var(--tap); align-items: center; cursor: pointer; }
.cmdk__list li[aria-selected="true"] { background: var(--chart); box-shadow: inset 3px 0 0 var(--sea); }
.cmdk__group { font-size: var(--text-2xs); color: var(--ink-3); font-family: var(--font-num); }
.cmdk__foot { border-top: var(--rule-thin) solid var(--rule); padding: 8px 16px; font-size: var(--text-2xs); color: var(--ink-3); display: flex; gap: 16px; }

/* ---------- 下のタブ（スマホ） ---------- */
.tabs { display: none; }

/* ---------- ログイン ---------- */
.login { max-width: 420px; margin: 12vh auto 0; padding: 0 20px; }
.login form { background: var(--paper); border: var(--rule-thin) solid var(--ink); padding: 28px; display: grid; gap: 16px; margin-top: 20px; }
.login label { display: grid; gap: 6px; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.login input { min-height: var(--tap); border: var(--rule-thin) solid var(--rule-strong); background: var(--paper); padding: 0 12px; }
.login .logo { color: var(--sea); }
.login .logo__frame, .login .logo__mast { stroke: var(--sea); }
.err { color: var(--signal); font-size: var(--text-sm); margin: 0; min-height: 1.2em; }

/* ---------- スマホ ---------- */
@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .band__in { flex-wrap: nowrap; justify-content: space-between; gap: 12px; padding: 10px var(--gutter); min-height: 0; }
  .nav, .cmdk-open, .shop-btn__name { display: none; }
  .icon-btn { display: inline-flex; width: var(--tap); height: var(--tap); align-items: center; justify-content: center; background: transparent; border: var(--rule-thin) solid var(--sea-line); color: var(--chart); cursor: pointer; }
  .band__tools { flex: 0 0 auto; gap: 8px; }
  .shop-btn { min-height: var(--tap); }
  .logo__word { font-size: 15px; }
  .page { padding: 20px var(--gutter) calc(var(--tabs-h) + 32px); }
  .h1 { font-size: 28px; line-height: 1.25; }
  .lead { display: none; }
  .today { gap: 16px; padding-bottom: 14px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { padding: 12px 14px; }
  .tile__value { font-size: 20px; }
  .tile__value--text { font-size: var(--text-sm); }
  .tile--wide-only { display: none; }
  .tile:nth-child(2) { border-right: 0; }
  .cols { gap: 28px; margin-top: 20px; }
  .h2 { font-size: 17px; }
  .next li { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 14px 0; align-items: start; }
  .next__no { font-size: 20px; }
  .next__title { font-size: var(--text); }
  .next__detail { display: none; }
  .next .btn { grid-column: 2; justify-self: start; padding: 0 16px; }
  .ph .h1 { font-size: 28px; }
  .detail { position: static; }
  .tabs {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--paper); border-top: var(--rule-thick) solid var(--ink); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabs a { min-height: var(--tabs-h); display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--ink); }
  .tabs a[aria-current="page"] { background: var(--sea); color: var(--chart); font-weight: var(--weight-strong); }
  .shop-menu { right: 12px; }
}

/* ---------- お店の設定 ---------- */
.set { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px; padding: 28px 0; border-bottom: var(--rule-thin) solid var(--rule); }
.set__head .note { margin-top: 8px; }
.set__body { display: grid; gap: 20px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px 24px; }
.fld { display: grid; gap: 6px; min-width: 0; align-content: start; }
.fld label, .key label { font-size: var(--text-sm); font-weight: var(--weight-strong); }
.fld__in { display: flex; align-items: center; gap: 8px; }
.fld input, .fld select, .key input, .key textarea {
  width: 100%; min-height: var(--tap); border: var(--rule-thin) solid var(--rule-strong); background: var(--paper); padding: 0 12px; color: var(--ink);
}
.key textarea { padding: 10px 12px; font-family: var(--font-num); font-size: var(--text-xs); resize: vertical; }
.fld input:focus, .fld select:focus, .key input:focus, .key textarea:focus { border-color: var(--sea); outline: 2px solid var(--sea); outline-offset: -1px; }
.fld__unit { font-family: var(--font-num); color: var(--ink-3); font-size: var(--text-sm); }
.keys { display: grid; gap: 14px; border-top: var(--rule-thin) solid var(--ink); padding-top: 16px; }
.key { display: grid; grid-template-columns: 140px auto minmax(0, 1fr); gap: 12px; align-items: center; }
.key__in { display: flex; gap: 8px; min-width: 0; }
.facts { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: var(--text-sm); }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.save { display: flex; align-items: center; gap: 16px; padding: 28px 0; }
.save .msg { margin: 0; }
.yahoo-line { font-size: var(--text-xs); color: var(--ink-2); }
@media (max-width: 760px) {
  .set { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .key { grid-template-columns: minmax(0, 1fr) auto; }
  .key__in { grid-column: 1 / -1; }
  .facts { grid-template-columns: 110px minmax(0, 1fr); }
}

/* 今月の線の読み方 */
.legend { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: var(--rule-thin) dashed var(--rule); display: grid; gap: 6px; font-size: var(--text-xs); color: var(--ink-2); }
.legend li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.legend__val { color: var(--ink); }
.legend__mark { display: block; height: 14px; }
.legend__mark--now { width: 18px; height: 6px; background: var(--ink-3); }
.legend__mark--dash { width: 0; margin-left: 8px; border-left: var(--rule-thin) dashed var(--ink-3); }
.legend__mark--goal { width: 0; margin-left: 8px; border-left: var(--rule-thin) solid var(--ink); }
.legend__mark--band { width: 18px; height: 10px; background: var(--tide-soft); }
.legend__mark--mid { width: 3px; margin-left: 7px; background: var(--tide); }

/* 注文と発送 */
.row--order { grid-template-columns: 170px minmax(0, 1fr) 190px 110px; }
.list.no-amounts .row--order { grid-template-columns: 170px minmax(0, 1fr) 190px; }

/* 出品の門 */
.hits { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hit { padding-left: 12px; border-left: var(--rule-thick) solid var(--ink-3); }
.hit--block { border-left-color: var(--signal); }
.hit--review { border-left-style: dashed; }
.hit__word { margin: 0; font-weight: var(--weight-strong); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.hit__where { font-weight: var(--weight-body); font-size: var(--text-xs); color: var(--ink-3); }
.hit .note { margin: 4px 0 0; }
.hit__src { margin: 4px 0 0; font-size: var(--text-xs); overflow-wrap: anywhere; }
.ta { width: 100%; border: var(--rule-thin) solid var(--rule-strong); background: var(--paper); padding: 10px 12px; color: var(--ink); font: inherit; }

.pk { border-top: var(--rule-thin) solid var(--ink); padding-top: 16px; display: grid; gap: 12px; }
.pk input[type="file"] { min-height: var(--tap); }

/* 仕入れ先 Amazon */
.notice { border: var(--rule-thin) solid var(--signal); padding: 12px 16px; font-size: var(--text-sm); background: var(--paper); }
.notice p { margin: 0; }
.steps { margin: 0; padding-left: 1.4em; font-size: var(--text-sm); display: grid; gap: 4px; }
.cands { list-style: none; margin: 0; padding: 0; border-top: var(--rule-thin) solid var(--ink); }
.cand { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: var(--rule-thin) solid var(--rule); }
.cand p { margin: 0; }
.cand__main { display: grid; gap: 4px; min-width: 0; }
.cand__nums { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--text-sm); color: var(--ink-2); }
@media (max-width: 760px) { .cand { grid-template-columns: minmax(0, 1fr); } }

.check { display: flex; align-items: center; gap: 8px; min-height: var(--tap); font-weight: var(--weight-strong); }
.check input { width: 20px; height: 20px; }

/* ---------- 商品（2 万品の店） ---------- */
.page--wide { max-width: 1680px; }
.pbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 20px; }
.pbar__q { flex: 1 1 320px; }
.pbar__q input { width: 100%; min-height: var(--tap); border: var(--rule-thin) solid var(--rule-strong); background: var(--paper); padding: 0 12px; }
.pbar__q input:focus { border-color: var(--sea); outline: 2px solid var(--sea); outline-offset: -1px; }
.pbar__toggle { display: none; }
.pbar__view { display: flex; }
.pbar__view button { min-height: var(--tap); padding: 0 16px; background: var(--paper); border: var(--rule-thin) solid var(--rule-strong); cursor: pointer; }
.pbar__view button + button { border-left: 0; }
.pbar__view button[aria-pressed="true"] { background: var(--ink); color: var(--chart); border-color: var(--ink); }
.pgrid { display: grid; grid-template-columns: 250px minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.pside { position: sticky; top: calc(var(--band-h) + 16px); max-height: calc(100vh - var(--band-h) - 32px); overflow: auto; border-top: var(--rule-thin) solid var(--ink); padding-top: 12px; }
.pside__sel { display: grid; gap: 10px; margin-bottom: 18px; }
.pside__sel label { display: grid; gap: 4px; font-size: var(--text-xs); color: var(--ink-3); font-weight: var(--weight-strong); }
.pside__sel select { min-height: 40px; border: var(--rule-thin) solid var(--rule-strong); background: var(--paper); padding: 0 8px; color: var(--ink); font-size: var(--text-sm); }
.pside__h { margin-bottom: 6px; }
.ctree ul { list-style: none; margin: 0; padding: 0; }
.ctree__kids { padding-left: 14px !important; border-left: var(--rule-thin) dashed var(--rule); margin-left: 9px !important; }
.ctree li { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; }
.ctree li > ul { grid-column: 1 / -1; }
.ctree__tg, .ctree__sp { width: 20px; min-height: 34px; background: none; border: 0; color: var(--ink-3); cursor: pointer; padding: 0; }
.ctree__tg[aria-expanded="true"] { transform: rotate(90deg); }
.ctree__name, .ctree__all { display: flex; justify-content: space-between; gap: 8px; width: 100%; min-height: 34px; align-items: center; padding: 2px 6px;
  background: none; border: 0; text-align: left; cursor: pointer; font-size: var(--text-sm); color: var(--ink); }
.ctree__name:hover, .ctree__all:hover { background: var(--paper); }
.ctree__name[aria-current="true"], .ctree__all[aria-current="true"] { background: var(--paper); box-shadow: inset 3px 0 0 var(--tide); font-weight: var(--weight-strong); }
.ctree__name span:first-child { overflow-wrap: anywhere; }
.ctree__n { color: var(--ink-3); font-size: var(--text-2xs); }
.ctree__read { margin-top: 10px; font-size: var(--text-xs); }
.thumb--img { object-fit: cover; background: var(--thumb); }
.list--tile { min-width: 0; border-top: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.tile-card { display: grid; gap: 6px; align-content: start; padding: 10px; background: var(--paper); border: var(--rule-thin) solid var(--rule); text-align: left; cursor: pointer; min-width: 0; }
.tile-card:hover { border-color: var(--ink-3); }
.tile-card[aria-current="true"] { outline: 2px solid var(--tide); outline-offset: -2px; }
.thumb--tile { width: 100%; height: auto; aspect-ratio: 1 / 1; display: block; }
.tile-card__name { font-weight: var(--weight-strong); font-size: var(--text-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 24px 0; }
.pager__at { color: var(--ink-2); font-size: var(--text-sm); }
.detail__close { display: none; }
@media (max-width: 1100px) {
  .pgrid { grid-template-columns: 230px minmax(0, 1fr); }
  .pgrid > .detail { grid-column: 1 / -1; position: static; }
  .detail__close { display: block; }
}
@media (max-width: 760px) {
  .pgrid { grid-template-columns: minmax(0, 1fr); }
  .pbar__toggle { display: inline-flex; }
  .pside { display: none; position: static; max-height: none; }
  body.filters-open .pside { display: block; }
  .list--tile { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .list .row { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .list .row > :nth-child(4), .list.no-amounts .row > :nth-child(4):not(.state) { display: none; }
  .list .row--head { display: none; }
  .list:not(.list--tile) { min-width: 0; }
  .row .thumb { width: 56px; height: 56px; }
}

.own-note { margin: 0; padding: 10px 12px; border: var(--rule-thin) dashed var(--ink-3); font-weight: var(--weight-strong); color: var(--ink-2); }
.origin-tag { display: inline-block; font-size: var(--text-2xs); color: var(--ink-3); border: var(--rule-thin) solid var(--rule); padding: 0 6px; }

/* 注文と発送：流れ（発注 → 入荷 → 発送）・送り状のまとめ */
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--text-xs); }
.flow li { padding: 2px 10px; border: var(--rule-thin) solid var(--rule); color: var(--ink-3); }
.flow li[aria-current="step"] { border-color: var(--ink); color: var(--ink); font-weight: var(--weight-strong); }
.flow li.is-done { color: var(--ink-2); border-style: dashed; }
.step-form { display: grid; gap: 12px; }
.copy-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: var(--text-sm); }
.copy-row dt { color: var(--ink-3); }
.copy-row dd { margin: 0; overflow-wrap: anywhere; }
.labels { border: var(--rule-thin) solid var(--ink); padding: 12px 16px; margin: 0 0 16px; display: grid; gap: 10px; }
.labels ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--text-sm); }
.labels label { display: flex; gap: 8px; align-items: center; }
.ch-tag { display: inline-block; font-size: var(--text-2xs); border: var(--rule-thin) solid var(--rule-strong); padding: 0 6px; margin-right: 6px; }
.warn-box { border: var(--rule-thick) solid var(--signal); padding: 14px 16px; display: grid; gap: 8px; font-size: var(--text-sm); }
.warn-box ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }

/* 申し込み・はじめの設定 */
.login--wide { max-width: 600px; margin-top: 6vh; padding-bottom: 48px; }
.login label.check { display: flex; align-items: flex-start; gap: 8px; font-weight: var(--weight-body); }
.login .check input { min-height: auto; margin-top: 4px; }
.apply__ch { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.apply__ch legend { font-size: var(--text-sm); font-weight: var(--weight-strong); margin-bottom: 4px; }
.apply__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.terms { display: grid; gap: 16px; }
.terms article { border-top: var(--rule-thin) solid var(--rule); padding-top: 12px; }
.terms p { margin: 4px 0 0; font-size: var(--text-sm); }
.plan-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: 8px; align-items: end; }
.plan-row .fld span { font-size: var(--text-2xs); color: var(--ink-3); }
.invoice { border: var(--rule-thin) solid var(--rule); background: var(--paper); padding: 12px 16px; margin-top: 8px; display: grid; gap: 10px; }

/* 商品ページの下書き */
.facts-pre { margin: 0; white-space: pre-wrap; font-family: var(--font-ja); font-size: var(--text-sm); background: var(--paper); border: var(--rule-thin) solid var(--rule); padding: 10px 12px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs img { width: 96px; height: 96px; object-fit: contain; background: var(--paper); border: var(--rule-thin) solid var(--rule); }

/* 月のまとめ（印刷して PDF にもする） */
.report { display: grid; gap: 14px; }
.report__ai { margin: 0; padding: 12px 16px; border-left: var(--rule-thick) solid var(--tide); background: var(--paper); }
@media print {
  .band, .tabs, .ph__actions, #msg, .cmdk { display: none !important; }
  .page { padding: 0; }
  body { background: var(--paper); }
}

/* 問い合わせ */
.cand--wide { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.talk { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.talk li { padding: 8px 12px; border: var(--rule-thin) solid var(--rule); background: var(--paper); }
.talk p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.talk__shop { border-left: var(--rule-thick) solid var(--tide) !important; }
