/* レイアウト：スマホは「上に検索・下にタブ」のアプリ型、PCは上にメニュー。写真グリッドが主役 */
:root {
  --bg: #f4f5f8;          /* 背景：ほんの少し青みのグレー */
  --surface: #ffffff;
  --fg: #15171c;
  --muted: #6a707d;
  --line: #e2e5eb;
  --chip: #eceef3;
  --accent: #2c4fe8;      /* コバルトブルー（ボタン） */
  --accent-ink: #ffffff;
  --accent-text: #2445d6; /* 文字リンク */
  --accent-soft: #e7ecff;
  --tag: rgba(17, 19, 26, .74);
  --tag-ink: #ffffff;
  --sold: #d93a3a;
  --warn: #b45309;
  --warn-soft: #fff1e0;
  --ok: #1d8556;
  --shadow: 0 6px 24px rgba(20, 24, 40, .10);
  --f-body: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --f-num: "Barlow Semi Condensed", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --f-display: "Dela Gothic One", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --ink: #0c0f1f;          /* 上のバー・下のタブの深い紺 */
  --ink-2: #161a33;
  --ink-fg: #f3f5ff;
  --ink-muted: #8a91b4;
  --r: 12px;
  --tabbar-h: 60px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1014; --surface: #171a20; --fg: #eceef3; --muted: #9aa0ad; --line: #2a2e37; --chip: #22262e;
    --accent: #3a5cf0; --accent-ink: #ffffff; --accent-text: #8fa5ff; --accent-soft: #1d2440;
    --tag: rgba(0, 0, 0, .72); --tag-ink: #ffffff; --sold: #e25555; --warn: #f0a24a; --warn-soft: #34261a; --ok: #4cc38a;
    --shadow: 0 6px 24px rgba(0, 0, 0, .45);
    --ink: #07091a; --ink-2: #12162c; --ink-fg: #f3f5ff; --ink-muted: #8a91b4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #07091a; --ink-2: #12162c; --ink-fg: #f3f5ff; --ink-muted: #8a91b4;
  --bg: #0e1014; --surface: #171a20; --fg: #eceef3; --muted: #9aa0ad; --line: #2a2e37; --chip: #22262e;
  --accent: #3a5cf0; --accent-ink: #ffffff; --accent-text: #8fa5ff; --accent-soft: #1d2440;
  --tag: rgba(0, 0, 0, .72); --tag-ink: #ffffff; --sold: #e25555; --warn: #f0a24a; --warn-soft: #34261a; --ok: #4cc38a;
  --shadow: 0 6px 24px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 15px; line-height: 1.65; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- 上のバー ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.top-in { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 8px; min-height: 56px; }
.logo { font-family: var(--f-num); font-weight: 800; font-size: 21px; color: var(--accent-text); letter-spacing: .02em; white-space: nowrap; }
.back { display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; border-radius: 50%; cursor: pointer; margin-left: -6px; }
.back:hover { background: var(--chip); }
.search { flex: 1; min-width: 0; position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
#q { width: 100%; height: 40px; padding: 0 14px 0 38px; border-radius: 999px; border: 0; background: var(--chip); font-size: 16px; }
.topnav { display: none; gap: 4px; align-items: center; }
.topnav a { padding: 8px 12px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.topnav a:hover { background: var(--chip); }
.topnav .btn { padding: 9px 18px; }

.bellbtn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none; }
.bellbtn:hover { background: var(--chip); }
.bellbtn .badge { top: 2px; left: auto; right: 0; }
.notice-row.unread { background: var(--accent-soft); }
.notice-row .grow b { white-space: normal; }
.notice-row .grow > span { display: block; }
.clamp { display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 下のタブ（スマホ） ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.tabbar a { position: relative; height: var(--tabbar-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10.5px; color: var(--muted); }
.tabbar a.on { color: var(--fg); font-weight: 700; }
.tabbar a.sell span.circle { width: 48px; height: 48px; margin-top: -14px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: var(--shadow); }
.tabbar a.sell { color: var(--fg); }
.badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--sold); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
body.no-tabbar .tabbar { display: none; }

/* ---------- 本文 ---------- */
main { max-width: 1080px; margin: 0 auto; min-height: 70vh;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 12px calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom, 0px)); }
body.has-buybar main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.narrow { max-width: 640px; margin: 0 auto; }
.h { font-size: 17px; font-weight: 700; margin: 18px 0 10px; text-wrap: balance; }
h1.h { font-size: 20px; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 20px; border-radius: var(--r);
  background: var(--accent); color: var(--accent-ink); border: 0; font-weight: 700; cursor: pointer; text-align: center; }
.btn.sub { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 13px; border-radius: 999px; }
.btn[disabled] { background: var(--chip); color: var(--muted); cursor: default; }
.btn.danger { background: var(--surface); color: var(--sold); border: 1px solid var(--line); }
.wide { display: flex; width: 100%; }
.link { color: var(--accent-text); background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- カテゴリと並び替え ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 10px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; white-space: nowrap; cursor: pointer; }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); font-weight: 700; }
.tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.tools > span { white-space: nowrap; }
.tools > span:first-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#fsort { width: auto; border: 0; background: none; color: var(--muted); padding: 4px 0; font-size: 13px; cursor: pointer; }
.toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; }
.toggle input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- 商品グリッド ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.card { display: block; min-width: 0; }
.thumb { position: relative; aspect-ratio: 1; max-width: 100%; overflow: hidden; background: var(--chip); border-radius: 6px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.card:hover .thumb img { transform: scale(1.03); }
/* 値段：写真の下にくっつけた半透明の黒い帯 */
.price-tag { position: absolute; left: 0; right: 0; bottom: 0; color: #fff; font-family: var(--f-num); font-weight: 800;
  font-size: 14px; line-height: 1.2; padding: 18px 8px 6px; font-variant-numeric: tabular-nums;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.72) 100%);
  text-shadow: 0 1px 2px rgba(0,0,0,.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-tag small { font-size: 10px; font-weight: 700; margin-right: 3px; opacity: .9; }
.soldmark { position: absolute; top: 0; left: 0; width: 64px; height: 64px; background: linear-gradient(135deg, var(--sold) 50%, transparent 50%); }
.soldmark span { position: absolute; top: 12px; left: 2px; transform: rotate(-45deg); color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .08em; font-family: var(--f-num); }
.ttl { display: none; font-size: 13px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.noimg { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 12px; }

/* ---------- 商品ページ ---------- */
.item { display: grid; grid-template-columns: 1fr; gap: 0; margin: -12px -16px 0; }
.gallery { position: relative; background: var(--surface); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: none; width: 100%; aspect-ratio: 1; object-fit: cover; scroll-snap-align: center; }
.slidewrap { position: relative; }
.counter { position: absolute; right: 12px; bottom: 12px; background: var(--tag); color: var(--tag-ink); font-size: 12px; padding: 2px 10px; border-radius: 999px; font-family: var(--f-num); }
.dots { display: flex; gap: 6px; justify-content: center; padding: 10px 0 0; }
.dots button { width: 52px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; background: var(--chip); }
.dots button.on { border-color: var(--accent); }
.dots img { width: 100%; height: 100%; object-fit: cover; }
.info { background: var(--surface); padding: 16px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); }
.info h1 { font-size: 19px; line-height: 1.45; margin: 0; font-weight: 700; text-wrap: balance; }
.bigprice { font-family: var(--f-num); font-weight: 800; font-size: 30px; margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.bigprice small { font-family: var(--f-body); font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.reacts { display: flex; gap: 8px; margin: 12px 0 4px; }
.react { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; font-size: 13px; cursor: pointer; }
.react svg { width: 18px; height: 18px; }
.react.on { color: var(--sold); border-color: var(--sold); }
.react.on svg { fill: currentColor; }
.sec { background: var(--surface); margin-top: 8px; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
.sec h3 { font-size: 15px; margin: 0 0 10px; }
.desc { margin: 0; white-space: pre-wrap; word-break: break-word; }
.spec { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec th, .spec td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec th { width: 38%; color: var(--muted); font-weight: 400; padding-right: 12px; }
.person { display: flex; gap: 12px; align-items: center; padding: 4px 0; }
.person .grow { flex: 1; min-width: 0; }
.person .grow > b { display: block; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 700; flex: none; font-size: 18px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar { overflow: hidden; }
.avatar.big { width: 72px; height: 72px; font-size: 28px; }
.stars { font-size: 12.5px; color: var(--muted); }
.stars b { color: var(--fg); font-family: var(--f-num); }
.tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--muted); font-weight: 700; }
.tag.seller { background: var(--accent-soft); color: var(--accent-text); }
.comments { display: flex; flex-direction: column; gap: 14px; }
.cmt { display: flex; gap: 10px; }
.cmt .avatar { width: 34px; height: 34px; font-size: 14px; }
.cmt .bubble { flex: 1; min-width: 0; }
.cmt .bubble p { margin: 4px 0 2px; background: var(--chip); padding: 8px 12px; border-radius: 4px 12px 12px 12px; word-break: break-word; }
.cmt small { color: var(--muted); font-size: 11px; }
.cform { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.cform textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 140px; resize: vertical; }
.reportbox { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }

/* 下に固定する購入バー */
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--surface); border-top: 1px solid var(--line);
  padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.buybar-in { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.buybar .p { font-family: var(--f-num); font-weight: 800; font-size: 22px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.buybar .p small { display: block; font-family: var(--f-body); font-size: 11px; font-weight: 400; color: var(--muted); line-height: 1; }
.buybar .btn { flex: 1; }

/* ---------- フォーム（出品・購入） ---------- */
.form { display: flex; flex-direction: column; gap: 0; }
.group-title { font-size: 13px; color: var(--muted); font-weight: 700; padding: 18px 4px 8px; letter-spacing: .04em; }
.group { background: var(--surface); border-radius: var(--r); overflow: hidden; }
.field { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: 0; }
.field > span { font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.field > span.req { justify-content: flex-start; }
.field > span em { font-style: normal; font-weight: 400; color: var(--muted); }
.req::after { content: "必須"; margin-left: 6px; font-size: 10.5px; padding: 1px 6px; border-radius: 4px; background: var(--sold); color: #fff; vertical-align: 1px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 16px; }
textarea { resize: vertical; }
.priceinput { display: flex; align-items: center; gap: 8px; }
.priceinput b { font-family: var(--f-num); font-size: 22px; }
.priceinput input { font-family: var(--f-num); font-size: 22px !important; font-weight: 700; text-align: right; }
.calc { display: flex; justify-content: space-between; font-size: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.calc:last-child { border-bottom: 0; }
.calc b { font-family: var(--f-num); font-size: 17px; font-variant-numeric: tabular-nums; }
.imgs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 14px 16px; }
.im { position: relative; aspect-ratio: 1; max-width: 100%; }
.im img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.im button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--fg); color: var(--bg); line-height: 1; font-size: 13px; cursor: pointer; }
.im .first { position: absolute; left: 4px; bottom: 4px; font-size: 10px; padding: 0 6px; border-radius: 4px; background: var(--tag); color: var(--tag-ink); }
.addimg { aspect-ratio: 1; border: 1.5px dashed var(--line); border-radius: 8px; display: grid; place-items: center; align-content: center; gap: 2px; color: var(--accent-text); font-size: 11px; cursor: pointer; background: var(--bg); text-align: center; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; padding: 14px 4px; }
.check input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.check a { color: var(--accent-text); text-decoration: underline; }
.actions-bottom { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 12px; }
.confirmbox { background: var(--warn-soft); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- 一覧の行・取引 ---------- */
.list { background: var(--surface); border-radius: var(--r); overflow: hidden; }
.row { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row img, .row .ph { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; background: var(--chip); }
.row .grow { flex: 1; min-width: 0; }
.row .grow b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .grow .num { font-weight: 700; }
.row svg.i { color: var(--muted); width: 18px; height: 18px; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--chip); color: var(--muted); }
.pill.todo { background: var(--warn-soft); color: var(--warn); }
.pill.done { background: var(--chip); color: var(--ok); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--chip); border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.seg button { border: 0; background: none; padding: 8px 6px; border-radius: 8px; font-size: 14px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--fg); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.steps { display: flex; list-style: none; padding: 0; margin: 14px 0; counter-reset: s; }
.steps li { flex: 1; text-align: center; font-size: 12px; color: var(--muted); position: relative; padding-top: 30px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 1;
  width: 24px; height: 24px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; font-weight: 700; font-family: var(--f-num); }
.steps li + li::after { content: ""; position: absolute; top: 11px; right: 50%; width: 100%; height: 2px; background: var(--line); }
.steps li.on { color: var(--fg); font-weight: 700; }
.steps li.on::before { background: var(--accent); color: var(--accent-ink); }
.steps li.on::after { background: var(--accent); }
.box { background: var(--surface); border-radius: var(--r); padding: 16px; margin: 12px 0; display: flex; flex-direction: column; gap: 10px; }
.box h3 { margin: 0; font-size: 16px; }
.box p { margin: 0; }
.box.todo { box-shadow: inset 0 0 0 2px var(--warn); }
.addr { background: var(--bg); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.msgs { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 80%; background: var(--surface); border-radius: 12px 12px 12px 4px; padding: 8px 12px; align-self: flex-start; }
.msg.mine { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-radius: 12px 12px 4px 12px; }
.msg p { margin: 0; word-break: break-word; }
.msg small { font-size: 10.5px; opacity: .7; }
.scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.scores label { border: 1px solid var(--line); border-radius: 10px; padding: 10px 4px; text-align: center; font-size: 13px; cursor: pointer; }
.scores input { position: absolute; opacity: 0; pointer-events: none; }
.scores label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.notice { background: var(--accent-soft); color: var(--fg); padding: 10px 14px; border-radius: 10px; font-size: 14px; margin: 0 0 12px; }
.demo-note { background: var(--warn-soft); color: var(--fg); font-size: 13px; padding: 10px 14px; border-radius: 10px; }

/* ---------- マイページ ---------- */
.me-head { background: var(--surface); border-radius: var(--r); padding: 18px 16px; display: flex; gap: 14px; align-items: center; }
.me-head .grow { flex: 1; min-width: 0; }
.me-head .grow > b { font-size: 18px; display: block; }
.sales { color: inherit; background: var(--surface); border-radius: var(--r); padding: 16px; margin: 10px 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.sales .amount { font-family: var(--f-num); font-weight: 800; font-size: 26px; font-variant-numeric: tabular-nums; }
.menu .row { padding: 15px 16px; }

/* ---------- 規約ページ ---------- */
.doc { background: var(--surface); border-radius: var(--r); padding: 20px; }
.doc h1 { font-size: 20px; margin-top: 0; }
.doc h2 { font-size: 16px; margin-top: 24px; }
.doc .tablewrap { overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }

.foot { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; padding: 24px 16px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom, 0px)); font-size: 12px; color: var(--muted); }
body.has-buybar .foot { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg);
  padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 40; max-width: calc(100% - 32px); box-shadow: var(--shadow); }

/* ---------- PC ---------- */
@media (min-width: 769px) {
  .topnav { display: flex; }
  .tabbar { display: none; }
  main { padding-bottom: 40px; }
  .foot { padding-bottom: 32px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px 14px; }
  .thumb { border-radius: 10px; }
  .ttl { display: block; }
  .item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin: 12px 0 0; align-items: start; }
  .gallery { position: sticky; top: 76px; background: none; }
  .slides img { border-radius: 12px; }
  .info, .sec { border-radius: var(--r); }
  .buybar { position: static; padding: 14px 0 0; border: 0; background: none; }
  .buybar .p { display: none; }
  body.has-buybar main { padding-bottom: 40px; }
  body.has-buybar .foot { padding-bottom: 32px; }
  .toast { bottom: 32px; }
  .chips { margin: 0; padding: 2px 0 12px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- PR・注目の出品 ---------- */
.prtag { position: absolute; top: 6px; right: 6px; background: var(--surface); color: var(--fg); font-size: 10.5px; font-weight: 800;
  letter-spacing: .06em; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--line); font-family: var(--f-num); }
.pill.pr { background: var(--accent-soft); color: var(--accent-text); }
.boostopts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.boostopts label { border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; text-align: center; cursor: pointer; display: flex; flex-direction: column; gap: 0; font-size: 14px; }
.boostopts label small { font-size: 11px; color: var(--muted); font-weight: 400; }
.boostopts label.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.boostopts input { position: absolute; opacity: 0; pointer-events: none; }
.similar { margin-top: 8px; }
.similar .h { padding-left: 4px; }

/* ---------- 出品・取引をわかりやすく ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tiles a { position: relative; background: var(--surface); border-radius: var(--r); padding: 12px 4px; display: flex; flex-direction: column; align-items: center; gap: 0; }
.tiles b { font-size: 22px; font-weight: 800; }
.tiles span { font-size: 12px; color: var(--muted); }
.tiles a.has-todo { box-shadow: inset 0 0 0 2px var(--warn); }
.tiles .badge { top: 6px; left: auto; right: 6px; font-style: normal; }
.segnum { margin-left: 4px; font-size: 12px; color: var(--muted); font-family: var(--f-num); }
.seg button.on .segnum { color: var(--fg); }
.segbadge { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; margin-left: 4px; border-radius: 9px; background: var(--sold); color: #fff; font-size: 10.5px; font-weight: 700; vertical-align: 1px; font-family: var(--f-num); }
.todo-title { color: var(--warn); }
.todo-banner { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; background: var(--warn-soft); }

/* ---------- オークション ---------- */
.auctag { position: absolute; top: 6px; left: 6px; display: inline-flex; align-items: center; gap: 3px; background: rgba(0,0,0,.62); color: #fff;
  font-size: 10.5px; font-weight: 700; padding: 2px 7px 2px 5px; border-radius: 999px; font-family: var(--f-num); }
.auctag svg.i { width: 12px; height: 12px; }
.aucbox { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding: 12px; border-radius: var(--r); background: var(--bg); }
.aucmeta { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
#countdown { font-family: var(--f-num); font-weight: 800; font-variant-numeric: tabular-nums; }
#countdown.urgent { color: var(--sold); }
.bidform { display: flex; flex-direction: column; gap: 8px; }
.bidquick { display: flex; gap: 6px; flex-wrap: wrap; }
.bidlist { display: flex; flex-direction: column; }
.bidlist > div { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.bidlist > div:last-child { border-bottom: 0; }
.bidlist > div.top b { color: var(--accent-text); }

/* ---------- 出品者の他の商品（横にスクロール） ---------- */
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 30%; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-top: 10px; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .ttl { display: none; }
@media (min-width: 769px) { .hscroll { grid-auto-columns: 22%; } }
.more { text-align: center; color: var(--muted); font-size: 13px; padding: 16px 0; min-height: 20px; }

/* ---------- アイコン ---------- */
.avatar.emoji { font-size: 24px; }
.avatar.emoji.big { font-size: 38px; }
.cmt .avatar.emoji { font-size: 18px; }
.iconpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.iconpick button { height: 44px; border-radius: 50%; border: 2px solid transparent; background: var(--bg); font-size: 22px; cursor: pointer; }
.iconpick button.on { border-color: var(--accent); background: var(--accent-soft); }
.colorpick { display: flex; gap: 8px; flex-wrap: wrap; }
.colorpick button { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }
.colorpick button.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--surface) inset; }

.pill.late { background: #fde4e4; color: var(--sold); }
.latetext { color: var(--sold); }
.seg { overflow-x: auto; scrollbar-width: none; }


/* =========================================================
   かっこいい見た目（上の決まりを上書き）
   深い紺のバー＋太い見出し文字＋細長い数字
   ========================================================= */
:root { --r: 14px; }
body { letter-spacing: .01em; }

/* 上のバー：深い紺 */
body::before { background: var(--ink); }
.top { background: var(--ink); border-bottom: 0; color: var(--ink-fg); box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 8px 24px rgba(8,10,30,.18); }
.logo { font-family: var(--f-display); font-weight: 400; font-size: 22px; color: var(--ink-fg); letter-spacing: .04em; display: inline-flex; align-items: center; gap: 6px; }
.logo::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 0 3px rgba(59,91,255,.25), 0 0 14px rgba(59,91,255,.7); transform: rotate(45deg); }
.back, .bellbtn { color: var(--ink-fg); }
.back:hover, .bellbtn:hover { background: rgba(255,255,255,.08); }
#q { background: rgba(255,255,255,.09); color: var(--ink-fg); border: 1px solid rgba(255,255,255,.08); transition: background .15s, border-color .15s; }
#q::placeholder { color: var(--ink-muted); }
#q:focus { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); outline: none; }
.search svg { color: var(--ink-muted); }
.topnav a { color: var(--ink-fg); }
.topnav a:hover { background: rgba(255,255,255,.08); }
.topnav .btn { color: var(--accent-ink); }

/* 下のタブ：深い紺 */
.tabbar { background: var(--ink); border-top: 0; box-shadow: 0 -8px 24px rgba(8,10,30,.18); }
.tabbar a { color: var(--ink-muted); }
.tabbar a.on { color: var(--ink-fg); }
.tabbar a.on::after { content: ""; position: absolute; bottom: 7px; width: 4px; height: 4px; border-radius: 2px; background: var(--accent); }
.tabbar a.on span:not(.circle):not(.badge) { margin-bottom: 4px; }
.tabbar a.sell { color: var(--ink-fg); }
.tabbar a.sell span.circle { background: var(--accent); box-shadow: 0 0 0 5px var(--ink), 0 8px 22px rgba(59,91,255,.55); }
.badge { box-shadow: 0 0 0 2px var(--ink); }

/* 見出し：太い文字＋小さな英語のラベル */
.h { font-family: var(--f-display); font-weight: 400; font-size: 18px; letter-spacing: .03em; }
h1.h { font-size: 22px; }
.h[data-en]::before { content: attr(data-en); display: block; font-family: var(--f-num); font-weight: 800; font-size: 11px; letter-spacing: .22em; color: var(--accent-text); margin-bottom: 2px; }
.h .small { font-family: var(--f-body); letter-spacing: 0; }
.group-title { letter-spacing: .08em; }

/* カテゴリ */
.chip { border: 0; background: var(--surface); box-shadow: 0 1px 2px rgba(15,18,40,.06), inset 0 0 0 1px var(--line); font-weight: 500; }
.chip.on { background: var(--ink); color: var(--ink-fg); box-shadow: 0 6px 16px rgba(12,15,31,.25); }

/* 商品カード */
.grid { gap: 6px; }
.thumb { border-radius: 10px; box-shadow: 0 1px 2px rgba(15,18,40,.06); }
.card { transition: transform .18s ease; }
.card:hover { transform: translateY(-2px); }
.card:hover .thumb { box-shadow: 0 10px 24px rgba(15,18,40,.18); }
.price-tag { font-family: var(--f-num); font-weight: 800; font-size: 17px; letter-spacing: .01em; padding: 22px 9px 6px; }
.price-tag small { font-family: var(--f-body); font-size: 10px; }
.soldmark { width: 70px; height: 70px; }
.soldmark span { font-family: var(--f-num); font-weight: 800; letter-spacing: .14em; }
.prtag { font-family: var(--f-num); letter-spacing: .12em; background: rgba(255,255,255,.92); color: #0c0f1f; border: 0; }
.auctag { background: rgba(12,15,31,.78); backdrop-filter: blur(4px); }

/* ボタン */
.btn { border-radius: var(--r); letter-spacing: .03em; box-shadow: 0 8px 18px rgba(59,91,255,.28); transition: transform .12s, box-shadow .12s, filter .12s; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); box-shadow: 0 4px 10px rgba(59,91,255,.25); }
.btn.sub, .btn.danger, .btn[disabled] { box-shadow: none; }
.btn.small { border-radius: 999px; box-shadow: none; }

/* 商品ページ */
.bigprice { font-family: var(--f-num); font-weight: 800; font-size: 38px; letter-spacing: .005em; }
.info h1 { font-size: 20px; }
.buybar .p { font-family: var(--f-num); font-size: 26px; }
.aucbox { background: var(--ink); color: var(--ink-fg); }
.aucbox .muted, .aucbox .small.muted { color: var(--ink-muted); }
.aucbox .bigprice small { color: var(--ink-muted); }
#countdown { font-size: 18px; color: var(--ink-fg); }
#countdown.urgent { color: #ff6b6b; }
.aucbox .notice { background: rgba(255,255,255,.08); color: var(--ink-fg); }
.aucbox input:not([type="checkbox"]) { background: rgba(255,255,255,.08) !important; color: var(--ink-fg); border-color: rgba(255,255,255,.16) !important; }
.aucbox .btn.sub { background: rgba(255,255,255,.08); color: var(--ink-fg); border-color: rgba(255,255,255,.16); }

/* マイページ：自分の欄を深い紺のカードに */
.me-head { background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%); color: var(--ink-fg); box-shadow: 0 12px 28px rgba(12,15,31,.22); }
.me-head .stars { color: var(--ink-muted); }
.me-head .stars b { color: var(--ink-fg); }
.me-head svg.i { color: var(--ink-muted); }
.me-head .grow > b { font-family: var(--f-display); font-weight: 400; letter-spacing: .03em; }
.sales .amount { font-family: var(--f-num); font-size: 34px; }
.tiles a { box-shadow: 0 1px 2px rgba(15,18,40,.06); }
.tiles b { font-family: var(--f-num); font-size: 30px; line-height: 1.1; }
.calc b { font-family: var(--f-num); font-size: 19px; }
.row .grow .num { font-family: var(--f-num); font-size: 17px; }
.steps li::before { font-family: var(--f-num); }
.steps li.on::before { box-shadow: 0 0 0 4px rgba(59,91,255,.18); }

/* まとまりの白い面を少し浮かせる */
.list, .group, .box, .sales, .doc { box-shadow: 0 1px 2px rgba(15,18,40,.05); }

@media (prefers-reduced-motion: reduce) { .card, .btn { transition: none; } .card:hover { transform: none; } }


/* =========================================================
   形をメルカリに近づける（色・文字は上の決まりのまま）
   ・上は検索の欄だけ（スマホ）・その下に文字のタブ
   ・写真は画面いっぱいに3列、すき間は細く、角は四角
   ・セクションの区切りは太いグレーの帯
   ========================================================= */
@media (max-width: 768px) {
  .logo { display: none !important; }          /* スマホは検索の欄を広く */
  .top-in { gap: 4px; }
}
/* 文字のタブ：下線で選んでいるものを示す */
.chips { gap: 0; margin: -12px -16px 0; padding: 0 8px; background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: calc(56px + env(safe-area-inset-top, 0px)); z-index: 15; }
.chip { flex: none; padding: 12px 12px 10px; border-radius: 0; background: none; box-shadow: none !important; border: 0;
  border-bottom: 3px solid transparent; font-size: 14.5px; font-weight: 500; color: var(--muted); }
.chip.on { background: none; color: var(--fg); font-weight: 700; border-bottom-color: var(--accent); box-shadow: none; }
.tools { padding-top: 10px; }

/* 写真の一覧：画面いっぱい・3列・細いすき間・四角 */
.grid { gap: 2px; }
.thumb { border-radius: 0; box-shadow: none; }
.card:hover { transform: none; }
.card:hover .thumb { box-shadow: none; }
@media (max-width: 768px) {
  main > .grid, #grid > .grid, #reco > .grid, #similar > .grid, #uitems > .grid, .narrow > .grid { margin-left: -16px; margin-right: -16px; }
  .h[data-en]::before { display: none; }       /* 見出しはメルカリのように日本語だけ */
  .h { font-family: var(--f-body); font-weight: 700; font-size: 16px; letter-spacing: 0; }
  h1.h { font-size: 19px; }
}
.prtag { border-radius: 2px; }
.soldmark { width: 62px; height: 62px; }

/* 商品ページ：写真は画面いっぱい・区切りは太いグレーの帯 */
.slides img { border-radius: 0; }
.sec { margin-top: 10px; }
.info { padding-top: 14px; }
.info h1 { font-family: var(--f-body); font-weight: 700; }
.reacts { gap: 18px; margin: 10px 0 2px; }
.react { border: 0; background: none; padding: 4px 0; flex-direction: column; gap: 0; font-size: 11px; color: var(--muted); }
.react svg { width: 26px; height: 26px; }
.react .num { font-size: 12px; }
.react.on { color: var(--sold); }
@media (min-width: 769px) { .slides img { border-radius: 10px; } }

/* ボタン：メルカリのように、横いっぱいの角丸の太いボタン */
.btn { border-radius: 8px; box-shadow: none; font-size: 16px; }
.btn.small { border-radius: 999px; font-size: 13px; }
.btn:active { transform: none; filter: brightness(.95); }

/* 一覧の行・まとまりは、角を少なめに（メルカリ風の平らな面） */
@media (max-width: 768px) {
  .list, .group { border-radius: 0; margin-left: -16px; margin-right: -16px; box-shadow: none; }
  .group-title { padding-left: 0; }
  .me-head { border-radius: 0; margin: -12px -16px 0; box-shadow: none; }
  .sales { border-radius: 0; margin-left: -16px; margin-right: -16px; box-shadow: none; }
  .tiles { margin-left: -16px; margin-right: -16px; gap: 1px; background: var(--line); }
  .tiles a { border-radius: 0; box-shadow: none; }
  .box { border-radius: 10px; }
}


/* =========================================================
   丸みをおさえる（角を小さく・きっちりした印象に）
   丸のままにするのは、アイコン（顔）と赤い数字のバッジだけ
   ========================================================= */
:root { --r: 4px; }
.logo::before { display: none; }
#q { border-radius: 4px; }
.btn, .btn.small { border-radius: 4px; }
.btn.small { letter-spacing: .02em; }
.ghost, .react { border-radius: 4px; }
.chip { border-radius: 0; }
.pill, .tag, .prtag, .segbadge + .pill { border-radius: 2px; }
.auctag { border-radius: 2px; }
.counter { border-radius: 2px; }
.price-tag { border-radius: 0; }
.seg { border-radius: 4px; }
.seg button { border-radius: 3px; }
.box, .notice, .demo-note, .addr, .confirmbox, .aucbox, .doc, .sales, .me-head, .list, .group, .tiles a, .im img, .addimg, .row img, .row .ph, .dots button, .thumbs img { border-radius: 4px; }
.scores label, .boostopts label { border-radius: 4px; }
.msg, .msg.mine, .cmt .bubble p { border-radius: 4px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea { border-radius: 4px; }
.toast { border-radius: 4px; }
.iconpick button { border-radius: 4px; }
.colorpick button { border-radius: 4px; }
.back, .bellbtn { border-radius: 4px; }
.topnav a { border-radius: 4px; }
/* 真ん中の出品ボタンは、丸ではなく角の小さい四角に */
.tabbar a.sell span.circle { border-radius: 8px; width: 50px; height: 44px; margin-top: -10px; }
.steps li::before { border-radius: 3px; }
.im button { border-radius: 3px; }
.slides img { border-radius: 0; }
@media (min-width: 769px) { .slides img, .thumb { border-radius: 4px; } }


/* =========================================================
   凹凸をつける（薄っぺらく見えないように）
   ・背景は一番低い面、カードはその上に浮いた面、カードの中のボタンはさらに上の面
   ・面の上のふちに細い光、下に影 → 重なって見える
   ・下のタブは画面から浮いた、すりガラスのバー
   ========================================================= */
:root {
  --bg: #e9ecf2; --surface: #ffffff; --surface-2: #f1f3f7; --line: #e3e6ec;
  --lift: 0 1px 0 rgba(255,255,255,.9) inset, 0 1px 2px rgba(16,20,40,.06), 0 6px 18px rgba(16,20,40,.07);
  --lift-hi: 0 1px 0 rgba(255,255,255,.9) inset, 0 2px 4px rgba(16,20,40,.08), 0 14px 30px rgba(16,20,40,.14);
  --press: inset 0 1px 3px rgba(16,20,40,.12);
  --r: 8px; --r-s: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0c10; --surface: #181b22; --surface-2: #232731; --line: #2a2f3a; --chip: #232731;
    --lift: 0 1px 0 rgba(255,255,255,.06) inset, 0 1px 2px rgba(0,0,0,.5), 0 8px 22px rgba(0,0,0,.45);
    --lift-hi: 0 1px 0 rgba(255,255,255,.08) inset, 0 2px 6px rgba(0,0,0,.55), 0 16px 34px rgba(0,0,0,.6);
    --press: inset 0 1px 3px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --bg: #0a0c10; --surface: #181b22; --surface-2: #232731; --line: #2a2f3a; --chip: #232731;
  --lift: 0 1px 0 rgba(255,255,255,.06) inset, 0 1px 2px rgba(0,0,0,.5), 0 8px 22px rgba(0,0,0,.45);
  --lift-hi: 0 1px 0 rgba(255,255,255,.08) inset, 0 2px 6px rgba(0,0,0,.55), 0 16px 34px rgba(0,0,0,.6);
  --press: inset 0 1px 3px rgba(0,0,0,.6);
}

/* 上のバー：検索の欄はくぼんだ面、ベルは浮いたボタン */
.top { box-shadow: 0 1px 0 rgba(255,255,255,.05), 0 10px 26px rgba(4,6,20,.35); }
#q { border-radius: var(--r); background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.07);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.06); height: 42px; }
#q:focus { background: rgba(0,0,0,.36); border-color: rgba(120,145,255,.55); }
.bellbtn, .back { border-radius: var(--r); }
.bellbtn { background: rgba(255,255,255,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 4px 10px rgba(0,0,0,.3); width: 42px; height: 42px; }
.bellbtn:active { box-shadow: inset 0 2px 4px rgba(0,0,0,.4); }

/* カテゴリのタブ：選んでいるものは浮いたブロック、ほかは線だけ */
.chips { background: var(--bg); border-bottom: 0; padding: 10px 16px; gap: 8px; margin: -12px -16px 4px;
  box-shadow: 0 8px 14px -10px rgba(0,0,0,.35); }
.chip { padding: 8px 14px; border-radius: var(--r-s); border: 1px solid var(--line) !important; border-bottom-width: 1px !important;
  background: transparent; color: var(--fg); font-weight: 500; font-size: 14px; }
.chip.on { background: var(--surface); border-color: transparent !important; box-shadow: var(--lift) !important; font-weight: 700; color: var(--fg); }
:root .chip.on { position: relative; }
.chip.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; background: var(--accent); border-radius: 1px; }

/* 商品の写真：画面のふちに余白、写真ひとつずつが浮いたタイル */
.grid { gap: 6px; }
@media (max-width: 768px) {
  main > .grid, #grid > .grid, #reco > .grid, #similar > .grid, #uitems > .grid, .narrow > .grid { margin-left: 0; margin-right: 0; }
}
.card { position: relative; display: block; }
.card > a { display: block; }
.thumb { border-radius: var(--r-s) !important; box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 2px 4px rgba(0,0,0,.18), 0 8px 16px rgba(0,0,0,.12); }
.thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 0 0 1px rgba(255,255,255,.04); }
.card:active .thumb { transform: scale(.985); transition: transform .08s; }
.price-tag { border-radius: 0 0 var(--r-s) var(--r-s); }
/* 写真の上のハート */
.heart { position: absolute; top: 5px; right: 5px; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0;
  border-radius: 50%; background: rgba(0,0,0,.32); color: #fff; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 6px rgba(0,0,0,.25); z-index: 2; }
.heart svg.i { width: 20px; height: 20px; stroke-width: 2; }
.heart.on { background: rgba(255,255,255,.92); color: #e5384f; }
.heart.on svg.i { fill: currentColor; }
.heart:active { transform: scale(.9); }
.prtag { top: auto; bottom: 30px; right: 6px; }

/* 横に並ぶ棚（最近見た商品・出品者の他の商品） */
.shelf { margin: 4px 0 10px; }
.shelf-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 14px 0 0; }
.shelf-h .h { margin: 0; }
.shelf-h .small { white-space: nowrap; }
.hscroll { grid-auto-columns: 31%; gap: 6px; margin: 10px -16px 0; padding: 2px 16px 12px; scroll-padding: 16px; scroll-snap-type: x proximity; }
.hscroll .card { scroll-snap-align: start; }

/* カード（一覧・入力・マイページ）：ふちに余白をとって浮かせる */
.list, .group, .box, .sales, .doc, .me-head, .confirmbox { border-radius: var(--r) !important; box-shadow: var(--lift) !important; }
@media (max-width: 768px) {
  .list, .group, .sales { margin-left: 0 !important; margin-right: 0 !important; }
  .me-head { margin: 0 0 0 !important; }
}
.me-head { border: 1px solid rgba(255,255,255,.06); box-shadow: var(--lift-hi) !important; }
.row { border-bottom-color: var(--line); }
.list .row:active { background: var(--surface-2); }
.row svg.i:first-child { box-sizing: content-box; padding: 7px; border-radius: var(--r-s); background: var(--surface-2); color: var(--fg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06); width: 18px; height: 18px; }
.row img, .row .ph { border-radius: var(--r-s) !important; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.group-title { padding-left: 2px; }

/* マイページの数字のタイル：ひとつずつ浮いたブロック */
@media (max-width: 768px) { .tiles { margin-left: 0 !important; margin-right: 0 !important; gap: 8px !important; background: none !important; } }
.tiles { gap: 8px; }
.tiles a { border-radius: var(--r) !important; box-shadow: var(--lift) !important; padding: 14px 4px 12px; gap: 2px; }
.tiles a svg.i { width: 22px; height: 22px; color: var(--accent-text); margin-bottom: 2px; }
.tiles a span { font-size: 12px; }
.tiles b { font-size: 24px; }
.tiles a:active { box-shadow: var(--press) !important; }
.tiles a.has-todo { box-shadow: inset 0 0 0 2px var(--warn), var(--lift) !important; }
.sales .amount { text-shadow: 0 1px 0 rgba(255,255,255,.04); }

/* ボタン：上にうっすら光、下に影。押すとへこむ */
.btn { border-radius: var(--r); background: linear-gradient(180deg, #4a6bff 0%, var(--accent) 55%, #2643cf 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -2px 0 rgba(0,0,0,.18), 0 6px 16px rgba(44,79,232,.35); }
.btn:active { box-shadow: inset 0 2px 5px rgba(0,0,0,.3); transform: translateY(1px); filter: none; }
.btn.sub, .btn.danger { background: var(--surface-2); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 2px 5px rgba(0,0,0,.12); }
.btn.sub:active, .btn.danger:active { box-shadow: var(--press); }
.btn[disabled] { background: var(--chip); box-shadow: var(--press); }
.btn.small { border-radius: var(--r-s); }

/* 入力の欄はくぼませる */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
  border-radius: var(--r-s); background: var(--surface-2); box-shadow: inset 0 2px 4px rgba(0,0,0,.12); }
.seg { background: var(--surface-2); box-shadow: inset 0 2px 4px rgba(0,0,0,.18); border-radius: var(--r); }
.seg button.on { background: var(--surface); box-shadow: var(--lift); border-radius: var(--r-s); }

/* 商品ページ：情報の面を写真の上に少し重ねる */
@media (max-width: 768px) {
  .info { position: relative; margin-top: -14px; border-radius: 14px 14px 0 0; box-shadow: 0 -10px 24px rgba(0,0,0,.25); }
  .sec { margin: 10px 12px 0; border-radius: var(--r); box-shadow: var(--lift); }
}
.react { background: var(--surface-2); border-radius: var(--r-s); padding: 6px 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 2px 5px rgba(0,0,0,.15); }
.react:active { box-shadow: var(--press); }
.aucbox { border-radius: var(--r); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 24px rgba(0,0,0,.3); }
.buybar { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255,255,255,.06); box-shadow: 0 -10px 26px rgba(0,0,0,.25); }

/* 下のタブ：画面から浮いた、すりガラスのバー */
@media (max-width: 768px) {
  .tabbar { left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); padding: 5px; border-radius: 18px;
    background: color-mix(in srgb, var(--ink) 78%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 30px rgba(0,0,0,.45); }
  .tabbar a { height: 52px; border-radius: 13px; }
  .tabbar a.on { background: rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 2px 8px rgba(0,0,0,.25); }
  .tabbar a.on::after { display: none; }
  .tabbar a.on span:not(.circle):not(.badge) { margin-bottom: 0; }
  .tabbar a.sell span.circle { margin-top: 0; width: 40px; height: 30px; border-radius: 8px; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 4px 12px rgba(59,91,255,.5); }
  .tabbar a.sell span.circle svg.i { width: 20px; height: 20px; }
  main { padding-bottom: calc(var(--tabbar-h) + 44px + env(safe-area-inset-bottom, 0px)); }
  .foot { padding-bottom: calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom, 0px)); }
}
.badge { box-shadow: 0 0 0 2px var(--ink), 0 2px 5px rgba(0,0,0,.4); }
.toast { border-radius: var(--r); box-shadow: var(--lift-hi); }
.notice, .demo-note { border-radius: var(--r); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.card:hover .thumb { box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 4px 8px rgba(0,0,0,.2), 0 12px 22px rgba(0,0,0,.16); }
.heart { width: 28px; height: 28px; top: 4px; right: 4px; }
.heart svg.i { width: 17px; height: 17px; }
#fsort { background: none !important; box-shadow: none !important; border: 0 !important; }
@media (max-width: 768px) { .gallery { padding-bottom: 22px; } }


/* =========================================================
   白ベース（上のバー・下のタブも白。紺は文字とボタンの色に）
   ========================================================= */
:root[data-theme="light"] { --bg: #f5f6f8; --surface: #ffffff; --surface-2: #f0f2f5; --line: #e6e8ed; --chip: #eef0f4; color-scheme: light; }
body::before { background: var(--surface); }
.top { background: rgba(255,255,255,.94); color: var(--fg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(16,20,40,.05); }
.logo { color: var(--ink); }
.back, .bellbtn { color: var(--fg); }
.back:hover { background: var(--surface-2); }
.bellbtn { background: var(--surface); box-shadow: 0 1px 0 #fff inset, 0 1px 2px rgba(16,20,40,.08), 0 4px 12px rgba(16,20,40,.08); }
#q { background: var(--surface-2); color: var(--fg); border: 1px solid transparent; box-shadow: inset 0 2px 4px rgba(16,20,40,.08); }
#q::placeholder, .search svg { color: var(--muted); }
#q:focus { background: #fff; border-color: var(--accent); }
.topnav a { color: var(--fg); }
.topnav a:hover { background: var(--surface-2); }
.topnav .btn { color: #fff; }
.badge { box-shadow: 0 0 0 2px #fff; }
@media (max-width: 768px) {
  .tabbar { background: rgba(255,255,255,.9); border: 1px solid rgba(16,20,40,.06);
    box-shadow: 0 1px 0 #fff inset, 0 10px 30px rgba(16,20,40,.16); }
  .tabbar a { color: var(--muted); }
  .tabbar a.on { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 1px 2px rgba(16,20,40,.08); }
  .tabbar a.sell { color: var(--ink); }
}
.chips { background: var(--bg); box-shadow: none; }
.chip.on { background: var(--surface); }
.thumb { box-shadow: 0 1px 2px rgba(16,20,40,.08), 0 6px 14px rgba(16,20,40,.08); }
.card:hover .thumb { box-shadow: 0 2px 4px rgba(16,20,40,.1), 0 12px 22px rgba(16,20,40,.14); }
.info { box-shadow: 0 -8px 20px rgba(16,20,40,.08); }
.buybar { box-shadow: 0 -8px 22px rgba(16,20,40,.08); border-top: 1px solid var(--line); }

/* ---------- ホームの上の部分 ---------- */
#bento { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 8px; }
#bento .h { margin: 6px 0 8px; font-size: 16px; }
#bento .shelf-h { margin: 6px 0 0; }
#bento .shelf-h .h { margin: 0; }
.tiles3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.tiles3 a { color: var(--fg); }
.tiles3 a svg.i { color: var(--fg); }
.tiles3 a span { font-size: 13px; color: var(--fg); }
.tiles3 b { font-size: 20px !important; }
.tiles3 b small { font-size: 12px; font-family: var(--f-body); margin-left: 1px; }
.promo { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r); color: #fff;
  background: linear-gradient(120deg, var(--ink) 0%, #1c2a7a 60%, var(--accent) 140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 24px rgba(24,36,120,.25); }
.promo-k { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; text-align: center; font-size: 11px; font-weight: 700; line-height: 1.3;
  background: rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); padding: 6px; }
.promo-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.promo-t b { font-size: 15px; }
.promo-t span { font-size: 12px; color: rgba(255,255,255,.75); line-height: 1.5; }
.promo svg.i { color: rgba(255,255,255,.7); }
/* 人気の商品：大きい1枚＋小さい4枚 */
.bento-feat { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; }
.bento-feat .card:first-child { grid-row: span 2; }
.bento-feat .card:first-child .thumb { aspect-ratio: auto; height: 100%; }
.bento-feat .card:first-child > a { height: 100%; }
.bento-feat .card:first-child .price-tag { font-size: 20px; }
.bento-feat .ttl { display: none; }
/* 2列：左にオークションと売上金、右に最近見た商品 */
.bento-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.bento-l, .bento-r { display: flex; flex-direction: column; min-width: 0; }
.aucban { display: flex; align-items: center; gap: 8px; padding: 14px 12px; border-radius: var(--r); color: #fff; min-height: 76px;
  background: linear-gradient(135deg, #10142e, #2a1d5e); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 8px 18px rgba(16,20,46,.25); }
.aucban > svg.i:first-child { width: 28px; height: 28px; color: #ffcf5a; }
.aucban span { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.aucban b { font-size: 13px; }
.aucban .num { font-size: 20px; font-weight: 800; }
.aucban > svg.i:last-child { width: 16px; height: 16px; opacity: .7; }
.walletcard { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: var(--r); background: var(--surface); box-shadow: var(--lift); }
.walletcard b.num { font-size: 24px; font-weight: 800; line-height: 1.2; }
.minigrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.minigrid .price-tag { font-size: 11px; padding: 14px 4px 3px; }
.minigrid .heart { width: 22px; height: 22px; top: 2px; right: 2px; }
.minigrid .heart svg.i { width: 13px; height: 13px; }
.minigrid .ttl, .minigrid .prtag, .minigrid .auctag { display: none; }
.minigrid .soldmark { width: 34px; height: 34px; }
.minigrid .soldmark span { font-size: 7px; top: 6px; left: 0; }
.sellcta { margin-top: 10px; min-height: 42px; font-size: 14px; }
@media (min-width: 769px) {
  .bento-feat { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; grid-template-rows: 1fr; }
  .bento-feat .card:first-child { grid-row: auto; }
  .bento-2 { gap: 18px; }
}
.bento-feat .card:not(:first-child) .auctag { display: none; }
.bento-feat .card:not(:first-child) .price-tag { font-size: 15px; }
.promo-k { font-size: 10.5px; }
#bento + .tools { margin-top: 4px; }
.bento-feat .card:not(:first-child) .price-tag small { display: none; }
@media (min-width: 769px) {
  .bento-feat { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .bento-feat .card:first-child .thumb { aspect-ratio: 1; height: auto; }
  .bento-feat .card:first-child > a { height: auto; }
  .bento-feat .card:first-child .price-tag { font-size: 17px; }
}


/* =========================================================
   画像の見た目に合わせる：生成りの白・茶色・大きめの丸み
   ========================================================= */
:root[data-theme="light"] {
  --bg: #f7f4ef; --surface: #ffffff; --surface-2: #efe9e0; --line: #ebe4da; --chip: #efe9e0;
  --fg: #2a2420; --muted: #8b8178;
  --accent: #a87b4f; --accent-ink: #fff; --accent-text: #8c5f34; --accent-soft: #f4ebe0;
  --ink: #3a2a1e; --ink-2: #4a3628; --ink-fg: #fff; --ink-muted: #cdbfb1;
  --lift: 0 1px 2px rgba(80,55,30,.06), 0 8px 22px rgba(80,55,30,.09);
  --lift-hi: 0 2px 4px rgba(80,55,30,.08), 0 16px 34px rgba(80,55,30,.14);
  --press: inset 0 2px 4px rgba(80,55,30,.12);
  --r: 18px; --r-s: 14px;
}
body { background: var(--bg); }
body::before { background: var(--bg); }
.top { background: color-mix(in srgb, var(--bg) 92%, transparent); box-shadow: none; }
.top-in { min-height: 64px; gap: 6px; }
#q { height: 44px; border-radius: 999px; background: var(--surface-2); box-shadow: none; border: 0; }
#q:focus { background: #fff; box-shadow: 0 0 0 2px var(--accent); }
.bellbtn, .back { background: none !important; box-shadow: none !important; border-radius: 50%; width: 42px; height: 42px; }
.bellbtn svg.i { width: 26px; height: 26px; }
.meav { flex: none; display: block; width: 40px; height: 40px; border-radius: 50%; padding: 2px; background: var(--accent); box-shadow: 0 3px 8px rgba(120,80,40,.3); }
.meav .avatar { width: 36px; height: 36px; font-size: 15px; border: 2px solid #fff; }
.meav .avatar.emoji { font-size: 18px; }
@media (min-width: 769px) { .meav, #todo { display: none !important; } }
.badge { box-shadow: 0 0 0 2px var(--bg); }
#todo .badge, #bell .badge { top: 0; right: -2px; }

/* カテゴリのタブ：丸いボタン */
.chips { background: var(--bg); padding: 8px 16px 10px; }
.chip { border-radius: 999px !important; border: 1px solid var(--line) !important; background: transparent; padding: 8px 16px; }
.chip.on { background: var(--fg) !important; color: #fff !important; border-color: var(--fg) !important; box-shadow: 0 4px 12px rgba(40,30,20,.2) !important; }
.chip.on::after { display: none; }

/* 写真：角を大きく丸く・やわらかい影 */
.thumb { border-radius: var(--r-s) !important; box-shadow: 0 2px 6px rgba(80,55,30,.1), 0 8px 18px rgba(80,55,30,.1); }
.thumb::after { box-shadow: none; }
.card:hover .thumb { box-shadow: 0 4px 10px rgba(80,55,30,.14), 0 14px 26px rgba(80,55,30,.14); }
.grid, .hscroll { gap: 8px; }
/* 値段：左下の丸い札（半透明の黒） */
.price-tag { left: 7px; right: auto; bottom: 7px; max-width: calc(100% - 14px); padding: 3px 11px; border-radius: 999px !important; font-size: 14px;
  background: rgba(20,14,10,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-shadow: none; }
.price-tag small { font-size: 9.5px; }
/* NEW・HOT の斜めの帯 */
.ribbon { position: absolute; top: 0; left: 0; width: 58px; height: 58px; pointer-events: none; z-index: 1;
  clip-path: polygon(0 0, 100% 0, 0 100%); color: #fff; font-family: var(--f-num); font-weight: 800; font-size: 11px; letter-spacing: .06em; }
.ribbon::before { content: attr(data-x); }
.ribbon { display: block; text-indent: 0; }
.ribbon.new { background: #3a8fe6; }
.ribbon.hot { background: #d43ccf; }
.ribbon { line-height: 1; padding: 0; }
.ribbon { --t: rotate(-45deg); }
.ribbon { text-align: center; }
.ribbon { font-size: 0; }
.ribbon::after { content: ""; }
.ribbon.new::after { content: "NEW"; }
.ribbon.hot::after { content: "HOT"; }
.ribbon::after { position: absolute; top: 14px; left: -2px; width: 44px; font-size: 11px; transform: rotate(-45deg); text-align: center; }
.soldmark { width: 58px; height: 58px; }
/* ハート：丸い背景なしの白いふち */
.heart { background: none !important; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; width: 32px; height: 32px; top: 4px; right: 4px; }
.heart svg.i { width: 24px; height: 24px; fill: rgba(30,20,10,.28); stroke: #fff; stroke-width: 1.8; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
.heart.on svg.i { fill: #ef3e56; stroke: #fff; }
.prtag { border-radius: 999px; }
.auctag { border-radius: 999px; }

/* カード・タイル */
.list, .group, .box, .sales, .doc, .me-head, .confirmbox, .walletcard { border-radius: var(--r) !important; box-shadow: var(--lift) !important; }
.tiles a { border-radius: var(--r) !important; box-shadow: var(--lift) !important; }
.btn { border-radius: 999px; background: var(--accent); box-shadow: 0 6px 16px rgba(140,95,50,.3); }
.btn.sub, .btn.danger { background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(80,55,30,.08); }
.btn.small { border-radius: 999px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea { border-radius: 12px; background: var(--surface-2); box-shadow: none; border-color: transparent; }
.seg { border-radius: 999px; box-shadow: none; }
.seg button.on { border-radius: 999px; }
.pill, .tag { border-radius: 999px; }
.me-head { background: linear-gradient(135deg, #4a3628, #6e5038) !important; }
.aucbox { background: #3a2418; }
.promo, .aucban { border-radius: var(--r); }

/* ---------- ホーム ---------- */
#bento { gap: 12px; }
#bento > .h, .bento-l .h, .bento-r .h { font-size: 17px; margin: 4px 2px 8px; font-weight: 700; }
.promo { position: relative; overflow: hidden; min-height: 132px; padding: 14px 16px; gap: 10px; color: var(--fg);
  background: radial-gradient(120% 140% at 0% 50%, #f3e4cf 0 32%, #fff 33%); box-shadow: var(--lift); }
.promo-k { width: 82px; height: 82px; background: #8a6440; color: #fff; font-size: 11.5px; line-height: 1.35; box-shadow: 0 6px 14px rgba(110,75,40,.3); }
.promo-art { position: relative; flex: none; width: 78px; height: 96px; }
.promo-art > span { position: absolute; inset: 10px 6px; border-radius: 12px; background: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(80,55,30,.18);
  border-top: 14px solid #f6c445; }
.promo-art > span svg.i { width: 34px; height: 34px; color: #a87b4f; }
.promo-art i { position: absolute; bottom: 0; width: 10px; height: 46px; background: linear-gradient(to top, transparent, #d8bf9f); clip-path: polygon(50% 0, 100% 22%, 70% 22%, 70% 100%, 30% 100%, 30% 22%, 0 22%); }
.promo-art i:nth-child(1) { left: -10px; } .promo-art i:nth-child(2) { right: -10px; height: 60px; } .promo-art i:nth-child(3) { left: 34px; bottom: -14px; height: 30px; }
.promo-t { gap: 2px; text-align: center; }
.promo-t small { font-size: 11px; color: #9a6c41; font-weight: 700; }
.promo-t b { font-size: 17px; line-height: 1.35; color: #5a4030; }
.promo-t em { font-style: normal; font-size: 21px; color: #e07a1c; font-weight: 800; }
.promo > svg.i { display: none; }
.tiles3 { gap: 10px !important; }
.tiles3 a { padding: 16px 4px 14px; }
.tiles3 a svg.i { width: 28px; height: 28px; color: var(--fg); stroke-width: 1.6; }
.tiles3 a span { font-size: 14px; }
.tiles3 b { font-size: 20px !important; font-family: var(--f-body); }
.bento-feat { gap: 8px; }
.bento-feat .card:first-child .price-tag { font-size: 15px; }
.bento-2 { gap: 12px; }
.aucban { flex-direction: row; min-height: 90px; padding: 12px; gap: 8px; color: #ffb35c;
  background: radial-gradient(120% 120% at 20% 0%, #5a3420, #2e1a10 70%); box-shadow: 0 8px 18px rgba(60,30,10,.3); }
.aucban-k { display: flex; flex-direction: column; align-items: center; gap: 0; flex: none; }
.aucban-k svg.i { width: 30px; height: 30px; color: #ff9a3c; }
.aucban-k small { font-family: var(--f-num); font-weight: 800; font-size: 8.5px; letter-spacing: .12em; color: #ffd35c; }
.aucban-t { flex: 1; font-family: var(--f-display); font-size: 16px; line-height: 1.2; color: #ffb35c;
  text-shadow: 0 0 8px rgba(255,140,40,.6), 0 0 2px rgba(255,180,90,.9); }
.aucban-s { font-size: 10px; color: #ffd9a8; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.aucban-s b { font-size: 20px; color: #fff; }
.walletcard { margin-top: 12px; padding: 14px; gap: 8px; }
.wc-h { font-size: 18px; font-weight: 800; }
.wc-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.wc-row b { margin-left: auto; font-size: 15px; }
.wc-row svg.i { width: 14px; height: 14px; color: var(--muted); }
.coin { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #f0a92c; color: #fff; font-style: normal; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.minigrid { gap: 6px; }
.minigrid .thumb { border-radius: 10px !important; }
.minigrid .price-tag { font-size: 10.5px; padding: 1px 6px; left: 4px; bottom: 4px; }
.minigrid .heart { width: 22px; height: 22px; } .minigrid .heart svg.i { width: 16px; height: 16px; }
.minigrid .ribbon { transform: scale(.6); transform-origin: 0 0; }
.sellcta { margin: 14px auto 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; width: 100%;
  border-radius: 999px; background: var(--accent); color: #fff; font-weight: 800; font-size: 16px; box-shadow: 0 8px 18px rgba(140,95,50,.35); }
.sellcta svg.i { width: 22px; height: 22px; }

/* 下のタブ：白い浮いたバー＋真ん中の丸い出品ボタン */
@media (max-width: 768px) {
  .tabbar { left: 12px; right: 12px; border-radius: 999px; background: rgba(255,255,255,.95); border: 0; padding: 4px 6px;
    box-shadow: 0 10px 30px rgba(80,55,30,.18); overflow: visible; }
  .tabbar a { height: 56px; border-radius: 999px; color: #4a4038; font-size: 10.5px; font-weight: 700; }
  .tabbar a.on { background: none; box-shadow: none; color: var(--accent); }
  .tabbar a.on svg.i { fill: currentColor; fill-opacity: .9; }
  .tabbar a.sell { color: #fff; }
  .tabbar a.sell span.circle { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); width: 76px; height: 76px; margin: 0;
    border-radius: 50% !important; background: var(--accent); flex-direction: column; display: flex; align-items: center; justify-content: center; gap: 0;
    box-shadow: 0 0 0 5px rgba(255,255,255,.95), 0 10px 20px rgba(140,95,50,.4); }
  .tabbar a.sell span.circle svg.i { width: 28px; height: 28px; }
  .tabbar a.sell > span:not(.circle) { position: absolute; top: 25px; left: 50%; transform: translateX(-50%); color: #fff; z-index: 1; font-size: 11px; }
}
[hidden] { display: none !important; }
.promo { gap: 8px; padding: 14px 12px; }
.promo-k { width: 70px; height: 70px; font-size: 10.5px; }
.promo-art { width: 62px; height: 84px; }
.promo-t { white-space: nowrap; }
.promo-t small { font-size: 10.5px; }
.promo-t b { font-size: 15px; }
.promo-t em { font-style: normal; font-size: 20px; font-weight: 800; color: #e07a1c; line-height: 1.2; }
#bento > .h { margin: 6px 2px -2px; }
.bento-feat .card:not(:first-child) .price-tag { font-size: 12.5px; padding: 2px 8px; left: 5px; bottom: 5px; }
.bento-feat .card:not(:first-child) .ribbon { transform: scale(.8); transform-origin: 0 0; }
.minigrid .price-tag { font-size: 9.5px; padding: 1px 5px; left: 3px; bottom: 3px; max-width: calc(100% - 6px); }
.minigrid .ribbon { transform: scale(.55); }
.aucban { gap: 6px; padding: 12px 10px; }
.aucban-t { font-size: 13.5px; white-space: nowrap; }
.aucban-k svg.i { width: 26px; height: 26px; }
.aucban-k small { display: none; }
.aucban-s { font-size: 9.5px; flex: none; }
.aucban-s b { font-size: 18px; }
.aucban-t { font-size: 14px; }
.wc-row { white-space: nowrap; min-width: 0; }
.wc-row b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.aucban { flex-wrap: wrap; align-content: center; min-height: 96px; row-gap: 4px; }
.aucban-k { order: 1; }
.aucban-s { order: 2; margin-left: auto; flex-direction: row; align-items: baseline; gap: 3px; font-size: 11px; }
.aucban-t { order: 3; flex-basis: 100%; }
.aucban-t br { display: none; }
.auctag { top: auto !important; bottom: 34px; left: 7px; }
.minigrid .auctag { display: none; }
.aucban { display: grid !important; grid-template-columns: auto 1fr; grid-template-areas: "k s" "t t"; align-items: center; }
.aucban-k { grid-area: k; }
.aucban-s { grid-area: s; display: flex !important; flex-direction: row !important; justify-self: end; align-items: baseline !important; gap: 2px; }
.aucban-t { grid-area: t; display: block !important; white-space: nowrap; font-size: 16px; }
.wc-row b { flex: none; overflow: visible; }
.wc-row { gap: 6px; font-size: 13px; }
.walletcard .wc-row b.num { font-size: 15px; font-weight: 800; }
.minigrid .price-tag small { display: none; }


/* =========================================================
   メルカリと同じ形・白ベース（いちばん最後に上書き）
   ========================================================= */
:root[data-theme="light"] {
  --bg: #ffffff; --surface: #f5f5f6; --surface-2: #efeff1; --line: #e6e6e9; --chip: #efeff1;
  --fg: #1d1d1f; --muted: #7c7c82;
  --accent: #2c4fe8; --accent-ink: #fff; --accent-text: #2445d6; --accent-soft: #e9eeff;
  --ink: #1d1d1f; --ink-2: #2b2b2f;
  --lift: none; --lift-hi: 0 10px 30px rgba(0,0,0,.12); --press: inset 0 1px 3px rgba(0,0,0,.08);
  --r: 16px; --r-s: 12px;
}
body, body::before, .top { background: #fff; }
.top { box-shadow: none; backdrop-filter: none; }
#q { background: var(--surface-2); border-radius: 999px; height: 44px; }
.bellbtn { color: var(--fg); }
.meav { background: none; padding: 0; box-shadow: none; }
.meav .avatar { width: 40px; height: 40px; border: 0; }
.badge { box-shadow: 0 0 0 2px #fff; }

/* タブ（おすすめ・いいね！…）：白い丸ボタン、選ぶと薄いグレー */
.chips { background: #fff; padding: 6px 16px 12px; box-shadow: none; gap: 8px; }
.chip { border: 1px solid var(--line) !important; background: #fff !important; color: var(--fg) !important; font-weight: 500; padding: 9px 18px; box-shadow: none !important; }
.chip.on { background: var(--surface-2) !important; border-color: var(--surface-2) !important; color: var(--fg) !important; font-weight: 700; }

/* 写真 */
.grid, .hscroll { gap: 4px; }
.thumb { border-radius: 12px !important; box-shadow: none !important; background: var(--surface-2); }
.card:hover .thumb { box-shadow: none !important; }
.price-tag { background: rgba(0,0,0,.52); left: 8px; bottom: 8px; font-size: 14px; padding: 3px 10px; }
.heart svg.i { fill: rgba(0,0,0,.18); }
.ribbon.new { background: #3d8ff0; }
.ribbon.hot { background: #d93ad6; }

/* 見出し＋右の丸いボタン */
.sh { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; }
.sh .h { flex: 1; margin: 0 !important; font-size: 17px !important; font-weight: 700; display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--fg); display: grid; place-items: center; cursor: pointer; }
.rb svg.i { width: 20px; height: 20px; }
.rb.on { color: #ef3e56; } .rb.on svg.i { fill: currentColor; }
.spark { color: #f5c400; font-size: 22px; line-height: 1; }
.spark.b { color: #3d8ff0; }
.pillbtn { display: flex; align-items: center; justify-content: center; min-height: 48px; margin: 18px 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--fg); font-weight: 700; font-size: 14.5px; }

/* バナー（横にめくれる） */
.banners { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 -16px; padding: 0 16px; scroll-padding: 16px; }
.banners::-webkit-scrollbar { display: none; }
.bnr { scroll-snap-align: start; position: relative; display: flex; align-items: center; gap: 12px; min-height: 120px; padding: 14px 16px; border-radius: 12px; overflow: hidden; }
.bnr .bt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.bnr .bt small { font-size: 11.5px; font-weight: 700; }
.bnr .bt b { font-size: 20px; line-height: 1.25; font-weight: 800; }
.bnr > svg.i { width: 56px; height: 56px; stroke-width: 1.4; flex: none; }
.bnr-promo { background: radial-gradient(130% 160% at 0% 50%, #f3e4cf 0 34%, #fff 35%); border: 1px solid var(--line); color: #5a4030; }
.bnr-promo .bk { flex: none; width: 76px; height: 76px; border-radius: 50%; background: #8a6440; color: #fff; display: grid; place-items: center; text-align: center; font-size: 11px; font-weight: 700; line-height: 1.35; }
.bnr-promo .bt { text-align: center; }
.bnr-promo .bt small { color: #9a6c41; }
.bnr-promo .bt b { font-size: 16px; }
.bnr-promo em { font-style: normal; font-size: 22px; font-weight: 800; color: #e07a1c; }
.bnr-auc { background: linear-gradient(120deg, #241238, #4a1f5c); color: #ffb35c; }
.bnr-auc .bt small { color: #ffd35c; letter-spacing: .14em; font-family: var(--f-num); }
.bnr-auc .bt b { font-family: var(--f-display); font-weight: 400; text-shadow: 0 0 10px rgba(255,140,40,.7); }
.bnr-auc .bt span { font-size: 12px; color: #f1d7ff; }
.bnr-free { background: linear-gradient(120deg, #1c35b8, #3d8ff0); color: #fff; }
.bnr-free .bt small { color: #cfe0ff; }

/* カテゴリごとの6枚：大きい1枚＋右に2枚＋下に3枚 */
.bento6 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.bento6 .card:first-child { grid-column: 1 / 3; grid-row: 1 / 3; }
.bento6 .card:first-child .thumb { aspect-ratio: auto; height: 100%; }
.bento6 .card:first-child > a { height: 100%; }
.bento6 .ttl { display: none; }
@media (min-width: 769px) {
  .bento6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bento6 .card:first-child { grid-column: auto; grid-row: auto; }
  .bento6 .card:first-child .thumb { aspect-ratio: 1; height: auto; }
}
#bento { gap: 0; }

/* 出品タブ */
.sellhub .tiles3 { margin-top: 14px; gap: 10px !important; }
.tiles3 a { background: var(--surface) !important; box-shadow: none !important; border-radius: 12px !important; }
.tiles3 a span { font-size: 14px; }
.tiles3 b { font-size: 18px !important; font-family: var(--f-body); font-weight: 700; }
.hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0 0; }
.mylist { display: flex; flex-direction: column; }
.mrow { display: flex; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mrow img, .mrow .ph { width: 74px; height: 74px; border-radius: 10px; object-fit: cover; background: var(--surface-2); flex: none; }
.mrow .grow { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.mrow .grow b { font-weight: 500; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mrow .pr { font-weight: 800; font-size: 17px; }
.mrow .st { display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--fg); }
.mrow .st > span { display: inline-flex; align-items: center; gap: 3px; }
.mrow .st svg.i { width: 15px; height: 15px; margin-right: 3px; }
.sellbar { position: sticky; bottom: calc(var(--tabbar-h) + 22px + env(safe-area-inset-bottom, 0px)); padding-top: 14px; z-index: 5; }
.sellbar .btn { min-height: 52px; border-radius: 12px; font-size: 17px; }
@media (min-width: 769px) { .sellbar { bottom: 16px; } }

/* オークションタブ */
.aucbanner { display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: 12px; color: #e8761c;
  background: #fff7ef; border: 1px solid #ffe2c4; }
.aucbanner .ab-k { display: flex; flex-direction: column; align-items: center; flex: none; }
.aucbanner .ab-k svg.i { width: 34px; height: 34px; color: #e8761c; }
.aucbanner .ab-k small { font-family: var(--f-num); font-weight: 800; font-size: 9px; letter-spacing: .14em; color: #c9a000; }
.aucbanner > b { flex: 1; font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1.1; color: #e8761c; }
.aucbanner .ab-s { font-size: 12px; font-weight: 800; color: #e8761c; line-height: 1.35; }
.aucline { display: flex; justify-content: space-between; align-items: center; padding: 6px 4px 8px; font-size: 13px; color: var(--fg); }
.aucline > span:first-child { display: inline-flex; align-items: center; gap: 3px; }
.aucline svg.i { width: 15px; height: 15px; }
.auchub .card .auctag { display: none; }

/* おさいふ */
.wallet { background: var(--surface); border-radius: 16px; padding: 16px; }
.wl-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wl-brand { display: inline-flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 800; }
.wl-brand svg.i { width: 26px; height: 26px; color: var(--accent); }
.wl-amt { background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 13px; white-space: nowrap; }
.wl-amt b { font-size: 18px; font-weight: 800; margin-left: 4px; }
.wl-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 18px; }
.wl-acts > * { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; color: var(--fg); font-size: 12.5px; cursor: pointer; padding: 0; }
.wl-acts svg.i { box-sizing: content-box; width: 24px; height: 24px; padding: 14px; border-radius: 50%; background: #fff; }
.wl-rows { margin-top: 14px; background: var(--surface) !important; }
.wl-rows .row { padding: 16px; }
.wl-rows .row .grow { font-weight: 700; }
.wl-rows .num { font-weight: 800; font-size: 18px; }
.coin { width: 26px; height: 26px; font-size: 12px; }
.list, .group, .box, .sales, .walletcard, .me-head { box-shadow: none !important; background: var(--surface); }
.me-head { background: var(--surface) !important; color: var(--fg); }
.me-head .stars, .me-head .stars b, .me-head svg.i { color: var(--muted); }
.me-head .stars b { color: var(--fg); }

/* ボタン */
.btn { border-radius: 12px; background: var(--accent); box-shadow: none; }
.btn.sub, .btn.danger { background: var(--surface-2); border: 0; box-shadow: none; }
.btn.small { border-radius: 999px; }

/* 下のタブ：白い浮いたバー、選んでいるものは薄いグレーの丸 */
@media (max-width: 768px) {
  .tabbar { left: 14px; right: 14px; border-radius: 999px; background: rgba(255,255,255,.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0,0,0,.06); box-shadow: 0 8px 28px rgba(0,0,0,.14); padding: 5px; }
  .tabbar a { height: 56px; border-radius: 999px; color: var(--fg); font-weight: 500; font-size: 11px; }
  .tabbar a.on { background: rgba(0,0,0,.06); color: var(--fg); }
  .tabbar a.on svg.i { fill: currentColor; }
  .tabbar a.sell, .tabbar a.sell > span:not(.circle) { color: var(--fg); position: static; transform: none; }
  .tabbar a.sell span.circle { position: static; transform: none; width: auto; height: auto; background: none; box-shadow: none; display: contents; }
  .tabbar a.sell span.circle svg.i { width: 24px; height: 24px; }
}
@media (max-width: 768px) {
  .tabbar a.sell span.circle, .tabbar a.sell span.circle svg.i { color: var(--fg); }
  .tabbar a.sell.on svg.i { fill: none; }
}
.aucbanner > b { font-size: 21px; white-space: nowrap; }
.aucbanner .ab-s { font-size: 11px; white-space: nowrap; }


/* =========================================================
   文字を細く（太字は「中くらい」に、数字も細めに）
   ========================================================= */
:root { --f-display: var(--f-body); }
body { font-weight: 400; -webkit-font-smoothing: antialiased; }
b, strong, h1, h2, h3, th, .h, h1.h, .sh .h, .info h1, .chip.on, .tabbar a.on, .btn, .pillbtn, .wl-brand, .wc-h, .me-head .grow > b,
.group-title, .tiles b, .tiles3 b, .mrow .grow b, .row .grow b, .bnr .bt b, .bnr-auc .bt b, .aucbanner > b, .seg button.on, .pill, .tag, .react, .req::after {
  font-weight: 500 !important; }
.num, .price-tag, .bigprice, .buybar .p, .sales .amount, .mrow .pr, .wl-amt b, .wl-rows .num, .walletcard .wc-row b.num, .row .grow .num, .calc b,
.aucline b, .aucban .num, .promo-t em, .bnr-promo em, .ribbon::after, .soldmark span, .prtag, .auctag, .badge, .segbadge, #countdown {
  font-weight: 600 !important; }
.bigprice { font-size: 32px; }
.price-tag { letter-spacing: .02em; }
.h, .sh .h { letter-spacing: .02em; }
.bnr-auc .bt b, .aucbanner > b { text-shadow: 0 0 6px rgba(255,140,40,.45); }


/* =========================================================
   四角くする（丸のままなのは、プロフィールの顔アイコンと赤い数字のバッジだけ）
   ========================================================= */
:root[data-theme="light"] { --r: 4px; --r-s: 3px; }
#q, .chip, .btn, .btn.small, .pillbtn, .rb, .bellbtn, .back, .price-tag, .prtag, .auctag, .pill, .tag, .seg, .seg button, .react,
.thumb, .minigrid .thumb, .bnr, .banners .bnr, .aucbanner, .aucban, .promo, .wallet, .wl-amt, .wl-acts svg.i, .list, .group, .box, .sales,
.doc, .me-head, .confirmbox, .walletcard, .tiles a, .tiles3 a, .mrow img, .mrow .ph, .row img, .row .ph, .row svg.i:first-child,
.sellbar .btn, .notice, .demo-note, .addr, .toast, .im img, .addimg, .dots button, .counter, .msg, .msg.mine, .cmt .bubble p,
.scores label, .boostopts label, .iconpick button, .colorpick button, .coin, .bnr-promo .bk, .promo-k, .aucbox, .steps li::before,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea, .slides img, .info, .sec {
  border-radius: 3px !important; }
.price-tag { border-radius: 0 3px 0 0 !important; left: 0 !important; bottom: 0 !important; }
.minigrid .price-tag { left: 0 !important; bottom: 0 !important; }
@media (max-width: 768px) {
  .info { border-radius: 0 !important; margin-top: 0 !important; box-shadow: none !important; }
  .tabbar { left: 0 !important; right: 0 !important; bottom: 0 !important; border-radius: 0 !important; border: 0 !important; border-top: 1px solid var(--line) !important;
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px)) !important; box-shadow: 0 -4px 16px rgba(0,0,0,.06) !important; }
  .tabbar a, .tabbar a.on { border-radius: 3px !important; }
  main { padding-bottom: calc(var(--tabbar-h) + 30px + env(safe-area-inset-bottom, 0px)); }
  .sellbar { bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom, 0px)); }
}
/* 丸のまま */
.avatar, .avatar img, .meav, .meav .avatar, .badge, .segbadge, .heart { border-radius: 50% !important; }
.badge, .segbadge { border-radius: 9px !important; }
.bnr-promo, .promo { background: linear-gradient(105deg, #f3e4cf 0 34%, #fff 34.2%) !important; }
.react { box-shadow: none !important; }

/* ---------- 支払い：ポイント・売上金・支払い方法 ---------- */
.usefund > span:first-child { align-items: center; }
.usefund > span:first-child > span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.usefund input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); }
.usefund .priceinput input { max-width: 160px; margin-left: auto; }
.paymethods { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.paymethods i { font-style: normal; font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.coin.pt { background: #3d8ff0; }

/* ブランド品の申告 */
.authbox{margin:10px 0 4px;padding:14px;border:1px solid var(--line,#e3e3e3);border-left:3px solid var(--accent,#e8452c);background:var(--surface,#fff);border-radius:3px}
.authbox .authttl{display:flex;align-items:center;gap:6px;margin-bottom:6px;font-weight:500}
.authbox .check{margin:8px 0}
.authdecl{border-left:3px solid #2e9d5b}
.authdecl b{display:flex;align-items:center;gap:6px;font-weight:500;color:#1f7a45}

/* 追跡 */
.trackcard .trackbtn{margin:10px 0 4px;display:flex;align-items:center;justify-content:center;gap:6px}
.trackcard .trackpick{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.trackcard .howto{margin-top:10px;border-top:1px solid var(--line,#e3e3e3);padding-top:8px}
.trackcard .howto summary{cursor:pointer;font-size:13px;font-weight:500}
.trackcard .howto p{margin:6px 0 0}

/* 手渡し */
.thumb .handtag{position:absolute;left:6px;bottom:38px;z-index:2;background:rgba(20,120,70,.92);color:#fff;font-size:10px;font-weight:500;padding:2px 6px;border-radius:3px;max-width:calc(100% - 12px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.handsec h3{display:flex;align-items:center;gap:6px}
.handsafe{margin:10px 0 0;padding-left:18px;color:var(--muted,#666)}
.handsafe li{margin:3px 0}
.handflow{margin:6px 0 10px;padding-left:18px}
.handflow li{margin:4px 0}
.handstyle{grid-template-columns:repeat(3,1fr)}
.sizein{display:flex;align-items:center;gap:6px}
.sizein input{width:100%;min-width:0}
.areabar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 10px;padding:10px;border:1px solid var(--line,#e3e3e3);background:var(--surface,#fff);border-radius:3px}
.areabar span{display:flex;align-items:center;gap:4px}
.areabar select,.areabar input{flex:1 1 120px;min-width:0}
.codecard{display:flex;flex-direction:column;align-items:center;gap:6px;margin:12px 0;padding:16px;border:2px dashed #2e9d5b;border-radius:3px;text-align:center}
.codecard b{font-size:40px;letter-spacing:.3em;line-height:1.1;padding-left:.3em}
.codef{display:flex;flex-direction:column;gap:8px;margin:8px 0}
.codef input{font-size:22px;letter-spacing:.3em;text-align:center}
.bigopts{border-top:1px solid var(--line,#e3e3e3)}
.bigopts summary{cursor:pointer;padding:12px 14px;font-size:13px;font-weight:500}
.cancelreq h3{margin-top:0}

/* AI の下書き */
.aibar{margin:10px 0 4px}
.aibar .btn{display:flex;align-items:center;justify-content:center;gap:6px}
.aibar p{margin:6px 4px 0}
.aiout{margin:10px 0;padding:12px 14px;border:1px solid var(--line,#e3e3e3);border-left:3px solid #7a5af5;background:var(--surface,#fff);border-radius:3px}
.aiout .aittl{display:flex;align-items:center;gap:6px;font-weight:500}
.aiout .aiprice{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:0 0 8px}
.aiout ul{margin:4px 0 6px;padding-left:18px}
.nohit ul{list-style:none;padding:0;margin:8px 0}.nohit li{margin:4px 0}
