/* ==========================================================
   style.css ― 見た目（色・配置・文字の大きさ）
   色を変えたいときは、下の :root の中を書き換えます。
   ========================================================== */

:root {
  /* ベースの色 */
  --bg: #f4f7fb;          /* 画面の背景（ほんのり青みのある白） */
  --card: #ffffff;
  --line: #e2e9f1;
  --text: #1d2f45;
  --text-2: #56687d;
  --muted: #8b9aac;

  /* 山過ブルー */
  --blue: #2f7fd8;
  --blue-d: #1a5fae;
  --blue-l: #eaf3fd;

  /* 左メニューのグラデーション */
  --nav-1: #176DAF;       /* 上 */
  --nav-2: #1A75B8;       /* 下 */
  --nav-active: #3C91D7;  /* 選択中メニュー */

  /* 客室状態の色（文字・線の色 / 背景色） */
  --in: #2f7fd8;       --in-bg: #e5f0fd;
  --out: #f07a3a;      --out-bg: #fff0e6;
  --stay: #2e9d62;     --stay-bg: #e3f5ea;
  --vac: #8795a6;      --vac-bg: #f1f4f7;
  --dirty: #e0574f;    --dirty-bg: #fdecea;
  --cleaning: #d69509; --cleaning-bg: #fdf4d8;
  --done: #139aa3;     --done-bg: #ddf4f5;

  /* 館内マップ */
  --wall: #3b4b5e;
  --common: #f2f5f9;

  --radius: 16px;
  --shadow: 0 1px 2px rgba(29, 47, 69, .04), 0 6px 20px rgba(29, 47, 69, .05);
  /* フォント（英数字も日本語と同じフォントで統一） */
  --font: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --num: var(--font);
  --hand: "Klee One", var(--font);   /* 装飾の手書き風文字だけに使用 */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
p { margin: 0; }
b, strong { font-weight: 600; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.ico { width: 18px; height: 18px; flex-shrink: 0; }
.muted { color: var(--muted); }
.up { color: var(--stay); font-weight: 500; }

/* 状態ごとの色（--c = 濃い色、--cb = 淡い色） */
.st-staying   { --c: var(--stay);     --cb: var(--stay-bg); }
.st-departing { --c: var(--out);      --cb: var(--out-bg); }
.st-arriving  { --c: var(--in);       --cb: var(--in-bg); }
.st-dirty     { --c: var(--dirty);    --cb: var(--dirty-bg); }
.st-cleaning  { --c: var(--cleaning); --cb: var(--cleaning-bg); }
.st-done      { --c: var(--done);     --cb: var(--done-bg); }
.st-vacant    { --c: var(--vac);      --cb: var(--vac-bg); }
.st-staff     { --c: #6b6fa8;         --cb: #eeeef6; }

/* ---------- 全体レイアウト ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }

/* ---------- 左側メニュー ---------- */
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--nav-1) 0%, var(--nav-2) 100%);
  color: #fff; overflow-y: auto; overflow-x: hidden;
}
.brand { padding: 30px 40px 26px; text-align: center; }
.brand-logo { display: block; width: 100%; max-width: 156px; height: auto; margin: 0 auto; }

.nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px; border-radius: 10px;
  font-size: 14.5px; font-weight: 500; color: #FFFFFF;
  transition: background .15s;
}
.nav-item .ico { width: 20px; height: 20px; }
.nav-item:hover { background: rgba(255, 255, 255, .1); }
.nav-item.is-active { background: var(--nav-active); color: #FFFFFF; font-weight: 500; box-shadow: 0 2px 8px rgba(10, 50, 100, .15); }
.nav-badge {
  margin-left: auto; font-style: normal; font-family: var(--num); font-size: 11px; font-weight: 500;
  background: #fff; color: var(--blue-d); border-radius: 99px; padding: 0 7px; line-height: 18px;
}
.sidebar-foot { margin-top: auto; position: relative; padding-top: 24px; text-align: center; }
.sidebar-art { display: block; width: 100%; height: auto; }
.sidebar-script {
  font-family: "Caveat", cursive; font-size: 21px; line-height: 1.05; text-align: left;
  transform: rotate(-8deg); margin: -34px 0 18px 26px; opacity: .95; position: relative;
}
.sidebar-script span { padding-left: 22px; }
.sidebar-tagline { font-size: 12.5px; letter-spacing: .1em; opacity: .95; }
.sidebar-en { font-family: var(--num); font-size: 10.5px; letter-spacing: .3em; opacity: .75; padding: 6px 0 22px; }

/* ---------- メイン ---------- */
.main { padding: 18px 32px 56px; min-width: 0; max-width: 1640px; }

.utilbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.search {
  display: flex; align-items: center; gap: 10px; width: min(560px, 100%);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; color: var(--muted);
}
.search input { border: 0; outline: 0; font: inherit; font-size: 13px; width: 100%; color: var(--text); background: none; }
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.util-right { display: flex; align-items: center; gap: 16px; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-2);
}
.icon-btn:hover { background: var(--card); }
.icon-btn .ico { width: 22px; height: 22px; }
.icon-btn em {
  position: absolute; top: 2px; right: 2px; font-style: normal;
  background: #e5484d; color: #fff; font-family: var(--num); font-size: 10px; font-weight: 600;
  min-width: 17px; height: 17px; border-radius: 99px; display: grid; place-items: center; border: 2px solid var(--bg);
}
.user { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #cfe3f8, #a7cbef); color: var(--blue-d); font-weight: 500;
}

/* ---------- ページタイトル ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 10px 0 18px; }
.page-title { display: flex; align-items: flex-start; gap: 14px; min-width: 0; padding-bottom: 6px; }
.title-icon { color: var(--blue); padding-top: 4px; }
.title-icon .ico { width: 40px; height: 40px; stroke-width: 1.9; }
.page-title h1 { font-size: 30px; font-weight: 700; margin: 0; letter-spacing: .04em; line-height: 1.3; }
.page-desc { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.page-desc b { color: var(--blue); }
.page-desc b.warn { color: var(--dirty); }

.page-deco { position: relative; display: flex; align-items: flex-end; flex-shrink: 0; }
.deco-mountain { width: 330px; height: 96px; display: block; }
.deco-text {
  position: absolute; left: 6px; top: -4px;
  font-family: var(--hand); font-weight: 600; font-size: 16px; line-height: 1.3; color: var(--blue);
  transform: rotate(-8deg);
}
.deco-text span { display: block; font-family: "Caveat", cursive; font-size: 17px; font-weight: 500; margin: 2px 0 0 18px; opacity: .85; }
.today-box { text-align: right; padding-left: 8px; }
.today-date { font-size: 14px; color: var(--blue-d); white-space: nowrap; }
.today-date b { font-family: var(--num); font-size: 20px; font-weight: 600; }
.today-weather { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 12.5px; color: var(--text-2); line-height: 1.35; margin-top: 4px; text-align: left; }
.today-weather .ico { width: 30px; height: 30px; color: #f0a52c; }

/* ---------- ダッシュボードのグリッド ---------- */
/* 12分割のマス目に、各カードを並べています。 */
.dashboard { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; align-items: start; }
.kpis, .area-sales { grid-column: span 12; }
.area-map { grid-column: span 7; align-self: stretch; display: flex; flex-direction: column; }
.area-side { grid-column: span 5; display: flex; flex-direction: column; gap: 20px; }
.area-tasks, .area-cleaning, .area-handovers { grid-column: span 4; align-self: stretch; }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 20px 22px; min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; margin: 0; }
.card-head h2 small { font-size: 12px; font-weight: 500; color: var(--muted); }
.h-icon { color: var(--blue); display: grid; }
.h-icon .ico { width: 24px; height: 24px; }
.more { font-size: 12.5px; color: var(--blue); display: inline-flex; align-items: center; gap: 4px; }
.more::after { content: "→"; }
.more:hover { text-decoration: underline; }

