/* =========================================================
   通所ボード WEBアプリ - 共通スタイル (白ベース)
   ========================================================= */
:root{
  --white: #ffffff;
  --bg: #f7f8fa;
  --line: #e4e7ec;
  --text-main: #23272f;
  --text-sub: #7b828f;
  --accent: #2f6fed;
  --accent-soft: #eaf1ff;
  --red: #e2483d;
  --red-soft: #fdeceb;
  --gray-badge: #9aa1ac;
  --gray-badge-soft: #eef0f3;
  --blue-badge: #3d7be2;
  --blue-badge-soft: #e8f0fd;
  --green-badge: #33a866;
  --green-badge-soft: #e8f8ee;
  --amber-badge: #d98a1f;
  --amber-badge-soft: #fdf1e0;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(30,34,40,0.06);
  --shadow-lg: 0 8px 30px rgba(30,34,40,0.10);
}

*{ box-sizing: border-box; }

html,body{
  margin:0; padding:0;
  background: var(--bg);
  color: var(--text-main);
  font-family: "Noto Sans JP","Hiragino Sans","Yu Gothic",sans-serif;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; cursor: pointer; }

/* ---------- Layout ---------- */
.app-shell{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header{
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .5px;
}
.brand .brand-icon{
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items:center; justify-content:center;
  font-size: 18px;
  overflow: hidden;
  flex: 0 0 auto;
}
.brand .brand-icon img{
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 3px;
}
.brand .office-code{
  font-size: 11px;
  color: var(--text-sub);
  font-weight: 500;
  margin-left: 4px;
}

.header-nav{
  display:flex; align-items:center; gap: 8px;
}
.nav-link{
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  border: 1px solid transparent;
}
.nav-link.active, .nav-link:hover{
  background: var(--accent-soft);
  color: var(--accent);
}
.logout-btn{
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text-sub);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.logout-btn:hover{ background: var(--bg); color: var(--text-main); }

.app-main{
  flex: 1;
  padding: 24px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

/* ---------- Login Page ---------- */
.login-wrap{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg,#ffffff 0%, #f2f5fb 100%);
  padding: 20px;
}
.login-card{
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 44px 38px 36px;
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--line);
}
.login-card .login-logo{
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  display:flex; align-items:center; justify-content:center;
  font-size: 26px;
  margin: 0 auto 18px;
  overflow: hidden;
}
.login-card .login-logo img{
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 6px;
}
.login-card h1{
  text-align:center;
  font-size: 20px;
  margin: 0 0 6px;
}
.login-card p.sub{
  text-align:center;
  color: var(--text-sub);
  font-size: 13px;
  margin: 0 0 28px;
}
.field{
  margin-bottom: 18px;
}
.field label{
  display:block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 6px;
  letter-spacing: .3px;
}
.field input{
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  font-size: 16px;
  letter-spacing: 2px;
  background: var(--bg);
  color: var(--text-main);
  transition: border-color .15s;
}
.field input:focus{
  outline: none;
  border-color: var(--accent);
  background: var(--white);
}
.field input[type="time"]{
  font-family: "Inter","Noto Sans JP",sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: .5px;
}
.field select{
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  background: var(--bg);
  color: var(--text-main);
  transition: border-color .15s;
  font-family: inherit;
  appearance: auto;
}
.field select:focus{ outline:none; border-color: var(--accent); background: var(--white); }
.field select:disabled{ opacity:.55; cursor:not-allowed; }
.add-modal-hint{
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 8px;
  padding: 9px 12px;
  margin: -6px 0 16px;
}
.btn-primary{
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  box-shadow: 0 6px 16px rgba(47,111,237,0.30);
}
.btn-primary:hover{ background:#255ed1; }
.btn-primary:active{ transform: translateY(1px); }
.login-error{
  background: var(--red-soft);
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 16px;
  display: none;
  text-align: center;
}
.login-hint{
  text-align:center;
  margin-top: 20px;
  font-size: 11px;
  color: var(--text-sub);
}

/* ---------- Date bar ---------- */
.date-bar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.date-bar .date-title{
  display:flex; align-items:baseline; gap: 10px;
}
.date-bar .date-title .big{
  font-size: 26px;
  font-weight: 800;
}
.date-bar .date-title .youbi{
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  background: var(--accent);
  border-radius: 8px;
  padding: 4px 10px;
}
.date-bar .date-title .youbi.sat{ background:#3d7be2; }
.date-bar .date-title .youbi.sun{ background:#e2483d; }
.date-controls{
  display:flex; align-items:center; gap: 8px;
}
.icon-btn{
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  display:flex; align-items:center; justify-content:center;
  font-size: 15px;
  color: var(--text-sub);
}
.icon-btn:hover{ background: var(--bg); color: var(--text-main); }
.date-controls input[type=date]{
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text-main);
}
.today-btn{
  border: 1px solid var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
}
.today-btn:hover{ background: var(--accent); color:#fff; }

.summary-chips{
  display:flex; gap:10px; flex-wrap: wrap;
}
.chip{
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--bg);
  color: var(--text-sub);
  border: 1px solid var(--line);
}
.chip.chip-attend{ color: var(--accent); background: var(--accent-soft); border-color: transparent;}
.chip.chip-bento{ color: var(--red); background: var(--red-soft); border-color: transparent;}
.chip.chip-rest{ color: var(--green-badge); background: var(--green-badge-soft); border-color: transparent;}
.chip.chip-trial{ color: var(--amber-badge); background: var(--amber-badge-soft); border-color: transparent;}
.chip.chip-visit{ color: var(--blue-badge); background: var(--blue-badge-soft); border-color: transparent;}

/* ---------- Board ---------- */
.board-toolbar{
  display:flex; align-items:center; justify-content: space-between;
  margin-bottom: 8px; flex-wrap: wrap; gap: 10px;
}
.board-toolbar-left{
  display:flex; align-items:center; gap: 12px; flex-wrap: wrap;
}
.board-toolbar-right{
  display:flex; align-items:center; gap: 10px; flex: 0 0 auto;
}
.board-toolbar .roster-count{
  font-size: 13px; color: var(--text-sub); font-weight: 700;
}
.board-hint-text{
  font-size:12px; color:var(--text-sub);
}
.save-status{
  font-size: 12px;
  font-weight: 700;
  color: var(--amber-badge);
  white-space: nowrap;
}
.save-status.saved{ color: var(--green-badge); }
.save-board-btn{
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 6px 16px rgba(47,111,237,0.30);
  display:flex; align-items:center; gap:8px;
  white-space: nowrap;
}
.save-board-btn:hover{ background:#255ed1; }
.save-board-btn:disabled{
  background: var(--gray-badge-soft);
  color: var(--gray-badge);
  box-shadow: none;
  cursor: default;
}
.save-board-btn.has-changes{
  background: var(--red);
  box-shadow: 0 6px 16px rgba(226,72,61,0.35);
  animation: save-pulse 1.6s ease-in-out infinite;
}
.save-board-btn.has-changes:hover{ background:#c93c32; }
@keyframes save-pulse{
  0%, 100% { box-shadow: 0 6px 16px rgba(226,72,61,0.35); }
  50% { box-shadow: 0 6px 22px rgba(226,72,61,0.6); }
}
.board-save-hint{
  font-size: 12px;
  font-weight: 700;
  color: var(--amber-badge);
  background: var(--amber-badge-soft);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 14px;
}
.board-card{
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  overflow-x: auto;
}
.board-scroll{
  display: flex;
  gap: 22px;
  position: relative;
  padding-left: 58px;
  align-items: flex-start;
}

/* 各カラム共通の縦方向レイアウト基準(軸カラムも同じ寸法で揃える) */
.col-header{
  height: 76px;
  display:flex; flex-direction: column; align-items:center; justify-content:flex-end;
  gap: 6px;
  margin-bottom: 8px;
  position: relative;
  width: 100%;
}
.time-input-row{
  height: 38px;
  display:flex; align-items:center; justify-content:center;
  margin-bottom: 6px;
  width: 100%;
}
.time-input-row.end-row{
  margin-bottom: 0;
  margin-top: 6px;
}
.mini-time-input{
  width: 84px;
  text-align: center;
  font-family: "Inter","Noto Sans JP",sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 5px 4px;
  background: var(--bg);
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}
.mini-time-input:focus{ outline:none; border-color: var(--accent); background: var(--white); }

.time-axis-col{
  width: 52px !important;
}
.time-axis-labels{
  position: relative;
  height: 420px;
  width: 100%;
}
.time-axis-labels .t-label{
  position: absolute;
  left: 0; right: 0;
  font-family: "Inter","Noto Sans JP",sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--text-main);
  transform: translateY(-50%);
  text-align: right;
  padding-right: 6px;
  font-variant-numeric: tabular-nums;
}
.time-axis-labels .t-label::after{
  content:"";
  position:absolute;
  left: 100%;
  top: 50%;
  width: 4px;
  height: 1px;
  background: var(--line);
}

/* お昼休憩バンド (各カラムのtimeline-zone内に配置) */
.lunch-band{
  position: absolute;
  left: 0; right: 0;
  background: repeating-linear-gradient(
    135deg,
    rgba(226,72,61,0.08),
    rgba(226,72,61,0.08) 8px,
    rgba(226,72,61,0.03) 8px,
    rgba(226,72,61,0.03) 16px
  );
  border-top: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  z-index: 1;
  pointer-events: none;
}
.lunch-band-label{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1px;
  writing-mode: vertical-rl;
  white-space: nowrap;
}
.t-label.lunch-hour{
  color: var(--red);
  font-weight: 800;
}
.board-hint{
  font-size: 12px;
  color: var(--text-sub);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.board-hint span{ display:flex; align-items:center; gap:6px; }
.board-hint i{ color: var(--accent); }

/* ---------- 重要メッセージ欄(いつでも編集可・赤文字) ---------- */
.important-message-bar{
  display:flex;
  align-items:flex-start;
  gap: 12px;
  background: var(--red-soft);
  border: 1.5px solid #f6c7c3;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.important-message-bar .im-icon{
  color: var(--red);
  font-size: 16px;
  margin-top: 2px;
  flex: 0 0 auto;
}
.important-message-bar .im-body{
  flex: 1;
  min-width: 0;
}
.important-message-bar .im-label{
  font-size: 11px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: .5px;
  margin-bottom: 3px;
}
.important-message-bar .im-text{
  color: var(--red);
  font-weight: 700;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: text;
  min-height: 20px;
}
.important-message-bar .im-text:empty::before{
  content: "クリックして重要なお知らせを入力してください(例: 本日は雨のため送迎時間を変更します)";
  color: #f0938c;
  font-weight: 500;
}
.important-message-bar .im-edit-btn{
  flex: 0 0 auto;
  border: 1.5px solid var(--red);
  color: var(--red);
  background: var(--white);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}
.important-message-bar .im-edit-btn:hover{ background: var(--red); color:#fff; }

/* ---------- 利用者の追加/削除(ボード上) ---------- */
.add-member-col{
  flex: 0 0 auto;
  width: 96px;
  display:flex; flex-direction:column; align-items:center;
}
.add-member-tile{
  width: 100%;
  height: 76px;
  display:flex; flex-direction: column; align-items:center; justify-content:center;
  gap: 6px;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.add-member-tile:hover{ border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.add-member-tile i{ font-size: 16px; }

.member-col{
  width: 96px;
  flex: 0 0 auto;
  display:flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.member-col .tag-stack{
  display:flex; flex-direction: column; align-items:center; gap:6px;
  cursor: pointer;
  position: relative;
}
.badge-round{
  width: 34px; height: 34px;
  border-radius: 9px;
  display:flex; align-items:center; justify-content:center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  border: none;
}
.badge-bento{ background: var(--red); }
.badge-no{ background: var(--gray-badge-soft); color: var(--gray-badge); border:1.5px solid var(--gray-badge); }
.name-tag{
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 44px;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  transition: background .15s, color .15s, border-color .15s;
}
.name-tag.name-tag-rest{
  background: var(--green-badge-soft);
  color: var(--green-badge);
  border-color: var(--green-badge);
}
.name-tag.name-tag-trial{
  background: var(--amber-badge-soft);
  color: var(--amber-badge);
  border-color: var(--amber-badge);
}
.name-tag.name-tag-undecided{
  background: var(--gray-badge-soft);
  color: var(--gray-badge);
  border-color: var(--gray-badge);
}
.name-tag.name-tag-visit{
  background: var(--blue-badge-soft);
  color: var(--blue-badge);
  border-color: var(--blue-badge);
}
.member-col.inactive-order{ opacity: .55; }

.col-remove-btn{
  position: absolute;
  top: -8px; right: -8px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  display:flex; align-items:center; justify-content:center;
  border: 2px solid var(--white);
  opacity: 0;
  transition: opacity .15s;
  z-index: 5;
}
.member-col:hover .col-remove-btn{ opacity: 1; }

.timeline-zone{
  position: relative;
  flex: none;
  width: 100%;
  height: 420px;
  cursor: pointer;
}
.timeline-line{
  position: absolute;
  left: 50%;
  width: 2px;
  background: var(--text-main);
  transform: translateX(-50%);
}
.timeline-tri{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  cursor: ns-resize;
  touch-action: none;
  z-index: 3;
}
.timeline-tri.top{ border-top: 10px solid var(--text-main); }
.timeline-tri.bottom{ border-bottom: 10px solid var(--text-main); }
/* ドラッグしやすいように当たり判定を拡大 (透明な余白) */
.timeline-tri::after{
  content:"";
  position:absolute;
  left:-14px; right:-14px;
  top:-16px; bottom:-16px;
}
.timeline-tri:hover{ filter: drop-shadow(0 0 0 var(--accent)); }
.timeline-tri.top:hover{ border-top-color: var(--accent); }
.timeline-tri.bottom:hover{ border-bottom-color: var(--accent); }
.time-note{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
  white-space: nowrap;
  color: var(--text-sub);
}
.status-badge-big{
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%,-50%);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  padding: 10px 14px;
  color: #fff;
  writing-mode: vertical-rl;
}
.status-badge-big.rest{ background: var(--green-badge); }
.status-badge-big.trial{ background: var(--amber-badge); }
.status-badge-big.visit{ background: var(--blue-badge); }
.status-badge-big.undecided{ background: var(--gray-badge); }
.status-badge-big.trial,
.status-badge-big.visit{ top: 32%; }
.status-time-label{
  position: absolute;
  top: 62%;
  left: 50%;
  transform: translate(-50%, 0);
  font-size: 12px;
  font-weight: 800;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  white-space: nowrap;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

/* ---------- Modal ---------- */
.modal-overlay{
  position: fixed; inset:0;
  background: rgba(20,22,26,0.45);
  display: none;
  align-items:center; justify-content:center;
  z-index: 200;
  padding: 16px;
}
.modal-overlay.show{ display:flex; }
.modal-box{
  background: var(--white);
  border-radius: 18px;
  width: 100%;
  max-width: 420px;
  padding: 26px 24px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-box h2{
  margin: 0 0 4px;
  font-size: 18px;
}
.modal-box .modal-sub{
  color: var(--text-sub);
  font-size: 12px;
  margin-bottom: 18px;
}
.seg-group{
  display:flex; gap:8px; margin-bottom: 18px; flex-wrap: wrap;
}
.seg-btn{
  flex: 1;
  min-width: 70px;
  padding: 10px 6px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  text-align:center;
}
.seg-btn.active{
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.seg-btn.active.rest{ border-color: var(--green-badge); background: var(--green-badge-soft); color: var(--green-badge); }
.seg-btn.active.trial{ border-color: var(--amber-badge); background: var(--amber-badge-soft); color: var(--amber-badge); }
.seg-btn.active.visit{ border-color: var(--blue-badge); background: var(--blue-badge-soft); color: var(--blue-badge); }
.add-seg-group{
  display:flex; gap:8px; margin-bottom: 16px; flex-wrap: wrap;
}
.quick-add-name-fields{ display:none; }
.quick-add-bento-line{ display:none; }
.row-2{
  display:flex; gap: 12px;
}
.row-2 .field{ flex:1; }
.toggle-line{
  display:flex; align-items:center; justify-content: space-between;
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
}
.toggle-line span{ font-size: 13px; font-weight:700; }
.switch{
  position: relative;
  width: 44px; height: 26px;
  flex: 0 0 auto;
}
.switch input{ opacity:0; width:0; height:0; }
.switch .slider{
  position:absolute; inset:0;
  background: #cfd4db;
  border-radius: 999px;
  transition: .2s;
}
.switch .slider:before{
  content:"";
  position:absolute; left:3px; top:3px;
  width:20px; height:20px;
  background:#fff;
  border-radius:50%;
  transition: .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.switch input:checked + .slider{ background: var(--red); }
.switch input:checked + .slider:before{ transform: translateX(18px); }

.modal-actions{
  display:flex; gap: 10px; margin-top: 6px;
}
.btn-secondary{
  flex:1;
  padding: 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-weight: 700;
  color: var(--text-sub);
}
.btn-secondary:hover{ background: var(--bg); }
.modal-actions .btn-primary{ flex: 1.3; }

/* ---------- Members management page ---------- */
.page-head{
  display:flex; align-items:center; justify-content: space-between;
  margin-bottom: 18px;
}
.page-head h1{ font-size: 20px; margin:0; }
.page-head p{ margin: 4px 0 0; color: var(--text-sub); font-size: 13px; }
.add-btn{
  background: var(--accent);
  color:#fff;
  border:none;
  border-radius: 10px;
  padding: 11px 18px;
  font-weight:700;
  font-size: 13px;
  box-shadow: 0 6px 16px rgba(47,111,237,0.25);
}
.add-btn:hover{ background:#255ed1; }

.member-table{
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.member-row{
  display:flex; align-items:center; gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.member-row:last-child{ border-bottom:none; }
.member-row .order-handle{
  color: var(--text-sub);
  font-size: 13px;
  cursor: grab;
  user-select: none;
}
.member-row .m-name{
  font-weight: 700;
  font-size: 15px;
  flex: 1;
}
.member-row .m-badge{
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
}
.member-row .m-badge.bento{ background: var(--red-soft); color: var(--red); }
.member-row .m-badge.no{ background: var(--gray-badge-soft); color: var(--gray-badge); }
.member-row .row-actions{ display:flex; gap:6px; }
.mini-btn{
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}
.mini-btn:hover{ background: var(--bg); }
.mini-btn.danger{ color: var(--red); border-color: var(--red-soft); }
.mini-btn.danger:hover{ background: var(--red-soft); }
.mini-btn.inactive{ opacity: .5; }

.empty-state{
  text-align: center;
  padding: 60px 20px;
  color: var(--text-sub);
}
.empty-state .empty-icon{ font-size: 40px; margin-bottom: 10px; }

/* ---------- お知らせボードページ ---------- */
.notice-launch-card{
  background: linear-gradient(135deg, var(--white), var(--accent-soft));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
  display:flex; align-items:center; justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.notice-launch-card .nl-text h2{ margin: 0 0 6px; font-size: 19px; }
.notice-launch-card .nl-text p{ margin:0; color: var(--text-sub); font-size: 13px; }
.notice-launch-btn{
  background: var(--accent);
  color:#fff;
  border:none;
  border-radius: 12px;
  padding: 14px 26px;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 8px 20px rgba(47,111,237,0.3);
  display:flex; align-items:center; gap:10px;
  flex: 0 0 auto;
}
.notice-launch-btn:hover{ background:#255ed1; }

.notice-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.notice-slot{
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display:flex; flex-direction: column;
  aspect-ratio: 210/297; /* A4比率 */
  position: relative;
}
.notice-slot.empty{
  border: 2px dashed var(--line);
  background: var(--bg);
  box-shadow: none;
  align-items:center; justify-content:center;
  cursor: pointer;
  color: var(--text-sub);
}
.notice-slot.empty:hover{ border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.notice-slot.empty .empty-slot-inner{
  display:flex; flex-direction: column; align-items:center; gap:8px;
  font-weight: 700; font-size: 13px;
}
.notice-slot.empty .empty-slot-inner i{ font-size: 26px; }
.notice-slot img{
  width: 100%; height: 100%;
  object-fit: contain;
  background: #fff;
  flex: 1;
}
.notice-slot .slot-caption{
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  border-top: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notice-slot .slot-remove{
  position: absolute;
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(226,72,61,0.92);
  color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size: 12px;
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.notice-slot .slot-remove:hover{ background: var(--red); }
.notice-count-badge{
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 700;
  margin-bottom: 14px;
}

@media (max-width: 900px){
  .notice-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px){
  .app-main{ padding: 14px; }
  .board-scroll{ padding-left: 46px; }
  .time-axis-col{ width: 42px !important; }
  .member-col{ width: 78px; }
  .notice-grid{ grid-template-columns: repeat(1, 1fr); }
}
