/* v1091：機材管理・機材予約（kizai/）の見た目 */
:root { --bg: #f4f6f9; --panel: #ffffff; --text: #1f2933; --muted: #6b7785; --line: #dde3ea; --primary: #1d4ed8; --primary-dark: #1e40af; --danger: #c62828; --header: #0f1f3a; --rep: #fde2e2; --rep-line: #f5b5b5; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: "Yu Gothic UI", "Meiryo", "Hiragino Kaku Gothic ProN", sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
header { background: var(--header); color: #fff; padding: 14px 24px; display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 40; }
header h1 { font-size: 18px; margin: 0; font-weight: 600; letter-spacing: .05em; }
header .crumb { font-size: 12px; opacity: .7; margin-bottom: 2px; }
.menu-back { margin-left: auto; font-family: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 4px; cursor: pointer; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.menu-back:hover { background: rgba(255,255,255,.12); }
main { padding: 16px 24px 40px; }
.wrap { max-width: 1180px; margin: 0 auto; }
button { font-family: inherit; font-size: 13px; cursor: pointer; padding: 7px 14px; border-radius: 4px; border: 1px solid #a9bdf0; background: #e8efff; color: #1e40af; font-weight: 600; white-space: nowrap; }
button:hover { background: #d6e2ff; border-color: #8aa6ea; }
button.primary { background: var(--primary); color: #fff; border-color: var(--primary); min-width: 90px; }
button.primary:hover { background: var(--primary-dark); }
button.danger { background: #fff; color: var(--danger); border-color: #efb4b4; }
button.danger:hover { background: #fdecec; }
button:disabled, button:disabled:hover { cursor: not-allowed; background: #f1f3f6; color: #a7afba; border-color: #dde3ea; }
.bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; margin-bottom: 10px; }
.bar .spacer { flex: 1; }
.bar label.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #3d4a5c; cursor: pointer; }
/* v1366（455）：時刻の欄（input[type=time]）も日付の欄と同じ見た目に */
input[type=text], input[type=date], input[type=time], select, textarea { font: inherit; font-size: 14px; height: 34px; padding: 0 8px; border: 1px solid #cfd6df; border-radius: 4px; background: #fff; color: var(--text); }
textarea { height: auto; min-height: 60px; padding: 6px 8px; resize: vertical; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #93b4f5; }
input::placeholder, textarea::placeholder { color: #c4cad3; opacity: 1; }   /* 入力例は薄く */
/* 種類のタブ */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: -1px; position: relative; z-index: 1; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border-radius: 6px 6px 0 0; border: 1px solid var(--line); border-bottom-color: #cfd6df; background: #eef1f5; color: #4b5767; padding: 8px 14px; flex: 0 0 auto; }
.tabs button:hover { background: #e3e8ef; }
.tabs button.on { background: var(--panel); color: var(--primary-dark); border-color: #cfd6df; border-bottom-color: var(--panel); }
/* v1365（447）：選んでいるタブは表の見出しの行と同じ色（#dfe6ef）・ほかのタブはより薄く・外枠をはっきり */
.tabs button { background: #f7f9fc; color: #5b6878; border-color: #9fafc4; border-bottom-color: #9fafc4; }
.tabs button:hover { background: #edf1f6; }
.tabs button.on { background: #dfe6ef; color: #1f2d3d; font-weight: 700; border-color: #9fafc4; border-bottom-color: #dfe6ef; }
.tabs button .n { font-size: 11px; color: #9aa4b1; margin-left: 4px; font-weight: 600; }
/* v1208：PC・タブレットは入りきらないタブを折り返す（スクロールバーを隠していたため、マウスでは右のタブに行けなかった）。スマホは 1 段のまま横にスワイプ */
html:not(.hs3-mfit) .tabs { flex-wrap: wrap; overflow-x: visible; row-gap: 3px; }
.sheet { background: var(--panel); border: 1px solid #cfd6df; border-radius: 0 6px 6px 6px; }
.empty { color: var(--muted); padding: 24px; text-align: center; }
.badge-rep { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--danger); border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
.sub { font-size: 12px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #0f1f3a; color: #fff; padding: 10px 18px; border-radius: 6px; font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 100; }
.toast.show { opacity: 1; }

/* ---------- 小画面 ---------- */
dialog.kz { border: 0; border-radius: 10px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 16px 48px rgba(15,31,58,.3); color: var(--text); }
dialog.kz::backdrop { background: rgba(15,31,58,.45); }
dialog.kz .dh { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 700; position: sticky; top: 0; background: #fff; z-index: 2; }
dialog.kz .db { padding: 14px 18px; }
dialog.kz .df { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: #fff; }
dialog.kz .df .spacer { flex: 1; }
.fr { display: grid; grid-template-columns: 7.5em 1fr; gap: 6px 10px; align-items: center; margin-bottom: 10px; }
.fr > label { font-weight: 700; font-size: 13px; color: #3d4a5c; }
.fr > label.top { align-self: start; padding-top: 8px; }
.fr input[type=text], .fr select, .fr textarea { width: 100%; }
.fr .dt { display: flex; gap: 6px; flex-wrap: wrap; }
.fr .dt input[type=date] { flex: 0 0 150px; width: 150px; min-width: 0; }
.fr .dt select { flex: 0 0 100px; width: 100px; }
.req::after { content: "＊"; color: var(--danger); font-size: 11px; margin-left: 2px; }
/* 機材のチップ（一緒に予約する機材・予約する機材） */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: #eef3ff; border: 1px solid #c7d6f7; color: #1e3a8a; border-radius: 14px; padding: 3px 4px 3px 10px; font-size: 13px; }
.chip.rep { background: var(--rep); border-color: var(--rep-line); color: #8a1c1c; }
.chip .x { border: 0; background: transparent; color: #7b8aa6; padding: 0 6px; font-size: 14px; line-height: 1; }
.chip .x:hover { color: var(--danger); background: transparent; }
.chips select { flex: 1 1 180px; min-width: 0; color: var(--muted); }
.sec-h { margin: 16px 0 8px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sec-h .spacer { flex: 1; }
/* 修理履歴・受付の記録の一覧 */
.hist { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.hist .r { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 10px; border-top: 1px solid #edf0f4; font-size: 13px; }
.hist .r:first-child { border-top: 0; }
.hist .r .when { color: #3d4a5c; font-variant-numeric: tabular-nums; }
.hist .r .open { color: var(--danger); font-weight: 700; }
.hist .r button { grid-row: 1 / span 2; grid-column: 2; align-self: center; padding: 4px 10px; font-size: 12px; }
.hist .none { padding: 10px; color: var(--muted); font-size: 13px; }

/* ---------- 機材管理（kanri.html） ---------- */
table.kz { width: 100%; border-collapse: separate; border-spacing: 0; }
table.kz th, table.kz td { border-bottom: 1px solid #e3e8ee; padding: 6px 10px; text-align: left; vertical-align: middle; }
table.kz tr:last-child > td { border-bottom: 0; }
table.kz thead th { white-space: nowrap; background: #e8efff; color: #1e3a8a; font-size: 13px; font-weight: 700; height: 36px; position: sticky; top: 0; }
table.kz thead th:first-child { border-top-left-radius: 0; }
table.kz tbody tr { cursor: pointer; }
table.kz tbody tr:hover td { background: #f5f8ff; }
table.kz td.no { width: 1%; white-space: nowrap; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
table.kz td.nm b { font-weight: 700; }
table.kz td.nm .set { font-size: 12px; color: #4b6cb7; margin-top: 2px; }
table.kz td.st { width: 1%; white-space: nowrap; }
table.kz td.dt { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.kz td.rp { white-space: nowrap; font-size: 13px; color: #3d4a5c; }
table.kz td.rp .open { color: var(--danger); font-weight: 700; }
table.kz tr.rep td { background: #fff5f5; }
/* 並び順の変更 */
table.kz td.ord { display: none; width: 1%; white-space: nowrap; }
body.reordering table.kz td.ord, body.reordering table.kz th.ord { display: table-cell; }
table.kz th.ord { display: none; width: 1%; }
body.reordering table.kz tbody tr { cursor: default; }
body.reordering .bar { background: #fff8e1; border-color: #f5d27a; }
body.reordering .bar > :not(.rbar) { display: none !important; }
.rbar { display: none; align-items: center; gap: 8px; flex: 1 1 100%; }
body.reordering .rbar { display: flex; }
.handle { display: inline-block; width: 22px; text-align: center; color: #9aa5b4; cursor: grab; font-size: 16px; vertical-align: middle; user-select: none; }
td.ord .mv { width: 28px; height: 26px; padding: 0; font-size: 10px; line-height: 1; color: #3d4a5c; margin-left: 2px; }
tr.dragging { opacity: .4; }
tr.drop-before td { box-shadow: inset 0 3px 0 var(--primary); }
tr.drop-after td { box-shadow: inset 0 -3px 0 var(--primary); }
/* スマホ：表をカードに */
html.hs3-mfit main { padding-top: 10px; }
html.hs3-mfit input[type=text], html.hs3-mfit input[type=date], html.hs3-mfit input[type=time], html.hs3-mfit select, html.hs3-mfit textarea { font-size: 16px; }
html.hs3-mfit table.kz thead { display: none; }
html.hs3-mfit table.kz, html.hs3-mfit table.kz tbody { display: block; }
html.hs3-mfit table.kz tbody tr { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; padding: 10px 12px; border-bottom: 1px solid #e3e8ee; }
html.hs3-mfit table.kz tbody tr:last-child { border-bottom: 0; }
html.hs3-mfit table.kz td { border: 0; padding: 0; background: transparent !important; }
html.hs3-mfit table.kz td.no { grid-row: 1 / span 3; align-self: start; padding-top: 2px; }
html.hs3-mfit table.kz td.nm { grid-column: 2; }
html.hs3-mfit table.kz td.st { grid-column: 3; grid-row: 1; }
html.hs3-mfit table.kz td.x { grid-column: 2 / span 2; font-size: 12px; color: var(--muted); }
html.hs3-mfit table.kz td.x:empty { display: none; }
html.hs3-mfit table.kz td.x[data-l]:not(:empty)::before { content: attr(data-l) "："; }
html.hs3-mfit table.kz td.ord { grid-column: 3; grid-row: 1 / span 3; align-self: center; }
html.hs3-mfit .fr { grid-template-columns: 1fr; gap: 4px; }
html.hs3-mfit .fr > label.top { padding-top: 0; }

/* ---------- 機材予約（yoyaku.html） ---------- */
.wkbar .wk { font-size: 15px; font-weight: 700; margin: 0 6px; white-space: nowrap; }
.wkbar input[type=date] { width: 150px; }
.gridwrap { overflow: auto; max-height: calc(100vh - 210px); border-radius: 0 6px 6px 6px; }
html.hs3-frame .gridwrap { max-height: none; }
table.wk { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 860px; table-layout: fixed; }
table.wk th, table.wk td { border-right: 1px solid #e3e8ee; border-bottom: 1px solid #e3e8ee; vertical-align: top; }
table.wk thead th { position: sticky; top: 0; z-index: 3; background: #e8efff; color: #1e3a8a; font-size: 13px; font-weight: 700; height: 34px; vertical-align: middle; text-align: center; }
table.wk thead th.sun, table.wk .sun .dn { color: #c62828; }
table.wk thead th.sat, table.wk .sat .dn { color: #1d4ed8; }
table.wk thead th.today { background: #fde68a; }
table.wk td.today { background: #fffbeb; }
table.wk th.it, table.wk td.it { position: sticky; left: 0; z-index: 2; width: 180px; background: #fff; text-align: left; }
table.wk thead th.it { z-index: 4; background: #e8efff; padding-left: 10px; }
table.wk td.it { padding: 6px 10px; }
table.wk td.it b { display: block; font-size: 14px; }
table.wk td.it .nmln { display: block; white-space: nowrap; }   /* v1241：一時追加の札は管理名称の右（同じ行） */
table.wk td.it .nmln > b { display: inline; }
table.wk td.it .sub { display: block; }
table.wk tr.rep td.it { background: #fde2e2; }
table.wk td.d { height: 54px; padding: 3px; cursor: pointer; }
table.wk td.d:hover { background: #f5f8ff; }
table.wk td.d.rep { background: var(--rep); }
table.wk td.d.rep::before { content: "修理中"; display: block; font-size: 11px; color: #a61b1b; font-weight: 700; text-align: center; }
table.wk tbody tr:nth-child(even) td.d:not(.rep):not(.today) { background: #fafbfc; }
.rv { display: block; background: var(--rv-bg, #e6f4ea); border: 1px solid var(--rv-line, #b7dfc3); border-radius: 4px; padding: 2px 5px; margin-bottom: 3px; cursor: pointer; text-align: center; line-height: 1.3; }
.rv:hover { filter: brightness(.96); }
.rv .t { display: block; font-size: 13px; font-weight: 700; color: #1f2933; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv .tm { display: block; font-size: 11px; color: #3d4a5c; font-variant-numeric: tabular-nums; }
.rv .lg { display: block; font-size: 10px; color: #6b7785; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* スマホ：日ごとのカード */
.dayview { display: none; }
html.hs3-mfit .gridwrap { display: none; }
html.hs3-mfit .dayview { display: block; }
html.hs3-mfit .wkbar .wk { font-size: 14px; margin: 0; }
html.hs3-mfit .wkbar input[type=date] { width: 100%; order: 9; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 8px; }
.days button { padding: 6px 0; display: flex; flex-direction: column; align-items: center; line-height: 1.2; background: #fff; border-color: var(--line); color: var(--text); }
.days button .dw { font-size: 11px; font-weight: 600; }
.days button.sun .dw { color: #c62828; }
.days button.sat .dw { color: #1d4ed8; }
.days button.today { border-color: #f59e0b; }
.days button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.days button.on .dw { color: #fff; }
.dcard { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px 12px; border-bottom: 1px solid #e3e8ee; }
.dcard:last-child { border-bottom: 0; }
.dcard.rep { background: #fff5f5; }
.dcard .h { display: flex; align-items: baseline; gap: 8px; }
.dcard .h b { font-size: 15px; }
.dcard .h .add { margin-left: auto; padding: 4px 12px; }
.dcard .rv { text-align: left; }
.dcard .none { font-size: 12px; color: #b0b8c3; }
/* v1093：列が増えたので、表は枠の中で横にスクロール（スマホはカード） */
.tblwrap { overflow-x: auto; border-radius: 0 6px 6px 6px; }
table.kz { min-width: 1080px; }
table.kz thead th { position: static; }
html.hs3-mfit table.kz { min-width: 0; }
/* 設置場所の小画面 */
.plist .r { grid-template-columns: 1fr auto; align-items: center; }
.plist .r input { width: 100%; }
.plist .r .pb { display: inline-flex; align-items: center; gap: 4px; }
.plist .r .pb .sub { min-width: 3em; text-align: right; }
.plist .r .mv { width: 28px; height: 28px; padding: 0; font-size: 10px; }
.plist .r .x { border: 0; background: transparent; color: #9aa4b1; font-size: 16px; width: 28px; height: 28px; padding: 0; }
.plist .r .x:hover { color: var(--danger); background: #fdecec; }
.padd { display: flex; gap: 8px; margin-top: 10px; }
.padd input { flex: 1; min-width: 0; }
/* v1094：機材の小画面の項目名（設置場所・メーカー・記録メディア）は押すと値の一覧 */
.fr > button.lk { justify-self: start; border: 0; background: transparent; padding: 0; font-size: 13px; font-weight: 700; color: var(--primary-dark); text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; min-width: 0; }
.fr > button.lk:hover { background: transparent; color: var(--primary); text-decoration-style: solid; }
/* v1094：PC・タブレットは上の操作の段を折り返さない（狭いときは詰めて、それでも入らなければ段の中を横にスクロール） */
html:not(.hs3-mfit) .bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
html:not(.hs3-mfit) .bar > * { flex-shrink: 0; }
html:not(.hs3-mfit) .bar > .spacer { flex: 1 1 0; min-width: 4px; }
html:not(.hs3-mfit) .bar .rbar { flex: 1 0 auto; }
html:not(.hs3-mfit) .wkbar .wk { font-size: clamp(12px, 1.25vw, 15px); margin: 0 2px; }
/* v1096：機材の小画面の参照モード（入力欄を文字のように見せる）・廃棄済み／除却済みの印 */
dialog.kz.view .fr input:not([type=checkbox]), dialog.kz.view .fr select, dialog.kz.view .fr textarea { border-color: transparent; background: transparent; appearance: none; -webkit-appearance: none; color: var(--text); -webkit-text-fill-color: var(--text); opacity: 1; padding-left: 0; }
dialog.kz.view .fr input::placeholder { color: transparent; -webkit-text-fill-color: transparent; }
dialog.kz.view .fr input[type=date].empty { color: transparent; -webkit-text-fill-color: transparent; }
dialog.kz.view .fr input[type=checkbox]:disabled { opacity: 1; }
dialog.kz.view .fr input[type=date]::-webkit-calendar-picker-indicator { display: none; }
dialog.kz .fr :disabled:not(button) { cursor: default; }
dialog.kz:not(.view) .fr input:disabled, dialog.kz:not(.view) .fr select:disabled { background: #f4f6f9; color: #8a94a3; -webkit-text-fill-color: #8a94a3; }
dialog.kz.view .fr > button.lk, .fr > button.lk:disabled { color: #3d4a5c; text-decoration: none; cursor: default; }
.badge-st { font-size: 11px; font-weight: 700; color: #fff; background: #6b7785; border-radius: 10px; padding: 1px 8px; }
button.pdanger { background: var(--danger); border-color: var(--danger); }
button.pdanger:hover { background: #a61b1b; }
/* 廃棄済み・除却済みの一覧（見出しを押すと開く） */
.dsec { border-top: 1px solid #cfd6df; }
.secbar { display: block; width: 100%; text-align: left; border: 0; border-radius: 0; background: #f4f6f9; color: #3d4a5c; padding: 10px 14px; font-size: 13px; }
.secbar:hover { background: #e9edf2; }
.secbar:disabled, .secbar:disabled:hover { background: #f8f9fb; color: #a7afba; border: 0; }
table.kz.dsp tbody tr td { color: #5b6677; }
table.kz.dsp { min-width: 1000px; }
html.hs3-mfit table.kz.dsp { min-width: 0; }
/* v1097 */
a.back { display: inline-block; margin: 0 0 10px 2px; color: #1e40af; font-weight: 600; font-size: 13px; text-decoration: none; }
a.back:hover { text-decoration: underline; }
table.wk thead th.it { text-align: center; padding-left: 0; }
table.wk td.it { cursor: pointer; }
table.wk td.it:hover b { color: var(--primary); text-decoration: underline; }
.dcard .h b { cursor: pointer; }
.chip.lock { padding-right: 10px; }
dl.kv { display: grid; grid-template-columns: 7.5em 1fr; gap: 6px 10px; margin: 0 0 6px; font-size: 14px; }
dl.kv dt { font-weight: 700; font-size: 13px; color: #3d4a5c; }
dl.kv dd { margin: 0; min-height: 1.2em; }
html.hs3-mfit dl.kv { grid-template-columns: 6.5em 1fr; }
/* v1106：週の表示・表の見出し：日曜・祝日は赤、土曜は青。全角かっこの外側の空きを詰める（K.dowHtml） */
.wkbar .wk .sun { color: #c62828; }
.wkbar .wk .sat { color: #1d4ed8; }
.pl { margin-left: -.45em; }
.pr { margin-right: -.45em; }
/* v1107：週の表示は押すとカレンダー。色は曜日の文字だけ */
button.wkbtn { background: transparent; border: 0; color: var(--text); padding: 2px 4px; min-width: 0; font-weight: 700; cursor: pointer; }
button.wkbtn:hover { background: transparent; text-decoration: underline; text-underline-offset: 3px; }
button.wkbtn::after { content: ""; display: inline-block; margin-left: 6px; vertical-align: middle; width: 10px; height: 6px; background: currentColor; clip-path: polygon(0 0, 100% 0, 50% 100%); background: var(--muted); }   /* v1368（467） */
html:not(.hs3-mfit) .wkbar button.wkbtn { font-size: clamp(12px, 1.25vw, 15px); }
html.hs3-mfit .wkbar button.wkbtn { font-size: 14px; }
.wkcal-ov { position: fixed; inset: 0; z-index: 60; background: transparent; }
html.hs3-mfit .wkcal-ov { background: rgba(15,31,58,.35); }
.wkcal { position: fixed; z-index: 61; background: #fff; border: 1px solid #cfd6df; border-radius: 8px; box-shadow: 0 10px 32px rgba(15,31,58,.25); padding: 10px; width: 300px; }
html.hs3-mfit .wkcal { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(320px, calc(100vw - 32px)); }
.wkcal .ch { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.wkcal .ch b { font-size: 15px; }
.wkcal .ch button { padding: 4px 10px; }
table.cal { width: 100%; border-collapse: separate; border-spacing: 0 2px; table-layout: fixed; }
table.cal th { font-size: 12px; color: #3d4a5c; padding: 4px 0; text-align: center; }
table.cal th.sun, table.cal td.sun { color: #c62828; }
table.cal th.sat, table.cal td.sat { color: #1d4ed8; }
table.cal td { text-align: center; padding: 7px 0; font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer; }
table.cal td.out { opacity: .4; }
table.cal td.today { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
table.cal tr td:first-child { border-radius: 6px 0 0 6px; } table.cal tr td:last-child { border-radius: 0 6px 6px 0; }
table.cal tr:hover td { background: #e8efff; }
table.cal tr.cur td { background: #d6e2ff; font-weight: 700; }
/* v1108：週の表示の文字は窓の幅に関係なく 15px（PC・タブレット。スマホは 14px のまま） */
html:not(.hs3-mfit) .wkbar .wk, html:not(.hs3-mfit) .wkbar button.wkbtn { font-size: 15px; }
/* v1109：表の見出しはベージュ系、土曜は薄い青、日曜・祝日は薄いピンク。今日は塗りつぶさず、列全体をオレンジの枠で囲む */
table.wk thead th, table.wk thead th.it { background: #f3ead8; color: #5b4a2f; }
table.wk thead th.sat { background: #e8efff; color: #1d4ed8; }
table.wk thead th.sun { background: #fde8ec; color: #c62828; }
table.wk thead th.today { background-color: #f3ead8; }
table.wk thead th.sat.today { background-color: #e8efff; }
table.wk thead th.sun.today { background-color: #fde8ec; }
table.wk td.today { background: #fff; }
table.wk tbody tr:nth-child(even) td.d.today:not(.rep) { background: #fafbfc; }
table.wk td.d.rep.today { background: var(--rep); }
table.wk th.today, table.wk td.today { box-shadow: inset 3px 0 0 #f59e0b, inset -3px 0 0 #f59e0b; }
table.wk thead th.today { box-shadow: inset 3px 0 0 #f59e0b, inset -3px 0 0 #f59e0b, inset 0 3px 0 #f59e0b; }
table.wk tbody tr:last-child td.today { box-shadow: inset 3px 0 0 #f59e0b, inset -3px 0 0 #f59e0b, inset 0 -3px 0 #f59e0b; }
/* v1110：見出しの地は白・下に濃いグレーの線。左上の年月は濃いグレーに白い文字。機材名と日付の間も同じ線（v1109 のベージュはやめる） */
table.wk thead th, table.wk thead th.today { background: #fff; color: #3d4a5c; border-bottom: 2px solid #9aa5b4; }
table.wk thead th.sat, table.wk thead th.sat.today { background: #e8efff; color: #1d4ed8; }
table.wk thead th.sun, table.wk thead th.sun.today { background: #fde8ec; color: #c62828; }
table.wk thead th.it { background: #4b5563; color: #fff; }
table.wk th.it, table.wk td.it { border-right: 2px solid #9aa5b4; }
/* v1111：左上の年月も白地。偶数行の薄いグレー（縞）はなくす */
table.wk thead th.it { background: #fff; color: #3d4a5c; }
table.wk tbody tr:nth-child(even) td.d:not(.rep), table.wk tbody tr:nth-child(even) td.d.today:not(.rep) { background: #fff; }
table.wk tbody tr:nth-child(even) td.d:not(.rep):not(.today) { background: #fff; }
/* ---------- v1129 ---------- */
/* 代替機ありの修理中（予約できる）：札はオレンジ */
.badge-rep.alt { background: #d97706; }
.hist .r .open.alt, table.kz td.rp .open.alt { color: #b45309; }
/* 修理履歴の 1 件：日付の行が上・修理内容が下 */
.hist .r .when { font-size: 12px; color: var(--muted); }
/* 検索窓とクリアボタン「×」（機材管理・固定資産台帳） */
.qwrap { position: relative; display: inline-flex; align-items: center; flex: 0 1 200px; min-width: 100px; }
.qwrap > input[type=text] { width: 100%; padding-right: 28px; }
.qwrap > .qx { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; min-width: 0; padding: 0; border: 0; border-radius: 50%; background: #e3e8ef; color: #4b5767; font-size: 13px; line-height: 22px; text-align: center; }
.qwrap > .qx:hover { background: #cfd6df; color: var(--text); }
html:not(.hs3-mfit) .bar > .qwrap { flex-shrink: 1; }
html.hs3-mfit .bar > .qwrap { flex: 1 1 100%; order: 9; }
/* 操作 ▾ のメニュー（固定資産台帳と同じ形） */
.out-wrap { position: relative; display: inline-flex; }
.out-menu { position: fixed; z-index: 60; display: flex; flex-direction: column; gap: 2px; min-width: 150px; padding: 6px; background: #fff; border: 1px solid #d5dbe3; border-radius: 8px; box-shadow: 0 8px 24px rgba(15,31,58,.18); }
.out-menu[hidden] { display: none !important; }
.out-menu > button { width: 100%; text-align: left; border-color: transparent; background: #fff; }
.out-menu > button:hover { background: #eef3ff; border-color: transparent; }
.out-menu > hr { border: 0; border-top: 1px solid #e3e8ee; margin: 4px 2px; }
.bar button { line-height: 18px; }
/* 代替機の切り替え（なし／あり） */
.seg2 { display: inline-flex; }
.seg2 > button { border-radius: 0; background: #fff; color: #4b5767; border-color: #cfd6df; min-width: 64px; }
.seg2 > button:first-child { border-radius: 4px 0 0 4px; }
.seg2 > button:last-child { border-radius: 0 4px 4px 0; margin-left: -1px; }
.seg2 > button.on { background: var(--primary); border-color: var(--primary); color: #fff; position: relative; }
/* 修理の小画面：日付の横に担当者 */
.fr.f2 { grid-template-columns: 7.5em minmax(0, 1fr) auto minmax(0, 1fr); }
.fr.f2 > input { width: 100%; min-width: 0; }
html.hs3-mfit .fr.f2 { grid-template-columns: 1fr; }
/* 機材の小画面：項目名「セット機材」は札の 1 行目の上下の真ん中に（高さは画面で合わせる） */
/* CSV読込の確かめ */
.imp { font-size: 14px; line-height: 1.7; }
.imp ul { margin: 2px 0 8px; padding-left: 1.4em; font-size: 13px; }
.imp .ih { font-weight: 700; margin-top: 8px; font-size: 13px; }
.imp .ng { color: var(--danger); }
/* 一覧の行の高さ：どの行も、管理名称の下に「セット：…」が入った 2 行の行と同じ（PC・タブレット。スマホはカード） */
html:not(.hs3-mfit) table.kz tbody td { height: 48px; }
html:not(.hs3-mfit) table.kz tbody td.empty { height: auto; }
/* ---------- v1130 ---------- */
/* 一覧の「修理中（代替機あり）」の札は 2 行（PC・タブレットの表だけ。スマホのカードは 1 行） */
.badge-rep.two .b2 { display: inline; }
html:not(.hs3-mfit) table.kz td.st .badge-rep.two { text-align: center; border-radius: 8px; line-height: 1.3; padding: 2px 8px; }
html:not(.hs3-mfit) table.kz td.st .badge-rep.two .b2 { display: block; }
/* 修理履歴：枠は 3 件分まで。多いときは枠の中をスクロール（開いたときは一番下＝新しいものが見える） */
#repList, #itRepList { max-height: 162px; overflow-y: auto; }
/* 開いたときに小画面そのものにフォーカスしても枠は出さない（ボタンに枠が出ないように小画面にフォーカスするため） */
dialog.kz:focus, dialog.kz:focus-visible { outline: none; }
/* ---------- v1131：機材予約の表 ---------- */
/* 行の高さ：札（修理中）のない行も、札の分の高さをとる（見えない札）。マスに入りきらないときは自動で高くなる */
table.wk td.it .badge-rep.ph { visibility: hidden; }
/* 修理中（代替機なし）のマス・機材名・スマホのカードは薄いグレー（祝日・日曜の見出しの薄いピンクと分ける）。文字は赤のまま */
table.wk td.d.rep, table.wk td.d.rep.today, table.wk tbody tr:nth-child(even) td.d.rep, table.wk tr.rep td.it { background: #e9ecf0; }
.dcard.rep { background: #eef0f3; }
/* 仕切り線（機材の間・日付の間）をはっきりしたグレーに。見出しの下・機材名の列の右の 2px の線、今日のオレンジの枠はそのまま */
table.wk td.d, table.wk td.it { border-bottom-color: #c3cbd6; }
table.wk td.d, table.wk thead th:not(.it) { border-right-color: #c3cbd6; }
/* ---------- v1132：機材予約 ---------- */
/* 修理中のマスの文字は 13px。予約のない修理中のマス（rep0）は上下の真ん中に（予約が残っているマスは上） */
table.wk td.d.rep::before { font-size: 13px; }
table.wk td.d.rep0 { vertical-align: middle; }
/* 取り消した予約（予約のないマスだけ）：「11/8 黒木 取消」 */
.cx { display: block; font-size: 10px; color: #8a94a3; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.dcard .cx { text-align: left; font-size: 11px; }
/* 表の枠の高さは画面の残りに合わせる（yoyaku.html の fitH）。下の余白は詰める */
html:not(.hs3-mfit) body.kz-yoyaku main { padding-bottom: 12px; }
/* ---------- v1138 ---------- */
/* セット機材を選ぶ小画面 */
#setMsg { font-size: 14px; margin-bottom: 10px; line-height: 1.6; }
.setlist { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; }
.setlist label.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.setlist label.chk .sub { margin-left: 4px; }
.setlist label.chk .ng { color: var(--danger); font-size: 12px; }
.setlist input:disabled + * { opacity: .6; }
/* 機材管理：上の部分を固定（スクロールは .sheet の中だけ。高さは kanri.html の fitH）。一覧の見出しの行は枠の上に残す */
body.kz-kanri main { padding-bottom: 0; }
body.kz-kanri .sheet { overflow: auto; overscroll-behavior: contain; }
body.kz-kanri .tblwrap { overflow: visible; }
body.kz-kanri table.kz#tbl { min-width: 1080px; }
body.kz-kanri table.kz#tbl thead th { position: sticky; top: 0; z-index: 2; }
/* v1234：PC・タブレットの一覧は、最初から折り返さない（タブレットの幅で設置場所などが 2 行になり、行が高くなっていた）。入らない文字は「…」。表が広いときは横にスクロール */
html:not(.hs3-mfit) body.kz-kanri #sheet table.kz :is(th, td) { white-space: nowrap; }
html:not(.hs3-mfit) body.kz-kanri #sheet table.kz td { max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
html.hs3-mfit body.kz-kanri table.kz#tbl { min-width: 0; }
html.hs3-mfit body.kz-kanri .sheet { -webkit-overflow-scrolling: touch; }
/* ---------- v1141：機材予約 ---------- */
/* 予約の小画面の「終日」（チェックありのときは時刻の欄を出さない） */
.fr .dt label.allday { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: #3d4a5c; cursor: pointer; white-space: nowrap; }
/* マスの中（予約・取消・修理中）は上下の真ん中に */
table.wk td.d { vertical-align: middle; }

/* v1147：機材管理の一覧に「機材予約に表示」の列（v1148：〇。見るだけ）。予約に出さない機材も行は薄くしない */
table.kz th.sh { width: 1%; white-space: nowrap; text-align: center; }
table.kz td.sh { text-align: center; }
html.hs3-mfit table.kz td.sh { grid-column: 2 / span 2; font-size: 12px; color: var(--muted); text-align: left; display: flex; align-items: center; gap: 4px; }
html.hs3-mfit table.kz td.sh::before { content: attr(data-l) "："; }
html.hs3-mfit table.kz td.sh:empty { display: none; }

/* v1149：機材管理（スマホ・縦長のタブレット）の「操作 ▾」は 1 段目の右端（機材を登録・並び順の変更と同じ段）。2 段目はチェックだけ、その下が検索 */
html.hs3-mfit body.kz-kanri .bar > #outWrap { order: 1; margin-left: auto; }
html.hs3-mfit body.kz-kanri .bar > label.chk { order: 1; margin-left: auto; }   /* v1236：「ロケ機材のみ」も 1 行目（操作 ▾ の左） */
html.hs3-mfit body.kz-kanri .bar:has(> label.chk:not([hidden])) > #outWrap { margin-left: 0; }
html.hs3-mfit body.kz-kanri .bar > .spacer { display: none; }
/* v1149：指で操作する端末（スマホ・タブレット）は修理履歴の枠の高さを決めない（iPhone の Safari で枠の中がスクロールできなかった）。小画面ごとスクロールして見る。PC は 3 件分の高さで中をスクロール（v1130） */
@media (hover: none) and (pointer: coarse) {
  #repList, #itRepList { max-height: none; overflow: visible; }
}

/* v1156：機材予約の機材の詳細：セット機材の「変更」。変更の小画面（チップ＋「＋ 機材を追加」） */
dl.kv dd.setdd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
dl.kv dd.setdd button.small { padding: 2px 12px; font-size: 12px; line-height: 18px; }
#dlgSetEd .db { min-height: 80px; }

/* v1157：セット機材の「＋ 機材を追加」で開く選ぶ小画面（種類ごと・チェックで複数）。枠の中だけスクロールする作りにはしない（小画面ごとスクロール） */
.pick .pg + .pg { margin-top: 12px; }
.pick .ph { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.pick .pl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.pick label.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.pick label.chk .sub { margin-left: 2px; font-size: 12px; }
.pick input:disabled + span { opacity: .45; }
.pick .none { color: var(--muted); font-size: 13px; }
html.hs3-mfit .pick .pl { grid-template-columns: minmax(0, 1fr); }

/* v1158：機材名の列＝1 行目 管理名称・2 行目 機材名称＋札（修理中／代替機中）・3 行目 セット名（全部の行で同じ高さ）。名前が長いときは列を広げる（折り返さない） */
table.wk td.it { white-space: nowrap; }
table.wk td.it > * { width: max-content; }   /* 幅は yoyaku.html の fitIt で th.it に */
table.wk td.it .l2 { display: flex; align-items: center; gap: 6px; }
table.wk td.it .l2 .sub { display: inline; }
table.wk td.it .setnm, .dcard .setnm { display: block; font-size: 11px; font-weight: 600; color: #0f766e; line-height: 16px; min-height: 16px; }
.dcard .setnm { margin-top: -2px; }
#dlgSetEd .fr { margin-bottom: 10px; }

/* v1159：項目名「備考（機材予約）」が 1 行に入るよう、機材の詳細（機材管理・機材予約）と変更の小画面は項目名の列を広く */
#dlgItem .fr { grid-template-columns: 8.8em 1fr; }
#dlgItem .fr.f2 { grid-template-columns: 8.8em minmax(0, 1fr) auto minmax(0, 1fr); }
#itKv { grid-template-columns: 8.8em 1fr; }
#dlgInfo .fr { grid-template-columns: 8.8em 1fr; }
#dlgInfo .fr[hidden] { display: none; }
html.hs3-mfit #dlgItem .fr, html.hs3-mfit #dlgInfo .fr { grid-template-columns: 1fr; }
html.hs3-mfit #dlgItem .fr.f2 { grid-template-columns: 1fr; }
html.hs3-mfit #itKv { grid-template-columns: 8.2em 1fr; }
/* v1159：変更ボタンのある行も項目名と値の 1 行目がそろうように（行の高さ 24px）。値が長いときは値だけ折り返し、「変更」は右に残す */
#itKv dt, #itKv dd { line-height: 24px; }
#itKv dd.setdd { flex-wrap: nowrap; align-items: flex-start; }
#itKv dd.setdd > span { flex: 0 1 auto; min-width: 0; }
#itKv dd.setdd button.small { flex: none; height: 24px; line-height: 18px; }

/* v1160：機材予約のタブ＝機材予約の中だけのグループ。太線（tab_line）・手動入力（manual）・編集モード */
table.wk tr.line > td { border-bottom: 1px solid #5b6677 !important; }   /* v1239：区切り線 3px→2px。v1318（256）：1px（色で見分ける） */
.dcard.line { border-bottom: 1px solid #5b6677; }   /* v1318（256） */
/* v1239：手動追加（一時）の機材も押すと小画面（管理名称・機材名称・メモ。ロケ機材予約の権限）。権限がなければ押せない見た目 */
body:not(.kz-canrsv) table.wk tr.man td.it { cursor: default; }
body:not(.kz-canrsv) table.wk tr.man td.it:hover b { color: inherit; text-decoration: none; }
body:not(.kz-canrsv) .dcard.man .h b { cursor: default; }
.wkbar .spacer { flex: 1; }
.edbar { background: #fff8e1; border-color: #f5d27a; }
.edbar b { font-size: 14px; }
.edwrap { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 0 0 12px; }
.edwrap .edtabs { margin: 0; padding: 8px 10px 0; border-bottom: 1px solid var(--line); }
.edwrap .edtabs .addt { color: var(--primary); }
.edpanel { padding: 10px 14px 0; }
.edhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.edhead label { font-weight: 700; font-size: 13px; color: #3d4a5c; }
.edhead input { width: 220px; }
.edhead .spacer { flex: 1; }
.edlist { border: 1px solid var(--line); border-radius: 6px; }
.edlist .none { padding: 12px; color: var(--muted); font-size: 13px; }
.er { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-top: 1px solid #edf0f4; background: #fff; }
.er:first-child { border-top: 0; }
.er.line { border-bottom: 1px solid #5b6677; }   /* v1318（256） */
.er.drag { opacity: .5; }
.er .handle { cursor: grab; color: #9aa4b1; padding: 0 2px; }
.er .mv { padding: 2px 6px; font-size: 11px; line-height: 16px; }
.er .nm { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.er .nm b { font-size: 14px; }
.er .nm .sub { font-size: 12px; color: var(--muted); }
.er .nm .fu { font-size: 11px; font-weight: 700; color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; border-radius: 10px; padding: 0 7px; }
.er label.ln { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #3d4a5c; white-space: nowrap; cursor: pointer; }
.er .small { padding: 2px 10px; font-size: 12px; line-height: 18px; }
.er .x { border: 0; background: transparent; color: #9aa4b1; font-size: 16px; width: 28px; height: 28px; padding: 0; }
.er .x:hover { color: var(--danger); background: #fdecec; }
.edadd { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; position: sticky; bottom: 0; z-index: 5; background: var(--panel); padding: 10px 0 12px; border-top: 1px solid var(--line); }   /* v1239：スクロールしても隠れない */
.er .nm b.man { cursor: pointer; text-decoration: underline dotted #9aa4b1; text-underline-offset: 3px; }
.er .nm b.man:hover { color: var(--primary); }
/* v1240：手動追加（一時）の機材＝「一時追加」の札・管理名称と機材名称は青い文字 */
.tmptag { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; line-height: 16px; color: #1d4ed8; background: #eef3ff; border: 1px solid #bcd0fb; border-radius: 10px; padding: 0 7px; vertical-align: 1px; white-space: nowrap; }
table.wk tr.man td.it b, table.wk tr.man td.it .sub, .dcard.man .h b, .dcard.man .h .sub, .er .nm b.man, .er .nm b.man + .sub { color: #1d4ed8; }
.edwrap .edtabs button[data-et] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }   /* v1239：タブをドラッグで並べ替え（指は長押し） */
.edwrap .edtabs button[data-et].dragging { opacity: .55; outline: 2px dashed var(--primary); outline-offset: -2px; }
#dlgEdMove .fr { grid-template-columns: 7.5em 1fr; }
html.hs3-mfit .edhead input { flex: 1 1 100%; width: auto; order: -1; }
html.hs3-mfit .edhead label { flex: 1 1 100%; }
html.hs3-mfit .er { flex-wrap: wrap; }
html.hs3-mfit .er .nm { flex: 1 1 60%; }
html.hs3-mfit #dlgEdMove .fr { grid-template-columns: 1fr; }

/* v1162：機材予約（スマホ）：「編集」を 1 行目（前週・今週・次週）の右端に、週の表示は 2 行目 */
/* v1162：機材の詳細の「セット機材」：機材はラベルの真下から横幅いっぱいに。名前の途中では折り返さない */
dl.kv dd.setms { grid-column: 1 / -1; margin-top: -2px; line-height: 1.6; }
dl.kv dd.setms .nm { display: inline-block; max-width: 100%; }
@media (max-width: 359px) { html.hs3-mfit .wkbar { gap: 6px; padding: 10px; } html.hs3-mfit .wkbar > button:not(.wkbtn) { padding-left: 8px; padding-right: 8px; } }
/* v1163：予約の小画面：セット名の札（押すと中身） */
.chip.set { background: #e6f4ea; border-color: #b7dfc3; color: #1b6b3a; }
.chip.set .sn { border: 0; background: transparent; color: inherit; padding: 0; min-width: 0; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }   /* v1164：下線なし */
.chip.set .sn::after { content: " ▸"; font-weight: 400; }
.chip.set .sn:hover { background: transparent; color: #0f4d29; }
/* v1165：番組から予約（下から出る枠・カード・ドラッグ・元に戻す） */
#btnPal.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pal { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 2px solid #b7dfc3; box-shadow: 0 -6px 18px rgba(15, 31, 58, .14); display: flex; flex-direction: column; height: 38vh; }   /* v1166：高さは中身に関係なく固定 */
.palbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 14px; border-bottom: 1px solid #e3e8ee; }
.palbar .pt { font-size: 14px; }
.palbar .spacer { flex: 1; }
.palbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.pgrp { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 8px; border-bottom: 1px dashed #e3e8ee; }
.pgrp:last-child { border-bottom: 0; }
.pal .pcard { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 96px; background: var(--rv-bg, #e6f4ea); border: 1px solid var(--rv-line, #b7dfc3); border-radius: 4px; padding: 3px 10px; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; line-height: 1.3; }
.pal .pcard .t { font-size: 13px; font-weight: 700; color: #1f2933; white-space: nowrap; text-align: center; max-width: 8em; }
.pal .pcard .tx { display: inline-block; white-space: nowrap; transform-origin: left center; vertical-align: top; }   /* v1166：長い名前は JS で長体（fitNames） */
.pal .pcard .tx.el { overflow: hidden; text-overflow: ellipsis; }
.pal .pcard .tm { font-size: 11px; color: #3d4a5c; font-variant-numeric: tabular-nums; }
.pal .pcard, .pgh { box-sizing: border-box; height: 58px; justify-content: center; }   /* v1169：「終日」なし。高さは 3 行分で、名前は縦の真ん中 */
.palbody { --pcw: auto; } .pal .pcard { width: var(--pcw); }   /* v1171：.pcard は番組の期間のカード（bangumi.css）にもあるので、番組から予約の枠（.pal）の中だけ */   /* v1169：幅は表示中でいちばん広いカードにそろえる（drawPal で測る） */
.pal .pcard.prog { border-width: 2px; }
.pal .pcard:hover { filter: brightness(.96); }
.pal .pcard.on { outline: 3px solid #f59e0b; outline-offset: 1px; }
.pal .none { color: var(--muted); font-size: 13px; padding: 6px 0; }
.pgh { position: fixed; z-index: 60; pointer-events: none; display: inline-flex; flex-direction: column; align-items: center; background: var(--rv-bg, #e6f4ea); border: 1px solid var(--rv-line, #b7dfc3); border-radius: 4px; padding: 3px 10px; opacity: .9; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); line-height: 1.3; }
.pgh .t { font-size: 13px; font-weight: 700; } .pgh .tm { font-size: 11px; color: #3d4a5c; }
body.dragging, body.dragging * { cursor: grabbing !important; }
body.dragging { user-select: none; -webkit-user-select: none; }
table.wk td.d.dropon, .dcard.dropon { outline: 3px solid #1f9d55; outline-offset: -3px; background: #e6f4ea !important; }
html.hs3-mfit .pal { height: 46vh; }
html.hs3-mfit .palbar { padding: 8px 10px; gap: 6px; }
html.hs3-mfit .palbar .pt { display: none; }
html.hs3-mfit .palbody { padding: 8px 10px 12px; }
html.hs3-mfit .palbar .qwrap { flex: 1 1 120px; }
/* スマホ：「番組から予約」は 2 行目（週の表示）の右端 */
.palbar .psel { flex: 0 1 260px; }
.palbar .psel > select { width: 100%; padding-right: 30px; }
.palbar .psel > select.ph { color: var(--muted); }
.palbar .psel > .qx { right: 22px; }
.pgh .tx { display: inline-block; white-space: nowrap; transform-origin: left center; vertical-align: top; }
.pgh .tx.el { overflow: hidden; text-overflow: ellipsis; }

/* v1170：機材管理の詳細の資産番号の横に「固定資産台帳」（逆引き） */
.asw { display: flex; align-items: center; gap: 8px; min-width: 0; }
.asw input { flex: 1; min-width: 0; }
.asw button { flex: none; white-space: nowrap; padding: 5px 10px; font-size: 12.5px; }
/* v1173：固定資産台帳から来た機材の行（ほかの行を押すと消える） */
table.kz tr.hit > td { background: #dbe7ff !important; }
/* v1175：区分のチェック（機材管理の一覧の上。ON の区分のリストがタブに出る） */
.kubun { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 2px 0 8px; }
.kubun:empty { display: none; }
.kubun label.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #3d4a5c; cursor: pointer; }
.kubun label.chk input { width: 16px; height: 16px; margin: 0; }
/* v1175：区分・リストの設定・リストの項目の小画面 */
#dlgStruct, #dlgFields { width: min(600px, calc(100vw - 24px)); }
#stBody .stk { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 12px; background: #fff; }
#stBody .stk.dragging { opacity: .4; }
#stBody .stk.drop-before { box-shadow: 0 -3px 0 var(--primary); }
#stBody .stk.drop-after { box-shadow: 0 3px 0 var(--primary); }
#stBody .r, #fdList .r, #fdCommon .r { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-top: 1px solid #edf0f4; }
#stBody .r.kh { border-top: 0; background: #f3f6fb; border-radius: 6px 6px 0 0; }
#stBody .r.kh .lb { font-size: 12px; font-weight: 700; color: #4b5767; flex: none; }
#stBody .r.kh input { font-weight: 700; }
#stBody .r input[type=text], #fdList .r input[type=text] { flex: 1 1 auto; min-width: 0; }
#stBody .stl > .r { padding-left: 22px; }
#stBody .r.dragging, #fdList .r.dragging, #opList .r.dragging { opacity: .4; }
#stBody .r.drop-before, #fdList .r.drop-before, #opList .r.drop-before { box-shadow: inset 0 3px 0 var(--primary); }
#stBody .r.drop-after, #fdList .r.drop-after, #opList .r.drop-after { box-shadow: inset 0 -3px 0 var(--primary); }
#stBody .pb, #fdList .pb { display: inline-flex; align-items: center; gap: 4px; flex: none; }
#stBody .pb .sub { min-width: 3em; text-align: right; font-size: 12px; color: var(--muted); }
#stBody .pb button.small { padding: 3px 10px; font-size: 12px; }
/* v1208：区分・リストの設定・項目の参照モード（名前は文字で） */
#stBody .nmv, #fdList .nmv { flex: 1 1 auto; min-width: 0; padding: 6px 2px; overflow-wrap: anywhere; }
#stBody .r.kh .nmv { font-weight: 700; }
#stBody .stl > .none { padding: 8px 22px; font-size: 12px; color: var(--muted); }
#dlgFields.view .ck { text-align: center; color: var(--primary-dark); font-weight: 700; }
#stBody .mv, #fdList .mv { width: 28px; height: 28px; padding: 0; font-size: 10px; }
#stBody .x, #fdList .x { border: 0; background: transparent; color: #9aa4b1; font-size: 16px; width: 28px; height: 28px; padding: 0; }
#stBody .x:hover, #fdList .x:hover { color: var(--danger); background: #fdecec; }
#stBody .stl .padd { margin: 0; padding: 6px 10px 8px 22px; border-top: 1px solid #edf0f4; }
#stBody .none, #fdList .none { color: var(--muted); font-size: 13px; padding: 8px 10px; }
#dlgFields .sec-h:first-child { margin-top: 0; }
#fdCommon, #fdList { border: 1px solid var(--line); border-radius: 6px; }
#fdCommon .fh, #fdList .fh { display: flex; gap: 6px; padding: 4px 10px; font-size: 11px; font-weight: 700; color: var(--muted); background: #f6f8fb; border-radius: 6px 6px 0 0; }
#fdCommon .fh span:first-child, #fdList .fh span:first-child { flex: 1 1 auto; }
#fdCommon .r { min-height: 34px; }
#fdCommon .r .nm { flex: 1 1 auto; font-size: 13px; }
#fdCommon .fh span:last-child, #fdCommon .r .ck { width: 6em; text-align: center; flex: none; }
html:not(.hs3-mfit) #fdList .fh, html:not(.hs3-mfit) #fdList .r { display: grid; grid-template-columns: minmax(0, 1fr) 104px 76px 140px; gap: 6px; }
#fdList .r .ty { font-size: 13px; }
#fdList .fh span:nth-child(3), #fdList .r .ck { text-align: center; }
html:not(.hs3-mfit) #fdList .r .pb { justify-content: flex-end; }
#fdList .r .ty .lk, #exRows .fr > button.lk { justify-self: start; border: 0; background: transparent; padding: 0; font-size: 13px; font-weight: 700; color: var(--primary-dark); text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
#fdList .r .ty .lk { font-weight: 400; }
dialog.kz.view #exRows .fr > button.lk, #exRows .fr > button.lk:disabled { color: #3d4a5c; text-decoration: none; cursor: default; }   /* v1202：参照中・押せないときは、追加項目の項目名もメーカー・設置場所と同じ黒字・下線なし（上の #exRows の決まりが強く、押せるように見えていた） */
.ck input { width: 16px; height: 16px; margin: 0; vertical-align: middle; }
.fdadd select { flex: none; }
html.hs3-mfit #fdList .fh { display: none; }
html.hs3-mfit #fdList .r { flex-wrap: wrap; }
html.hs3-mfit #fdList .r input[type=text] { flex: 1 1 100%; }
html.hs3-mfit #fdList .r .ty { width: auto; flex: 1 1 auto; }
html.hs3-mfit #fdList .r .ck { width: auto; }
html.hs3-mfit #fdList .r .ck::after { content: '一覧に表示'; font-size: 12px; margin-left: 4px; color: #4b5767; }
html.hs3-mfit #stBody .pb .sub { display: none; }
html.hs3-mfit #stBody .stl > .r, html.hs3-mfit #stBody .stl .padd { padding-left: 10px; }
html.hs3-mfit #stBody .r.kh .lb { display: none; }
html.hs3-mfit #stBody .r, html.hs3-mfit #stBody .pb { gap: 3px; }
html.hs3-mfit .fdadd { flex-wrap: wrap; }
html.hs3-mfit .fdadd input { flex: 1 1 100%; }
html.hs3-mfit .fdadd select { flex: 1 1 auto; }

/* v1183：機材管理の一覧の見出し（押すと並べ替え・右端をドラッグで幅）・列の表示の小画面（固定資産台帳と同じ作り） */
table.kz thead th.sc { cursor: pointer; user-select: none; -webkit-user-select: none; }
table.kz thead th.sc:hover { background: #dbe5fb; }
table.kz thead th .si { font-size: 10px; color: #1e40af; margin-left: 3px; }
table.kz.dsp thead th { position: relative; }
table.kz thead th .rz { position: absolute; top: 0; right: 0; width: 7px; height: 100%; cursor: col-resize; z-index: 3; touch-action: none; }
table.kz thead th .rz:hover, table.kz thead th .rz.on { background: linear-gradient(90deg, transparent 4px, #60a5fa 4px, #60a5fa 6px, transparent 6px); }
body.kz-rz, body.kz-rz * { cursor: col-resize !important; user-select: none !important; }
body.reordering table.kz thead th.sc { cursor: default; }
body.reordering table.kz thead th.sc:hover { background: #e8efff; }
body.reordering table.kz thead th .rz, body.reordering table.kz thead th .si { display: none; }
html.hs3-mfit #btnCols { display: none; }
#dlgCols { width: min(560px, calc(100vw - 24px)); }
.colsh { font-size: 12.5px; font-weight: 700; color: #3d4a5c; margin: 0 0 6px; }
.colord { display: flex; flex-direction: column; border: 1px solid #e3e8ee; border-radius: 6px; margin-bottom: 14px; max-height: 38vh; overflow: auto; }
.colord .co { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-bottom: 1px solid #edf0f4; font-size: 13px; background: #fff; }
.colord .co:last-child { border-bottom: 0; }
.colord .co.fix { color: var(--muted); background: #f8f9fb; }
.colord .co.fix .h { width: 16px; }
.colord .co.drag { opacity: .55; background: #eef3ff; }
.colord .co .h { cursor: grab; color: #94a3b8; font-size: 16px; touch-action: none; user-select: none; -webkit-user-select: none; padding: 0 2px; }
.colord .co .nm { flex: 1; }
.colord .co .x { border: 0; background: transparent; color: #8a94a3; font-size: 15px; padding: 0 6px; min-width: 0; cursor: pointer; }
.colord .co .x:hover { color: #b42318; }
.colchk { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px 12px; }
.colchk label { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; padding: 2px 0; }
.colchk .none { font-size: 13px; color: var(--muted); }

/* v1184：区分・リストの設定の「区分を移す」（スマホは「移す」だけにしてリストの名前の欄を広く） */
html.hs3-mfit #stBody .lku-pc { display: none; }

/* v1185：機材管理の一覧の区切り線（行の下に太線。並び順の変更の「下に線」で設定） */
table.kz#tbl tr.line > td { border-bottom: 1px solid #5b6677; }   /* v1318（256）：2px → 1px */
html.hs3-mfit table.kz#tbl tr.line > td { border-bottom: 0; }
html.hs3-mfit table.kz#tbl tbody tr.line { border-bottom: 1px solid #5b6677; }
td.ord label.ln { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; font-size: 12px; color: #3d4a5c; white-space: nowrap; cursor: pointer; vertical-align: middle; }
td.ord label.ln input { margin: 0; }

/* v1186：並び順の変更中はタブをつかんで並び替え（区分と関係なく） */
.tabs button.mvt { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.tabs button.mvt .th { color: #9aa5b4; margin-right: 4px; font-size: 13px; }
.tabs button.mvt.drag { opacity: .6; background: #dbe5fb; border-color: #93b4f5; }
body.reordering .tabs { touch-action: none; }

/* v1187：項目名の下の注意書き（機材の小画面の「メモ」）。v1188：項目名の下から 1 行で（行の幅いっぱい） */
.fr > .lnote { grid-column: 1 / -1; margin-top: -4px; font-size: 11px; font-weight: 400; color: var(--muted); line-height: 1.4; }

/* ---------- v1205：ロケ機材予約の週の選択・メニュー・参照モード ---------- */
button.rnd { width: 30px; height: 30px; min-width: 0; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; line-height: 1; background: #fff; border: 1px solid #a9bdf0; color: #1e40af; flex: 0 0 auto; }
button.rnd:hover { background: #e8efff; border-color: #8aa6ea; }
.wkbar .wknav { display: inline-flex; align-items: center; gap: 2px; min-width: 0; }
.wkbar .wknav .wk { margin: 0 !important; }
.wkcal .ch { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; }
.wkcal .ch button.rnd { width: 28px; height: 28px; padding: 0; }
.wkcal .ch .cm { text-align: center; }
.wkcal .ch .ctw { position: relative; display: inline-block; }   /* 年月をちょうど真ん中に。「今週」は年月の左にはみ出して置く（真ん中はずれない） */
.wkcal .ch #btnCalThis { position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); padding: 3px 10px; font-size: 12px; }
.kzmenu { display: flex; align-items: center; gap: 8px; }
.kzmenu .ic { display: none; }
.kzmenu [hidden] { display: none !important; }
body:not(.kz-canrsv) .dcard .h .add { display: none; }
body:not(.kz-canrsv) table.wk td.d { cursor: default; }
body:not(.kz-canrsv) table.wk td.d .rv { cursor: pointer; }
/* スマホ：上の段は「◀ 週の表示 ▶」だけ。メニューは画面の下に固定（ボトムナビゲーション） */
html.hs3-mfit body.kz-yoyaku { --bnh: 58px; }
html.hs3-mfit .wkbar { flex-wrap: nowrap; }
html.hs3-mfit .wkbar .wknav { flex: 1 1 auto; justify-content: center; }
html.hs3-mfit .kzmenu { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; gap: 0; background: #fff; border-top: 1px solid #d5dbe3; box-shadow: 0 -2px 10px rgba(15,31,58,.08); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); min-height: var(--bnh); box-sizing: border-box; }
html.hs3-mfit .kzmenu > .mi, html.hs3-mfit .kzmenu > .out-wrap { flex: 1 1 0; }
html.hs3-mfit .kzmenu .out-wrap > .mi { width: 100%; }
html.hs3-mfit .kzmenu .mi { display: flex; flex-direction: column; align-items: center; gap: 2px; background: transparent; border: 0; color: #3d4a5c; padding: 4px 2px; font-size: 11px; font-weight: 600; min-width: 0; border-radius: 8px; }
html.hs3-mfit .kzmenu .mi:hover, html.hs3-mfit .kzmenu .mi[aria-expanded="true"] { background: #eef3ff; }
html.hs3-mfit .kzmenu .mi.primary { color: #1e40af; }
html.hs3-mfit .kzmenu .ic { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
html.hs3-mfit .kzmenu .dd { display: none; }
html.hs3-mfit body.kz-yoyaku main { padding-bottom: calc(var(--bnh) + 12px + env(safe-area-inset-bottom)); }
html.hs3-mfit body.kz-yoyaku .pal { bottom: calc(var(--bnh) + env(safe-area-inset-bottom)); }
html.hs3-mfit body.kz-yoyaku .toast { bottom: calc(var(--bnh) + 16px); }

/* ---------- v1232：スマホの番組から予約の引き出しは 3 列（カードは同じ幅・名前は長体でカードに収める）。v1261：v1260 で PC と同じ形にしたのを戻した ---------- */
html.hs3-mfit .pal .palbody { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; align-content: start; }
html.hs3-mfit .pal .pgrp { display: contents; }   /* 番組の区切りをなくして、全部のカードを 3 列に詰めて並べる */
html.hs3-mfit .pal .none { grid-column: 1 / -1; }
html.hs3-mfit .pal .pcard { width: auto; min-width: 0; padding: 3px 4px; }
html.hs3-mfit .pal .pcard .t { max-width: 100%; }

/* ---------- v1232：スマホのカード：左＝機材（上にそろえる）、右＝予約のカード（幅は決まった値。2 つ以上は下に並べる） ---------- */
.dcard { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; column-gap: 10px; }
.dcard .dl { min-width: 0; }
.dcard .dl .h { flex-wrap: wrap; row-gap: 2px; align-items: baseline; }
.dcard .dl .h b { overflow-wrap: anywhere; }
.dcard .dl .setnm { margin-top: 2px; }
.dcard .dr { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dcard .dr .rv { width: 100%; margin: 0; box-sizing: border-box; text-align: center; }   /* v1233：カードの中は真ん中 */
.dcard .dr .none, .dcard .dr .cx { display: block; padding: 4px 0; }
.dcard .dr .add { align-self: flex-end; box-sizing: border-box; width: 28px; height: 28px; min-width: 0; padding: 0; border-radius: 50%; border: 1px solid #b9cdf3; background: #eaf1ff; color: #2f5fb3; font-size: 0; line-height: 0; display: inline-flex; align-items: center; justify-content: center; }   /* v1260：小さな丸いボタン（ロケの小画面の＋と同じ）・予約の欄の右下 */
.dcard .dr .add::before { content: ""; width: 12px; height: 12px; background: linear-gradient(currentColor, currentColor) center / 12px 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 12px no-repeat; }
.dcard .dr .add:hover { background: #2f5fb3; color: #fff; border-color: #2f5fb3; }
body:not(.kz-canrsv) .dcard .dr .add, body:not(.kz-rsv) .dcard .dr .add { display: none; }   /* v1260：参照モードでは出さない（PC と同じ。予約は「予約」を押してから） */
.lcal .lctab-n { font-size: 13px; font-weight: 700; color: #1e40af; background: #e8efff; border-radius: 10px; padding: 1px 10px; margin-left: 4px; }
html.hs3-mfit .wkbar .spacer { display: none; }   /* v1232：スマホは週の表示の行を真ん中に */
/* v1248：ロケ一覧（ロケ予定表のロケのうち「機材予約が必要」のもの） */
dialog.kz.lcal { width: min(1000px, calc(100vw - 24px)); }
dialog.kz.lcal .dh { justify-content: center; gap: 12px; }
dialog.kz.lcal #lcTitle { min-width: 8em; text-align: center; }
table.lctab { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; border: 1px solid #e3e8ee; border-radius: 6px; }
table.lctab th { font-size: 12px; color: #3d4a5c; height: 26px; border-bottom: 2px solid #4b5563; }
table.lctab th.sat, table.lctab td.sat .dn { color: #1d4ed8; } table.lctab th.sun, table.lctab td.sun .dn { color: #c62828; }
table.lctab td { vertical-align: top; border-right: 1px solid #e3e8ee; border-bottom: 1px solid #e3e8ee; padding: 3px; height: 64px; }
table.lctab td.out { background: #f4f6f9; }
table.lctab .dn { font-size: 12px; font-weight: 700; color: #3d4a5c; }
.lcard { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; font-weight: 500; font-size: 12px; line-height: 1.3; padding: 3px 6px; margin-top: 2px; white-space: normal; background: #fff7e0; border-color: #f5d27a; color: #1f2933; overflow-wrap: anywhere; }
.lcard .st { font-size: 10.5px; font-weight: 700; color: #9a5b00; }
.lcard.done { background: #e6f4ea; border-color: #b7dfc3; }
.lcard.done .st { color: #1e6b36; }
.lcard.itk { background: #e3effd; border-color: #a9c7ef; }   /* v1314（244）：業務委託ロケは薄い青（予約済み・未予約は文字の色で） */
.lctbd { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; } .lctbd .lcard { width: auto; }
.lcday { margin-bottom: 8px; } .lcday > div:first-child { font-weight: 700; font-size: 13px; margin-bottom: 2px; } .lcday .sun { color: #c62828; } .lcday .sat { color: #1d4ed8; }
/* v1270（103）：ロケ一覧に休止のロケも（札を付けて薄く） */
.lcard.ky { opacity: .6; }
.lcard .kytag { display: inline-block; font-size: 10px; font-weight: 700; color: #6b7280; background: #eef0f3; border-radius: 6px; padding: 0 5px; margin-right: 4px; }
/* v1390（536・537）：ピンクの人（html.tp-pink。ライト・ダークとも）は、飾りの薄い青（札・行・枠）と紺・青の文字をグレーに。ダークは dark.js がこのグレーを暗い色に置き換える。完全に取り除くときはこのまとまりを消す */
html.tp-pink:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5):not(#_p6) .chip { background: #f2f2f2 !important; border-color: #c4c4c4 !important; color: #444 !important; }
html.tp-pink:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5):not(#_p6) .tmptag { background: #f2f2f2 !important; border-color: #c4c4c4 !important; color: #444 !important; }
html.tp-pink:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5):not(#_p6) .lcal .lctab-n { background: #f2f2f2 !important; border-color: #c4c4c4 !important; color: #444 !important; }
