/* テストページ：A案（モーヴ×アイボリー）。スマホとパソコンで配置を切り替える */
:root {
  --bg: #FBF8F6;
  --surface: #F3ECE9;
  --card: #FFFFFF;
  --ink: #2E2230;
  --muted: #6B5E6D;
  --line: #E7DDDA;
  --accent: #8A5568;
  --accent-dark: #6E4253;
  --accent-soft: #F2E4E8;
  --hero: #F3E9EA;
  --display: "Shippori Mincho", "Yu Mincho", serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans JP", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--accent); }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.test-bar { background: var(--ink); color: #fff; font-size: 12px; text-align: center; padding: 4px 8px; }
.test-bar span { opacity: 0.8; }

/* ---------- 上の帯 ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--hero); border-bottom: 1px solid var(--line); }
.top .wrap { height: 60px; display: flex; align-items: center; gap: 16px; }
.logo { font-family: var(--display); font-size: 18px; letter-spacing: 0.02em; color: var(--ink); text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.nav a, .top-auth .btn { white-space: nowrap; flex-shrink: 0; }
.nav, .top-search, .top-auth { display: none; }
.top-icons { margin-left: auto; display: flex; }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }

/* ---------- 最初の大きな見出し ---------- */
.hero { background: var(--hero); }
.hero .wrap { padding-top: 28px; padding-bottom: 30px; display: grid; gap: 24px; }
.hero h1 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 31px; line-height: 1.45; letter-spacing: 0.04em; }
.hero p { margin: 12px 0 0; color: #5E5160; line-height: 1.8; font-size: 14px; }
.ctas { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.btn { height: 52px; padding: 0 28px; border-radius: 26px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; text-decoration: none; font-size: 15px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.ghost { border: 1px solid #D8C6CB; color: var(--ink); font-weight: 500; }
.trust { background: rgba(255, 255, 255, 0.7); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.trust h2 { margin: 0; font-family: var(--display); font-size: 17px; font-weight: 600; }
.trust-item { display: flex; gap: 12px; align-items: flex-start; }
.trust-item strong { display: block; font-size: 14px; }
.trust-item span { font-size: 12.5px; color: var(--muted); }
.trust-item svg { flex-shrink: 0; }

/* ---------- 本体 ---------- */
.search-m { padding-top: 18px; }
.search-box { height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: 25px; background: var(--card); border: 1px solid var(--line); }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 14px; }
.cats-m { padding-top: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cats-m a { height: 44px; border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; display: flex; align-items: center; justify-content: center; font-size: 12.5px; }

.layout { display: block; }
.side { display: none; }
.sec-head { padding-top: 26px; display: flex; align-items: baseline; justify-content: space-between; }
.sec-head h2 { margin: 0; font-family: var(--display); font-size: 19px; font-weight: 600; }
.sec-head a { font-size: 13px; }

.items { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.item a { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 5px; }
.photo { aspect-ratio: 4 / 5; border-radius: 12px; background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); }
.item .name { font-size: 13px; line-height: 1.45; }
.item .size { font-size: 12px; color: var(--muted); }
.item .price { font-size: 15px; font-weight: 700; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 10px; background: var(--accent-soft); }
.tag.line { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--accent); font-weight: 500; }

.cards { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.card { padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.card .meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.card .meta b { padding: 2px 8px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-weight: 500; }
.card strong { font-size: 15px; }
.card span.sub { font-size: 13px; color: var(--muted); }
.shop .photo { aspect-ratio: 16 / 9; }
.shop strong { font-family: var(--display); font-weight: 600; font-size: 17px; }

footer { margin-top: 40px; padding: 28px 0 110px; background: var(--surface); font-size: 12.5px; color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
footer a { color: var(--ink); text-decoration: none; }

/* スマホの下のメニュー */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: 72px; padding: 0 6px 8px; background: var(--card); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; }
.tabbar a { height: 56px; text-decoration: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; }
.tabbar a.now { color: var(--accent); font-weight: 700; }
.tabbar .sell { width: 40px; height: 30px; border-radius: 15px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }

/* ---------- メンバー一覧・プロフィール ---------- */
.page-head { padding-top: 24px; }
.page-head h1 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 600; }
.page-head p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.chips { margin-top: 14px; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.chip { flex-shrink: 0; height: 38px; padding: 0 16px; border-radius: 19px; border: 1px solid var(--line); background: var(--card); font-size: 13px; cursor: pointer; }
.chip[aria-pressed=true] { border-color: var(--accent); background: var(--accent-soft); font-weight: 500; }

.avatar { flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft) center / cover no-repeat; color: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 22px; font-weight: 600; overflow: hidden; }
.avatar.big { width: 112px; height: 112px; font-size: 44px; border: 4px solid var(--card); }

.members { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.member { padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.member > a { display: flex; gap: 14px; align-items: center; color: var(--ink); text-decoration: none; }
.member .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.member .who strong { font-size: 16px; }
.member .who span { font-size: 12px; color: var(--muted); }
.member p { margin: 0; font-size: 13px; line-height: 1.7; color: #4C404E; }
.member .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.counts { display: flex; gap: 6px; flex-wrap: wrap; }
.sns { display: flex; gap: 4px; }
.sns a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.sns a:hover { border-color: var(--accent); color: var(--accent); }
.empty { display: none; margin-top: 24px; color: var(--muted); font-size: 14px; }

.profile-top { background: var(--hero); }
.profile-top .wrap { padding-top: 28px; padding-bottom: 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.photo-edit { position: relative; }
.photo-edit label { position: absolute; right: -2px; bottom: 2px; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 3px solid var(--card); }
.profile-top h1 { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 600; }
.profile-top .area { font-size: 13px; color: var(--muted); }
.profile-top p.bio { margin: 4px 0 0; max-width: 34em; font-size: 14px; line-height: 1.8; }
.profile-top .sns a { width: auto; padding: 0 14px; border-radius: 18px; gap: 6px; font-size: 13px; text-decoration: none; background: var(--card); }
.own-note { font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 20px; }
.tabs button { height: 46px; padding: 0 18px; border: 0; background: transparent; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button[aria-selected=true] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
/* ---------- レビュー ---------- */
.rating { display: inline-flex; gap: 10px; font-size: 12.5px; color: var(--muted); }
.rating b { color: var(--ink); font-weight: 700; }
.rating .good b { color: var(--accent); }
.reviews { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; max-width: 760px; }
.review { padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 6px; }
.review .head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.rate { padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.rate.good { background: var(--accent-soft); color: var(--accent-dark); }
.rate.normal { background: var(--surface); color: var(--ink); }
.rate.bad { background: #F4E3DC; color: #8C3B22; }
.review p { margin: 0; font-size: 13.5px; line-height: 1.7; }
.review .reason { font-size: 12px; color: #8C3B22; }
.review-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); max-width: 760px; }

.sns-note { margin: 36px 0 0; font-size: 11.5px; color: #A79CA8; }
.report { margin-top: 28px; font-size: 12.5px; }
.report a { color: var(--muted); }

/* ---------- タブレット（768px〜） ---------- */
@media (min-width: 768px) {
  .wrap { padding: 0 24px; }
  .items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctas { flex-direction: row; }
  .members { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- パソコン（1024px〜）：広い画面を活かした配置 ---------- */
@media (min-width: 1024px) {
  .wrap { padding: 0 32px; }
  .top .wrap { height: 72px; gap: 28px; }
  .logo { font-size: 22px; }
  .nav { display: flex; gap: 4px; }
  .nav a { height: 40px; padding: 0 14px; border-radius: 20px; display: flex; align-items: center; color: var(--ink); text-decoration: none; font-size: 14px; }
  .nav a:hover { background: rgba(255, 255, 255, 0.7); }
  .top-search { display: flex; flex: 1; min-width: 0; max-width: 420px; }
  .top-search .search-box { width: 100%; height: 44px; }
  .top-icons { margin-left: 0; }
  .top-auth { display: flex; gap: 10px; align-items: center; margin-left: auto; }
  .top-auth .btn { height: 42px; padding: 0 20px; font-size: 14px; }
  .icon-btn.menu { display: none; }

  .hero .wrap { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; gap: 56px; padding-top: 56px; padding-bottom: 56px; }
  .hero h1 { font-size: 44px; }
  .hero p { font-size: 16px; max-width: 34em; }

  .search-m, .cats-m { display: none; }
  .layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; padding-top: 12px; }
  .side { display: block; position: sticky; top: 92px; align-self: start; padding-top: 26px; }
  .side h2 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 700; letter-spacing: 0.06em; }
  .side ul { list-style: none; margin: 0 0 24px; padding: 0; }
  .side li a { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14px; }
  .side li a:hover, .side li a.now { background: var(--accent-soft); }
  .side label { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 14px; cursor: pointer; }
  .side input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }

  .items { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .item a:hover .photo { outline: 2px solid var(--accent-soft); }

  .members { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .page-head h1 { font-size: 30px; }
  .side .chips { flex-direction: column; overflow: visible; }
  .side .chip { text-align: left; border-radius: 10px; border: 0; background: transparent; font-size: 14px; }
  .side .chip[aria-pressed=true] { background: var(--accent-soft); }
  .main-chips { display: none; }

  /* パソコンのプロフィールは、左に写真と自己紹介、右に出品・募集 */
  .profile-top .wrap { flex-direction: row; text-align: left; align-items: center; gap: 32px; padding-top: 44px; padding-bottom: 40px; }
  .profile-top .info { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
  .avatar.big { width: 152px; height: 152px; font-size: 60px; }

  footer { padding-bottom: 32px; }
  .tabbar { display: none; }
}

/* パソコンでも幅が狭めのときは、上の帯の検索をしまって、名前とメニューを優先する */
@media (min-width: 1024px) and (max-width: 1239px) {
  .top .wrap { gap: 18px; }
  .top-search { display: none; }
  .nav a { padding: 0 10px; }
}
