/* 3案共通の土台（リセット・構造のみ。色や形は各デザインで決める） */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100svh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 1.2em; height: 1.2em; flex: none; }

/* 選択部品：input は見えなくして、隣の span を装飾する */
.chip, .seg label, .card-opt, .agree, .d-toggle { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.chip input, .seg input, .card-opt input, .agree input, .d-toggle input {
  position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}
.chips { display: flex; flex-wrap: wrap; }
.chip > span { display: inline-flex; align-items: center; gap: .35em; user-select: none; }
.chips-cup .chip > span { display: flex; width: 100%; }
.chip-ic { width: 0; opacity: 0; transition: width .2s, opacity .2s; }
.chip input:checked + span .chip-ic { width: 1em; opacity: 1; }
.seg { display: flex; }
.seg label { flex: 1 1 0; min-width: 0; }
.seg span { display: flex; align-items: center; justify-content: center; text-align: center; user-select: none; }
.card-body { display: flex; align-items: center; }
.card-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.agree { display: flex; align-items: flex-start; }
.agree-box { flex: none; display: grid; place-items: center; }
.agree-box .ic { opacity: 0; transform: scale(.6); transition: .18s; }
.agree input:checked + .agree-box .ic { opacity: 1; transform: none; }
.f-unit { position: relative; }
.f-suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.f-select { position: relative; }
.f-select select { appearance: none; -webkit-appearance: none; width: 100%; }
.f-select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-70%) rotate(45deg); pointer-events: none; opacity: .6; }
.f-input { width: 100%; font-size: 16px; /* iOSの自動ズーム防止 */ }
.f-textarea { resize: vertical; min-height: 88px; line-height: 1.7; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; }
.f-row-stack { grid-template-columns: 1fr; }
.f-error:empty { display: none; }
.f-title:focus { outline: none; }

/* 年齢確認ゲート */
body.gate-open, body.sheet-open { overflow: hidden; }
.gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px 16px; transition: opacity .45s; }
.gate.is-leaving { opacity: 0; pointer-events: none; }
.gate-panel { width: 100%; max-width: 380px; text-align: center; }
.gate-actions { display: grid; gap: 10px; }

/* 管理画面：詳細シート */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; }
.sheet-panel { position: absolute; overflow-y: auto; overscroll-behavior: contain; transition: transform .32s cubic-bezier(.2,.8,.2,1); }
.sheet.is-open .sheet-backdrop { opacity: 1; }
.d-contact { display: flex; align-items: center; flex-wrap: wrap; }
.d-id { flex: 1 1 calc(100% - 90px); min-width: 0; overflow-wrap: anywhere; }
.d-btn { flex: 1 1 0; justify-content: center; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.d-toggle { display: flex; align-items: center; gap: 12px; }
.d-mail summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.d-mail summary::-webkit-details-marker { display: none; }
.d-mail pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.item { display: flex; width: 100%; text-align: left; align-items: center; }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-top, .item-sub, .item-tags { display: flex; align-items: center; flex-wrap: wrap; }
.item-sub i { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; margin: 0 7px; }
.item-side { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.tag { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.tag .ic { width: 1.05em; height: 1.05em; }
.avatar { display: grid; place-items: center; flex: none; }
.tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { white-space: nowrap; flex: none; }
.search { display: flex; align-items: center; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); }
.d-grid { display: grid; grid-template-columns: repeat(3, 1fr); }

/* 通知 */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; z-index: 200; pointer-events: none; transition: .25s; max-width: calc(100% - 32px); text-align: center; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
