/* 商品ページ（案1）。共通の骨格は wotalog.css。
   枠で囲まず、罫線と余白で区切る。店へのボタン（赤の塗り）を一番強く見せ、
   記録のボタンはそれより弱くする。 */
.pd-page h1 { font-size: 22px; margin: 2px 0 0; line-height: 1.4; letter-spacing: 0; overflow-wrap: anywhere; }
.pd-page h2 { font-size: 17px; margin: 0; }
.pd-page .crumbs { margin: 0 0 16px; }
.pd-page .crumbs a { padding: 4px 2px; color: var(--muted); }

.pd { display: grid; grid-template-columns: 300px minmax(0, 1fr) 280px; grid-template-areas: "photo main info" "mine main info" ". main info"; grid-template-rows: auto auto 1fr; gap: 0 36px; align-items: start; }
.pd-photo { grid-area: photo; min-width: 0; }
.pd-mine { grid-area: mine; }
.pd-main { grid-area: main; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; min-width: 0; }
.pd-info { grid-area: info; min-width: 0; }

/* 写真。URLが切れていても枠の大きさを保ち、下のボタンが動かないようにする。 */
.pd-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: #e9e5e0; color: #6a5f58; font-size: 14px; border-radius: 2px; overflow: hidden; }
.pd-img img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* 記録のボタン。records.js が own-on / wish-on を付け外しする。 */
.pd-page .rec { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 0; padding: 2px 8px; border: 1px solid var(--rule-dark); border-radius: var(--radius); background: transparent; color: var(--ink); font-size: 12px; line-height: 1.3; text-align: center; text-decoration: none; white-space: nowrap; }
.pd-page .rec:hover { border-color: var(--ink); }
.pd-page .rec.own-on { background: var(--own-soft); border-color: var(--own); color: var(--own); font-weight: 700; }
.pd-page .rec.wish-on { background: var(--accent-soft); border-color: #dca795; color: var(--accent-dark); font-weight: 700; }
.rec-big { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 10px; }
.pd-page .rec-big .rec { min-height: 44px; font-size: 14px; font-weight: 700; }

.pd-mine { margin-top: 10px; font-size: 13px; color: var(--muted); }
.pd-mine p { margin: 4px 0 0; overflow-wrap: anywhere; }
.pd-mine a { color: var(--accent-dark); }
.pd-mine .pd-memo { color: var(--ink); white-space: pre-wrap; }

.pd-title .kicker { font-size: 13px; color: var(--muted); text-decoration: none; }
.pd-title .kicker:hover { color: var(--accent); }
.pd-title .pd-share { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.pd-title .pd-share:hover { color: var(--accent); }

.pd-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; margin-bottom: 14px; border-bottom: 1px solid var(--ink); }
.pd-head.plain { border: 0; padding: 0; margin-bottom: 10px; }
.pd-head a { font-size: 13px; white-space: nowrap; color: var(--accent-dark); }
.pd-count { font-size: 12px; color: var(--muted); }
.pd-head .more-narrow { display: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pd-none { margin: 0; padding: 16px 0; color: var(--muted); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

/* 価格の表 */
.price-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.price-table th { padding: 0 12px 6px 0; font-size: 12px; font-weight: 400; color: var(--muted); text-align: left; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.price-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.price-table td:last-child, .price-table th:last-child { padding-right: 0; }
.price-table .p { font-size: 24px; font-weight: 700; white-space: nowrap; letter-spacing: -.01em; }
.price-table .p small { font-size: 13px; font-weight: 700; margin-left: 1px; }
.price-table .prev { font-size: 12px; color: var(--muted); }
.price-table .cond { font-weight: 700; white-space: nowrap; }
.price-table .go { text-align: right; width: 1%; white-space: nowrap; }
.price-table .low { display: inline-block; margin-left: 8px; padding: 0 6px; border-radius: 2px; background: var(--new-soft); color: #6a4c00; font-size: 12px; font-weight: 700; vertical-align: 3px; }
.pt-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--rule-dark); border-radius: 2px; color: var(--muted); font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
.pt-note { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
.st-on { color: var(--own); font-weight: 700; white-space: nowrap; }
.st-off { color: var(--muted); font-weight: 700; white-space: nowrap; }
.price-table .date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pt-fix { display: block; font-size: 12px; color: var(--muted); }
.m-date { display: none; }
.td-shop { white-space: nowrap; }
.price-table tr.group td { padding: 16px 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.price-table tr.flaw .p { font-size: 15px; }
.price-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

/* 店へのボタン。wotalog.css の .button は丸く、案1の角の形と合わないので分ける。 */
.shop-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 6px 18px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.shop-btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.shop-btn.sec { background: transparent; color: var(--accent-dark); }
.shop-btn.sec:hover { background: var(--accent-soft); color: var(--accent-dark); }

.pd-foot { display: flex; flex-wrap: wrap; gap: 0 14px; margin-top: 10px; font-size: 12px; }
.pd-foot a { color: var(--muted); }

/* 商品情報の表。札にせず下線の語にする（幅280pxで札を並べると騒がしいため）。 */
.pd-info .pd-head { margin-bottom: 0; }
.pd-info dl { margin: 0; }
.pd-info .row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.pd-info dt { font-size: 12px; color: var(--muted); padding-top: 1px; font-weight: 400; }
.pd-info dd { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 13px; min-width: 0; align-items: center; }
.lchip, .pd-info .fav-row .chip { padding: 0; border: 0; border-radius: 0; background: none; min-height: 0; color: var(--ink); font-size: 13px; font-weight: 400; text-decoration: underline; text-decoration-color: var(--rule-dark); text-underline-offset: 3px; line-height: 1.5; overflow-wrap: anywhere; }
.lchip:hover, .pd-info .fav-row .chip:hover { background: none; color: var(--accent); text-decoration-color: currentColor; }
.pd-info .fav-row { max-width: 100%; min-width: 0; gap: 2px; }
.pd-info .star { min-width: 24px; min-height: 24px; padding: 0; border: 0; border-radius: 2px; background: none; font-size: 14px; line-height: 1; }
.pd-info .star.on { background: none; }

/* 価格の推移。文字は .pc-y / .pc-x に置くので、図を伸ばしても歪まない。 */
.s-new { --line: #1f6f9c; }
.s-used { --line: var(--accent); }
.pc-sec .pd-head { flex-wrap: wrap; row-gap: 8px; }
.pc-sec[aria-busy="true"] { opacity: .6; }
.pc-periods { display: flex; gap: 0; }
.pc-periods a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 11px; border: 1px solid var(--rule-dark); margin-left: -1px; background: #fff; color: var(--ink, inherit); font-size: 12px; text-decoration: none; white-space: nowrap; }
.pc-periods a:first-child { margin-left: 0; border-radius: var(--radius) 0 0 var(--radius); }
.pc-periods a:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.pc-periods a.on { position: relative; background: var(--ink, #2a2320); border-color: var(--ink, #2a2320); color: #fff; font-weight: 700; }
.pc-stats { margin: 8px 0 12px; }
.pc-stats-head, .pc-stat { display: grid; grid-template-columns: 60px minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); column-gap: 10px; align-items: baseline; }
.pc-stats-head { word-break: keep-all; padding-bottom: 4px; border-bottom: 1px solid var(--rule); font-size: 11px; color: var(--muted); }
.pc-stat { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 14px; font-variant-numeric: tabular-nums; }
.pc-stat-name { font-size: 13px; font-weight: 700; white-space: nowrap; }
.pc-stat-name i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--line); vertical-align: 1px; }
/* 線の見本。色だけに頼らず、新品は点線、中古は実線で見分ける（白黒で同じ灰色になるため）。 */
.pc-toggles i { display: inline-block; width: 18px; height: 0; margin-right: 6px; border-top: 2px solid var(--line); vertical-align: 3px; }
.pc-toggles .s-new i { border-top-style: dashed; }
.pc-stat-value small { margin-left: 1px; font-size: 11px; font-weight: 400; }
.pc-stat-value b { font-size: 17px; }
.pc-none { color: var(--muted); font-size: 13px; }
.pc-stat-note { grid-column: 2 / -1; margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.pc-stat-span { grid-column: 3 / -1; margin: 0; font-size: 12px; color: var(--muted); }
.pc-toggles { display: flex; gap: 6px; margin-bottom: 6px; }
.pc-toggles a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border: 1px solid var(--rule-dark); border-radius: var(--radius); background: #fff; color: var(--muted); font-size: 12px; text-decoration: none; }
.pc-toggles a.on { color: inherit; font-weight: 700; }
.pc-toggles a:not(.on) i { border-top-color: #cdbdb2; }
.pc { display: grid; grid-template-columns: 54px minmax(0, 1fr); grid-template-areas: "y plot" ". x"; column-gap: 6px; padding: 12px 14px 0 0; }
.pc-line.s-new { stroke-dasharray: 6 3; }
.pc-low-mark { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 2px solid var(--line); border-radius: 50%; background: #fff; pointer-events: none; }
.pc-list-price { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.pc.is-single .pc-plot { height: 110px; }
.pc-list-key { margin: 4px 0 0 60px; font-size: 11px; color: var(--muted); }
.pc-list-key i { display: inline-block; width: 18px; height: 0; margin-right: 5px; border-top: 1px dotted var(--muted); vertical-align: 3px; }
.pc-mark { position: absolute; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--line); pointer-events: none; }
.pc-empty-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; font-size: 13px; color: var(--muted); }
.pc-note { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.pc-no-record { margin: 8px 0 0; font-size: 13px; }
.pc-stock { margin: 8px 14px 0 0; }
.pc-stock-row { display: grid; grid-template-columns: 54px minmax(0, 1fr); column-gap: 6px; align-items: center; margin-bottom: 4px; }
.pc-stock-name { justify-self: end; font-size: 11px; color: var(--muted); }
.pc-stock-track { position: relative; height: 8px; }
.pc-stock-track i { position: absolute; top: 0; bottom: 0; }
.pc-stock-track .on { min-width: 4px; background: var(--line); }
.pc-stock-track .at-end { transform: translateX(-100%); }
.pc-stock-track .off, .pc-stock-key .off i { background: repeating-linear-gradient(135deg, #cfc6bf 0 2px, transparent 2px 5px); }
.pc-stock-key { display: flex; gap: 14px; margin: 4px 0 0 60px; font-size: 11px; color: var(--muted); }
.pc-stock-key i { display: inline-block; width: 16px; height: 8px; margin-right: 5px; vertical-align: 0; }
.pc-stock-key .blank i { box-shadow: inset 0 0 0 1px var(--rule); }
.pc-stock-key .on i { background: linear-gradient(90deg, #1f6f9c 50%, var(--accent) 50%); }
.pc-y { grid-area: y; position: relative; }
.pc-y span { position: absolute; right: 0; transform: translateY(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-plot { grid-area: plot; position: relative; height: 210px; touch-action: pan-y; }
.pc-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pc-grid { stroke: #eadfd8; stroke-width: 1; vector-effect: non-scaling-stroke; }
.pc-line { fill: none; stroke: var(--line); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pc-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border: 2px solid #fff; border-radius: 50%; background: var(--line); pointer-events: none; }
.pc-x { grid-area: x; position: relative; height: 22px; margin-top: 2px; }
.pc-x span { position: absolute; top: 2px; font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pc-x .middle { transform: translateX(-50%); }
.pc-x .end { transform: translateX(-100%); }
.pc-cross { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--muted); pointer-events: none; }
.pc-cross[hidden], .pc-tip[hidden] { display: none; }
.pc-tip { position: absolute; top: 0; padding: 4px 8px; background: #fff; border: 1px solid var(--rule-dark); border-radius: var(--radius); font-size: 12px; line-height: 1.5; white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; z-index: 2; }
.pc-tip-date { color: var(--muted); }
.pc-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: var(--line); }

/* 関連商品。箱の幅は列数（--span）で決め、札の幅をどの箱でも1列分に揃える。 */
.pd-rel { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; margin-top: 48px; }
.pd-rel > section { grid-column: span var(--span, 6); display: flex; flex-direction: column; min-width: 0; }
.pd-rel .pd-head h2, .pd-rel-one .pd-head h2 { font-size: 15px; white-space: nowrap; }
.rt-box { display: grid; grid-template-columns: repeat(var(--span, 6), minmax(0, 1fr)); gap: 18px; flex: 1 1 auto; }
.pd-rel-one { margin-top: 48px; }
.rt-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 30px 18px; }
.rt { display: flex; flex-direction: column; min-width: 0; }
.rt-ph { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: #e9e5e0; color: #6a5f58; font-size: 12px; text-decoration: none; border-radius: 2px; overflow: hidden; }
.rt-ph img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rt-body { display: flex; flex-direction: column; gap: 3px; padding-top: 8px; flex: 1 1 auto; min-width: 0; }
.rt-ki { color: var(--muted); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.rt-nm { color: var(--ink); text-decoration: none; font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.rt-nm:hover { color: var(--accent); text-decoration: underline; }
.rt-pr { margin-top: auto; padding-top: 5px; display: grid; font-variant-numeric: tabular-nums; line-height: 1.45; }
.rt-pr div { display: flex; align-items: baseline; gap: 6px; }
.rt-pr .k { color: var(--muted); font-size: 12px; }
.rt-pr .v { font-weight: 700; font-size: 16px; }
.rt-pr .none { color: var(--muted); font-weight: 700; font-size: 13px; }
.rt-meta { color: var(--muted); font-size: 12px; line-height: 1.4; }
.rt-act { display: flex; gap: 4px; margin-top: 7px; }
.pd-page .rt-act .rec { min-height: 30px; }
.rt-act .rec:first-child { flex: 1 1 auto; }

/* 幅が足りないときは商品情報を下へ回す。関連は箱ごとに縦に積む。 */
@media (max-width: 1240px) {
  .pd { grid-template-columns: 240px minmax(0, 1fr); grid-template-areas: "photo main" "mine main" ". main" "info info"; gap: 0 24px; }
  .pd-info { margin-top: 32px; }
  .pd-rel { grid-template-columns: minmax(0, 1fr); }
  .pd-rel > section { grid-column: auto; }
  .rt-box, .rt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rt-box .rt:nth-child(n+5) { display: none; }
}

/* タブレット幅は写真を240pxのまま横に置き、狭くなる表だけを積み直す。
   以前は900px未満で写真が112pxになり、768pxでは商品がほとんど見えなかった。 */
@media (max-width: 899px) {
  .price-table thead { display: none; }
  .price-table, .price-table tbody { display: block; }
  .price-table tr { display: grid; grid-template-columns: minmax(44px, auto) minmax(0, 1fr) auto; grid-template-areas: "c p p" "s s g"; gap: 4px 8px; padding: 10px 0; border-bottom: 1px solid var(--rule); align-items: center; }
  .price-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .price-table td:last-child { padding: 0; }
  .price-table .td-shop, .price-table .td-date { display: none; }
  .price-table .td-cond { grid-area: c; }
  .price-table .td-price { grid-area: p; }
  .price-table .td-stock { grid-area: s; }
  .price-table .m-date { display: block; color: var(--muted); font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
  /* 行の高さは変えず、押せる範囲だけ44pxに広げる。 */
  .price-table .m-date a { display: inline-block; margin: -14px 0; padding: 14px 6px; color: var(--muted); }
  .price-table .go { grid-area: g; width: auto; }
  .shop-btn { min-height: 44px; padding: 6px 14px; }
  .price-table tr.group { display: block; padding: 10px 0 0; border-bottom: 0; }
  .price-table tr.group td { padding: 0; }
}

/* スマホ。写真を小さくして上に置き、関連は横長の行にする。ボタンは指で押せる44pxを確保する。 */
@media (max-width: 699px) {
  .pd { grid-template-columns: minmax(0, 1fr); grid-template-areas: "photo" "mine" "main" "info"; gap: 0; }
  .pd-main { margin-top: 20px; }
  /* 写真は画面幅の半分以上にする（112pxでは何の商品か分からない）。ボタンは横に縦積みして、最初の画面に収める。 */
  .pd-photo { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; align-items: end; }
  .pd-img { font-size: 12px; }
  .rec-big { margin-top: 0; grid-template-columns: minmax(0, 1fr); }
  .pd-page h1 { font-size: 17px; margin-top: 0; }
  .pd-page h2 { font-size: 16px; }
  .pd-page .crumbs a, .pd-title .kicker, .pd-foot a, .pd-head a, .pd-mine a { display: inline-flex; align-items: center; min-height: 44px; }
  .pd-main { gap: 24px; }
  .pd-head { align-items: center; padding-bottom: 4px; margin-bottom: 8px; }
  .pd-page .rec-big .rec { padding: 2px 6px; }

  .pd-info .row { padding: 6px 0; align-items: center; }
  .lchip, .pd-info .fav-row .chip { display: inline-flex; align-items: center; min-height: 44px; }
  .pd-info .star { min-width: 44px; min-height: 44px; }
  .pc { padding-right: 8px; }
  .pc-stock { margin-right: 8px; }
  .pc-stat-span { grid-column: 2 / -1; margin-top: 3px; }
  .pc-periods a, .pc-toggles a { min-height: 44px; }
  .pc-toggles a { padding: 0 14px; }
  .wide-only { display: none; }

  /* 「すべて見る（1,234件）」が見出しと同じ行で画面からはみ出した。 */
  .pd-rel .pd-head h2, .pd-rel-one .pd-head h2 { white-space: normal; min-width: 0; }
  .pd-head .more-wide { display: none; }
  .pd-head .more-narrow { display: inline-flex; flex: 0 0 auto; }
  .pd-rel, .pd-rel-one { margin-top: 32px; gap: 28px; }
  .rt-box, .rt-grid { display: block; }
  .rt { flex-direction: row; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .rt:first-child { padding-top: 0; }
  .rt-ph { flex: 0 0 84px; width: 84px; height: 84px; aspect-ratio: auto; font-size: 11px; }
  .rt-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ki ki" "nm nm" "pr act"; column-gap: 8px; align-items: end; padding: 0; }
  .rt-ki { grid-area: ki; }
  .rt-nm { grid-area: nm; -webkit-line-clamp: 2; }
  .rt-pr { grid-area: pr; align-self: end; margin: 0; padding: 0; }
  .rt-pr .v { font-size: 15px; }
  .rt-pr .k { font-size: 11px; }
  .rt-meta { display: none; }
  .rt-act { grid-area: act; align-self: end; margin-top: 2px; }
  .pd-page .rt-act .rec { min-height: 44px; padding: 2px 8px; font-size: 12px; }
}

/* 修正・報告の入力画面（販売情報の修正、リンクの追加、重複の報告）。
   箱で囲まず、罫線で区切る。 */
/* 入力画面は幅720pxの左寄せにそろえる（ログイン・登録・持ち物の登録・購入の記録も同じ）。
   見出しやパンくずと左端を合わせる。寄せ方が画面ごとに違うと、同じサイトに見えなかった。 */
.fix-page { max-width: 720px; margin: 0; overflow-wrap: anywhere; }
.fix-page.fix-wide { max-width: 960px; }
.fix-page h1 { font-size: 22px; margin: 4px 0 16px; }
.fix-page .crumbs { margin: 0 0 8px; }
.fix-now { margin: 0 0 20px; border-top: 1px solid var(--ink); }
.fix-now > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.fix-now dt { color: var(--muted); font-size: 12px; font-weight: 400; padding-top: 2px; }
.fix-now dd { margin: 0; }
.fix-form fieldset { margin: 0 0 16px; padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.fix-form legend { padding: 0; margin-bottom: 8px; font-size: 15px; font-weight: 700; }
.fix-link h2, .fix-next { font-size: 15px; margin: 0 0 12px; }
.fix-next { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--ink); }
.fix-withdraw { margin-top: 12px; font-size: 14px; }
.fix-withdraw summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); cursor: pointer; }
.fix-withdraw p { margin: 0 0 8px; font-size: 13px; }
.fix-withdraw button { min-height: 44px; }
.fix-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.fix-field { margin-bottom: 12px; min-width: 0; }
.fix-field label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 700; }
/* 「必須」は見出しの横に置く。下の行に落とすと、隣の欄と入力欄の高さがそろわない。 */
.fix-field label:has(+ .req) { display: inline-block; }
.fix-field label + .req { font-size: 12px; }
.fix-field input, .fix-field select, .fix-field textarea { box-sizing: border-box; width: 100%; max-width: 100%; min-height: 40px; }
.fix-field .helptext { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.fix-form .errorlist { margin: 4px 0; padding: 0; list-style: none; color: #a33; font-size: 12px; }
/* チェック欄は文の左に置く。文全体を押せるようにする。 */
.fix-check { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: start; min-height: 44px; margin: 8px 0; padding: 4px 0; font-size: 14px; cursor: pointer; }
.fix-check input { width: 20px; height: 20px; margin: 1px 0 0; }
.fix-form .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.fix-form .actions button { min-height: 44px; }
.fix-form .actions a { display: inline-block; padding: 10px 6px; }

/* 2つの商品を見比べる表。列の幅をそろえ、スマホでも左右に並べて比べられるようにする。 */
.cmp { width: 100%; table-layout: fixed; border-collapse: collapse; margin-bottom: 16px; }
.cmp thead th { padding: 0 8px 6px 0; border-bottom: 1px solid var(--ink); font-size: 12px; font-weight: 400; color: var(--muted); text-align: left; }
.cmp td { padding: 6px 12px 10px 0; border-bottom: 1px solid var(--rule); font-size: 14px; vertical-align: top; }
.cmp .cmp-label th { padding: 8px 0 0; font-size: 12px; font-weight: 400; color: var(--muted); text-align: left; }
.cmp .cmp-top td { padding-top: 10px; }
.cmp-diff { margin-left: 6px; padding: 0 6px; border-radius: 2px; background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; font-weight: 700; }
.cmp-photo { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; max-width: 240px; margin-bottom: 6px; background: #e9e5e0; color: #6a5f58; font-size: 12px; border-radius: 2px; overflow: hidden; }
.cmp-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* 商品の追加・修正の画面と修正・報告の一覧。ほかの画面と同じく、箱で囲まず罫線で区切り、
   見出しの大きさと左端をそろえる（wotalog.css の .panel は他の画面でも使うので、ここで上書きする）。 */
.form-page.add-page, .form-page.edit-page { max-width: none; }
.form-page.add-page > h1, .form-page.edit-page > h1 { font-size: 20px; }
.add-page .panel, .edit-form.panel { background: none; border: 0; border-radius: 0; }
.add-page .panel > h2 { padding: 0 0 8px; font-size: 15px; border-bottom: 1px solid var(--ink); }
.add-page .panel-body { padding: 12px 0 0; }
.edit-form.panel-body { padding: 0; }
.edit-form > .actions, .add-manual .form-grid > .actions { margin: 0; padding: 12px 0; border-radius: 0; }
.edit-context { padding: 12px 0 0; border: 0; border-top: 1px solid var(--ink); border-radius: 0; background: none; }
.submission { margin: 0; padding: 12px 0; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: none; }
.cmp-wrap { margin-top: 8px; }

/* 修正画面の注意と、スマホで候補を畳むボタン。 */
.field-warn { margin: 6px 0 0; padding: 6px 8px; border-left: 3px solid #b4532a; background: var(--accent-soft); font-size: 13px; overflow-wrap: anywhere; }
.picker-expand { display: none; }
@media (max-width: 699px) {
  .form-page .picker-expand:not([hidden]) { display: block; width: calc(100% - 16px); min-height: 44px; margin: 0 8px 8px; background: transparent; color: var(--ink); border: 1px solid var(--rule-dark); border-radius: var(--radius); font-weight: 400; }
  /* 箱の中を動かさない。開いたら画面全体だけが動く。 */
  .form-page .picker .picker-list { max-height: none; overflow: visible; }
  .form-page .picker.is-collapsed:not(.is-searching) .picker-list { display: none; }
  .form-page .picker-selected { padding: 0 8px 8px; }
  /* 下のメニューと重なって入力欄をふさぐので、保存の帯を固定しない。畳んだので下まですぐ届く。 */
  .edit-form > .actions, .add-manual .form-grid > .actions { position: static; margin: 0; padding: 12px 0 0; background: none; border-radius: 0; }
  .fix-now > div { grid-template-columns: 72px minmax(0, 1fr); }
  .fix-row { grid-template-columns: minmax(0, 1fr); }
}

/* 確認する人の画面と修正履歴。1件ごとに罫線で区切り、項目と値を同じ形で並べる。 */
.rv-page { max-width: 960px; margin: 0 auto; overflow-wrap: anywhere; }
.rv-page h1 { font-size: 22px; margin: 4px 0 12px; }
.rv-page h1 .note { margin-left: 6px; font-size: 13px; font-weight: 400; }
.rv-page .crumbs { margin: 0 0 8px; }
.rv-nav { display: flex; flex-wrap: wrap; gap: 0 16px; margin-bottom: 12px; border-bottom: 1px solid var(--ink); }
.rv-nav a, .rv-sub a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; font-size: 14px; }
.rv-nav a[aria-current=page] { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--ink); }
.rv-sub { display: flex; gap: 16px; margin: 0 0 8px; }
.rv-sub a[aria-current=page] { color: var(--ink); font-weight: 700; }
.rv-item { padding: 12px 0 16px; border-bottom: 1px solid var(--rule); }
.rv-head { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; margin: 0 0 6px; font-size: 13px; }
.rv-kind { color: var(--muted); }
.rv-head time { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.rv-rows { margin: 0; }
.rv-rows > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; padding: 3px 0; font-size: 14px; }
.rv-rows dt { color: var(--muted); font-size: 12px; font-weight: 400; padding-top: 2px; }
.rv-rows dd { margin: 0; }
.rv-form { margin-top: 8px; }
.rv-form label { display: block; margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.rv-form textarea { box-sizing: border-box; width: 100%; }
.rv-form .note { margin: 4px 0 0; font-size: 12px; }
.rv-form .errors { margin-top: 8px; color: #a33; font-size: 13px; font-weight: 700; }
.rv-form .errors:focus { outline: none; }
.rv-form .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.rv-form .actions button { min-height: 44px; }
.rv-pager { display: flex; gap: 16px; margin-top: 12px; }
.rv-pager a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 699px) {
  .rv-rows > div { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 4px 0; }
}
