/* 初期画面（workspaces/start。デザイン案 start/02「地図が入口」）。左＝「続きから」だけ、右＝地図の上に「場所から始める」と作業の札。
   縦に積む幅（900px 未満）では、地図の上の札は左の欄（.sta-left）の頭に出る。class の頭は .sta-（.st-* は照合の状態）。色は tokens.css の変数だけ。
   左の欄の幅（細く・つまみ無し）は作業の画面の split() が決める（css/shell.css の data-resizable="false"）。 */

/* ---------------------------------------------------------------- 左の欄: 続きから */
.sta-left { padding: 22px 28px 28px; background: var(--bg-1); }
.sta-left > * { flex: none; }
.sta-sh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.sta-sh h2 { font-size: 17px; }
.sta-all { font-size: 13px; }
.sta-plans { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sta-plan { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; width: 100%; padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg-1); color: var(--fg-0); text-align: left; line-height: 1.55; }
.sta-plan:hover { border-color: var(--sel); background: var(--sel-soft); }
.sta-no { display: grid; place-items: center; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%; background: var(--sel); color: var(--on-sel); font-size: 13px; font-weight: 700; line-height: 1; }
.sta-no.off { border: 1.5px dashed var(--rule-2); background: var(--bg-1); color: var(--fg-2); }
.sta-pt { display: flex; flex-direction: column; min-width: 0; }
.sta-pt > b { font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.sta-m { font-size: 13px; color: var(--fg-2); }
/* T16 第3回 UI-3: 計算した時刻（同じ名前・同じ期間の計画を見分ける） */
.sta-at { font-size: 13px; margin-left: 8px; white-space: nowrap; }
.sta-r { display: flex; align-items: baseline; gap: 4px; margin-top: 4px; font-size: 13px; font-weight: 700; line-height: 1.45; color: var(--fg-1); }
.sta-r > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sta-r.ok { color: var(--ok-bar); }
.sta-r.no { color: var(--no-bar); }
.sta-r.part { color: var(--fg-0); }
.sta-r.none { font-weight: 500; }
.sta-r.mute { font-weight: 400; color: var(--fg-2); }
.sta-kind { padding: 1px 8px; border-radius: var(--r-s); background: var(--bg-2); color: var(--fg-1); font-size: 13px; white-space: nowrap; }
.sta-plan:hover .sta-kind { background: var(--bg-1); }
.sta-none { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: 10px; font-size: 13.5px; line-height: 1.7; color: var(--fg-2); }

/* ---------------------------------------------------------------- 地図の上に重ねる層（札の置き場。地図は札の外で押せる） */
.sta-ov { position: absolute; inset: 0; z-index: 5; pointer-events: none; container: sta / size; }
.sta-ov > * { pointer-events: auto; }
.sta-ov > .sta-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; background: linear-gradient(to bottom, transparent, var(--bg-0) 62%); opacity: .92; pointer-events: none; }

/* ---------------------------------------------------------------- 場所から始める（地図の上。真ん中の上） */
.sta-finder { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); width: 540px; max-width: calc(100% - 230px); max-height: calc(100% - 40px); overflow-y: auto;
  padding: 16px 18px 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg-1); box-shadow: var(--sh-2); }
.sta-finder h2 { margin: 0 0 8px; font-size: 17px; line-height: 1.5; }
.sta-finder .psform { min-height: 48px; padding: 0 6px 0 14px; border-radius: 10px; gap: 10px; }
.sta-finder .psform .psgo { min-height: 36px; padding: 0 16px; border-radius: var(--r-m); font-size: 14px; }
.sta-hint { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--fg-2); }
.sta-picked { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 3px 4px 3px 12px; border: 1px solid var(--sel); border-radius: 10px; background: var(--sel-soft); font-size: 14px; line-height: 1.5; }
.sta-pn { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; font-weight: 700; color: var(--fg-0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sta-dot { flex: none; width: 14px; height: 14px; border: 3px solid var(--bg-1); border-radius: 50%; background: var(--sel); box-shadow: 0 0 0 2px var(--sel); }
.sta-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.sta-rc { display: inline-grid; place-items: center; margin-right: 2px; color: var(--fg-2); }      /* 前に使った場所の印（T21: 字の代わり） */
.sta-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--bg-1); color: var(--fg-0); font-size: 13px; white-space: nowrap; }
.sta-chip:hover { border-color: var(--sel); background: var(--sel-soft); }

/* ---------------------------------------------------------------- 作業の札（地図の上。下に並べる。入り切らない幅では横に送る） */
.sta-entry { position: absolute; left: 20px; right: 20px; bottom: 30px; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(236px, 400px)); justify-content: safe center;
  gap: 16px; padding: 4px 4px 12px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.sta-ec { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px 18px 18px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg-1); box-shadow: var(--sh-2); }
.sta-ec:hover { border-color: var(--sel); }
.sta-eh { display: flex; align-items: center; gap: 12px; }
.sta-eico { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 11px; background: var(--sel-soft); color: var(--sel); }
.sta-eico .i { width: 24px; height: 24px; }
.sta-eh h3 { font-size: 19px; line-height: 1.3; }
/* 汎用の照らす日の札（T16 第7回・g1。T21 から札の説明の文を出さないので、題の右に小さな札で） */
.sta-eday { flex: none; margin-left: auto; padding: 2px 8px; border-radius: var(--r-s); background: var(--sel-soft); color: var(--fg-0); font-size: 13px; white-space: nowrap; }
.sta-conds { display: flex; flex-wrap: wrap; gap: 6px; }
.sta-conds span { padding: 2px 8px; border-radius: var(--r-s); background: var(--bg-2); color: var(--fg-1); font-size: 13px; line-height: 1.5; white-space: nowrap; }
.sta-conds span b { color: var(--fg-0); }
.sta-eb { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 2px; }
.sta-eb .sta-go { flex: 1 1 auto; min-height: 44px; padding: 0 14px; font-size: 15px; }
.sta-eb .sta-go .i { width: 16px; height: 16px; }
.sta-eb .sta-sub { flex: 0 1 auto; min-height: 44px; padding: 0 14px; font-size: 13px; font-weight: 700; color: var(--fg-1); }

