:root { --bd:#ddd; --bg:#f7f7f7; --fg:#111; }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color:var(--fg); background:var(--bg); }
a { color: inherit; }

.top { padding: 12px 16px; background:#fff; border-bottom:1px solid var(--bd); position: sticky; top:0; z-index: 6; }

.small { font-size: 12px; color:#444; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 12px; display:flex; flex-direction:column; gap:12px; }

.card { background:#fff; border:1px solid var(--bd); border-radius:10px; padding:12px; }
h2 { margin:0 0 10px; font-size:16px; }
h3 { margin: 10px 0 6px; font-size: 14px; }

label { display:block; font-size:12px; margin-bottom:6px; color:#333; }
input, select, textarea { width:100%; padding:10px; border:1px solid var(--bd); border-radius:8px; font-size:14px; background:#fff; }
textarea { resize: vertical; }

.chk { display:flex; align-items:center; gap:8px; font-size:14px; }
.row { display:flex; gap:10px; align-items:center; margin-top:10px; flex-wrap:wrap; }
.msg { font-size: 13px; color:#b00; min-height: 18px; }

.btn { padding:10px 12px; border:1px solid var(--bd); background:#fff; border-radius:8px; cursor:pointer; }
.btn.sm { padding:6px 8px; font-size:12px; }
.btn.danger { border-color:#f0b; color:#b00; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.center { text-align:center; }
.right { text-align:right; }

.grid2 { display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
.grid3 { display:grid; grid-template-columns: 1fr 1fr 1fr; gap:10px; }
.mt { margin-top: 10px; }

.tableWrap { width:100%; overflow:auto; border:1px solid var(--bd); border-radius:10px; }
.t { width:100%; border-collapse: collapse; table-layout: fixed; background:#fff; min-width: 920px; }
.t th, .t td { border-bottom:1px solid var(--bd); padding:8px; vertical-align: middle; }
.t th { position: sticky; top: 0; background:#fff; z-index:1; font-size:12px; }
.in { width:100%; padding:8px; }

.w-id{width:60px}
.w-house{width:140px}
.w-room{width:90px}
.w-res{width:160px}
.w-staff{width:70px}
.w-code{width:90px}
.w-lg{width:240px}
.w-act{width:220px}

.acts { display:flex; gap:6px; flex-wrap:wrap; }

/* code色制御 */
.codeBlue{ color:#06c; font-weight:600; }

/* ✅ 検索を固定（折り畳みでもOK） */
.stickySearch{
  position: sticky;
  top: 56px;
  z-index: 5;
}

/* details summary */
details > summary{
  cursor:pointer;
  user-select:none;
  font-weight:700;
  list-style:none;
}
details > summary::-webkit-details-marker{ display:none; }
details > summary::before{
  content:"▸";
  display:inline-block;
  margin-right:8px;
  transform: translateY(-1px);
}
details[open] > summary::before{ content:"▾"; }

/* dots */
.dot{
  display:inline-block;
  width:12px;
  height:12px;
  border-radius:50%;
  border:1px solid var(--bd);
}
.dot.big{
  width:16px;
  height:16px;
}

/* ✅ 居住者登録：薄い黄色背景 */
.residentRegCard{
  background: #fffde7;
}

/* ✅ ハウス登録：薄い緑背景（⑤） */
.houseRegCard{
  background: #e8f5e9;
}

/* ✅ ハウス色：一覧行の左帯 */
.houseRow{
  border-left: 6px solid var(--houseColor, transparent);
}

/* color select row */
.colorPickRow{
  display:flex;
  align-items:center;
  gap:10px;
}

/* push checkbox UI */
.checks{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.chkBox{
  display:flex;
  align-items:center;
  gap:6px;
  border:1px solid var(--bd);
  border-radius:999px;
  padding:6px 10px;
  background:#fff;
  font-size:13px;
}
.pushBox{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.pushHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  flex-wrap:wrap;
}
.pushBtns{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.box{
  border:1px solid var(--bd);
  border-radius:8px;
  padding:10px;
  background:#fff;
  font-size:14px;
}

@media (max-width: 900px){
  .pushBox{ grid-template-columns: 1fr; }
}
@media (max-width: 800px){
  .grid2 { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr; }
  .stickySearch{ top: 64px; }
}