:root { --blue:#1f5fa8; --green:#3c9a3c; --red:#c0392b; --bg:#f4f6f8; --card:#fff; --text:#1a1a1a; --sub:#666; --line:#ccc; }
@media (prefers-color-scheme: dark) {
  :root { --bg:#16191d; --card:#22262c; --text:#eee; --sub:#aaa; --line:#444; }
}
* { box-sizing:border-box; }
body { margin:0; font-family:-apple-system,"Hiragino Sans","Noto Sans JP",sans-serif; background:var(--bg); color:var(--text); padding-bottom:40px; }
header { position:sticky; top:0; background:var(--bg); padding:12px 12px 8px; z-index:1; }
h1 { font-size:20px; margin:0 0 8px; }
h2 { font-size:18px; margin:0 0 12px; }
input, textarea { width:100%; font-size:17px; padding:10px; border:1px solid var(--line); border-radius:10px; background:var(--card); color:var(--text); }
#search { font-size:18px; }
#status { padding:4px 16px 8px; color:var(--sub); font-size:15px; }
.card, .panel { background:var(--card); margin:0 12px 16px; padding:16px; border-radius:14px; box-shadow:0 1px 3px rgba(0,0,0,.12); }
.name { font-size:24px; font-weight:bold; }
.code { color:var(--sub); font-size:14px; margin-top:2px; }
.row { display:flex; align-items:center; gap:8px; margin-top:12px; }
.call { flex:1; display:block; text-decoration:none; color:#fff; background:var(--blue); border-radius:10px; padding:12px; }
.call .lbl { font-size:14px; opacity:.9; }
.call .num { font-size:22px; font-weight:bold; letter-spacing:1px; }
button { font-size:16px; border-radius:10px; padding:12px; border:1px solid var(--sub); background:transparent; color:var(--text); }
.copy { min-width:64px; }
.ky { display:block; text-align:center; text-decoration:none; color:#fff; background:var(--green); border-radius:10px; padding:14px; font-size:18px; font-weight:bold; margin-top:12px; }
.addr { color:var(--sub); font-size:14px; margin-top:12px; }
.navs { display:flex; gap:8px; margin-top:6px; }
.nav { flex:1; display:block; text-align:center; text-decoration:none; color:#fff; border-radius:10px; padding:10px 8px; font-size:18px; font-weight:bold; white-space:nowrap; }
.nav .lbl { font-size:13px; font-weight:normal; opacity:.9; }
.nav.apple { background:#555; }
.nav.google { background:#1a73e8; }
.mapTools { display:flex; gap:8px; margin:-2px 0 8px; }
.mapTools button { flex:1; font-size:15px; padding:10px 6px; }
#mapBox, .mapBox { height:300px; border-radius:10px; margin-bottom:8px; z-index:0; }
/* 地図を画面いっぱいに広げたとき（下の帯の分だけ地図の下をあける） */
#mapBox.mapFull, .mapBox.mapFull { position:fixed !important; top:0; left:0; right:0; bottom:calc(118px + env(safe-area-inset-bottom)); height:auto; margin:0; border-radius:0; z-index:1000; }
.mapFullBar { position:fixed; left:0; right:0; bottom:0; height:calc(118px + env(safe-area-inset-bottom)); padding:6px 12px calc(8px + env(safe-area-inset-bottom)); background:var(--card); z-index:1001; box-shadow:0 -1px 4px rgba(0,0,0,.2); }
.mapFullBar .msg { margin:0 0 6px; font-size:14px; min-height:36px; max-height:40px; overflow:hidden; }
.mapFullBar .mapTools { margin:0; }
.mapFullBar .main { margin-top:0; font-size:16px; }
.mapBigBtn { background:#fff; color:#1a1a1a; border:2px solid rgba(0,0,0,.3); font-size:16px; font-weight:bold; padding:8px 10px; }
body.noScroll { overflow:hidden; }
/* 写真で登録したときに「今いる場所を住所にしますか？」と聞く枠 */
.askBox { margin-top:10px; padding:12px; border:2px solid #e07b00; border-radius:12px; font-size:16px; font-weight:bold; }
.askBox .mapTools { margin:10px 0 0; }
.askBox .main { margin-top:0; }
.tools { display:flex; gap:8px; margin-top:12px; }
.tools button { flex:1; font-size:15px; }
.del { color:var(--red); border-color:var(--red); }
.main { width:100%; background:var(--blue); color:#fff; border:none; font-size:18px; font-weight:bold; margin-top:12px; }
label { display:block; font-size:14px; color:var(--sub); margin-bottom:10px; }
label input { margin-top:4px; }
.filebtn { text-align:center; border:1px dashed var(--green); color:var(--green); border-radius:10px; padding:12px; font-size:16px; }
.msg { font-size:15px; margin-top:8px; white-space:pre-wrap; }
.note { color:var(--sub); font-size:13px; margin:0 16px; }
.help { margin-top:4px; font-size:15px; line-height:1.6; }
.help summary { font-size:17px; font-weight:bold; cursor:pointer; }
.help h3 { font-size:16px; margin:16px 0 4px; }
.help p { margin:4px 0; }
.help ul, .help ol { margin:4px 0; padding-left:20px; }
.help li { margin-bottom:4px; }
.warn { color:var(--red); }
.banner { margin-top:8px; background:var(--red); color:#fff; border-radius:10px; padding:10px 12px; font-size:16px; line-height:1.5; }
.need { color:var(--red); font-weight:bold; }
.need input { border:2px solid var(--red); }
.needNote { display:block; color:var(--red); font-size:15px; font-weight:bold; margin-top:2px; }
.homebar { padding:10px 12px; }
.homeRow { display:flex; align-items:center; gap:8px; }
.homeTitle { font-weight:bold; font-size:16px; white-space:nowrap; }
.homeRow button { flex:1; padding:10px 6px; font-size:16px; font-weight:bold; }
.homeForm { border-top:1px solid var(--line); margin-top:10px; padding-top:6px; }
.homeForm h3 { font-size:16px; margin:6px 0; }
.note0 { color:var(--sub); font-size:13px; margin:6px 0; }
.exitCall { display:block; color:#fff; text-decoration:none; padding:4px 0; }
.exitCall + .exitCall { border-top:1px solid rgba(255,255,255,.4); margin-top:4px; padding-top:8px; }
.exitGo { display:block; font-weight:bold; text-decoration:underline; }
/* 「＋ 現場を追加」：画面の右下に浮かせる。一覧の一番下はボタンに隠れないよう余白をあける */
.fab { position:fixed; right:16px; bottom:calc(20px + env(safe-area-inset-bottom)); z-index:5; border:none; border-radius:28px; padding:14px 20px; background:#e07b00; color:#fff; font-size:18px; font-weight:bold; box-shadow:0 3px 10px rgba(0,0,0,.3); }
#listScreen { padding-bottom:80px; }
.linkbtn { border:none; padding:8px 0 0; font-size:14px; color:var(--blue); text-decoration:underline; background:transparent; }
.back { display:block; margin:12px; border:none; padding:8px 4px; font-size:17px; font-weight:bold; color:var(--blue); background:transparent; }
.flash { margin:8px 12px 0; padding:10px 12px; border-radius:10px; background:var(--green); color:#fff; font-size:15px; white-space:pre-wrap; }
.mapFull .mapBigBtn:first-child { display:none; }
.leaflet-top.leaflet-right .mapBigBtn + .mapBigBtn { margin-top:8px; }
/* 駐車場の画面：登録ずみの駐車場の並び */
.parkItem { padding: 10px 0; border-bottom: 1px solid #ccc8; }
.parkItem .tools { margin-top: 6px; }
#parkHere { width: 100%; margin-bottom: 6px; }
/* 現場のカードの駐車場：たたんだ形。押すと開く */
.parks { margin-top: 10px; border: 1px solid #ccc8; border-radius: 10px; padding: 8px 10px; }
.parks summary { font-weight: bold; font-size: 17px; padding: 4px 0; }
.parkCard { padding: 8px 0; border-bottom: 1px solid #ccc8; font-size: 15px; }
.parkName { font-weight: bold; margin-bottom: 2px; }
.parkBtn { width: 100%; margin-top: 10px; }

/* 駐車場を保存した直後の「LINEで知らせる」 */
.notify { margin:0 0 12px; padding:10px; border:2px solid #06c755; border-radius:10px; background:#f0fff4; }
.notify .main { width:100%; margin:8px 0 6px; }
/* 注意事項：カードの名前のすぐ下に黄色で出す */
.notice { margin-top:10px; padding:10px 12px; background:#fff4c2; color:#5a4300; border:2px solid #e0b000; border-radius:10px; font-size:16px; font-weight:bold; line-height:1.5; }
.notice .note0 { font-weight:normal; color:#7a6420; }
.notesBox { margin-bottom:10px; border:1px solid var(--line); border-radius:10px; padding:10px; }
.notesBox summary { font-size:15px; font-weight:bold; color:#a07800; }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }
.chips button { font-size:14px; padding:8px 10px; }
/* 時刻前の入場の確認の枠（版19） */
.earlyBack { position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:2000; display:flex; align-items:center; justify-content:center; padding:16px; }
.earlyBox { background:var(--card); color:var(--text); border-radius:14px; padding:18px 16px; width:100%; max-width:420px; box-shadow:0 4px 16px rgba(0,0,0,.4); }
.earlyText { margin:0 0 14px; font-size:17px; line-height:1.6; }
.earlyCall { text-align:center; font-size:19px; font-weight:bold; padding:16px 12px; }
.earlyNo { display:block; width:100%; margin-top:12px; font-size:17px; padding:14px; }