/* 札が4つ以上の時（.many。T9 でドローン航路が足りて4つ）: 1枚を細く・字を少し小さくして、幅 1440 の画面の地図（約 990px）に横に送らずに並べる */
.sta-entry.many { grid-template-columns: repeat(var(--n, 4), minmax(204px, 320px)); gap: 12px; }
.sta-entry.many .sta-ec { padding: 14px 14px 16px; }
.sta-entry.many .sta-eh { gap: 10px; }
.sta-entry.many .sta-eico { width: 36px; height: 36px; border-radius: 9px; }
.sta-entry.many .sta-eico .i { width: 20px; height: 20px; }
/* 題（作業の名前）は、語の途中で折らない（T9 の点検 C1: 幅 1100 で「旅行・ツア／ー」「ドローン航／路」と折れた）。1行で入る幅は、列の幅の下限が守る */
.sta-entry.many .sta-eh h3 { font-size: 17px; white-space: nowrap; }
.sta-entry.many .sta-eb .sta-go { padding: 4px 10px; font-size: 14px; white-space: normal; line-height: 1.3; }

/* 地図が狭い・低いとき（幅 900px 未満か高さ 780px 未満の地図）: 札を低くして、札の間に地図と印が見える帯を残す（条件の短い札を畳む） */
@container sta (max-width: 899px) or (max-height: 779px) {
  .sta-entry { grid-template-columns: repeat(var(--n, 3), minmax(190px, 320px)); gap: 12px; }
  /* 札が4つ以上: 飾りの印を畳んで、題を1行で入れる（いちばん長い題「赤外線壁面調査」＝7字×17px＋左右の余白 28px＝147px）。列の幅の下限を
     158px にして、幅 1100 の画面の地図（740px）にも4枚を横に送らずに並べる（前は下限 176px で、4枚目が右で切れ、題が語の途中で折れた） */
  .sta-entry.many { grid-template-columns: repeat(var(--n, 4), minmax(158px, 320px)); gap: 10px; }
  .sta-entry.many .sta-eico { display: none; }
  .sta-ec { gap: 8px; padding: 12px 14px 14px; }
  .sta-conds { display: none; }
  /* T30（合わせた後）: ドローン航路の札が消えて 3 枚（.many でない）になり、幅 1024 の地図（約 660px）で汎用の札の題が「汎／用」と折れた
     （題の右の照らす日の札 .sta-eday が場所を取る）。題は折らず、入らない時は日の札を次の行へ送る */
  .sta-eh { gap: 10px; flex-wrap: wrap; }
  .sta-eico { width: 36px; height: 36px; border-radius: 9px; }
  .sta-eico .i { width: 20px; height: 20px; }
  .sta-eh h3 { font-size: 17px; white-space: nowrap; }
  .sta-eb .sta-go { padding: 4px 10px; font-size: 14px; white-space: normal; line-height: 1.3; }
  .sta-ov > .sta-fade { height: 34%; }
}

/* T47 txt（UI-11）: 地図の左下の出典の 1 行（map2d/geo.js の stageCredit が地図の置き場に z-index 4 で置く .geo-credit「国土地理院（標高タイルを加工）」）が、
   上の白いぼかし（.sta-fade。z-index 5 の .sta-ov の中）の下に隠れ、机の幅の初期画面ではほとんど読めなかった（地理院タイルの利用規約の出典の明示）。
   初期画面の間だけ、出典の 1 行をぼかしの上に出す（z-index は 1 行の style にあるので !important。押せない 1 行で、作業の札〈下から 30px〉とは重ならない） */
.shell[data-ws="start"] .geo-credit { z-index: 6 !important; }

/* ---------------------------------------------------------------- 地図の印: 選んだ場所（続きからの番号の印は css/stage.css の .wsmark のまま） */
.wsmark.sta-pick b { min-width: 0; width: 24px; height: 24px; padding: 0; border: 4px solid var(--bg-1); background: var(--sel); box-shadow: 0 0 0 2px var(--sel), var(--sh-2); }

/* ---------------------------------------------------------------- 縦に積む幅: 札は左の欄の頭（流れの中に置く） */
.sta-left .sta-finder { position: static; transform: none; width: auto; max-width: none; max-height: none; overflow: visible; margin: 0 0 14px; box-shadow: var(--sh-1); }
.sta-left .sta-entry { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); justify-content: stretch; gap: 12px; margin: 0 0 26px; padding: 0; overflow: visible; }
.sta-left .sta-ec { box-shadow: var(--sh-1); }

/* ---------------------------------------------------------------- スマホ 〜767: 押す所 44px */
@media (max-width: 767px) {
  .sta-left { padding: 16px 16px 28px; }
  .sta-finder { padding: 14px; }
  .sta-finder .psform { min-height: 54px; }
  .sta-finder .psform .psgo { min-height: 44px; }
  .sta-chip { height: 44px; }
  .sta-px { width: 44px; height: 44px; }
  .sta-all { display: inline-flex; align-items: center; min-height: 44px; }
  .sta-none .link { display: inline-flex; align-items: center; min-height: 44px; }
  .sta-eb { flex-direction: column; }
  .sta-eb .sta-go, .sta-eb .sta-sub { width: 100%; }
  .sta-plan { padding: 12px; }
}
