/* shared/base.css — モデルオーディションの共通スタイル（design/ の Gemini 柔らかい版を踏襲）
   配色：コーラル #ff8c73・ミント #a7e8d6・ラベンダー #d4c4fb。大きな角丸・本文16px・タップ領域44px以上
   インラインのスタイルは使わない（CSP に 'unsafe-inline' を入れないため） */
:root {
  --coral: #ff8c73; --coral-d: #ff7052; --coral-ink: #c4533a; --mint: #a7e8d6; --mint-d: #59917e; --mint-ink: #1b7a62;
  --lav: #d4c4fb; --lav-ink: #4c3d68; --peach: #fffaf9; --ink: #333; --muted: #747b82; --line: #e8eaed; --field: #f5f7f9;
  --ok-bg: #e0f2ec; --ok: #2ea082; --warn-bg: #fdf3e5; --warn: #b96d10; --ng-bg: #f9e1e1; --ng: #c63f3b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: #eef1f5; color: var(--ink); font-family: 'Helvetica Neue', Arial, 'Hiragino Sans', 'Yu Gothic', sans-serif; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--mint-d); outline-offset: 3px; }
a { color: var(--mint-ink); }
[hidden] { display: none !important; }

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #fff; display: flex; flex-direction: column; position: relative; }
.app.wide { max-width: 1180px; }
.header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.96); padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #f0f0f0; }
.brand { font-weight: bold; letter-spacing: .02em; }
.brand small { display: block; font-size: 11px; color: #999; letter-spacing: .12em; font-weight: normal; }
.main { flex: 1; padding: 16px 20px 110px; display: flex; flex-direction: column; gap: 18px; }
.tabbar { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,255,255,.97); border-top: 1px solid #eee; z-index: 20; }
.tabbar button { padding: 12px 4px 14px; font-size: 13px; color: #888; min-height: 56px; }
.tabbar button[aria-current="page"] { color: var(--coral-d); font-weight: bold; }
.tabbar .dot { display: inline-block; min-width: 8px; height: 8px; border-radius: 4px; background: var(--coral); margin-left: 4px; vertical-align: middle; }

.hero { padding: 24px; border-radius: 28px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(135deg, #ffdfd3, var(--mint)); }
.hero.alt { background: linear-gradient(135deg, var(--mint), var(--lav)); }
.hero h2 { font-size: 24px; line-height: 1.4; }
.eyebrow { font-size: 12px; letter-spacing: .1em; color: #55786b; font-weight: bold; }
.card { padding: 20px; border-radius: 24px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; background: #fff; }
.card.soft { background: var(--field); border-color: transparent; }
.card h3 { font-size: 18px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }

.btn { width: 100%; min-height: 52px; padding: 14px 18px; border-radius: 28px; font-weight: bold; text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.inline { width: auto; min-height: 44px; padding: 10px 18px; }
.btn-primary { background: linear-gradient(135deg, var(--coral), var(--coral-d)); color: #fff; box-shadow: 0 6px 16px rgba(255,140,115,.25); }
.btn-secondary { background: #fff; color: var(--coral-d); border: 2px solid var(--coral); }
.btn-mint { background: var(--mint); color: #1d4e40; }
.btn-ghost { background: var(--field); color: var(--ink); }
.btn-danger { background: #fff; color: var(--ng); border: 2px solid #f0b8b6; }
.link { color: #999; font-size: 14px; text-decoration: underline; }

.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field > span.note, .field .note { font-weight: 400; font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-width: 0; background: var(--field); border: 1px solid var(--line); border-radius: 16px; padding: 13px; font-weight: 400; min-height: 48px; }
.field textarea { min-height: 96px; resize: vertical; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; }
.check input { width: 22px; height: 22px; flex: none; accent-color: #679d8c; margin-top: 2px; }
.seg { display: flex; gap: 4px; background: #f3f5f6; border-radius: 16px; padding: 4px; }
.seg button { flex: 1; padding: 9px 4px; border-radius: 12px; font-size: 14px; min-height: 40px; }
.seg button[aria-pressed="true"] { background: var(--lav); color: var(--lav-ink); font-weight: bold; }
.seg button[aria-pressed="true"][data-v="ok"], .seg button[aria-pressed="true"][data-v="none_ok"] { background: var(--mint); color: #1d4e40; }
.seg button[aria-pressed="true"][data-v="ng"] { background: var(--ng-bg); color: var(--ng); }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; }
.tabs button { white-space: nowrap; padding: 9px 14px; border-radius: 18px; background: #f2f4f6; font-size: 14px; min-height: 40px; }
.tabs button[aria-selected="true"] { background: #dff4ed; color: #285d4f; font-weight: bold; }

.chip { display: inline-block; padding: 4px 10px; border-radius: 14px; font-size: 13px; font-weight: bold; background: var(--field); }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.warn { background: var(--warn-bg); color: var(--warn); } .chip.ng { background: var(--ng-bg); color: var(--ng); }
.chip.lav { background: #efe9ff; color: var(--lav-ink); } .chip.coral { background: #fff0ec; color: var(--coral-ink); }
.alert { background: #fff5f2; border: 1px solid #ffd5cc; border-radius: 20px; padding: 16px; color: var(--coral-ink); font-size: 15px; }
.alert.info { background: #effaf6; border-color: #c4eadf; color: #2b6656; }
.alert.lav { background: #f6f2ff; border-color: #e3d9fd; color: var(--lav-ink); }
.receipt { background: var(--field); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.receipt .r { display: flex; justify-content: space-between; color: #555; }
.receipt .total { border-top: 2px dashed #ccc; padding-top: 12px; font-weight: bold; font-size: 20px; color: var(--coral-d); }
.receipt.take { background: #e0f7fa; border: 1px solid #b2dfdb; }
.receipt.take .total { border-color: #80cbc4; color: var(--mint-ink); }

.list { display: flex; flex-direction: column; gap: 12px; }
.item { padding: 16px; border-radius: 20px; border: 1px solid #eee; background: #fff; display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%; }
.item.clickable { cursor: pointer; }
.item.clickable:active { transform: scale(.99); }
.avatar { width: 48px; height: 48px; border-radius: 24px; background: linear-gradient(135deg, #ffdfd3, var(--lav)); flex: none; display: grid; place-items: center; font-weight: bold; color: #fff; }

/* 探す（スワイプのカード・グリッド） */
.swipe { position: relative; border-radius: 28px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.08); background: linear-gradient(135deg, #ffdfd3, var(--mint)); min-height: 440px; display: flex; flex-direction: column; justify-content: flex-end; }
.swipe .shade { padding: 60px 20px 20px; background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; display: flex; flex-direction: column; gap: 6px; }
.swipe .shade .chip { background: rgba(255,255,255,.25); color: #fff; }
.circle-row { display: flex; justify-content: center; gap: 24px; }
.circle { width: 64px; height: 64px; border-radius: 32px; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.12); font-weight: bold; color: var(--coral-d); }
.circle.skip { color: #999; }
.gridcards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gridcards .gc { border-radius: 20px; overflow: hidden; border: 1px solid #eee; text-align: left; }
.gc .ph { aspect-ratio: 3/4; background: linear-gradient(135deg, var(--mint), var(--lav)); position: relative; }
.gc .meta { padding: 10px 12px; font-size: 14px; }

/* 写真（canvas に描画し、閲覧者名・日時の透かしを描き込む。直リンク・保存・ドラッグ・選択・印刷を防ぐ。TODO: 見えない透かし） */
.photo { position: relative; overflow: hidden; border-radius: 20px; background: var(--field); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pan-y; }
.photo canvas { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; transition: filter .15s; }
.photo.photo-error::after { content: '写真を表示できません'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
body.privacy-blur .photo canvas { filter: blur(28px); }
@media print { .photo, .photos, .swipe .photo { display: none !important; } }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photos .photo { aspect-ratio: 3/4; }
.photo.big { aspect-ratio: 3/4; }
/* 依頼者のモデル詳細：写真をスマホの幅いっぱい・元の縦横比で（会長指示 2026-11-17）。.main の左右の余白（20px）を打ち消す */
.photo.full { margin: 0 -20px; border-radius: 0; }
.photo.full canvas { height: auto; }
.photos-full { display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 520px) { .photo.full { margin: 0; border-radius: 20px; } }

.radar { width: 100%; max-width: 320px; margin: 0 auto; display: block; }
.radar .grid { fill: none; stroke: #e3e6ea; }
.radar .area { fill: rgba(167,232,214,.55); stroke: var(--mint-d); stroke-width: 2; }
.radar text { font-size: 11px; fill: #555; }

.bubble { max-width: 82%; padding: 12px 14px; border-radius: 18px; background: var(--field); white-space: pre-wrap; word-break: break-word; }
.bubble.mine { align-self: flex-end; background: #fff0ec; }
.thread { display: flex; flex-direction: column; gap: 10px; }
/* メッセージの画像（会長指示 2026-11-17） */
.msg-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 6px 0; }
.msg-images a { display: block; }
.msg-images img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; background: var(--field); }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #333; color: #fff; padding: 12px 18px; border-radius: 16px; z-index: 50; max-width: 90vw; font-size: 15px; }
.toast.err { background: var(--ng); }

/* 運営の管理画面（パソコン） */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: #3b4a46; color: #fff; padding: 20px 14px; display: flex; flex-direction: column; gap: 6px; }
.side button { color: #dfe8e5; text-align: left; padding: 10px 12px; border-radius: 12px; min-height: 44px; }
.side button[aria-current="page"] { background: rgba(255,255,255,.14); color: #fff; font-weight: bold; }
.content { padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; background: #f6f7f8; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eef0f2; font-size: 14px; vertical-align: top; }
th { background: #f2f5f4; font-weight: bold; color: #555; }
.kyc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.kyc-grid figure { background: #fff; border-radius: 14px; padding: 8px; border: 1px solid #e5e7ea; }
.kyc-grid img { width: 100%; display: block; border-radius: 10px; }
.kyc-grid figcaption { font-size: 13px; color: #555; margin-top: 4px; }
@media (max-width: 760px) { .admin-layout { grid-template-columns: 1fr; } .side { flex-direction: row; overflow-x: auto; } }
/* 撮影場所の登録：Googleマップ・ストリートビュー（依頼者の画面だけで使う。c/map.js） */
.place-map { height: 260px; border-radius: 16px; overflow: hidden; background: var(--field); }
.place-pano { height: 220px; border-radius: 16px; overflow: hidden; background: var(--field); }
.place-frame { width: 100%; height: 560px; border: 0; border-radius: 16px; background: var(--field); }
body.map-frame { margin: 0; padding: 0; background: transparent; }

/* 規約類の公開ページ（terms.html・privacy.html・tokushoho.html。scripts/build-legal.mjs が生成） */
.app.doc { max-width: 760px; }
.brand-link { color: var(--ink); text-decoration: none; }
.legal { gap: 14px; padding-bottom: 48px; }
.legal h1 { font-size: 22px; line-height: 1.4; }
.legal h2 { font-size: 18px; line-height: 1.5; margin-top: 18px; padding-left: 10px; border-left: 4px solid var(--coral); scroll-margin-top: 80px; }
.legal h3 { font-size: 16px; margin-top: 8px; }
.legal h4 { font-size: 15px; color: var(--lav-ink); }
.legal p, .legal li { font-size: 15px; line-height: 1.85; overflow-wrap: anywhere; }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.legal-list, .legal-bullets { padding-left: 1.6em; display: flex; flex-direction: column; gap: 6px; }
.legal-sub { padding-left: 1.2em; margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.legal-sub.plain { list-style: none; padding-left: .4em; }
.legal-note { background: var(--field); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 16px; }
.legal-table { min-width: 100%; border-radius: 0; }
.legal-table th, .legal-table td { font-size: 14px; line-height: 1.7; min-width: 6.5em; }
.legal-table tbody th { background: #fafbfb; white-space: normal; }
.legal-toc { background: var(--field); border-radius: 20px; padding: 14px 18px; }
.legal-toc-title { font-weight: bold; margin-bottom: 4px; }
.legal-toc ul { list-style: none; columns: 1; }
.legal-toc li { font-size: 14px; line-height: 1.9; }
.legal-nav { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 12px; }
.legal-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.legal-nav li { font-size: 14px; }
.legal-nav [aria-current="page"] { font-weight: bold; color: var(--ink); }
@media (min-width: 640px) { .legal-toc ul { columns: 2; column-gap: 28px; } .legal h1 { font-size: 26px; } }

/* モデルの写真ページ：透かしの見本 */
.wm-sample { margin: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.wm-sample img { width: 240px; max-width: 70%; height: auto; border-radius: 16px; -webkit-user-drag: none; user-select: none; pointer-events: none; }