.bar { height: 6px; border-radius: 99px; background: #e8eef5; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--blue); }

/* ---------- 数字カード ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.kpi {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #fff 45%, var(--kb));
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 20px 14px; min-height: 112px;
}
.kpi-label { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 500; position: relative; z-index: 1; white-space: nowrap; }
.kpi-label .ico { width: 26px; height: 26px; color: var(--k); stroke-width: 2; }
.kpi-value { font-family: var(--num); font-size: 40px; font-weight: 700; line-height: 1.1; margin-top: 12px; position: relative; z-index: 1; white-space: nowrap; }
.kpi-value small { font-family: var(--font); font-size: 18px; font-weight: 500; margin-left: 2px; }
.kpi-value span { font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--text-2); margin-left: 4px; }
.kpi-mountain { position: absolute; right: -6px; bottom: -2px; width: 150px; height: 66px; }
.kpi-mountain .m-back { fill: var(--k); opacity: .13; }
.kpi-mountain .m-front { fill: var(--k); opacity: .2; }
.kpi-mountain .m-snow { fill: #fff; opacity: .9; }
.k-in   { --k: var(--in);   --kb: var(--in-bg); }
.k-out  { --k: var(--out);  --kb: var(--out-bg); }
.k-stay { --k: var(--stay); --kb: var(--stay-bg); }
.k-vac  { --k: var(--vac);  --kb: var(--vac-bg); }
.k-week { --k: #4a6fd8;     --kb: #e9eefc; }

/* ---------- 館内マップ（最重要） ---------- */
.updated { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.updated [data-icon] { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--blue-l); color: var(--blue); }
.updated .ico { width: 15px; height: 15px; }

/* 見取り図の配置：文字の並びがそのまま部屋の配置になっています */
.floor {
  display: grid;
  flex: 1;                            /* カードの高さいっぱいに広げる */
  grid-template-columns: repeat(6, 1fr) .6fr;
  grid-template-rows: minmax(76px, 1fr) minmax(76px, 1fr) minmax(140px, 1.8fr) minmax(170px, 2.4fr);
  grid-template-areas:
    "futago   futago   futago   laundry  shower   wash     lady"
    "futago   futago   futago   laundry  shower   wash     men"
    "entrance entrance entrance entrance tengu    tengu    hall"
    "amigasa  gongen   amida    aka      yoko     iou      hall";
  gap: 2px;
  background: var(--wall);            /* 隙間の色＝壁の線 */
  border: 3px solid var(--wall);
  border-radius: 6px;
  overflow: hidden;
}
/* 各部屋・共用スペースを、上の配置図のどこに置くか */
.a-futago { grid-area: futago; }   .a-tengu { grid-area: tengu; }
.a-amigasa { grid-area: amigasa; } .a-gongen { grid-area: gongen; }
.a-amida { grid-area: amida; }     .a-aka { grid-area: aka; }
.a-yoko { grid-area: yoko; }       .a-iou { grid-area: iou; }
.a-laundry { grid-area: laundry; } .a-shower { grid-area: shower; }
.a-wash { grid-area: wash; }       .a-lady { grid-area: lady; }
.a-men { grid-area: men; }         .a-entrance { grid-area: entrance; }
.a-hall { grid-area: hall; }

.map-room {
  position: relative;
  background: var(--cb);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 8px 6px; text-align: center; min-width: 0;
  cursor: default; transition: filter .15s;
}
.map-room:hover { filter: brightness(.97); box-shadow: inset 0 0 0 2px var(--c); }
.map-room.st-vacant { background: repeating-linear-gradient(135deg, #fff 0 8px, #f6f8fa 8px 16px); }
.mr-name { font-family: var(--num); font-size: 17px; font-weight: 600; letter-spacing: .04em; line-height: 1.1; }
.mr-type { font-family: var(--num); font-size: 9.5px; font-weight: 500; letter-spacing: .06em; color: var(--text-2); margin-top: -2px; }
.is-large .mr-name { font-size: 22px; }
.is-large .mr-type { font-size: 11px; }
.mr-guest {
  font-size: 12.5px; font-weight: 500; background: rgba(255, 255, 255, .85); border-radius: 6px;
  padding: 1px 6px; margin-top: 4px; line-height: 1.4;
}
.mr-guest b { font-family: var(--num); font-weight: 500; margin-left: 2px; }
.is-large .mr-guest { font-size: 14px; padding: 3px 12px; }
.mr-status {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--c); color: #fff; font-size: 11.5px; font-weight: 500;
  padding: 2px 9px 2px 7px; border-radius: 99px; white-space: nowrap;
}
.mr-status .ico { width: 13px; height: 13px; stroke-width: 2.2; }
.st-staff .mr-status { white-space: normal; border-radius: 10px; padding: 3px 8px; line-height: 1.3; max-width: 100%; }
.st-staff .mr-status .ico { display: none; }
.is-large .mr-status { font-size: 12.5px; padding: 3px 12px 3px 10px; }
.mr-sub { font-size: 11.5px; color: var(--text-2); line-height: 1.35; }
.mr-sub.strong { color: var(--c); font-weight: 500; }
.mr-ok { display: inline-flex; align-items: center; gap: 2px; color: var(--done); font-weight: 500; }
.mr-ok .ico { width: 12px; height: 12px; stroke-width: 2.6; }

.map-common {
  position: relative; background: var(--common);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--num); font-size: 12px; font-weight: 500; letter-spacing: .08em; color: #5d6f84;
}
.map-common .ico { width: 26px; height: 26px; stroke-width: 1.5; }
.map-common.a-lady, .map-common.a-men { flex-direction: row; gap: 4px; font-size: 11px; }
.map-common.a-lady .ico, .map-common.a-men .ico { width: 20px; height: 20px; }
.map-common.is-vertical span { writing-mode: vertical-rl; letter-spacing: .12em; }
.door-arc {
  position: absolute; left: 0; bottom: 0; width: 18px; height: 18px;
  border-top: 1.5px solid #9aabbf; border-right: 1.5px solid #9aabbf; border-top-right-radius: 18px;
}
.map-entrance { flex-direction: row; gap: 22px; font-size: 15px; background: #eef3f8; }
.door-arc.big { width: 30px; height: 30px; border-top-right-radius: 30px; left: 0; top: 0; bottom: auto; border-top: 0; border-bottom: 1.5px solid #9aabbf; border-radius: 0 0 30px 0; }
.shoe-rack { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 4px; }
.shoe-rack i { width: 13px; height: 18px; border: 1.5px solid #9aabbf; border-radius: 3px; }
.exit { display: inline-flex; align-items: center; gap: 6px; color: var(--stay); font-size: 22px; letter-spacing: 0; }
.exit .ico { width: 30px; height: 30px; }
.map-hall { background: #f8fafc; }
.map-hall span { writing-mode: vertical-rl; font-family: var(--font); font-weight: 500; color: #a7b4c3; letter-spacing: .4em; }

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 14px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.legend-item i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.legend-item b { font-family: var(--num); font-weight: 500; color: var(--text); }
.legend-item.is-zero { opacity: .45; }
.legend-hint { margin-left: auto; font-size: 11.5px; color: var(--muted); }

/* ---------- 本日の予約一覧 ---------- */
.tabs { display: flex; background: #f0f4f9; border-radius: 10px; padding: 3px; }
.tab { padding: 5px 14px; border-radius: 8px; font-size: 12.5px; color: var(--text-2); }
.tab.is-active { background: var(--blue); color: #fff; font-weight: 500; box-shadow: 0 2px 6px rgba(47, 127, 216, .3); }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--text-2); background: #f3f7fb; padding: 8px 7px; white-space: nowrap; }
.table td:not(.t-note) { white-space: nowrap; }
.table th:first-child { border-radius: 8px 0 0 8px; }
.table th:last-child { border-radius: 0 8px 8px 0; }
.table td { padding: 10px 7px; border-bottom: 1px solid #edf1f6; vertical-align: middle; font-size: 13px; }
.table tbody tr:hover { background: #f8fbfe; }
.table tr.is-gone td { color: var(--muted); }
.t-room { font-family: var(--num); font-weight: 500; font-size: 13px; letter-spacing: .03em; }
.t-name { font-weight: 500; }
.t-note { font-size: 12px; color: var(--text-2); min-width: 96px; line-height: 1.45; }
.table td:nth-child(n+2):nth-child(-n+5), .table th:nth-child(n+2):nth-child(-n+5) { padding-left: 5px; padding-right: 5px; }
.badge {
  display: inline-block; min-width: 60px; text-align: center; padding: 3px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 500; color: #fff; white-space: nowrap;
}
.b-in { background: var(--in); }
.b-out { background: var(--out); }
.b-stay { background: var(--stay); }
.b-gone { background: #c5cfda; }
.b-future { background: var(--blue-l); color: var(--blue-d); }
.channel { font-size: 12.5px; white-space: nowrap; }
.btn-outline {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px;
  border: 1.5px solid var(--blue); color: var(--blue); border-radius: 10px; padding: 10px; font-weight: 500; font-size: 13.5px;
}
.btn-outline:hover { background: var(--blue-l); }
.btn-outline .ico { width: 16px; height: 16px; }

.message-card {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, #fff 40%, #eaf3fd);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; min-height: 130px;
}
.message-card p { font-family: var(--hand); font-weight: 600; font-size: 14px; line-height: 1.8; color: var(--text-2); position: relative; z-index: 1; }
.message-card svg { position: absolute; right: 16px; bottom: 26px; width: 190px; }
.message-sign { position: absolute; right: 22px; bottom: 8px; font-family: var(--hand); font-size: 11.5px; color: var(--blue); }

/* ---------- 清掃・備品 ---------- */
.clean-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.clean-title { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.clean-title .ico { color: var(--blue); }
.clean-progress b { font-family: var(--num); font-size: 22px; font-weight: 600; white-space: nowrap; }
.clean-progress b small { font-size: 13px; color: var(--text-2); font-weight: 500; }
.clean-progress .bar { flex: 1; height: 8px; }
.clean-progress .bar i { background: var(--done); }
.clean-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.clean-list li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; background: var(--cb); }
.clean-no {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--c); color: #fff; font-family: var(--num); font-weight: 500; font-size: 13px;
}
.clean-no .ico { width: 14px; height: 14px; stroke-width: 2.6; }
.clean-main { flex: 1; min-width: 0; }
.clean-main b { font-family: var(--num); font-size: 15px; font-weight: 600; letter-spacing: .03em; margin-right: 6px; }
.clean-main p { font-size: 12px; color: var(--text-2); }
.mini-pill { font-size: 11px; font-weight: 500; color: var(--c); background: #fff; padding: 1px 8px; border-radius: 99px; }
.deadline { font-family: var(--num); font-size: 18px; font-weight: 600; color: var(--c); text-align: right; line-height: 1.1; }
.deadline small { display: block; font-family: var(--font); font-size: 10px; font-weight: 500; color: var(--text-2); }
.supply {
  display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line);
}
.supply:hover { background: #f8fbfe; }
.supply-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-l); color: var(--blue); flex-shrink: 0; }
.supply b { font-size: 13.5px; }
.supply p { font-size: 12px; color: var(--cleaning); }
.chev { margin-left: auto; color: var(--muted); }
.chev .ico { width: 16px; height: 16px; }

/* ---------- アクション管理 ---------- */
.chips { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px;
  font-size: 12.5px; background: #f0f4f9; color: var(--text-2);
}
.chip b { font-family: var(--num); font-weight: 500; }
.chip.is-active { background: var(--blue-d); color: #fff; }
.tasks, .handovers { list-style: none; margin: 0; padding: 0; }
.task { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid #edf1f6; }
.task:last-child { border-bottom: 0; }
.checkbox {
  width: 20px; height: 20px; border-radius: 6px; border: 2px solid #c3cdd8; background: #fff;
  display: grid; place-items: center; flex-shrink: 0; transition: .15s;
}
.checkbox:hover { border-color: var(--blue); }
.checkbox .ico { width: 13px; height: 13px; stroke-width: 3; }
.task.is-done .checkbox { background: var(--blue); border-color: var(--blue); color: #fff; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 500; font-size: 13.5px; }
.task-detail { font-size: 11.5px; color: var(--muted); }
.task.is-done .task-title { text-decoration: line-through; color: var(--muted); }
.task.is-done .prio { opacity: .4; }
.task-due { font-family: var(--num); font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.prio { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.p-urgent { background: var(--dirty-bg); color: var(--dirty); }
.p-today  { background: var(--in-bg); color: var(--in); }
.p-normal { background: #eef1f4; color: var(--text-2); }

/* ---------- 未対応事項・申し送り ---------- */
.handover {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-bottom: 8px;
  border-radius: 12px; background: #f8fafc; border: 1px solid #edf1f6; transition: opacity .25s, transform .25s;
}
.handover.is-important { background: #fff7f6; border-color: #f8dcd9; }
.handover.is-leaving { opacity: 0; transform: translateX(20px); }
.h-cat { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #fff; color: var(--blue); border: 1px solid var(--line); flex-shrink: 0; }
.h-cat .ico { width: 16px; height: 16px; }
.is-important .h-cat { color: var(--dirty); border-color: #f8dcd9; }
.h-main { flex: 1; min-width: 0; }
.h-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; flex-wrap: wrap; }
.h-tag { font-weight: 500; color: var(--text-2); }
.h-imp { background: var(--dirty); color: #fff; font-weight: 500; padding: 0 6px; border-radius: 4px; }
.h-title { font-weight: 500; font-size: 13.5px; margin-top: 1px; }
.h-detail { font-size: 12px; color: var(--text-2); }
.handover { position: relative; }
.h-meta { padding-right: 86px; }
.btn-done {
  position: absolute; top: 8px; right: 8px;
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--text-2); white-space: nowrap;
}
.btn-done .ico { width: 13px; height: 13px; }
.btn-done:hover { border-color: var(--stay); color: var(--stay); }

.empty { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 18px 4px; }
.empty .ico { color: var(--stay); }
.empty.big { flex-direction: column; text-align: center; padding: 40px 0; gap: 6px; }
.empty.big .ico { width: 40px; height: 40px; }
.empty.big b { color: var(--text); font-size: 15px; }
.empty.big span { font-size: 12.5px; }

/* ---------- 売上・稼働 ---------- */
.sales { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 20px; }
.sales-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { background: #f6f9fc; border-radius: 12px; padding: 10px 12px; min-width: 0; }
.stat span { font-size: 11.5px; color: var(--text-2); }
.stat b { display: block; font-family: var(--num); font-size: 19px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.stat b small { font-size: 12px; font-weight: 500; margin-left: 2px; color: var(--text-2); }
.stat-main { grid-column: span 4; background: linear-gradient(120deg, #eaf3fd, #f6f9fc); padding: 14px 16px; }
.stat-main b { font-size: 32px; font-weight: 700; }
.stat-main p { font-size: 12.5px; color: var(--text-2); }
.goal { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.goal .bar { flex: 1; background: #d8e5f2; }
.goal small { font-size: 11.5px; color: var(--text-2); white-space: nowrap; }

.chart-box { background: #f6f9fc; border-radius: 12px; padding: 12px 14px 6px; min-width: 0; }
.chart-title { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .col { fill: #a9cbef; }
.chart .col-today { fill: var(--blue); }
.chart .hit:hover .col { fill: #7fb0e6; }
.chart .base { stroke: #d5dee8; stroke-width: 1; }
.chart .grid { stroke: #e3eaf2; stroke-dasharray: 3 4; }
.chart .line { fill: none; stroke: var(--stay); stroke-width: 2; stroke-linejoin: round; }
.chart .area { fill: var(--stay); opacity: .08; }
.chart .dot { fill: #fff; stroke: var(--stay); stroke-width: 2; }
.chart .dot-today { fill: var(--stay); stroke: #fff; stroke-width: 2; }
.chart .hit:hover .dot { fill: var(--stay); }
.chart text { font-family: var(--num); font-size: 11px; fill: var(--muted); text-anchor: middle; }
.chart text.start { text-anchor: start; }
.chart text.val { fill: var(--text); font-weight: 500; font-size: 12px; }
.chart text.is-today { fill: var(--text); font-weight: 500; font-family: var(--font); }

.tooltip {
  position: fixed; z-index: 10; pointer-events: none; max-width: 420px;
  background: var(--text); color: #fff; font-size: 12px; line-height: 1.6; padding: 6px 12px; border-radius: 8px;
  white-space: pre-line; box-shadow: 0 6px 20px rgba(29, 47, 69, .2);
}

/* ---------- 準備中ページ ---------- */
.placeholder { display: grid; place-items: center; min-height: 55vh; }
.ph-card { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 48px 64px; box-shadow: var(--shadow); }
.ph-icon { width: 56px; height: 56px; border-radius: 16px; display: inline-grid; place-items: center; background: var(--blue-l); color: var(--blue); }
.ph-icon .ico { width: 28px; height: 28px; }
.ph-card h2 { margin: 14px 0 6px; font-size: 20px; }
.ph-card p { color: var(--text-2); margin-bottom: 20px; }
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--blue); color: #fff; padding: 9px 18px; border-radius: 10px; font-weight: 500; }

/* ==========================================================
   レスポンシブ（画面幅に合わせた切り替え）
   ----------------------------------------------------------
   基本はPC用。画面が狭くなるにつれて、下の順に上書きします。
     1400px以下 … 小さめのPC       ：数字を少し小さく
     1280px以下 … ノートPC         ：館内マップと予約一覧を縦に並べる
     1024px以下 … タブレット       ：左メニューを折りたたむ（☰ボタンで開く）
      760px以下 … スマホ           ：1列にして、大事な情報から順に並べる
   ========================================================== */

/* メニューボタンと背景の暗幕（PCでは使わない） */
.menu-btn { display: none; }
.nav-overlay { display: none; }

@media (max-width: 1400px) {
  .kpi-value { font-size: 34px; }
  .kpi-mountain { width: 120px; }
  .sales { grid-template-columns: 1fr 1fr; }
  .sales-stats { grid-column: span 2; grid-template-columns: 1.6fr repeat(4, 1fr); }
  .stat-main { grid-column: span 1; grid-row: span 1; }
}
@media (max-width: 1280px) {
  .area-map, .area-side { grid-column: span 12; }
  .area-side { flex-direction: row; }
  .area-list { flex: 1; }
  .message-card { width: 300px; }
  .area-tasks, .area-cleaning { grid-column: span 6; }
  .area-handovers { grid-column: span 12; }
  .deco-mountain, .deco-text { display: none; }
}
/* ---------- タブレット：左メニューを折りたたむ ---------- */
@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 248px; z-index: 50;
    transform: translateX(-100%); transition: transform .25s ease;
  }
  .app.nav-open .sidebar { transform: none; box-shadow: 8px 0 30px rgba(10, 40, 80, .25); }
  .app.nav-open .nav-overlay { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(15, 30, 50, .4); }
  .menu-btn { display: grid; }
  .utilbar { gap: 10px; }
  .search { flex: 1; }

  .kpis { grid-template-columns: repeat(3, 1fr); }
  .message-card { display: none; }
  .sales-stats { grid-template-columns: 1fr 1fr; }
  .stat-main { grid-column: span 2; }
}

/* ---------- スマホ：1列にして、大事な情報から順に並べる ---------- */
@media (max-width: 760px) {
  .main { padding: 10px 14px 40px; }
  .dashboard { gap: 14px; }
  .card { padding: 16px; }
  .search { display: none; }
  .user span:last-child { display: none; }

  /* ページタイトル */
  .page-head { flex-direction: column; align-items: stretch; gap: 8px; margin: 4px 0 14px; }
  .page-title h1 { font-size: 22px; }
  .title-icon .ico { width: 30px; height: 30px; }
  .page-desc { font-size: 13px; }
  .page-deco { justify-content: space-between; }
  .today-box { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0; }
  .today-weather { margin: 0; }

  /* 数字カード：2列（最後の1枚は横長） */
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { min-height: 0; padding: 12px 14px; }
  .kpi:last-child { grid-column: span 2; }
  .kpi-label { font-size: 12.5px; gap: 6px; white-space: normal; }
  .kpi-label .ico { width: 20px; height: 20px; }
  .kpi-value { font-size: 28px; margin-top: 6px; }
  .kpi-value small { font-size: 14px; }
  .kpi-value span { font-size: 12px; }
  .kpi-mountain { width: 90px; height: 40px; }

  /* 館内マップ → 客室カードの2列表示（共用スペースは省略） */
  .floor {
    grid-template-columns: repeat(2, 1fr); grid-template-rows: none; grid-template-areas: none;
    gap: 8px; background: none; border: 0; border-radius: 0; overflow: visible;
  }
  .floor > * { grid-area: auto; }
  .map-room { border-radius: 12px; border: 1px solid var(--line); border-top: 4px solid var(--c); min-height: 118px; padding: 10px 8px; }
  .map-common { display: none; }
  .is-large .mr-name { font-size: 18px; }
  .legend-hint { margin-left: 0; }

  /* 予約一覧：表 → 1件ずつのカード */
  .area-list .card-head { flex-direction: column; align-items: stretch; }
  .tabs { justify-content: space-between; }
  .tab { flex: 1; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 2px; border-bottom: 1px solid #edf1f6; }
  .table td { padding: 0 !important; border: 0; }
  .table td.t-note { flex-basis: 100%; min-width: 0; }

  /* アクション・清掃など */
  .area-tasks, .area-cleaning { grid-column: span 12; }
  .checkbox { width: 26px; height: 26px; }
  .sales, .sales-stats { grid-template-columns: 1fr; }
  .sales-stats { grid-column: auto; grid-template-columns: 1fr 1fr; }
  .stat-main { grid-column: span 2; }

  /* 表示順：数字 → 本日の予約 → 客室 → 清掃 → アクション → 未対応 → 売上 */
  .kpis { order: 1; } .area-side { order: 2; } .area-map { order: 3; } .area-cleaning { order: 4; }
  .area-tasks { order: 5; } .area-handovers { order: 6; } .area-sales { order: 7; }
}

/* ==========================================================
   予約状況ページ
   ========================================================== */
.res-page { display: flex; flex-direction: column; gap: 20px; }

/* ---------- 上部の数字（クリックで一覧を絞り込み） ---------- */
.res-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.res-stat {
  --k: var(--blue);
  display: flex; flex-direction: column; gap: 6px; text-align: left; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  padding: 14px 16px; transition: border-color .15s, transform .15s;
}
.res-stat:hover { border-color: var(--k); transform: translateY(-1px); }
.res-stat { overflow: hidden; }
.res-stat-sub { overflow: hidden; text-overflow: ellipsis; }
.res-stat-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-stat-label .ico { width: 20px; height: 20px; color: var(--k); }
.res-stat-value { font-size: 26px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.res-stat-value small { font-size: 14px; font-weight: 500; margin-left: 2px; }
.res-stat-sub { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.res-stat-sub em { font-style: normal; color: var(--k); opacity: 0; transition: opacity .15s; }
.res-stat:hover .res-stat-sub em { opacity: 1; }
.c-in   { --k: var(--in); }
.c-stay { --k: var(--stay); }
.c-warn  { --k: var(--out);   background: linear-gradient(135deg, #fff 45%, var(--out-bg)); }
.c-alert { --k: var(--dirty); background: linear-gradient(135deg, #fff 45%, var(--dirty-bg)); }
.c-warn .res-stat-value, .c-alert .res-stat-value { color: var(--k); }

/* ---------- 絞り込み ---------- */
.res-filter-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.res-count { font-size: 13px; color: var(--text-2); }
.res-count b { font-size: 20px; font-weight: 700; color: var(--text); margin-right: 2px; }
.res-count span { margin-left: 10px; font-size: 12px; color: var(--muted); }
.res-filter-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.field-label { font-size: 11.5px; font-weight: 500; color: var(--text-2); }
.field select {
  font: inherit; font-size: 13px; color: var(--text); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 38px; outline: 0; cursor: pointer;
}
.field-search {
  flex: 1; min-width: 240px; flex-direction: row; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--muted);
}
.field-search [data-icon] { display: grid; }
.field-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 13px; color: var(--text); background: none; }
.field-search:focus-within, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.btn-clear { height: 38px; padding: 0 14px; border-radius: 10px; font-size: 13px; color: var(--blue); }
.btn-clear:hover { background: var(--blue-l); }
.res-active { display: flex; flex-wrap: wrap; gap: 6px; }
.res-active:not(:empty) { margin-top: 12px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 12px; border-radius: 99px;
  background: var(--blue-l); color: var(--blue-d); font-size: 12.5px; font-weight: 500;
}
.filter-chip span { font-size: 15px; line-height: 1; opacity: .7; }

/* ---------- 予約一覧 ---------- */
.res-list-card { padding: 8px 8px 12px; overflow-x: auto; }
.res-table td { white-space: nowrap; font-size: 13px; padding: 11px 6px; }
.res-table th { padding-left: 6px; padding-right: 6px; }
.res-table tbody tr { cursor: pointer; }
.res-table tbody tr:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.res-table td small { display: block; font-size: 11px; color: var(--muted); }
.rt-name b { font-weight: 500; }
.res-table td.rt-name { white-space: normal; min-width: 104px; }
.res-table td.rt-note { white-space: normal; min-width: 100px; max-width: 170px; font-size: 12px; color: var(--text-2); line-height: 1.5; }
.res-table .num { text-align: right; }
.res-table tr.is-gone td { color: var(--text-2); }
.res-table tr.is-cancel td { color: var(--muted); }
.res-table tr.is-cancel .rt-name b { text-decoration: line-through; }
.b-cancel { background: #eef1f4; color: var(--muted); }
.room-tag { font-weight: 500; letter-spacing: .03em; background: var(--blue-l); color: var(--blue-d); padding: 2px 8px; border-radius: 6px; }
.unassigned {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px;
  background: var(--out-bg); color: #c2561a; border: 1px dashed #f3b48f; font-size: 12px; font-weight: 500;
}
.unassigned .ico { width: 13px; height: 13px; }
.ch { display: inline-flex; align-items: center; gap: 6px; }
.ch-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.ch-booking { background: #1f4f96; }
.ch-rakuten { background: #bf0000; }
.ch-airbnb  { background: #e0565b; }
.ch-chillnn { background: #2f8a5b; }
.ch-direct  { background: var(--blue); }
.pay { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.pay-paid   { background: var(--stay-bg);  color: var(--stay); }
.pay-onsite { background: var(--in-bg);    color: var(--in); }
.pay-unpaid { background: var(--dirty-bg); color: var(--dirty); }
.pay-none   { background: #eef1f4;         color: var(--muted); }

/* ---------- 予約詳細（右からのパネル） ---------- */
.drawer-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(15, 30, 50, .35); opacity: 0; transition: opacity .2s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: min(460px, 100%);
  display: flex; flex-direction: column; background: #fff; box-shadow: -10px 0 40px rgba(10, 40, 80, .18);
  transform: translateX(100%); transition: transform .2s ease;
}
.drawer-open .drawer { transform: none; }
.drawer-open .drawer-overlay { opacity: 1; }
.drawer-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 22px 24px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(120deg, #fff 50%, var(--blue-l));
}
.drawer-head h2 { font-size: 22px; font-weight: 600; margin: 8px 0 2px; }
.drawer-head h2 small { font-size: 14px; font-weight: 400; }
.drawer-head p { font-size: 12px; }
.drawer-close { font-size: 24px; line-height: 1; flex-shrink: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 24px 20px; }
.d-sec { padding: 16px 0; border-bottom: 1px solid #edf1f6; }
.d-sec:last-child { border-bottom: 0; }
.d-sec h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.d-sec h3 .ico { width: 18px; height: 18px; color: var(--blue); }
.d-sec dl { margin: 0; display: grid; gap: 8px; }
.dl-row { display: grid; grid-template-columns: 104px 1fr; gap: 12px; font-size: 13.5px; }
.dl-row dt { color: var(--text-2); }
.dl-row dd { margin: 0; word-break: break-word; }
.d-dates { display: flex; align-items: center; gap: 10px; background: #f6f9fc; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.d-dates > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.d-dates span { font-size: 11.5px; color: var(--text-2); }
.d-dates b { font-size: 14px; font-weight: 600; }
.d-dates small { font-size: 12px; color: var(--muted); }
.d-dates i { display: grid; color: var(--muted); }
.d-price { display: flex; align-items: baseline; justify-content: space-between; background: #f6f9fc; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.d-price span { font-size: 13px; color: var(--text-2); }
.d-price b { font-size: 24px; font-weight: 700; }
.d-note { font-size: 13.5px; background: #f6f9fc; border-radius: 10px; padding: 10px 12px; }
.notice-warn {
  display: flex; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  background: var(--out-bg); color: #c2561a; border: 1px dashed #f3b48f;
}
.notice-warn .ico { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.notice-warn b { font-weight: 600; }
.notice-warn p { font-size: 12.5px; color: var(--text-2); }
.drawer-foot { display: flex; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); }
.drawer-foot .btn-outline { flex: 1; margin: 0; font-size: 12.5px; }
.btn-outline:disabled { opacity: .5; cursor: not-allowed; background: none; }

/* ---------- 予約状況ページのレスポンシブ ---------- */
@media (max-width: 1400px) {
  .res-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .res-page { gap: 14px; }
  .res-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .res-stat { padding: 12px; }
  .res-stat-value { font-size: 22px; }
  .res-stat-sub em { display: none; }
  .res-filter-top { flex-direction: column; align-items: stretch; }
  .field { flex: 1 1 45%; min-width: 0; }
  .field-search { flex-basis: 100%; }
  .res-list-card { padding: 4px 14px; }
  /* 表 → 1件ずつのカード（項目名を小さく表示） */
  .res-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 14px 2px; }
  .res-table td, .res-table td:not(.t-note) { white-space: normal; }
  .res-table td::before { content: attr(data-label); display: block; font-size: 10.5px; color: var(--muted); }
  .res-table td:first-child::before, .res-table td.rt-name::before { display: none; }
  .res-table td.rt-note { grid-column: span 2; max-width: none; }
  .res-table .num { text-align: left; }
  .drawer-head, .drawer-body, .drawer-foot { padding-left: 18px; padding-right: 18px; }
  .drawer-foot { flex-direction: column; }
}

/* ==========================================================
   アクション管理・備品管理ページ（共通パーツ）
   ========================================================== */
/* タブ（件数つき・折り返し可） */
.tabs-wrap { flex-wrap: wrap; }
.tab b { font-weight: 500; margin-left: 6px; font-size: 11.5px; opacity: .75; }
.tab.has-warn:not(.is-active) b { color: var(--dirty); opacity: 1; }

/* ボタン */
.btn .ico, .btn-outline-sm .ico, .btn-mini .ico { width: 16px; height: 16px; }
.btn:hover { background: var(--blue-d); }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-outline-sm {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 10px;
  border: 1.5px solid var(--blue); color: var(--blue); font-weight: 500; background: #fff;
}
.btn-outline-sm:hover { background: var(--blue-l); }
.btn-mini {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 8px;
  border: 1px dashed var(--dirty); color: var(--dirty); background: #fff; font-size: 12px; font-weight: 500; white-space: nowrap;
}
.btn-mini:hover { background: var(--dirty-bg); }
.list-count { margin-top: 14px; display: flex; align-items: baseline; gap: 2px; }
.list-count .filter-chip { margin-left: 10px; align-self: center; }
.act-stats, .sup-stats { grid-template-columns: repeat(4, 1fr); }
.c-review { --k: #6d4fc2; background: linear-gradient(135deg, #fff 45%, #efeafd); }
.c-review .res-stat-value { color: var(--k); }

/* タスクのステータス */
.ts { --tc: var(--text-2); --tb: #eef1f4; display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 99px; background: var(--tb); color: var(--tc); white-space: nowrap; }
.ts-todo   { --tc: var(--text-2); --tb: #eef1f4; }
.ts-doing  { --tc: var(--in);     --tb: var(--in-bg); }
.ts-review { --tc: #6d4fc2;       --tb: #efeafd; }
.ts-done   { --tc: var(--stay);   --tb: var(--stay-bg); }

/* ---------- アクション一覧 ---------- */
.act-table .rt-name { min-width: 200px; }
.act-title { font-weight: 500; }
.res-table td small.src { color: var(--blue); font-size: 11.5px; margin-top: 1px; }
.cat { font-size: 12px; padding: 1px 8px; border-radius: 6px; background: #f0f4f9; color: var(--text-2); white-space: nowrap; }
.who { display: inline-flex; align-items: center; gap: 4px; }
.who .ico { width: 14px; height: 14px; color: var(--muted); }
.auto-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500;
  padding: 1px 8px 1px 6px; border-radius: 6px; background: #eef3fb; color: #4a6fd8; white-space: nowrap;
}
.auto-badge .ico { width: 14px; height: 14px; }
.due-over { display: inline-flex; align-items: center; gap: 4px; color: var(--dirty); font-weight: 500; }
.due-over .ico { width: 14px; height: 14px; }
.res-table td .due-over small { display: inline; color: var(--dirty); margin-left: 4px; }
.due-today { color: var(--blue-d); font-weight: 500; }
.res-table tr.is-over td:first-child { box-shadow: inset 3px 0 0 var(--dirty); }
.res-table tr.is-done-row td { color: var(--muted); }
.res-table tr.is-done-row .act-title { text-decoration: line-through; }
.res-table tr.is-new td { animation: flash-new 2.4s ease; }
@keyframes flash-new { 0%, 40% { background: var(--blue-l); } 100% { background: transparent; } }
.overdue { color: var(--dirty); font-weight: 500; }
a.task-main { color: inherit; }
a.task-main:hover .task-title { color: var(--blue); }

/* ---------- 詳細パネルの部品 ---------- */
.drawer-head .ts, .drawer-head .prio { margin-right: 4px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-btn {
  flex: 1; min-width: 72px; text-align: center; padding: 8px 10px; border-radius: 10px; cursor: pointer;
  background: #f0f4f9; color: var(--text-2); font-size: 13px; font-weight: 500; transition: .15s;
}
.seg-btn:hover { background: #e5ecf4; }
.seg-btn.is-active { background: var(--tb); color: var(--tc); box-shadow: inset 0 0 0 1.5px var(--tc); }
.seg-btn input { position: absolute; opacity: 0; pointer-events: none; }
.seg-btn.p-urgent:has(input:checked) { background: var(--dirty-bg); color: var(--dirty); box-shadow: inset 0 0 0 1.5px var(--dirty); }
.seg-btn.p-today:has(input:checked)  { background: var(--in-bg);    color: var(--in);    box-shadow: inset 0 0 0 1.5px var(--in); }
.seg-btn.p-normal:has(input:checked) { background: #e8edf2;         color: var(--text);  box-shadow: inset 0 0 0 1.5px var(--text-2); }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.src-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; margin-bottom: 8px; transition: .15s;
}
.src-card:hover { border-color: var(--blue); background: #f8fbfe; }
.src-card > div { flex: 1; min-width: 0; }
.src-card b { font-weight: 500; font-size: 13.5px; }
.src-card p { font-size: 12px; color: var(--text-2); }
.src-type { font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 6px; background: var(--blue-l); color: var(--blue-d); white-space: nowrap; }
.notice-red { background: var(--dirty-bg); color: var(--dirty); border-color: #f3b7b2; }

/* ---------- 入力フォーム ---------- */
.form { display: flex; flex-direction: column; gap: 16px; padding-top: 20px; }
.form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-field > span { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.form-field em { font-style: normal; font-size: 11px; color: var(--dirty); margin-left: 4px; }
.form-field input, .form-field select, .form-field textarea {
  font: inherit; font-size: 14px; color: var(--text); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: 0; width: 100%;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.form-field textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-error { color: var(--dirty); font-size: 12px; }
.drawer-foot .btn { flex: 1; justify-content: center; }

/* ---------- 備品の状態 ---------- */
.sup { --sc: var(--stay); --sb: var(--stay-bg); display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 99px; background: var(--sb); color: var(--sc); white-space: nowrap; }
.sup-ok      { --sc: var(--stay);  --sb: var(--stay-bg); }
.sup-low     { --sc: #c2561a;      --sb: var(--out-bg); }
.sup-order   { --sc: var(--dirty); --sb: var(--dirty-bg); }
.sup-ordered { --sc: var(--in);    --sb: var(--in-bg); }

/* 現在庫の数字とバー（縦線＝最低在庫数） */
.stock { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.stock-num { display: inline-flex; align-items: center; gap: 3px; min-width: 52px; font-size: 15px; font-weight: 600; color: var(--sc, var(--text)); }
.stock-num small { font-size: 11.5px; font-weight: 400; color: var(--text-2); margin-left: 2px; }
.stock-num .ico { width: 15px; height: 15px; }
.stock-bar { position: relative; flex: 1; min-width: 60px; height: 6px; border-radius: 99px; background: #e8eef5; }
.stock-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--sc); }
.stock-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text-2); opacity: .5; border-radius: 1px; }
.res-table tr.is-below td { background: #fff7f6; }
.res-table tr.is-below td:first-child { box-shadow: inset 3px 0 0 var(--dirty); }
.res-table tr.is-below:hover td { background: #fdeeec; }

.task-link { display: inline-flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--text); }
.task-link .ts { align-self: flex-start; font-size: 11px; }
.task-link:hover { color: var(--blue); }
.res-table td .task-link small { font-size: 11px; }

/* 自動生成の提案バナー */
.suggest-banner {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius);
  background: linear-gradient(120deg, #fff 30%, var(--dirty-bg)); border: 1px solid #f3cfca; box-shadow: var(--shadow);
}
.suggest-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--dirty); border: 1px solid #f3cfca; flex-shrink: 0; }
.suggest-icon .ico { width: 22px; height: 22px; }
.suggest-text { flex: 1; min-width: 0; }
.suggest-text b { font-weight: 600; }
.suggest-text p { font-size: 12.5px; color: var(--text-2); }

/* 備品の詳細 */
.stock-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #f6f9fc; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.stock-box .stock { flex: 1; }
.stock-box .stock-num { font-size: 26px; }
.stock-box p { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.stepper { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stepper input { width: 72px; text-align: center; font: inherit; font-size: 15px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; outline: 0; }
.stepper input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.step { width: 38px; height: 38px; border-radius: 10px; background: #f0f4f9; font-size: 18px; color: var(--text); }
.step:hover { background: #e5ecf4; }
.stepper .btn { margin-left: auto; }
.check-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13.5px; cursor: pointer; }
.check-line input { width: 18px; height: 18px; accent-color: var(--blue); }
.d-sec .btn-outline { margin-top: 4px; }

/* 在庫をまとめて更新 */
.stock-form { list-style: none; margin: 0; padding: 8px 0 0; }
.stock-form li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf1f6; }
.stock-form li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stock-form b { font-weight: 500; font-size: 13.5px; }
.stock-form small { font-size: 11.5px; color: var(--muted); }
.stock-form input { width: 76px; text-align: right; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; outline: 0; }
.stock-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.stock-form span { width: 40px; font-size: 12.5px; color: var(--text-2); }

/* 画面下のお知らせ */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 80; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
  background: var(--text); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(10, 30, 60, .25); transition: .25s;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast .ico { color: #7fdca3; }
.toast a { color: #9cc8f5; text-decoration: underline; margin-left: 6px; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1400px) {
  .act-stats, .sup-stats { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 760px) {
  .act-stats, .sup-stats { grid-template-columns: repeat(2, 1fr); }
  .res-filter-top > .btn, .btn-group { width: 100%; }
  .btn-group > * { flex: 1; justify-content: center; }
  .res-filter-top > .btn { justify-content: center; }
  .tabs-wrap .tab { flex: 0 0 auto; }
  .suggest-banner { flex-wrap: wrap; }
  .suggest-banner .btn { width: 100%; justify-content: center; }
  .act-table .rt-name { min-width: 0; }
  .act-table td.rt-name, .sup-table td.rt-name { grid-column: span 2; }
  /* 警告の行は、カード全体に色を付ける */
  .res-table tr.is-below, .res-table tr.is-over { background: #fff7f6; box-shadow: inset 3px 0 0 var(--dirty); padding-left: 10px; }
  .res-table tr.is-below td, .res-table tr.is-below:hover td { background: none; }
  .res-table tr.is-below td:first-child, .res-table tr.is-over td:first-child { box-shadow: none; }
  .form-row, .form-row-3 { grid-template-columns: 1fr 1fr; }
  .stepper .btn { margin-left: 0; width: 100%; justify-content: center; }
}

/* ==========================================================
   売上・稼働ページ
   ========================================================== */
.down { color: var(--dirty); font-weight: 500; }

/* 予約経路の色（色覚の違いでも見分けやすい組み合わせを検証済み。「その他」はあえてグレー） */
:root {
  --ch-booking: #2a5db0; --ch-rakuten: #d0453b; --ch-airbnb: #e889a8;
  --ch-chillnn: #1f9b6e; --ch-direct: #7a5cc8; --ch-other: #8b96a3;
}
.ch-booking { background: var(--ch-booking); }
.ch-rakuten { background: var(--ch-rakuten); }
.ch-airbnb  { background: var(--ch-airbnb); }
.ch-chillnn { background: var(--ch-chillnn); }
.ch-direct  { background: var(--ch-direct); }
.ch-other   { background: var(--ch-other); }

/* ---------- 期間の切り替え ---------- */
.sl-period .res-filter-top { margin-bottom: 8px; }
.sl-custom { display: flex; align-items: center; gap: 8px; }
.sl-custom input { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; outline: 0; color: var(--text); }
.sl-custom input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.sl-range { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 14px; font-weight: 500; }
.sl-range .ico { color: var(--blue); }
.sl-range .muted { font-size: 12px; font-weight: 400; }
.sl-source { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.sl-source [data-icon] { display: grid; }
.sl-source .ico { width: 15px; height: 15px; }

/* ---------- 主要指標 ---------- */
.sl-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sl-kpi {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px;
}
.sl-kpi-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-kpi-label .ico { width: 20px; height: 20px; color: var(--blue); }
.sl-kpi-value { font-size: 26px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.sl-kpi-value small { font-size: 14px; font-weight: 500; margin-left: 2px; }
.sl-kpi-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; }
.sl-kpi.is-forecast { background: linear-gradient(135deg, #fff 40%, var(--blue-l)); border-color: #cfe1f5; }
.sl-kpi.is-forecast .sl-kpi-value { color: var(--blue-d); }
.rate-bar { position: relative; flex: 1 1 100%; height: 6px; border-radius: 99px; background: #e8eef5; overflow: hidden; }
.rate-bar em { position: absolute; left: 0; top: 0; bottom: 0; background: #b9d5f2; border-radius: 99px; }
.rate-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue); border-radius: 99px; z-index: 1; }

/* ---------- レイアウト ---------- */
.sl-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; align-items: start; }
.sl-period .tab { white-space: nowrap; }
.sl-forecast { grid-column: span 5; align-self: stretch; }
.sl-cum { grid-column: span 7; }
.sl-daily, .sl-occ { grid-column: span 8; }
.sl-compare, .sl-week { grid-column: span 4; align-self: stretch; }
.sl-rooms { grid-column: span 7; }
.sl-channels { grid-column: span 5; }
.sl-grid .card { min-width: 0; }

/* ---------- 着地見込みの内訳 ---------- */
.fc-eq { display: flex; align-items: stretch; gap: 8px; }
.fc-item { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 12px; border-radius: 12px; background: #f6f9fc; }
.fc-item span { font-size: 12.5px; font-weight: 500; color: var(--text-2); line-height: 1.4; }
.fc-item small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.fc-item b { font-size: 19px; font-weight: 700; white-space: nowrap; }
.fc-actual { box-shadow: inset 0 3px 0 var(--blue); }
.fc-future { box-shadow: inset 0 3px 0 #9cc4ec; }
.fc-total { background: var(--blue-l); box-shadow: inset 0 3px 0 var(--blue-d); }
.fc-total b { color: var(--blue-d); }
.fc-op { align-self: center; font-style: normal; font-size: 18px; color: var(--muted); }
.fc-bar { position: relative; display: flex; gap: 2px; height: 22px; margin: 34px 0 8px; border-radius: 6px; background: #edf2f7; }
.fc-bar > i { display: block; height: 100%; }
.fc-seg-actual { background: var(--blue); border-radius: 6px 0 0 6px; }
.fc-seg-future { background: repeating-linear-gradient(135deg, #b9d5f2 0 6px, #a6c9ee 6px 12px); }
.fc-target { position: absolute; top: -8px; bottom: -8px; width: 2px; background: var(--text); }
.fc-target em { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 4px; font-style: normal; font-size: 11.5px; white-space: nowrap; color: var(--text); background: #fff; padding: 0 4px; }
.fc-legend, .chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-2); }
.fc-legend span, .chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-actual, .lg-future, .lg-target, .lg-future-line { display: inline-block; width: 14px; height: 10px; border-radius: 3px; }
.lg-actual { background: var(--blue); }
.lg-future { background: repeating-linear-gradient(135deg, #b9d5f2 0 3px, #a6c9ee 3px 6px); }
.lg-target { height: 0; border-top: 2px dashed var(--text-2); border-radius: 0; }
.lg-future-line { height: 0; border-top: 2px dashed var(--blue); border-radius: 0; }
.fc-facts { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.fc-facts p { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-2); }
.fc-facts .ico { width: 17px; height: 17px; margin-top: 2px; color: var(--blue); }
.fc-facts b { color: var(--text); font-weight: 600; }
.fc-warn { background: var(--out-bg); border-radius: 10px; padding: 10px 12px; }
.fc-warn .ico { color: #c2561a !important; }
.fc-ok { background: var(--stay-bg); border-radius: 10px; padding: 10px 12px; }
.fc-ok .ico { color: var(--stay) !important; }

/* ---------- グラフ ---------- */
.sl-chart { display: block; overflow: visible; }
.sl-chart .grid { stroke: #e7edf4; stroke-dasharray: 3 4; }
.sl-chart .base { stroke: #d5dee8; }
.sl-chart .axis { font-size: 11px; fill: var(--muted); text-anchor: middle; }
.sl-chart .axis.end { text-anchor: end; }
.sl-chart tspan.is-today { fill: var(--text); font-weight: 600; }
.sl-chart tspan.is-sat { fill: #3f7fcf; }
.sl-chart tspan.is-sun { fill: #d0574b; }
.sl-chart .col-past { fill: var(--blue); }
.sl-chart .col-today { fill: var(--blue-d); }
.sl-chart .col-future { fill: #b9d5f2; }
.sl-chart .hit:hover .col-past, .sl-chart .hit:hover .col-today { fill: #1f5fa8; }
.sl-chart .hit:hover .col-future { fill: #9cc4ec; }
.sl-chart .hit:hover rect { fill: rgba(47, 127, 216, .05); }
.sl-chart .ref { stroke: var(--text-2); stroke-width: 1.5; stroke-dasharray: 5 4; fill: none; }
.sl-chart .ref-label { font-size: 11.5px; fill: var(--text-2); text-anchor: end; }
.sl-chart .start { text-anchor: start; }
.sl-chart .val { font-size: 12px; font-weight: 600; fill: var(--blue-d); }
.sl-chart .cum-area { fill: var(--blue); opacity: .08; }
.sl-chart .cum-actual { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linejoin: round; }
.sl-chart .cum-future { fill: none; stroke: var(--blue); stroke-width: 2; stroke-dasharray: 5 4; opacity: .7; }
.sl-chart .cum-dot { fill: var(--blue); stroke: #fff; stroke-width: 2; }
.sl-cum .card-head, .sl-daily .card-head, .sl-occ .card-head { margin-bottom: 8px; }

/* ---------- 曜日別 ---------- */
.wk-avgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.wk-avgs div { background: #f6f9fc; border-radius: 10px; padding: 8px 10px; }
.wk-avgs span { display: block; font-size: 11.5px; color: var(--text-2); }
.wk-avgs b { font-size: 18px; font-weight: 700; }
.wk-avgs .is-weekend { background: var(--blue-l); }
.wk-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wk-bars li { display: flex; align-items: center; gap: 10px; }
.wk-day { width: 18px; font-size: 13px; font-weight: 500; }
.wk-bars li.is-sat .wk-day { color: #3f7fcf; }
.wk-bars li.is-sun .wk-day { color: #d0574b; }
.wk-track { flex: 1; height: 12px; border-radius: 4px; background: #edf2f7; overflow: hidden; }
.wk-track i { display: block; height: 100%; border-radius: 4px; background: #8fbbe8; }
.wk-track i.is-best { background: var(--blue); }
.wk-bars b { width: 40px; text-align: right; font-size: 13px; font-weight: 600; }

/* ---------- 今月と先月の比較 ---------- */
.cmp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp-table th, .cmp-table td { padding: 8px 6px; text-align: right; border-bottom: 1px solid #edf1f6; white-space: nowrap; }
.cmp-table thead th { font-size: 12px; font-weight: 500; color: var(--text-2); }
.cmp-table tbody th { text-align: left; font-weight: 500; }
.cmp-table td:nth-child(2) { font-weight: 600; }
.cmp-table td:nth-child(3) { color: var(--text-2); }
.cmp-group th { text-align: left !important; font-size: 11.5px; font-weight: 500 !important; color: var(--blue-d); background: #f6f9fc; padding: 6px 8px !important; }

/* ---------- 部屋別・予約経路別 ---------- */
.sl-table td { font-size: 13px; }
.sl-table .num { text-align: right; }
.rm-name { font-weight: 600; letter-spacing: .03em; margin-right: 6px; }
.sl-table td.rt-name small { display: inline; font-size: 11px; color: var(--muted); margin-right: 6px; }
.tag { display: inline-block; font-size: 11px; font-weight: 500; padding: 0 7px; border-radius: 6px; background: #eef1f4; color: var(--text-2); margin-left: 2px; }
.tag-top { background: var(--blue-l); color: var(--blue-d); }
.tag-low { background: var(--out-bg); color: #c2561a; }
.in-bar { display: inline-block; vertical-align: middle; width: 70px; height: 8px; border-radius: 4px; background: #edf2f7; overflow: hidden; margin-right: 8px; }
.in-bar i { display: block; height: 100%; background: #8fbbe8; border-radius: 4px; }
.in-bar.is-sales i { background: var(--blue); }
.in-val { font-weight: 500; }
.sl-rooms .card-head small { font-size: 11.5px; }
.mix-bar { display: flex; gap: 2px; height: 28px; border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.mix-bar i { display: flex; align-items: center; justify-content: center; min-width: 3px; }
.mix-bar span { font-style: normal; font-size: 11.5px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.ch-table .ch-dot { width: 10px; height: 10px; border-radius: 3px; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1400px) {
  .sl-forecast, .sl-cum { grid-column: span 12; }
  .sl-rooms, .sl-channels { grid-column: span 12; }
}
@media (max-width: 1100px) {
  .sl-kpis { grid-template-columns: repeat(2, 1fr); }
  .sl-daily, .sl-occ, .sl-compare, .sl-week { grid-column: span 12; }
}
@media (max-width: 760px) {
  .sl-grid { gap: 14px; }
  .sl-kpis { gap: 10px; }
  .sl-kpi { padding: 12px; }
  .sl-kpi-value { font-size: 21px; }
  .sl-kpi-label { font-size: 12px; white-space: normal; }
  .sl-range { margin-left: 0; flex-wrap: wrap; }
  .sl-custom { width: 100%; }
  .sl-period .tab { padding: 5px 4px; font-size: 12px; }
  .cmp-table th, .cmp-table td { padding: 7px 3px; font-size: 12px; }
  .cmp-table tbody th { white-space: normal; }
  .sl-compare { overflow-x: auto; }
  .sl-table .num { text-align: left; }
  .sl-custom input { flex: 1; min-width: 0; }
  .fc-eq { flex-direction: column; }
  .fc-op { align-self: center; line-height: 1; }
  .fc-item { flex-direction: row; align-items: center; }
  .in-bar { width: 50px; }
  .sl-table td.rt-name { grid-column: span 2; }
}

/* ==========================================================
   ミーティング議事録ページ
   ========================================================== */
.mtg-stats { grid-template-columns: repeat(4, 1fr); }

/* 参加者のアイコン */
.mem { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.mem i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 500; color: #fff; border: 2px solid #fff; flex-shrink: 0; }
.mem-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.mem-list.is-absent .mem { color: var(--muted); }
.mem-list.is-absent .mem i { opacity: .45; }

/* 種別 */
.mt-type { display: inline-block; font-size: 11.5px; font-weight: 500; padding: 1px 9px; border-radius: 99px; white-space: nowrap; background: #eef1f4; color: var(--text-2); }
.mt-regular  { background: var(--blue-l);   color: var(--blue-d); }
.mt-ops      { background: #e9eefc;         color: #4a6fd8; }
.mt-cleaning { background: var(--done-bg); color: var(--done); }
.mt-sales    { background: #fbf1dc;         color: #9a6a12; }
.mt-urgent   { background: var(--dirty-bg); color: var(--dirty); }
.ai-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; padding: 1px 8px; border-radius: 99px; background: #efeafd; color: #6d4fc2; white-space: nowrap; }
.ai-chip .ico { width: 13px; height: 13px; }

/* 期間の入力 */
.field-period { min-width: 280px; }
.period-inputs { display: flex; align-items: center; gap: 6px; }
.period-inputs input { flex: 1; min-width: 0; font: inherit; font-size: 13px; height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; outline: 0; color: var(--text); }
.period-inputs input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.field-search > .ico { color: var(--muted); }

/* ---------- 一覧のカード ---------- */
.mtg-list { display: flex; flex-direction: column; gap: 12px; }
.mtg-card { display: flex; gap: 20px; align-items: stretch; transition: border-color .15s, transform .15s; color: inherit; }
.mtg-card:hover { border-color: var(--blue); transform: translateY(-1px); }
.mtg-date { width: 72px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; background: var(--blue-l); color: var(--blue-d); padding: 8px 0; }
.mtg-date span { font-size: 12px; }
.mtg-date b { font-size: 28px; font-weight: 700; line-height: 1.1; }
.mtg-date small { font-size: 11px; }
.mtg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mtg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--text-2); }
.mtg-meta > span:not(.mt-type):not(.ai-chip) { display: inline-flex; align-items: center; gap: 4px; }
.mtg-meta .ico { width: 14px; height: 14px; }
.mtg-main h3 { margin: 0; font-size: 16px; font-weight: 600; }
.mtg-summary { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mtg-summary mark, .mtg-card mark { background: #fff0b8; color: inherit; border-radius: 3px; padding: 0 1px; }
.mtg-people { display: flex; align-items: center; margin-top: 4px; }
.mtg-people .mem { margin-right: -6px; }
.mtg-people .muted { margin-left: 14px; font-size: 12px; }
.mtg-counts { display: grid; grid-template-columns: repeat(3, 76px); gap: 8px; align-self: center; }
.mtg-counts span { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 10px; background: #f6f9fc; font-size: 11.5px; color: var(--text-2); }
.mtg-counts b { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.2; }
.mtg-counts .is-open { background: var(--dirty-bg); color: var(--dirty); }
.mtg-counts .is-open b { color: var(--dirty); }

/* ---------- 詳細 ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--blue); align-self: flex-start; }
.back-link .ico { transform: rotate(180deg); width: 16px; height: 16px; }
.mtg-head { display: flex; gap: 20px; justify-content: space-between; background: linear-gradient(120deg, #fff 55%, var(--blue-l)); }
.mtg-head-main { flex: 1; min-width: 0; }
.mtg-head h2 { font-size: 22px; font-weight: 700; margin: 8px 0 12px; }
.origin { color: #6d4fc2; }
.mtg-info { display: grid; grid-template-columns: repeat(4, auto); gap: 10px 28px; margin: 0; justify-content: start; }
.mtg-info .wide { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; }
.mtg-info dt { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-2); }
.mtg-info dt .ico { width: 14px; height: 14px; color: var(--blue); }
.mtg-info .wide dt { width: 64px; flex-shrink: 0; }
.mtg-info dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; }
.mtg-info dd small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.mtg-head-side { display: flex; flex-direction: column; gap: 8px; align-items: stretch; flex-shrink: 0; }
.mtg-head-side .btn-outline-sm:disabled { opacity: .5; cursor: not-allowed; }

.mtg-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; align-items: start; }
.mtg-summary-card { grid-column: span 7; align-self: stretch; background: linear-gradient(135deg, #fff 45%, #f3effd); border-color: #e3dcf7; }
.mtg-summary-card .h-icon { color: #6d4fc2; }
.mtg-summary-text { font-size: 15px; line-height: 1.9; }
.agenda-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.agenda-chips a { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 10px 4px 4px; border-radius: 99px; background: #fff; border: 1px solid var(--line); }
.agenda-chips a:hover { border-color: var(--blue); color: var(--blue); }
.agenda-chips b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-l); color: var(--blue-d); font-size: 11px; font-weight: 600; }

.mtg-decisions { grid-column: span 5; align-self: stretch; background: linear-gradient(135deg, #fff 45%, var(--stay-bg)); border-color: #cde9d7; }
.mtg-decisions .h-icon { color: var(--stay); }
.decision-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.decision-list li { display: flex; gap: 10px; align-items: flex-start; background: #fff; border-radius: 10px; padding: 10px 12px; border: 1px solid #dcefe3; }
.dec-check { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--stay); color: #fff; flex-shrink: 0; }
.dec-check .ico { width: 13px; height: 13px; stroke-width: 3; }
.decision-list p { font-size: 14px; font-weight: 500; }
.dec-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; font-size: 11.5px !important; font-weight: 400 !important; color: var(--muted); }
.dec-meta a { display: inline-flex; align-items: center; gap: 3px; color: var(--blue); }
.dec-meta .ico { width: 12px; height: 12px; }

.mtg-actions { grid-column: span 12; }
.mtg-actions .hint { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.mtg-actions .hint .ico { width: 14px; height: 14px; }
.mtg-task-table .act-title { color: var(--text); font-weight: 500; }
.mtg-task-table .act-title:hover { color: var(--blue); }
.checkbox.is-checked { background: var(--blue); border-color: var(--blue); color: #fff; }
.ts-select { font: inherit; font-size: 12px; font-weight: 500; border: 0; border-radius: 99px; padding: 3px 22px 3px 10px; cursor: pointer; appearance: none; outline: 0;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 11px) 55%, calc(100% - 7px) 55%; background-size: 4px 4px; background-repeat: no-repeat; background-color: var(--tb); }
.ts-select:focus-visible { box-shadow: 0 0 0 2px var(--tc); }

.mtg-agenda { grid-column: span 8; display: flex; flex-direction: column; gap: 14px; }
.sec-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; margin: 4px 0 0; }
.sec-title .ico { width: 22px; height: 22px; color: var(--blue); }
.agenda-block header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.agenda-block header .muted { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.agenda-block header .muted .ico { width: 14px; height: 14px; }
.agenda-block h3 { margin: 0; font-size: 16px; font-weight: 600; }
.agenda-no { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.agenda-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ag { border-radius: 10px; padding: 10px 12px; background: #f6f9fc; }
.ag h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.ag h4 .ico { width: 14px; height: 14px; }
.ag ul { margin: 0; padding-left: 18px; font-size: 13.5px; }
.ag li + li { margin-top: 2px; }
.ag-discussion { grid-column: 1 / -1; }
.ag-opinions h4 .ico { color: var(--blue); }
.ag-checks { background: var(--stay-bg); }
.ag-checks h4, .ag-checks h4 .ico { color: var(--stay); }
.ag-pending { background: var(--out-bg); }
.ag-pending h4, .ag-pending h4 .ico { color: #c2561a; }
.agenda-tasks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.agenda-task { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 99px; }
.agenda-task:hover { border-color: var(--blue); }
.agenda-task small { color: var(--muted); font-size: 11px; }
.agenda-task .ts { font-size: 11px; }
.notes { font-size: 14px; line-height: 1.8; }

.mtg-side { grid-column: span 4; display: flex; flex-direction: column; gap: 14px; }
.prog-sum { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.prog-sum b { font-size: 24px; font-weight: 700; }
.prog-sum span { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.prog-sum .bar { flex: 1; height: 8px; }
.prog-sum .bar i { background: var(--stay); }
.prog-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.prog-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #f6f9fc; }
.prog-list a { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; color: var(--text); }
.prog-list a:hover { color: var(--blue); }
.prog-list small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.prog-list em { font-style: normal; color: var(--dirty); }
.pg-mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.pg-ok .pg-mark { background: var(--stay-bg); color: var(--stay); }
.pg-mid .pg-mark { background: var(--in-bg); color: var(--in); }
.pg-ng .pg-mark { background: var(--dirty-bg); color: var(--dirty); }
.prog-list .ts { font-size: 11px; }
.mtg-progress .hint { margin-top: 10px; }

.mtg-open { background: linear-gradient(135deg, #fff 45%, var(--out-bg)); border-color: #f5dcc9; }
.mtg-open .h-icon { color: #c2561a; }
.open-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.open-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid #f5e1d2; font-size: 13.5px; }
.open-list li .ico { width: 14px; height: 14px; color: #c2561a; flex-shrink: 0; }
.open-list li span { flex: 1; }
.open-list em { font-style: normal; font-size: 11px; color: #c2561a; background: var(--out-bg); padding: 0 6px; border-radius: 6px; white-space: nowrap; }

.next-date { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.next-date b { font-size: 24px; font-weight: 700; color: var(--blue-d); }
.next-date span { font-size: 14px; color: var(--text-2); }
.next-date em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 500; color: var(--blue-d); background: var(--blue-l); padding: 1px 8px; border-radius: 99px; }
.mtg-next h4 { font-size: 12px; font-weight: 600; color: var(--text-2); margin: 12px 0 4px; }
.next-agenda { margin: 0; padding-left: 20px; font-size: 13.5px; }
.mtg-next.is-past { opacity: .75; }

/* ---------- 作成フォーム ---------- */
.mf-mode { margin: 18px 0 4px; }
.mf-mode .seg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.mf-mode .seg-btn .ico { width: 15px; height: 15px; }
.check-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chips label { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 6px; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; }
.check-chips input { accent-color: var(--blue); }
.check-chips label:has(input:checked) { border-color: var(--blue); background: var(--blue-l); }
.mf-action { display: grid; grid-template-columns: 1fr 96px 130px 84px; gap: 6px; margin-bottom: 6px; }
.mf-action input, .mf-action select { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; min-width: 0; outline: 0; }
.mf-action input:focus, .mf-action select:focus { border-color: var(--blue); }
.mf-add { align-self: flex-start; border-color: var(--blue); color: var(--blue); }
.mf-ai { padding-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.ai-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ai-steps li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; padding: 10px; border-radius: 10px; background: #f6f3fe; color: var(--text-2); }
.ai-steps b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #6d4fc2; color: #fff; font-size: 12px; flex-shrink: 0; }
.ai-drop { border: 2px dashed #d6ccf3; border-radius: 12px; padding: 14px; text-align: center; color: #6d4fc2; display: flex; flex-direction: column; gap: 8px; }
.ai-drop > .ico { width: 26px; height: 26px; margin: 0 auto; }
.ai-drop p { font-size: 13px; }
.ai-drop textarea { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fafafa; resize: vertical; }
.ai-sources { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.ai-sources span { font-size: 11.5px; padding: 1px 8px; border-radius: 99px; background: #efeafd; }
.mf-ai .btn:disabled { opacity: .5; cursor: not-allowed; justify-content: center; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1280px) {
  .mtg-summary-card, .mtg-decisions { grid-column: span 12; }
  .mtg-agenda, .mtg-side { grid-column: span 12; }
  .mtg-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
}
@media (max-width: 1100px) {
  .mtg-stats { grid-template-columns: repeat(2, 1fr); }
  .mtg-counts { grid-template-columns: repeat(3, 64px); }
}
@media (max-width: 760px) {
  .mtg-card { flex-wrap: wrap; gap: 12px; }
  .mtg-date { flex-direction: row; width: auto; gap: 6px; padding: 4px 12px; align-items: baseline; }
  .mtg-date b { font-size: 20px; }
  .mtg-main { flex-basis: 100%; order: 2; }
  .mtg-date { order: 1; }
  .mtg-counts { order: 3; width: 100%; grid-template-columns: repeat(3, 1fr); }
  .mtg-head { flex-direction: column; }
  .mtg-head-side { flex-direction: row; flex-wrap: wrap; }
  .mtg-info { grid-template-columns: 1fr 1fr; }
  .mtg-info .wide { flex-direction: column; align-items: flex-start; gap: 4px; }
  .agenda-groups { grid-template-columns: 1fr; }
  .mtg-side { display: flex; }
  .field-period { min-width: 0; flex-basis: 100%; }
  .mf-action { grid-template-columns: 1fr 1fr; }
  .mf-action input[data-f=title] { grid-column: span 2; }
  .ai-steps { grid-template-columns: 1fr; }
  .mtg-task-table td.rt-name { grid-column: span 2; }
}

/* ==========================================================
   マニュアルページ（左：一覧 ／ 中央：詳細 ／ 右：目次など）
   ========================================================== */
.mn-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 20px; align-items: start; }
.mn-layout[hidden] { display: none; }

/* カテゴリの色（イラスト・ラベル） */
.mn-c-clean    { --mc: var(--blue);  --mb: #e5f0fd; --mb2: #f4f9ff; }
.mn-c-guest    { --mc: var(--stay);  --mb: #e3f5ea; --mb2: #f4fbf7; }
.mn-c-facility { --mc: #c08410;      --mb: #fdf1d6; --mb2: #fffaf0; }
.mn-c-other    { --mc: #6d4fc2;      --mb: #efeafd; --mb2: #f8f6fe; }

/* 写真がないときのイラスト */
.mn-media { display: block; width: 100%; object-fit: cover; border-radius: 10px; overflow: hidden; }
.mn-illust { background: linear-gradient(135deg, var(--mb2), var(--mb)); }
.mn-illust svg { display: block; width: 100%; height: 100%; }
.mn-illust .bub { fill: #fff; opacity: .55; }
.mn-illust .ico-l { stroke: var(--mc); }

/* ---------- 左：一覧 ---------- */
.mn-list { position: sticky; top: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 32px); }
.mn-list-head { display: flex; flex-direction: column; gap: 10px; }
.mn-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fff; }
.mn-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 13px; color: var(--text); background: none; }
.mn-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.mn-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.mn-cat { padding: 5px 14px; border-radius: 99px; font-size: 13px; background: #f0f4f9; color: var(--text-2); }
.mn-cat.is-active { background: var(--blue); color: #fff; font-weight: 500; box-shadow: 0 2px 6px rgba(47, 127, 216, .3); }
.mn-items { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin: 0 -4px; padding: 2px 4px; }
.mn-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; border: 1.5px solid transparent; color: var(--text); transition: background .15s, border-color .15s; }
.mn-item:hover { background: #f6f9fc; }
.mn-item.is-active { background: var(--blue-l); border-color: var(--blue); }
.mn-thumb { width: 76px; height: 60px; flex-shrink: 0; }
.mn-item-main { flex: 1; min-width: 0; }
.mn-item-main b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.mn-item-main p { font-size: 11.5px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mn-cat-pill { display: inline-block; font-size: 10.5px; font-weight: 500; padding: 0 7px; border-radius: 5px; background: var(--mb); color: var(--mc); margin: 3px 0; }
.mn-item .chev .ico { width: 14px; height: 14px; }
.mn-create { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 10px; border: 1.5px dashed #c6d6e8; color: var(--blue); font-size: 13px; font-weight: 500; }
.mn-create:hover { background: var(--blue-l); }
.mn-create .ico { width: 16px; height: 16px; }
.mn-create small { font-size: 10.5px; color: var(--muted); font-weight: 400; }
.mn-back { display: none; }

/* ---------- 中央：見出し ---------- */
.mn-detail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mn-head { padding: 18px 22px; }
.mn-crumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.mn-crumb .ico { width: 11px; height: 11px; }
.mn-crumb a, .mn-crumb button { color: var(--text-2); font-size: 12px; }
.mn-crumb a:hover, .mn-crumb button:hover { color: var(--blue); }
.mn-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 6px; flex-wrap: wrap; }
.mn-title-row h2 { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; margin: 0; }
.mn-title-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--mb); color: var(--mc); flex-shrink: 0; }
.mn-title-icon svg { width: 28px; height: 28px; stroke: currentColor; }
.mn-desc { font-size: 14px; color: var(--text-2); line-height: 1.8; }
.mn-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.mn-meta span { display: inline-flex; align-items: center; gap: 4px; }
.mn-meta .ico { width: 14px; height: 14px; }

.mn-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.mn-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* 動画 */
.mn-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #1c2a3a; box-shadow: var(--shadow); }
.mn-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mn-video-ph { position: absolute; inset: 0; display: grid; place-items: center; }
.mn-video-bg { position: absolute; inset: 0; height: 100%; border-radius: 0; filter: saturate(.9); }
.mn-video-ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 35, 55, .05), rgba(20, 35, 55, .45)); }
.mn-play { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(20, 30, 45, .75); color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.mn-play .ico { width: 28px; height: 28px; margin-left: 3px; }
.mn-dur { position: absolute; right: 12px; bottom: 12px; z-index: 1; background: rgba(20, 30, 45, .8); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.mn-video-ph p { position: absolute; left: 16px; bottom: 12px; z-index: 1; color: #fff; font-size: 13px; font-weight: 500; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.mn-video-ph p small { display: block; font-size: 11px; font-weight: 400; opacity: .9; }

/* 作業手順（写真＋短い文章のカード） */
.mn-sec-title { font-size: 17px; font-weight: 600; margin: 4px 0 10px; }
.mn-steps { display: flex; flex-direction: column; gap: 10px; }
.mn-step { display: flex; align-items: flex-start; gap: 14px; padding: 12px; position: relative; scroll-margin-top: 16px; transition: box-shadow .3s, border-color .3s; }
.mn-step.is-flash { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.mn-step-no { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 13px; font-weight: 600; flex-shrink: 0; order: 2; margin-top: 2px; }
.mn-step-no .ico { width: 15px; height: 15px; stroke-width: 2.6; }
.mn-step.is-prep .mn-step-no { background: var(--stay); }
.mn-step-img { width: 150px; height: 100px; flex-shrink: 0; order: 1; }
.mn-step-main { flex: 1; min-width: 0; order: 3; }
.mn-step-main h4 { margin: 3px 0 4px; font-size: 15px; font-weight: 600; }
.mn-step-main > p { font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.mn-prep { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text-2); }
.mn-step-links { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; }
.mn-step-links a, .mn-time { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--blue); }
.mn-step-links .ico { width: 13px; height: 13px; }
.mn-time { padding: 1px 8px; border-radius: 99px; background: var(--blue-l); }
.mn-end { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: 13px; color: var(--stay); padding: 8px 0; }
.mn-end .ico { width: 16px; height: 16px; }

/* ---------- 右：目次・ポイント・関連資料 ---------- */
.mn-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
.mn-side .card { padding: 16px; }
.mn-side h3 { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.mn-side h3 .ico { width: 17px; height: 17px; color: var(--blue); }
.mn-toc { background: linear-gradient(180deg, #fff, #f6f9fd); }
.mn-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mn-toc button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; text-align: left; font-size: 13px; }
.mn-toc button:hover { background: var(--blue-l); }
.mn-toc button.is-current { background: var(--blue-l); color: var(--blue-d); font-weight: 500; }
.mn-toc b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.mn-toc span { flex: 1; min-width: 0; }
.mn-toc small { font-size: 11px; color: var(--muted); }
.mn-points { background: linear-gradient(135deg, #fff 30%, var(--out-bg)); border-color: #f5dcc9; }
.mn-points h3 .ico { color: #c2561a; }
.mn-points ul, .mn-related ul, .mn-tasks ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mn-points li { display: flex; gap: 6px; font-size: 13px; line-height: 1.55; }
.mn-points li .ico { width: 15px; height: 15px; color: #c2561a; flex-shrink: 0; margin-top: 3px; stroke-width: 2.6; }
.mn-related a { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--blue); }
.mn-related a:hover { text-decoration: underline; }
.rel-type { font-style: normal; font-size: 10.5px; padding: 0 6px; border-radius: 5px; background: var(--blue-l); color: var(--blue-d); flex-shrink: 0; }
.rel-type.is-page { background: var(--stay-bg); color: var(--stay); }
.rel-type.is-file { background: #eef1f4; color: var(--text-2); }
.mn-tasks a { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); }
.mn-tasks a:hover { color: var(--blue); }
.mn-tasks .ts { font-size: 10.5px; }
.mn-help { background: linear-gradient(135deg, #fff 40%, #eaf6f8); }
.mn-help p { font-size: 12.5px; color: var(--text-2); }
.mn-help-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.mn-help-links .btn-outline-sm { padding: 5px 12px; font-size: 12.5px; }

/* ---------- マニュアル作成フォーム ---------- */
.ai-flow { margin-top: 16px; padding: 14px; border-radius: 12px; background: #f6f3fe; }
.ai-flow-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #6d4fc2; margin-bottom: 8px; }
.ai-flow-title .ico { width: 16px; height: 16px; }
.ai-flow ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; padding: 0; list-style: none; counter-reset: f; }
.ai-flow li { counter-increment: f; font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: #fff; color: var(--text-2); }
.ai-flow li::before { content: counter(f) ". "; color: #6d4fc2; font-weight: 600; }
.ai-flow .btn:disabled { opacity: .5; cursor: not-allowed; }
.mf-step { display: grid; grid-template-columns: 28px 1fr 1.4fr 80px auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.mf-step .mn-step-no { order: 0; margin: 0; }
.mf-step input { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; min-width: 0; outline: 0; }
.mf-step input:focus { border-color: var(--blue); }
.mf-step .btn-mini:disabled { opacity: .5; cursor: not-allowed; border-color: var(--line); color: var(--muted); }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1280px) {
  .mn-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .mn-body { grid-template-columns: minmax(0, 1fr); }
  .mn-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
}
/* スマホ・タブレット：一覧 → タップで詳細（1列） */
@media (max-width: 900px) {
  .mn-layout { grid-template-columns: minmax(0, 1fr); }
  .mn-list { position: static; max-height: none; }
  .mn-layout.has-selection .mn-list { display: none; }
  .mn-layout:not(.has-selection) .mn-detail { display: none; }
  .mn-back { display: inline-flex; }
  /* 表示順：タイトル → 動画 → 目次 → 作業手順 → ポイント → 関連資料 */
  .mn-body { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
  .mn-main, .mn-side { display: contents; }
  .mn-thumb { width: 64px; height: 52px; }
  .mn-item .chev { display: none; }
  .mn-video { order: 1; } .mn-toc { order: 2; } .mn-steps { order: 3; } .mn-points { order: 4; }
  .mn-related { order: 5; } .mn-tasks { order: 6; } .mn-help { order: 7; }
  .mn-side .card { padding: 14px; }
}
@media (max-width: 560px) {
  .mn-head { padding: 14px; }
  .mn-title-row h2 { font-size: 19px; }
  .mn-title-row .btn { width: 100%; justify-content: center; }
  .mn-step { flex-wrap: wrap; gap: 10px; }
  .mn-step-img { width: 100%; height: 150px; }
  .mn-step-no { position: absolute; top: 20px; left: 20px; width: 32px; height: 32px; font-size: 15px; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
  .mn-step-main { flex-basis: 100%; }
  .mn-step-main h4 { font-size: 16px; }
  .mf-step { grid-template-columns: 28px 1fr 1fr; }
  .mf-step input[data-f=text] { grid-column: 2 / -1; }
}

/* ---------- 印刷・PDF保存（マニュアル本文だけを印刷） ---------- */
@media print {
  body { background: #fff; }
  .sidebar, .utilbar, .page-head, .mn-list, .mn-back, .mn-video, .mn-help, .mn-tasks, .toast, .drawer, .drawer-overlay, [data-mn-pdf], .mn-step-links { display: none !important; }
  .app { display: block; }
  .main { padding: 0; max-width: none; }
  .mn-layout { display: block; }
  .mn-body { display: block; }
  .mn-side { position: static; display: block; }
  .card { box-shadow: none; }
  .mn-step { break-inside: avoid; }
}

/* ==========================================================
   OTA・各種サービスページ
   ========================================================== */
/* ステータスの色：正常＝緑／要対応＝オレンジ／エラー＝赤／未設定＝グレー */
.sv-ok    { --st: var(--stay);  --stb: var(--stay-bg); }
.sv-warn  { --st: #d9730d;      --stb: #fff1e0; }
.sv-error { --st: var(--dirty); --stb: var(--dirty-bg); }
.sv-none  { --st: var(--vac);   --stb: var(--vac-bg); }

.sv-status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 1px 10px 1px 8px; border-radius: 99px; background: var(--stb); color: var(--st); }
.sv-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--st); }
.sv-mark { --sc: #8b96a3; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--sc); color: #fff; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.sv-mark .ico { width: 26px; height: 26px; stroke-width: 2.2; }
.sv-mark.is-sm { width: 26px; height: 26px; border-radius: 7px; font-size: 12px; }
.sv-mark.is-sm .ico { width: 15px; height: 15px; }

/* 上部のバー */
.sv-bar { display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; padding: 14px 18px; }
.sv-health { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sv-h { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); padding: 3px 10px; border-radius: 99px; background: var(--stb); }
.sv-h i { width: 8px; height: 8px; border-radius: 50%; background: var(--st); }
.sv-h b { color: var(--st); font-weight: 700; }
.sv-h-issues { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 12px; border-radius: 99px; background: #f0f4f9; color: var(--text-2); }
.sv-h-issues .ico { width: 14px; height: 14px; }
.sv-h-issues.has { background: var(--dirty); color: #fff; }
.sv-h-issues.has:hover { background: #c7453d; }
.sv-updated { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.btn-outline-sm.is-spin .ico { animation: sv-spin .7s linear infinite; }
@keyframes sv-spin { to { transform: rotate(360deg); } }

/* サービスのカード */
.sv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sv-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-top: 4px solid var(--st, var(--line)); }
.sv-st-ok { --st: var(--stay); } .sv-st-warn { --st: #d9730d; } .sv-st-error { --st: var(--dirty); } .sv-st-none { --st: #c3ccd6; }
.sv-card header { display: flex; align-items: flex-start; gap: 12px; }
.sv-card header > div { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.sv-card h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.sv-card h3 button { text-align: left; font-weight: 600; }
.sv-card h3 button:hover { color: var(--blue); }
.sv-ext { width: 34px; height: 34px; border-radius: 9px; background: var(--blue-l); color: var(--blue); flex-shrink: 0; }
.sv-ext .ico { width: 17px; height: 17px; }
.sv-items { margin: 0; display: flex; flex-direction: column; flex: 1; }
.sv-items > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px dashed #e8edf3; font-size: 13px; }
.sv-items > div:last-child { border-bottom: 0; }
.sv-items dt { color: var(--text-2); }
.sv-items dd { margin: 0; font-weight: 600; text-align: right; }
.sv-items dd small { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 3px; }
.lv-ok { color: var(--stay); }
.lv-warn { color: #d9730d; }
.lv-error { color: var(--dirty); }
.lv-info { color: var(--text); }
.sv-tasks { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-size: 12px; color: var(--blue); padding: 2px 10px; border-radius: 99px; background: var(--blue-l); }
.sv-tasks .ico { width: 13px; height: 13px; }
.sv-open { margin-top: 0; font-size: 13px; padding: 8px; }
.sv-open .ico { width: 15px; height: 15px; }
.sv-add { border: 2px dashed #d5dee8; border-top-width: 2px; background: #fbfcfe; box-shadow: none; }
.sv-add p { flex: 1; font-size: 13px; color: var(--text-2); text-align: center; display: grid; place-items: center; line-height: 1.8; }
.sv-add .btn-outline { margin-top: 0; }

/* 下段 */
.sv-bottom { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 16px; align-items: start; }
.sv-issues { background: linear-gradient(135deg, #fff 45%, #fff3f1); border-color: #f5d3cf; }
.sv-issues .h-icon { color: var(--dirty); }
.sv-issues h2 small { color: var(--dirty) !important; font-weight: 600 !important; }
.sv-issue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sv-issue-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border-radius: 12px; border: 1px solid #f2e0dd; box-shadow: inset 3px 0 0 var(--lc, #d9730d); }
.sv-issue-list li.lv-row-error { --lc: var(--dirty); }
.sv-issue-list li.lv-row-warn { --lc: #d9730d; }
.sv-issue-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 13.5px; }
.sv-issue-main b { font-weight: 600; white-space: nowrap; }
.sv-issue-acts { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.sv-act { font-size: 12.5px; font-weight: 600; color: #fff; background: var(--blue); padding: 4px 12px; border-radius: 8px; white-space: nowrap; }
.sv-act:hover { background: var(--blue-d); }
.sv-act-sub { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--blue); white-space: nowrap; }
.sv-act-sub .ico { width: 13px; height: 13px; }
.sv-act-sub.is-done { color: var(--stay); }
.sv-news-list { list-style: none; margin: 0; padding: 0; }
.sv-news-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #edf1f6; font-size: 13px; }
.sv-news-list li:last-child { border-bottom: 0; }
.sv-news-list time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sv-faq { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.sv-faq a { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 7px 10px; border-radius: 10px; background: var(--blue-l); color: var(--blue-d); }
.sv-faq a:hover { background: #d9e9fb; }
.sv-faq .ico { width: 14px; height: 14px; }
.sv-link-list { list-style: none; margin: 0; padding: 0; }
.sv-link-list a { display: flex; align-items: center; gap: 6px; padding: 7px 2px; font-size: 13px; color: var(--blue); border-bottom: 1px solid #f0f3f7; }
.sv-link-list a:hover { text-decoration: underline; }
.sv-link-list .ico { width: 12px; height: 12px; }
.sv-links .hint { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; }
.sv-links .hint .ico { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }

/* 詳細パネル */
.sv-dh { display: flex; gap: 14px; align-items: center; }
.sv-dh h2 { margin: 4px 0 0 !important; }
.sv-items.is-panel { background: #f6f9fc; border-radius: 12px; padding: 4px 14px; }
.sv-url { display: flex; gap: 8px; margin-bottom: 10px; }
.sv-url input { flex: 1; min-width: 0; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; outline: 0; }
.sv-url input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.sv-open-big { width: 100%; justify-content: center; margin-bottom: 10px; }
.drawer .sv-issue-list li { flex-wrap: wrap; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1400px) {
  .sv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sv-bottom { grid-template-columns: 1fr 1fr; }
  .sv-issues { grid-column: span 2; }
}
@media (max-width: 1024px) {
  .sv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-updated { margin-left: 0; }
}
@media (max-width: 760px) {
  .sv-grid, .sv-bottom { grid-template-columns: minmax(0, 1fr); }
  .sv-issues { grid-column: auto; }
  .sv-bar { padding: 12px; }
  .sv-updated { width: 100%; justify-content: space-between; }
  .sv-issue-list li { flex-wrap: wrap; }
  .sv-issue-acts { width: 100%; justify-content: flex-start; padding-left: 36px; }
}

/* ==========================================================
   清掃・備品ページ（今日の清掃 ＋ 備品の在庫・発注）
   ========================================================== */
.cs-stats { grid-template-columns: repeat(6, 1fr); }
.cs-sec { margin-top: 6px; }
.cs-sec [data-icon] { display: grid; }

/* 今日の清掃 */
.cs-clean .card-head { margin-bottom: 14px; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 10px; border-radius: 99px; background: var(--cb, #f0f4f9); color: var(--text-2); }
.cs-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.cs-chip b { color: var(--c, var(--text)); font-weight: 700; }
.cs-chip.is-tight { background: #f0f4f9; }
.cs-chip.is-tight .ico { width: 14px; height: 14px; }
.cs-chip.is-tight.has { background: var(--dirty); color: #fff; }
.cs-chip.is-tight.has b { color: #fff; }
.cs-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.cs-room {
  position: relative; display: flex; flex-direction: column; gap: 7px; text-align: left; padding: 14px 16px;
  border-radius: 14px; border: 1px solid var(--line); border-top: 5px solid var(--c); background: linear-gradient(180deg, var(--cb), #fff 55%);
  transition: transform .15s, box-shadow .15s;
}
.cs-room:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(29, 47, 69, .08); }
.cs-room.is-tight { border-color: #f3b7b2; box-shadow: 0 0 0 2px var(--dirty-bg); }
.cs-room header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cs-name { display: block; font-size: 20px; font-weight: 700; letter-spacing: .04em; line-height: 1.1; }
.cs-room header small { font-size: 10.5px; color: var(--text-2); letter-spacing: .05em; }
.cs-tight { position: absolute; top: -12px; right: 12px; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: #fff; background: var(--dirty); padding: 2px 9px; border-radius: 99px; }
.cs-tight .ico { width: 12px; height: 12px; }
.cs-line { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; color: var(--text-2); }
.cs-line .ico { width: 15px; height: 15px; margin-top: 2px; color: var(--muted); flex-shrink: 0; }
.cs-next { color: var(--text); }
.cs-next b { color: var(--blue-d); font-size: 14px; }
.cs-deadline { display: flex; align-items: center; gap: 6px; font-size: 12.5px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.cs-deadline .ico { width: 15px; height: 15px; color: var(--c); }
.cs-deadline b { font-size: 14px; }
.cs-deadline em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--c); }
.is-tight .cs-deadline em { color: var(--dirty); }
.cs-progress { display: flex; align-items: center; gap: 8px; }
.cs-progress .bar { flex: 1; height: 6px; }
.cs-progress .bar i { background: var(--c); }
.cs-progress span { font-size: 11.5px; color: var(--text-2); }
.cs-note { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 12.5px; color: var(--text-2); }
.cs-note span { display: inline-flex; align-items: center; gap: 5px; }
.cs-note .ico { width: 14px; height: 14px; }

/* チェックリスト（パネル） */
.cs-bar { height: 8px; border-radius: 99px; background: #e8eef5; overflow: hidden; margin-bottom: 10px; }
.cs-bar i { display: block; height: 100%; background: var(--done); border-radius: 99px; transition: width .2s; }
.cs-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cs-checklist li { border: 1px solid var(--line); border-radius: 12px; padding: 4px; background: #fff; }
.cs-checklist li.is-on { background: #f3fbf6; border-color: #cfe9d9; }
.cs-check { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; font-size: 14px; text-align: left; border-radius: 8px; }
.cs-check:hover:not(:disabled) { background: #f6f9fc; }
.cs-check:disabled { opacity: .5; cursor: not-allowed; }
.cs-check .checkbox { width: 24px; height: 24px; }
.cs-checklist li.is-on .cs-check { color: var(--text-2); }
.cs-stock { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 8px 8px 42px; font-size: 12.5px; }
.cs-stock input { width: 56px; text-align: center; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; outline: 0; }
.cs-stock .step { width: 28px; height: 28px; font-size: 15px; border-radius: 8px; }
.cs-stock .btn-mini { border-style: solid; border-color: var(--blue); color: var(--blue); }
.cs-assignee { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.cs-depart { margin-top: 8px; border-style: solid; border-color: #c2561a; color: #c2561a; }
.drawer-foot .btn:disabled, .drawer-foot .btn-outline:disabled { opacity: .45; cursor: not-allowed; }
.drawer-head h2 small { font-size: 13px; font-weight: 400; color: var(--muted); }

/* 備品：発注・購入 */
.cs-cat-field { min-width: 0; }
.cs-cat-field .chips { margin: 0; }
.sup-table td small { font-size: 11px; color: var(--muted); }
.sup-table .rt-name small { max-width: 200px; white-space: normal; }
.sup-act-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.sup-act-cell.is-panel { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
.sup-view { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--blue); white-space: nowrap; }
.sup-view .ico { width: 13px; height: 13px; }
.sup-view:hover { text-decoration: underline; }
.sup-note { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--in); white-space: nowrap; }
.sup-note .ico { width: 13px; height: 13px; }
.btn-mini.is-blue { border: 1px solid var(--blue); color: var(--blue); }
.btn-mini.is-blue:hover { background: var(--blue-l); }
.order-flow { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; counter-reset: of; }
.order-flow li { counter-increment: of; position: relative; text-align: center; font-size: 11.5px; padding: 6px 2px; border-radius: 8px; background: #f0f4f9; color: var(--muted); }
.order-flow li::before { content: counter(of) " "; font-weight: 700; }
.order-flow li.is-on { background: var(--blue-l); color: var(--blue-d); font-weight: 500; }
.form-sub { font-size: 12.5px; font-weight: 600; color: var(--blue-d); border-top: 1px solid var(--line); padding-top: 12px; }

@media (max-width: 1400px) {
  .cs-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .cs-stats { grid-template-columns: repeat(2, 1fr); }
  .cs-rooms { grid-template-columns: minmax(0, 1fr); }
  .cs-clean .card-head { flex-direction: column; align-items: flex-start; }
  .cs-stock { padding-left: 8px; }
  .sup-table td.sup-act-cell { grid-column: span 2; flex-direction: row; flex-wrap: wrap; }
}

/* ==========================================================
   スタッフページ
   ========================================================== */
/* タブ */
.st-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 0; }
.st-tab { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; font-size: 14px; font-weight: 500; color: var(--text-2); border-radius: 12px 12px 0 0; background: #eef3f9; }
.st-tab .ico { width: 17px; height: 17px; }
.st-tab:hover { background: #e3ecf6; }
.st-tab.is-active { background: var(--nav-1); color: #fff; }

.st-stats { grid-template-columns: repeat(6, 1fr); }
.st-stats a.res-stat { color: inherit; }
.st-sum-name { font-size: 20px; }
.c-alert-soft { --k: var(--dirty); background: linear-gradient(135deg, #fff 50%, #fff3f1); }
.st-body { display: flex; flex-direction: column; gap: 20px; }

/* アバター */
.st-av { --ac: #8b96a3; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; object-fit: cover;
  background: var(--ac); color: #fff; font-weight: 600; font-size: 14px; box-shadow: 0 0 0 2px #fff; }
.st-av.is-xs { width: 18px; height: 18px; font-size: 9.5px; box-shadow: 0 0 0 1.5px #fff; }
.st-av.is-sm { width: 26px; height: 26px; font-size: 12px; }
.st-av.is-lg { width: 56px; height: 56px; font-size: 22px; }
.st-av.is-ext { background: #eef1f4; color: var(--text-2); }
.st-av.is-ext .ico { width: 55%; height: 55%; }
.st-name { display: inline-flex; align-items: center; gap: 10px; }
.st-name > span { display: flex; flex-direction: column; line-height: 1.3; }
.st-name b { font-weight: 600; }
.res-table td .st-name small { display: block; }
.st-role { --ac: #8b96a3; display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 10px; border-radius: 99px; white-space: nowrap;
  color: var(--ac); background: color-mix(in srgb, var(--ac) 12%, #fff); }
.st-tel { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); font-weight: 500; white-space: nowrap; }
.st-tel .ico { width: 14px; height: 14px; }
.st-tel.is-big { padding: 7px 14px; border-radius: 10px; background: var(--stay); color: #fff; font-size: 14px; }
.st-tel.is-big .ico { width: 16px; height: 16px; }
.st-tel.is-big:hover { background: #26844f; }
.st-tel-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--stay-bg); color: var(--stay); flex-shrink: 0; }
.st-tel-icon.is-sm { width: 26px; height: 26px; }
.st-tel-icon .ico { width: 16px; height: 16px; }
.st-tel-icon:hover { background: var(--stay); color: #fff; }
.st-mail { font-size: 12.5px; color: var(--text-2); }
.st-status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; white-space: nowrap; }
.st-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-in { background: var(--stay-bg); color: var(--stay); }
.st-out { background: #eef1f4; color: var(--text-2); }
.st-planned { background: var(--in-bg); color: var(--in); }
.st-off { background: #f3f4f6; color: var(--muted); }

/* 一覧 */
.st-filter { margin-bottom: 12px; }
.st-table td { font-size: 13px; }
.st-table tbody tr { cursor: pointer; }
.st-more { text-align: right; }
.st-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.st-two.is-wide-left { grid-template-columns: 1.4fr 1fr; }
.st-roster { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.st-roster li { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid #edf1f6; }
.st-roster li:last-child { border-bottom: 0; }
.st-roster-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-roster-main b { font-weight: 600; cursor: pointer; }
.st-roster-main small { font-size: 12px; color: var(--text-2); }
.st-week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.st-ws { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.st-ws span { font-size: 11.5px; color: var(--text-2); }
.st-ws b { font-size: 20px; font-weight: 700; }
.st-ws b small { font-size: 11px; font-weight: 500; }
.st-ws.is-today { border-color: var(--blue); background: var(--blue-l); }
.st-ws.is-sat span { color: #3f7fcf; } .st-ws.is-sun span { color: #d0574b; }
.st-ws.is-warn { border-color: #f3b7b2; }
.st-ws em { position: absolute; top: 4px; right: 4px; display: inline-flex; align-items: center; gap: 1px; font-style: normal; font-size: 10px; color: var(--dirty); }
.st-ws em .ico { width: 11px; height: 11px; }
.st-notices ul { list-style: none; margin: 0; padding: 0; }
.st-notices li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #edf1f6; font-size: 13px; }
.st-notices li:last-child { border-bottom: 0; }
.st-notices li i { width: 7px; height: 7px; border-radius: 50%; background: var(--stay); flex-shrink: 0; }
.st-notices li span { flex: 1; }
.st-notices time { font-size: 12px; color: var(--muted); }

/* クイック打刻（大きなボタン） */
.qp { display: flex; flex-direction: column; gap: 14px; }
.qp-who { display: flex; gap: 6px; flex-wrap: wrap; }
.qp-person { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; background: #fff; }
.qp-person.is-active { border-color: var(--blue); background: var(--blue-l); font-weight: 600; }
.qp-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-radius: 14px; background: #f6f9fc; }
.qp-me { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.qp-me b { font-size: 15px; }
.qp-clock { text-align: right; }
.qp-clock span { display: block; font-size: 13px; color: var(--text-2); }
.qp-clock b { font-size: 44px; font-weight: 700; letter-spacing: .02em; line-height: 1.1; }
.qp-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qp-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; border-radius: 14px; font-size: 18px; font-weight: 700; color: #fff; box-shadow: 0 4px 12px rgba(29, 47, 69, .12); transition: transform .1s, opacity .15s; }
.qp-btn .ico { width: 24px; height: 24px; }
.qp-btn:active { transform: scale(.98); }
.qp-in { background: var(--stay); }
.qp-out { background: #e5484d; }
.qp-btn:disabled { opacity: .3; box-shadow: none; cursor: not-allowed; }
.qp-memo { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: 0; }
.qp-memo:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.st-punch-card.is-main .qp-btn { min-height: 76px; font-size: 20px; }

/* 役割・体制 */
.st-ask { background: linear-gradient(135deg, #fff 45%, var(--blue-l)); }
.st-ask h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; margin: 0 0 10px; }
.st-ask h2 .ico { color: var(--blue); width: 22px; height: 22px; }
.st-ask-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); max-width: 520px; }
.st-ask-search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 14px; background: none; color: var(--text); }
.st-ask-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.st-flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.st-flow-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); min-width: 104px; }
.st-flow-item:hover { border-color: var(--blue); }
.st-flow-item span { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-l); color: var(--blue); }
.st-flow-item span .ico { width: 18px; height: 18px; }
.st-flow-item b { font-size: 12.5px; font-weight: 600; }
.st-flow-item small { font-size: 11px; color: var(--text-2); }
.st-flow-arrow { color: var(--muted); display: grid; }
.st-flow-arrow .ico { width: 16px; height: 16px; }
.st-duties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.st-duty { display: flex; flex-direction: column; gap: 10px; transition: box-shadow .3s; }
.st-duty.is-flash { box-shadow: 0 0 0 3px var(--blue-l), var(--shadow); border-color: var(--blue); }
.st-duty header, .st-flowcard header { display: flex; gap: 12px; align-items: flex-start; }
.st-duty h3, .st-flowcard h3 { margin: 0; font-size: 15px; font-weight: 600; }
.st-duty header p, .st-flowcard header p { font-size: 12px; color: var(--text-2); }
.dt-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-l); color: var(--blue); flex-shrink: 0; }
.dt-icon .ico { width: 22px; height: 22px; }
.dt-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #f6f9fc; }
.dt-row.is-main { background: var(--blue-l); }
.dt-row.is-emg { background: #fff3f1; }
.dt-label { width: 58px; flex-shrink: 0; font-size: 11.5px; font-weight: 600; color: var(--text-2); padding-top: 4px; }
.dt-row.is-main .dt-label { color: var(--blue-d); }
.dt-row.is-emg .dt-label { color: var(--dirty); }
.dt-people { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.dt-person { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; }
.dt-person button:hover { color: var(--blue); }
.dt-links { display: flex; gap: 12px; font-size: 12.5px; }
.dt-links a { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); }
.dt-links .ico { width: 13px; height: 13px; }
.dt-pos { margin-left: auto; font-size: 11.5px; color: var(--blue-d); background: var(--blue-l); padding: 0 8px; border-radius: 6px; }

/* シフト */
.st-shift .card-head { flex-wrap: wrap; }
.st-shift-ctrl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-nav { width: 34px; height: 34px; border-radius: 9px; background: #f0f4f9; }
.st-nav[data-st-nav="-1"] .ico { transform: rotate(180deg); }
.st-nav .ico { width: 16px; height: 16px; }
.st-period { font-size: 15px; min-width: 150px; text-align: center; }
.st-warn-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 14px; border-radius: 12px; background: #fff3f1; border: 1px solid #f5d3cf; margin-bottom: 14px; color: var(--dirty); font-size: 13px; }
.st-warn-list > .ico { width: 16px; height: 16px; }
.st-warn-list button { font-size: 12px; padding: 2px 10px; border-radius: 99px; background: #fff; border: 1px solid #f3cfca; color: var(--text); }
.st-week-wrap { overflow-x: auto; }
.st-week { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 820px; }
.st-week th, .st-week td { border-bottom: 1px solid #edf1f6; padding: 8px 6px; vertical-align: top; }
.st-week thead th { background: #f6f9fc; font-weight: 500; }
.st-week thead th:first-child { border-radius: 10px 0 0 10px; }
.st-week thead th button { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12.5px; }
.st-week thead th small { font-size: 10.5px; color: var(--muted); }
.st-week thead th em { display: inline-flex; align-items: center; gap: 2px; font-style: normal; font-size: 10.5px; color: #fff; background: var(--dirty); padding: 0 6px; border-radius: 99px; }
.st-week thead th em .ico { width: 10px; height: 10px; }
.st-week th.is-sat b { color: #3f7fcf; } .st-week th.is-sun b { color: #d0574b; }
.st-week .is-today { background: #f3f8fe !important; }
.st-week tbody th { text-align: left; font-weight: 500; white-space: nowrap; width: 150px; }
.st-week tbody th small { font-size: 11px; color: var(--muted); }
.sh-chip { display: inline-flex; flex-direction: column; gap: 1px; width: 100%; font-size: 11.5px; padding: 5px 8px; border-radius: 8px; background: #eef1f4; color: var(--text-2); line-height: 1.35; }
.sh-chip b { font-size: 12px; color: var(--text); }
.sh-chip.is-clean { background: var(--done-bg); color: #0f7c83; }
.sh-chip.is-onsite { background: var(--in-bg); color: var(--in); }
.sh-chip.is-remote { background: #efeafd; color: #6d4fc2; }
.sh-off { display: block; text-align: center; font-size: 11.5px; color: #c3ccd6; padding-top: 8px; }
.sh-legend { display: flex; gap: 8px; margin-top: 10px; }
.sh-legend .sh-chip { width: auto; }
.st-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.st-mh { text-align: center; font-size: 12px; color: var(--text-2); padding: 4px 0; }
.st-md { position: relative; min-height: 88px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 6px; border-radius: 10px; border: 1px solid var(--line); background: #fff; text-align: left; }
.st-md:hover { border-color: var(--blue); }
.st-md.is-out { opacity: .4; }
.st-md.is-today { border-color: var(--blue); background: var(--blue-l); }
.st-md.is-warn { border-color: #f3b7b2; background: #fffafa; }
.st-md-d { font-size: 13px; font-weight: 600; }
.st-md.is-sat .st-md-d { color: #3f7fcf; } .st-md.is-sun .st-md-d { color: #d0574b; }
.st-md-av { display: flex; flex-wrap: wrap; gap: 2px; }
.st-md-clean { font-size: 10.5px; color: #0f7c83; background: var(--done-bg); padding: 0 6px; border-radius: 5px; }
.st-md.is-warn .st-md-clean { color: var(--dirty); background: var(--dirty-bg); }
.st-md em { position: absolute; top: 6px; right: 6px; color: var(--dirty); display: grid; }
.st-md em .ico { width: 14px; height: 14px; }
.st-simple { list-style: none; margin: 0; padding: 0; }
.st-simple li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #edf1f6; font-size: 13px; }
.st-simple li:last-child { border-bottom: 0; }
.st-simple b { min-width: 72px; font-weight: 600; }

/* 勤怠 */
.att-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.att-kpis div { background: #f6f9fc; border-radius: 12px; padding: 10px 12px; }
.att-kpis div.is-in { background: var(--stay-bg); }
.att-kpis span { display: block; font-size: 12px; color: var(--text-2); }
.att-kpis b { font-size: 24px; font-weight: 700; }
.att-kpis small { font-size: 13px; font-weight: 500; margin-left: 2px; }
.att-table td { font-size: 13px; }
.st-select { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }

/* 緊急連絡網 */
.st-emg { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.st-flowcard { display: flex; flex-direction: column; gap: 12px; border-top: 4px solid var(--blue); }
.st-flowcard.is-urgent { border-top-color: var(--dirty); background: linear-gradient(180deg, #fff6f5, #fff 40%); }
.st-flowcard.is-urgent .dt-icon { background: var(--dirty-bg); color: var(--dirty); }
.emg-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.emg-steps > li:not(.emg-next) { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: #f6f9fc; }
.emg-no { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.is-urgent .emg-no { background: var(--dirty); }
.emg-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.emg-who b { font-size: 14.5px; font-weight: 600; }
.emg-who small { font-size: 11.5px; color: var(--text-2); }
.emg-tags { display: flex; gap: 4px; margin-top: 2px; }
.emg-tags i { font-style: normal; font-size: 10.5px; padding: 0 6px; border-radius: 5px; }
.emg-tags .is-line { background: #e3f5ea; color: #1f8a4c; }
.emg-tags .is-ok { background: var(--blue-l); color: var(--blue-d); }
.emg-tags .is-ng { background: #f3f4f6; color: var(--muted); }
.emg-next { display: flex; align-items: center; gap: 4px; padding-left: 16px; font-size: 11px; color: var(--muted); }
.emg-next .ico { width: 12px; height: 12px; transform: rotate(90deg); }
.emg-note { font-size: 12.5px; color: var(--text-2); }
.emg-note a { color: var(--blue); display: inline-flex; align-items: center; gap: 3px; }
.emg-note .ico { width: 13px; height: 13px; }

/* スタッフ詳細パネル */
.st-ph { display: flex; gap: 14px; align-items: center; }
.st-ph h2 { margin: 4px 0 0 !important; }
.st-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.st-duty-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1400px) {
  .st-stats { grid-template-columns: repeat(3, 1fr); }
  .st-duties { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .st-two, .st-two.is-wide-left { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .st-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 4px; border-bottom: 0; }
  .st-tab { padding: 9px 14px; border-radius: 99px; white-space: nowrap; font-size: 13px; flex-shrink: 0; }
  .st-stats { grid-template-columns: repeat(2, 1fr); }
  .st-duties, .st-emg { grid-template-columns: minmax(0, 1fr); }
  /* スマホは操作（打刻・電話・今日いる人）を先に、サマリーは下に */
  #page-staff .st-tabs { order: 1; }
  #page-staff .st-body { order: 2; }
  #page-staff .st-stats { order: 3; }
  /* スマホは「今日いる人」と「打刻」を先に */
  .st-body-list { display: flex; flex-direction: column; }
  .st-body-list > .st-two:first-of-type { order: -1; }
  .st-body-list .st-punch-card { order: -1; }
  .st-two { display: flex; flex-direction: column; }
  .st-table td.st-more { display: none !important; }
  .st-week-strip { grid-template-columns: repeat(4, 1fr); }
  .qp-clock b { font-size: 36px; }
  .qp-btn { min-height: 72px; font-size: 19px; }
  .st-month { gap: 2px; }
  .st-md { min-height: 64px; padding: 4px; }
  .st-md-clean { font-size: 9px; padding: 0 3px; }
  .st-flow-item { min-width: 0; flex: 1 1 28%; }
  .st-flow-arrow { display: none; }
  .emg-steps > li:not(.emg-next) { flex-wrap: wrap; }
  .emg-steps .st-tel.is-big { width: 100%; justify-content: center; padding: 11px; font-size: 15px; }
}

/* ==========================================================
   設定ページ
   ========================================================== */
.set-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.set-card { padding: 22px 22px 12px; }
.set-card header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.set-icon { --sc: var(--blue); width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  color: var(--sc); background: color-mix(in srgb, var(--sc) 12%, #fff); }
.set-icon .ico { width: 26px; height: 26px; }
.set-card h2 { margin: 0; font-size: 17px; font-weight: 700; }
.set-card header p { font-size: 12.5px; color: var(--text-2); }
.set-items { list-style: none; margin: 0; padding: 0; }
.set-items li + li { border-top: 1px solid #edf1f6; }
.set-items button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 6px; text-align: left; font-size: 14px; border-radius: 8px; transition: background .15s; }
.set-items button:hover { background: #f6f9fc; color: var(--blue-d); }
.set-label { flex: 1; min-width: 0; }
.set-label small { display: block; font-size: 11.5px; color: var(--muted); }
.set-page { font-size: 11px; padding: 0 8px; border-radius: 6px; background: var(--blue-l); color: var(--blue-d); white-space: nowrap; }
.set-items .chev .ico { width: 14px; height: 14px; }
.set-help { display: flex; align-items: center; gap: 16px; background: linear-gradient(120deg, #fff 45%, var(--blue-l)); }
.set-help-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #e2f2f3; color: #139aa3; flex-shrink: 0; }
.set-help-icon .ico { width: 26px; height: 26px; }
.set-help > div:nth-child(2) { flex: 1; }
.set-help h2 { margin: 0; font-size: 17px; font-weight: 700; }
.set-help p { font-size: 13px; color: var(--text-2); }
.set-help-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.set-help-btns .btn-outline-sm, .set-help-btns .btn { padding: 10px 20px; }

/* パネルの中身 */
.set-panel { padding-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.set-panel .form { padding-top: 0; }
.set-note { display: flex; align-items: flex-start; gap: 6px; }
.set-note .ico { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; color: #6d4fc2; }
.set-logo { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 12px; background: #f6f9fc; }
.set-logo img { width: 120px; padding: 14px 16px; border-radius: 12px; background: linear-gradient(180deg, var(--nav-1), var(--nav-2)); }
.set-logo p { font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.set-logo .btn-mini:disabled { opacity: .5; border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.set-list { list-style: none; margin: 0; padding: 0; }
.set-list li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid #edf1f6; font-size: 13.5px; }
.set-list li:last-child { border-bottom: 0; }
.set-list b { min-width: 120px; font-weight: 600; }
.set-list span { flex: 1; color: var(--text-2); }
.set-list .set-tag { flex: none; }
.set-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.set-table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--text-2); background: #f3f7fb; padding: 7px 8px; }
.set-table td { padding: 9px 8px; border-bottom: 1px solid #edf1f6; }
.set-table .num { text-align: center; }
.set-table td.num:last-child, .set-table th.num:last-child { text-align: center; }
.set-tag { display: inline-block; font-size: 11.5px; font-weight: 500; padding: 1px 8px; border-radius: 6px; background: var(--stay-bg); color: var(--stay); white-space: nowrap; }
.set-tag.is-gray { background: #eef1f4; color: var(--text-2); }
.set-on { color: var(--stay); display: inline-grid; }
.set-on .ico { width: 16px; height: 16px; stroke-width: 2.6; }
.set-off { color: #c3ccd6; }
.set-h { font-size: 13.5px; font-weight: 600; margin: 6px 0 0; }
.set-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.set-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; padding: 5px 12px; border-radius: 99px; background: var(--blue-l); color: var(--blue-d); }
.set-chip .ico { width: 13px; height: 13px; stroke-width: 2.6; }
.set-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.set-photo { aspect-ratio: 4 / 3; border: 2px dashed #d5dee8; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); }
.set-photo span .ico { width: 20px; height: 20px; }
.set-photo b { font-size: 13px; color: var(--text); }
.set-photo small { font-size: 11px; }
.set-links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.set-links a { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); }
.set-links .ico { width: 14px; height: 14px; }
.set-roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.set-role { padding: 10px 12px; border-radius: 12px; background: #f6f9fc; }
.set-role b { display: block; font-size: 14px; }
.set-role small { display: block; font-size: 11px; color: var(--muted); }
.set-role p { font-size: 12.5px; margin-top: 4px; }
.set-toggles { display: flex; flex-direction: column; gap: 6px; }
.set-toggle { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: #f6f9fc; cursor: pointer; font-size: 14px; }
.set-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.set-toggle i { position: relative; width: 44px; height: 26px; border-radius: 99px; background: #c9d3de; transition: background .2s; flex-shrink: 0; }
.set-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.set-toggle input:checked + i { background: var(--stay); }
.set-toggle input:checked + i::after { transform: translateX(18px); }
.set-toggle input:focus-visible + i { box-shadow: 0 0 0 3px var(--blue-l); }
.set-radio { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #f6f9fc; font-size: 14px; cursor: pointer; }
.set-radio input { accent-color: var(--blue); width: 18px; height: 18px; }
.set-radio.is-disabled { color: var(--muted); cursor: not-allowed; }
.set-exports { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.set-export { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); text-align: left; }
.set-export:hover { border-color: var(--blue); background: #f8fbfe; }
.set-export > .ico { width: 18px; height: 18px; color: var(--blue); }
.set-export b { font-size: 13.5px; font-weight: 600; }
.set-export small { font-size: 11.5px; color: var(--muted); }
.set-export span { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--blue); margin-top: 4px; }
.set-export span .ico { width: 12px; height: 12px; transform: rotate(90deg); }
.set-doc h3 { font-size: 14px; margin: 0 0 4px; }
.set-doc p { font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.set-panel .btn-outline:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 1280px) {
  .set-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .set-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .set-card { padding: 16px 16px 8px; }
  .set-help { flex-direction: column; align-items: flex-start; }
  .set-help-btns { width: 100%; }
  .set-help-btns > * { flex: 1; justify-content: center; }
  .set-roles, .set-exports { grid-template-columns: 1fr; }
  .set-photos { grid-template-columns: repeat(2, 1fr); }
}

/* 動画マニュアルの追加・編集 */
.mn-storage {padding:14px; border-top:1px solid var(--line); font-size:12px; line-height:1.7;}
.mn-storage .btn-outline-sm {margin:4px 0; display:inline-flex; flex-wrap:wrap; cursor:pointer;}
.mn-storage input {max-width:100%; margin-top:6px; font-size:12px;}
.mn-origin {background:var(--out-bg); padding:10px; border-radius:8px; font-size:12px; margin:12px 0;}
.mn-video-actions {padding:14px; background:var(--card, #fff); color:var(--text);}
.mn-video-actions p {font-size:12px; margin-top:10px;}
.mn-video {aspect-ratio:auto;}
.mn-video iframe, .mn-video-ph {aspect-ratio:16 / 9; width:100%; height:auto; display:block;}
.mn-video-ph {position:relative;}
.mn-desc, .mn-step-main > p, .mn-points li span {white-space:pre-wrap; overflow-wrap:anywhere;}
.mn-item-main, .mn-head {overflow-wrap:anywhere;}
.mn-title-row {flex-wrap:wrap;}
.mn-title-row h2 {min-width:0; overflow-wrap:anywhere;}
#mnf-form .mf-step {display:grid; grid-template-columns:1fr; padding:12px; border:1px solid var(--line); border-radius:10px; margin:10px 0;}
#mnf-form .mf-step label {display:grid; gap:5px; font-size:13px;}
#mnf-form textarea {width:100%; box-sizing:border-box;}
#mnf-error {position:sticky; bottom:0; padding:12px; background:#fff3ef;}
.mn-cat {min-height:40px;}
@media(max-width:600px) { .mn-thumb {width:92px; height:64px;} .mn-title-row .btn {min-height:44px;} .mn-item {padding:14px 10px;} }
@media print { [data-mn-edit], .mn-storage {display:none !important;} }

/* 2026-09-29: 動画を通常の配置に戻し、下のYouTubeボタンを隠さない */
.mn-video iframe { position: relative; inset: auto; display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.mn-video-actions { position: relative; }

/* 動画から下書きを自動作成 */
.mn-ai-box {padding:16px;border:1px solid #b6d5f2;border-radius:12px;background:#f1f7fd;line-height:1.7;}
.mn-ai-box h3 {margin:0 0 8px;font-size:17px;color:var(--blue-d);}
.mn-ai-box p {font-size:13px;margin:8px 0;}
.mn-ai-box .btn, .mn-ai-box .btn-outline-sm {margin:8px 4px 8px 0;white-space:normal;}
.mn-ai-box > a {display:inline-block;font-size:13px;color:var(--blue);text-decoration:underline;margin-top:8px;}
#mn-ai-preview {margin-top:16px;background:#fff;border-radius:8px;padding:12px;}
#mn-ai-preview-text, .mn-ai-source pre {white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:13px;max-height:360px;overflow-y:auto;}
.mn-ai-review {display:flex;align-items:flex-start;gap:8px;padding:12px;background:#fff3dc;border-radius:8px;}
.mn-ai-review[hidden], #mn-ai-controls[hidden], #mn-ai-preview[hidden], .mn-ai-box button[hidden] {display:none;}
.mn-ai-review input {width:20px;height:20px;flex-shrink:0;}
.mn-ai-transcript summary {cursor:pointer;color:var(--blue);padding:8px 0;}
.mn-ai-transcript textarea {width:100%;font:inherit;font-size:13px;}
@media(max-width:900px){ .mn-ai-source {order:5;} }
