/* 画面2：一元帳 管理運営モード画面（①〜⑦）。部品と質感は screen1.css をそのまま使い、ここでは並べ方と画面2だけの部品を足す。 */

body.s2 { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 64px auto auto minmax(0, 1fr) 222px; height: 100vh; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue-dark); text-decoration: underline; }
.site-chip { display: grid; line-height: 1.25; margin-left: 10px; padding: 5px 14px; border-radius: 12px; background: #f1f0ec; box-shadow: var(--well); min-width: 0; }
.site-chip b { font-size: 0.86rem; color: #1e2c45; white-space: nowrap; }
.site-chip small { font-size: 0.68rem; color: var(--muted); white-space: nowrap; }
.sync { display: flex; align-items: center; gap: 7px; font-size: 0.76rem; font-weight: 700; color: #1f7a45; padding: 6px 12px; border-radius: 999px; background: linear-gradient(145deg, #fbfaf8, #ebe8e3); box-shadow: var(--raise); white-space: nowrap; }
.sync i { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.sync.is-flash i { animation: syncflash 0.9s ease-out 2; }
@keyframes syncflash { 50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.05); background: #86efac; } }

/* ---------------- 上：防災連動バー ---------------- */

.livebar { margin: 0 20px; display: grid; gap: 6px; padding: 8px 14px 9px; }
.livebar__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; row-gap: 6px; min-width: 0; }
.db-badge { display: flex; align-items: center; gap: 6px; margin: 0; padding: 4px 12px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; color: #1f6f43; background: linear-gradient(145deg, #f3fbf6, #e1f2e8); box-shadow: 2px 2px 6px rgba(163, 158, 150, 0.45), -1px -1px 3px #fff, inset 0 1px 0 #fff; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.db-badge i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22); animation: syncflash 2.4s infinite; }
.db-badge span { overflow: hidden; text-overflow: ellipsis; }
.phone-link { white-space: nowrap; }
.livebar__title { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; white-space: nowrap; }
.livebar__title b { color: #1e2c45; }
.livebar__title small { font-size: 0.68rem; color: var(--muted); font-weight: 700; }
.lv-group { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 12px; background: #f1f0ec; box-shadow: var(--well); white-space: nowrap; }
.lv-label { font-size: 0.74rem; font-weight: 700; color: #3b4352; margin-right: 2px; }
.lv-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 700; color: var(--muted); padding: 3px 9px; border-radius: 999px; background: linear-gradient(145deg, #fdfcfa, #ebe8e3); box-shadow: 2px 2px 5px rgba(163, 158, 150, 0.45), -1px -1px 3px #fff; }
.lv-chip i { width: 9px; height: 9px; border-radius: 50%; background: #e9edf2; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15); }
.lv-chip b { color: #1e2c45; }
.lv-chip.is-alert b { color: var(--red); }
.lv-val { display: inline-flex; align-items: baseline; gap: 5px; font-size: 0.7rem; color: var(--muted); font-weight: 700; padding: 0 6px; }
.lv-val b { font-size: 0.95rem; color: #1e2c45; font-variant-numeric: tabular-nums; }
.lv-level { font-size: 0.8rem; font-weight: 700; color: var(--ok); padding: 5px 12px; border-radius: 999px; background: #eef8f1; box-shadow: var(--well); white-space: nowrap; }
.lv-level.is-watch { color: #c26a12; background: #fdf3e6; }
.lv-level.is-alert { color: #fff; background: linear-gradient(180deg, #ef4458, #c81e33); box-shadow: 0 3px 10px rgba(200, 30, 51, 0.45); animation: blink 1s infinite; }
.livebar.is-alert { background: linear-gradient(145deg, #fff3f4, #fbe4e8); box-shadow: var(--emboss), inset 0 0 0 2px rgba(214, 40, 59, 0.45); }
#wx-sim[aria-pressed="true"] { color: #fff; background: linear-gradient(180deg, #ef4458, #c81e33); box-shadow: 0 4px 10px rgba(200, 30, 51, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3); }

/* ---------------- 3列 ---------------- */

.s2-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr) 320px; gap: 16px; padding: 14px 20px 0; min-height: 0; }
.s2-left { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 16px; min-height: 0; min-width: 0; }
.s2-left > * { min-width: 0; }

/* --- 今日の一元帳コンディション --- */
.cond { display: grid; gap: 10px; padding: 13px 15px 14px; }
.cond__body { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 12px; align-items: center; }
.ring { position: relative; width: 108px; height: 108px; border-radius: 50%; background: linear-gradient(145deg, #fdfcfa, #e6e3de); box-shadow: 6px 6px 14px rgba(163, 158, 150, 0.5), -5px -5px 12px rgba(255, 255, 255, 0.95), inset 0 1px 0 #fff; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring__pct { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.05; }
.ring__pct b { font-size: 1.7rem; color: #1e2c45; font-variant-numeric: tabular-nums; }
.ring__pct small { font-size: 0.62rem; color: var(--muted); font-weight: 700; }
.ring.is-full .ring__pct b { color: var(--ok); }
.cond__tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px; }
.cond__tiles li { display: grid; grid-template-columns: 10px 1fr; grid-template-rows: auto auto; column-gap: 5px; align-items: center; min-width: 0; padding: 6px 8px; border-radius: 12px; background: linear-gradient(145deg, #fdfcfa, #ebe8e3); box-shadow: var(--raise); }
.cond__tiles i { width: 10px; height: 10px; border-radius: 50%; }
.cond__tiles span { font-size: 0.68rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.cond__tiles b { grid-column: 1 / -1; font-size: 1.3rem; line-height: 1.1; color: #1e2c45; font-variant-numeric: tabular-nums; }
.tile-ok i { background: #1f9d55; box-shadow: 0 0 0 3px rgba(31, 157, 85, 0.18); }
.tile-care i { background: #e07b14; box-shadow: 0 0 0 3px rgba(224, 123, 20, 0.18); }
.tile-urgent i { background: var(--red); box-shadow: 0 0 0 3px rgba(214, 40, 59, 0.18); }
.tile-todo i { background: #9aa1ab; }
.tile-urgent.is-on { background: linear-gradient(145deg, #fff1f3, #f9dde2); }
.tile-urgent.is-on b { color: var(--red); }
.quick { padding: 9px 12px; white-space: normal; flex-wrap: wrap; justify-content: center; line-height: 1.3; text-align: center; }
.quick small { display: block; width: 100%; font-size: 0.68rem; opacity: 0.9; }

/* --- クリスタル3D --- */
.s2-3d { min-height: 0; }
.s2-3d .floor-stack { top: 44px; right: 18px; }
.s2-3d .stage--3d { inset: 10px; }
.floor-stack .fs-urgent i { color: var(--red); animation: blink 1s infinite; }
.floor-stack .fs-care i { color: #e07b14; }
.model .lit.fresh { animation: lit-in 1.3s ease-out; }
@keyframes lit-in { 0% { opacity: 0; } 35% { opacity: 1; filter: brightness(1.6); } 100% { opacity: 1; } }
.lit-legend { position: absolute; z-index: 5; left: 18px; bottom: 16px; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 0.66rem; font-weight: 700; color: #3b4352; padding: 4px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.85); box-shadow: 2px 2px 6px rgba(163, 158, 150, 0.45); max-width: calc(100% - 36px); }
.lit-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 4px; border-radius: 3px; vertical-align: -1px; }
.l-ok::before { background: linear-gradient(180deg, #a8f0c6, #1fae62); }
.l-eq::before { background: linear-gradient(180deg, #a9d8ff, #1f78e0); }
.l-care::before { background: linear-gradient(180deg, #ffd4a0, #e07b14); }
.l-urgent::before { background: linear-gradient(180deg, #ffb3bd, #d6283b); }

/* --- 中央：平面図 --- */
.s2-plan { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; padding: 12px 14px; min-height: 0; }
.plan-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.plan-head .card__title { white-space: nowrap; }
#floor-tabs button { min-width: 44px; }
#walk-btn[aria-pressed="true"] { color: #0f766e; box-shadow: var(--press); background: #e6f6f3; }
#vault-btn b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--navy); color: #fff; display: inline-grid; place-items: center; font-size: 0.72rem; }
.s2-stage { position: relative; inset: auto; min-height: 0; cursor: grab; }
.s2-stage.is-grabbing { cursor: grabbing; }
.pin-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 0.72rem; font-weight: 700; color: #3b4352; padding-right: 90px; min-height: 22px; }
.pin-legend i { font-style: normal; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 4px; border-radius: 50%; color: #fff; font-size: 0.66rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.pin-legend .walk-key { color: #0f766e; }
.s2-plan .zoom { right: 18px; bottom: 12px; display: flex; }

.plan2d .pin3d { cursor: pointer; }
.plan2d .pin3d:hover .pin-head { filter: brightness(1.12); }
.plan2d .pin3d.is-sel .pin-ring { stroke: #1e2c45; }
.plan2d .pin3d.is-urgent .pin-body { animation: urg 1s ease-in-out infinite; }
.plan2d .pin3d.is-dim { opacity: 0.18; pointer-events: none; }
.plan2d .walk-line { fill: none; stroke: #0d9488; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.plan2d .walk-fix { fill: #0d9488; opacity: 0.55; }
.plan2d .cam { cursor: pointer; }
.plan2d .cam:hover circle { filter: brightness(1.1); }

/* --- 右：優先点検リスト --- */
.prio { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 6px; padding: 13px 12px 12px 14px; min-height: 0; }
.prio__list { list-style: none; margin: 4px 0 0; padding: 4px 4px 8px 2px; display: grid; gap: 7px; align-content: start; overflow: auto; scrollbar-width: thin; }
.prio-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 8px 7px 9px; border-radius: 13px; background: linear-gradient(145deg, #fdfcfa, #ebe8e3); box-shadow: var(--raise); cursor: pointer; transition: transform 0.25s, background 0.2s; }
.prio-row:hover { transform: translateX(-2px); }
.prio-row.is-sel { box-shadow: var(--press), 0 0 0 2px rgba(63, 127, 217, 0.5); background: #eef3fa; }
.prio-row.is-new { animation: cut-in 0.7s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes cut-in { from { transform: translateY(-14px) scale(0.96); opacity: 0; } }
.pinb { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 0.74rem; font-weight: 700; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.15); }
.pinb.pin-patrol { background: radial-gradient(circle at 35% 30%, #6fe0a2, #1f9d55 60%, #157a41); }
.pinb.pin-check { background: radial-gradient(circle at 35% 30%, #94c2ff, #3f7fd9 60%, #2a5fb0); }
.pinb.pin-repair { background: radial-gradient(circle at 35% 30%, #ffc27a, #e07b14 60%, #b85f08); }
.pinb.pin-urgent { background: radial-gradient(circle at 35% 30%, #ff8d9b, #d6283b 60%, #a5101f); animation: blink 1s infinite; }
.prio-row__text { display: grid; min-width: 0; line-height: 1.3; }
.prio-row__text b { font-size: 0.8rem; color: #1e2c45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prio-row__text small { font-size: 0.66rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prio-row__acts { display: flex; gap: 4px; }
.prio-row__acts button { border: 0; cursor: pointer; width: 30px; height: 30px; border-radius: 10px; font-weight: 700; font-size: 0.85rem; background: linear-gradient(145deg, #fff, #ebe8e3); box-shadow: 2px 2px 5px rgba(163, 158, 150, 0.5), -1px -1px 3px #fff, inset 0 1px 0 #fff; }
.prio-row__acts .a-ok { color: #1f9d55; }
.prio-row__acts .a-care { color: #e07b14; }
.prio-row__acts button:active { box-shadow: var(--press); }
.prio-row.st-urgent { background: linear-gradient(145deg, #fff3f4, #f9e0e4); box-shadow: var(--raise), inset 0 0 0 1.5px rgba(214, 40, 59, 0.45); }
.prio-row.st-care { background: linear-gradient(145deg, #fff8ef, #f8ead8); }
.prio-row.st-ok { opacity: 0.72; }
.prio-row.st-ok .prio-row__text small { color: #1f7a45; }
.prio-sep { font-size: 0.68rem; font-weight: 700; color: var(--muted); padding: 4px 4px 0; }

/* ---------------- 下：カルテと帳票 ---------------- */

.s2-dock { display: grid; grid-template-columns: minmax(0, 1fr) 408px 220px; gap: 14px; padding: 12px 20px 16px; min-height: 0; }
.karte { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 8px; padding: 12px 16px; }
.karte__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.karte__target { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 700; color: #1e2c45; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.karte__target code { font-size: 0.68rem; color: var(--muted); font-weight: 400; }
.karte__target .pinb { width: 24px; height: 24px; font-size: 0.7rem; }
.karte__body { display: grid; grid-template-columns: 168px 158px minmax(0, 1fr) 236px; grid-template-rows: auto auto; column-gap: 12px; align-items: start; }
.karte__body .fld { margin-bottom: 6px; }
.karte__body select.well-input { appearance: none; cursor: pointer; }
.karte__memo textarea { resize: none; height: 96px; line-height: 1.4; }
.karte__memo { grid-row: span 1; }
.karte__acts { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.karte__state { flex: 1; width: 0; font-size: 0.74rem; color: var(--muted); font-weight: 700; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.karte__btns { display: flex; gap: 8px; flex: none; }
.karte.is-empty .karte__body { opacity: 0.5; pointer-events: none; }
.karte.is-pulse { animation: bump 0.45s; }

.launch { display: grid; align-content: center; justify-items: start; gap: 4px; border: 0; cursor: pointer; text-align: left; padding: 14px 16px; transition: transform 0.15s; color: inherit; }
.launch:hover { transform: translateY(-3px); }
.launch:active { box-shadow: var(--press); transform: none; }
.launch__icon { font-size: 1.7rem; line-height: 1; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(145deg, #fdfcfa, #e8e5e0); box-shadow: var(--raise); margin-bottom: 4px; }
.launch b { font-size: 0.92rem; color: #1e2c45; }
.launch small { font-size: 0.7rem; color: var(--muted); line-height: 1.4; }
.launch small strong { font-size: 1rem; color: var(--blue-dark); }

/* ---------------- ダイアログ ---------------- */

.dialog [data-close] { margin-top: 14px; }
.vault-list--3 { grid-template-columns: repeat(3, 1fr); }
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.photo-pair figure { margin: 0; }
.photo-pair svg { width: 100%; height: auto; display: block; border-radius: 10px; box-shadow: var(--raise); }
.photo-pair figcaption { margin-top: 5px; font-size: 0.74rem; font-weight: 700; color: #3b4352; }
.photo-pair .is-missing { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 10px; background: #efeeea; box-shadow: var(--well); font-size: 0.78rem; color: var(--muted); text-align: center; padding: 10px; }
.photo-kv { margin-top: 12px; padding: 12px; border-radius: 14px; background: #f1f0ec; box-shadow: var(--well); grid-template-columns: 1fr 1fr; }
.status-chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.status-chip.is-measured { color: #fff; background: linear-gradient(180deg, #2bb673, #1f9d55); }
.status-chip.is-estimated { color: #7a4a06; background: #fde9c8; }
.status-chip code { font-size: 0.66rem; opacity: 0.9; }

.timeline { display: grid; grid-template-columns: 0.9fr 1.4fr; gap: 14px; margin-top: 12px; max-height: 66vh; }
.tl-sec { padding: 12px; border-radius: 14px; background: #f1f0ec; box-shadow: var(--well); min-width: 0; overflow: auto; }
.tl-sec h3 { font-size: 0.85rem; margin: 0 0 8px; color: #1e2c45; }
.tl-past { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid #c9d3e0; display: grid; gap: 8px; }
.tl-past li { position: relative; font-size: 0.76rem; }
.tl-past li::before { content: ""; position: absolute; left: -20px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #3f7fd9; box-shadow: 0 0 0 3px #f1f0ec; }
.tl-past li.k-repair::before { background: #e07b14; }
.tl-past li.k-check::before { background: #1f9d55; }
.tl-past li.k-base::before { background: #1e2c45; }
.tl-past time { display: block; font-size: 0.66rem; color: var(--muted); font-weight: 700; }
.tl-grid { display: grid; grid-template-columns: minmax(150px, 1.6fr) repeat(12, minmax(0, 1fr)); gap: 2px; font-size: 0.68rem; }
.tl-grid > span { padding: 4px 2px; text-align: center; }
.tl-grid .tl-m { font-weight: 700; color: var(--muted); white-space: nowrap; line-height: 1.15; }
.tl-grid .tl-m small { display: block; font-size: 0.58rem; font-weight: 600; }
.tl-grid .tl-name { text-align: left; font-weight: 700; color: #1e2c45; padding-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-grid .tl-name small { display: block; font-weight: 400; color: var(--muted); font-size: 0.62rem; }
.tl-grid .tl-cell { border-radius: 6px; background: rgba(255, 255, 255, 0.55); }
.tl-grid .tl-cell.is-due::after { content: ""; display: block; width: 12px; height: 12px; margin: 2px auto; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #94c2ff, #3f7fd9 60%, #2a5fb0); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); }
.tl-grid .tl-cell.is-due.is-law::after { background: radial-gradient(circle at 35% 30%, #ffc27a, #e07b14 60%, #b85f08); }
.tl-note { margin-top: 8px; font-size: 0.68rem; color: var(--muted); }

.sl { display: grid; grid-template-columns: 200px 1fr; gap: 16px; margin-top: 12px; align-items: start; }
.sl__score { display: grid; justify-items: center; gap: 6px; padding: 16px 10px; border-radius: 16px; background: #f1f0ec; box-shadow: var(--well); text-align: center; }
.sl__score .ring { width: 140px; height: 140px; }
.sl__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sl__list li { display: grid; grid-template-columns: 1fr 120px 56px; gap: 4px 12px; align-items: center; padding: 9px 12px; border-radius: 13px; background: linear-gradient(145deg, #fdfcfa, #ebe8e3); box-shadow: var(--raise); }
.sl__list b { font-size: 0.82rem; color: #1e2c45; }
.sl__list b em { font-style: normal; font-size: 0.66rem; color: var(--muted); margin-left: 6px; }
.sl__list p { grid-column: 1 / -1; font-size: 0.72rem; color: var(--muted); }
.sl__bar { height: 9px; border-radius: 999px; box-shadow: var(--well); background: #e7e5e1; overflow: hidden; }
.sl__bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6fd39a, #1f9d55); }
.sl__bar.is-mid i { background: linear-gradient(90deg, #ffc27a, #e07b14); }
.sl__bar.is-low i { background: linear-gradient(90deg, #ff8d9b, #d6283b); }
.sl__pt { font-size: 0.95rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

.dialog--report { width: min(900px, 96vw); height: 92vh; padding: 0; display: none; }
.dialog--report[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.report-bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; }
.report-bar h2 { margin: 0; }
.report-scroll { overflow: auto; padding: 4px 24px 24px; background: #dedbd5; box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.15); }
.sheet { width: 760px; margin: 18px auto; padding: 40px 44px; background: #fff; color: #1f2530; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); font-size: 12px; line-height: 1.55; }
.sheet h1 { font-size: 20px; margin: 0 0 2px; }
.sheet h3 { font-size: 13px; margin: 18px 0 6px; padding-bottom: 3px; border-bottom: 2px solid #1e2c45; }
.sheet .sub { color: #6b7079; font-size: 11px; }
.sheet .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.sheet .kpis div { padding: 8px 10px; border: 1px solid #d9dde3; border-radius: 8px; }
.sheet .kpis small { display: block; color: #6b7079; font-size: 10px; }
.sheet .kpis b { font-size: 20px; }
.sheet .two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sheet .fig { border: 1px solid #d9dde3; border-radius: 8px; height: 220px; position: relative; overflow: hidden; background: radial-gradient(90% 80% at 55% 45%, #fbfcfd 0%, #eef2f6 60%, #e3e8ee 100%); }
.sheet .fig svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 11px; }
.sheet th, .sheet td { border-bottom: 1px solid #e3e6ea; padding: 4px 6px; text-align: left; }
.sheet th { background: #f3f5f8; }
.sheet .foot { margin-top: 18px; font-size: 10px; color: #6b7079; }

.empty { position: fixed; inset: 64px 0 0; z-index: 40; display: grid; place-items: center; background: rgba(233, 231, 227, 0.75); backdrop-filter: blur(3px); }
.empty__card { width: min(460px, 90vw); display: grid; gap: 12px; justify-items: start; padding: 24px; }
.empty__card h2 { font-size: 1.05rem; }

.print-root { display: none; }
@media print {
  body.s2 > *:not(.print-root) { display: none !important; }
  body.s2 { display: block; height: auto; overflow: visible; background: #fff; }
  .print-root { display: block; }
  .print-root .sheet { box-shadow: none; margin: 0; width: auto; padding: 0; }
}

/* ---------------- 図面検証の進み具合 ---------------- */
.verify-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin: 0; font-size: 0.7rem; font-weight: 700; color: #2c4f86; }
.verify-bar i { height: 9px; border-radius: 99px; background: #e3e1dc; box-shadow: var(--well); overflow: hidden; }
.verify-bar b { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #9fd0ff, #3f7fd9); transition: width 0.5s; }
.verify-bar em { font-style: normal; color: var(--muted); white-space: nowrap; }

/* ---------------- ピンの小窓 ---------------- */
.pin-pop { position: fixed; z-index: 40; width: 270px; padding: 11px 12px 12px; border-radius: 16px; background: linear-gradient(145deg, #fdfcfa, #efece7); box-shadow: 8px 10px 24px rgba(60, 55, 48, 0.28), -3px -3px 10px rgba(255, 255, 255, 0.9), inset 0 1px 0 #fff; }
.pin-pop header { display: flex; align-items: center; gap: 7px; }
.pin-pop header b { flex: 1; font-size: 0.84rem; color: #1e2c45; }
.pin-pop .pinb { width: 24px; height: 24px; font-size: 0.7rem; }
.pop-x { border: 0; background: none; font-size: 1.1rem; color: var(--muted); cursor: pointer; }
.pop-st { margin: 7px 0 4px; font-size: 0.74rem; font-weight: 700; color: #3b4352; }
.pop-st.st-ok { color: #1f7a45; } .pop-st.st-care { color: #c26a12; } .pop-st.st-urgent { color: var(--red); }
.pop-note { margin: 0 0 4px; font-size: 0.7rem; color: #2c4f86; font-weight: 700; }
.pop-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.pop-acts .btn:disabled { opacity: 0.45; }

/* ---------------- 中核特許4件 ---------------- */
.patents { padding: 12px 13px; display: grid; grid-template-rows: auto 1fr; gap: 8px; min-width: 0; }
.patents .card__title small { font-size: 0.64rem; color: var(--muted); }
.patents__list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.patent { display: grid; align-content: center; gap: 1px; border: 0; cursor: pointer; padding: 6px 8px; border-radius: 12px; text-align: left; color: inherit; background: linear-gradient(145deg, #fdfcfa, #e9e6e1); box-shadow: var(--raise); transition: transform 0.15s; }
.patent:hover { transform: translateY(-2px); }
.patent code { font-size: 0.64rem; font-weight: 700; color: #fff; justify-self: start; padding: 1px 6px; border-radius: 6px; background: linear-gradient(180deg, #34507d, #1e2c45); }
.patent b { font-size: 0.76rem; color: #1e2c45; }
.patent-rows { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 8px; }
.patent-rows li { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; padding: 10px 12px; border-radius: 12px; background: #f6f4f0; box-shadow: var(--well); }
.patent-rows li.is-on { background: #eef4fd; outline: 2px solid rgba(63, 127, 217, 0.4); }
.patent-rows code { grid-row: 1 / 3; align-self: start; font-weight: 700; color: #fff; padding: 2px 7px; border-radius: 6px; background: linear-gradient(180deg, #34507d, #1e2c45); }
.patent-rows b { font-size: 0.86rem; }
.patent-rows p { margin: 2px 0 0; font-size: 0.76rem; color: var(--muted); }
.patent-rows .patent-rows__role { grid-column: 2; font-weight: 700; color: #2c4f86; }

/* ---------------- スマホで撮った写真 ---------------- */
.photo-real { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #ddd; }
.photo-real img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-real span { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 5px; font-size: 0.7rem; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.5); }
.livebar .lv-group { padding: 3px 5px 3px 8px; gap: 4px; }
.livebar .lv-val { padding: 0 4px; }

/* ---------------- 右：法定点検の期日アラート ---------------- */
.s2-right { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; min-height: 0; min-width: 0; }
.s2-right > * { min-width: 0; }
.alerts { display: grid; gap: 5px; padding: 11px 11px 10px 13px; min-height: 0; }
.alerts.is-over { box-shadow: var(--emboss), inset 0 0 0 2px rgba(163, 16, 31, 0.35); }
.alerts__head { display: flex; align-items: center; gap: 4px 6px; min-width: 0; flex-wrap: wrap; }
.alerts__head .card__title { font-size: 0.86rem; white-space: nowrap; }
.al-sim { margin-left: auto; display: flex; align-items: center; gap: 3px; font-size: 0.8rem; }
.al-sim select { min-width: 0; border: 0; border-radius: 9px; padding: 3px 4px; font-size: 0.68rem; font-weight: 700; color: #2a3446; background: #efeeea; box-shadow: var(--well); max-width: 128px; }
.al-today { margin: 0; font-size: 0.64rem; color: var(--muted); font-weight: 700; }
.al-today b { color: #1e2c45; }
.al-simtag { font-style: normal; color: #fff; background: #7c3aed; border-radius: 6px; padding: 0 5px; margin-left: 4px; }
.alerts__list { list-style: none; margin: 0; padding: 2px 3px 4px 0; display: grid; gap: 6px; max-height: min(236px, 24vh); overflow: auto; scrollbar-width: thin; }
.al-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 6px; row-gap: 4px; align-items: start; padding: 6px 7px; border-radius: 11px; cursor: pointer; background: linear-gradient(145deg, #fdfcfa, #ebe8e3); box-shadow: var(--raise); border-left: 4px solid var(--lv, #8a93a3); }
.al-row.is-sel { outline: 2px solid rgba(63, 127, 217, 0.5); }
.al-mark { font-size: 1rem; line-height: 1.2; }
.al-text { display: grid; gap: 1px; min-width: 0; }
.al-text b { font-size: 0.7rem; line-height: 1.35; color: #1e2c45; }
.al-text small { font-size: 0.62rem; color: var(--muted); font-weight: 700; }
.al-text .al-renotify { color: #a3101f; }
.al-clear { grid-column: 2; justify-self: start; border: 0; cursor: pointer; padding: 3px 9px; border-radius: 8px; font-size: 0.66rem; font-weight: 700; color: #1f6f43; background: linear-gradient(145deg, #f3fbf6, #dff1e6); box-shadow: 2px 2px 5px rgba(163, 158, 150, 0.45), -1px -1px 3px #fff; }
.al-clear:active { box-shadow: var(--press); }
.al-none { font-size: 0.7rem; color: var(--muted); font-weight: 700; padding: 6px 4px; }
.lv-month { --lv: #1f9d55; } .lv-ten { --lv: #2c63b5; } .lv-five { --lv: #c99400; } .lv-eve { --lv: #d6283b; } .lv-over { --lv: #a3101f; } .lv-later { --lv: #8a93a3; }
.al-row.lv-five { background: linear-gradient(145deg, #fffbea, #f7efcf); }
.al-row.lv-eve { background: linear-gradient(145deg, #fff3f4, #f9e0e4); }
.al-row.lv-over { background: linear-gradient(145deg, #fde8ea, #f6cdd3); }
.al-row.lv-over .al-mark { animation: blink 1.2s infinite; }
.lvl-chip { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; color: #fff; background: var(--lv, #8a93a3); white-space: nowrap; }
.lvl-chip.lv-five { color: #4a3a00; background: #f5d33b; }

/* ---------------- カルテ：担当者・法定点検期日・修繕前後 × GPS ---------------- */
.k-col { display: grid; min-width: 0; }
.karte .fld { margin-bottom: 5px; gap: 3px; font-size: 0.7rem; }
.karte .well-input { padding: 6px 9px; font-size: 0.8rem; }
.k-stat p { margin: 0; display: grid; gap: 4px; justify-items: start; min-height: 31px; }
.k-stat .lvl-chip { font-size: 0.66rem; }
.k-na { font-style: normal; font-size: 0.7rem; color: var(--muted); }
.k-clear { border: 0; cursor: pointer; padding: 2px 8px; border-radius: 8px; font-size: 0.64rem; font-weight: 700; color: #1f6f43; background: linear-gradient(145deg, #f3fbf6, #dff1e6); box-shadow: 2px 2px 5px rgba(163, 158, 150, 0.45), -1px -1px 3px #fff; }
.k-ev { display: grid; gap: 4px; min-width: 0; }
.k-ev__head { display: flex; align-items: center; gap: 5px; font-size: 0.7rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.gps-sel { min-width: 0; width: 0; flex: 1; border: 0; border-radius: 8px; padding: 2px 4px; font-size: 0.62rem; font-weight: 700; color: #2a3446; background: #efeeea; box-shadow: var(--well); }
.k-ev__slots { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ev-slot { position: relative; display: grid; grid-template-rows: 68px auto; border-radius: 10px; overflow: hidden; background: #f1f0ec; box-shadow: var(--well); }
.ev-empty { display: grid; place-content: center; text-align: center; font-size: 0.66rem; font-weight: 700; color: #4b5563; border: 1.5px dashed #c9c4bb; border-radius: 9px; margin: 3px; line-height: 1.35; }
.ev-empty small { font-size: 0.58rem; color: var(--muted); }
.ev-thumb { position: relative; border: 0; padding: 0; margin: 0; cursor: zoom-in; background: #ddd; display: block; width: 100%; height: 68px; }
.ev-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gps-chip { position: absolute; left: 3px; bottom: 3px; font-style: normal; font-size: 0.56rem; font-weight: 700; color: #fff; padding: 1px 5px; border-radius: 5px; background: rgba(13, 148, 136, 0.92); white-space: nowrap; }
.gps-chip.is-off { background: rgba(214, 40, 59, 0.94); }
.ev-slot__bar { display: flex; align-items: center; gap: 3px; padding: 2px 4px; font-size: 0.62rem; }
.ev-slot__bar b { flex: 1; color: #1e2c45; }
.ev-slot__bar button { border: 0; cursor: pointer; width: 24px; height: 20px; border-radius: 6px; font-size: 0.72rem; background: linear-gradient(145deg, #fff, #e8e5e0); box-shadow: 1px 1px 3px rgba(163, 158, 150, 0.55); }

/* ---------------- 下：帳票と連携のボタン（3×2） ---------------- */
.tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: 1fr 1fr; gap: 9px; min-height: 0; }
.tools-grid .launch { overflow: hidden; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; column-gap: 6px; row-gap: 1px; padding: 7px 9px; border-radius: 14px; min-width: 0; }
.tools-grid .launch__icon { grid-row: 1 / 3; width: 30px; height: 30px; font-size: 1rem; border-radius: 9px; margin: 0; }
.tools-grid .launch b { font-size: 0.72rem; line-height: 1.25; }
.tools-grid .launch small { font-size: 0.6rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tools-grid .launch small strong { font-size: 0.74rem; }
@media (max-width: 1440px) {
  .s2-dock { grid-template-columns: minmax(0, 1fr) 300px 172px; gap: 12px; }
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, 1fr); gap: 6px; }
  .tools-grid .launch { padding: 4px 8px; }
  .tools-grid .launch small { display: none; }
  .karte__body { grid-template-columns: 136px 132px minmax(0, 1fr) 206px; column-gap: 9px; }
  .patents__list { grid-template-columns: 1fr; gap: 5px; }
  .patent { padding: 4px 7px; }
  .patent b { display: none; }
}

/* ---------------- ピン：根拠写真・法定点検 ---------------- */
.pop-law { margin: 4px 0; padding: 4px 7px; font-size: 0.68rem; font-weight: 700; line-height: 1.4; border-radius: 8px; color: #1e2c45; background: #f6f4f0; border-left: 4px solid var(--lv, #8a93a3); }
.pop-ev { display: flex; gap: 7px; align-items: center; margin: 5px 0; font-size: 0.68rem; font-weight: 700; color: #3b4352; line-height: 1.4; }
.pop-thumbs { display: flex; gap: 2px; border: 0; padding: 0; cursor: zoom-in; background: none; flex: none; }
.pop-thumbs img, .pop-thumbs i { width: 46px; height: 34px; object-fit: cover; border-radius: 5px; background: #e3e1dc; display: block; }
.pin-pop .pop-acts .btn:nth-child(n+5) { grid-column: span 1; }
.pin-legend .ev-key { color: var(--muted); }

/* ---------------- 根拠情報ダイアログ ---------------- */
.ev-list { display: grid; gap: 12px; max-height: 62vh; overflow: auto; padding: 4px 2px; margin-top: 8px; }
.ev-rec { padding: 10px 12px; border-radius: 14px; background: #f8f7f4; box-shadow: var(--well); }
.ev-rec.is-focus { outline: 3px solid rgba(245, 179, 1, 0.75); }
.ev-rec header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev-rec header code { font-size: 0.7rem; color: #fff; background: #1e2c45; padding: 1px 6px; border-radius: 5px; }
.ev-rec header b { font-size: 0.86rem; color: #1e2c45; }
.judge-chip { margin-left: auto; font-size: 0.74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; color: #fff; background: #0d9488; }
.judge-chip.is-off { background: #d6283b; }
.ev-rec .mini { margin: 4px 0 6px; }
.ev-pair { display: grid; grid-template-columns: 1fr 1fr 120px; gap: 10px; align-items: start; }
.ev-pair figure { margin: 0; }
.ev-pair img, .ev-noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; background: #e3e1dc; }
.ev-noimg { display: grid; place-content: center; font-size: 0.72rem; color: var(--muted); font-weight: 700; text-align: center; padding: 6px; }
.ev-pair figcaption { font-size: 0.72rem; font-weight: 700; color: #3b4352; margin-top: 3px; }
.ev-radius { width: 120px; height: 120px; }
.ev-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; margin-top: 8px; }
.ev-table th, .ev-table td { padding: 3px 6px; border-bottom: 1px solid #e3e1dc; text-align: left; vertical-align: top; }
.ev-table tr > th:first-child { color: var(--muted); white-space: nowrap; width: 128px; }
.j-on { color: #0f766e; } .j-off { color: #c81e33; }
.ev-none { font-size: 0.8rem; color: var(--muted); padding: 12px; }
.cal-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.cal-foot [data-close] { margin-top: 0; }

/* ---------------- 履歴・法定点検カレンダー ---------------- */
.cal-dialog { width: min(980px, 96vw); }
.cal-bar { display: flex; align-items: center; gap: 8px; }
.cal-bar h2 { margin: 0; }
.cal-month { font-size: 1rem; color: #1e2c45; min-width: 104px; text-align: center; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.cb { display: inline-flex; align-items: center; gap: 1px; font-style: normal; font-size: 0.66rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; color: #1e2c45; background: #fff; box-shadow: inset 0 0 0 1.5px var(--cb, #8a93a3); cursor: pointer; white-space: nowrap; }
.cb-patrol { --cb: #1f9d55; } .cb-check { --cb: #2c63b5; } .cb-anomaly { --cb: #d6283b; } .cb-repair { --cb: #c99400; } .cb-statutory { --cb: #5b3fb0; }
.cb-due { --cb: var(--lv, #5b3fb0); color: #fff; background: var(--lv, #5b3fb0); box-shadow: none; }
.cb-due.lv-five { color: #4a3a00; background: #f5d33b; }
.cb-due.lv-over { animation: blink 1.4s infinite; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.cal-wd.is-sun, .cal-cell.is-sun > b { color: #c81e33; } .cal-wd.is-sat, .cal-cell.is-sat > b { color: #2c63b5; }
.cal-cell { min-height: 74px; display: grid; grid-template-rows: auto 1fr; gap: 2px; padding: 4px 5px; border-radius: 10px; cursor: pointer; background: linear-gradient(145deg, #fdfcfa, #efece7); box-shadow: 2px 2px 5px rgba(163, 158, 150, 0.4), -1px -1px 3px #fff; }
.cal-cell > b { font-size: 0.78rem; color: #1e2c45; }
.cal-cell.is-out { opacity: 0.45; }
.cal-cell.is-today { box-shadow: inset 0 0 0 2px #3f7fd9; }
.cal-cell.is-sel { background: #eef4fd; outline: 2px solid rgba(245, 179, 1, 0.8); }
.cal-badges { display: flex; flex-wrap: wrap; gap: 2px; align-content: start; }
.cal-badges .cb { font-size: 0.6rem; padding: 0 4px; }
.cal-day { margin-top: 10px; max-height: 26vh; overflow: auto; }
.cal-day h3 { font-size: 0.86rem; margin: 0 0 6px; }
.cal-day h3 small { font-size: 0.72rem; color: var(--muted); }
.cal-evs { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.cal-ev { width: 100%; display: grid; grid-template-columns: 22px 64px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 6px; align-items: center; text-align: left; border: 0; cursor: pointer; padding: 5px 8px; border-radius: 10px; background: #f8f7f4; box-shadow: inset 4px 0 0 var(--cb, #8a93a3), var(--raise); color: inherit; }
.cal-ev.cb-due { box-shadow: inset 4px 0 0 var(--lv, #5b3fb0), var(--raise); }
.cal-ev:hover { background: #eef4fd; }
.cal-ev__mark { grid-row: 1 / 3; }
.cal-ev b { font-size: 0.74rem; }
.cal-ev span { font-size: 0.76rem; font-weight: 700; color: #1e2c45; }
.cal-ev small { grid-column: 2 / 4; font-size: 0.66rem; color: var(--muted); }
.cal-ev em { grid-row: 1 / 3; grid-column: 4; font-style: normal; font-size: 0.66rem; font-weight: 700; }

/* ---------------- API連携窓口 ---------------- */
.api-dialog { width: min(1000px, 96vw); max-height: 92vh; overflow: auto; }
.api-sec { margin-top: 10px; }
.api-sec h3 { font-size: 0.86rem; margin: 0 0 6px; color: #1e2c45; }
.api-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.api-table th, .api-table td { padding: 4px 6px; border-bottom: 1px solid #e3e1dc; text-align: left; vertical-align: top; }
.api-table code { font-size: 0.68rem; word-break: break-all; }
.m-get, .m-post { display: inline-block; padding: 1px 6px; border-radius: 5px; color: #fff; font-size: 0.66rem; }
.m-get { background: #2c63b5; } .m-post { background: #1f9d55; }
.api-hook { display: grid; gap: 6px; margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: #f6f4f0; box-shadow: var(--well); }
.api-hook .fld { margin: 0; }
.api-hook .btn { justify-self: start; }
.api-events { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.72rem; }
.api-json-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.api-json { margin: 0; max-height: 34vh; overflow: auto; padding: 10px 12px; border-radius: 12px; font-size: 0.68rem; line-height: 1.45; color: #d9f2e4; background: #16202f; box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4); white-space: pre; }
.api-tests { display: flex; gap: 8px; flex-wrap: wrap; }
.api-log { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; font-size: 0.72rem; font-weight: 700; color: #1f6f43; max-height: 120px; overflow: auto; }
.api-log .is-bad { color: #c81e33; }

/* ---------------- 帳票（オーナー報告書・転記サポート） ---------------- */
.sheet .rp-head { border-bottom: 3px solid #1e2c45; padding-bottom: 6px; }
.sheet h4 { font-size: 12px; margin: 12px 0 4px; color: #1e2c45; }
.sheet h4 small { font-weight: 400; color: #6b7079; }
.sheet .two > table { align-self: start; }
.sheet .health { display: grid; gap: 6px; align-content: start; }
.sheet .health__score { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; border: 2px solid #1e2c45; border-radius: 10px; }
.sheet .health__score b { font-size: 34px; line-height: 1; }
.sheet .health__score small { font-size: 12px; font-weight: 700; }
.sheet td.bar { width: 70px; }
.sheet td.bar i { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #7fe0a8, #1f9d55); }
.sheet td small { color: #6b7079; }
.sheet .kpis--5 { grid-template-columns: repeat(5, 1fr); }
.sheet .plots { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.sheet .plot { margin: 0; border: 1px solid #d9dde3; border-radius: 8px; padding: 4px; break-inside: avoid; }
.sheet .plot svg { width: 100%; height: 220px; display: block; }
.sheet .plot figcaption { font-size: 10.5px; font-weight: 700; padding: 2px 4px; }
.sheet .evp { border: 1px solid #d9dde3; border-radius: 8px; padding: 8px; margin-bottom: 8px; break-inside: avoid; }
.sheet .evp__head { margin: 0 0 6px; font-size: 11px; }
.sheet .evp__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet .evp__pair figure { margin: 0; }
.sheet .evp__pair img, .sheet .evp .ev-noimg { width: 100%; height: 150px; object-fit: cover; border-radius: 6px; display: block; }
.sheet .evp__pair figcaption { font-size: 10px; font-weight: 700; }
.sheet .ev-table { font-size: 10px; }
.sheet table.gov { font-size: 10px; }
.sheet table.gov td { vertical-align: top; }
.sheet table.gov hr { border: 0; border-top: 1px dashed #c9cdd3; margin: 3px 0; }
.sheet td.judge { font-size: 14px; font-weight: 700; text-align: center; }
.sheet td.judge.is-ok { color: #1f7a45; } .sheet td.judge.is-ng { color: #c81e33; }
.sheet .lvl-chip { font-size: 10px; }
@media print {
  @page { size: A4 portrait; margin: 12mm 11mm; }
  .print-root .sheet { font-size: 10.5px; }
  .print-root .sheet, .print-root .sheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-root .sheet h3 { break-after: avoid; }
  .print-root .sheet tr, .print-root .sheet figure { break-inside: avoid; }
  .print-root .sheet .plots { grid-template-columns: 1fr 1fr; }
  .print-root .sheet .plot svg { height: 200px; }
}

.toast { pointer-events: none; }
@media (max-width: 1366px) {
  .sync span { display: none; }
  .sync { padding: 6px 9px; }
}
@media (max-height: 900px) {
  .alerts__list { max-height: 17vh; }
  .al-today { display: none; }
}

/* iPad・スマホ：3D・平面図をドラッグしてもページがスクロールしない */
#model-view, #plan-view { touch-action: none; overscroll-behavior: contain; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button, select, .btn { touch-action: manipulation; }

/* hidden 属性はどの部品でも必ず隠す（display 指定に負けないように） */
[hidden] { display: none !important; }

/* クリスタル3D：描画領域をタイトルの下・凡例の上に独立させ、地面の「前面道路（正面：…）」の文字が凡例に隠れないようにする */
.s2-3d .stage--3d { top: 40px; bottom: 46px; }

/* クリスタル3D：階の切替ボタンを右端に寄せて小さくし、建物の右端に重ならないよう描画領域の右側をあける */
.s2-3d .floor-stack { right: 8px; top: 44px; gap: 4px; }
.s2-3d .floor-stack button { min-width: 46px; padding: 4px 7px; font-size: 0.72rem; }
.s2-3d .stage--3d { right: 60px; }

/* ================= 管理運営モード画面（①〜⑦） ================= */

/* ワークフローバー：①〜⑦を左から順に */
.s2-flow { margin: 10px 20px 0; padding: 8px 12px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; }
.s2-flow__title { margin: 0; font-size: 0.92rem; color: #1e2c45; white-space: nowrap; display: grid; line-height: 1.2; }
.s2-flow__title small { font-size: 0.64rem; color: var(--muted); font-weight: 700; }
.s2-flow__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.flow-step { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: 22px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 6px; align-items: center; text-align: left; border: 0; cursor: pointer; padding: 5px 8px; border-radius: 12px; color: #1e2c45; background: linear-gradient(145deg, #fdfcfa, #ebe8e3); box-shadow: var(--raise); font: inherit; }
.flow-step:hover { background: linear-gradient(145deg, #ffffff, #eef3fb); }
.flow-step i { grid-row: 1 / 3; font-style: normal; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 0.78rem; font-weight: 700; color: #fff; background: var(--navy, #1e2c45); }
.flow-step b { font-size: 0.72rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.flow-step small { font-size: 0.62rem; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-step.is-done i { background: #1f9d55; }
.flow-step.is-done small { color: #1f7a45; }
.flow-step.is-warn i { background: #d6283b; }
.flow-step.is-warn small { color: #c81e33; }
.flow-step.is-on { box-shadow: var(--press); background: #e6f6f3; }
.s2-flow__steps li + li .flow-step::before { content: "›"; position: absolute; left: -6px; top: 50%; transform: translate(-50%, -50%); font-size: 0.8rem; color: #a3a9b4; }
.s2-flow__share { grid-column: 1 / -1; margin: 2px 0 0; font-size: 0.74rem; font-weight: 700; color: #0f766e; }
@media (max-width: 1366px) { .s2-flow { grid-template-columns: minmax(0, 1fr); } .s2-flow__title { grid-auto-flow: column; justify-content: start; gap: 8px; align-items: baseline; } }

/* ④ サイクル（巡回 ➔ 点検 ➔ 異常/緊急 ➔ 修繕） */
.cycle { align-items: center; }
.cycle__no { font-size: 0.78rem; font-weight: 700; color: #1e2c45; padding: 0 2px 0 5px; }
.cycle button b { margin-left: 3px; font-size: 0.66rem; min-width: 16px; padding: 0 4px; border-radius: 999px; background: #e3e1dc; color: #1e2c45; display: inline-block; text-align: center; }
.cycle button[data-pin="patrol"]::after, .cycle button[data-pin="check"]::after, .cycle button[data-pin="alert"]::after { content: " ➔"; color: #a3a9b4; font-weight: 400; }
.cycle.is-pulse { animation: cyclepulse 1s ease-out 2; }
@keyframes cyclepulse { 50% { box-shadow: 0 0 0 4px rgba(245, 179, 1, 0.55), var(--well); } }
.pop-cycle { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin: 6px 0 2px; padding: 5px 6px; border-radius: 10px; background: #f1f0ec; box-shadow: var(--well); }
.pop-cycle__no { font-size: 0.72rem; font-weight: 700; color: #1e2c45; margin-right: 2px; }
.pop-cycle i { font-style: normal; font-size: 0.66rem; color: #a3a9b4; }
.cyc { border: 0; cursor: pointer; padding: 3px 6px; border-radius: 8px; font-size: 0.66rem; font-weight: 700; color: var(--muted); background: transparent; }
.cyc.is-on { color: #1e2c45; background: #fff; box-shadow: 2px 2px 5px rgba(163, 158, 150, 0.5); }
.cyc-alert.is-on { color: #c81e33; } .cyc-repair.is-on { color: #b85f08; } .cyc-check.is-on { color: #2a5fb0; } .cyc-patrol.is-on { color: #157a41; }

/* ⑦ 写真ピン */
#pin-add-btn[aria-pressed="true"] { box-shadow: var(--press); background: #f5b301; color: #1e2c45; }
.s2-stage.is-placing { cursor: crosshair; outline: 3px dashed rgba(245, 179, 1, 0.9); outline-offset: -3px; border-radius: 14px; }
.s2-plan > .plan-head { grid-row: 1; } .s2-plan > .s2-stage { grid-row: 2; grid-column: 1; } .s2-plan > .pin-legend { grid-row: 3; }
.pin-place { grid-row: 2; grid-column: 1; align-self: start; justify-self: start; position: relative; z-index: 3; margin: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.15); display: flex; align-items: center; gap: 8px; font-size: 0.74rem; font-weight: 700; color: #7a5a00; background: #fff6d6; padding: 5px 10px; border-radius: 10px; }
.plan2d .photo-pin { cursor: pointer; }
.plan2d .photo-pin:hover .photo-pin__card { filter: brightness(1.04); stroke-width: 200; }
.plan2d .photo-pin.is-dim { opacity: 0.2; pointer-events: none; }
.pin-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0; }
.pin-slot { display: grid; gap: 6px; padding: 8px; border-radius: 12px; background: #f1f0ec; box-shadow: var(--well); }
.pin-slot > b { font-size: 0.8rem; color: #1e2c45; }
.pin-slot[data-phase="before"] > b { color: #c81e33; } .pin-slot[data-phase="after"] > b { color: #0f766e; }
.pin-slot__img { height: 190px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: #fff; color: var(--muted); font-size: 0.74rem; }
.pin-slot__img img { width: 100%; height: 100%; object-fit: contain; }
.pin-slot__bar { display: flex; gap: 6px; flex-wrap: wrap; }
.pin-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.pin-notes { margin-top: 8px; font-size: 0.74rem; }
.pin-notes ol { margin: 4px 0 0; padding-left: 20px; }
.pin-notes time { color: var(--muted); font-weight: 700; margin-right: 4px; }
.pin-add-note { margin-top: 8px; }
.pin-msg, .st-msg, .vd-msg { min-height: 1.2em; color: #2c4f86; font-weight: 700; }

/* ① ② ③ の表 */
.st-table-wrap, .vd-list-wrap { max-height: 52vh; overflow: auto; border-radius: 12px; box-shadow: var(--well); background: #fbfaf8; }
.st-table { width: 100%; border-collapse: collapse; font-size: 0.74rem; }
.st-table th, .st-table td { padding: 6px 8px; border-bottom: 1px solid #e6e3dd; text-align: left; vertical-align: middle; }
.st-table th { position: sticky; top: 0; background: #efede9; font-size: 0.7rem; color: #3b4352; z-index: 1; }
.st-table small { color: var(--muted); }
.st-table .well-input { min-width: 0; width: 100%; padding: 5px 8px; font-size: 0.74rem; }
.st-table input[type="date"] { min-width: 132px; }
.vd-acts-cell { white-space: nowrap; }
.vd-acts-cell .btn + .btn { margin-left: 4px; }
.vd-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; margin: 8px 0; }
.vd-acts { display: flex; gap: 6px; }
.share-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; margin: 8px 0; }
.share-form { display: grid; gap: 10px; }
.share-target { border: 0; margin: 0; padding: 8px 10px; border-radius: 12px; background: #f1f0ec; box-shadow: var(--well); display: grid; gap: 6px; font-size: 0.8rem; font-weight: 700; }
.share-target legend { font-size: 0.72rem; color: var(--muted); padding: 0; }
.share-target small { display: block; margin-left: 22px; font-weight: 400; color: var(--muted); font-size: 0.68rem; }
.share-qr { display: grid; justify-items: center; gap: 6px; padding: 10px; border-radius: 14px; background: #fff; box-shadow: var(--raise); }
.share-qr canvas { width: 232px; height: 232px; image-rendering: pixelated; }
.share-meta { margin: 0; font-size: 0.7rem; text-align: center; color: #3b4352; display: grid; gap: 2px; }
.share-url { display: flex; gap: 4px; width: 100%; }
.share-url input { flex: 1; min-width: 0; font-size: 0.66rem; padding: 4px 6px; }
.vault-sub { margin: 12px 0 6px; font-size: 0.86rem; color: #1e2c45; }
.vault-sub small { font-weight: 400; color: var(--muted); font-size: 0.7rem; margin-left: 6px; }

/* 竣工図（冊子補正済） */
#booklet-btn b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #0f766e; color: #fff; display: inline-grid; place-items: center; font-size: 0.72rem; }
#booklet-btn.is-empty b { background: #a3a9b4; }
.booklet-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 10px 0; max-height: 60vh; overflow: auto; }
.booklet-item img { width: 100%; height: auto; display: block; border-radius: 8px; background: #fff; }
#booklet-tabs { margin-top: 6px; }

/* ⑤ 報告の予定・⑥ カレンダーの定期報告 */
.report-plan { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 700; color: #3b4352; }
.report-plan .well-input { padding: 4px 8px; font-size: 0.74rem; }
.cb-report { --cb: #0f766e; }
.cb-report.is-plan { color: #fff; background: var(--lv, #0f766e); box-shadow: none; }
.cb-report.is-plan.lv-later { background: #0f766e; }
.sheet table.rp-pins td { vertical-align: top; }
.sheet .rp-pin-img img { width: 120px; height: 90px; object-fit: cover; border-radius: 4px; display: block; }
.sheet .rp-pin-img small { color: #6b7280; }
@media (max-width: 1100px) { .vd-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .share-grid, .pin-slots { grid-template-columns: minmax(0, 1fr); } .pin-form { grid-template-columns: minmax(0, 1fr); } }

/* 上の帯：建物名の欄と「保護区分：標準」などの印を重ねない（1440〜1920px）。建物名の欄だけを縮め、はみ出す文字は「…」にする */
body.s2 .top { gap: 10px; }
body.s2 .top > * { flex-shrink: 0; }
body.s2 .top .site-chip { flex: 0 1 auto; min-width: 120px; max-width: 360px; overflow: hidden; margin-left: 4px; }
body.s2 .top .site-chip b, body.s2 .top .site-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.s2 .top .grade-slot { flex: 0 0 auto; margin-left: 0; position: relative; z-index: 1; }
body.s2 .top .top__spacer { flex: 1 1 0; min-width: 0; }
body.s2 .top .brand { flex-shrink: 0; }
@media (max-width: 1600px) { body.s2 .top .site-chip { max-width: 260px; } body.s2 .phone-link { padding-left: 10px; padding-right: 10px; } }

.share-ott { margin: 0; padding: 4px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; color: #1f7a45; background: #eaf7ef; }

/* ⚠ 未確定と、期日の候補 */
.flow-warn { font-style: normal; color: #fff; background: #d6283b; padding: 0 6px; border-radius: 999px; cursor: pointer; }
.iss-list { display: grid; gap: 8px; max-height: 60vh; overflow: auto; margin: 8px 0; }
.iss-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: #fbfaf8; box-shadow: var(--well); font-size: 0.78rem; }
.iss-row p { margin: 0; line-height: 1.5; }
.iss-row small { color: var(--muted); }
.iss-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.iss-acts .well-input { width: 220px; padding: 4px 8px; font-size: 0.74rem; }
.cand-chip { display: inline-block; margin: 3px 0 0; padding: 2px 8px; border: 0; border-radius: 999px; font-size: 0.68rem; font-weight: 700; color: #7a5a00; background: #fff1c2; box-shadow: inset 0 0 0 1px #f2b705; cursor: pointer; }

/* 2026-11-15 01:44 公開API LIVE 連動バッジ */
.lv-badges { gap: 6px; }
.live-badge { display: inline-flex; align-items: center; max-width: 100%; padding: 2px 9px; border-radius: 999px; font-size: 0.68rem; font-weight: 800; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #eef1f4; color: #4a5568; box-shadow: var(--well); }
.live-badge.is-live { background: #e6f6ec; color: #136c3a; }
.live-badge.is-mock { background: #f3f1ea; color: #6b5a2a; }
.live-badge.is-wait { background: #eef2fa; color: #2c4f8c; }
#fc-sub { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
/* 10秒LIVE更新（統合ステータス帯・各グループの LIVE バッジ・等幅の受信時刻） */
.livebar .lc-strip { padding: 5px 10px; }
.livebar .lv-group { position: relative; overflow: hidden; }
.livebar .lc-badge { font-size: 0.6rem; padding: 1px 7px; }
.lc-teles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 8px; min-width: 0; }
.lc-teles .lc-tele { font-size: 0.6rem; padding: 2px 7px; }
.lc-teles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.livebar .lc-strip .live-badge { font-size: 0.62rem; padding: 1px 8px; box-shadow: none; }
.livebar .lc-strip .lc-prog { flex-basis: 40px; }
@media (max-width: 1760px) { .lc-teles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 📋 ご契約確認・解約手続き（解約ボタン）：ヘッダー右端に常時表示。2行にして幅を抑える */
.cancel-open-btn { display: inline-grid; justify-items: start; gap: 0; line-height: 1.2; padding: 4px 12px; font-size: 0.72rem; color: #8a1424; box-shadow: inset 0 0 0 1.5px rgba(176, 18, 42, 0.35), var(--raise, 0 1px 3px rgba(0,0,0,.12)); flex: none; }
.cancel-open-btn__l2 { font-size: 0.7rem; }
.phone-link__short { display: none; }
@media (max-width: 1760px) { .phone-link__long { display: none; } .phone-link__short { display: inline; } }
@media (max-width: 1500px) { header.top { column-gap: 8px; gap: 8px; } .cancel-open-btn { padding: 4px 9px; } }
@media (max-width: 1500px) { body.s2 header.top { gap: 6px; } body.s2 .sync { font-size: 0.68rem; padding-left: 8px; padding-right: 8px; } }

/* ===== 2026-11-15 02:18 防災連動バーを1行のスリムバーに（高さ約36px）。平面図の作業エリアを 330px 以上に戻す ===== */
.livebar.livebar--slim { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; height: 40px; padding: 3px 10px; overflow: visible; min-width: 0; }
.livebar--slim > * { flex: none; }
.livebar--slim .onair { flex: none; }
.livebar--slim .lc-host { flex: none; }
.livebar--slim .lc-strip { padding: 2px 4px 2px 8px; gap: 6px; flex-wrap: nowrap; box-shadow: none; border-radius: 999px; }
.livebar--slim .lc-strip .lc-ttl, .livebar--slim .lc-strip .lc-prog { display: none; }
.livebar--slim .lc-ring { width: 22px; height: 22px; }
.livebar--slim .lc-cd__txt { font-size: 0.66rem; }
.livebar--slim .lc-now { padding: 3px 10px; font-size: 0.68rem; }
.livebar--slim .lv-group { flex: 0 1 auto; min-width: 0; height: 30px; padding: 2px 6px 2px 8px; gap: 4px; overflow: hidden; }
.livebar--slim .lv-label { font-size: 0.66rem; margin-right: 0; white-space: nowrap; }
.livebar--slim .lv-chip { padding: 2px 7px; font-size: 0.66rem; gap: 3px; box-shadow: none; }
.livebar--slim .lv-val { padding: 0 2px; font-size: 0.64rem; gap: 3px; white-space: nowrap; min-width: 0; }
.livebar--slim .lv-val b { font-size: 0.8rem; }
.livebar--slim #fc-sub { display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.livebar--slim .lc-badge { padding: 0; width: 14px; height: 14px; justify-content: center; background: none; box-shadow: none; }
.livebar--slim .lc-badge span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.livebar--slim .lc-scan { height: 100%; }
.livebar--slim .db-badge { padding: 3px 9px; font-size: 0.64rem; }
.livebar--slim .lv-level { padding: 3px 9px; font-size: 0.7rem; }
.livebar--slim #wx-sim { padding: 4px 10px; font-size: 0.7rem; white-space: nowrap; }
.livebar--slim .top__spacer { flex: 1 1 0; min-width: 0; }
.lc-pop { position: relative; flex: none; }
.lc-pop summary { list-style: none; cursor: pointer; font-size: 0.68rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: #eef8f2; color: #1d4d3a; white-space: nowrap; box-shadow: inset 0 0 0 1px rgba(31, 157, 85, 0.25); }
.lc-pop summary::-webkit-details-marker { display: none; }
.lc-pop__body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: min(760px, calc(100vw - 40px)); display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: 0 14px 40px rgba(10, 24, 48, 0.28); }
.lc-pop__ttl { margin: 0; font-size: 0.72rem; color: #3b4352; }
.lc-pop__ttl small { margin-left: 8px; color: var(--muted); }
.lc-pop__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-pop .lc-teles { grid-template-columns: 1fr !important; }
.lc-pop .lc-tele { white-space: normal; font-size: 0.66rem; }
@media (max-width: 1600px) { .livebar--slim .lv-val--opt2, .livebar--slim #pl-size { display: none; } }
@media (max-width: 1500px) { .livebar--slim .lv-val--opt, .livebar--slim .db-badge { display: none; } .livebar--slim #fc-sub { max-width: 96px; } }
.cancel-open-btn { display: inline-flex; align-items: center; font-size: 0.74rem; padding: 6px 12px; }
.livebar--slim .lc-now__long { display: none; } .livebar--slim .lc-now__short { display: inline; }
@media (min-width: 1800px) { .livebar--slim .lc-now__long { display: inline; } .livebar--slim .lc-now__short { display: none; } }
.livebar--slim .lv-group { flex-shrink: 0; }
.livebar--slim .lv-group--pl { flex-shrink: 1; }
.livebar--slim #pl-id { display: inline-block; max-width: 140px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
@media (max-width: 1580px) { .livebar--slim #fc-sub { display: none; } .livebar--slim .lv-label { font-size: 0.62rem; } .livebar--slim #pl-id { max-width: 92px; } }
@media (max-width: 1700px) { .livebar--slim .lv-val--opt, .livebar--slim .lv-val--opt2, .livebar--slim #pl-size { display: none; } }

/* ===== 2026-11-15 02:25 立体図（3Dアイソメトリック積層フロアセレクター）：平面図の左脇の縦スリム枠（幅 118px） ===== */
.s2-plan { grid-template-columns: 118px minmax(0, 1fr); column-gap: 10px; }
.s2-plan > .plan-head, .s2-plan > .pin-place, .s2-plan > .pin-legend { grid-column: 1 / -1; }
.s2-plan > .s2-stage { grid-column: 2; }
.s2-plan > .fsel { grid-row: 2; grid-column: 1; }
.fsel { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 5px; min-height: 0; padding: 7px 6px 6px; border-radius: 14px; background: radial-gradient(120% 80% at 50% 20%, #13294b 0%, #0a1830 70%, #060f20 100%); box-shadow: inset 2px 2px 8px rgba(0, 0, 0, 0.5), 0 1px 0 #fff; color: #dffcf8; overflow: hidden; }
.fsel__ttl { margin: 0; font-size: 0.72rem; font-weight: 800; text-align: center; letter-spacing: 0.02em; }
.fsel__toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.fsel__toggle[hidden] { display: none; }
.fsel__toggle button { font: inherit; font-size: 0.62rem; font-weight: 800; padding: 3px 0; border-radius: 8px; border: 1px solid rgba(143, 247, 234, 0.35); color: #bff7ef; background: rgba(255, 255, 255, 0.06); cursor: pointer; white-space: nowrap; }
.fsel__toggle button[aria-pressed="true"] { color: #0b1a33; background: linear-gradient(145deg, #a9fff4, #5fe3d3); border-color: transparent; }
.fsel__stack { --pitch: 26px; position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; outline: none; padding: 2px 0; }
.fsel__stack:focus-visible { box-shadow: 0 0 0 2px rgba(95, 227, 211, 0.7); border-radius: 10px; }
.fsel__plate { position: relative; flex: none; height: var(--pitch); margin-top: calc(var(--pitch) * -0.18); padding: 0; border: 0; background: none; cursor: pointer; color: inherit; transition: transform 0.12s ease-out, filter 0.12s; transform: translateX(4px); }
.fsel__plate:first-child { margin-top: 0; }
.fsel__plate:hover { transform: translateX(0); filter: brightness(1.25); }
.fsel__slab { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fsel__top { fill: rgba(64, 120, 190, 0.38); stroke: rgba(143, 200, 255, 0.55); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
.fsel__front { fill: rgba(30, 70, 130, 0.75); }
.fsel__side { fill: rgba(20, 50, 100, 0.85); }
.fsel__plate.has-red .fsel__top { stroke: rgba(255, 110, 125, 0.85); }
.fsel__plate.is-sel { transform: translateX(-6px); z-index: 200 !important; filter: drop-shadow(0 0 8px rgba(95, 227, 211, 0.85)); }
.fsel__plate.is-sel .fsel__top { fill: rgba(95, 227, 211, 0.85); stroke: #c9fff8; }
.fsel__plate.is-sel .fsel__front { fill: rgba(31, 182, 196, 0.95); }
.fsel__plate.is-sel .fsel__side { fill: rgba(16, 130, 150, 0.95); }
.fsel__txt { position: absolute; left: 10%; right: 6%; top: 8%; height: 56%; display: flex; align-items: center; gap: 3px; font-size: clamp(0.56rem, calc(var(--pitch) * 0.36), 0.74rem); line-height: 1; white-space: nowrap; overflow: hidden; pointer-events: none; }
.fsel__txt b { font-weight: 900; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.fsel__txt small { font-size: 0.85em; color: #bfe9ff; }
.fsel__plate.is-sel .fsel__txt b { color: #04283a; text-shadow: none; }
.fsel__plate.is-sel .fsel__txt small { color: #064a5c; }
.fsel__bdg { font-style: normal; font-size: 0.82em; font-weight: 800; padding: 0 2px; border-radius: 4px; background: rgba(0, 0, 0, 0.35); color: #fff; }
.fsel__plate.is-sel .fsel__bdg { background: rgba(255, 255, 255, 0.7); color: #1e2c45; }
.fsel__hint { margin: 0; font-size: 0.56rem; text-align: center; color: rgba(191, 247, 239, 0.75); }
.s2-plan.is-tall #floor-tabs { display: none; }
.fsel__plate:focus-visible { outline: 2px solid #ffd54a; outline-offset: -2px; }

/* ===== 2026-11-15 02:50〜02:53 枝分かれ式UI（建物・立場の選択／③QRの渡し先／⑤提出形式） ===== */
.livebar.livebar--slim { height: 36px; padding: 2px 10px; }
.livebar--slim .lv-group { height: 28px; }
.site-pick { position: relative; flex: 0 1 auto; min-width: 0; display: flex; }
button.site-chip { font: inherit; text-align: left; border: 0; cursor: pointer; position: relative; padding-right: 26px; }
button.site-chip:hover { background: #e9e8e3; }
.site-chip__caret { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 0.7rem; color: var(--muted); }
.site-menu { position: absolute; left: 4px; top: calc(100% + 6px); z-index: 120; width: 340px; padding: 10px; border-radius: 14px; background: #fff; box-shadow: 0 14px 40px rgba(10, 24, 48, 0.28); }
.site-menu[hidden], .site-menu__lv[hidden] { display: none; }
.site-menu__lv { display: grid; gap: 6px; }
.site-menu__ttl { margin: 0 0 2px; font-size: 0.72rem; font-weight: 800; color: var(--muted); }
.site-menu button[data-site-pick], .site-br { font: inherit; display: grid; gap: 1px; text-align: left; padding: 9px 11px; border-radius: 10px; border: 1px solid #e1e5ec; background: #fafbfd; cursor: pointer; }
.site-menu button[data-site-pick]:hover, .site-br:hover { background: #eef4ff; border-color: #b9cdee; }
.site-menu button[data-site-pick] b, .site-br b { font-size: 0.82rem; color: #1e2c45; }
.site-menu button[data-site-pick] small, .site-br small { font-size: 0.68rem; color: var(--muted); }
.site-menu button[aria-current="true"] { border-color: #2c63b5; box-shadow: inset 0 0 0 1px #2c63b5; }
.site-menu button[hidden], .site-br[hidden] { display: none; }
.site-back { font: inherit; justify-self: start; font-size: 0.74rem; font-weight: 700; padding: 3px 10px; border: 0; border-radius: 8px; background: #eef2f8; color: #1f4f96; cursor: pointer; }
.site-back[hidden] { display: none; }
/* ③ 誰にQRを渡すか */
.share-q, .report-choice__q { margin: 6px 0 8px; font-weight: 800; color: #1e2c45; }
.share-q[hidden], .report-choice__q[hidden] { display: none; }
.share-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 6px; }
.share-roles.is-chosen { grid-template-columns: minmax(0, 1fr); }
.share-roles button { font: inherit; display: grid; gap: 4px; text-align: left; padding: 14px 14px; border-radius: 14px; border: 1px solid #d5dce8; background: #fff; cursor: pointer; font-size: 0.92rem; font-weight: 800; color: #1e2c45; }
.share-roles button small { font-size: 0.74rem; font-weight: 600; color: var(--muted); }
.share-roles button:hover { background: #f3f7fd; border-color: #b9cdee; }
.share-roles button[aria-selected="true"] { background: #eef4ff; border-color: #2c63b5; box-shadow: inset 0 0 0 1px #2c63b5; }
.share-roles button[hidden] { display: none; }
.share-role-note { margin: 0 0 10px; }
.share-grid[hidden] { display: none; }
.share-hist summary { cursor: pointer; font-weight: 700; margin: 10px 0 6px; }
/* ⑤ 提出形式 */
.report-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 18px; }
.report-choice[hidden] { display: none; }
.report-choice__q { flex: 1 1 100%; margin: 0; }
.report-choice__btn { font: inherit; display: grid; gap: 2px; text-align: left; padding: 12px 16px; border-radius: 12px; border: 1px solid #d5dce8; background: #fff; cursor: pointer; font-weight: 800; color: #1e2c45; min-width: 260px; }
.report-choice__btn small { font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.report-choice__btn[aria-pressed="true"] { background: #eef4ff; border-color: #2c63b5; }
.report-choice__btn[hidden] { display: none; }
.report-pdfpanel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-pdfpanel[hidden] { display: none; }
.report-choice__msg { flex: 1 1 100%; margin: 0; }
#report-dialog.is-choosing .report-scroll, #report-dialog.is-choosing #report-print, #report-dialog.is-choosing #report-done, #report-dialog.is-choosing #report-plan { display: none; }
#report-dialog[data-branch="pdf"] #report-print { display: none; }
.stamp-box { display: flex; justify-content: flex-end; gap: 14px; margin: 0 0 10px; }
.stamp-box__cell { display: grid; justify-items: center; gap: 4px; font-size: 10px; color: #333; }
.stamp-box__lbl { font-weight: 700; }
.stamp-box__frame { display: block; border: 1.5px solid #b81d31; background: #fff; }
.stamp-box__frame--kaku { width: 60px; height: 60px; }
.stamp-box__frame--maru { width: 54px; height: 54px; border-radius: 50%; }
/* 🗂 一括管理・👑 オーナービュー */
.pf-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 4px 0; font-size: 0.82rem; }
.pf-crumb__b { font: inherit; border: 0; background: none; color: #1f4f96; text-decoration: underline; cursor: pointer; padding: 0; }
.pf-list { list-style: none; margin: 6px 0 12px; padding: 0; display: grid; gap: 6px; max-height: 52vh; overflow: auto; }
.pf-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-row__name { flex: 1 1 260px; font-weight: 700; font-size: 0.82rem; }
.pf-row__st { font-size: 0.78rem; color: #3b4352; }
.pf-pick { font: inherit; width: 100%; display: flex; justify-content: space-between; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid #e1e5ec; background: #fafbfd; cursor: pointer; }
.pf-pick:hover { background: #eef4ff; border-color: #b9cdee; }
.pf-pick b { font-size: 0.86rem; color: #1e2c45; }
.pf-pick small { font-size: 0.8rem; color: #3b4352; }
.ow-pick { display: grid; gap: 8px; margin: 8px 0; }
.ow-pick[hidden], .ow-sec[hidden] { display: none; }
/* 立体図のドット */
.fsel__dot { width: 7px; height: 7px; flex: none; border-radius: 50%; box-shadow: 0 0 6px currentColor; }
.fsel__dot--red { background: #ff4d5e; color: #ff4d5e; animation: fsel-blink 1.6s ease-in-out infinite; }
.fsel__dot--due { background: #ffd34d; color: #ffd34d; }
.fsel__dot--warn { background: #ff9f43; color: #ff9f43; }
@keyframes fsel-blink { 50% { opacity: 0.45; } }
.s2-plan #floor-tabs { display: none; }  /* 階は左の立体図でえらぶ（横並びの階タブは使わない） */
.dialog--report[open] { grid-template-rows: auto auto minmax(0, 1fr); }
#report-dialog.is-choosing[open] { height: auto; max-height: 92vh; }
.report-choice { align-content: start; }
/* 1440〜1500px：平面図の上の帯と凡例を詰めて、平面図の作業エリアを広く */
.cancel-open-btn { display: inline-grid; justify-items: center; line-height: 1.15; padding: 3px 10px; }
.cancel-open-btn__l2 { font-size: 0.6rem; font-weight: 700; opacity: 0.85; }
@media (max-width: 1560px) {
  .plan-head .lng { display: none; }
  .s2-plan .plan-head { row-gap: 4px; }
  .s2-plan .pin-legend { font-size: 0.66rem; line-height: 1.35; }
  .s2-plan .cycle button { padding-left: 7px; padding-right: 7px; }
}
body.s2 .top .site-pick { flex: 0 1 auto; min-width: 120px; max-width: 360px; }
body.s2 .top .site-pick .site-chip { min-width: 0; max-width: 100%; width: 100%; }
@media (max-width: 1560px) { .s2-plan { padding-top: 8px; padding-bottom: 8px; row-gap: 6px; } .s2-plan .pin-legend { font-size: 0.62rem; line-height: 1.3; } }
.pin-occ { margin: 6px 0 8px; padding: 8px 10px; border-radius: 10px; background: #fff7e0; box-shadow: inset 0 0 0 1px #f0d48a; display: grid; gap: 6px; }
.pin-occ[hidden] { display: none; }
.pin-occ__txt { margin: 0; font-size: 0.8rem; font-weight: 700; color: #6b4a00; }
@media (max-width: 1560px) { body.s2 .top .grade-badge small { display: none; } }
.share-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.share-roles .share-roles__self { grid-column: 1 / -1; border: 2px solid #2c63b5; background: linear-gradient(145deg, #f3f8ff, #e6efff); }
.share-roles.is-chosen { grid-template-columns: minmax(0, 1fr); }

.rp-to { margin: 4px 0 0; font-size: 12px; font-weight: 700; }
/* スマホ幅（768px以下）：たて1列にしてページ全体をスクロール（スマホ1台で管理運営） */
@media (max-width: 768px) {
  body.s2 { display: block; height: auto; overflow: auto; }
  body.s2 .top { flex-wrap: wrap; height: auto; row-gap: 6px; padding: 6px 8px; }
  body.s2 .top > * { flex-shrink: 1; min-width: 0; }
  .livebar.livebar--slim { flex-wrap: wrap; height: auto; margin: 6px 8px; }
  .s2-flow { margin: 6px 8px; }
  .s2-flow__steps { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .s2-grid { display: block; padding: 8px; }
  .s2-grid > * { margin-bottom: 12px; }
  .s2-plan { min-height: 460px; }
  body.s2 > :last-child { height: auto; }
}
@media (max-width: 768px) {
  .s2-plan .plan-head, .s2-plan .cycle { flex-wrap: wrap; }
  .s2-plan .cycle { display: flex; }
  body.s2 .top .grade-badge small, body.s2 .top .phone-link, body.s2 .top .sync { display: none; }
  .s2-flow__steps .flow-step { min-width: 0; }
  .livebar--slim .lv-group, .livebar--slim .lc-host { flex: 1 1 auto; }
}
@media (max-width: 768px) {
  .karte, .karte__head, .karte__body { display: block !important; max-width: 100%; min-width: 0; height: auto !important; }
  .karte__body > *, .karte__head > * { max-width: 100%; min-width: 0; margin-bottom: 8px; }
  .karte * { min-width: 0; }
  .s2-flow__title small, .s2-flow__title { white-space: normal; }
  .s2-bottom, body.s2 > section:last-of-type { display: block; height: auto; }
}
@media (max-width: 768px) {
  .s2-dock { display: block; padding: 8px; }
  .s2-dock > * { margin-bottom: 12px; max-width: 100%; }
  .karte__btns { flex-wrap: wrap; }
}
@media (max-width: 768px) { .karte__btns { position: static !important; display: flex !important; flex-wrap: wrap; width: auto !important; max-width: 100%; grid-column: auto !important; } .karte__btns > * { flex: 1 1 auto; min-width: 0; } }

/* ===== 2026-11-15 16:20 社長指示：管理運営モードのシンプル化 =====
   ・宣伝の表示（特許の一覧・全国建物DBの件数）は出さない（公式HPに載せる）。
   ・① 法定点検 〜 ⑦ 写真とメモ の7つの業務を大きなカードにして、押しやすく見やすくする。 */
.card.patents, #db-badge { display: none !important; }
.flow-step { min-height: 64px; padding: 10px 12px !important; border-radius: 14px !important; }
.flow-step b { font-size: 0.86rem !important; line-height: 1.35; }

.flow-step small { font-size: 0.72rem !important; }
/* 外枠は初期入力で確定済みなので、国土地理院（標高）と PLATEAU の表示は管理運営モードでは出さない */
#livebar .lv-group--gsi, #livebar .lv-group--pl { display: none !important; }
/* 4種ピンの色（2026-11-15 社長の定義）：巡回＝緑 #1f7a63・点検＝青 #2563eb・緊急＝赤 #dc2626・修繕＝黄茶 #c98a1b */
.pinb.pin-patrol { background: radial-gradient(circle at 35% 30%, #5fc2a4, #1f7a63 60%, #145243) !important; }
.pinb.pin-check { background: radial-gradient(circle at 35% 30%, #8fb2ff, #2563eb 60%, #1a46a8) !important; }
.pinb.pin-urgent { background: radial-gradient(circle at 35% 30%, #ff8f8f, #dc2626 60%, #a11818) !important; }
.pinb.pin-repair { background: radial-gradient(circle at 35% 30%, #f1c46e, #c98a1b 60%, #8f610f) !important; }

/* N1〜N7 の常設パネル（js/screen2-npanels.js）。① 〜 ⑦ の帯は、N1〜N7 と下の小さなボタンから開く */
#s2-flow { display: none !important; }
.npanels { padding: 12px !important; }
.npanels__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.np { display: grid; align-content: start; gap: 4px; min-height: 96px; padding: 12px; border: 0; border-radius: 16px; cursor: pointer; text-align: left; font: inherit;
  background: linear-gradient(145deg, #ffffff, #eef2f7); box-shadow: var(--raise, 0 4px 12px rgba(0,0,0,.08)); color: #1e2c45; }
.np:hover { background: linear-gradient(145deg, #ffffff, #e6eefb); }
.np:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.np__head { display: flex; align-items: center; justify-content: space-between; }
.np__no { font-size: 0.78rem; padding: 2px 9px; border-radius: 999px; color: #fff; background: linear-gradient(180deg, #34507d, #1e2c45); }
.np__ic { font-size: 1.4rem; }
.np__t { font-weight: 800; font-size: 0.92rem; line-height: 1.35; }
.np__s { font-size: 0.7rem; font-weight: 700; color: #5b6478; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#np-n1 .np__no { background: linear-gradient(180deg, #ef4444, #b91c1c); }
#np-n2 .np__no { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.npanels__more { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.npanels__chip { border: 0; border-radius: 999px; padding: 8px 14px; min-height: 38px; font: inherit; font-size: 0.78rem; font-weight: 800; cursor: pointer; color: #1e2c45; background: #eef2f7; }
.np-pulse { animation: np-pulse 1.4s ease-out 2; border-radius: 14px; }
@keyframes np-pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.55); } 100% { box-shadow: 0 0 0 16px rgba(37, 99, 235, 0); } }
@media (max-width: 1280px) { .npanels__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .npanels__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.s2-right { grid-template-rows: auto auto minmax(0, 1fr); overflow-y: auto; overscroll-behavior: contain; }
.s2-qr { display: grid; grid-template-columns: 172px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 12px; align-items: start; padding: 14px !important; }
.s2-qr .card__title { grid-column: 1 / -1; margin: 0 0 8px; font-size: 0.95rem; }
.s2-qr__code { width: 172px; height: 172px; image-rendering: pixelated; border-radius: 12px; background: #fff; padding: 8px; box-shadow: var(--well, inset 0 1px 3px rgba(0,0,0,.1)); }
.s2-qr__note { margin: 0; font-size: 0.72rem; line-height: 1.6; color: #4a5568; }
/* N1〜N7 を足しても、3D・平面図・右の列が窮屈にならないよう、PCでは画面の高さが足りなければページを縦にスクロールさせる */
@media (min-width: 769px) {
  body.s2 { height: auto; min-height: 100vh; overflow-y: auto; grid-template-rows: 64px auto auto max(600px, calc(100vh - 150px)) 222px; }
}
.s2-right > .s2-qr { min-height: 236px; }
.s2-right > .alerts { min-height: 200px; }
.np__mini { width: 100%; height: 34px; display: block; }
.np { min-height: 120px; }

/* v24：管理運営モード画面は、PCで下半分が見切れないよう、ページ全体を縦スクロールにする */
html:has(body.s2) { overflow-y: auto; height: auto; }
body.s2 { overflow-x: hidden; overflow-y: auto; }
