/* SB・AB ホームページ共通(黒 2026-11-03)。色は <html data-brand> で切り替える。 */
:root {
  --bg: #fffaf9; --panel: #ffffff; --ink: #2b2226; --sub: #6d5d63; --line: #f0dde3;
  --brand: #d6336c; --brand-ink: #9c1f4e; --brand-soft: #fce4ec; --accent: #2fa36b;
  --warn: #9a5b00; --warn-bg: #fff4dc; --err: #b3261e; --err-bg: #fdecea; --ok: #1f7a4d; --ok-bg: #e5f6ec;
  --radius: 16px; --font: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
}
html[data-brand="app"] {
  --bg: #f5f8ff; --line: #dde3f7; --ink: #1d2340; --sub: #565e80;
  --brand: #3346d3; --brand-ink: #1f2c99; --brand-soft: #e3e8ff; --accent: #0f9d8a; --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.7; font-size: 16px; }
body::before { content: ""; position: fixed; right: 4vw; bottom: 6vh; width: 220px; height: 220px; background: url(assets/st_mark.png) center/contain no-repeat; opacity: .05; pointer-events: none; z-index: 0; }
a { color: var(--brand-ink); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1120px; width: 100%; margin: 0 auto; padding: 0 16px; position: relative; z-index: 1; }
main.wrap { flex: 1; }

/* 上の帯 */
header.top { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
header.top .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.logo img { width: 34px; height: 34px; border-radius: 9px; }
.logo span { font-size: 17px; }
form.search { flex: 1; display: flex; min-width: 0; }
form.search input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px 0 0 999px; background: #f7f3f4; }
html[data-brand="app"] form.search input { background: #eef1fb; }
form.search button { height: 40px; padding: 0 16px; border: 0; border-radius: 0 999px 999px 0; background: var(--brand); color: #fff; font-weight: 700; cursor: pointer; }
nav.acts { display: flex; gap: 6px; align-items: center; }
nav.acts a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; white-space: nowrap; color: var(--ink); }
nav.acts a.primary { background: var(--brand); color: #fff; }
nav.acts a:hover { background: var(--brand-soft); }
nav.acts a.primary:hover { background: var(--brand-ink); }

/* 案内の帯 */
.hero { margin: 20px 0 8px; padding: 22px 24px; border-radius: var(--radius); background: linear-gradient(110deg, var(--brand-soft), #fff 70%); border: 1px solid var(--line); display: flex; gap: 20px; align-items: center; }
.hero h1 { margin: 0 0 4px; font-size: 24px; line-height: 1.4; }
.hero p { margin: 0; color: var(--sub); font-size: 15px; }
.hero .points { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hero .points span { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--brand-ink); }
.hero img { width: 180px; border-radius: 14px; flex: none; }

/* 絞り込み */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 8px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.filters select { height: 36px; border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; background: #fff; }
.section-title { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: baseline; margin: 22px 0 10px; }
.section-title h2 { margin: 0; font-size: 19px; }
.section-title small { color: var(--sub); }

/* 商品の並び */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.card .ph { aspect-ratio: 1 / 1; background: var(--brand-soft); position: relative; display: flex; align-items: center; justify-content: center; color: var(--brand-ink); font-size: 13px; text-align: center; padding: 8px; }
.card .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .price { position: absolute; left: 0; bottom: 10px; background: rgba(0,0,0,.66); color: #fff; font-weight: 800; padding: 3px 10px 3px 8px; border-radius: 0 999px 999px 0; font-size: 15px; z-index: 1; }
.card .badge { position: absolute; top: 8px; left: 8px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; z-index: 1; }
.card .sold { position: absolute; top: 0; left: 0; background: var(--err); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 10px; z-index: 1; }
.card .t { padding: 8px 10px 10px; font-size: 14px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 3.2em; }
.card .area { padding: 0 10px 10px; font-size: 12px; color: var(--sub); }
.more { display: flex; justify-content: center; margin: 18px 0; }

/* 汎用 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font-weight: 800; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--brand-ink); }
.btn.sub { background: #fff; color: var(--brand-ink); }
.btn.sub:hover { background: var(--brand-soft); }
.btn.danger { background: var(--err); border-color: var(--err); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.narrow { max-width: 520px; margin: 24px auto; }
.panel h1 { font-size: 22px; margin: 0 0 12px; }
.panel h2 { font-size: 18px; margin: 18px 0 8px; }
label.f { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 4px; }
label.f small { font-weight: 400; color: var(--sub); }
input.i, select.i, textarea.i { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cdbfc4; border-radius: 10px; background: #fff; }
html[data-brand="app"] input.i, html[data-brand="app"] select.i, html[data-brand="app"] textarea.i { border-color: #b9c1e0; }
textarea.i { min-height: 120px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: 15px; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.note { font-size: 13px; color: var(--sub); }
.msg { padding: 12px 14px; border-radius: 10px; margin: 12px 0; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.err { background: var(--err-bg); color: var(--err); }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.msg.warn { background: var(--warn-bg); color: var(--warn); }
.terms-box { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fcfbfb; font-size: 14px; white-space: pre-wrap; }
.empty { padding: 36px 16px; text-align: center; color: var(--sub); }
.loading { padding: 36px 16px; text-align: center; color: var(--sub); }

/* 商品の詳しい画面 */
.item { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; margin: 20px 0; }
.gallery .main { aspect-ratio: 1/1; background: var(--brand-soft); border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--brand-ink); }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.item h1 { font-size: 22px; margin: 0 0 6px; line-height: 1.45; }
.item .p { font-size: 30px; font-weight: 900; margin: 6px 0; }
.item .p small { font-size: 13px; font-weight: 400; color: var(--sub); margin-left: 6px; }
.item .desc { white-space: pre-wrap; overflow-wrap: anywhere; }
table.kv { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0; }
table.kv th, table.kv td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.kv th { width: 40%; color: var(--sub); font-weight: 600; }
table.kv tr.total td, table.kv tr.total th { font-weight: 900; color: var(--ink); font-size: 16px; }
.fav { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 700; }
.fav[aria-pressed="true"] { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

/* マイページ */
.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 16px 0; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--sub); font-weight: 700; white-space: nowrap; border-bottom: 3px solid transparent; }
.tabs a[aria-current="page"] { color: var(--brand-ink); border-bottom-color: var(--brand); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 4px; border-bottom: 1px solid var(--line); }
.list li a { text-decoration: none; color: inherit; display: flex; justify-content: space-between; gap: 12px; }
.status { font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); white-space: nowrap; }
.chat { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.chat .b { max-width: 80%; padding: 8px 12px; border-radius: 14px; background: #f1edef; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat .b.me { align-self: flex-end; background: var(--brand-soft); }
.chat .b small { display: block; color: var(--sub); font-size: 11px; }
.stars { display: flex; gap: 6px; }
.stars button { font-size: 26px; background: none; border: 0; cursor: pointer; color: #ccc; padding: 0 2px; }
.stars button[aria-pressed="true"] { color: #f5a623; }

/* アプリの案内 */
.stores { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.stores img { height: 46px; width: auto; }

/* 下の帯 */
footer.bottom { margin-top: 48px; border-top: 1px solid var(--line); background: #fff; font-size: 14px; }
footer.bottom .wrap { padding: 24px 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
footer.bottom h3 { font-size: 14px; margin: 0 0 6px; }
footer.bottom ul { list-style: none; margin: 0; padding: 0; }
footer.bottom li { margin: 4px 0; }
footer.bottom a { color: var(--sub); text-decoration: none; }
footer.bottom a:hover { text-decoration: underline; }
footer.bottom .copy { grid-column: 1 / -1; color: var(--sub); font-size: 12px; border-top: 1px solid var(--line); padding-top: 12px; }

@media (max-width: 760px) {
  header.top .wrap { height: auto; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  form.search { order: 3; flex-basis: 100%; }
  .logo span { font-size: 15px; }
  nav.acts { margin-left: auto; }
  nav.acts a { padding: 6px 10px; font-size: 13px; }
  .hero { flex-direction: column; align-items: flex-start; padding: 16px; }
  .hero img { display: none; }
  .hero h1 { font-size: 20px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .item { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
}
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
details { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 8px 0; background: #fff; }
details summary { cursor: pointer; font-weight: 700; }
.card .ph.guest { flex-direction: column; gap: 6px; padding: 8px 8px 46px; background: linear-gradient(135deg, var(--brand-soft), #fff); }
.card .ph.guest strong { font-size: 18px; color: var(--brand-ink); }
.card .ph.guest small { font-size: 11px; line-height: 1.4; color: var(--sub); }
@media (max-width: 480px) { .card .ph.guest::before { width: 44px; height: 44px; } .card .ph.guest strong { font-size: 15px; } .card .ph.guest small { font-size: 10px; } }
.card .ph.guest::before { content: ""; width: 64px; height: 64px; background: url(assets/icon_180.png) center/contain no-repeat; opacity: .55; }
