:root{
  --focus:0 0 0 3px rgba(37,99,235,.18);
  --send-green:#1f7a3d;
  --soft-green:#eef8ef;
  --soft-green-border:#b9d8bf;
  --warn-red:#c62828;
  --thumb-size:60px;
  --paper:#fffefb;
  --paper-line:#ece7df;
  --ink:#222;
  --sub:#777;
  --tool:#9a9a9a;
  --link-blue:#2563eb;
}

*{ box-sizing:border-box; }

/* ----------------------------------------------------------
   【今回の整理】
   report-page の高さ制御や log-wrap の scroll box 化は
   common.css 側へ逆輸入したため、ここでは
   日報専用の見た目だけを残す。
---------------------------------------------------------- */
.report-page{
  color:#111;
}

.month-title{
  margin:0;
  padding:0 2px;
  font-size:11px;
  line-height:1.1;
  font-weight:400;
  color:#777;
  flex:0 0 auto;
  letter-spacing:.04em;
}

.log-wrap{
  background:#000;
}

table.report-log{
  width:100%;
  min-width:0;
  table-layout:fixed;
  font-size:12px;
  background:var(--paper);
  color:var(--ink);
  border-collapse:collapse;
}

table.report-log th,
table.report-log td{
  border:1px solid #111;
  padding:2px 4px;
  line-height:1.18;
  overflow-wrap:anywhere;
  word-break:break-word;
  text-align:left;
  vertical-align:top !important;
}

/* tbody セル色・サイズ → td のみに適用。thead th は common.css に委任 */
table.report-log td{
  background:var(--paper);
  color:var(--ink);
  font-size:12px;
}

table.report-log thead th{
  /* position / background / color / font-size / font-weight → common.css に委任 */
  text-align:center;
  padding:2px 4px;
  vertical-align:middle !important;
  line-height:1.1;
}

/* report固有列幅 */
th.col-report-date,
td.col-report-date { width:56px; min-width:56px; max-width:56px; }
th.col-report-name,
td.col-report-name { width:90px; min-width:90px; max-width:90px; }
th.col-report-body,
td.col-report-body { min-width:80px; }

td.col-date,
td.col-name,
td.body-cell{
  vertical-align:top !important;
  padding-top:3px !important;
  padding-bottom:3px !important;
}

td.col-date{
  white-space:nowrap;
  color:#666;
  background:#fcfaf6;
}

.col-date-time{
  display:flex;
  flex-direction:column;
  gap:1px;
  line-height:1.05;
}

.col-date-main{
  font-size:10px;
  color:#777;
}

.col-time-inline{
  font-size:12px;
  font-weight:600;
  color:#555;
}

td.col-name{
  line-height:1.15;
  color:#444;
  background:#fcfaf6;
}

td.body-cell{
  position:relative;
  background:
    repeating-linear-gradient(
      to bottom,
      var(--paper) 0,
      var(--paper) 20px,
      var(--paper-line) 21px
    );
}

tr.editing-row td{
  background:#fff4cc !important;
}

tr.editing-row td.body-cell{
  background:#fff4cc !important;
}

tr.editing-row .body-main{
  font-weight:600;
}

.body-tools{
  position:absolute;
  top:3px;
  right:5px;
  display:flex;
  align-items:center;
  gap:7px;
  z-index:1;
}

.body-tool-btn{
  border:none;
  background:transparent;
  color:var(--tool);
  font-size:11px;
  line-height:1;
  cursor:pointer;
  padding:0;
  opacity:.85;
  text-decoration:none;
}

.body-tool-btn:hover{
  color:#666;
  opacity:1;
}

.body-tool-btn.delete{
  color:#a5a5a5;
}

.body-main{
  display:block;
  margin:0;
  padding:0 64px 0 0;
  text-align:left;
  white-space:pre-wrap;
  word-break:break-word;
  overflow-wrap:anywhere;
  line-height:1.35;
  min-height:1.2em;
  color:#222;
}

.thumb-list{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:5px;
  padding-right:34px;
}

.thumb-item{
  display:block;
  width:var(--thumb-size);
  text-decoration:none;
  color:#111;
  cursor:pointer;
}

