/* Nemiru の画面の見た目 */
/* !important は、ほかの指定(スマホ用の指定や、プログラムが直接付ける style)に勝たせる必要がある所だけに残しています。
   2026-11 に、外しても見た目が変わらないもの(59か所)を、PC・タブレット・スマホ×明るい/暗い画面の132通りで確かめてから外しました。
   2026-11-21 に、売れたあとの状況の札(入金待ち〜取引完了)の色の16か所も、同じ方法で確かめて外しました。残りの84か所は、外すと見た目が変わるもの(または、特定の画面の並べ方を上書きするためのもの)です。 */
  :root { --ph:#bcc3cf; --bg:#f6f7f9; --card:#fff; --ink:#1c2330; --sub:#667085; --line:#d9dee7; --accent:#2563eb; --good:#0a7d3c; --bad:#c0392b; --warn:#b26a00; --th:#fafbfc; --tint:#eef4ff; --tintline:#b9c8ee; --okbg:#e9f7ee; --okline:#9fd3b3; --veil:rgba(255,255,255,.75); }
  body.dark { --ph:#69717f; --bg:#1e2126; --card:#2a2e35; --ink:#dde1e8; --sub:#a3abb8; --line:#40464f; --accent:#6b98ef; --good:#4cc38a; --bad:#f0776a; --warn:#e0a84a; --th:#30353d; --tint:#2c3852; --tintline:#475a88; --okbg:#173326; --okline:#2f6a4c; --veil:rgba(0,0,0,.6); color-scheme:dark; }
  /* ダークモードで、明るい背景のまま残っていた所(選択中の行・押した行・小さな札・確認の窓) */
  body.dark tr.sksel td { background:var(--tint); } body.dark table.lots tr.evrow:active { background:var(--th); } body.dark .nask form { background:var(--card); }
  body.dark .skselbtn.on, body.dark .toolbar .tbtog.on, body.dark .skfiltog.on { background:var(--tint); border-color:var(--accent); color:#cfe0ff; }
  body.dark .toolbar .tbn, body.dark .skfiltog .tbn { background:#4a2323; color:#f5a59b; }
  body.dark .fst { background:#353a44; color:#aab2bf; } body.dark .fst.past { background:#1b3a28; color:#86d6a6; }
  body.dark .lsc-none { color:#c3cad6; background:#353a44; } body.dark .lsc-sold { background:#1b3a28; }
  body.dark .skst-pay { background:#3d2e15; color:#f0b46a; } body.dark .skst-ship { background:#4a2323; color:#f5a59b; }
  body.dark .skst-sent { background:#24324f; color:#a8c2f5; } body.dark .skst-done { background:#1b3a28; color:#86d6a6; }
  * { box-sizing: border-box; }
  ::placeholder { color:var(--ph); opacity:1; }   /* 入力例は薄い色にして、入力済みの値と見分けやすくする */
  body { margin:0; font-family: "Segoe UI","Yu Gothic UI","Hiragino Sans",Meiryo,sans-serif; background:var(--bg); color:var(--ink); font-size:14px; }
  header { position:sticky; top:0; z-index:20; background:#1c2330; color:#fff; padding:10px 16px; display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
  header h1 { display:none !important; }
  header button { background:transparent; color:#fff; border:1px solid #5b6577; }
  header button.on { background:#fff; color:#1c2330; }
  #ctabs { display:flex; align-items:center; gap:4px; min-width:0; padding-right:14px; margin-right:2px; border-right:1px solid #3a4456; } #ctabs i { color:#7d8799; font-style:normal; }
  #ctabs .ownlbl { color:#fff; font-weight:700; padding:6px 4px; white-space:nowrap; }
  .ownh { margin:22px 4px 8px; font-size:18px; }
  #ctabs button { display:flex; flex-direction:column; align-items:flex-start; line-height:1.2; padding:5px 12px; max-width:220px; min-width:0; border-color:transparent; }
  #ctabs button small { font-size:11px; opacity:.75; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  #ctabs button:disabled { opacity:.35; } #ctabs i.tsep { width:1px; height:24px; background:#3a4456; margin:0 6px; } #ctabs .tstock { flex-direction:row; align-items:center; gap:5px; } #ctabs .tstock svg.ic { width:17px; height:17px; }
  header.uh #nav-howto { display:none !important; } header.uh #menu-btn { order:9; }
  @media (max-width:700px){ header.uh .hmenu { order:10; } }
  @media (max-width:700px){ header.uh #howto-pc { display:inline-block; order:7; font-size:12px; padding:4px 8px; min-height:32px; white-space:nowrap; } }
  header.uh { position:sticky; top:0; z-index:20; } header.uh #ctabs { border-right:none; } #howto-pc, #user-btn { display:none; }
  @media (min-width:701px){
    header.uh #howto-pc { display:inline-block; margin-left:auto; order:7; } header.uh #user-btn { display:inline-flex; align-items:center; gap:6px; order:8; } #user-btn .caret { font-size:11px; opacity:.7; }
    header.uh .hmenu { display:none; position:absolute; right:16px; top:calc(100% - 6px); z-index:40; flex-direction:column; gap:2px; min-width:220px; padding:6px; background:var(--card); border:1px solid var(--line); border-radius:10px; box-shadow:0 10px 28px rgba(0,0,0,.2); }
    header.uh.open .hmenu { display:flex; } header.uh .hmenu button { color:var(--ink); background:transparent; border:none; text-align:left; padding:9px 12px; border-radius:6px; }
    header.uh .hmenu button:hover { background:var(--th); } header.uh .hmenu button.on { background:var(--tint); color:var(--ink); } header.uh #nav-howto { display:none; }
    header.uh #nav-me { border-bottom:1px solid var(--line); border-radius:6px 6px 0 0; margin-bottom:4px; }
  } header .hic, header .hic svg { display:block; width:22px; height:22px; } #ctabs button:first-child { align-self:stretch; justify-content:center; padding:5px 10px; } #menu-btn { padding:6px 10px; } #ctabs button:not(.on):not(:disabled):hover { border-color:#5b6577; }
  .av { display:inline-flex; align-items:center; justify-content:center; border-radius:50%; object-fit:cover; color:#fff; font-weight:700; vertical-align:middle; flex:none; overflow:hidden; white-space:nowrap; } .avown { background:#fff; object-fit:contain; }
  .who { white-space:nowrap; margin-right:8px; } #nav-me { display:inline-flex; align-items:center; gap:6px; }
  #viewing { background:#b26a00; color:#fff; padding:4px 12px; display:flex; gap:10px; align-items:center; font-size:13px; } #viewing .vwn { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } #viewing button { background:#fff; color:#1c2330; border:none; padding:2px 12px; min-height:26px; font-size:12px; }
  .login label { margin-top:4px; } .login a { color:var(--accent); }
  main { padding:16px; max-width:1500px; margin:0 auto; }
  button { font:inherit; padding:6px 12px; border-radius:6px; border:1px solid var(--line); background:var(--card); color:var(--ink); cursor:pointer; }
  button:disabled { opacity:.5; cursor:default; } a { color:var(--accent); }
  button.primary { background:var(--accent); color:#fff; border-color:var(--accent); }
  button.small { padding:3px 8px; font-size:12px; }
  button.danger { color:var(--bad); }
  input, select, textarea { font:inherit; padding:6px 8px; border:1px solid var(--line); border-radius:6px; background:var(--card); color:var(--ink); max-width:100%; }
  select { padding-top:5px; padding-bottom:5px; }   /* 入力欄と高さをそろえる */
  .card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:14px; margin-bottom:14px; }
  .row { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; }
  label { display:flex; flex-direction:column; gap:3px; font-size:12px; color:var(--sub); }
  label.chk { flex-direction:row; align-items:center; gap:6px; color:var(--ink); font-size:14px; }
  table { border-collapse:collapse; width:100%; }
  th, td { border-bottom:1px solid var(--line); padding:6px 8px; text-align:left; vertical-align:middle; }
  th { font-size:12px; color:var(--sub); white-space:nowrap; background:var(--th); position:sticky; top:0; }
  td.num, th.num { text-align:right; white-space:nowrap; }
  .scroll { overflow-x:auto; }
  img.thumb, .photos img { cursor:zoom-in; }
  #zoom-ov { position:fixed; inset:0; z-index:40; background:rgba(0,0,0,.9); display:flex; align-items:center; justify-content:center; }
  #zoom-ov img { max-width:96vw; max-height:88vh; object-fit:contain; border-radius:4px; }
  #zoom-ov button { position:absolute; background:rgba(255,255,255,.92); border:none; font-size:22px; min-width:48px; height:48px; border-radius:24px; }
  #zoom-ov .zx { top:12px; right:12px; } #zoom-ov .zp { left:12px; top:50%; margin-top:-24px; } #zoom-ov .zn { right:12px; top:50%; margin-top:-24px; }
  #zoom-ov .zc { position:absolute; bottom:12px; left:0; right:0; text-align:center; color:#fff; font-size:14px; }
  .thumb { width:56px; height:56px; object-fit:cover; border-radius:6px; background:var(--line); display:block; }
  .price { width:84px; text-align:right; }
  .muted { color:var(--sub); font-size:12px; }
  .good { color:var(--good); font-weight:600; } .bad { color:var(--bad); font-weight:600; }
  .tag { display:inline-block; padding:1px 7px; border-radius:10px; font-size:11px; border:1px solid var(--line); margin-right:4px; white-space:nowrap; }
  .pwbox { position:relative; display:block; } .pwbox input { width:100%; padding-right:40px; }
  .pwbox .pweye { position:absolute; right:2px; top:50%; transform:translateY(-50%); width:36px; height:32px; padding:0; border:0; background:transparent; color:var(--sub); display:flex; align-items:center; justify-content:center; cursor:pointer; }
  .pwbox .pweye svg { width:20px; height:20px; } .pwbox .pweye:hover { color:var(--ink); }
  .tag.bun { border-color:var(--accent); color:var(--accent); font-weight:600; }
  .bunt { width:auto; min-width:min(100%,560px); } .bunt td { vertical-align:middle; } .bunt button { white-space:nowrap; } .bunt .thumb { width:44px; height:44px; }
  .tag.low { border-color:var(--bad); color:var(--bad); } .tag.mid { border-color:var(--warn); color:var(--warn); } .tag.high { border-color:var(--good); color:var(--good); }
  .links a { display:inline-block; margin:1px 2px 1px 0; padding:2px 7px; border:1px solid var(--line); border-radius:5px; text-decoration:none; color:var(--accent); font-size:12px; background:var(--card); white-space:nowrap; }
  .modal { position:fixed; inset:var(--hh,56px) 0 0 0; background:rgba(0,0,0,.45); display:flex; align-items:flex-start; justify-content:center; padding:24px 12px; overflow:auto; z-index:15; }
  .modal .card { width:min(820px,100%); margin:0; }
  .photos { display:flex; gap:8px; flex-wrap:wrap; margin:8px 0; }
  .photos .p { position:relative; } .photos img { width:110px; height:110px; object-fit:cover; border-radius:8px; }
  .photos .p button { position:absolute; top:2px; right:2px; padding:0 6px; }
  .grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px; }
  .grid > label { justify-content:flex-end; }   /* 見出しが2行になっても、横に並んだ入力欄の下端をそろえる */
  .wide { grid-column:1/-1; } .wide input, .wide textarea { width:100%; }
  .spin { display:inline-block; width:14px; height:14px; border:2px solid #b9c8ee; border-top-color:var(--accent); border-radius:50%; animation:sp .8s linear infinite; vertical-align:-2px; margin-right:6px; }
  @keyframes sp { to { transform:rotate(360deg); } }
  .aipanel { background:var(--tint); border-color:var(--tintline); position:sticky; top:0; z-index:5; }
  .bar { height:10px; background:var(--tintline); border-radius:5px; overflow:hidden; margin:8px 0; } .bar div { height:100%; background:var(--accent); transition:width .4s; }
  tr.ainow td { background:var(--tint); }
  .busy { position:fixed; inset:0; background:var(--veil); z-index:20; display:flex; align-items:center; justify-content:center; }
  .busy div { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:22px 28px; box-shadow:0 4px 18px rgba(0,0,0,.2); text-align:center; font-size:15px; }
  .okmsg { background:var(--okbg); border:1px solid var(--okline); color:var(--good); border-radius:8px; padding:8px 10px; margin-top:8px; }
  #sync { font-size:12px; padding:3px 9px; border-radius:10px; border:1px solid #5b6577; }
  #sync.err { background:#c0392b; border-color:#c0392b; cursor:pointer; }
  .login { max-width:360px; margin:60px auto; } .login input { width:100%; margin:8px 0 12px; font-size:16px; }
  button .sub { display:inline-block; font-size:11px; line-height:1.3; opacity:.75; white-space:nowrap; }
  /* 英数字と日本語が混ざると行の高さが変わる端末があるため、2行のボタンは行の高さを固定してそろえる */
  button:has(.sub) { line-height:1.3; }
  .photos .lp { opacity:.45; } .photos .lp.on { opacity:1; } .photos .lp label { margin-top:4px; font-size:12px; }
  .toast button { margin-left:0; flex:none; white-space:nowrap; background:transparent; color:#9cc0ff; border:1px solid #9cc0ff; padding:3px 10px; font-size:13px; min-height:0; }
  .toast { position:fixed; left:50%; bottom:24px; transform:translateX(-50%); z-index:60; display:flex; align-items:center; gap:12px; width:max-content; max-width:calc(100vw - 24px); box-sizing:border-box; background:#1c2330; color:#fff; padding:10px 12px 10px 16px; border-radius:10px; font-size:14px; box-shadow:0 4px 14px rgba(0,0,0,.3); }
  @media (max-width:700px){ .toast { bottom:calc(84px + env(safe-area-inset-bottom)); } }
  svg.ic { width:15px; height:15px; vertical-align:-2px; margin-right:5px; flex:none; } svg.ic.after { margin:0 0 0 4px; } button.small svg.ic { width:13px; height:13px; }
  .tplbox { margin-top:6px; border:1px dashed var(--line); border-radius:8px; padding:8px 10px; font-size:13px; white-space:pre-wrap; color:var(--sub); background:var(--th); }
  a.btnlink { display:inline-block; padding:6px 12px; border:1px solid var(--line); border-radius:6px; text-decoration:none; background:var(--card); }
  .lsl a.st-withdrawn { border-color:var(--line); color:var(--sub); } .lsl a.st-sold { border-color:var(--accent); color:var(--accent); }
  .lsl a { display:inline-block; font-size:11px; margin:3px 3px 0 0; padding:1px 6px; border:1px solid var(--good); color:var(--good); border-radius:10px; text-decoration:none; }
  select.gsel { margin-top:4px; font-size:12px; padding:2px 4px; max-width:120px; }
  details.groups { margin-top:10px; border-top:1px solid var(--line); padding-top:8px; } details.groups summary { cursor:pointer; }
  .lh { display:inline-flex; align-items:center; gap:4px; } .lh > .q { margin:-3px 0; }   /* ⓘがあっても見出しの行の高さを変えない(隣の欄と入力欄の高さがずれないように) */ label > .q, .lh > .q { flex:none; align-self:auto; }
  /* 説明のアイコン(ⓘ): 0.7秒以上マウスを乗せると説明が出て、離すと消える。押すと、ほかを押すまで出たまま */
  .q { display:inline-flex; align-items:center; justify-content:center; flex:none; width:18px; height:18px; color:var(--sub); cursor:pointer; vertical-align:middle; border-radius:50%; outline:none; }
  .q:hover, .q:focus-visible, .q.on { color:var(--accent); } .q svg { display:block; }
  .tipbox { position:fixed; z-index:50; max-width:min(340px,92vw); background:var(--card); color:var(--ink); border:1px solid var(--line); border-radius:12px; padding:12px 16px; font-size:14px; line-height:1.7; box-shadow:0 8px 24px rgba(0,0,0,.16); white-space:pre-line; pointer-events:none;
    opacity:0; transform:translateY(4px); transition:opacity .18s ease, transform .18s ease; }
  .tipbox.show { opacity:1; transform:none; }
  .ires .bwin { background:var(--good); border-color:var(--good); color:#fff; font-weight:700; } .ires .bwin:hover { filter:brightness(1.08); } .ires .bwin svg.ic { width:15px; height:15px; margin-right:3px; vertical-align:-2px; }
  @media (max-width:390px){ .abar { grid-template-columns:1.6fr 1fr 1fr 1fr !important; gap:4px !important; } .abar button { font-size:12px !important; padding:12px 2px !important; } .abar button svg.ic { display:none; } }
  .ires .bpass { background:var(--th); color:var(--sub); border-color:var(--line); }
  .skst { display:inline-block; font-size:12px; font-weight:700; padding:2px 9px; border-radius:999px; white-space:nowrap; } .skst-none { color:#475467; background:#eef1f5; } .skst-listed { color:var(--accent); background:var(--tint); } .skst-wd { color:var(--warn); background:#fdf0dc; } .skst-sold { color:var(--good); background:#e3f4e9; }
  body.dark .skst-none { color:#c3cad6; background:#2a3240; } body.dark .skst-wd { background:#3a2c14; } body.dark .skst-sold { background:#163322; }
  .sktabs { display:flex; gap:4px; flex-wrap:wrap; border-bottom:1px solid var(--line); margin-bottom:10px; } .sktabs button { border:none; border-bottom:3px solid transparent; border-radius:0; background:none; padding:8px 12px; font-weight:600; color:var(--sub); } .sktabs button.on { color:var(--accent); border-bottom-color:var(--accent); }
  .evsum .tile.warn { border-color:#f0c48a; background:#fff7eb; } .evsum .tile.warn > b { color:var(--warn); } body.dark .evsum .tile.warn { background:#2e2412; border-color:#5a4520; }
  table.stock .sk-src a { color:var(--ink); } table.stock td { vertical-align:middle; }
  .lsc { white-space:nowrap; display:inline-block; font-size:11px; font-weight:700; padding:1px 8px; border-radius:999px; vertical-align:middle; } .lsc-none { color:#475467; background:#eef1f5; } .lsc-listed { color:var(--accent); background:var(--tint); } .lsc-sold { color:var(--good); background:#e3f4e9; } .lsc-withdrawn { color:var(--sub); background:transparent; border:1px solid var(--line); }
  .stab { display:flex; flex-direction:column; align-items:center; gap:2px; padding:6px 12px; } .stab.on { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); } .stab.on > span { color:var(--accent); font-weight:700; }
  .lfoot .unsaved { align-self:center; color:var(--bad); font-weight:700; font-size:13px; margin-right:auto; } @media (max-width:700px){ .lfoot { flex-wrap:wrap; } .lfoot .unsaved { flex:0 0 100%; text-align:center; margin:0; } }
  .lfoot { position:fixed; left:0; right:0; bottom:0; z-index:15; display:flex; gap:10px; justify-content:center; padding:10px 16px calc(10px + env(safe-area-inset-bottom)); background:var(--card); border-top:1px solid var(--line); } .lfoot button { min-width:160px; padding:10px 16px; } main:has(.lfoot) { padding-bottom:90px; }
  details.shbox > summary { cursor:pointer; list-style:none; } details.shbox > summary::-webkit-details-marker { display:none; } details.shbox[open] > summary { margin-bottom:8px; }
  .mactions.mgrid { display:flex; gap:8px; flex-wrap:wrap; } .mactions.mgrid .danger { margin-left:auto; }
  table.stock td:last-child button { white-space:nowrap; font-weight:700; padding:8px 14px; } .skdet { color:var(--accent); border-color:var(--accent); background:var(--tint); } .skgo { color:#fff; background:var(--accent); border-color:var(--accent); } @media (min-width:701px){ table.stock .skgo { background:var(--card); color:var(--accent); border-color:var(--accent); } table.stock tr:hover .skgo { background:var(--accent); color:#fff; } }
  .modal .mhead { position:sticky; top:-24px; z-index:3; background:var(--card); padding:12px 0 10px; margin-top:-12px; border-bottom:1px solid var(--line); margin-bottom:10px; } @media (max-width:700px){ .modal .mhead { top:0; } }
  .fsteps { display:flex; flex-wrap:wrap; align-items:center; gap:4px; margin-top:10px; font-size:13px; } .fsteps i { color:var(--sub); font-style:normal; } .fst { padding:3px 10px; border-radius:999px; background:#f1f3f6; color:#8a93a3; } .fst.past { background:#e8f5ec; color:#1f7a3d; } .fst.cur { background:#1d4ed8; color:#fff; font-weight:600; }
  table.soldt { width:auto; min-width:260px; } table.soldt td { padding:3px 12px 3px 0; border:none; } table.soldt tr.tot td { border-top:1px solid #dde2ea; padding-top:6px; }
  .skst-pay { background:#fff4e5; color:#b45309; } .skst-ship { background:#fdecec; color:#b42318; } .skst-sent { background:#e8f0fe; color:#1d4ed8; } .skst-done { background:#e8f5ec; color:#1f7a3d; }
  .flchips { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 10px; } .flchips button { padding:4px 12px; min-height:0; font-size:13px; border-radius:999px; } .flchips button.on { background:#1d4ed8; color:#fff; border-color:#1d4ed8; }
  .skhead { display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; } .skhead .sktabs { flex:1; min-width:0; } .skselbtn { margin-bottom:6px; white-space:nowrap; } .skselbtn.on { background:#e8f0fe; border-color:#1d4ed8; color:#1d4ed8; }
  .skselinfo { display:flex; align-items:center; gap:14px; margin:4px 0 10px; } .skck { display:inline-flex; margin-right:6px; vertical-align:middle; } .skck input { width:20px; height:20px; } tr.sksel td { background:#eef4ff; } @media (max-width:700px){ table.stock tr.sksel { outline:2px solid #1d4ed8; outline-offset:-2px; background:#eef4ff; } }
  .skbar { position:fixed; left:0; right:0; bottom:0; z-index:15; display:flex; flex-wrap:wrap; gap:8px; justify-content:center; align-items:center; padding:10px 16px calc(10px + env(safe-area-inset-bottom)); background:var(--card); border-top:1px solid var(--line); box-shadow:0 -2px 10px rgba(0,0,0,.06); } .skbar .bn { font-size:12px; opacity:.8; } main:has(.skbar) { padding-bottom:140px; }
  @media (max-width:700px){ .skbar button { flex:1 1 40%; } .skhead .skselbtn { width:100%; } }
  .hsum .evsum { grid-template-columns:repeat(6,minmax(0,1fr)); } .hsum .evsum .tile { grid-column:auto !important; flex-direction:column !important; align-items:flex-start !important; gap:2px !important; font:inherit; color:inherit; text-align:left; background:var(--card); cursor:pointer; min-height:0; } .hsum .evsum .tile:hover { border-color:#9fb4d8; } .hsum .evsum .tile.plan { background:var(--tint); } .hsum .evsum .tile.warn { background:#fff7eb; }
  @media (max-width:700px){ .hsum .evsum { grid-template-columns:1fr 1fr; gap:6px; } .hsum .evsum .tile { padding:8px 10px; } .hsum .evsum .tile > b { font-size:18px; } .hsum .evsum .tile small { font-size:11px; } }
  @media (max-width:700px){ table.utbl, table.utbl tbody { display:block; } table.utbl tr:first-child { display:none; } table.utbl tr { display:grid; grid-template-columns:auto auto 1fr; gap:6px 10px; align-items:center; padding:10px 0; border-bottom:1px solid var(--line); }
    table.utbl td { border:none; padding:0; white-space:nowrap; } table.utbl td:first-child { grid-column:1/-1; white-space:normal; } table.utbl td:nth-child(3)::before { content:"削除: "; color:var(--sub); font-size:12px; } table.utbl td:last-child { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:6px; } }
  @media (max-width:700px){ .toolbar .tb-more, .toolbar .tb-ai { display:none; } .toolbar.tbm .tb-more { display:inline-flex !important; } .toolbar.tba .tb-ai { display:inline-flex !important; } .toolbar.tba span.tb-ai { display:block !important; }
    .toolbar .tb-more.primary { background:var(--card); color:var(--text,inherit); border-color:var(--line); font-weight:normal; } .toolbar .camprim { background:var(--accent); color:#fff; border-color:var(--accent); font-weight:600; } .toolbar .tbtog.on { background:#e8f0fe; border-color:#1d4ed8; color:#1d4ed8; } .toolbar .tbn { background:#fdecec; color:#b42318; border-radius:999px; padding:0 6px; font-size:11px; margin-left:2px; }
    .toolbar .tb-more { justify-content:center; align-items:center; flex-direction:row; gap:4px; order:4; } .toolbar .tb-ai { justify-content:center; align-items:center; flex-direction:column; order:5; } .toolbar span.tb-ai { order:6; } .toolbar .camprim { order:1; } .toolbar .tbtog { order:2; } .toolbar .tbai { order:3; } .toolbar > label { order:0; } .toolbar .ilhead { order:-1; }
    /* 3つのボタン(撮影・ほかの追加方法・AI)は1列に固定し、開いた中身はその下に出す(開いても位置が変わらないように) */
    .toolbar { grid-template-columns:repeat(6,minmax(0,1fr)) !important; } .toolbar > * { grid-column:1/-1; } .toolbar > .camprim, .toolbar > .tbtog { grid-column:span 2; } .toolbar > .tb-more, .toolbar > button.tb-ai { grid-column:span 3; } .toolbar > button.tbai1 { grid-column:1 / span 3; }
    .toolbar > .tbtog { font-size:12px; padding:6px 2px; white-space:nowrap; } .toolbar > .camprim { white-space:nowrap; font-size:12px; } }
  @media (max-width:700px) and (hover:hover) and (pointer:fine){ .toolbar > .tbtog { grid-column:span 3; } }
  .skmore { display:block; width:100%; margin-top:10px; } .skfiltog { width:100%; margin:4px 0 8px; } .skfiltog.on { background:#e8f0fe; border-color:#1d4ed8; color:#1d4ed8; } .skfiltog .tbn { background:#fdecec; color:#b42318; border-radius:999px; padding:0 6px; font-size:11px; }
  @media (max-width:700px){ .skfil:not(.open) { display:none; } }
  details.lfold > summary { cursor:pointer; padding:2px 0; } details.lfold[open] > summary { margin-bottom:10px; } details.lfold > h2.lfh { display:none; }
  tr.evrow { cursor:pointer; } tr.evrow:hover td { background:var(--th); }
  @media (max-width:700px){ table.lots tr.evrow td.evopen { display:none; } table.lots tr.evrow { position:relative; } table.lots tr.evrow::after { content:"›"; position:absolute; right:14px; top:50%; transform:translateY(-50%); font-size:26px; color:#9aa3b2; } table.lots tr.evrow:active { background:#f1f5fb; } }
  .stoc { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:0 0 12px; } .stoc .tocsel { display:none; } @media (max-width:700px){ .stoc > button, .stoc > .muted { display:none; } .stoc .tocsel { display:block; width:100%; font-size:15px; padding:10px 12px; border-radius:10px; } } .stoc .muted { font-size:12px; margin-right:4px; } .stoc button { border-radius:999px; font-size:13px !important; }
  button.idel { color:#8a93a3; border-color:transparent; background:transparent; } button.idel:hover { color:var(--bad); border-color:var(--bad); } button.idel svg.ic { width:14px; height:14px; }
  .trlist { border-top:1px solid var(--line); margin-bottom:14px; }
  .trtabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin-bottom:10px; } .trtabs button { border:none; border-bottom:3px solid transparent; border-radius:0; background:none; padding:8px 14px; font-weight:600; color:var(--sub); } .trtabs button.on { color:var(--accent); border-bottom-color:var(--accent); }
  .trq { width:100%; margin-bottom:8px; } .trgrp { margin-bottom:6px; } .trgrp > summary { cursor:pointer; padding:8px 0; } .trgrp .trlist { margin-bottom:6px; } .trrow { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); } .trrow .thumb { flex:none; }
  .trmain { flex:1; min-width:0; line-height:1.5; } .trmain .muted { font-size:13px; } .trmain span { font-size:12px; } .tracts { display:flex; gap:6px; flex:none; } .tracts button { white-space:nowrap; }
  @media (max-width:700px){ .trrow { flex-wrap:wrap; } .tracts { flex:0 0 100%; justify-content:flex-end; } }
  header h1 .h1ic { width:24px; height:24px; border-radius:6px; vertical-align:-5px; margin-right:8px; } h2.lgh { display:flex; align-items:center; gap:10px; } h2.lgh img { width:40px; height:40px; border-radius:10px; }
  #splash { position:fixed; inset:0; z-index:100; background:var(--bg,#f6f7f9); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; transition:opacity .3s; }
  #splash.out { opacity:0; pointer-events:none; } #splash .mkeye { width:132px; height:132px; } #splash .sp-name { font-size:26px; font-weight:800; color:#1c2330; letter-spacing:.5px; }
  #splash:not(.play) > * { visibility:hidden; }
  #splash.play .mkeye .mk-pupil { animation:mkLook 1.3s ease-in-out .1s both; transform-box:view-box; }
  #splash.play .mkeye .mk-tag { transform-box:fill-box; transform-origin:85% 50%; animation:mkSwing 1.2s ease-out .45s both; }
  #splash.play .mkeye .mk-spark { transform-box:fill-box; transform-origin:50% 50%; animation:mkSpark .5s ease-out 1.05s both; }
  @keyframes mkLook { 0%{transform:translate(0,0)} 22%{transform:translate(-62px,14px)} 50%{transform:translate(-62px,14px)} 72%{transform:translate(10px,-4px)} 100%{transform:translate(0,0)} }
  @keyframes mkSwing { 0%{transform:rotate(0)} 15%{transform:rotate(38deg)} 35%{transform:rotate(-26deg)} 55%{transform:rotate(15deg)} 75%{transform:rotate(-7deg)} 90%{transform:rotate(3deg)} 100%{transform:rotate(0)} }
  @keyframes mkSpark { 0%{transform:scale(0) rotate(-45deg); opacity:0} 70%{transform:scale(1.3) rotate(10deg); opacity:1} 100%{transform:scale(1) rotate(0)} }
  @media (prefers-reduced-motion: reduce){ .mkeye .mk-pupil, .mkeye .mk-tag, .mkeye .mk-spark { animation:none; } }
  h2.lgh .mkeye { width:44px; height:44px; flex:none; }
  .ilhead { flex:0 0 100%; display:flex; align-items:center; justify-content:space-between; gap:8px; }
  .toolbar .ilhead { grid-column:1/-1; width:100%; } .ilhead h2 { white-space:nowrap; } .ilhead button { width:auto; flex:none; white-space:nowrap; }
  .nask { position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:60; display:flex; align-items:center; justify-content:center; }
  .nask form { background:#fff; border-radius:12px; padding:16px; width:min(360px,90vw); box-shadow:0 10px 30px rgba(0,0,0,.25); } .nask form:focus { outline:none; }
  .nask p { margin:0 0 10px; white-space:pre-line; font-size:14px; }
  .nask input { width:100%; font-size:20px; padding:10px; box-sizing:border-box; }
  .nask .row { justify-content:flex-end; gap:8px; margin-top:12px; }
  .nask button.danger { background:#dc2626 !important; color:#fff !important; border-color:#dc2626 !important; }
  .nask .row button { min-width:88px; }
  .nfields { display:grid; grid-template-columns:1fr 1fr; gap:8px 10px; } .nfields label { font-size:12px; color:var(--sub); } .nfields input, .nfields select { width:100%; box-sizing:border-box; font-size:17px; padding:8px; margin-top:2px; } .nfields label:first-child { grid-column:1/-1; }
  @media (max-width:700px){ .nask { align-items:flex-end; padding:0 0 max(12px,env(safe-area-inset-bottom)); }
    .nask form { width:calc(100vw - 20px); border-radius:14px; }
    .nask .row button { flex:1; padding:12px 0; font-size:15px; } }
  .aibtn { padding:5px 12px; font-size:13px; min-height:0; background:linear-gradient(135deg,#7c5cff,#2563eb); color:#fff; border:none; font-weight:700; box-shadow:0 2px 8px rgba(79,70,229,.35); } .aibtn:hover:not(:disabled) { filter:brightness(1.08); } .aibtn:disabled { opacity:.5; box-shadow:none; }
  .lpbtns { display:grid; grid-template-columns:repeat(2,max-content); gap:8px; } @media (max-width:700px){ .lpbtns { grid-template-columns:1fr 1fr; } .lpbtns button { white-space:nowrap; padding:10px 4px; } }
  .mbtns { display:grid; grid-template-columns:repeat(4,max-content); gap:6px; margin:6px 0; } @media (max-width:700px){ .mbtns { grid-template-columns:1fr 1fr; } .mbtns button { white-space:nowrap; padding:9px 4px; font-size:14px; } }
  .bsub { font-size:11px; font-weight:400; opacity:.8; }
  tr.mhd td { padding:10px 4px 6px !important; border-bottom:none; background:none; } .mhdb { all:unset; cursor:pointer; display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; font-size:14px; } .mhdb b { font-size:15px; } .mcar { color:var(--sub); font-size:11px; width:12px; }
  @media (max-width:700px){ table.lots tr.mhd { border:none; background:none; padding:6px 2px 2px; margin:4px 0 2px; } table.lots tr.mhd td { flex:1 1 100%; } .mhdb { gap:2px 8px; font-size:13px; } .mhdb .msum { flex:1 1 100%; padding-left:20px; } }
  .ld { display:inline-block; font-weight:700; font-size:12px; white-space:nowrap; padding:2px 9px; border-radius:999px; line-height:1.5; }
  .ld-plan { color:#475467; background:#eef1f5; } .ld-part { color:var(--warn); background:#fdf0dc; } .ld-won { color:var(--good); background:#e3f4e9; } .ld-pass { color:var(--sub); background:transparent; border:1px solid var(--line); }
  body.dark .ld-plan { color:#c3cad6; background:#2a3240; } body.dark .ld-part { background:#3a2c14; } body.dark .ld-won { background:#163322; }
  table.kuchi td:first-child a { color:#2b4a8b; text-decoration:none; } body.dark table.kuchi td:first-child a { color:#a9c1f2; } table.kuchi td:first-child a b { font-weight:600; } table.kuchi td:first-child a:hover { color:var(--accent); text-decoration:underline; } table.kuchi td:first-child a b::after { content:" ›"; color:var(--sub); font-weight:400; }
  .kcnt .pzn { font-weight:600; } .kcnt .pz-ok { color:var(--good); } .pzbar { display:block; width:72px; height:3px; border-radius:2px; background:var(--line); margin:4px 0 2px auto; overflow:hidden; } .pzbar i { display:block; height:100%; border-radius:2px; }
  .ldbox { display:flex; align-items:center; height:34px; } table.kuchi .kn-st { display:none; }
  tr.passrow > td { opacity:.5; } tr.donehead td { padding:8px 4px; background:var(--th); } tr.donerow .thumb { width:44px; height:44px; }
  .modes { display:flex; gap:6px; margin-bottom:8px; } .modes button { flex:1; padding:8px; font-weight:600; } .modes button { display:flex; align-items:center; justify-content:center; gap:6px; border-width:2px; } .modes button svg.ic { width:18px; height:18px; }
  .modes .mres { color:var(--accent); border-color:var(--tintline,#bcd0f7); background:var(--tint); } .modes .mres.on { background:var(--accent); color:#fff; border-color:var(--accent); }
  .modes .mbid { color:var(--good); border-color:#a7dcb9; background:#ecf8f0; } .modes .mbid.on { background:var(--good); color:#fff; border-color:var(--good); }
  body.dark .modes .mbid { background:#16301f; border-color:#2d5a3c; } .modes button:not(.on) { opacity:.85; }
  .abox .abig { display:flex; gap:24px; flex-wrap:wrap; } .abox .abig > div { display:flex; flex-direction:column; } .abox .abig span { font-size:12px; color:var(--sub); }
  .abox .abig b { font-size:22px; } .abox .abig b.lim { color:var(--accent); font-size:26px; } .abox .abig small { font-size:11px; color:var(--sub); }
  @media (min-width:701px){ .abox .modes { display:none; } .abox { position:sticky; top:calc(var(--hh,62px) + 6px); z-index:7; box-shadow:0 4px 12px rgba(0,0,0,.08); display:flex; flex-wrap:wrap; align-items:center; column-gap:32px; padding:12px 16px; } .abox .abar { margin-top:0; } .abox > div:last-child:not(.abar):not(.abig) { flex-basis:100%; margin-top:6px !important; } }
  .abox .abig.atiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:8px; flex:1 1 420px; } .abox .atiles .tile { border:1px solid var(--line); border-radius:10px; padding:8px 12px; display:flex; flex-direction:column; gap:1px; min-width:0; background:var(--card); }
  .abox .atiles .tile > span { font-size:12px; color:var(--sub); } .abox .atiles .tile > b { font-size:21px; line-height:1.25; } .abox .atiles .tile small { font-size:11px; color:var(--sub); }
  .abox .atiles .tile.plan { background:var(--tint); border-color:var(--tintline); } .abox .atiles .tile.plan > b { color:var(--accent); font-size:21px; }
  .abar { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; } .abar button { padding:10px 14px; } .abar.selbar { align-items:center; } label.selchk { margin-bottom:4px; color:var(--accent); font-weight:600; }
  .only-mouse { display:inline-block; } @media (hover:none),(pointer:coarse){ .only-mouse { display:none !important; } }
  td input.est { width:110px; }
  table.kuchi.shop tr > :nth-child(2), table.kuchi.shop tr > :nth-child(4), table.kuchi.shop tr > :nth-child(5), table.kuchi.shop tr > :nth-child(6) { display:none !important; } .ires { display:flex; gap:4px; margin-top:4px; } .ires button { flex:1; } b.ilim { color:var(--accent); }
  .ksheet-bg { position:fixed; inset:0; z-index:40; background:rgba(0,0,0,.35); display:flex; align-items:flex-end; justify-content:center; }
  .ksheet { background:var(--card); width:100%; max-width:560px; max-height:75vh; overflow:auto; border-radius:14px 14px 0 0; padding:14px 14px calc(14px + env(safe-area-inset-bottom)); }
  .kitem { display:grid; grid-template-columns:1fr auto; gap:2px 10px; width:100%; text-align:left; padding:10px 12px; margin-bottom:6px; border-radius:10px; }
  .kitem .kn { font-weight:600; font-size:15px; } .kitem .kn small { display:block; font-weight:400; color:var(--sub); font-size:12px; } .kitem .ks { color:var(--sub); font-size:12px; text-align:right; } .kitem .kv { grid-column:1 / -1; font-size:13px; color:var(--accent); }
  .kitem.cur { border-color:var(--accent); box-shadow:inset 3px 0 0 var(--accent); } .kitem.pass { opacity:.55; }
  tr.undecided td:nth-child(10) > select, tr.undecided td:nth-child(10) > div:has(button[onclick^="openList"]) { display:none; }   /* まだ買っていない棚では、出品の状況と出品ボタンは出さない */ .sum.plan b { color:var(--accent); }
  .tabs { display:flex; gap:6px; margin-bottom:10px; border-bottom:1px solid var(--line); } .tabs button { border:none; border-bottom:3px solid transparent; border-radius:0; background:none; padding:8px 14px; font-size:15px; font-weight:600; color:var(--sub); } .tabs button.on { color:var(--accent); border-bottom-color:var(--accent); }
  .evsum { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:10px; margin-top:12px; } .evsum .tile { border:1px solid var(--line); border-radius:10px; padding:10px 12px; display:flex; flex-direction:column; gap:2px; }
  .evsum .tile > span { font-size:12px; color:var(--sub); } .evsum .tile > b { font-size:22px; } .evsum .tile small { font-size:12px; color:var(--sub); } .evsum .tile.plan > b { color:var(--accent); } .evsum .tile.plan { background:var(--tint); border-color:var(--tintline); }
  .kwbox { margin:2px 0; font-size:12px; } .kwlink { color:var(--sub) !important; border:none !important; padding:0 !important; background:none !important; text-decoration:underline; }
  .kwchips { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; } .kwchips button.kwoff { text-decoration:line-through; opacity:.45; }
  .links a.opening { opacity:.75; pointer-events:none; } .links a.auc.opening .spin { border-color:rgba(255,255,255,.45); border-top-color:#fff; } .links a.opening .spin { width:12px; height:12px; border-width:2px; margin:0 6px 0 0; vertical-align:-2px; }
  .links a.auc { background:var(--accent); color:#fff; border-color:var(--accent); font-weight:600; padding:5px 12px; font-size:13px; }
  details.more { display:inline-block; position:relative; vertical-align:middle; }
  details.more summary { list-style:none; cursor:pointer; padding:5px 9px; border:1px solid var(--line); border-radius:5px; font-size:12px; color:var(--sub); background:var(--card); white-space:nowrap; user-select:none; }
  details.more summary::-webkit-details-marker { display:none; } details.more summary::after { content:" ▾"; }
  details.more > div { position:absolute; left:0; top:100%; margin-top:4px; z-index:6; background:var(--card); border:1px solid var(--line); border-radius:8px; box-shadow:0 4px 14px rgba(0,0,0,.18); padding:6px; display:flex; flex-direction:column; gap:4px; min-width:130px; }
  details.more > div a { margin:0; padding:7px 10px; font-size:13px; }
  h2 { font-size:16px; margin:0 0 10px; } h3 { font-size:14px; margin:14px 0 6px; }
  .sum { display:flex; gap:22px; flex-wrap:wrap; margin-top:8px; } .sum b { font-size:17px; }
  /* ---------- パソコン: ヘッダーのメニューは横に並べる ---------- */
  .hmenu { display:contents; } #menu-btn, .only-sp { display:none; } #sync:empty { display:none; }
  /* マウスで操作する端末(パソコン)では、カメラで撮るボタンを出さない */
  @media (hover:hover) and (pointer:fine){ .only-touch { display:none; } }
  /* ---------- スマホ(幅700px以下): 表をカードにし、ボタンと入力欄を大きくする ---------- */
  @media (max-width:700px){
    body { font-size:15px; } main { padding:8px; padding-bottom:calc(8px + env(safe-area-inset-bottom)); } .card { padding:12px; margin-bottom:10px; }
    header { padding:8px 10px; padding-top:calc(8px + env(safe-area-inset-top)); gap:8px; position:sticky; top:0; z-index:8; }
    header h1 { font-size:16px; flex:1; margin:0; }
    #menu-btn { display:inline-block; } b.only-sp { display:block; } button.only-sp { display:inline-block; }
    .abox { position:sticky; top:var(--hh,52px); z-index:7; padding:10px 12px; } .abox .abig { gap:16px; } .abox .abig b { font-size:18px; } .abox .abig b.lim { font-size:22px; } .abox .abig.atiles { grid-template-columns:1fr 1fr; gap:6px; } .abox .atiles .tile.won { grid-column:1 / -1; flex-direction:row; align-items:baseline; gap:8px; flex-wrap:wrap; } .abox .atiles .tile.won > b { font-size:16px !important; } .abox .atiles .tile { padding:6px 9px; } .abox .atiles .tile > b, .abox .atiles .tile.plan > b { font-size:18px; } .abox .atiles .tile small { font-size:10px; line-height:1.35; }
    .abar { position:fixed; left:0; right:0; bottom:0; z-index:12; margin:0; padding:8px 8px calc(8px + env(safe-area-inset-bottom)); background:var(--card); border-top:1px solid var(--line); display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:6px; }
    .abar button { padding:12px 4px; font-size:14px; white-space:nowrap; } .abar.selbar { grid-template-columns:1.2fr 1.4fr 1fr; z-index:13; } .abar.selbar span { align-self:center; text-align:center; } main:has(.abar) { padding-bottom:84px; }
    table.items tr.planrow td:nth-child(n+4):nth-child(-n+8) { display:none; }
    table.items tr.donehead { display:block; padding:0; border:none; background:none; } table.items tr.donehead td { display:block; } table.items tr.donehead button { width:100%; padding:10px; }
    table.items tr.donerow { display:grid !important; grid-template-columns:48px 1fr 1fr; gap:2px 10px; align-items:center; padding:8px 10px; }
    table.items tr.donerow td { flex:none !important; width:auto !important; padding:0 !important; border:none !important; } table.items tr.donerow td::before { display:none !important; } table.items tr.donerow td:nth-child(1) .thumb { width:44px; height:44px; }
    table.items tr.donerow td:nth-child(1) { grid-row:1 / 4; align-self:start; } table.items tr.donerow td:nth-child(2), table.items tr.donerow td:nth-child(3) { grid-column:2 / 4; } table.items tr.donerow td:nth-child(3) { font-size:12px; }
    table.items tr.donerow td:nth-child(4) { grid-column:2; text-align:left !important; } table.items tr.donerow td:nth-child(5) { grid-column:3; text-align:right !important; } table.items tr.donerow td:nth-child(6) { grid-column:2 / 4; text-align:right; } table.items tr.donerow td:nth-child(6):empty { display:none; } table.items tr.undecided td:nth-child(8) { display:none; } table.items tr.planrow td:nth-child(9) { flex:0 0 100%; } table.items tr.planrow td:nth-child(9)::before { content:"見込み売値(円)"; }
    table.items tr.planrow td:nth-child(9) input.est { width:100%; font-size:18px; } .ires button { padding:10px; font-size:14px; }
    .evsum { grid-template-columns:1fr 1fr; gap:8px; } .evsum .tile:first-child { grid-column:1 / -1; flex-direction:row; align-items:baseline; gap:10px; } .evsum .tile:first-child > b { font-size:18px; } .evsum .tile > b { font-size:19px; } .evsum .tile small { font-size:11px; }
    span.lhbrk { display:block; flex:0 0 100%; height:0; } .lothead > b.only-sp { flex:1 1 0; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } #sync { order:0 !important; } #sync:empty { display:none; }
    .lothead > label { display:none; } .lothead.open > label { display:flex; } .lothead { align-items:center; } .aipanel { top:calc(var(--hh,52px) + 2px); }
    .hmenu { display:none; } header.open .hmenu { display:flex; flex-direction:column; gap:6px; width:100%; padding-top:4px; }
    .hmenu button { width:100%; text-align:left; padding:12px 14px; font-size:15px; } .hmenu > span { display:none; }
    button { padding:10px 14px; min-height:42px; } button.small { padding:6px 10px; min-height:34px; font-size:13px; }
    input, select, textarea { font-size:16px; padding:9px 10px; } select { padding-top:8px; padding-bottom:8px; }
    input:not([type=checkbox]):not([type=radio]):not([type=file]), select { height:44px; }   /* 端末によって選択欄だけ高くなるので、高さを決めてそろえる */
    .row { gap:8px; } .row > label { flex:1 1 140px; min-width:0; } .row > label.chk { flex:0 0 auto; }
    .row > label input:not([type=checkbox]), .row > label select { width:100% !important; }
    h2 { font-size:17px; }
    /* 商品一覧の上のボタン: 2列に並べる */
    .toolbar { display:grid; grid-template-columns:1fr 1fr; gap:8px; align-items:stretch; } .toolbar > h2, .toolbar > label, .toolbar > span { grid-column:1 / -1; }
    .toolbar { gap:6px; } .toolbar > button { width:100%; font-size:13px; padding:6px 4px; min-height:38px; } .card > .sum, .sum { gap:2px 14px; margin-top:6px; } .toolbar > label { margin:0; } .toolbar > span.muted { font-size:12px; }
    /* 仕入れ一覧: 1件を1枚のカードに */
    table.lots, table.lots tbody { display:block; } table.lots tr:first-child { display:none; }
    /* 市場の画面の棚の一覧: スマホでは棚ごとのカードにする */
    table.kuchi, table.kuchi tbody { display:block; } table.kuchi tr:first-child { display:none; }
    table.kuchi tr { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px 10px; border:1px solid var(--line); border-radius:10px; padding:8px 12px; margin-bottom:6px; background:var(--card); align-items:start; grid-auto-flow:row dense; }
    table.kuchi td.na, table.kuchi td:nth-child(9) { display:none !important; }
    table.kuchi td.kcnt { grid-column:3; order:10; justify-self:end; align-self:end; text-align:right; font-size:13px; color:var(--sub); } table.kuchi td.kcnt::before { display:none !important; } table.kuchi td.kcnt > div { display:none; } table.kuchi td.kcnt .pzbar { width:96px; } table.kuchi td:nth-child(2) { display:none; }
    table.kuchi td:nth-child(1) { display:flex; flex-wrap:wrap; align-items:center; gap:2px 8px; grid-column:1 / -1; }
    table.kuchi td:nth-child(1) > a { flex:1 1 0; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    table.kuchi td:nth-child(1) > .kn-st { display:flex; align-items:center; gap:8px; flex:none; white-space:nowrap; } table.kuchi .kn-st small { font-size:13px; }
    table.kuchi td:nth-child(1) > div { flex:0 0 100%; }
    table.kuchi td:nth-child(6)::before { content:"落札額" !important; }
    table.kuchi td { display:block; border:none; padding:0; text-align:left; white-space:normal; min-width:0; }
    table.kuchi td:nth-child(1) { font-size:16px; } table.kuchi td:nth-child(1) .muted { font-size:13px; }
    table.kuchi td:nth-child(2) select { width:100%; }
    table.kuchi td:nth-child(n+3):nth-child(-n+8)::before { display:block; font-size:11px; color:var(--sub); }
    table.kuchi td:nth-child(3)::before { content:"点数"; } table.kuchi td:nth-child(4)::before { content:"売上見込み"; } table.kuchi td:nth-child(5)::before { content:"入札の上限目安"; }
    table.kuchi td:nth-child(6)::before { content:"落札額(税抜き)"; } table.kuchi td:nth-child(7)::before { content:"原価(支払総額)"; } table.kuchi td:nth-child(8)::before { content:"想定純利益"; }
    table.kuchi td:nth-child(n+4):nth-child(-n+8) { font-size:15px; color:#344054; } body.dark table.kuchi td:nth-child(n+4):nth-child(-n+8) { color:var(--ink); }
    table.kuchi td:nth-child(5) b { font-size:15px; color:var(--accent); } table.kuchi td:nth-child(8) span { font-weight:600; } table.kuchi td:nth-child(6) input { width:100% !important; }
    table.kuchi td:nth-child(9) { grid-column:1 / -1; display:flex; gap:8px; } table.kuchi td:nth-child(9) button { flex:1; padding:10px; }
    table.lots tr { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 12px; border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin-bottom:8px; background:var(--card); }
    table.lots td { display:block; border:none; padding:0; text-align:left; white-space:normal; }
    table.lots td[colspan] { flex:1 1 100%; }
    table.lots td:nth-child(1) { order:2; color:var(--sub); font-size:13px; } table.lots td:nth-child(2) { order:1; flex:1 1 100%; font-size:17px; font-weight:600; }
    table.lots td:nth-child(3) { order:3; } table.lots td:nth-child(3)::before { content:"仕入れ "; color:var(--sub); font-size:12px; }
    table.lots td:nth-child(4) { order:4; } table.lots td:nth-child(4)::before { content:"点数 "; color:var(--sub); font-size:12px; }
    table.lots td:nth-child(5) { order:5; flex:1 1 100%; } table.lots td:nth-child(5)::before { content:"想定純利益 "; color:var(--sub); font-size:12px; font-weight:400; }
    table.lots td:nth-child(6) { order:6; flex:1; } table.lots td:nth-child(7) { order:7; }
    /* 商品一覧: 1商品を1枚のカードに */
    table.items, table.items tbody { display:block; } table.items tr:first-child { display:none; }
    table.items tr { display:flex; flex-wrap:wrap; gap:8px 10px; border:1px solid var(--line); border-radius:10px; padding:10px; margin-bottom:10px; background:var(--card); }
    table.items tr.ainow { background:var(--tint); }
    table.items td { display:block; border:none; padding:0; text-align:left; white-space:normal; min-width:0 !important; background:transparent !important; }
    table.items td[colspan] { flex:1 1 100% !important; }
    table.items td:nth-child(1) { flex:0 0 84px; } table.items td:nth-child(1) .thumb { width:84px; height:84px; }
    table.items td:nth-child(2) { flex:1 1 0; font-size:15px; }
    table.items td:nth-child(3) { flex:0 0 100%; } table.items .links a.auc { padding:10px 18px; font-size:15px; } details.more summary { padding:10px 12px; font-size:14px; } details.more > div a { padding:11px 12px; font-size:15px; }
    table.items td:nth-child(n+4):nth-child(-n+9) { flex:0 0 calc(50% - 5px); }
    table.items td:nth-child(n+4):nth-child(-n+9)::before { display:block; font-size:11px; color:var(--sub); margin-bottom:2px; }
    table.items td:nth-child(4)::before { content:"メルカリ相場(円)"; } table.items td:nth-child(5)::before { content:"ヤフオク相場(円)"; }
    table.items td:nth-child(6)::before { content:"ラクマ相場(円)"; } table.items td:nth-child(7)::before { content:"eBay相場($)"; }
    table.items td:nth-child(8)::before { content:"原価"; } table.items td:nth-child(9)::before { content:"想定純利益"; }
    table.items .price { width:100%; text-align:left; }
    /* 商品のカードを詰める: 写真の横に商品名と検索ボタン、相場4つは1行、利益と削除も1行 */
    header h1 { display:none; } #ctabs { flex:1; gap:2px; border:none; padding:0; } #ctabs button { min-height:34px; padding:3px 8px !important; flex:0 1 auto; } #ctabs button span { font-size:14px; } #ctabs button small { font-size:10px; } #ctabs button:first-child { flex:none; }
    table.items tr:not(.donerow):not(.donehead) { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px 8px; padding:8px; align-items:start; }
    table.items tr:not(.donerow):not(.donehead) > td { flex:none; }
    table.items tr:not(.donerow):not(.donehead) > td:nth-child(1) { grid-column:1; grid-row:1 / 3; } table.items tr:not(.donerow) td:nth-child(1) .thumb { width:100%; height:auto; aspect-ratio:1; }
    table.items tr:not(.donerow) td:nth-child(1) > div.muted { display:none; } table.items tr:not(.donerow) td:nth-child(1) > button { width:100%; min-height:30px; padding:2px 0 !important; }
    table.items tr:not(.donerow):not(.donehead) > td:nth-child(2) { grid-column:2 / 5; font-size:14px; } table.items tr:not(.donerow) td:nth-child(2) > div.muted { display:none; } table.items tr:not(.donerow) td:nth-child(2) .tag { font-size:11px; padding:0 6px; }
    table.items tr:not(.donerow):not(.donehead) > td:nth-child(3) { grid-column:2 / 5; } table.items tr:not(.donerow) .links a.auc { padding:8px 14px; font-size:14px; } table.items tr:not(.donerow) details.more summary { padding:8px 10px; }
    table.items tr:not(.donerow):not(.donehead) > td:nth-child(n+4):nth-child(-n+7) { grid-column:auto; }
    table.items .links a.auc { padding:6px 12px !important; font-size:13px !important; } table.items details.more summary { padding:6px 10px !important; font-size:13px; } table.items td.links { white-space:nowrap; display:flex; flex-wrap:wrap; gap:6px; align-items:center; } table.items td.links > .kwbox { flex:0 0 100%; }
    table.items tr.auc:not(.undecided):not(.planrow):not(.donerow) > td:nth-child(8) { grid-column:1 / 2; } table.items tr.auc:not(.undecided):not(.planrow):not(.donerow) > td:nth-child(9) { grid-column:2 / 4; }
    table.items tr.auc:not(.undecided):not(.planrow):not(.donerow) > td:nth-child(10) { grid-column:4; align-self:end; text-align:right; } table.items tr.auc > td:nth-child(10) > div { margin-top:0 !important; }
    table.items tr.auc > td:nth-child(9) .wonl { font-size:12px; } table.items tr.auc > td:nth-child(8) .gsel { width:100%; font-size:12px; }
    table.items tr:first-child { display:none !important; } table.items td[colspan] { grid-column:1 / -1; }
    table.stock tr:not(:first-child) { grid-template-columns:64px 1fr 1fr 1fr !important; grid-auto-flow:row; }
    table.stock tr > td { order:0; }  table.stock tr > td:nth-child(6)::before, table.stock tr > td:nth-child(8)::before, table.stock tr > td:nth-child(3)::before { display:none !important; }
    table.stock tr > td:nth-child(1) { grid-column:1 !important; grid-row:1 / 3 !important; } table.stock tr > td:nth-child(2) { grid-column:2 / 5 !important; grid-row:1; } table.stock tr > td:nth-child(3) { grid-column:2 / 5 !important; grid-row:2; font-size:12px; }
    table.stock tr > td:nth-child(4) { grid-column:1 !important; grid-row:3; } table.stock tr > td:nth-child(5) { grid-column:2 / 4 !important; grid-row:3; } table.stock tr > td:nth-child(7) { grid-column:4 !important; grid-row:3; }
    table.stock tr > td:nth-child(4)::before { display:block !important; content:"原価"; } table.stock tr > td:nth-child(5)::before { display:block !important; content:"想定純利益"; } table.stock.sold tr > td:nth-child(5)::before { content:"純利益"; } table.stock tr > td:nth-child(7)::before { display:block !important; content:"経過"; }
    table.stock tr > td:nth-child(n+4):nth-child(-n+7) { text-align:left; } table.stock tr > td:nth-child(5) .muted { display:none; }
    table.stock tr > td:nth-child(6) { grid-column:1 / 4 !important; grid-row:4; display:flex; align-items:center; gap:8px; flex-wrap:wrap; } table.stock tr > td:nth-child(6) .lsl { margin:0; }
    table.stock tr > td[colspan]:nth-child(1) { grid-column:1 / -1 !important; grid-row:auto !important; }
    table.stock tr > td:nth-child(8) { grid-column:4 !important; grid-row:4; justify-self:end; } table.stock tr > td:nth-child(8) button { white-space:nowrap; padding:6px 8px; font-size:12px; min-height:32px; }
    .lfoot button { flex:1; min-width:0; } main:has(.lfoot) .card { margin-bottom:8px; } main:has(.lfoot) .card h2 { font-size:15px; margin-bottom:4px; } main:has(.lfoot) .card > p.muted { font-size:12px; }
    main:has(.lfoot) .photos { flex-wrap:nowrap; overflow-x:auto; padding-bottom:4px; } main:has(.lfoot) .photos img { width:76px; height:76px; } main:has(.lfoot) .photos .p { flex:none; }
    .lhead .thumb { width:52px; height:52px; } .lhead h2 { font-size:16px; } .lhead .row { flex-wrap:nowrap; } .lhead .row > div { min-width:0 !important; }
    .stab { padding:4px 6px; flex:1; min-height:0; } .stab > span { font-size:13px; }
    .sksum { grid-template-columns:1fr 1fr; } .sksum .tile:first-child { grid-column:auto; flex-direction:column; } .sktabs { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:0; } .sktabs button { display:flex; flex-direction:column; align-items:center; padding:6px 0; font-size:12px; white-space:nowrap; min-height:0; letter-spacing:-.02em; } .sktabs button .muted { font-size:11px; }
    #ctabs .tstock span { font-size:13px; white-space:nowrap; } #ctabs .tstock { flex:none; } #ctabs button span { white-space:nowrap; } #ctabs button:not(:first-child):not(.tstock) { overflow:hidden; } #ctabs i.tsep { margin:0 2px; } table.items td:nth-child(n+4):nth-child(-n+9)::before { line-height:16px; height:16px; }
    table.items tr.undecided > td:nth-child(9)::before { display:none; } table.items tr.undecided > td:nth-child(9) > span.muted:first-child { display:none; } table.items tr.undecided > td:nth-child(9) > div.muted { font-size:13px; }
    table.items td:nth-child(4)::before { content:"メルカリ"; } table.items td:nth-child(5)::before { content:"ヤフオク"; } table.items td:nth-child(6)::before { content:"ラクマ"; } table.items td:nth-child(7)::before { content:"eBay($)"; }
    table.items tr:not(.donerow) td:nth-child(n+4):nth-child(-n+7) .price { height:40px; padding:6px 8px; }
    table.items tr:not(.donerow):not(.donehead) > td:nth-child(8) { grid-column:1 / 3; } table.items tr:not(.donerow):not(.donehead) > td:nth-child(9) { grid-column:3 / 5; }
    table.items tr.undecided > td:nth-child(9), table.items tr.planrow > td:nth-child(9) { grid-column:1 / 4 !important; } table.items tr.undecided > td:nth-child(10) { grid-column:4 !important; align-self:end; text-align:right; } table.items tr.planrow > td:nth-child(9) { grid-column:1 / 5 !important; } table.items tr.planrow > td:nth-child(10) { display:none; }
    table.items tr.planrow > td:nth-child(9) { display:grid !important; grid-template-columns:1fr 1fr; gap:4px 6px; align-items:center; } table.items tr.planrow > td:nth-child(9)::before { display:none; }
    table.items tr.planrow > td:nth-child(9) > * { grid-column:1 / 3; } table.items tr.planrow > td:nth-child(9) > input.est { grid-column:1; grid-row:2; } table.items tr.planrow > td:nth-child(9) > .ires { grid-column:2; grid-row:2; margin:0; display:flex; gap:6px; } table.items tr.planrow .ires button { flex:1; } table.items tr:not(.donerow):not(.donehead) > td:nth-child(10) { grid-column:1 / 5; } table.items tr.undecided > td:nth-child(10) > div { margin-top:0 !important; }
    table.items td:nth-child(10) { flex:0 0 100%; display:flex; align-items:center; gap:10px; } table.items td:nth-child(10) select { flex:1; } table.items td:nth-child(10) div { margin:0 !important; }
    /* 商品の画面: 画面いっぱいに表示し、保存ボタンを下に固定 */
    .modal { padding:0; } .modal .card { border-radius:0; border:none; min-height:100%; padding-bottom:150px; width:100%; }
    .mactions button { white-space:nowrap; }
    .mactions { position:fixed; left:0; right:0; bottom:0; z-index:16; background:var(--card); border-top:1px solid var(--line); margin:0 !important; padding:10px 12px calc(10px + env(safe-area-inset-bottom)); }
    .mactions .primary { flex:1; } .mactions.mgrid { display:grid; grid-template-columns:1fr 1fr; gap:8px; } .mactions.mgrid button { padding:10px 6px; } .photos img { width:88px; height:88px; } .grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } .grid input:not([type=checkbox]), .grid select, .grid textarea { width:100%; min-width:0; }
    html { overflow-x:hidden; }   /* 画面(ビューポート)ごと横に動かないようにする。clip は Android の Chrome で効かないことがあるため hidden */ main, .card { max-width:100%; min-width:0; } .card { overflow-wrap:anywhere; }
    input:not([type=checkbox]):not([type=radio]), select, textarea { max-width:100%; } .row > label { max-width:100%; min-width:0; }
    table.ship { width:100% !important; table-layout:fixed; } table.ship th, table.ship td { padding:4px 2px; font-size:13px; white-space:normal; position:static; }
    table.ship th:first-child, table.ship td:first-child { width:28%; } table.ship input { width:100%; padding:8px 4px; font-size:15px; }
    #howto-ov { padding:0 !important; } #howto-ov .card { border-radius:0; min-height:100%; }
  }
  /* ホームの「＋ 商品を登録」と、商品がまだない棚の案内 */
  .qadd .qaddb { width:100%; padding:14px; font-size:17px; font-weight:700; }
  .qguide { border:2px solid var(--accent); } .qguide .qone { margin:0; padding:10px 12px; background:var(--tint); border-radius:8px; line-height:1.6; }
  .qguide .qone svg.ic { vertical-align:-3px; margin-right:4px; } .qguide .row button { flex:1 1 auto; }
  /* 「AIで推定」ボタンの未推定の数は、ボタンの右上に丸い数字で出す(ボタンからはみ出さないように) */
  .toolbar .tbai { position:relative; overflow:visible; }
  .toolbar .tbn.tbbadge { position:absolute; top:-8px; right:-4px; min-width:20px; height:20px; padding:0 6px; margin:0; border-radius:999px; background:var(--bad); color:#fff; font-size:11px; font-weight:700; line-height:20px; text-align:center; box-shadow:0 0 0 2px var(--card); }
  body.dark .toolbar .tbn.tbbadge { background:#e5534b; color:#fff; }
  /* 幅の狭いスマホ(iPhone SE など)では、上の3つのボタンの絵を省いて文字が収まるようにする */
  @media (max-width:380px){ .toolbar > .camprim svg.ic, .toolbar > .tbtog svg.ic { display:none; } .toolbar > .camprim, .toolbar > .tbtog { font-size:12px; padding-left:2px; padding-right:2px; } }
  /* 商品がまだないときの1行は、どの画面の幅でも横いっぱいに出す */
  table.items tr.emptyrow { display:table-row !important; } table.items tr.emptyrow td { display:table-cell !important; width:auto !important; min-width:0 !important; padding:12px !important; }
  @media (max-width:700px){ table.items tr.emptyrow, table.items tr.emptyrow td { display:block !important; width:100% !important; box-sizing:border-box; } }
  /* 仕入れ一覧の上: タブと「＋ 棚を追加」 */
  .lhd { display:flex; align-items:flex-end; gap:8px; flex-wrap:wrap; } .lhd .tabs { flex:1; min-width:0; margin-bottom:0; } .lhd .lhadd { margin-bottom:6px; white-space:nowrap; }
  /* 仕入れ一覧・棚一覧の × (丸で囲んだ×)。押すと確認してからごみ箱へ */
  table.lots tr.evrow, table.kuchi tr.krow { position:relative; } table.kuchi tr.krow { cursor:pointer; }
  .xdel { position:absolute; top:50%; right:8px; transform:translateY(-50%); width:26px; height:26px; min-height:0; padding:0; border-radius:50%; border:1.5px solid var(--sub); background:var(--card); color:var(--sub); font-size:16px; line-height:1; display:flex; align-items:center; justify-content:center; z-index:2; }
  .xdel:hover { border-color:var(--bad); color:var(--bad); }
  table.lots tr.evrow td:last-child, table.kuchi tr.krow td:last-child { padding-right:44px; }
  @media (max-width:700px){ .xdel { top:8px; right:8px; transform:none; } table.lots tr.evrow td:last-child, table.kuchi tr.krow td:last-child { padding-right:0; } table.lots tr.evrow, table.kuchi tr.krow { padding-right:40px; } }
  /* 使い方の画像を大きく見る画面(使い方の上に重ねる)。縦長の画像はそのまま上下に動かして見られる */
  #howz-ov { position:fixed; inset:0; z-index:45; background:rgba(0,0,0,.92); }
  #howz-ov .howz-sc { position:absolute; inset:0; overflow:auto; -webkit-overflow-scrolling:touch; display:flex; justify-content:center; align-items:flex-start; padding:56px 6px 44px; }
  #howz-ov img { width:100%; max-width:1400px; height:auto; border-radius:4px; background:#fff; }
  #howz-ov .zx { position:fixed; top:10px; right:10px; background:rgba(255,255,255,.92); border:none; font-size:22px; min-width:44px; height:44px; border-radius:22px; z-index:2; }
  #howz-ov .zc { position:fixed; bottom:10px; left:0; right:0; text-align:center; color:#fff; font-size:13px; pointer-events:none; }
  /* スマホの使い方: 手順は選択欄1つ */
  .howhd .howsel { flex:1; min-width:0; font-size:15px; }
  .tile b .tlab { display:block; font-size:11px; font-weight:600; color:var(--sub); }
  /* 売上の記録: スマホでは売れた商品を1件ずつのカードにする */
  @media (max-width:700px){ table.salesi, table.salesi tbody { display:block; } table.salesi tr:first-child { display:none; }
    table.salesi tr { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px 10px; border:1px solid var(--line); border-radius:10px; padding:8px 12px; margin-bottom:6px; }
    table.salesi td { padding:0; border:none; text-align:left; } table.salesi td:nth-child(2) { grid-column:1 / -1; order:-1; }
    table.salesi td[data-l]::before { content:attr(data-l); display:block; font-size:11px; color:var(--sub); font-weight:400; }
    table.salesi td[colspan] { grid-column:1 / -1; } }
