/* ==========================================================
   画面ごとの部品（Claudデザインの screens/*.html の <style> から集めたもの）
   match.css はデザインから受け取ったまま使い、ここで足りない部品を足す
   ========================================================== */

/* 共通 */
.back{display:inline-flex; align-items:center; gap:2px; font-weight:700; color:var(--sub)!important; text-decoration:none!important; height:32px; align-self:flex-start}
.unit{position:relative}
.unit span{position:absolute; right:14px; top:13px; font-weight:800; color:var(--sub)}
.li .t{font-weight:800}
.li .s{font-size:13px; color:var(--sub); font-weight:500}
.opt-row{display:flex; align-items:center; gap:10px; padding:12px 14px; border:1.5px solid var(--border-strong); border-radius:12px; font-weight:700; background:var(--surface); cursor:pointer}
.opt-row input{width:22px; height:22px; accent-color:var(--p); margin:0}
.opt-row:has(input:checked){border-color:var(--p); background:var(--p-soft)}
.opt-row.disabled{opacity:.5; cursor:not-allowed}
.search{position:relative}
.search .ic{position:absolute; left:14px; top:15px; color:var(--sub)}
.search .input{padding-left:42px}

/* 01 ログイン */
.feat{display:flex; gap:12px; align-items:flex-start}
.feat .fi{width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:var(--p-soft); color:var(--p-text); flex:none}
.feat b{display:block; font-size:16px}
.feat span{font-size:14px; color:var(--sub)}