.thumb-image{
  display:block;
  width:var(--thumb-size);
  height:var(--thumb-size);
  object-fit:cover;
  border:1px solid #aaa;
  background:#fafafa;
}

.file-chip{
  display:flex;
  align-items:center;
  justify-content:center;
  width:var(--thumb-size);
  height:var(--thumb-size);
  padding:4px;
  border:1px solid #aaa;
  background:#f3f3f3;
  font-size:9px;
  line-height:1.15;
  text-align:center;
  word-break:break-word;
  color:#555;
  overflow:hidden;
}

.body-writer{
  display:block;
  margin:4px 0 0;
  padding:0;
  text-align:right;
  font-size:10px;
  line-height:1;
  color:#666;
  white-space:nowrap;
}

.muted{ color:#666; }

/* ----------------------------------------------------------
   【今回の整理】
   compose-wrap は common.css 側で
   page-bottom-bar / bottom-bar-card を使うため、
   ここでは日報固有の中身だけを整える。
---------------------------------------------------------- */
.compose-wrap{
  position:relative;
}

.inline-panel{
  width:100%;
  border:1px solid #111;
  background:#fff;
  display:none;
  order:1;
}

.inline-panel.show{ display:block; }

.inline-panel-head{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  padding:6px 10px;
  border-bottom:1px solid #111;
  background:#f7f7f7;
  font-size:14px;
  font-weight:700;
  line-height:1.2;
}

.vital-inline-new{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  text-align:left;
  border:none;
  border-bottom:1px solid #111;
  background:#fff;
  color:#111;
  padding:12px 10px;
  min-height:56px;
  font-size:15px;
  line-height:1.25;
  cursor:pointer;
}

.vital-inline-new:hover{ background:#f7faff; }

.vital-inline-list{
  display:flex;
  flex-direction:column;
  gap:0;
}

.vital-inline-row{
  display:grid;
  grid-template-columns:1fr 40px;
  align-items:stretch;
  border-bottom:1px solid #ddd;
  min-height:56px;
}

.vital-inline-row:last-child{ border-bottom:none; }

.vital-inline-main{
  border:none;
  background:#fff;
  color:#111;
  text-align:left;
  padding:8px 10px;
  cursor:pointer;
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
}

.vital-inline-main:hover{ background:#f7faff; }

.vital-inline-line1{
  display:block;
  font-size:13px;
  line-height:1.15;
  color:#666;
  font-weight:700;
}

.vital-inline-line2{
  display:block;
  font-size:15px;
  line-height:1.25;
  color:#111;
  font-weight:700;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.vital-inline-nav{
  border:none;
  border-left:1px solid #ddd;
  background:#fafafa;
  color:#333;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  padding:0;
}

.vital-inline-nav:hover{ background:#eef5ff; }

.vital-inline-nav.empty{
  background:#fff;
  border-left:1px solid #eee;
  cursor:default;
}

.vital-inline-nav-btn{
  border:none;
  background:transparent;
  color:inherit;
  font:inherit;
  line-height:1;
  padding:2px 0;
  cursor:pointer;
  width:100%;
  height:22px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.vital-inline-nav-btn:disabled{
  opacity:.25;
  cursor:default;
}

.compose-row{
  position:relative;
  display:flex;
  align-items:flex-end;
  gap:8px;
  min-width:0;
  order:3;
}

.compose-input-shell{
  flex:1 1 auto;
  min-width:0;
  border:1px solid var(--soft-green-border);
  border-radius:16px;
  background:var(--soft-green);
  overflow:hidden;
}

.compose-input-shell:focus-within{
  box-shadow:var(--focus);
  border-color:#2563eb;
  background:#f4fbf4;
}

.compose-topline{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  min-height:36px;
  padding:6px 12px 5px;
  border-bottom:1px solid rgba(0,0,0,.08);
  background:rgba(255,255,255,.34);
}

.resident-display-wrap{
  position:relative;
  display:flex;
  align-items:center;
  min-width:0;
  max-width:320px;
  flex:1 1 auto;
}

.resident-display-wrap.is-focus .resident-fake-btn,
.resident-display-wrap:focus-within .resident-fake-btn{
  color:#111;
}

.resident-fake-btn{
  width:100%;
  min-height:24px;
  border:none;
  background:transparent;
  color:#444;
  padding:0;
  display:flex;
  align-items:center;
  gap:6px;
  text-align:left;
  pointer-events:none;
  font:inherit;
}

.resident-fake-text{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:14px;
  line-height:1.2;
  color:#222;
}

.resident-select{
  font-size:16px;
}

.native-overlay-select{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
  border:none;
  background:transparent;
  appearance:none;
  -webkit-appearance:none;
}

.top-row-btn{
  flex:0 0 auto;
  min-height:24px;
  border:none;
  background:transparent;
  color:var(--link-blue);
  padding:0;
  font-size:14px;
  line-height:1.1;
  cursor:pointer;
  white-space:nowrap;
  font-weight:700;
}

.top-row-btn:hover{
  opacity:.85;
}

.compose-text{
  display:block;
  width:100%;
  min-width:0;
  min-height:40px;
  height:40px;
  max-height:220px;
  resize:none;
  overflow:hidden;
  padding:8px 12px 10px;
  border:none;
  border-radius:0;
  background:transparent;
  color:#111;
  font-size:16px;
  line-height:1.3;
  outline:none;
  -webkit-text-size-adjust:100%;
}

.compose-text.editing{
  background:#fff8df;
}

.row-actions{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:10px;
}

.compose-send{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
}

.send-btn{
  border:none;
  background:transparent;
  color:var(--send-green);
  padding:0;
  width:34px;
  height:34px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}

.send-btn:disabled{
  opacity:.5;
  cursor:default;
}

.send-btn svg{
  width:30px;
  height:30px;
  display:block;
}

.file-list{
  order:4;
  display:none;
  padding:4px 6px;
  border:1px solid #111;
  background:#fafafa;
}

.file-list.show{
  display:block;
}

.compose-thumb{
  position:relative;
}

.thumb-remove{
  position:absolute;
  top:-6px;
  right:-6px;
  width:18px;
  height:18px;
  border:1px solid #111;
  border-radius:50%;
  background:#fff;
  color:#b00020;
  font-size:11px;
  line-height:16px;
  padding:0;
  cursor:pointer;
  z-index:2;
}

.sender-bar{
  order:5;
  min-height:18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  font-size:11px;
  line-height:1.2;
}

.sender-tools{
  display:flex;
  align-items:center;
  gap:6px;
  flex:0 0 auto;
  color:#444;
  white-space:nowrap;
}

.sender-tool-btn{
  border:none;
  background:none;
  color:#111;
  padding:0;
  margin:0;
  font-size:30px;
  line-height:1;
  min-width:45px;
  min-height:45px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.sender-tool-btn:hover{
  opacity:.8;
}

.unread-comments-btn{
  min-height:28px;
  border:1px solid #d28b22;
  border-radius:999px;
  background:#fff6df;
  color:#7b4d05;
  padding:3px 10px;
  font-size:12px;
  font-weight:700;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:0 1px 3px rgba(110,69,0,.12);
}

.unread-comments-btn:hover{
  background:#ffedc0;
}

.unread-comments-btn:disabled{
  opacity:.62;
  cursor:wait;
}

.sender-sep{
  color:#777;
  font-size:16px;
  line-height:1;
}

.sender-chat-toggle{
  display:inline-flex;
  align-items:center;
  gap:4px;
  color:#222;
  white-space:nowrap;
  user-select:none;
}

.sender-chat-toggle input{
  margin:0;
  width:14px;
  height:14px;
  flex:0 0 auto;
}

.sender-info-line{
  margin-left:auto;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:flex-end;
}

.edit-badge{
  color:#9a6c00;
  white-space:nowrap;
}

.edit-cancel{
  border:none;
  background:none;
  color:#9a6c00;
  text-decoration:underline;
  cursor:pointer;
  padding:0;
  font:inherit;
}

.sender-line{
  margin-left:auto;
  color:#444;
  white-space:nowrap;
  text-align:right;
}

.sender-warn{
  margin-left:auto;
  color:var(--warn-red);
  font-weight:700;
  white-space:nowrap;
  text-align:right;
}

.sender-link{
  color:inherit;
  text-decoration:underline;
  cursor:pointer;
  background:none;
  border:none;
  padding:0;
  font:inherit;
}

.sender-link[disabled]{
  cursor:default;
  text-decoration:none;
  opacity:1;
}

.staff-pick-modal[hidden],
.preview-modal[hidden]{
  display:none;
}

.staff-pick-modal,
.preview-modal{
  position:fixed;
  inset:0;
  z-index:9999;
}

.staff-pick-backdrop,
.preview-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.55);
}

.staff-pick-card{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
  width:min(92vw, 420px);
  max-height:80vh;
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid #111;
  color:#111;
}

.staff-pick-head{
  padding:8px 10px;
  border-bottom:1px solid #111;
  background:#f7f7f7;
  font-size:14px;
}

.staff-pick-body{
  padding:8px;
  overflow:auto;
}

.staff-pick-msg{
  margin-bottom:8px;
  font-size:12px;
  color:#111;
}

.staff-pick-list{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.staff-pick-item{
  width:100%;
  border:1px solid #111;
  background:#fff;
  color:#111;
  text-align:left;
  padding:8px 10px;
  font-size:14px;
  cursor:pointer;
}

.staff-pick-item:hover{ background:#f7faff; }

.staff-pick-foot{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding:8px 10px;
  border-top:1px solid #111;
  background:#fafafa;
}

.preview-card{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
  width:min(94vw, 420px);
  max-width:420px;
  max-height:460px;
  background:#111;
  border:1px solid #444;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.preview-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 10px;
  color:#ddd;
  font-size:12px;
  background:#1a1a1a;
  border-bottom:1px solid #333;
}

.preview-close{
  border:none;
  background:transparent;
  color:#ccc;
  font-size:16px;
  cursor:pointer;
  padding:0;
}

.preview-body{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:8px;
  min-height:0;
  overflow:auto;
  background:#000;
  width:100%;
  height:404px;
}

.preview-image{
  display:block;
  max-width:400px;
  max-height:400px;
  width:auto;
  height:auto;
  object-fit:contain;
}

.preview-text{
  color:#ddd;
  font-size:14px;
  line-height:1.5;
  text-align:center;
  padding:20px;
}

.vital-modal{ color:#111; }

.vital-modal .vital-label,
.vital-modal .vital-field > label,
.vital-modal .vital-time-adjust-text,
.vital-modal .vital-unit,
.vital-modal .vital-slash,
.vital-modal .vital-modal-sub,
.vital-modal .vital-modal-userline{
  color:#111 !important;
}

.vital-modal input,
.vital-modal select,
.vital-modal textarea,
.vital-modal button{
  color:#111;
  font-size:16px;
}

@media (max-width:720px){
  .month-title{ font-size:10px; }

  table.report-log th,
  table.report-log td{
    font-size:11px;
  }

  .compose-row{
    gap:6px;
  }

  .compose-topline{
    gap:8px;
    padding:6px 10px 5px;
  }

  .resident-fake-text{
    font-size:13px;
  }

  .top-row-btn{
    font-size:13px;
  }

  .compose-text{
    font-size:16px;
  }

  .sender-tools{
    gap:5px;
  }

  .sender-sep{
    font-size:10px;
  }

  .sender-chat-toggle{
    gap:3px;
  }

  .sender-chat-toggle input{
    width:13px;
    height:13px;
  }

  .unread-comments-btn{
    min-height:26px;
    padding:3px 8px;
    font-size:11px;
  }

  .row-actions{
    gap:8px;
  }

  .vital-inline-new{
    min-height:54px;
    padding:10px 8px;
    font-size:14px;
  }

  .vital-inline-row{
    min-height:54px;
  }

  .vital-inline-line1{
    font-size:12px;
  }

  .vital-inline-line2{
    font-size:14px;
  }

  .inline-panel-head{ font-size:14px; }

  .preview-card{
    width:min(94vw, 320px);
    max-width:320px;
    max-height:360px;
  }

  .preview-body{
    height:304px;
  }

  .preview-image{
    max-width:300px;
    max-height:300px;
  }
}
