/* 本番画面用の追加（style.css はテストページと共通） */
main.wrap { min-height: 60vh; outline: none; }
.loading { padding: 40px 0; color: var(--muted); }
.narrow { max-width: 640px; margin: 0 auto; }
.mt { margin-top: 20px; }

/* フォーム */
.form { display: grid; gap: 16px; margin-top: 18px; }
.field { display: grid; gap: 6px; }
.field > span, .field legend { font-size: 14px; font-weight: 700; }
.field small { font-size: 12px; color: var(--muted); font-weight: 400; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=date], .field select, .field textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 15px;
}
.field textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.birth { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.checks { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--surface); }
.checks label, .inline-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.6; cursor: pointer; }
.checks input, .inline-check input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.btn { border: 0; cursor: pointer; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.wide { width: 100%; }
.btn.small { height: 40px; padding: 0 16px; font-size: 13.5px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; }

.notice { padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 13px; line-height: 1.7; }
.warn { padding: 12px 14px; border-radius: 12px; background: #FBF1EC; color: #6E3420; font-size: 13px; line-height: 1.7; }
.warn a { color: #8C3B22; font-weight: 700; }
.error { padding: 12px 14px; border-radius: 12px; background: #FBE9E7; color: #8C2A1C; font-size: 13.5px; }

/* 写真の選択 */
.photo-picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.photo-picks .pick { aspect-ratio: 1; border-radius: 10px; background: var(--surface) center / cover no-repeat; position: relative; }
.photo-picks .pick button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(46, 34, 48, 0.75); color: #fff; cursor: pointer; }
.photo-add { aspect-ratio: 1; border-radius: 10px; border: 1.5px dashed #CDB9BF; display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 13px; cursor: pointer; text-align: center; }

/* 商品ページ */
.item-page { display: grid; gap: 20px; padding-top: 20px; }
.gallery .main-photo { aspect-ratio: 4 / 5; border-radius: 16px; background: var(--surface) center / contain no-repeat; }
.gallery .thumbs { margin-top: 8px; display: flex; gap: 8px; overflow-x: auto; }
.gallery .thumbs button { width: 64px; height: 64px; flex-shrink: 0; border-radius: 10px; border: 2px solid transparent; background: var(--surface) center / cover no-repeat; cursor: pointer; }
.gallery .thumbs button[aria-current=true] { border-color: var(--accent); }
.item-info h1 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 600; line-height: 1.5; }
.item-info .big-price { margin: 8px 0 0; font-size: 26px; font-weight: 700; }
.item-info .desc { white-space: pre-wrap; font-size: 14px; line-height: 1.8; }
.seller-card { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.seller-card .who { display: grid; gap: 2px; }
.photo { background-position: center; background-size: cover; background-repeat: no-repeat; }
.status-tag { display: inline-block; padding: 2px 10px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 12px; }

/* 取引のメッセージ */
.thread-head { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.thread-head .photo { width: 56px; height: 56px; aspect-ratio: auto; border-radius: 10px; flex-shrink: 0; }
.msgs { list-style: none; margin: 0; padding: 16px 0; display: grid; gap: 10px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.msg.mine { justify-self: end; background: var(--accent-soft); border-color: transparent; }
.msg time { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.composer { position: sticky; bottom: 72px; background: var(--bg); padding: 10px 0; display: grid; gap: 8px; }
.composer textarea { width: 100%; min-height: 64px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font: inherit; font-size: 14px; resize: vertical; }
.thread-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.thread-list a { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.thread-list .photo { width: 56px; height: 56px; aspect-ratio: auto; border-radius: 10px; flex-shrink: 0; }
.thread-list .t { display: grid; gap: 2px; font-size: 13px; }
.thread-list .t strong { font-size: 14.5px; }

/* 通報フォーム */
.report-box { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 10px; max-width: 520px; }

/* 管理 */
.admin-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.admin-list li { padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 6px; font-size: 13.5px; }
.admin-list .kind { font-weight: 700; color: #8C3B22; }
.admin-box { margin-top: 20px; padding: 14px; border-radius: 14px; border: 2px dashed #CDB9BF; display: grid; gap: 10px; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 50; }
.toast.show { opacity: 1; }

.doc { max-width: 720px; padding-top: 20px; font-size: 14.5px; line-height: 1.9; }
.doc h1 { font-family: var(--display); font-size: 26px; font-weight: 600; }
.doc h2 { font-size: 17px; margin-top: 28px; }

.cats-chips a.chip { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }

@media (min-width: 1024px) {
  .cats-chips { display: none; }
  .item-page { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
  .composer { bottom: 0; }
  .toast { bottom: 32px; }
}