/* 08 予約掲示板 */
.rc .when{display:flex; flex-direction:column; gap:2px; font-weight:800; font-size:15px}
.rc .when span{display:flex; gap:6px; align-items:center}
.tags{display:flex; flex-wrap:wrap; gap:6px}
.tag{display:inline-flex; align-items:center; gap:4px; height:28px; padding:0 10px; border-radius:8px; background:var(--surface-2); font-size:13px; font-weight:700}
/* 画面の右下のチャットのボタン（v2.19）。タブバーのすぐ上に浮かせる */
.chatfab{position:fixed; right:max(16px, calc(50% - 224px)); bottom:calc(84px + env(safe-area-inset-bottom)); z-index:5; width:56px; height:56px; border-radius:50%; display:grid; place-items:center; background:var(--p); color:var(--p-ink); box-shadow:0 8px 24px rgba(20,20,40,.28); text-decoration:none!important}
/* リンクの色（青）に負けないよう、アイコンを白にする */
.app a.chatfab{color:var(--p-ink)}
.chatfab[hidden]{display:none}
.chatfab .ic{width:26px; height:26px}
.chatfab .cnt{position:absolute; top:-4px; right:-4px}
.chatfab:active{transform:scale(.96)}
/* ボタンが一番下の内容に重ならないよう、タブバーがある画面は下を空ける */
.shell:has(.chatfab:not([hidden])) .main{padding-bottom:88px}
/* 登録の直後の「通知を ON にしてください」（S22。v2.27） */
.pushhero{display:flex; flex-direction:column; align-items:center; gap:10px; text-align:center; padding:22px 18px; border-radius:var(--r-l); background:var(--p-soft); border:2px solid var(--p)}
.pushhero.done{background:var(--ok-bg); border-color:transparent}
.pushhero .bell{width:64px; height:64px; border-radius:50%; display:grid; place-items:center; background:var(--p); color:var(--p-ink)}
.pushhero .bell .ic{width:32px; height:32px}
.pushhero .step{font-size:13px; font-weight:800; color:var(--p-text)}
.pushhero .why{list-style:none; margin:4px 0 0; padding:0; display:flex; flex-direction:column; gap:8px; text-align:left; font-size:14px; line-height:1.5}
.pushhero .why li{display:flex; gap:8px; align-items:flex-start}
.pushhero .why .ic{flex:none; margin-top:3px; color:var(--p-text)}
/* 公式 LINE の友だち追加の案内（S24。v2.29）。LINE の緑にする */
.pushhero.line{background:var(--ok-bg); border-color:var(--line)}
.pushhero.line.done{border-color:transparent}
.pushhero.line .bell{background:var(--line); color:#fff}
.pushhero.line .step, .pushhero.line .why .ic{color:var(--ok)}
/* チャットの一覧とチャットのあいだの、横のスライド（v2.24） */
@keyframes slide-from-right{from{transform:translateX(100%)} to{transform:none}}
@keyframes slide-from-left{from{transform:translateX(-100%)} to{transform:none}}
.main.slide-fwd{animation:slide-from-right .24s cubic-bezier(.2,.8,.2,1)}
.main.slide-back{animation:slide-from-left .24s cubic-bezier(.2,.8,.2,1)}
/* スライドのあいだ、画面の外にはみ出した分で横にスクロールしないようにする */
.shell.sliding{overflow-x:clip}
/* チャットの一覧 */
.talk{align-items:flex-start}
.talk .grow{min-width:0}
.talk .t{display:flex; gap:8px; align-items:baseline}
.talk .nm{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.talk .when{flex:none; font-size:12px; color:var(--sub); font-weight:500}
.talk .pv{display:flex; gap:8px; align-items:center; margin-top:2px; font-size:14px; color:var(--sub); font-weight:500}
.talk .pv.new{color:var(--text); font-weight:700}
.talk .pv .tx{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.talk .pv .cnt{flex:none; box-shadow:none}
/* 「募集する」は、チャットのボタンの左に並べる（重ならないように。2026-11-25 実機で発生） */
.fab{position:fixed; right:calc(max(16px, calc(50% - 224px)) + 68px); bottom:calc(84px + env(safe-area-inset-bottom)); box-shadow:0 8px 24px rgba(20,20,40,.25); border-radius:28px; height:56px; padding:0 22px; z-index:5}

/* 09 募集の作成 */
.slot{display:grid; grid-template-columns:28px minmax(0,1.3fr) minmax(0,1fr) 44px; gap:8px; align-items:center}
.slot b{width:28px; height:28px; border-radius:50%; background:var(--p-soft); color:var(--p-text); display:grid; place-items:center; font-size:13px}
.slot .input,.deadline .input{padding:0 10px}
.deadline{display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); gap:8px}
/* iPhone の日付・時刻の欄は、中身に合わせた最小の幅を持ち、枠からはみ出す。幅を枠に合わせる */
.slot input[type=date],.slot input[type=time],.deadline input[type=date],.deadline input[type=time]{
  min-width:0; max-width:100%; display:block; -webkit-appearance:none; appearance:none}
.group{display:flex; flex-direction:column; gap:18px}
.group-t{font-size:13px; font-weight:800; color:var(--sub); letter-spacing:.05em}

/* 14 マイバトル */
.bt{display:grid; grid-template-columns:64px minmax(0,1fr) auto; gap:12px; align-items:center}
.date{border-radius:12px; background:var(--plan-bg); color:var(--plan); text-align:center; padding:6px 0; line-height:1.2}
.date b{display:block; font-size:22px; font-weight:900}
.date small{font-size:12px; font-weight:800}
.chatbtn{position:relative; background:var(--surface-2)}
.chatbtn .cnt{position:absolute; top:-6px; right:-6px}
.card.link{text-decoration:none!important; color:inherit!important}

/* 15 予約バトルの詳細 */
.hero{background:var(--plan-bg); color:var(--plan); border-radius:20px; padding:18px; display:flex; flex-direction:column; gap:6px}
.hero .big{font-size:28px; font-weight:900; color:var(--text); line-height:1.25}
.hero.cx{background:var(--surface-2); color:var(--sub)}
.hero.cx .big{text-decoration:line-through; color:var(--sub)}
.hero .st{align-self:flex-start; background:var(--surface)}

/* 16 チャット */
.main.flush{padding:0; gap:0}
.chd{display:flex; align-items:center; gap:8px; padding:8px 12px 8px 4px; background:var(--surface); border-bottom:1px solid var(--border); position:sticky; top:60px; z-index:3}
.chd .t{font-weight:900; font-size:16px; line-height:1.3}
.chd .s{font-size:12px; color:var(--sub)}
.note{display:flex; gap:6px; align-items:center; justify-content:center; font-size:12px; color:var(--sub); padding:8px 12px; background:var(--surface-2)}
.chat{min-height:50vh}
.composer{position:sticky; bottom:0; padding-bottom:calc(12px + env(safe-area-inset-bottom))}
.bubble{white-space:pre-wrap; word-break:break-word}

/* 17 マイページ */
.plan{border-radius:20px; padding:18px; display:flex; flex-direction:column; gap:10px; border:1.5px solid var(--border); background:var(--surface)}
.plan.paid{border:2px solid var(--p)}
.plan.expiring{border-color:var(--warn-border)}
.plan .pn{font-size:20px; font-weight:900; display:flex; align-items:center; gap:8px}
.price{font-size:26px; font-weight:900}
.price small{font-size:13px; font-weight:700; color:var(--sub)}
.invite{background:var(--surface-2); border-radius:12px; padding:12px; font-family:ui-monospace,Menlo,monospace; font-size:13px; word-break:break-all; color:var(--sub)}

/* 18 クリエイターの切り替え */
.sw-row{display:flex; align-items:center; gap:12px; padding:12px 16px; min-height:64px; border:0; border-bottom:1px solid var(--border); background:transparent; width:100%; font:inherit; color:var(--text); text-align:left; cursor:pointer}
.sw-row:last-child{border-bottom:0}
.sw-row .t{font-weight:800}
.sw-row[aria-current="true"]{background:var(--p-soft)}
.sw-row[aria-current="true"] .chk{color:var(--p-text)}
.role{font-size:12px; font-weight:800; padding:1px 8px; border-radius:6px}
.role.own{background:var(--p-soft); color:var(--p-text)}
.role.mod{background:var(--wait-bg); color:var(--wait)}

/* 19 管理画面（PC 向け） */
.adm{width:100%; min-height:100vh; background:var(--bg); display:flex; flex-wrap:wrap; align-items:stretch}
.adm .side{flex:1 1 220px; max-width:260px; background:var(--surface); border-right:1px solid var(--border); padding:20px 12px; display:flex; flex-direction:column; gap:4px}
.adm .side a{display:flex; align-items:center; gap:10px; height:44px; padding:0 12px; border-radius:10px; color:var(--text); text-decoration:none; font-weight:700; font-size:15px}
.adm .side a[aria-current="page"]{background:var(--p-soft); color:var(--p-text)}
.adm .side a .cnt{margin-left:auto}
.adm .content{flex:999 1 560px; min-width:0; padding:28px clamp(16px,3vw,40px); display:flex; flex-direction:column; gap:24px; max-width:1200px}
.kpis{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px}
.kpi{background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:18px; display:flex; flex-direction:column; gap:8px}
.kpi .l{font-size:14px; font-weight:800; color:var(--sub); display:flex; gap:6px; align-items:center}
.kpi .v{font-size:32px; font-weight:900; line-height:1.1; font-variant-numeric:tabular-nums}
.kpi .v small{font-size:15px; color:var(--sub); font-weight:700}
.meter{height:10px; border-radius:5px; background:var(--surface-2); overflow:hidden}
.meter i{display:block; height:100%; background:var(--wait)}
.panel{background:var(--surface); border:1px solid var(--border); border-radius:16px; overflow:hidden}
.panel-hd{display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; padding:16px 18px; border-bottom:1px solid var(--border)}
.panel-hd h2{font-size:18px; font-weight:900; margin:0}
.tbl-wrap{overflow-x:auto}
.adm table{width:100%; border-collapse:collapse; font-size:14px; min-width:760px}
.adm th{text-align:left; font-size:13px; color:var(--sub); font-weight:800; padding:10px 14px; background:var(--surface-2); white-space:nowrap}
.adm td{padding:12px 14px; border-top:1px solid var(--border); vertical-align:middle}
.adm td .btn-sm{height:36px; font-size:13px; padding:0 10px}
.acts{display:flex; gap:6px; flex-wrap:wrap}
.adm .search{flex:1 1 220px; max-width:320px}
.adm .search .ic{left:12px; top:13px}
.adm .search .input{padding-left:38px; height:46px}

/* 20 法務ページ */
.doc{background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:20px; display:flex; flex-direction:column; gap:14px; line-height:1.8}
.doc h2{font-size:17px; font-weight:800; margin:8px 0 0; padding-top:14px; border-top:1px solid var(--border)}
.doc h2:first-of-type{border-top:0; padding-top:0; margin-top:0}
.doc p{font-size:15px; color:var(--text)}
.doc ol{margin:0; padding-left:1.5em; display:flex; flex-direction:column; gap:6px; font-size:15px}
.doc .dl{font-size:14px; line-height:1.7}
.doc .dl dd{overflow-wrap:anywhere}
