/* ゆずりば — Material 3 Expressive をベースにした「ご近所の手渡し」フリマ */
:root {
  --bg: #fbfdf8;
  --s1: #f3f7ef;
  --s2: #eaf1e5;
  --s3: #dde8d6;
  --ink: #17221a;
  --ink2: #44544a;
  --line: #c4d1c3;
  --line2: #e2e9dd;
  --pri: #2f6b45;
  --on-pri: #ffffff;
  --pri-c: #c4ebcf;
  --on-pri-c: #0b3019;
  --ter: #b0460a;
  --ter-c: #ffdcc2;
  --on-ter-c: #3a1700;
  --fab: #ef7a26;
  --on-fab: #2a1100;
  --err: #b3261e;
  --err-c: #fbe2df;
  --map: #e9f1e1;

  --f-head: 'Mochiy Pop P One', 'M PLUS 1', system-ui, sans-serif;
  --f-body: 'M PLUS 1', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
  --f-num: 'Outfit', 'M PLUS 1', system-ui, sans-serif;

  --r-xs: 8px; --r-s: 12px; --r-m: 16px; --r-l: 22px; --r-xl: 28px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --emph: cubic-bezier(.2, 0, 0, 1);
  --t-fast: 160ms; --t-med: 280ms; --t-slow: 420ms;
  --nav-h: 80px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --e1: 0 1px 2px rgba(23, 34, 26, .12), 0 1px 3px 1px rgba(23, 34, 26, .06);
  --e2: 0 2px 6px rgba(23, 34, 26, .14), 0 6px 18px rgba(23, 34, 26, .08);
  --e3: 0 8px 28px rgba(23, 34, 26, .2);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.6;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { width: 24px; height: 24px; flex: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.kp { word-break: keep-all; overflow-wrap: normal; }
.nw { white-space: nowrap; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }

/* ---- 端末の枠（広い画面では中央の列に） ---- */
.device {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  overflow: clip;
  background: var(--bg);
}
@media (min-width: 600px) {
  body {
    background-color: #d6e6d2;
    background-image: radial-gradient(#c3d8be 1.4px, transparent 1.6px);
    background-size: 22px 22px;
  }
  .device { box-shadow: 0 0 0 1px #c2d3bd, 0 20px 60px rgba(23, 50, 30, .18); }
}
.noscript { padding: 40px 24px; font-size: 16px; }

.stage { position: absolute; inset: 0; overflow: hidden; overflow: clip; display: block; }

/* ---- 画面 ---- */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  will-change: transform, opacity;
}
.scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.screen.has-nav .scroll { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }
.screen.has-bottom .scroll { padding-bottom: calc(96px + var(--safe-b)); }

/* 遷移 */
.screen.in-push { animation: inPush var(--t-slow) var(--emph) both; z-index: 2; }
.screen.out-push { animation: outPush var(--t-slow) var(--emph) both; z-index: 1; }
.screen.in-pop { animation: inPop var(--t-slow) var(--emph) both; z-index: 1; }
.screen.out-pop { animation: outPop var(--t-slow) var(--emph) both; z-index: 2; }
.screen.in-fade { animation: inFade var(--t-med) var(--emph) both; z-index: 2; }
.screen.out-fade { animation: outFade 140ms linear both; z-index: 1; }
@keyframes inPush { from { transform: translateX(28%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes outPush { to { transform: translateX(-12%); opacity: 0; } }
@keyframes inPop { from { transform: translateX(-12%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes outPop { to { transform: translateX(28%); opacity: 0; } }
@keyframes inFade { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
@keyframes outFade { to { opacity: 0; } }

/* ---- トップアプリバー ---- */
.appbar {
  flex: none;
  position: relative;
  z-index: 5;
  display: flex; align-items: center; gap: 4px;
  min-height: calc(64px + var(--safe-t));
  padding: var(--safe-t) 8px 0 4px;
  background: var(--bg);
  transition: background-color var(--t-med) var(--emph), box-shadow var(--t-med);
}
.screen.is-scrolled .appbar { background: var(--s2); }
.appbar__title {
  flex: 1; min-width: 0;
  font-size: 20px; font-weight: 700; letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-feature-settings: "palt";
}
.appbar__title--fade { opacity: 0; transform: translateY(6px); transition: opacity var(--t-med), transform var(--t-med) var(--emph); }
.screen.is-scrolled .appbar__title--fade { opacity: 1; transform: none; }
.iconbtn {
  position: relative; overflow: hidden;
  width: 48px; height: 48px; flex: none;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--ink);
  text-decoration: none;
  transition: transform var(--t-fast) var(--emph), background-color var(--t-fast);
}
.iconbtn:active { transform: scale(.9); }
.iconbtn--tonal { background: var(--s2); }
.iconbtn .dot {
  position: absolute; top: 11px; right: 11px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--fab); box-shadow: 0 0 0 2px var(--bg);
}

.headline {
  padding: 4px 20px 14px;
  font-family: var(--f-head);
  font-size: 28px; line-height: 1.3; font-weight: 400;
  font-feature-settings: "palt";
  word-break: keep-all;
}
.headline small { display: block; margin-top: 4px; font-family: var(--f-body); font-size: 14px; color: var(--ink2); font-weight: 500; }

/* ---- 波紋 ---- */
.rp { position: relative; overflow: hidden; }
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: .16;
  transform: scale(0);
  animation: ripple 520ms var(--emph) forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ---- ボタン ---- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 15px; letter-spacing: .02em;
  text-decoration: none; white-space: nowrap;
  transition: transform var(--t-fast) var(--emph), border-radius var(--t-med) var(--spring), background-color var(--t-fast);
}
.btn:active { transform: scale(.96); border-radius: 14px; }
.btn svg { width: 20px; height: 20px; }
.btn--filled { background: var(--pri); color: var(--on-pri); }
.btn--orange { background: var(--fab); color: var(--on-fab); }
.btn--tonal { background: var(--pri-c); color: var(--on-pri-c); }
.btn--outline { background: var(--bg); color: var(--pri); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--text { background: transparent; color: var(--pri); padding: 0 14px; }
.btn--danger { background: var(--err); color: #fff; }
.btn--block { width: 100%; }
.btn--lg { min-height: 56px; font-size: 16px; }
.btn[disabled] { background: var(--s3); color: #5b665d; box-shadow: none; }

/* ---- チップ ---- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 16px 2px; scroll-padding: 16px; }
.chips--scroll::-webkit-scrollbar { display: none; }
.chip {
  position: relative; overflow: hidden;
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 16px;
  border: 0; border-radius: var(--r-s);
  background: var(--bg); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast) var(--emph), border-radius var(--t-med) var(--spring);
}
.chip svg { width: 18px; height: 18px; margin-left: -4px; }
.chip:active { transform: scale(.95); }
.chip[aria-pressed="true"], .chip.is-on {
  background: var(--pri-c); color: var(--on-pri-c);
  box-shadow: none; border-radius: 20px; font-weight: 700;
}
.chip--assist { background: var(--ter-c); color: var(--on-ter-c); box-shadow: none; font-weight: 700; }

/* ---- セグメント ---- */
.seg {
  display: inline-flex; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden;
  background: var(--bg);
}
.seg button {
  position: relative; overflow: hidden;
  min-height: 40px; min-width: 58px; padding: 0 12px;
  border: 0; background: transparent; color: var(--ink);
  font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.seg button + button { box-shadow: inset 1px 0 0 var(--line); }
.seg button[aria-pressed="true"] { background: var(--pri-c); color: var(--on-pri-c); font-weight: 700; }
.seg button svg { width: 16px; height: 16px; }

/* ================= さがす ================= */
.search-top {
  flex: none;
  background: var(--bg);
  padding-top: var(--safe-t);
  transition: background-color var(--t-med), box-shadow var(--t-med);
  z-index: 5; position: relative;
}
.screen.is-scrolled .search-top { background: var(--s1); box-shadow: 0 1px 0 var(--line2); }
.brandbar { display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 6px 0 18px; }
.brand { font-family: var(--f-head); font-size: 22px; color: var(--pri); letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.brand img { width: 30px; height: 30px; border-radius: 9px; }
.loc {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 2px;
  min-height: 40px; padding: 0 6px 0 12px;
  border: 0; border-radius: 999px; background: var(--s2); color: var(--on-pri-c);
  font-size: 13px; font-weight: 700;
}
.loc svg { width: 18px; height: 18px; }
.searchbar {
  display: flex; align-items: center; gap: 4px;
  height: 52px; margin: 2px 16px 12px; padding: 0 6px 0 16px;
  border-radius: 999px; background: var(--s2);
}
.searchbar svg { color: var(--ink2); }
.searchbar input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; background: transparent; outline: none;
  font-size: 16px; color: var(--ink);
}
.searchbar input::placeholder { color: #5d6b61; }
.searchbar .iconbtn { width: 40px; height: 40px; }
.filters { display: flex; align-items: center; gap: 8px; padding: 10px 16px 12px; }
.filters .seg { flex: none; }
.filters__sp { flex: 1; }

.countline {
  display: flex; align-items: baseline; gap: 8px;
  padding: 6px 20px 10px;
  font-size: 14px; color: var(--ink2);
}
.countline b { font-family: var(--f-num); font-size: 22px; color: var(--ink); font-weight: 700; }
.countline .sortbtn {
  margin-left: auto; min-height: 40px; display: inline-flex; align-items: center; gap: 4px;
  border: 0; background: transparent; color: var(--pri); font-weight: 700; font-size: 14px; padding: 0 4px 0 8px; border-radius: 10px;
}
.countline .sortbtn svg { width: 18px; height: 18px; }

/* 段違いグリッド */
.masonry { display: flex; gap: 10px; padding: 0 12px; align-items: flex-start; }
.masonry__col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.card {
  position: relative;
  display: block; text-decoration: none; color: inherit;
  border-radius: var(--r-l);
  transition: transform var(--t-fast) var(--emph);
  animation: cardIn var(--t-slow) var(--emph) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.card:active { transform: scale(.97); }
.card__ph {
  position: relative; overflow: hidden;
  border-radius: var(--r-l);
  background: var(--s3);
}
.card__ph img { width: 100%; height: 100%; object-fit: cover; }
.card__tag {
  position: absolute; left: 8px; bottom: 8px;
  display: inline-flex; align-items: baseline; gap: 1px;
  padding: 3px 12px 3px 16px;
  background: #fff; color: var(--ink);
  font-family: var(--f-num); font-weight: 700; font-size: 17px; line-height: 1.35;
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%);
  border-radius: 0 8px 8px 0;
}
.card__tag small { font-family: var(--f-body); font-size: 11px; font-weight: 700; margin-left: 1px; }
.card__tag.is-free { background: var(--fab); color: var(--on-fab); font-family: var(--f-body); font-size: 14px; }
.card__badge {
  position: absolute; left: 8px; top: 8px;
  padding: 2px 9px; border-radius: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: .04em;
  background: var(--pri); color: #fff;
}
.card__badge--mine { background: #fff; color: var(--pri); }
.card__fav {
  position: absolute; right: 2px; top: 2px;
  width: 44px; height: 44px; border: 0; background: transparent;
  display: grid; place-items: center; color: var(--ink);
}
.card__fav span {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  transition: transform var(--t-med) var(--spring);
}
.card__fav svg { width: 18px; height: 18px; }
.card__fav[aria-pressed="true"] { color: #d0491b; }
.card__fav[aria-pressed="true"] span { animation: pop 420ms var(--spring); }
@keyframes pop { 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
.card__body { padding: 8px 4px 0; }
.card__title {
  font-size: 14px; font-weight: 500; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__meta { margin-top: 3px; display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink2); font-weight: 500; }
.card__meta svg { width: 15px; height: 15px; color: var(--pri); }
.card__meta b { color: var(--pri); font-weight: 700; }

/* 引っぱって更新 */
.ptr {
  height: 0; overflow: hidden;
  display: grid; place-items: center;
  transition: height var(--t-med) var(--emph);
}
.ptr.is-drag { transition: none; }
.ptr__ring {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--s1); box-shadow: var(--e1);
  display: grid; place-items: center; color: var(--pri);
}
.ptr__ring svg { width: 22px; height: 22px; transition: transform 60ms linear; }
.ptr.is-spin .ptr__ring svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 空の状態 */
.empty { padding: 20px 28px 40px; text-align: center; }
.empty__img { width: 200px; height: 200px; margin: 6px auto 18px; border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; object-fit: cover; }
.empty__title { font-family: var(--f-head); font-size: 19px; font-weight: 400; word-break: keep-all; }
.empty__text { margin: 8px auto 18px; max-width: 300px; font-size: 14px; color: var(--ink2); }

/* ---- ご近所ボード ---- */
.board { margin: 0 12px; border-radius: var(--r-xl); overflow: hidden; background: var(--map); box-shadow: inset 0 0 0 1px var(--line2); position: relative; }
.board svg.map { display: block; width: 100%; height: auto; }
.map text { font-family: var(--f-body); font-weight: 700; fill: currentColor; color: #3b4d40; }
.map .pin { cursor: pointer; }
.map .pin rect { transition: transform var(--t-med) var(--spring); transform-box: fill-box; transform-origin: center bottom; }
.map .pin.is-sel rect.pin__bg { fill: var(--fab); }
.map .pin text { color: #17221a; font-family: var(--f-num); font-size: 12px; }
.map .me-pulse { animation: pulse 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(2.4); opacity: 0; } }
.board__legend {
  position: absolute; left: 10px; top: 10px;
  display: flex; gap: 6px; align-items: center;
  padding: 4px 10px; border-radius: 999px; background: #fff; font-size: 12px; font-weight: 700; color: var(--ink2);
}
.board__legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--pri); display: inline-block; }
.peekrow {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; gap: 8px; padding: 0 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-padding-inline: 10px;
}
.peekrow::-webkit-scrollbar { display: none; }
.peek {
  flex: 0 0 100%; scroll-snap-align: start;
  padding: 10px; border-radius: var(--r-l);
  display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit;
  background: #fff; box-shadow: var(--e2);
  animation: inFade var(--t-med) var(--emph);
}
.peek:not(:only-child) { flex-basis: calc(100% - 36px); }
.peek > div { flex: 1; min-width: 0; }
.peek img { width: 76px; height: 76px; border-radius: var(--r-m); object-fit: cover; flex: none; }
.peek__t { font-weight: 700; font-size: 15px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peek__p { font-family: var(--f-num); font-size: 20px; font-weight: 700; color: var(--ter); }
.peek__p small { font-family: var(--f-body); font-size: 12px; }
.peek__m { font-size: 13px; color: var(--ink2); display: flex; gap: 4px; align-items: center; white-space: nowrap; overflow: hidden; }
.peek__m span:last-child { overflow: hidden; text-overflow: ellipsis; }
.peek__m svg { width: 15px; height: 15px; color: var(--pri); }
.peek > svg { color: var(--ink2); margin-left: auto; }
.nearlist { margin: 18px 16px 0; }
.nearlist h3 { font-size: 15px; margin-bottom: 6px; }
.nearrow {
  display: flex; align-items: center; gap: 12px; min-height: 60px;
  padding: 6px 4px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line2);
}
.nearrow img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.nearrow__t { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nearrow__d { font-size: 12px; color: var(--ink2); }
.nearrow__p { font-family: var(--f-num); font-weight: 700; font-size: 16px; color: var(--ter); }

/* ---- FAB ---- */
.fab {
  position: absolute; z-index: 20;
  right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  height: 56px; min-width: 56px; padding: 0 20px 0 16px;
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 18px; background: var(--fab); color: var(--on-fab);
  text-decoration: none; font-weight: 800; font-size: 16px;
  box-shadow: var(--e2);
  transition: padding var(--t-med) var(--spring), transform var(--t-fast) var(--emph), border-radius var(--t-med) var(--spring), opacity var(--t-med);
  overflow: hidden;
}
.fab svg { width: 24px; height: 24px; }
.fab__label { transition: max-width var(--t-med) var(--emph), opacity var(--t-fast); max-width: 80px; overflow: hidden; white-space: nowrap; }
.fab.is-small { padding: 0 16px; gap: 0; }
.fab.is-small .fab__label { max-width: 0; opacity: 0; }
.fab:active { transform: scale(.94); border-radius: 26px; }
.fab.is-out { opacity: 0; transform: scale(.6); pointer-events: none; }

/* ---- ナビゲーションバー ---- */
.navbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 15;
  height: calc(var(--nav-h) + var(--safe-b));
  padding: 12px 0 calc(var(--safe-b) + 14px);
  display: flex;
  background: var(--s2);
  transition: transform var(--t-med) var(--emph);
}
.navbar.is-hidden { transform: translateY(110%); }
.navbar__item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-decoration: none; color: var(--ink2);
  min-height: 52px;
}
.navbar__pill {
  position: relative;
  width: 64px; height: 32px; border-radius: 16px;
  display: grid; place-items: center;
  transition: background-color var(--t-med), width var(--t-med) var(--spring);
}
.navbar__pill svg { width: 24px; height: 24px; }
.navbar__label { font-size: 12px; font-weight: 500; line-height: 1.2; }
.navbar__item.is-on { color: var(--ink); }
.navbar__item.is-on .navbar__pill { background: var(--pri-c); color: var(--on-pri-c); animation: pillIn var(--t-slow) var(--spring); }
.navbar__item.is-on .navbar__label { font-weight: 800; }
@keyframes pillIn { from { width: 24px; } to { width: 64px; } }
.navbar__badge {
  position: absolute; top: -2px; right: 12px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--err); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
  font-family: var(--f-num);
}

/* ================= 商品詳細 ================= */
.detail-top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 6;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(var(--safe-t) + 8px) 10px 0;
  pointer-events: none;
  transition: background-color var(--t-med);
}
.detail-top > * { pointer-events: auto; }
.detail-top .iconbtn { background: #fff; box-shadow: var(--e1); width: 44px; height: 44px; }
.detail-top__r { display: flex; gap: 8px; }
.screen.is-scrolled .detail-top { background: var(--bg); padding-bottom: 8px; box-shadow: 0 1px 0 var(--line2); }
.screen.is-scrolled .detail-top .iconbtn { box-shadow: none; background: var(--s2); }
.detail-top__t { flex: 1; min-width: 0; margin: 0 8px; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity var(--t-med); }
.screen.is-scrolled .detail-top__t { opacity: 1; }
.gallery { position: relative; background: var(--s3); }
.gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track img { flex: none; width: 100%; aspect-ratio: 1; object-fit: cover; scroll-snap-align: start; }
.gallery__dots { position: absolute; left: 0; right: 0; bottom: 40px; display: flex; justify-content: center; gap: 6px; }
.gallery__dots i { width: 7px; height: 7px; border-radius: 4px; background: #fff; opacity: .6; transition: width var(--t-med) var(--spring); }
.gallery__dots i.is-on { width: 20px; opacity: 1; }
.dsheet {
  position: relative; z-index: 2;
  margin-top: -28px;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--bg);
  padding: 22px 20px 8px;
}
.dsheet__cat { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 700; color: var(--pri); }
.dsheet__title { margin-top: 6px; font-size: 21px; line-height: 1.45; font-weight: 700; font-feature-settings: "palt"; }
.price-row { margin-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bigtag {
  display: inline-flex; align-items: baseline; gap: 2px;
  padding: 6px 18px 6px 24px;
  background: var(--ter-c); color: var(--on-ter-c);
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
  border-radius: 0 12px 12px 0;
  font-family: var(--f-num); font-weight: 700; font-size: 30px; line-height: 1.2;
}
.bigtag small { font-family: var(--f-body); font-size: 15px; font-weight: 700; }
.bigtag.is-free { background: var(--fab); color: var(--on-fab); font-family: var(--f-head); font-size: 22px; font-weight: 400; padding: 9px 20px 9px 26px; }
.condpill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--s3); box-shadow: inset 0 0 0 1px var(--line); }
.dots i.on { background: var(--pri); box-shadow: none; }
.facts { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fact { padding: 12px 14px; border-radius: var(--r-m); background: var(--s1); }
.fact__k { font-size: 12px; font-weight: 700; color: var(--ink2); display: flex; gap: 4px; align-items: center; }
.fact__k svg { width: 15px; height: 15px; color: var(--pri); }
.fact__v { margin-top: 2px; font-size: 15px; font-weight: 700; line-height: 1.45; word-break: keep-all; }
.fact--wide { grid-column: 1 / -1; }

.mkt { margin-top: 18px; padding: 16px; border-radius: var(--r-l); background: var(--s1); }
.mkt__h { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.mkt__h svg { width: 18px; height: 18px; color: var(--ter); }
.mkt__verdict { margin-left: auto; padding: 2px 10px; border-radius: 999px; background: var(--pri-c); color: var(--on-pri-c); font-size: 12px; font-weight: 800; white-space: nowrap; }
.mkt__verdict.is-high { background: var(--ter-c); color: var(--on-ter-c); }
.rangebar { position: relative; height: 40px; margin: 16px 6px 2px; }
.rangebar__track { position: absolute; left: 0; right: 0; top: 16px; height: 8px; border-radius: 4px; background: var(--s3); }
.rangebar__band { position: absolute; top: 14px; height: 12px; border-radius: 6px; background: #95d3a8; }
.rangebar__mark { position: absolute; top: 6px; width: 4px; height: 28px; margin-left: -2px; border-radius: 2px; background: var(--ter); }
.rangebar__lbl { display: flex; justify-content: space-between; font-family: var(--f-num); font-size: 13px; color: var(--ink2); font-weight: 600; }
.mkt__note { margin-top: 6px; font-size: 13px; color: var(--ink2); }

.sec-h { margin: 24px 0 10px; font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.desc { font-size: 15px; line-height: 1.85; word-break: normal; }
.seller { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-l); box-shadow: inset 0 0 0 1px var(--line2); }
.avatar {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-head); font-size: 20px;
}
.avatar--lg { width: 76px; height: 76px; font-size: 32px; }
.avatar--sm { width: 36px; height: 36px; font-size: 15px; }
.seller__n { font-weight: 800; font-size: 16px; }
.seller__a { font-size: 13px; color: var(--ink2); }
.moods { margin-left: auto; display: flex; gap: 10px; }
.mood { display: flex; flex-direction: column; align-items: center; font-family: var(--f-num); font-weight: 700; font-size: 14px; line-height: 1.2; }
.mood svg { width: 22px; height: 22px; }
.mood--good svg { color: var(--pri); }
.mood--normal svg { color: #7a6a2e; }
.mood--bad svg { color: var(--err); }
.demo-note {
  margin: 18px 0 0; padding: 12px 14px; border-radius: var(--r-m);
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff3e8; color: #5a2a00; font-size: 13px; line-height: 1.65; word-break: normal;
}
.demo-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--ter); }

.bottombar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 8;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: var(--bg); box-shadow: 0 -1px 0 var(--line2);
}
.bottombar .btn { flex: 1; }
.favbtn {
  width: 56px; height: 56px; flex: none; border-radius: 18px; border: 0;
  display: grid; place-items: center; background: var(--s2); color: var(--ink);
  transition: transform var(--t-fast) var(--emph), border-radius var(--t-med) var(--spring);
}
.favbtn:active { transform: scale(.92); border-radius: 28px; }
.favbtn[aria-pressed="true"] { color: #c2410c; background: var(--ter-c); }
.favbtn[aria-pressed="true"] svg { animation: pop 420ms var(--spring); }

/* ================= 出品 ================= */
.form { padding: 0 16px; }
.trybox {
  display: flex; align-items: center; gap: 12px;
  margin: 2px 0 8px; padding: 12px 12px 12px 16px; border-radius: var(--r-l);
  background: var(--ter-c); color: var(--on-ter-c);
}
.trybox p { flex: 1; font-size: 13.5px; font-weight: 500; line-height: 1.55; }
.trybox .btn { min-height: 44px; padding: 0 16px; background: #fff; color: var(--on-ter-c); }
.fsec { padding: 18px 0 6px; border-bottom: 1px solid var(--line2); }
.fsec:last-child { border-bottom: 0; }
.fsec__h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 16px; font-weight: 800; }
.fsec__n {
  width: 26px; height: 26px; border-radius: 9px; flex: none;
  display: grid; place-items: center; background: var(--pri); color: #fff;
  font-family: var(--f-num); font-size: 14px; font-weight: 700;
}
.fsec__h em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; color: var(--ter); }
.fsec__h em.opt { color: var(--ink2); }
.err { margin-top: 8px; font-size: 13px; color: var(--err); font-weight: 700; display: flex; gap: 6px; align-items: center; }
.err svg { width: 16px; height: 16px; }
.fsec.is-err .field, .fsec.is-err .photos__add { box-shadow: inset 0 0 0 2px var(--err); }

.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photos__add {
  grid-column: span 2; grid-row: span 2;
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--r-l); background: var(--s1);
  box-shadow: inset 0 0 0 2px var(--line);
  color: var(--pri); font-weight: 800; font-size: 14px; text-align: center;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform var(--t-fast) var(--emph);
}
.photos__add:active { transform: scale(.97); }
.photos__add svg { width: 36px; height: 36px; }
.photos__add small { font-weight: 500; font-size: 12px; color: var(--ink2); }
.photos__add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photos.has-photos .photos__add { grid-column: span 1; grid-row: span 1; border-radius: var(--r-m); gap: 0; font-size: 12px; }
.photos.has-photos .photos__add svg { width: 26px; height: 26px; }
.photos.has-photos .photos__add small { display: none; }
.thumb { position: relative; aspect-ratio: 1; border-radius: var(--r-m); overflow: hidden; background: var(--s3); animation: inFade var(--t-med) var(--emph); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:first-child { grid-column: span 2; grid-row: span 2; border-radius: var(--r-l); }
.thumb__x {
  position: absolute; right: 2px; top: 2px; width: 40px; height: 40px; border: 0; background: transparent;
  display: grid; place-items: center;
}
.thumb__x span { width: 26px; height: 26px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.thumb__x svg { width: 14px; height: 14px; }
.thumb__cover { position: absolute; left: 8px; bottom: 8px; padding: 1px 8px; border-radius: 6px; background: #fff; color: var(--pri); font-size: 11px; font-weight: 800; }
.linkbtn { margin-top: 10px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--pri); font-weight: 700; font-size: 14px; padding: 0 4px; }
.linkbtn svg { width: 18px; height: 18px; }

.field {
  display: flex; align-items: center; gap: 4px;
  min-height: 56px; padding: 0 14px; border-radius: var(--r-s);
  background: var(--s1); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow var(--t-fast);
}
.field:focus-within { box-shadow: inset 0 0 0 2px var(--pri); }
.field input, .field textarea { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; padding: 14px 0; }
.field textarea { resize: none; min-height: 112px; line-height: 1.7; }
.field__cnt { font-family: var(--f-num); font-size: 12px; color: var(--ink2); font-weight: 600; align-self: flex-end; padding-bottom: 8px; }
.guess { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); animation: inFade var(--t-med) var(--emph); }

.conds { display: flex; flex-direction: column; gap: 8px; }
.cond {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 60px; padding: 10px 14px; border: 0; border-radius: var(--r-m);
  background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); text-align: left;
  transition: background-color var(--t-fast), box-shadow var(--t-fast), border-radius var(--t-med) var(--spring);
}
.cond[aria-checked="true"] { background: var(--pri-c); box-shadow: inset 0 0 0 2px var(--pri); border-radius: 22px; }
.cond__l { font-weight: 800; font-size: 15px; min-width: 6.6em; }
.cond__n { flex: 1; font-size: 13px; color: var(--ink2); line-height: 1.5; }
.cond[aria-checked="true"] .cond__n { color: #1d3a26; }

.free {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-m); background: var(--s1); margin-bottom: 12px;
}
.free__t { flex: 1; }
.free__t b { display: block; font-size: 15px; }
.free__t span { font-size: 13px; color: var(--ink2); }
.switch {
  position: relative; flex: none; width: 52px; height: 32px; border: 0; border-radius: 16px; padding: 0;
  background: var(--s3); box-shadow: inset 0 0 0 2px #74827a;
  transition: background-color var(--t-med);
}
.switch::after {
  content: ""; position: absolute; top: 8px; left: 8px; width: 16px; height: 16px; border-radius: 50%;
  background: #74827a; transition: all var(--t-med) var(--spring);
}
.switch[aria-checked="true"] { background: var(--pri); box-shadow: none; }
.switch[aria-checked="true"]::after { left: 24px; top: 4px; width: 24px; height: 24px; background: #fff; }
.pricefield { min-height: 68px; }
.pricefield input { font-family: var(--f-num); font-size: 30px; font-weight: 700; text-align: right; padding: 10px 0; }
.pricefield .yen { font-weight: 800; font-size: 18px; margin-left: 4px; }
.pricefield .lbl { font-weight: 700; font-size: 14px; color: var(--ink2); }
.pricefield.is-off { opacity: .55; }

.meter { margin-top: 14px; padding: 14px 14px 10px; border-radius: var(--r-l); background: var(--s1); }
.meter__h { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; }
.meter__h svg { width: 18px; height: 18px; color: var(--ter); }
.meter__sub { font-size: 12.5px; color: var(--ink2); margin-top: 2px; }
.meter svg.hist { width: 100%; height: auto; display: block; margin-top: 8px; touch-action: none; cursor: ew-resize; }
.hist .bar { fill: #c5d6c4; transition: fill var(--t-fast); }
.hist .bar.in { fill: #6fbf88; }
.hist .needle { transition: transform 120ms var(--emph); }
.hist text { font-family: var(--f-num); font-size: 11px; font-weight: 600; fill: currentColor; color: #44544a; }
.meter__verdict { margin-top: 8px; display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 700; line-height: 1.5; }
.meter__verdict i { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--pri); }
.meter__verdict.is-high i { background: var(--ter); }
.meter__acts { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.meter__empty { padding: 18px 8px 10px; font-size: 13.5px; color: var(--ink2); line-height: 1.7; }

/* 確認・完了 */
.preview { display: flex; gap: 14px; padding: 12px; border-radius: var(--r-l); background: var(--s1); }
.preview img { width: 96px; height: 96px; border-radius: var(--r-m); object-fit: cover; }
.preview__t { font-weight: 800; font-size: 15px; line-height: 1.5; }
.preview__m { font-size: 13px; color: var(--ink2); margin-top: 2px; }
.done { padding: 20px 24px 40px; text-align: center; }
.done__art { position: relative; width: 220px; height: 240px; margin: 12px auto 18px; }
.done__tag {
  position: absolute; inset: 20px 10px 0;
  background: var(--fab); padding: 22px 16px 16px 16px;
  clip-path: polygon(50% 0, 100% 16%, 100% 100%, 0 100%, 0 16%);
  border-radius: 0 0 26px 26px;
  animation: swing 1.4s var(--spring) both;
  transform-origin: 50% 0;
}
.done__tag::before { content: ""; position: absolute; left: 50%; top: 18px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--bg); }
.done__tag img { width: 100%; height: calc(100% - 26px); margin-top: 26px; object-fit: cover; border-radius: 14px; }
@keyframes swing { 0% { transform: rotate(-14deg) translateY(-30px); opacity: 0; } 40% { opacity: 1; } 60% { transform: rotate(6deg); } 100% { transform: rotate(0); } }
.done__title { font-family: var(--f-head); font-size: 24px; font-weight: 400; word-break: keep-all; }
.done__text { margin: 8px auto 22px; font-size: 14px; color: var(--ink2); max-width: 300px; }
.done .btn + .btn { margin-top: 10px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.confetti i { position: absolute; top: 40%; left: 50%; width: 8px; height: 12px; border-radius: 2px; animation: conf 1.2s var(--emph) forwards; }
@keyframes conf { from { transform: translate(0, 0) rotate(0); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) rotate(540deg); opacity: 0; } }

/* ================= 取引 ================= */
.trade {
  display: flex; gap: 12px; padding: 14px 16px; text-decoration: none; color: inherit; position: relative;
  border-bottom: 1px solid var(--line2);
}
.trade:active { background: var(--s1); }
.trade__ph { position: relative; flex: none; }
.trade__ph img { width: 72px; height: 72px; border-radius: var(--r-m); object-fit: cover; }
.trade__ph .avatar { position: absolute; right: -6px; bottom: -6px; box-shadow: 0 0 0 3px var(--bg); }
.trade__b { flex: 1; min-width: 0; }
.trade__top { display: flex; align-items: center; gap: 8px; }
.trade__t { flex: 1; min-width: 0; font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trade__at { font-family: var(--f-num); font-size: 12px; color: var(--ink2); font-weight: 600; }
.trade__last { margin-top: 2px; font-size: 13.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trade.is-unread .trade__last { color: var(--ink); font-weight: 700; }
.stagebar { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.stagebar__segs { display: flex; gap: 3px; }
.stagebar__segs i { width: 18px; height: 6px; border-radius: 3px; background: var(--s3); }
.stagebar__segs i.on { background: var(--pri); }
.stagebar__segs i.now { background: var(--fab); }
.stagebar span { font-size: 12px; font-weight: 800; color: var(--pri); }
.unread { position: absolute; right: 16px; bottom: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--fab); }
.tabs2 { padding: 0 16px 10px; }
.tabs2 .seg { display: flex; width: 100%; }
.tabs2 .seg button { flex: 1; min-height: 44px; }

/* チャット */
.chat-top { gap: 8px; }
.chat-top__who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.chat-top__n { font-weight: 800; font-size: 16px; line-height: 1.3; }
.chat-top__s { font-size: 12px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item {
  flex: none; display: flex; align-items: center; gap: 10px;
  margin: 0 12px 8px; padding: 8px 12px 8px 8px; border-radius: var(--r-m);
  background: var(--s1); text-decoration: none; color: inherit;
}
.chat-item img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.chat-item__t { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item__p { font-family: var(--f-num); font-weight: 700; color: var(--ter); font-size: 16px; }
.stepper { flex: none; display: flex; padding: 4px 14px 10px; gap: 4px; }
.step { flex: 1; text-align: center; font-size: 11px; font-weight: 700; color: var(--ink2); }
.step i { display: block; height: 6px; border-radius: 3px; background: var(--s3); margin-bottom: 4px; transition: background-color var(--t-slow); }
.step.is-done i { background: var(--pri); }
.step.is-now i { background: var(--fab); }
.step.is-now { color: var(--ink); }
.msgs { padding: 8px 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 80%; padding: 10px 14px; border-radius: 20px; font-size: 15px; line-height: 1.6; word-break: normal; overflow-wrap: anywhere; }
.msg.is-new, .prop.is-new, .sys.is-new { animation: msgIn var(--t-med) var(--spring) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
.msg--me { align-self: flex-end; background: var(--pri-c); color: var(--on-pri-c); border-bottom-right-radius: 6px; }
.msg--them { align-self: flex-start; background: var(--s2); color: var(--ink); border-bottom-left-radius: 6px; }
.msg__at { display: block; margin-top: 2px; font-family: var(--f-num); font-size: 11px; font-weight: 600; color: #4c5a50; text-align: right; }
.msg--me .msg__at { color: #2d5a3c; }
.sys { align-self: center; margin: 8px 0; padding: 4px 12px; border-radius: 999px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; font-weight: 700; color: var(--ink2); text-align: center; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 14px 16px; border-radius: 20px; background: var(--s2); }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #66746a; animation: bounce 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-5px); } }
.prop {
  max-width: 86%; border-radius: 22px; overflow: hidden; background: var(--bg);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.prop--me { align-self: flex-end; }
.prop--them { align-self: flex-start; }
.prop__h { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--ter-c); color: var(--on-ter-c); font-size: 13px; font-weight: 800; }
.prop__h svg { width: 18px; height: 18px; }
.prop__b { padding: 12px 14px; }
.prop__day { font-size: 18px; font-weight: 800; }
.prop__day .num { font-size: 22px; }
.prop__spot { margin-top: 2px; font-size: 14px; display: flex; gap: 4px; align-items: center; }
.prop__spot svg { width: 16px; height: 16px; color: var(--pri); }
.prop__acts { display: flex; gap: 8px; padding: 0 14px 14px; flex-wrap: wrap; }
.prop__acts .btn { min-height: 44px; padding: 0 16px; font-size: 14px; }
.prop__ok { padding: 0 14px 12px; font-size: 13px; font-weight: 800; color: var(--pri); display: flex; gap: 4px; align-items: center; }
.prop__ok svg { width: 18px; height: 18px; }
.actionbar {
  flex: none; margin: 0 12px 8px; padding: 12px 12px 12px 16px; border-radius: var(--r-l);
  display: flex; align-items: center; gap: 12px;
  background: var(--pri-c); color: var(--on-pri-c);
  animation: inFade var(--t-med) var(--emph);
}
.actionbar p { flex: 1; font-size: 14px; font-weight: 700; line-height: 1.5; }
.actionbar p small { display: block; font-weight: 500; font-size: 12.5px; }
.actionbar .btn { min-height: 44px; padding: 0 16px; font-size: 14px; }
.composer { flex: none; background: var(--bg); padding: 6px 0 calc(8px + var(--safe-b)); box-shadow: 0 -1px 0 var(--line2); }
.composer .chips { padding-bottom: 6px; }
.composer .chip { min-height: 36px; font-size: 13px; padding: 0 12px; }
.composer__row { display: flex; align-items: flex-end; gap: 6px; padding: 0 8px 0 12px; }
.composer__in {
  flex: 1; min-width: 0; min-height: 48px; max-height: 120px;
  padding: 12px 16px; border: 0; border-radius: 24px; background: var(--s2); outline: none; resize: none;
  font-size: 16px; line-height: 1.5;
}
.sendbtn { width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--pri); color: #fff; flex: none; transition: transform var(--t-fast) var(--spring); }
.sendbtn:active { transform: scale(.88); }
.sendbtn[disabled] { background: var(--s3); color: #5b665d; }

/* 評価 */
.rate { padding: 0 20px; }
.rate__who { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0 18px; text-align: center; }
.rate__q { font-family: var(--f-head); font-size: 20px; font-weight: 400; line-height: 1.5; word-break: keep-all; }
.faces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.face {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 6px 12px; border: 0; border-radius: var(--r-l); background: var(--s1);
  font-weight: 800; font-size: 14px; color: var(--ink);
  transition: transform var(--t-med) var(--spring), background-color var(--t-fast), border-radius var(--t-med) var(--spring);
}
.face svg { width: 44px; height: 44px; color: var(--ink2); transition: transform var(--t-med) var(--spring); }
.face[aria-checked="true"] { background: var(--pri-c); border-radius: 32px; }
.face[aria-checked="true"] svg { color: var(--pri); transform: scale(1.18) rotate(-6deg); }
.face--bad[aria-checked="true"] { background: var(--err-c); }
.face--bad[aria-checked="true"] svg { color: var(--err); }
.reviewed { padding: 16px; border-radius: var(--r-l); background: var(--s1); }
.reviewed + .reviewed { margin-top: 10px; }
.reviewed__h { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.reviewed__h svg { width: 26px; height: 26px; color: var(--pri); }
.reviewed p { margin-top: 6px; font-size: 14px; line-height: 1.7; word-break: normal; }
.tagline { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tagline span { padding: 2px 10px; border-radius: 8px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; font-weight: 700; color: var(--ink2); }

/* ================= マイページ ================= */
.prof { margin: 0 12px; padding: 20px; border-radius: var(--r-xl); background: var(--pri-c); color: var(--on-pri-c); position: relative; overflow: hidden; }
.prof::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px;
  border-radius: 46% 54% 60% 40% / 40% 50% 50% 60%; background: #a9dfb9; z-index: 0;
}
.prof > * { position: relative; z-index: 1; }
.prof__row { display: flex; align-items: center; gap: 14px; }
.prof__n { font-family: var(--f-head); font-size: 22px; font-weight: 400; }
.prof__a { font-size: 13px; font-weight: 500; }
.stats { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { padding: 10px 6px; border-radius: var(--r-m); background: #fff; color: var(--ink); text-align: center; }
.stat b { display: block; font-family: var(--f-num); font-size: 24px; line-height: 1.2; }
.stat b small { font-family: var(--f-body); font-size: 12px; margin-left: 1px; }
.stat span { font-size: 12px; font-weight: 700; color: var(--ink2); }
.hscroll { display: flex; gap: 10px; overflow-x: auto; padding: 0 16px 4px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 16px; }
.hscroll::-webkit-scrollbar { display: none; }
.mine { flex: none; width: 150px; text-decoration: none; color: inherit; scroll-snap-align: start; }
.mine__ph { position: relative; border-radius: var(--r-l); overflow: hidden; }
.mine__ph img { width: 150px; height: 150px; object-fit: cover; }
.mine__st { position: absolute; left: 8px; top: 8px; padding: 2px 9px; border-radius: 8px; font-size: 11px; font-weight: 800; background: #fff; color: var(--pri); }
.mine__st.is-trading { background: var(--fab); color: var(--on-fab); }
.mine__st.is-given { background: #26332a; color: #fff; }
.mine__t { margin-top: 6px; font-size: 13.5px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mine--add .mine__ph { width: 150px; height: 150px; display: grid; place-items: center; background: var(--s1); box-shadow: inset 0 0 0 2px var(--line); color: var(--pri); }
.mine--add .mine__ph svg { width: 34px; height: 34px; }
.pad { padding: 0 16px; }
.sec-h2 { display: flex; align-items: center; justify-content: space-between; margin: 26px 16px 10px; font-size: 17px; font-weight: 800; }
.sec-h2 a { font-size: 14px; color: var(--pri); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.revrow { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line2); }
.revrow > svg { width: 30px; height: 30px; color: var(--pri); flex: none; }
.revrow--normal > svg { color: #7a6a2e; }
.revrow__h { font-size: 14px; font-weight: 800; }
.revrow__h span { font-weight: 500; color: var(--ink2); font-size: 12px; margin-left: 6px; font-family: var(--f-num); }
.revrow p { font-size: 14px; line-height: 1.7; word-break: normal; }
.list { margin: 8px 16px; border-radius: var(--r-l); overflow: hidden; background: var(--s1); }
.row {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 60px; padding: 8px 16px; border: 0; background: transparent; text-align: left;
  text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 500;
}
.row + .row { box-shadow: inset 0 1px 0 var(--line2); }
.row > svg:first-child { color: var(--pri); }
.row__t { flex: 1; min-width: 0; }
.row__t small { display: block; font-size: 12.5px; color: var(--ink2); }
.row > svg:last-child { color: var(--ink2); width: 20px; height: 20px; }
.row--danger { color: var(--err); font-weight: 700; }
.row--danger > svg:first-child { color: var(--err); }

.about { padding: 8px 20px 24px; }
.about__app { display: flex; align-items: center; gap: 16px; padding: 8px 0 18px; }
.about__app img { width: 76px; height: 76px; border-radius: 20px; box-shadow: var(--e1); }
.about__app b { display: block; font-family: var(--f-head); font-size: 22px; font-weight: 400; }
.about__app span { font-size: 13px; color: var(--ink2); }
.about__box { padding: 16px; border-radius: var(--r-l); background: var(--s1); font-size: 14px; line-height: 1.8; word-break: normal; }
.about__box + .about__box { margin-top: 12px; }
.about__box h3 { font-size: 15px; margin-bottom: 6px; }
.about__box ul { margin: 0; padding-left: 1.2em; }
.about__cta { margin-top: 16px; }

/* ================= シート・ダイアログ・スナックバー ================= */
.scrim { position: absolute; inset: 0; z-index: 40; background: rgba(10, 20, 13, .42); animation: inFade var(--t-med) both; }
.scrim.is-out { animation: outFade var(--t-med) both; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 41;
  max-height: 88%;
  display: flex; flex-direction: column;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--s1);
  padding-bottom: var(--safe-b);
  animation: sheetIn var(--t-slow) var(--emph) both;
  touch-action: pan-y;
}
.sheet.is-out { animation: sheetOut var(--t-med) var(--emph) both; }
@keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetOut { to { transform: translateY(100%); } }
.sheet__grip { flex: none; display: grid; place-items: center; height: 28px; cursor: grab; }
.sheet__grip i { width: 32px; height: 4px; border-radius: 2px; background: #7d8a80; }
.sheet__h { flex: none; padding: 0 20px 8px; font-size: 19px; font-weight: 800; font-feature-settings: "palt"; }
.sheet__b { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 20px; }
.sheet__b .field { background: var(--bg); }
.sheet__lbl { margin: 14px 0 8px; font-size: 14px; font-weight: 800; }
.sheet__f { flex: none; padding: 8px 20px 16px; display: flex; gap: 10px; }
.sheet__f .btn { flex: 1; }
.optrow { display: flex; align-items: center; gap: 12px; min-height: 56px; width: 100%; border: 0; background: transparent; padding: 0 4px; font-size: 15px; text-align: left; border-radius: 12px; }
.optrow .radio { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px #66746a; flex: none; }
.optrow[aria-checked="true"] .radio { box-shadow: inset 0 0 0 2px var(--pri), inset 0 0 0 6px var(--s1), inset 0 0 0 12px var(--pri); }
.optrow span { flex: 1; }
.optrow small { color: var(--ink2); font-size: 13px; }
.notif { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line2); text-decoration: none; color: inherit; }
.notif img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; }
.notif p { font-size: 14px; line-height: 1.6; word-break: normal; }
.notif small { display: block; font-family: var(--f-num); color: var(--ink2); font-size: 12px; font-weight: 600; }

.dialog {
  position: absolute; z-index: 50; left: 24px; right: 24px; top: 50%;
  transform: translateY(-50%);
  padding: 24px 24px 16px; border-radius: var(--r-xl); background: var(--s1);
  box-shadow: var(--e3);
  animation: dlgIn var(--t-med) var(--spring) both;
}
@keyframes dlgIn { from { opacity: 0; transform: translateY(-50%) scale(.9); } to { opacity: 1; transform: translateY(-50%); } }
.dialog h2 { font-size: 19px; font-weight: 800; margin-bottom: 8px; word-break: keep-all; }
.dialog p { font-size: 14px; color: var(--ink2); line-height: 1.7; word-break: normal; }
.dialog__f { margin-top: 18px; display: flex; justify-content: flex-end; gap: 4px; }
.dialog__f .btn { padding: 0 16px; }

.snackbar {
  position: absolute; z-index: 60; left: 12px; right: 12px;
  bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
  display: flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 6px 8px 6px 16px; border-radius: 12px;
  background: #2b3a30; color: #eef5ec; font-size: 14px; line-height: 1.5;
  box-shadow: var(--e2);
  transform: translateY(20px); opacity: 0; pointer-events: none;
  transition: transform var(--t-med) var(--spring), opacity var(--t-fast);
}
.snackbar.is-on { transform: none; opacity: 1; pointer-events: auto; }
.snackbar.is-low { bottom: calc(var(--safe-b) + 92px); }
.snackbar span { flex: 1; }
.snackbar button { border: 0; background: transparent; color: #a8e2b9; font-weight: 800; min-height: 40px; padding: 0 10px; border-radius: 8px; }

/* ================= 起動 ================= */
.splash {
  position: absolute; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--bg);
}
.splash img { border-radius: 26px; animation: splashIcon 700ms var(--spring) both; box-shadow: var(--e2); }
.splash__name { font-family: var(--f-head); font-size: 24px; color: var(--pri); animation: inFade 500ms 150ms both; }
.splash.is-out { animation: outFade 260ms both; }
@keyframes splashIcon { from { transform: scale(.6) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
.onboard { position: absolute; inset: 0; z-index: 80; display: flex; flex-direction: column; background: var(--bg); }
.onboard.is-out { animation: outFade 260ms both; }
.onboard__photo {
  flex: 1; min-height: 0;
  background: var(--s2) url(/app-development/apps/a083/img/welcome.webp) center 70% / cover no-repeat;
  border-radius: 0 0 40px 40px;
  transition: background-position 600ms var(--emph);
}
.onboard__body { flex: none; padding: 22px 24px calc(18px + var(--safe-b)); background: var(--bg); }
.onboard__dots { display: flex; gap: 6px; margin-bottom: 14px; }
.onboard__dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--s3); transition: width var(--t-med) var(--spring), background-color var(--t-med); }
.onboard__dots i.is-on { width: 26px; background: var(--pri); }
.onboard__title { font-family: var(--f-head); font-size: 25px; font-weight: 400; line-height: 1.45; word-break: keep-all; font-feature-settings: "palt"; }
.onboard__text { margin-top: 10px; font-size: 15px; line-height: 1.8; color: var(--ink2); min-height: 5.4em; word-break: normal; }
.onboard__btns { margin-top: 16px; display: flex; justify-content: space-between; }

/* 視差効果を減らす */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  .map .me-pulse { animation: none; opacity: 0; }
}

/* 文節で折り返す（対応ブラウザのみ。ほかは通常の禁則） */
@supports (word-break: auto-phrase) {
  .card__title, .dsheet__title, .peek__t, .preview__t, .mine__t, .fact__v, .empty__title, .done__title,
  .rate__q, .headline, .onboard__title, .sheet__h, .dialog h2, .chat-item__t, .actionbar p, .cond__n, .meter__verdict span, .guess {
    word-break: auto-phrase;
  }
}
