/* PEASMILE アプリの見た目 */
:root {
  --brand: #f0606a;
  --brand-dark: #d6454f;
  --brand-soft: #fde8e9;
  --bg: #fffaf8;
  --text: #1f2430;
  --muted: #71717a;
  --line: #e4e4e7;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 16px; line-height: 1.7; min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; line-height: 1.4; }
h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
p { margin: 0 0 .5rem; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding-top: 28px; padding-bottom: 48px; }
.narrow { max-width: 640px; margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.xs { font-size: .75rem; }
.brand { color: var(--brand) !important; font-weight: 700; }
.inline { display: inline; margin: 0; }
.pre { white-space: pre-wrap; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px) { .with-side { grid-template-columns: 1fr 340px; } .with-filter { grid-template-columns: 260px 1fr; } }

/* ヘッダー・フッター */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; }
.logo img { height: 28px; width: auto; }
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 16px; font-size: .9rem; align-items: center; }
.nav a { color: var(--text); font-weight: 500; }
.site-footer { border-top: 1px solid var(--line); padding: 24px 16px; text-align: center; font-size: .78rem; color: var(--muted); }
.site-footer a { color: var(--muted); margin: 0 8px; }
.site-footer p { margin-top: 8px; }

/* 部品 */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
a.card { display: block; color: inherit; }
a.card:hover { border-color: var(--brand); text-decoration: none; }
.card.accent { border-color: rgba(240,96,106,.4); background: var(--brand-soft); }
.page-title { margin-bottom: 24px; }
.page-title p { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.back { display: inline-block; font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--brand); color: #fff; border: 0; border-radius: 999px; padding: 10px 22px; font-weight: 700; font-size: 1rem; cursor: pointer; font-family: inherit; text-decoration: none; }
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-sm { padding: 6px 16px; font-size: .85rem; color: #fff !important; }
.btn-sub { background: #fff; color: var(--text); border: 1px solid #d4d4d8; font-weight: 500; }
.btn-sub:hover { background: #fafafa; }
.btn-block { width: 100%; }
button.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--brand); }
.notice { border-radius: 10px; border: 1px solid #bae6fd; background: #f0f9ff; color: #0c4a6e; padding: 12px 16px; font-size: .9rem; margin-bottom: 16px; }
.notice-success { border-color: #a7f3d0; background: #ecfdf5; color: #065f46; }
.notice-error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.badge { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.tone-gray { background: #f4f4f5; color: #52525b; } .tone-amber { background: #fef3c7; color: #92400e; }
.tone-sky { background: #e0f2fe; color: #075985; } .tone-violet { background: #ede9fe; color: #5b21b6; }
.tone-green { background: #d1fae5; color: #065f46; } .tone-green-strong { background: #059669; color: #fff; }
.tone-brand { background: var(--brand); color: #fff; }
.rank-gold { background: #f59e0b; color: #fff; } .rank-silver { background: #a1a1aa; color: #fff; }
.rank-bronze { background: #b45309; color: #fff; } .rank-new { background: var(--brand-soft); color: var(--brand); }
.rating { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: .8rem; }
.star { color: #f59e0b; }
.tag { display: inline-block; background: #f4f4f5; border-radius: 999px; padding: 2px 10px; font-size: .75rem; margin: 2px 2px 0 0; }

/* フォーム */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 4px; }
label.field small { display: block; color: var(--muted); font-size: .75rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=url], select, textarea {
  width: 100%; border: 1px solid #d4d4d8; border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 1rem; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(240,96,106,.25); border-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; border: 1px solid #d4d4d8; background: #fff; border-radius: 999px; padding: 4px 12px; font-size: .88rem; cursor: pointer; }
.chip input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.role-pick label { border: 2px solid var(--line); border-radius: 14px; padding: 16px 8px; text-align: center; cursor: pointer; background: #fff; }
.role-pick input { position: absolute; opacity: 0; }
.role-pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.role-pick b { display: block; font-size: 1.1rem; }
.role-pick small { color: var(--muted); font-size: .75rem; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; }
.check input { margin-top: 6px; }

/* トップ */
.hero { background: var(--brand-soft); border-radius: 28px; padding: 56px 24px; text-align: center; }
.hero .kicker { color: var(--brand); font-weight: 700; font-size: .9rem; }
.hero h1 { font-size: clamp(1.7rem, 6vw, 2.8rem); font-weight: 900; margin: 8px 0 12px; }
.hero .lead { color: #52525b; }

/* 写真・一覧 */
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.photo-grid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; }
.photo-grid img:first-child { grid-column: span 2; }
@media (min-width: 640px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } .photo-grid img:first-child { grid-row: span 2; } }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.model-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; display: block; }
.model-card:hover { border-color: var(--brand); text-decoration: none; }
.model-card .cover { aspect-ratio: 3/4; background: #f4f4f5; position: relative; }
.model-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.model-card .cover .badge { position: absolute; top: 8px; left: 8px; background: #059669; color: #fff; }
.model-card .body { padding: 10px 12px 12px; font-size: .9rem; }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #f4f4f5; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: .7rem; color: #a1a1aa; }
.avatar-lg { width: 96px; height: 96px; }
.slots { list-style: none; padding: 0; margin: 0; }
.slots li { padding: 8px 0; border-bottom: 1px solid #f4f4f5; font-size: .9rem; }
.price-row { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; }
.price-total { font-weight: 800; }
dl.facts { display: grid; grid-template-columns: 6.5rem 1fr; gap: 8px 12px; margin: 0; font-size: .92rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; white-space: pre-wrap; }

/* メッセージ */
.chat { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.chat .event { text-align: center; color: var(--muted); font-size: .75rem; }
.bubble { max-width: 82%; border-radius: 16px; padding: 8px 12px; background: #f4f4f5; font-size: .92rem; white-space: pre-wrap; word-break: break-word; }
.bubble.mine { align-self: flex-end; background: var(--brand-soft); }
.bubble .meta { display: block; font-size: .68rem; color: var(--muted); margin-top: 2px; }

/* 表（事務局） */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 680px; }
table.list th { text-align: left; font-size: .75rem; color: var(--muted); background: #fafafa; padding: 10px; }
table.list td { padding: 10px; border-top: 1px solid #f4f4f5; vertical-align: top; }
.num { text-align: right; white-space: nowrap; }

/* 写真の登録 */
.photo-slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .photo-slots { grid-template-columns: repeat(5, 1fr); } }
.photo-slot { aspect-ratio: 3/4; border: 2px dashed #d4d4d8; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #fff; color: #a1a1aa; font-size: .85rem; text-align: center; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.stars-input { display: flex; gap: 4px; font-size: 2rem; }
.stars-input input { position: absolute; opacity: 0; }
.stars-input label { color: #d4d4d8; cursor: pointer; }
.stars-input label.on { color: #f59e0b; }

/* スマホ：下部のタブメニュー（アプリのように） */
.tabbar { display: none; }
@media (max-width: 720px) {
  .nav-member > a:not(.admin-link), .desktop-only { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: rgba(255,255,255,.97); border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { color: var(--muted); text-align: center; font-size: .68rem; font-weight: 700; line-height: 1.2; text-decoration: none; }
  .tabbar a span { display: block; font-size: 1.25rem; line-height: 1.3; }
  .tabbar a.on { color: var(--brand); }
  body:has(.tabbar) .site-footer { padding-bottom: 90px; }
  .logo img { height: 24px; }
}
details.filters > summary { list-style: none; cursor: pointer; font-weight: 700; }
details.filters > summary::-webkit-details-marker { display: none; }
details.filters > summary::after { content: ' ▾'; color: var(--muted); }
@media (min-width: 860px) { details.filters > summary { pointer-events: none; } details.filters > summary::after { content: ''; } }
.mobile-only { display: none; }
@media (max-width: 859px) { .mobile-only { display: block; } }
