:root { --bg:#f6f7f9; --card:#fff; --line:#dfe3e8; --text:#1f2933; --muted:#6b7280; --warn:#b45309; --accent:#2563eb; }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif; font-size:16px; color:var(--text); background:var(--bg); }
header.top { display:flex; flex-wrap:wrap; gap:12px; align-items:center; padding:10px 16px; background:#fff; border-bottom:1px solid var(--line); }
.brand { font-weight:700; }
.brand .ver { color:var(--muted); font-weight:400; font-size:16px; margin-left:4px; }
nav a { margin-right:14px; text-decoration:none; color:var(--text); padding:6px 2px; border-bottom:2px solid transparent; }
nav a.on { border-bottom-color:var(--accent); color:var(--accent); }
.mode { margin-left:auto; display:flex; gap:6px; flex-wrap:wrap; }
.pill { font-size:16px; padding:3px 8px; border:1px solid var(--line); border-radius:999px; background:#fff; }
.pill.warn { border-color:var(--warn); color:var(--warn); }
.pill.muted { color:var(--muted); }
main { padding:16px; max-width:1400px; margin:0 auto; }
h1 { font-size:20px; margin:8px 0 12px; }
h1 small, h2 small { font-size:16px; color:var(--muted); font-weight:400; margin-left:8px; }
h2 { font-size:16px; margin:20px 0 8px; }
.head-row { display:flex; flex-wrap:wrap; align-items:center; gap:12px; justify-content:space-between; }
form.inline { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
input, select, button { font: inherit; padding:6px 8px; border:1px solid var(--line); border-radius:6px; background:#fff; }
button { cursor:pointer; }
button:hover { border-color:var(--accent); }
.tiles { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap:12px; }
.tile { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:12px 14px; }
.tile .k { color:var(--muted); font-size:16px; }
.tile .v { font-size:24px; font-weight:700; margin:4px 0; }
.tile .s { font-size:16px; color:var(--muted); }
.warn-text { color:var(--warn); }
table.grid { width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--line); }
table.grid th, table.grid td { padding:6px 8px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
table.grid th { background:#f1f3f5; font-weight:600; font-size:16px; white-space:nowrap; }
td.num { text-align:right; white-space:nowrap; }
td.mono, .mono { font-family: ui-monospace, Consolas, monospace; font-size:16px; }
.small { font-size:16px; }
td.title { min-width:240px; }
.scroll { overflow-x:auto; }
footer.foot { padding:12px 16px; color:var(--muted); font-size:16px; }
@media (max-width: 640px) { main { padding:10px; } .tile .v { font-size:20px; } }

/* P2 在庫一覧 */
form.filters { display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; background:#fff; border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin:10px 0; font-size:16px; }
form.filters label { display:inline-flex; gap:4px; align-items:center; white-space:nowrap; }
.w60 { width:60px; } .w80 { width:80px; } .w90 { width:90px; } .wide { width:100%; box-sizing:border-box; }
.bulk { display:flex; flex-wrap:wrap; gap:8px 10px; align-items:center; background:#fffbe6; border:1px solid #f0e0a0; border-radius:10px; padding:8px 12px; margin:8px 0; font-size:16px; }
.bulk .sep { width:1px; height:20px; background:var(--line); }
.btn { display:inline-block; padding:6px 10px; border:1px solid var(--line); border-radius:6px; background:#fff; text-decoration:none; color:var(--text); font-size:16px; }
.btn:hover { border-color:var(--accent); }
button.warn { border-color:var(--warn); color:var(--warn); }
.badge { display:inline-block; padding:1px 6px; border-radius:999px; background:#e8f0fe; color:#1a4fd0; font-size:16px; }
.ok { color:#1a7f37; }
.muted { color:var(--muted); }
table.inv td { font-size:16px; }
table.inv input[type=number] { padding:3px 4px; font-size:16px; }
table.inv select { padding:3px 4px; font-size:16px; }
a.sort { color:inherit; text-decoration:none; } a.sort.on { color:var(--accent); }
nav.pager { display:flex; gap:12px; align-items:center; padding:10px 0; }
.detail-grid { display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.card { background:#fff; border:1px solid var(--line); border-radius:10px; padding:12px 14px; }
.card h2 { margin-top:0; }
table.kv th { text-align:left; color:var(--muted); font-weight:500; padding:3px 10px 3px 0; white-space:nowrap; vertical-align:top; font-size:16px; }
table.kv td { padding:3px 0; font-size:16px; }
.thumb { max-width:160px; max-height:160px; float:right; margin-left:10px; border:1px solid var(--line); }
pre.note { white-space:pre-wrap; font: inherit; font-size:16px; background:#f8f9fa; padding:8px; border-radius:6px; max-height:240px; overflow:auto; }

/* P3 価格改定 */
.w200 { width:200px; }
form.policy table.kv input, form.policy table.kv select { font-size:16px; padding:3px 4px; }
form.policy details { margin:8px 0; }
form.policy summary { cursor:pointer; font-size:16px; color:var(--muted); }
tr.me td { background:#fff8e1; }
.card h3 { margin:14px 0 6px; font-size:16px; }

/* P4 商品登録 */
nav.subnav { display:flex; flex-wrap:wrap; gap:6px 14px; align-items:center; margin:6px 0 10px; }
nav.subnav a { color:var(--muted); text-decoration:none; padding:2px 0; border-bottom:2px solid transparent; }
nav.subnav a.on { color:var(--accent); border-bottom-color:var(--accent); }
.pill.warn { background:#fff1e6; color:#b45309; }

/* P5 注文・分析 */
svg.chart { width:100%; height:auto; background:#fff; }
tr.muted td { color:var(--muted); }
table.inv details summary { cursor:pointer; color:var(--accent); }

/* P6 リサーチ */
.speed { display:inline-block; min-width:26px; padding:1px 7px; border-radius:10px; background:#e8f0fe; color:#1a4fd0; font-weight:600; text-align:center; }
.speed.hot { background:#fde8e8; color:#b91c1c; }
.speed.zero { background:#f1f3f4; color:#666; }
svg.chart polyline.rank { stroke:#7c3aed; }
svg.chart circle { fill:#fff; stroke-width:1.5; }
table.grid img.mini { width:40px; height:40px; object-fit:contain; border:1px solid var(--line); background:#fff; }
.stockbar { display:flex; gap:1px; }
.stockbar span { width:8px; height:14px; background:#e5e7eb; display:inline-block; }
.stockbar span.in { background:#1a7f37; }
.stockbar span.none { background:#fff; border:1px solid #e5e7eb; box-sizing:border-box; }

/* P8 設定・認証 */
[hidden] { display: none !important; }
.login-body { display:flex; align-items:center; justify-content:center; min-height:100vh; margin:0; }
.login-box { background:#fff; border:1px solid var(--line); border-radius:10px; padding:20px 24px; min-width:320px; }
.login-box h1 { font-size:18px; margin:0 0 6px; }
header.top form.inline { display:inline; }
table.grid td label { cursor:pointer; }

/* Selltact workspace: shared across all operational screens. */
:root { --bg:#f3f6f7; --card:#fff; --text:#233942; --muted:#647780; --line:#dce5e8; --accent:#087c76; --warn:#a65012; --sidebar:#142b35; --sidebar-width:236px; }
html { scroll-padding-top:88px; }
body { font-size:16px; line-height:1.65; -webkit-font-smoothing:antialiased; }
a { color:var(--accent); text-underline-offset:3px; }
a:hover { color:#075d59; }
button, input, select, textarea, .btn { font:inherit; }
:focus-visible { outline:3px solid #159f96; outline-offset:3px; }
.skip-link { position:fixed; z-index:100; top:8px; left:12px; transform:translateY(-150%); padding:10px 18px; background:white; border-radius:8px; }
.skip-link:focus { transform:none; }
.sidebar { position:fixed; inset:0 auto 0 0; width:var(--sidebar-width); background:var(--sidebar); color:#d6e2e6; display:flex; flex-direction:column; z-index:40; padding:30px 16px 20px; overflow-y:auto; }
.brand { display:flex; align-items:center; gap:12px; padding:0 10px 22px; color:#fff; text-decoration:none; font-size:22px; letter-spacing:.03em; line-height:1.25; flex-shrink:0; }
.brand:hover { color:#fff; }
.brand small { display:block; margin-top:6px; color:#92b4ba; font-size:16px; letter-spacing:.22em; font-weight:500; }
.brand-mark { position:relative; display:grid; place-items:center; width:40px; height:42px; background:#74d8bd; border-radius:12px; color:#142b35; font-size:28px; font-weight:800; flex-shrink:0; }
.brand-mark span { position:absolute; font-size:16px; right:3px; top:0; }
.side-nav { display:flex; flex-direction:column; gap:4px; }
.nav-label { font-size:16px; font-weight:600; letter-spacing:.12em; color:#9bb4bd; padding:22px 14px 8px; }
.nav-label:first-child { padding-top:8px; }
.side-nav .nav-link { display:flex; align-items:center; gap:12px; margin:0; padding:10px 13px; min-height:44px; border:0; border-radius:8px; color:#c6d8dd; font-size:16px; text-decoration:none; transition:background .15s; }
.side-nav .nav-link svg { flex-shrink:0; opacity:.85; }
.side-nav .nav-link:hover { color:#fff; background:#213e49; }
.side-nav .nav-link.on { color:#e2fff4; background:#28534f; font-weight:600; box-shadow:inset 3px 0 #8de7c9; }
.sidebar-foot { padding:26px 12px 0; margin-top:auto; font-size:16px; color:#a4bfc6; }
.sidebar-foot small { display:block; margin-top:8px; font-size:16px; color:#93acb4; }
.sidebar-dot, .status-dot { display:inline-block; width:6px; height:6px; border-radius:50%; background:#80daba; margin-right:7px; vertical-align:middle; }
.workspace { margin-left:var(--sidebar-width); min-width:0; }
.workspace-bar { min-height:76px; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:16px 32px; background:#fff; border-bottom:1px solid var(--line); }
.breadcrumb { display:flex; align-items:center; gap:12px; font-size:16px; white-space:nowrap; }
.breadcrumb > span { color:var(--muted); }
.breadcrumb strong { font-weight:600; }
.mode { align-items:center; gap:12px; }
.pill { display:inline-flex; align-items:center; font-size:16px; padding:5px 10px; line-height:1.5; }
.mode-readonly { background:#f1f6f7; border-color:#e1eaed; color:#42616c; }
.mode-readonly .status-dot { background:#688995; }
.pill.warn .status-dot { background:#c66f26; }
.header-date { color:var(--muted); font-size:16px; white-space:nowrap; }
.menu-toggle { display:none; }
main { max-width:1640px; padding:30px 32px 40px; margin:0 auto; min-width:0; }
h1 { font-size:26px; line-height:1.45; letter-spacing:-.025em; margin:0 0 20px; font-weight:700; }
h1 small { display:block; font-size:16px; line-height:1.8; margin:8px 0 0; font-weight:400; letter-spacing:0; max-width:900px; }
h2 { font-size:17px; margin:28px 0 14px; letter-spacing:.015em; }
h2 small { display:inline-block; margin-left:10px; font-size:16px; }
h3 { font-size:16px; }
.head-row { margin-bottom:8px; gap:14px; }
.head-row h1 { margin-bottom:12px; }
.head-row input[type=number] { width:90px; }
.section-heading { display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin-top:28px; }
.section-heading h2 { margin:0 0 14px; }
.section-heading a { font-size:16px; }
.eyebrow { display:block; font-size:16px; font-weight:700; letter-spacing:.15em; color:var(--accent); margin-bottom:6px; }
.tiles { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:18px 0 24px; }
.tile { border-radius:12px; padding:20px 22px; box-shadow:0 2px 3px #142b3503; min-width:0; }
.tile .k { font-size:16px; font-weight:500; }
.tile .v { font-size:30px; font-weight:650; line-height:1.25; letter-spacing:-.035em; margin:10px 0 8px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.tile .s { line-height:1.65; font-size:16px; }
.tile.featured { background:#183b43; border-color:#183b43; }
.tile.featured .k, .tile.featured .s { color:#c1d8dd; }
.tile.featured .v { color:#e5fff2; }
.tile.featured .warn-text { color:#ffcd8b; }
.tile.highlight { background:#edf8f3; border-color:#c8e8d9; }
.tile.highlight .v { color:#096955; }
.card, .panel { background:var(--card); padding:22px 24px; border:1px solid var(--line); border-radius:12px; min-width:0; }
.detail-grid > * { min-width:0; }
.card h2, .panel h2 { margin-top:0; }
.panel { margin-bottom:22px; }
.attention-panel { display:flex; align-items:flex-start; gap:16px; background:#fffaf1; border-color:#efdcbc; }
.attention-icon { display:grid; place-items:center; width:32px; height:32px; border-radius:9px; color:#9c5b18; background:#fce9c6; font-weight:700; flex-shrink:0; }
.attention-panel h2 { color:#7c471b; margin:0 0 5px; font-size:16px; }
.attention-panel p { margin:0; font-size:16px; }
.attention-panel details { margin-top:10px; font-size:16px; }
input, select, textarea { color:var(--text); background:#fff; border:1px solid #cbd9df; border-radius:7px; padding:8px 10px; max-width:100%; min-height:38px; }
textarea { width:100%; line-height:1.6; }
input::placeholder, textarea::placeholder { color:#788d95; }
input[type=checkbox], input[type=radio] { min-height:auto; accent-color:var(--accent); }
button, .btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:8px 13px; min-height:38px; font-size:16px; font-weight:600; line-height:1.5; border-radius:7px; transition:background .15s; }
button { background:var(--accent); border:1px solid var(--accent); color:#fff; }
button:hover { background:#076761; border-color:#076761; }
button:disabled { opacity:.55; cursor:not-allowed; }
.btn, button.secondary { background:#fff; color:#3e5861; border-color:#cbd9df; }
.btn:hover, button.secondary:hover { background:#eff7f6; color:#076761; }
button.warn { background:#fff8ef; border-color:#e1bc92; color:#98500f; }
form.filters { padding:18px; margin:18px 0; gap:12px 16px; font-size:16px; border-radius:12px; }
form.filters label { gap:8px; flex-wrap:wrap; }
form.inline { gap:10px; }
.bulk { background:#fff9ec; border-color:#ead8a9; padding:14px 16px; gap:12px; }
nav.subnav { gap:8px 24px; margin:10px 0 22px; border-bottom:1px solid var(--line); }
nav.subnav a { margin:0; padding:10px 0; font-size:16px; }
nav.subnav a.on { color:var(--accent); border-color:var(--accent); font-weight:600; }
.scroll { width:100%; max-width:100%; overflow:auto; border:1px solid var(--line); border-radius:10px; background:#fff; margin:14px 0; }
.scroll > table.grid { border:0; margin:0; }
table.grid { font-size:16px; border-collapse:separate; border-spacing:0; }
table.grid th { background:#f8fafb; color:#627a84; font-size:16px; font-weight:600; letter-spacing:.025em; }
table.grid th, table.grid td { padding:13px 15px; vertical-align:middle; }
table.grid tbody tr:last-child td { border-bottom:0; }
table.grid tbody tr:hover > td { background:#f8fbfb; }
table.inv td { font-size:16px; }
table.inv input[type=number], table.inv select { font-size:16px; padding:6px 8px; }
table.grid td.num { text-align:right; font-variant-numeric:tabular-nums; }
td.title { min-width:220px; }
td.mono, .mono { font-size:16px; overflow-wrap:anywhere; }
.small { font-size:16px; }
.badge { font-size:16px; padding:3px 8px; background:#e8f4f2; color:#17675f; font-weight:600; white-space:nowrap; }
.badge.neutral { background:#eef2f5; color:#4c6672; }
.badge.warning { background:#fff0d9; color:#9a5111; }
.badge.positive { background:#e5f5e9; color:#21683d; }
.order-table { min-width:980px; }
.order-product { display:flex; gap:12px; align-items:center; }
.order-product img { width:96px; height:112px; object-fit:contain; flex:0 0 96px; border:1px solid var(--line); border-radius:9px; background:#fff; }
.order-product a { color:var(--text); text-decoration:none; font-weight:600; }
.order-product a:hover { color:var(--accent); text-decoration:underline; }
.order-product .product-name { max-width:280px; min-width:150px; line-height:1.6; }
.order-secondary { display:block; margin-top:4px; font-size:16px; color:var(--muted); }
.amount { white-space:nowrap; font-weight:650; font-variant-numeric:tabular-nums; }
.order-detail-row > td { padding:0 !important; }
.order-detail-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; padding:24px; background:#f1f7f7; border-bottom:1px solid var(--line); }
.order-detail-grid h3 { margin:0 0 14px; }
.order-detail-grid p { font-size:16px; margin:8px 0; }
.order-detail-grid table.kv { width:100%; }
.order-detail-grid table.kv th, .order-detail-grid table.kv td { padding:6px 0; border:0; background:transparent; font-size:16px; }
.order-detail-grid table.kv td { text-align:right; }
.detail-links { display:flex; gap:10px 16px; flex-wrap:wrap; margin-top:14px; font-size:16px; }
.detail-note { padding:10px 14px; border-left:3px solid #8db8b2; background:#f0f6f5; }
.empty-state { text-align:center !important; padding:50px 24px !important; color:var(--muted); }
.pager { justify-content:flex-end; font-size:16px; }
.pager a { margin:0; }
summary { cursor:pointer; color:var(--accent); font-size:16px; }
details[open] > summary { margin-bottom:12px; }
pre.note { padding:14px; font-size:16px; }
.foot { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; margin:0 32px; border-top:1px solid var(--line); padding:18px 0; font-size:16px; }
.login-body { background:#142b35; padding:20px; }
.login-box { width:440px; max-width:100%; min-width:0; padding:36px; border-radius:18px; box-shadow:0 24px 80px #0003; }
.login-box h1 { font-size:28px; margin-bottom:14px; }
.login-box .brand-mark { margin-bottom:20px; }
.login-box form { margin-top:24px; }
.login-box label { display:block; margin:16px 0; font-size:16px; }
.login-box input { display:block; width:100%; margin-top:6px; }
.login-box button { width:100%; margin-top:8px; }
@media (min-width:1800px) { :root { --sidebar-width:252px; } main { padding:40px 48px; } }
@media (max-width:1200px) { main { padding:24px; } .workspace-bar { padding:16px 24px; } .header-date { display:none; } .breadcrumb > span { display:none; } .tiles { gap:12px; } .tile { padding:18px; } .tile .v { font-size:27px; } }
@media (max-width:900px) {
  .sidebar { position:relative; width:100%; padding:20px; }
  .sidebar .brand { padding-bottom:8px; }
  .sidebar-foot { display:block; }
  .workspace { margin-left:0; }
  .nav-enhanced .sidebar { display:none; position:fixed; inset:70px auto 0 0; width:260px; box-shadow:12px 0 35px #142b3526; }
  .nav-enhanced .menu-open .sidebar { display:flex; }
  .menu-toggle { display:inline-flex; background:#fff; color:var(--text); border:1px solid var(--line); font-size:18px; min-width:42px; }
  .workspace-bar { min-height:70px; padding:12px 20px; position:sticky; top:0; z-index:45; }
  .mode { margin-left:auto; gap:6px; }
  main { padding:24px 20px; }
  .foot { margin:0 20px; }
}
@media (max-width:600px) {
  .workspace-bar { padding:10px 14px; gap:10px; }
  .breadcrumb { font-size:16px; white-space:normal; }
  .mode .pill { font-size:16px; padding:5px 7px; }
  .mode > .pill.muted { display:none; }
  main { padding:22px 14px; }
  h1 { font-size:23px; }
  h1 small { font-size:16px; }
  .tiles { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .tile { padding:15px 13px; }
  .tile .v { font-size:24px; }
  .tile .k, .tile .s { font-size:16px; }
  form.filters { padding:14px; gap:12px; }
  form.filters label { white-space:normal; max-width:100%; }
  form.filters input[type=search], form.filters input[type=text] { width:100%; }
  form.filters .custom { display:flex; gap:6px; flex-wrap:wrap; }
  .card, .panel { padding:18px; }
  .attention-panel { gap:10px; }
  nav.subnav { gap:0 18px; }
  nav.subnav a { font-size:16px; }
  .foot { margin:0 14px; }
  .login-box { padding:26px; }
}
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { transition:none !important; scroll-behavior:auto !important; } }
@media print {
  .sidebar, .workspace-bar, .foot, .skip-link, [data-row-toggle] { display:none !important; }
  .workspace { margin:0; } main { padding:0; max-width:none; }
  .scroll { overflow:visible; border:0; } .tile { break-inside:avoid; box-shadow:none; }
}

/* Task-oriented worklists. Controls share the existing form/API contracts. */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.btn.primary { background:var(--accent); border-color:var(--accent); color:#fff; }
.work-launcher { display:flex; flex-wrap:wrap; align-items:center; gap:24px; justify-content:space-between; padding-bottom:28px; margin-bottom:24px; border-bottom:1px solid var(--line); }
.work-launcher h1 { margin:0 0 5px; }
.work-launcher p { margin:0; color:var(--muted); font-size:16px; }
.launch-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.launch-actions a { display:flex; flex-direction:column; gap:5px; padding:17px 20px; min-width:160px; color:var(--text); text-decoration:none; background:#fff; border:1px solid var(--line); border-radius:10px; }
.launch-actions a:hover { border-color:var(--accent); background:#f2faf7; }
.launch-actions strong { font-size:16px; }
.launch-actions span { color:var(--muted); font-size:16px; }
.overview-heading { margin:0 0 10px; font-size:19px; }
.overview-heading small { display:block; margin:6px 0 0; line-height:1.7; }
.work-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) minmax(160px,.8fr); align-items:center; gap:16px; padding:18px 22px; margin:16px 0; border:1px solid var(--line); border-radius:10px; background:#fff; }
.order-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
.order-metrics > div:last-child { border-right:0; }
.nav-link { position:relative; }
.order-unread-dot { position:absolute; top:9px; right:10px; width:11px; height:11px; border-radius:50%; background:#ffb45b; box-shadow:0 0 0 2px var(--sidebar); }
.order-unread-dot[hidden] { display:none; }
.order-cost-form { display:flex; flex-direction:column; align-items:stretch; gap:6px; max-width:132px; }
.order-cost-form input { width:100%; min-width:0; padding:8px; font-size:18px; text-align:right; }
.order-cost-form button { padding:6px 10px; min-height:36px; }
.cost-save-status { display:block; min-height:1.4em; font-size:16px; color:#347367; line-height:1.4; }
.order-cost-form .cost-save-retry[hidden] { display:none; }
.asin-total b { color:var(--text); }
.order-summary { scroll-margin-top:100px; }
.order-summary.is-new-order { background:#fff9e5; border-color:#e7cc7b; }
table.grid .order-summary.is-new-order > td { background:#fff9e5; }
table.grid .order-summary.is-new-order:hover > td { background:#fff3ce; }
.order-new-label { background:#ffe7a0; color:#694700; border:1px solid #e5c36a; margin-right:6px; }
.order-new-label[hidden] { display:none; }
.order-date-stack { display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.order-timestamp { display:flex; flex-wrap:wrap; column-gap:6px; }
.order-timestamp > span { white-space:nowrap; }
.order-date-stack .order-new-label { margin-right:0; }
@media (max-width:700px) { .order-date-stack { flex-basis:100%; } }
.work-metrics > div { min-width:0; border-right:1px solid var(--line); padding-right:16px; }
.work-metrics > div > span, .work-metrics small { display:block; color:var(--muted); font-size:16px; }
.work-metrics strong { display:block; font-size:24px; line-height:1.4; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; color:#175c55; }
.metrics-breakdown > summary { font-size:16px; }
.metrics-breakdown[open] { grid-column:1/-1; border-top:1px solid var(--line); padding-top:14px; }
.metrics-breakdown > div { font-size:16px; }
.metrics-breakdown p { margin:5px 0; }
.task-filters { padding:14px 16px !important; gap:10px 14px !important; }
.search-field { flex:1 1 250px; }
.search-field input { width:100%; min-width:120px; }
.advanced-filters { margin-left:auto; }
.advanced-filters[open] { flex:1 0 100%; }
.advanced-filters > div, .bulk-details > div { display:flex; flex-wrap:wrap; align-items:center; gap:14px 18px; padding:16px 0 2px; border-top:1px solid var(--line); }
.advanced-filters summary { padding:8px 0; }
.filter-presets { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:12px 0 18px; }
.filter-presets a { margin:0; border:1px solid transparent; border-radius:7px; padding:7px 12px; color:#48616b; background:#e8eff1; font-size:16px; text-decoration:none; }
.filter-presets a:hover { border-color:#98b9b4; }
.filter-presets a.on { background:#deeee9; color:#096357; border-color:#a8cec1; font-weight:650; }
.filter-presets .clear-filter { margin-left:auto; background:transparent; font-size:16px; color:var(--muted); }
.active-condition { padding:5px 10px; border:1px solid #a8cec1; border-radius:7px; font-size:16px; color:var(--accent); }
.mobile-filter-panel > summary { display:none; }
.worklist-scroll { margin-top:10px; }
.worklist-scroll + .pager { padding-top:0; }
.section-heading { margin-top:18px; }
.inventory-worklist { min-width:940px; }
.inventory-worklist .product-cell { min-width:220px; max-width:320px; }
.product-title { display:block; max-width:310px; color:var(--text); text-decoration:none; line-height:1.6; font-weight:600; }
.product-title:hover { color:var(--accent); text-decoration:underline; }
.selection-cell { width:42px; }
.inventory-worklist input.sel, #sel-all { width:17px; height:17px; cursor:pointer; }
.row-action { white-space:nowrap; }
.field-label { display:flex; flex-direction:column; gap:5px; font-size:16px; margin:12px 0; }
.field-label input, .field-label select { width:100%; }
.field-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.dirty-marker { display:block; color:#a25b18; font-size:16px; margin-top:6px; }
table.grid .is-selected > td { background:#edf8f3; }
#bulk-bar { display:block; background:#f0f8f5; border-color:#b4d9c9; padding:14px 18px; margin:12px 0; }
.selection-heading { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.selection-heading button { margin-left:auto; }
.bulk-details { display:inline-block; margin:12px 22px 8px 0; }
.bulk-details[open] { display:block; margin-right:0; }
.bulk-details label { display:inline-flex; align-items:center; flex-wrap:wrap; gap:6px; }
#bulk-bar > .small { display:block; margin-top:6px; }
.inbound-workspace { margin-top:22px; }
.inbound-workspace .card { padding-bottom:14px; }
.inbound-create, .address-setup { margin:20px 0; }
.inbound-create > summary, .address-setup > summary { font-size:16px; font-weight:650; }
.address-setup > summary .badge, .address-setup > summary .small { margin-left:12px; }
.inbound-basics { display:flex; flex-wrap:wrap; gap:16px; align-items:end; }
.inbound-basics > label { display:flex; flex-direction:column; gap:6px; font-size:16px; flex:1 1 150px; }
.inbound-basics input, .inbound-basics select { width:100%; }
.inbound-product-search { display:flex; align-items:center; flex-wrap:wrap; gap:16px; margin:22px 0 10px; }
.inbound-product-search label { display:flex; align-items:center; flex-wrap:wrap; gap:10px; font-size:16px; }
.inbound-product-search input { width:290px; }
.draft-submit { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px; padding:16px 0; }
.inbound-create .scroll { max-height:500px; }
.inbound-create table th { position:sticky; top:0; z-index:1; }
@media (max-width:1200px) { .work-launcher { display:block; } .launch-actions { margin-top:18px; } .work-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); } .metrics-breakdown { grid-column:1/-1; } }
@media (max-width:700px) {
  .mobile-filter-panel > summary { display:list-item; padding:13px 16px; margin:12px 0; background:#fff; border:1px solid var(--line); border-radius:8px; font-size:16px; }
  .mobile-filter-panel > summary > span { display:block; margin:4px 0 0 15px; font-size:16px; color:var(--muted); overflow-wrap:anywhere; }
  .work-launcher { padding-bottom:20px; margin-bottom:20px; }
  .launch-actions { grid-template-columns:1fr; gap:8px; }
  .launch-actions a { flex-direction:row; align-items:center; justify-content:space-between; padding:13px 16px; min-width:0; }
  .launch-actions strong { font-size:16px; }
  .work-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:14px 12px; }
  .work-metrics > div { padding-right:8px; }
  .work-metrics > div:last-of-type { border-right:0; }
  .work-metrics strong { font-size:19px; }
  .work-metrics > div > span, .work-metrics small { font-size:16px; }
  .task-filters .search-field { flex-basis:100%; }
  .advanced-filters { margin-left:0; }
  .filter-presets { gap:6px; }
  .filter-presets a { padding:7px 10px; font-size:16px; }
  .filter-presets .clear-filter { margin-left:0; }
  .worklist-scroll { overflow:visible; background:transparent; border:0; border-radius:0; }
  .order-table, .inventory-worklist { display:block; min-width:0; width:100%; border:0; background:transparent !important; }
  .order-table thead, .inventory-worklist thead { position:absolute; width:1px; height:1px; padding:0; margin:-1px; clip:rect(0,0,0,0); overflow:hidden; }
  .order-table tbody, .inventory-worklist tbody { display:block; }
  .order-summary, .inventory-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0; background:#fff; border:1px solid var(--line); border-radius:11px; margin-top:14px; overflow:hidden; }
  .order-summary > td, .inventory-summary > td { display:block; min-width:0; border-bottom:0 !important; text-align:left !important; padding:11px 15px !important; white-space:normal; }
  .order-summary > td::before, .inventory-summary > td[data-label]::before { content:attr(data-label); display:block; color:var(--muted); font-size:16px; margin-bottom:4px; }
  .order-summary > td:nth-child(2) { order:-2; grid-column:1/-1; padding-top:16px !important; border-bottom:1px solid var(--line) !important; }
  .order-summary > td:nth-child(2)::before, .order-summary > td:last-child::before { display:none; }
  .order-summary > td:first-child { order:-1; grid-column:1/-1; display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding-bottom:4px !important; }
  .order-summary > td:first-child::before { display:none; }
  .order-product .product-name { min-width:0; max-width:none; font-size:16px; }
  .order-summary .order-secondary { white-space:normal; }
  .order-summary > td:last-child { display:flex; align-items:end; }
  .order-summary > td:last-child button { width:100%; }
  .inventory-summary { grid-template-columns:repeat(2,minmax(0,1fr)); position:relative; }
  .inventory-summary > .selection-cell { grid-column:1/-1; width:auto; padding:12px 16px 0 !important; }
  .inventory-summary > .selection-cell::after { content:'一括操作の対象に選択'; font-size:16px; margin-left:8px; color:var(--muted); }
  .inventory-summary > .product-cell { grid-column:1/-1; min-width:0; max-width:none; border-bottom:1px solid var(--line) !important; }
  .inventory-summary .product-title { max-width:none; font-size:16px; }
  .inventory-summary > .row-action { display:flex; align-items:end; }
  .inventory-summary > .row-action button { width:100%; }
  .worklist-scroll .order-detail-row { display:block; border:1px solid var(--line); border-top:0; border-radius:0 0 11px 11px; overflow:hidden; margin-top:-8px; padding-top:8px; }
  .worklist-scroll .order-detail-row > td { display:block; width:100%; }
  .worklist-scroll .order-detail-grid { display:block; padding:18px; }
  .order-detail-grid section + section { border-top:1px solid #d4e3e3; margin-top:22px; padding-top:20px; }
  .order-detail-grid h3 { font-size:16px; }
  .order-detail-grid table.kv { table-layout:fixed; }
  .order-detail-grid table.kv th { white-space:normal; }
  .order-detail-grid table.kv td { overflow-wrap:anywhere; }
  .order-table .amount, .inventory-worklist .amount { white-space:normal; overflow-wrap:anywhere; }
  .section-heading { flex-wrap:wrap; gap:0; margin-bottom:10px; }
  .section-heading h2 { margin-bottom:4px; }
  .selection-heading { gap:8px; }
  .selection-heading > .small { display:none; }
  .inbound-product-search input { width:100%; }
  .address-setup summary .small { display:block; margin:6px 0 0; }
  .overview-tiles { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media print { .work-launcher, .filter-presets, .task-filters, #bulk-bar { display:none !important; } }

/* Wide desktop first: readable type and combined product columns. */
:root { --muted:#506773; }
body { font-size:18px; line-height:1.65; }
main { max-width:none; padding:28px 32px 44px; }
h1 { font-size:30px; } h2 { font-size:23px; } h3, .card h3 { font-size:19px; }
button, .btn, input, select, textarea { font-size:17px; min-height:44px; }
input[type=checkbox] { min-height:0; width:21px; height:21px; }
.side-nav .nav-link { font-size:17px; }
.tile .k { font-size:17px; } .tile .v { font-size:34px; } .tile .v small { font-size:18px; }
.tile .s, .order-secondary, .small, .mono, table.grid th { font-size:16px; }
table.grid, table.inv td { font-size:17px; }
.inventory-worklist { table-layout:fixed; width:100%; min-width:0; }
.inventory-worklist th:nth-child(1) { width:44px; }
.inventory-worklist th:nth-child(2) { width:35%; }
.inventory-worklist th:nth-child(3) { width:15%; }
.inventory-worklist th:nth-child(4) { width:14%; }
.inventory-worklist th:nth-child(5) { width:19%; }
.inventory-worklist th:nth-child(6) { width:17%; }
.inventory-worklist th { white-space:normal; }
.inventory-worklist .product-cell { min-width:0; max-width:none; }
.inventory-worklist td { overflow-wrap:anywhere; white-space:normal; vertical-align:top; padding:18px 14px; }
.inventory-worklist .amount { font-size:19px; font-weight:650; white-space:normal; }
.inventory-worklist .row-action { text-align:left; }
.inventory-worklist .row-action button { margin-top:14px; width:100%; }
.inventory-worklist .num { text-align:left; }
.inventory-product { display:flex; align-items:flex-start; gap:18px; }
.product-picture { display:block; flex:0 0 96px; width:96px; height:112px; position:relative; border:1px solid var(--line); border-radius:9px; overflow:hidden; background:#fff; }
.product-picture img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#fff; }
.image-fallback { position:absolute; inset:0; display:grid; place-items:center; text-align:center; font-size:16px; color:var(--muted); background:#f0f4f5; }
.product-copy { min-width:0; flex:1; }
.inventory-worklist .product-title { max-width:none; font-size:18px; line-height:1.6; }
.cell-label { display:block; color:var(--muted); font-size:16px; }
.profit-label { border-top:1px solid var(--line); margin-top:9px; padding-top:8px; }
.received-tiles { grid-template-columns:1.25fr 1fr 1fr 1fr; }
a.tile { color:var(--text); text-decoration:none; } a.tile:hover { border-color:var(--accent); }
.received-tiles .featured { background:#e6f5ee; }
.dashboard-heading h1 { margin-bottom:0; }
.dashboard-heading input { width:108px; }
.daily-panel { margin:24px 0; }
.daily-panel h2, .daily-panel p { margin:0; }
.daily-panel .section-heading { align-items:flex-start; }
.chart-legend { display:flex; gap:18px; white-space:nowrap; }
.chart-legend span { display:flex; align-items:center; gap:7px; }
.chart-legend i { display:inline-block; width:15px; height:15px; border-radius:3px; }
.regular-key, .regular-bar { background:#14776b; }
.preorder-key, .preorder-bar { background:#bd771e; }
.chart-scale { display:flex; justify-content:space-between; gap:12px; margin:24px 0 8px; color:var(--muted); font-size:16px; }
.daily-chart { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:7px; background:repeating-linear-gradient(to top,transparent 0,transparent 59px,#dbe4e8 60px,#dbe4e8 61px); }
.daily-column { display:flex; flex-direction:column; justify-content:flex-end; min-width:0; text-align:center; text-decoration:none; color:var(--text); border-radius:5px; }
.daily-column:hover, .daily-column:focus-visible { background:#e4f1ec; outline:2px solid var(--accent); }
.bar-stack { height:240px; display:flex; flex-direction:column; justify-content:flex-end; }
.daily-bar { display:block; min-height:0; width:100%; }
.day-label { display:block; background:#fff; font-size:16px; padding-top:8px; border-top:1px solid #91a8b2; }
.chart-zero { font-size:16px; color:var(--muted); }
.chart-empty { padding:12px 0; }
.inventory-split { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.stock-panel h3 { margin:0 0 16px; }
.stock-panel.preorder { border-top:4px solid #bd771e; }
.stock-panel.regular { border-top:4px solid #14776b; }
.stock-figures { display:grid; grid-template-columns:.65fr 1.3fr 1fr; gap:18px; }
.stock-figures span { display:block; font-size:17px; color:var(--muted); }
.stock-figures small { display:block; font-size:16px; font-weight:400; }
.stock-figures strong { display:block; font-size:27px; overflow-wrap:anywhere; }
.stock-figures strong small { display:inline; }
.stock-panel p, .stock-panel > a { font-size:16px; }
.dashboard-accounting, .dashboard-sync { margin-top:24px; }
.dashboard-accounting > summary, .dashboard-sync > summary { font-size:18px; }
@media (min-width:1800px) { main { padding:30px 36px 48px; } }
@media (min-width:701px) {
 .order-table { min-width:0; width:100%; table-layout:fixed; }
 .order-table th { white-space:normal; }
 .order-table td { overflow-wrap:anywhere; }
 .order-product .product-name { min-width:0; max-width:none; }
}
@media (max-width:1400px) {
 .inventory-product, .order-product { flex-direction:column; gap:10px; }
 .inventory-worklist th:nth-child(2) { width:31%; }
 .inventory-worklist th:nth-child(5) { width:22%; }
 .received-tiles { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .stock-figures { grid-template-columns:1fr 1fr; } .stock-figures > div:first-child { grid-column:1/-1; }
}
@media (max-width:900px) { main { padding:24px 18px; } }
@media (max-width:700px) {
 .received-tiles, .inventory-split { grid-template-columns:1fr; }
 .inventory-product, .order-product { flex-direction:row; }
 .inventory-worklist .product-title { font-size:18px; }
 .inventory-summary .row-action { grid-column:1/-1; }
 .inventory-worklist .row-action button { width:auto; }
 .product-picture { flex-basis:80px; width:80px; height:96px; }
 .order-product img { flex-basis:80px; width:80px; height:96px; }
 .daily-chart { gap:3px; } .bar-stack { height:170px; }
 .day-label { visibility:hidden; } .daily-column:nth-child(5n) .day-label, .daily-column:first-child .day-label, .daily-column:last-child .day-label { visibility:visible; }
 .daily-panel .section-heading { display:block; } .chart-legend { margin-top:12px; }
 .chart-scale { flex-direction:column; }
 .work-metrics { grid-template-columns:1fr; }
 .work-metrics > div { border-right:0; border-bottom:1px solid var(--line); padding-bottom:10px; }
 .stock-figures { grid-template-columns:1fr; }
 .stock-figures > div:first-child { grid-column:auto; }
 .inventory-worklist td { font-size:17px; }
}

.received-tiles .tile.featured .k, .received-tiles .tile.featured .s { color:#365c57; }
.received-tiles .tile.featured .v { color:#104e43; }
.inventory-worklist tr.inventory-summary > td { vertical-align:top; text-align:left; }
.dashboard-middle { display:grid; grid-template-columns:1.4fr 1fr; gap:24px; align-items:start; margin-top:24px; }
.dashboard-middle .daily-panel { margin:0; }
.dashboard-middle .inventory-split { grid-template-columns:1fr; gap:16px; }
.dashboard-middle .section-heading { margin-top:0; }
.dashboard-middle .section-heading h2 { margin-top:0; }
.dashboard-middle > section > .section-heading { min-height:48px; align-items:center; margin-bottom:12px; }
.dashboard-middle > section > .section-heading h2 { margin:0; }
.dashboard-middle .stock-figures { grid-template-columns:.6fr 1fr 1fr; gap:12px; }
.dashboard-middle .stock-figures > div:first-child { grid-column:auto; }
.dashboard-middle .stock-figures strong { font-size:25px; }
.dashboard-middle .stock-panel { padding:18px 20px; }
@media (max-width:1400px) {
 .dashboard-middle { grid-template-columns:1fr; }
 .dashboard-middle .inventory-split { grid-template-columns:1fr 1fr; }
 .dashboard-middle .stock-figures { grid-template-columns:1fr 1fr; }
 .dashboard-middle .stock-figures > div:first-child { grid-column:1/-1; }
}
@media (max-width:700px) {
 .dashboard-middle .inventory-split, .dashboard-middle .stock-figures { grid-template-columns:1fr; }
 form.policy table.kv, form.policy table.kv tbody, form.policy table.kv tr, form.policy table.kv th, form.policy table.kv td { display:block; width:100%; min-width:0; white-space:normal; }
 .workspace-bar { flex-wrap:wrap; }
}

main p, main h1, main h2, main h3 { overflow-wrap:anywhere; }

@media (min-width:701px) {
 .order-table th:nth-child(1) { width:10%; }
 .order-table th:nth-child(2) { width:33%; }
 .order-table th:nth-child(3) { width:5%; }
 .order-table th:nth-child(4) { width:11%; }
 .order-table th:nth-child(5) { width:12%; }
 .order-table th:nth-child(6) { width:9%; }
 .order-table th:nth-child(7) { width:12%; }
 .order-table th:nth-child(8) { width:8%; }
 .order-summary > td:last-child { padding-left:10px; padding-right:10px; }
 .order-table .order-product { align-items:flex-start; }
 .order-table .order-product > div { min-width:0; }
 .order-table .badge { white-space:normal; }
 .order-table [data-row-toggle] { width:100%; min-width:0; padding:8px; white-space:normal; }
}

/* Monthly dashboard: income, spending and profit visible together. */
.month-picker input[type=month] { width:210px; font-size:18px; cursor:pointer; }
.monthly-results .section-heading { margin:12px 0; }
.result-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.result-card { padding:20px 24px; border:1px solid var(--line); border-top:4px solid; border-radius:12px; }
.result-card h3 { margin:0; font-size:21px; }
.result-sales { background:#edf6ff; border-top-color:#377fc0; }
.result-spending { background:#fff1ef; border-top-color:#c9665e; }
.result-profit { background:#eaf5ef; border-top-color:#248672; }
.result-total { font-size:36px; font-weight:750; text-align:right; margin:10px 0 14px; font-variant-numeric:tabular-nums; }
.result-lines, .result-comparisons { margin:0; }
.result-lines > div, .result-comparisons > div { display:flex; justify-content:space-between; gap:16px; padding:5px 0; }
.result-lines dt, .result-comparisons dt { font-size:17px; }
.result-lines dd, .result-comparisons dd { margin:0; text-align:right; font-weight:600; font-size:17px; }
.result-lines small, .result-comparisons small { font-size:16px; color:var(--muted); font-weight:400; }
.result-lines dt small { display:block; }
.result-comparisons { border-top:1px solid #b4cfdf; margin-top:18px; padding-top:12px; }
.result-comparisons dd small { display:block; }
.result-profit p { margin:0 0 12px; }
.result-profit .net-profit { border-top:1px solid #bbd7cb; padding-top:14px; margin-top:8px; }
.result-profit .net-profit dd { font-size:24px; }
.result-profit > a { display:inline-block; margin-top:12px; font-size:16px; }
.dashboard-received { grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:22px; }
.order-counts { display:flex; gap:30px; margin:12px 0; }
.order-counts span { display:block; font-size:17px; color:var(--muted); }
.order-counts strong { font-size:32px; }
.order-counts small { font-size:18px; font-weight:400; }
.forecast-tile .v { color:#855317; }
.forecast-tile > a { display:inline-block; margin-top:10px; }
.chart-filter { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:20px 0 0; }
.chart-filter a { padding:7px 18px; border:1px solid var(--line); border-radius:7px; background:#fff; color:var(--text); text-decoration:none; font-size:17px; }
.chart-filter a.on { background:#176e64; border-color:#176e64; color:#fff; }
.chart-filter > span { font-size:16px; margin-left:auto; }
.stock-figures strong .unavailable-cost { font-size:21px; color:#925015; font-weight:650; }
@media (max-width:1200px) {
 .result-card { padding:16px; } .result-total { font-size:30px; }
 .result-lines > div, .result-comparisons > div { gap:8px; flex-wrap:wrap; }
 .result-lines dd { margin-left:auto; }
 .dashboard-received { grid-template-columns:1fr 1fr; }
 .forecast-tile { grid-column:1/-1; }
}
@media (max-width:800px) {
 .result-cards, .dashboard-received { grid-template-columns:1fr; }
 .forecast-tile { grid-column:auto; }
 .month-picker { flex-wrap:wrap; }
 .chart-filter > span { width:100%; margin-top:8px; }
}

/* Order identifiers and compact, aligned numeric columns. */
.order-ship-date { display:flex; flex-wrap:wrap; column-gap:6px; }
.order-ship-date > span { white-space:nowrap; }
.order-secondary.order-identifier { display:flex; align-items:center; gap:6px; }
.identifier-value { min-width:0; overflow-wrap:anywhere; }
.identifier-label { font-size:14px; color:var(--muted); }
button.identifier-copy { display:inline-flex; align-items:center; justify-content:center; flex:0 0 30px; width:30px; height:30px; min-height:30px; margin:0; padding:5px; border:1px solid var(--line); border-radius:6px; background:transparent; color:var(--muted); }
button.identifier-copy[hidden], .identifier-copy .copy-check { display:none; }
button.identifier-copy:hover { background:#e9f1f7; color:#235b82; }
button.identifier-copy:focus-visible { outline:2px solid #235b82; outline-offset:2px; }
.identifier-copy[data-copied] .copy-icon { display:none; }
.identifier-copy[data-copied] .copy-check { display:inline; color:#267356; }
.identifier-copy-status:not([hidden]) { position:fixed; z-index:100; bottom:24px; left:50%; transform:translateX(-50%); max-width:calc(100vw - 32px); margin:0; padding:10px 18px; background:#233f39; color:#fff; border-radius:8px; box-shadow:0 3px 12px #0002; }
@media (min-width:701px) {
 table.grid.order-table th:nth-child(3), table.grid.order-table th:nth-child(4), table.grid.order-table th:nth-child(6),
 table.grid.order-table .order-summary > td:nth-child(3), table.grid.order-table .order-summary > td:nth-child(4), table.grid.order-table .order-summary > td:nth-child(6) { text-align:center; }
}
@media (max-width:700px) { button.identifier-copy { flex-basis:32px; width:32px; height:32px; min-height:32px; } }

@media (min-width:701px) {
 table.grid.order-table th { white-space:normal; overflow-wrap:anywhere; }
 table.grid.order-table .order-summary > td.num { white-space:normal; }
 table.grid.order-table th:is(:nth-child(1),:nth-child(3),:nth-child(4),:nth-child(6)),
 table.grid.order-table .order-summary > td:is(:nth-child(1),:nth-child(3),:nth-child(4),:nth-child(6)) { padding-left:8px; padding-right:8px; }
}

.order-delivery-heading { display:inline-block; }
@media (min-width:701px) { table.grid.order-table th:nth-child(3) { padding-left:4px; padding-right:4px; white-space:nowrap; } }

/* Four order totals stay together; retain readable type on smaller screens. */
.order-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
@media (max-width:1400px) and (min-width:701px) {
 .order-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .order-metrics > div:nth-child(2n) { border-right:0; }
}
@media (max-width:700px) { .order-metrics { grid-template-columns:1fr; } }

/* ASIN summaries for reserved products. */
.preorder-metrics { align-items:start; }
table.grid.preorder-products-table { width:100%; table-layout:fixed; }
table.grid.preorder-products-table th { white-space:normal; }
.preorder-products-table th:first-child { width:29%; }
.preorder-products-table th:nth-child(2), .preorder-products-table th:nth-child(3) { width:7%; }
.preorder-products-table th:nth-child(4) { width:6%; }
.preorder-products-table th:nth-child(5), .preorder-products-table th:nth-child(6) { width:12%; }
.preorder-products-table th:nth-child(7) { width:17%; }
.preorder-products-table th:last-child { width:10%; }
table.grid.preorder-products-table th:not(:first-child), table.grid.preorder-products-table td:not(:first-child) { text-align:center; padding-left:8px; padding-right:8px; }
.preorder-products-table td { overflow-wrap:anywhere; }
.preorder-products-table td > small { display:block; margin-top:6px; font-size:16px; }
.preorder-products-table .amount { white-space:normal; }
.preorder-products-table .order-product { align-items:flex-start; }
.preorder-products-table .order-product > div { min-width:0; }
.preorder-products-table .btn { margin-top:8px; }
.preorder-picture { display:flex; align-items:center; justify-content:center; width:96px; height:112px; flex:0 0 96px; background:#f5f8f9; border-radius:9px; color:var(--muted); }
.preorder-picture > span { padding:8px; font-size:16px; text-align:center; }
.preorder-states { margin:0; }
.preorder-states > div { display:flex; justify-content:space-between; gap:8px; margin:6px 0; }
.preorder-states dt { color:var(--muted); }
.preorder-states dd { margin:0; font-weight:650; white-space:nowrap; }
@media (max-width:1400px) and (min-width:701px) {
 .preorder-products-table .preorder-picture { flex-basis:96px; }
 .preorder-states > div { flex-wrap:wrap; }
}
@media (max-width:700px) {
 .preorder-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .preorder-metrics > div:nth-child(n+3) { border-bottom:0; padding-bottom:0; }
 .preorder-products-scroll { background:transparent; border:0; overflow:visible; }
 table.grid.preorder-products-table, .preorder-products-table tbody { display:block; width:100%; }
 .preorder-products-table thead { position:absolute; width:1px; height:1px; clip:rect(0,0,0,0); overflow:hidden; }
 .preorder-products-table tbody > tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border:1px solid var(--line); border-radius:10px; margin-bottom:16px; background:#fff; overflow:hidden; }
 table.grid.preorder-products-table tbody td { display:block; min-width:0; padding:12px; text-align:left; border:0; }
 .preorder-products-table td:first-child, .preorder-products-table td:last-child { grid-column:1/-1; }
 .preorder-products-table td[data-label]:not(:first-child)::before { content:attr(data-label); display:block; color:var(--muted); margin-bottom:6px; }
 .preorder-picture { width:80px; height:96px; flex-basis:80px; }
 .preorder-products-table .order-product { flex-direction:row; }
}

/* Keep amount and rate together, with the average on the following row. */
.preorder-money-line { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:center; gap:0 4px; line-height:1.4; }
.preorder-money-line .preorder-profit-rate { font-size:16px; color:var(--muted); font-weight:400; }
.preorder-metrics .preorder-money-line { justify-content:flex-start; }
.preorder-date { display:block; margin:4px 0; line-height:1.5; white-space:nowrap; }
.preorder-date > span { display:block; color:var(--muted); font-size:16px; }
.preorder-date > b { display:block; font-weight:500; }
@media (min-width:701px) and (max-width:1600px) {
 .preorder-products-table .preorder-money-line { min-height:2.8em; align-content:flex-start; }
}
@media (max-width:700px) {
 .preorder-products-table td[data-label="総粗利益"] { grid-column:1/-1; }
 .preorder-products-table .preorder-money-line { justify-content:flex-start; }
}

@media (min-width:701px) and (max-width:1600px) { .preorder-products-table .preorder-average { line-height:1.5; min-height:3em; } }

/* Keep the money and editable cost on the same visual row. */
.order-cost-form { position:relative; gap:0; margin:0 0 0 auto; }
.order-cost-form input { height:48px; font-weight:600; font-variant-numeric:tabular-nums; }
.cost-save-feedback { position:absolute; top:calc(100% + 4px); left:0; right:0; z-index:1; }
.cost-save-status:empty { display:none; }
.cost-save-error .cost-save-feedback { min-width:160px; padding:6px; border:1px solid var(--line); border-radius:6px; background:#fff; z-index:2; }
.order-price-stack { position:relative; min-height:48px; display:flex; align-items:center; justify-content:center; }
.order-price-notes { position:absolute; top:100%; left:0; right:0; }
@media (max-width:700px) {
  .cost-save-feedback { position:static; margin-top:4px; }
  .cost-save-error .cost-save-feedback { min-width:0; }
  .order-price-stack { justify-content:flex-start; flex-wrap:wrap; }
  .order-price-notes { position:static; width:100%; }
}

svg.analytics-chart-mobile { display:none; }
@media (max-width:700px) {
  svg.analytics-chart-wide { display:none; }
  svg.analytics-chart-mobile { display:block; }
}

.analytics-bar-legend { display:flex; flex-wrap:wrap; gap:8px 18px; margin:12px 0; font-size:16px; }
.analytics-bar-legend span { display:inline-flex; align-items:center; gap:6px; }
.analytics-bar-legend i { display:inline-block; width:13px; height:13px; border-radius:2px; }

/* Monetary table cells share one alignment across every screen. */
table td.money-cell, table th.money-heading { text-align:right !important; font-variant-numeric:tabular-nums; }
table td.money-cell .order-price-stack, table td.money-cell .preorder-money-line { justify-content:flex-end; }
table td.money-cell .order-price-notes { text-align:right; }
table input.money-input, table td.money-cell input:not([type=hidden]):not([type=checkbox]) { text-align:right; font-variant-numeric:tabular-nums; }
@media (max-width:700px) {
  table td.money-cell::before { text-align:left; }
}
