:root{
  /* jw.org の配色に寄せたパレット */
  --bg:#f1f1f1; --surface:#fff; --ink:#292929; --ink-2:#757575; --line:#dcdcdc;
  --brand:#4a6da7; --brand-2:#345996; --brand-3:#7f9fd3; --brand-soft:#e8effb; --brand-line:#c9d8ee;
  --ok:#1c7c4a; --warn:#b4531f; --no:#a8231d; --coral:#f57b62;
  --blue:#e8effb; --green:#e7f5ec; --grey:#f1f1f1; --red:#fdeaea;
  --r:8px; --sh:0 1px 2px rgba(18,18,18,.05);
  --max:1120px;
}
body.admin-app{ --brand:#345996; --brand-2:#26436f; --brand-soft:#e6ecf6; --brand-line:#c2cee2; }
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);
  font:16px/1.65 -apple-system,BlinkMacSystemFont,"Hiragino Sans","Noto Sans JP","Yu Gothic UI","Meiryo",sans-serif}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
h1{font-size:1.6rem;line-height:1.35;margin:.2em 0 .35em;letter-spacing:.01em}
h2{font-size:1.15rem;margin:1.4em 0 .6em}
h3{font-size:1rem;margin:.6em 0 .3em}
p{margin:.5em 0}
img{max-width:100%;height:auto}
code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em;background:var(--grey);padding:.1em .35em;border-radius:4px}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.85em}
.muted{color:var(--ink-2)}
.nowrap{white-space:nowrap}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.skip{position:absolute;left:-9999px;top:0;background:#fff;padding:.6em 1em;z-index:99}
.skip:focus{left:.5em;top:.5em}

/* header */
.hdr{position:sticky;top:0;z-index:20;background:#fff;border-bottom:1px solid var(--line)}
.hdr-in{max-width:var(--max);margin:0 auto;padding:.55rem .9rem;display:flex;align-items:center;gap:.7rem;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:.5rem;font-weight:700;color:var(--ink);font-size:1.02rem}
.brand-mark{display:grid;place-items:center;width:32px;height:32px;border-radius:6px;background:var(--brand);color:#fff;font-weight:800;object-fit:cover}
.brand-badge{display:inline-block;font-size:.68rem;font-weight:700;letter-spacing:.04em;color:#fff;background:var(--brand);border-radius:4px;padding:.1em .4em;vertical-align:middle}
.nav-desk{display:none;gap:.15rem;margin-left:.4rem}
.nav-i{padding:.45rem .6rem;border-radius:8px;color:var(--ink-2);font-size:.94rem;white-space:nowrap}
a.nav-i:hover{background:var(--grey);text-decoration:none;color:var(--ink)}
.nav-i.on{background:var(--brand-soft);color:var(--brand-2);font-weight:600;box-shadow:inset 0 -2px 0 var(--brand)}
.hdr-search{display:flex;gap:.3rem;margin-left:auto;order:3;width:100%}
.hdr-search input{flex:1;min-width:0;padding:.45rem .6rem;border:1px solid var(--line);border-radius:8px;font-size:.95rem}
.hdr-search button{border:1px solid var(--line);background:#fff;border-radius:8px;padding:.4rem .7rem;cursor:pointer}
.hdr-acct{display:flex;align-items:center;gap:.2rem;order:2;margin-left:auto}
.hdr-acct .nav-i{font-size:.9rem}
.burger{width:44px;height:40px;display:grid;place-content:center;gap:4px;background:#fff;border:1px solid var(--line);border-radius:8px;cursor:pointer}
.burger span{display:block;width:18px;height:2px;background:var(--ink)}
.inline{display:inline}
.inline2{display:inline-flex;gap:.25rem;align-items:center}
.linklike{border:0;background:none;color:var(--ink-2);cursor:pointer;font:inherit;padding:.45rem .5rem}

.drawer{background:#fff;border-bottom:1px solid var(--line);padding:.4rem .9rem 1rem}
.drawer nav{display:grid;gap:.15rem;max-width:var(--max);margin:0 auto}
.dw-i{padding:.75rem .6rem;border-radius:8px;color:var(--ink);border:1px solid transparent}
.dw-i:hover{background:var(--grey);text-decoration:none}
.dw-i.on{background:var(--brand-soft);color:var(--brand-2);font-weight:600;box-shadow:inset 3px 0 0 var(--brand)}

main{max-width:var(--max);margin:0 auto;padding:1rem .9rem 3rem}
main.wide{max-width:1320px}

/* flash */
.flash{transition:opacity .6s ease}
.flash.flash-fade{opacity:0}
.flash{padding:.7rem .9rem;border-radius:var(--r);margin:.6rem 0;border:1px solid}
.flash-error{background:var(--red);border-color:#f0c2c2;color:#7d1d1d}
.flash-ok{background:var(--green);border-color:#bfe3cd;color:#145c37}
.flash-info{background:var(--blue);border-color:#c5dcf2;color:#14406b}

/* page header */
.ph{margin:1.1rem 0 1rem}
.ph h1{font-size:1.5rem}
.ph .sub{color:var(--ink-2);margin:.2em 0}
.eyebrow{margin:0;color:var(--ink-2);font-size:.85rem;letter-spacing:.06em}

/* hero */
.hero{display:grid;gap:1rem;background:#fff;border:1px solid var(--line);
  border-radius:14px;padding:1.1rem;box-shadow:var(--sh);margin-bottom:1.4rem}
.hero h1{margin:.1em 0}
.hero-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:.5rem}
.hero-stats a{display:block;border:1px solid var(--line);border-radius:10px;padding:.6rem .7rem;background:#fff;color:var(--ink-2)}
.hero-stats strong{display:block;font-size:1.4rem;color:var(--ink)}
.hero-stats .warn{color:var(--no)}

/* sections */
.sec{margin:1.6rem 0}
.sec-head{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.sec-head h2{margin:0}
.more{margin:.7rem 0 0}

/* cards */
.cards{display:grid;gap:.7rem;grid-template-columns:1fr}
.card{display:block;background:#fff;border:1px solid var(--line);border-radius:8px;padding:.85rem .9rem;color:var(--ink);box-shadow:var(--sh)}
.card:hover{text-decoration:none;border-color:#c9d3dd}
.card h3{margin:.35em 0 .3em;font-size:1.02rem}
.card p{margin:.2em 0;color:var(--ink-2);font-size:.92rem}
.card-top{display:flex;gap:.35rem;flex-wrap:wrap}
.card-foot{display:flex;gap:.6rem;color:var(--ink-2);font-size:.82rem;margin-top:.5rem}

/* rows */
.rows{list-style:none;padding:0;margin:0;display:grid;gap:.55rem}
.row{background:#fff;border:1px solid var(--line);border-radius:12px;padding:.8rem .9rem;box-shadow:var(--sh)}
.row-t{font-weight:600;display:block}
.row p{margin:.3em 0;color:var(--ink-2);font-size:.93rem}
.row-meta{display:flex;gap:.4rem;align-items:center;flex-wrap:wrap;font-size:.82rem;color:var(--ink-2);margin-top:.4rem}

/* badges & chips */
.badge{display:inline-block;font-size:.75rem;padding:.15em .55em;border-radius:999px;border:1px solid transparent}
.b-blue{background:var(--blue);color:var(--brand-2)}
.b-green{background:var(--green);color:#145c37}
.b-grey{background:var(--grey);color:#3d4650}
.b-red{background:var(--red);color:#7d1d1d}
.chip{display:inline-block;font-size:.8rem;padding:.15em .55em;border-radius:999px;background:var(--grey);color:#3d4650;border:1px solid var(--line)}
.chip-plain{background:#fff}
.chip-ok{background:var(--green);border-color:#bfe3cd;color:#145c37}
.chip-warn{background:#fdf3e3;border-color:#ecd6b0;color:var(--warn)}
.chip-no{background:var(--red);border-color:#f0c2c2;color:var(--no)}
.chip-btn{cursor:pointer;font:inherit}
.chips{display:flex;gap:.4rem;flex-wrap:wrap;list-style:none;padding:0;margin:.4rem 0}

/* filters & tabs */
.filters{display:flex;gap:.45rem;flex-wrap:wrap;align-items:center;margin:.8rem 0 1rem}
.filters input,.filters select{padding:.5rem .6rem;border:1px solid var(--line);border-radius:8px;font:inherit;background:#fff}
.tabs{display:flex;gap:.3rem;flex-wrap:wrap;margin:.8rem 0}
.tab{padding:.4rem .7rem;border-radius:999px;border:1px solid var(--line);background:#fff;font-size:.9rem;color:var(--ink-2)}
.tab.on{background:var(--brand);border-color:var(--brand);color:#fff}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;line-height:1.3;padding:.55rem .95rem;border-radius:6px;border:1px solid rgba(18,18,18,.16);background:#fff;color:var(--brand-2);
  font:inherit;cursor:pointer;text-align:center}
.btn:hover{text-decoration:none;background:var(--brand-soft);border-color:var(--brand-line)}
.btn:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px var(--brand-3)}
.btn-primary{background:var(--brand);border-color:rgba(18,18,18,.12);color:#fff}
.btn-primary:hover{background:var(--brand-2)}
.btn-danger{background:#fff;border-color:#e3b6b6;color:var(--no)}
.btn-ghost{background:#fff}
.btn-sm{padding:.3rem .6rem;font-size:.85rem;height:31px}
/* 小さなボタンと同じ行に並ぶ入力欄・セレクトの高さを揃える（見栄えのズレ防止） */
.inline select,.inline input[type=date],.inline2 select,.inline2 input[type=date],.form-inline select,.form-inline input[type=date],.form-inline input[type=text]{padding:.3rem .5rem;font-size:.85rem;height:31px;border:1px solid var(--line);border-radius:6px;background:#fff}
/* 会員詳細ページは逆に「大きめで揃える」：ボタンも入力も全サイズで高さを統一 */
.detail-actions .btn-sm{padding:.55rem .95rem;font-size:1rem;height:41px}
.detail-actions select,.detail-actions input[type=date],.detail-actions input[type=email]{padding:.5rem .6rem;font:inherit;height:41px;border:1px solid var(--line);border-radius:6px;background:#fff}
.detail-actions details>summary{height:41px}

/* tables */
.tbl{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--line);border-radius:8px;overflow:hidden;font-size:.93rem}
.tbl th,.tbl td{padding:.55rem .6rem;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
.tbl thead th{background:#f1f1f1;font-weight:600;font-size:.85rem;color:var(--ink-2)}
.tbl tbody tr:last-child td{border-bottom:0}
.tbl tr.mine{background:var(--brand-soft)}
.tbl input{padding:.3rem .4rem;border:1px solid var(--line);border-radius:6px;font:inherit}
.cellwrap{max-width:420px;word-break:break-word}
@media (max-width:820px){
  .tbl{font-size:.86rem}
  .tbl thead{display:none}
  .tbl tr{display:grid;grid-template-columns:1fr;padding:.4rem .2rem;border-bottom:1px solid var(--line)}
  .tbl td{border:0;padding:.2rem .5rem}
  .tbl td:first-child{font-weight:600}
}

/* dropzone / CSV取り込み */
.dropzone{border:2px dashed var(--line);border-radius:8px;padding:.9rem;background:#fafbfc;display:grid;gap:.5rem}
.dropzone.over{border-color:var(--brand);background:var(--blue)}
.dz-row{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap}
.dz-pick{position:relative;cursor:pointer}
.dz-pick input[type=file]{position:absolute;left:0;top:0;width:1px;height:1px;opacity:0;overflow:hidden}
.dz-pick:focus-within{outline:2px solid var(--brand);outline-offset:2px}
.file-name{font-size:.9rem;color:var(--ink-2)}
.dz-hint{margin:0;font-size:.85rem;color:var(--ink-2)}
.dropzone label{font-size:.88rem;color:var(--ink-2);font-weight:600}
.dropzone textarea{width:100%;padding:.6rem .7rem;border:1px solid var(--line);border-radius:9px;background:#fff;
  font:inherit;font-size:.9rem;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;resize:vertical}
.dropzone textarea:focus{outline:2px solid var(--brand-3);outline-offset:1px}

/* forms */
.form{display:grid;gap:.5rem;background:#fff;border:1px solid var(--line);border-radius:12px;padding:1rem;box-shadow:var(--sh)}
.form label{font-size:.88rem;color:var(--ink-2);font-weight:600}
.form input,.form select,.form textarea{width:100%;padding:.6rem .7rem;border:1px solid var(--line);border-radius:9px;font:inherit;background:#fff}
.form textarea{resize:vertical}
.form input:focus,.form select:focus,.form textarea:focus{outline:2px solid var(--brand-3);outline-offset:1px}
.form-grid{grid-template-columns:1fr}
.fld{display:grid;gap:.25rem}
.fld-full{grid-column:1/-1}
.form-actions{margin-top:.6rem;display:flex;gap:.5rem}
.chk{display:flex;gap:.5rem;align-items:center;border:1px solid var(--line);border-radius:9px;padding:.55rem .7rem;background:#fff;cursor:pointer}
.chk.on{background:var(--blue);border-color:#b9d3ee}
.chk input{width:auto}
.chk-t{font-size:.92rem}
.grid-checks{display:grid;gap:.45rem;grid-template-columns:1fr}
.grp{margin:1.1rem 0}
.grp h2{font-size:1rem;margin:.8rem 0 .5rem}
.form-inline{display:flex;gap:.4rem;align-items:center;margin-top:.5rem;flex-wrap:wrap}
.form-inline select{padding:.45rem .6rem;border:1px solid var(--line);border-radius:8px;font:inherit;max-width:320px}

/* auth */
.auth{max-width:460px;margin:2rem auto;background:#fff;border:1px solid var(--line);border-radius:14px;padding:1.4rem;box-shadow:var(--sh)}
.auth-wide{max-width:720px}
.auth .form{border:0;padding:0;box-shadow:none}
.auth-alt{margin-top:1rem;color:var(--ink-2);text-align:center}

/* post */
.post{background:#fff;border:1px solid var(--line);border-radius:14px;padding:1.2rem;box-shadow:var(--sh)}
.post-meta{display:flex;gap:.4rem;align-items:center;flex-wrap:wrap;font-size:.85rem;color:var(--ink-2)}
.post h1{margin:.4em 0 .5em}
.lead{font-size:1.02rem;color:var(--ink-2);border-left:3px solid var(--brand);padding-left:.8rem}
.post-body{margin-top:1rem}
.post-body p{margin:0 0 1em;white-space:normal}
.post-tags{margin:1.2rem 0;display:flex;gap:.5rem;flex-wrap:wrap}
.post-actions{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:1.2rem;align-items:center}
.att{margin-top:1.4rem}
.att ul{list-style:none;padding:0;margin:.4rem 0;display:grid;gap:.4rem}
.att li a{display:flex;justify-content:space-between;gap:1rem;border:1px solid var(--line);border-radius:6px;padding:.6rem .7rem;background:#fafbfc}
.att-meta{color:var(--ink-2);font-size:.85rem}
.video{margin:1rem 0}
.video iframe,.video video{width:100%;aspect-ratio:16/9;border:0;border-radius:12px;background:#000}

/* quick links */
.quick{display:grid;gap:.5rem;grid-template-columns:1fr}
.quick-i{display:flex;align-items:center;gap:.7rem;background:#fff;border:1px solid var(--line);border-radius:11px;padding:.7rem .85rem;color:var(--ink);box-shadow:var(--sh)}
.quick-i:hover{text-decoration:none;border-color:#c9d3dd}
.q-k{font-size:.75rem;color:var(--ink-2);background:var(--grey);border-radius:999px;padding:.15em .55em;white-space:nowrap}
.q-t{flex:1;font-weight:600}
.q-x{color:var(--ink-2)}

/* stats */
.stats{display:grid;gap:.6rem;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));margin:1rem 0}
.stats a,.stats>span{display:block;background:#fff;border:1px solid var(--line);border-radius:12px;padding:.8rem;color:var(--ink-2);box-shadow:var(--sh)}
.stats strong{display:block;font-size:1.5rem;color:var(--ink)}
.stats .warn{color:var(--no)}

/* misc */
.empty{background:#fff;border:1px dashed var(--line);border-radius:12px;padding:1.2rem;color:var(--ink-2);text-align:center;margin:1rem 0}
.empty .hint{font-size:.88rem}
.tagcloud{margin:1.6rem 0;display:flex;gap:.4rem;flex-wrap:wrap;align-items:center}
.tagcloud h2{width:100%;font-size:.9rem;color:var(--ink-2);margin:0 0 .3rem}
.tagcloud a{font-size:.85rem;background:#fff;border:1px solid var(--line);border-radius:999px;padding:.25em .7em}
.tagcloud span{color:var(--ink-2)}
.pager{display:flex;gap:.3rem;flex-wrap:wrap;margin:1.4rem 0;justify-content:center}
.pg{padding:.4rem .7rem;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink)}
.pg-on{background:var(--brand);border-color:var(--brand);color:#fff}
.pg-off{padding:.4rem .7rem;color:#a6adb5}

.ftr{border-top:1px solid var(--line);background:#fff;margin-top:2rem}
.ftr-in{max-width:var(--max);margin:0 auto;padding:1rem .9rem;display:flex;gap:1rem;justify-content:space-between;flex-wrap:wrap;color:var(--ink-2);font-size:.85rem}

@media (min-width:760px){
  .hdr-search{width:auto;min-width:200px;order:0}
  .cards{grid-template-columns:repeat(2,1fr)}
  .quick{grid-template-columns:repeat(2,1fr)}
  .form-grid{grid-template-columns:repeat(2,1fr)}
  .grid-checks{grid-template-columns:repeat(2,1fr)}
}
@media (min-width:1024px){
  .burger{display:none}
  .nav-desk{display:flex}
  .hdr-acct{margin-left:.3rem}
  .cards{grid-template-columns:repeat(3,1fr)}
  .quick{grid-template-columns:repeat(3,1fr)}
  .grid-checks{grid-template-columns:repeat(3,1fr)}
  .hero{grid-template-columns:1.6fr 1fr;align-items:center;padding:1.4rem}
  .ph h1{font-size:1.8rem}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@media print{.hdr,.drawer,.ftr,.filters,.pager{display:none}}

/* データ取り込みハブ */
.chip-err{background:var(--red);border-color:#f0c2c2;color:#a11212}
.quick-data{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:.6rem}
.data-i{display:grid;gap:.25rem;padding:.8rem .9rem;border:1px solid var(--line);border-radius:12px;background:#fff;text-decoration:none;color:inherit}
.data-i:hover{border-color:var(--brand);background:var(--blue)}
.data-i .d-t{font-weight:700}
.data-i .d-c{font-size:.9rem;color:var(--ink-2)}
.data-i .d-c strong{font-size:1.15rem;color:var(--ink)}
.data-i .d-h{font-size:.82rem;color:var(--ink-2);line-height:1.4}
.data-i .d-x{font-size:.85rem;color:var(--brand);font-weight:600}
.steps{margin:0 0 .6rem;padding-left:1.3rem;line-height:1.7}
.cellwrap{white-space:normal;word-break:break-word}

.chip-sub{font-weight:400;font-size:.75em;opacity:.75;margin-left:.3em}
.sub-h{margin:1rem 0 .35rem;font-size:.95rem;color:var(--ink-2)}

.flash-warn{background:#fdf3e3;border:1px solid #ecd6b0;color:#7a5410;border-radius:10px;padding:.7rem .9rem;margin:.7rem 0}
.flash-warn a{color:#7a5410;text-decoration:underline}

/* ===== 記事本文のメディア ===== */
.post-body figure.fig { margin: 1.1rem 0; }
.post-body figure.fig img { max-width: 100%; height: auto; border-radius: 10px; display: block; }
.post-body video.emb-video { width: 100%; max-height: 420px; border-radius: 10px; background: #000; display: block; }
.post-body figcaption { font-size: .82rem; color: var(--muted, #666); margin-top: .35rem; }
.post-body blockquote { border-left: 3px solid #d8d2c4; padding: .2rem 0 .2rem .8rem; color: #555; margin: 1rem 0; }
.post-body hr { border: 0; border-top: 1px solid #e2ddd2; margin: 1.4rem 0; }
.post-body ul, .post-body ol { margin: .8rem 0 .8rem 1.3rem; }
.post-body li { margin: .25rem 0; }

/* ===== 記事編集のメディア挿入 ===== */
.media-box { border: 1px dashed var(--brand-line); border-radius: 8px; padding: .8rem; background: var(--brand-soft); }
.media-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.media-i { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid #d9d2c5; background: #fff; border-radius: 999px; padding: .3rem .7rem; font-size: .82rem; cursor: pointer; }
.media-i:hover { background: var(--brand-soft); }
.media-i.done { background: #e6f3e8; border-color: #9dc7a8; }
.media-i .m-x { color: var(--muted, #777); font-size: .74rem; }
.hint { font-size: .78rem; color: var(--muted, #777); margin: .35rem 0 0; }
.hint code { background: #f1ede4; padding: .05rem .3rem; border-radius: 4px; }

/* ===== 権限マトリクス ===== */
table.perm th.c, table.perm td.c { text-align: center; width: 4.2rem; }
.perm-l { display: block; }
.perm-k { display: block; font-size: .72rem; color: var(--muted, #888); }

/* ===== 役割・一括操作 ===== */
.role-chip { font-size: .74rem; background: var(--brand-soft); color: var(--brand-2); border:1px solid var(--brand-line); border-radius: 999px; padding: .18rem .55rem; margin: 0 .35rem; }
.dw-role { display: block; padding: .5rem .9rem; font-size: .8rem; color: var(--muted, #777); }
.bulkbar { gap: .5rem; margin: .6rem 0; align-items: center; flex-wrap: wrap; }
.inline2 { display: inline-flex; align-items: center; gap: .4rem; }
.chk-remember { font-weight: 400; }
.flash-warn { background: #fff6e5; border-left: 4px solid #d9a441; padding: .6rem .8rem; border-radius: 6px; }

/* 長いURL・単語でもはみ出さない（一覧カード） */
.rows .row { overflow: hidden; }
.rows .row-main, .rows .row-t, .rows .row-meta, .rows .row p { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.post-body p, .post-body li, .post-body a, .post-body code { overflow-wrap: anywhere; }
.post-body a { word-break: break-all; }

/* 招待URLの案内 */
pre.tpl { background:#fafbfc; border:1px solid var(--line); border-radius:8px; padding:.8rem; font-size:.85rem; white-space:pre-wrap; }
details.sec summary { cursor:pointer; font-weight:600; }

/* ===== 会員情報: 性別・配偶者 ===== */
.spouse-box { border:1px dashed var(--brand-line); border-radius:8px; padding:.9rem; background:var(--brand-soft); }
.spouse-box h2 { margin:0 0 .5rem; font-size:1rem; }

/* ===== ホーム: 次のシフト ===== */
.sec-next { background:linear-gradient(180deg,#fff, #fbf9f5); border:1px solid var(--line); border-radius:14px; padding:1.1rem 1.2rem; margin:1.7rem 0; }
.next-shift { display:flex; flex-wrap:wrap; align-items:center; gap:.6rem; margin:.2rem 0 .6rem; }
.ns-date { font-size:1.35rem; font-weight:700; }
.ns-slot { font-size:1.05rem; }
.next-shift .chip-sub { color:var(--ink-2); font-size:.85rem; }

/* ===== メディア保護 ===== */
.post-body img, .post-body video { -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
.post-body video::-internal-media-controls-download-button { display:none; }

/* ===== 管理画面ナビ ===== */
.anav{display:flex;flex-wrap:wrap;gap:.35rem;margin:0 0 1.1rem;padding:.35rem;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--sh);position:sticky;top:.4rem;z-index:20}
.anav-i{padding:.45rem .8rem;border-radius:9px;font-size:.9rem;color:var(--ink-2);text-decoration:none;white-space:nowrap}
.anav-i:hover{background:var(--brand-soft)}
.anav-i.on{background:var(--brand,#2f6f5e);color:#fff}
.admin-mode .ph{margin-top:.4rem}

/* ===== 管理ホームのグループ化 ===== */
.admin-groups{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));margin:1rem 0}
.agroup{background:#fff;border:1px solid var(--line);border-radius:14px;padding:.9rem 1rem;box-shadow:var(--sh)}
.agroup h3{margin:.1rem 0 .6rem;font-size:.85rem;letter-spacing:.06em;color:var(--ink-2);text-transform:uppercase}
.agroup .quick-i{display:flex;justify-content:space-between;gap:.5rem;padding:.5rem .2rem;border-top:1px solid #f0ece4;text-decoration:none;color:var(--ink)}
.agroup .quick-i:first-of-type{border-top:0}
.agroup .quick-i:hover .q-t{color:var(--brand,#2f6f5e)}

/* ===== Googleログイン ===== */
.auth-or{display:flex;align-items:center;gap:.6rem;margin:1rem 0 .7rem;color:var(--ink-2);font-size:.82rem}
.auth-or::before,.auth-or::after{content:"";flex:1;height:1px;background:var(--line)}
.btn-google{display:inline-flex;align-items:center;justify-content:center;gap:.55rem;width:100%;padding:.62rem .9rem;border:1px solid #d5d0c6;border-radius:10px;background:#fff;color:#1f2937;font-weight:600;text-decoration:none}
.btn-google:hover{background:#f1f1f1}
.btn-google svg{width:18px;height:18px}

/* ===== シフト表（モバイルでカード化） ===== */
.daynav{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin:0 0 .8rem}
.daynav form{gap:.4rem}
.chip-err{background:#fdeaea;color:#8a2020;border:1px solid #f0c9c9}
@media (max-width:720px){
  .tbl-shifts thead{display:none}
  .tbl-shifts, .tbl-shifts tbody, .tbl-shifts tr, .tbl-shifts td{display:block;width:100%}
  .tbl-shifts tr{background:#fff;border:1px solid var(--line);border-radius:12px;padding:.55rem .7rem;margin-bottom:.55rem;box-shadow:var(--sh)}
  .tbl-shifts td{border:0;padding:.2rem 0;display:flex;gap:.4rem .5rem;align-items:baseline;flex-wrap:wrap}
  .tbl-shifts td > *{max-width:100%;min-width:0}
  .tbl-shifts td::before{content:attr(data-l);flex:0 0 3.6rem;font-size:.74rem;color:var(--ink-2);letter-spacing:.04em}
  .tbl-shifts tr.mine{border-left:4px solid var(--brand,#2f6f5e)}
}

/* 一括操作バー */
.bulkbar .bulk-l { font-weight: 600; }
.bulkbar select { padding: .5rem .65rem; border:1px solid var(--line); border-radius:9px; background:#fff; height:41px; font:inherit; min-width:9.5rem; }

/* ===== シフトカレンダー ===== */
.cal-wrap{display:grid;gap:1.2rem}
.cal h2{margin:0 0 .5rem}
.cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.cal-wrap{min-width:0}
.cal-h{font-size:.72rem;color:var(--ink-2);text-align:center;padding:.2rem 0}
.cal-d{min-width:0;min-height:64px;background:#fff;border:1px solid var(--line);border-radius:8px;padding:.25rem .3rem;display:flex;flex-direction:column;gap:.2rem}
.cal-d.empty{background:transparent;border:0}
.cal-d.now{border-color:var(--brand,#2f6f5e);box-shadow:0 0 0 2px rgba(47,111,94,.15)}
.cal-d .dnum{font-size:.78rem;font-weight:700;color:var(--ink-2)}
.cal-d .slots{display:flex;flex-wrap:wrap;gap:2px}
.slot{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;font-size:.68rem;line-height:1.35;padding:.05rem .28rem;border-radius:5px;white-space:nowrap}
.slot.g0{background:#fdeaea;color:#8a2020;border:1px solid #f0c9c9}
.slot.g1{background:#fff6e5;color:#7a5a12;border:1px solid #ecdcb8}
.slot.g2{background:#e9f4ec;color:#1f5c36;border:1px solid #c9e2d1}
.legend{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin:.6rem 0}
.cal-mini{display:none;font-size:.62rem;text-decoration:none;color:var(--ink-2)}
.cal-mini .m0{color:#8a2020;font-weight:700}
.cal-mini.none{color:#aab}
@media (max-width:760px){
  .cal-grid{gap:2px}
  .cal-h{font-size:.62rem;padding:.15rem 0}
  .cal-d{min-height:48px;padding:.15rem .1rem}
  .cal-d .dnum{font-size:.68rem}
  .cal-d .slots{gap:1px}
  .slot{font-size:.55rem;padding:0 .12rem;letter-spacing:-.02em}
  .cal-d .slots{display:none}
  .cal-d .cal-mini{display:block}
  .cal-d{min-height:40px}
}

/* 配偶者ピッカー */
.spouse-box h2 { margin-top: 0; }
.sp-search { max-width: 420px; }
.sp-now { margin: .2rem 0; }
.sp-picked { margin: .35rem 0 0; }

/* 狭い画面でチップがはみ出さない */
@media (max-width:760px){
  .tbl td .chip, .tbl td .slot { white-space:normal; max-width:100%; }
  .chips { flex-wrap:wrap; }
}

/* ===== 空き枠・要ヘルプ表示 ===== */
.chip-help{background:#c62828;color:#fff;border:1px solid #a51c1c;font-weight:700}
.open-slot{color:#c62828;font-weight:700}
tr.need-help{background:#fff2f2}
.tbl-shifts tr.need-help{border-left:4px solid #c62828}
.slot.hx{background:#c62828;color:#fff;border-color:#a51c1c;font-weight:700}
.cal-mini .mh{color:#c62828;font-weight:700}
.help-list{display:grid;gap:.4rem}
.help-i{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;padding:.5rem .7rem;border:1px solid var(--line);border-radius:10px;background:#fff;text-decoration:none;color:inherit}
.help-i.open{border-left:4px solid #c62828}
.help-i.need{border-left:4px solid #c62828;background:#fff2f2}
.help-i .hi-d{font-weight:700}
.help-i .hi-s{color:var(--ink-2)}
.help-i .hi-t{font-size:.82rem;color:var(--ink-2)}
.sec-help h2{color:#c62828}

/* ---- サムネイル（要約テキストを表示） ---- */
.thumb{position:relative;flex:0 0 auto;width:158px;min-height:96px;border-radius:8px;overflow:hidden;
  border:1px solid var(--line);background:var(--brand-soft);padding:.5rem .55rem}
.thumb-cat{position:absolute;top:.34rem;right:.42rem;font-size:.6rem;color:var(--ink-3);letter-spacing:.02em}
.thumb-txt{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;
  font-size:.72rem;line-height:1.45;color:var(--ink-2);word-break:break-word;white-space:normal}
.thumb.k-experience{background:#eef4fb}
.thumb.k-announcement{background:#e8effb}
.thumb.k-video{background:#fdeee8}
.thumb.k-manual{background:#f1f1f1}
.rows .row{display:flex;gap:.75rem;align-items:flex-start}
.rows .row-main{flex:1 1 auto}
.card-thumb{width:100%;min-height:78px;margin:.4rem 0 .1rem}
@media (max-width:720px){
  .rows .row{flex-direction:row;gap:.6rem}
  .thumb{width:100%;min-height:72px}
  .thumb-txt{-webkit-line-clamp:4;font-size:.68rem}
}

/* ---- PWA / アプリ分割 ---- */
.nav-admin{border:1px solid var(--brand-line);border-radius:4px;padding:.18em .6em;background:var(--brand-soft);color:var(--brand-2);font-weight:600}
.brand-admin .brand-mark{outline:2px solid var(--brand);outline-offset:1px}
body.admin-app{background:#eef1f5}
#pwa-install{margin-right:.4rem}
.ios-hint{padding:.6rem .2rem 0}
.thumb-img{padding:0}
.thumb-img img{width:100%;height:100%;min-height:inherit;object-fit:cover;display:block}
.slot{display:inline-flex;flex-direction:column;align-items:flex-start;line-height:1.15}
.slot-names{font-size:.62rem;font-weight:500;opacity:.85;margin-top:.1em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
/* 狭い画面では姓1名だけにして読みやすくする */
@media (max-width: 720px) { .slot-names .nm:nth-child(n + 2) { display: none; } }

/* ---- 通知（アプリ内 + Web Push） ---- */
.nav-badge{display:inline-block;min-width:1.15em;padding:0 .3em;margin-left:.35em;border-radius:999px;background:var(--coral);color:#fff;font-size:.68rem;font-weight:700;line-height:1.5;text-align:center}
.sec-notice{border-left:4px solid var(--warn,#c8863a);padding-left:.9rem}
.notice-list{display:flex;flex-direction:column;gap:.4rem}
.notice-mini{display:flex;align-items:center;gap:.5rem;padding:.5rem .6rem;border:1px solid var(--line,#ddd);border-radius:8px;text-decoration:none;color:inherit;background:#fff}
.notice-mini strong{flex:1 1 auto;font-size:.95rem}
.notice-mini.read{opacity:.62}
.notice-mini.important{border-left:4px solid #d94b4b}
.notice-mini.warn{border-left:4px solid #c8863a}
.notice{padding:.7rem .8rem;border:1px solid var(--line,#ddd);border-radius:10px;margin-bottom:.6rem;background:#fff}
.notice.unread{background:#f7fafc;border-left:4px solid var(--brand,#2f6f8f)}
.notice.important{border-left:4px solid #d94b4b}
.notice.warn{border-left:4px solid #c8863a}
.notice-h{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem}
.notice-t{font-size:1rem}
.notice-b{margin:.45rem 0 0;white-space:pre-wrap;color:#333}
.notice-f{display:flex;gap:.4rem;margin-top:.5rem;align-items:center}
.call-form{margin-top:.35rem}
.btn-warn{background:#c8863a;color:#fff;border-color:#c8863a}
.sec-push .form-inline{flex-wrap:wrap}
@media (max-width:720px){
  .notice-mini{flex-wrap:wrap;font-size:.85rem}
  .notice-mini strong{flex:1 1 100%;order:2}
  .call-form select{font-size:.8rem}
}

/* ---- 記事エディタ（管理画面） ---- */
.editor-box{position:relative}
.ed-tools{display:flex;flex-wrap:wrap;gap:.25rem;align-items:center;padding:.45rem;border:1px solid var(--line,#d5dbe1);border-bottom:none;border-radius:8px 8px 0 0;background:#f2f5f8;position:sticky;top:0;z-index:3}
.ed-tools button{min-width:2.1rem;padding:.32rem .5rem;border:1px solid #cfd6dd;background:#fff;border-radius:6px;cursor:pointer;font-size:.84rem;line-height:1.2}
.ed-tools button:hover{background:#e6ecf2;border-color:#aeb9c4}
.ed-tools .ed-sep{width:1px;height:1.4rem;background:#cfd6dd;margin:0 .3rem}
.ed-tools .ed-lbl{font-size:.72rem;color:var(--muted,#666);margin-right:.1rem}
.ed-tools .c-red{color:#c0392b}.ed-tools .c-blue{color:#1f6fb2}.ed-tools .c-green{color:#2e7d32}
.ed-tools .c-orange{color:#c8863a}.ed-tools .c-purple{color:#6b4b8a}
.ed-tools .c-hl{background:#ffe9a8;border-color:#e3cf8f}
.editor-box textarea#body{border-radius:0 0 8px 8px;min-height:22rem}
.ed-preview{border:1px solid var(--line,#d5dbe1);border-radius:8px;padding:.9rem 1rem;background:#fff;margin-top:.6rem}
.ed-preview h2,.ed-preview h3{margin-top:.4rem}
.tx-small{font-size:.82em}
.tx-large{font-size:1.35em}
.tx-xl{font-size:1.85em;font-weight:600;line-height:1.3}
.post-body .tx-xl{margin:.2rem 0}
@media (max-width:720px){
  .ed-tools{position:static;gap:.2rem;padding:.35rem}
  .ed-tools button{min-width:1.9rem;font-size:.78rem;padding:.28rem .4rem}
  .editor-box textarea#body{min-height:18rem}
}

/* ---- サムネイル（小さなアイコン + 要約） ---- */
.thumb-ico{flex:0 0 auto;width:64px;height:64px;border-radius:6px;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;font-size:1.05rem;font-weight:700;color:var(--brand-2);background:var(--brand-soft);border:1px solid var(--brand-line)}
.thumb-ico img{width:100%;height:100%;object-fit:cover;display:block}
.thumb-ico.k-experience{background:linear-gradient(135deg,#eef7f0,#dcecdf)}
.thumb-ico.k-announcement{background:linear-gradient(135deg,#f3f0fb,#e5dff4)}
.thumb-ico.k-video{background:linear-gradient(135deg,#fdf2e9,#f6e3d1)}
.thumb-ico.k-manual{background:linear-gradient(135deg,#eef6f9,#dcecf3)}
.sum-row{display:flex;gap:.6rem;align-items:flex-start;margin-top:.45rem}
.sum-row .sum{margin:0;font-size:.8rem;line-height:1.5;color:var(--ink-2,#444);display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.row-sum{margin:.25rem 0 .35rem;font-size:.85rem;line-height:1.55;color:var(--ink-2,#444);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.more-row{margin-top:.9rem;text-align:center}
@media (max-width:720px){
  .thumb-ico{width:56px;height:56px;font-size:1rem}
  .sum-row .sum{-webkit-line-clamp:3;font-size:.78rem}
  .row-sum{font-size:.8rem;-webkit-line-clamp:2}
}

/* ---- 権限マトリクス（スマホでも役割名が見えるように横スクロール） ---- */
.perm-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line,#d5dbe1);border-radius:12px;background:#fff}
.perm-scroll .tbl{border:0;border-radius:0}
.hint.sm{font-size:.74rem;margin-top:.35rem}
@media (max-width:760px){
  .tbl.perm{min-width:600px;font-size:.8rem}
  .tbl.perm thead{display:table-header-group}
  .tbl.perm tbody{display:table-row-group}
  .tbl.perm tr{display:table-row;padding:0;border-bottom:1px solid var(--line)}
  .tbl.perm th,.tbl.perm td{display:table-cell;padding:.4rem .45rem;border-bottom:1px solid var(--line)}
  .tbl.perm td:first-child{font-weight:400}
  .tbl.perm .perm-k{display:none}
  .tbl.perm th.c,.tbl.perm td.c{text-align:center;padding:.35rem .3rem}
  .tbl.perms-tbl{min-width:720px;font-size:.8rem}
  .tbl.perms-tbl thead{display:table-header-group}
  .tbl.perms-tbl tbody{display:table-row-group}
  .tbl.perms-tbl tr{display:table-row;padding:0}
  .tbl.perms-tbl th,.tbl.perms-tbl td{display:table-cell;padding:.35rem .4rem}
  .tbl.perms-tbl td:first-child{font-weight:400}
  .tbl.perms-tbl input[type="date"]{width:8.2rem}
}

/* ---- iPhone インストール案内 ---- */
.ios-banner{display:flex;gap:.6rem;align-items:center;justify-content:space-between;padding:.6rem .8rem;background:#eaf3f8;border:1px solid #cfe0ea;border-radius:10px;margin:.6rem 0;font-size:.82rem;line-height:1.5}
.ios-banner .ib-x{flex:0 0 auto;width:2rem;height:2rem;border:1px solid #cfe0ea;background:#fff;border-radius:8px;font-size:1.1rem;line-height:1;cursor:pointer}

/* ---- 入力欄の右に単位・補足（例: 会衆） ---- */
.adorn{position:relative;display:block}
.adorn input{width:100%;padding-right:3.4rem}
.adorn-x{position:absolute;right:.55rem;top:50%;transform:translateY(-50%);font-size:.8rem;color:var(--ink-3,#777);pointer-events:none}

/* ---- 記事内の画像配置 ---- */
.fig{margin:.8rem 0}
.fig img{max-width:100%;height:auto;border-radius:8px}
.fig figcaption{font-size:.74rem;color:var(--ink-3,#777);margin-top:.3rem}
.fig-full{width:100%}
.fig-full img{width:100%}
.fig-half{width:min(52%,430px);margin-inline:auto}
.fig-center{width:min(74%,560px);margin-inline:auto;text-align:center}
.fig-left{float:left;width:min(46%,340px);margin:.3rem 1.2rem .8rem 0}
.fig-right{float:right;width:min(46%,340px);margin:.3rem 0 .8rem 1.2rem}
.fig-left img,.fig-right img,.fig-half img{width:100%}
.post-body::after,.ed-preview::after{content:"";display:block;clear:both}
.inline-fig-left{float:left;width:min(42%,300px);margin:.3rem 1rem .6rem 0}
.inline-fig-right{float:right;width:min(42%,300px);margin:.3rem 0 .6rem 1rem}
.inline-fig-left img,.inline-fig-right img{width:100%}
.ed-preview img{max-width:100%;height:auto}
@media (max-width:720px){
  .fig-left,.fig-right{float:none;width:100%;margin:.6rem 0}
  .inline-fig-left,.inline-fig-right{float:none;display:block;width:100%;margin:.5rem 0}
  .fig-half,.fig-center{width:100%}
}

/* ===== シフト表（一覧表） ===== */
.shift-tabs { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .6rem 0 1rem; }
.shift-tabs .month-nav { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.grid-week { margin: 1.2rem 0 .35rem; font-size: .95rem; color: #35506b; }
.grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
table.shift-grid { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 12px; }
.shift-grid th, .shift-grid td { border: 1px solid #dde3ea; padding: 2px 3px; text-align: center; vertical-align: top; min-width: 52px; max-width: 88px; }
.shift-grid .g-lab { position: sticky; left: 0; background: #fff; z-index: 2; min-width: 34px; width: 34px; font-weight: 600; color: #6b7684; text-align: center; }
.shift-grid thead th { background: #eef2f7; font-weight: 600; }
.shift-grid .g-day { background: #e3eaf2; }
.shift-grid .g-day.g-alt { background: #d3ddea; }
.shift-grid .g-day .g-wd { display: block; font-size: 10px; font-weight: 400; color: #5b6b7c; }
.shift-grid .g-day .g-absn { display: block; font-size: 10px; color: #b0641f; }
.shift-grid .g-slot { font-size: 11px; }
.shift-grid .g-slot .g-time { display: block; font-size: 9px; font-weight: 400; color: #6b7684; }
.shift-grid .g-slot .g-mark { display: block; color: #c0392b; font-size: 13px; }
.shift-grid .g-out { background: #f7f8fa; color: #a8b1bb; }
.shift-grid .g-cell a { color: #22364a; text-decoration: none; display: block; line-height: 1.25; }
/* 名前セルは全枠2行分の高さで統一（一部だけ2行になってガタつかないように）＋名前は縦中央揃え */
.shift-grid td.g-cell { height: 34px; vertical-align: middle; }
.shift-grid .g-cell .g-note { display: block; font-size: 9px; color: #7b8794; }
/* 名前セルは会員詳細へのリンクのみ（休みの登録・解除は「その日のチーム詳細」で行う） */
.shift-grid .g-view { display: block; }
.shift-grid .g-absent { background: #f2f4f7; }
.shift-grid .g-absent .g-view { color: #8a94a0; text-decoration: line-through; }
.shift-grid .g-absent .g-note { color: #b0641f; text-decoration: none; }
/* 空き/不足/満員の意味色は廃止（休みの人は欄から消えるため色で示す必要がない）。
   名前セルは拠点別の優しい地色で統一する。 */
.shift-grid td.g-cell { background: #f7f9fb; }
.shift-grid .g-col-alt:not(.g-absent):not(.g-out) { background: #eef2f7; }
/* 隣接する曜日を、①日ごとの太い縦線と②交互の地色で区別する（Googleスプレッドシート方式） */
.shift-grid th.g-daystart, .shift-grid td.g-daystart { border-left: 2px solid #9fb0c3; }
/* 休む人がいる枠はヘッダーに赤枠 */
.shift-grid th.g-slot.g-hasabs { box-shadow: inset 0 0 0 2px #c0392b; }

/* ===== 拠点別の地色（ロゴ画像の赤/青/緑を、全体と調和する優しいトーンに薄めたもの） ===== */
/* 桜木町: 深紅 #9C1F1F → ローズ系 */
.shift-grid.st-sakuragicho thead th { background: #f5e9e7; }
.shift-grid.st-sakuragicho .g-day { background: #efdcd8; }
.shift-grid.st-sakuragicho .g-day.g-alt { background: #e6c9c3; }
.shift-grid.st-sakuragicho th.g-daystart, .shift-grid.st-sakuragicho td.g-daystart { border-left-color: #c9a29b; }
.shift-grid.st-sakuragicho td.g-cell { background: #faf3f2; }
.shift-grid.st-sakuragicho .g-col-alt:not(.g-absent):not(.g-out) { background: #f3e6e3; }
.shift-grid.st-sakuragicho .g-col-alt.g-absent { background: #ece0de; }
.shift-grid.st-sakuragicho .g-lab { color: #8f4a44; }
/* 横浜: ロイヤルブルー #2C5FA6 → ブルー系（既存の中立色に近く、やや青みを強める） */
.shift-grid.st-yokohama thead th { background: #e9eff7; }
.shift-grid.st-yokohama .g-day { background: #dbe5f2; }
.shift-grid.st-yokohama .g-day.g-alt { background: #c8d7ea; }
.shift-grid.st-yokohama th.g-daystart, .shift-grid.st-yokohama td.g-daystart { border-left-color: #9cb3cf; }
.shift-grid.st-yokohama td.g-cell { background: #f2f6fb; }
.shift-grid.st-yokohama .g-col-alt:not(.g-absent):not(.g-out) { background: #e7eef7; }
.shift-grid.st-yokohama .g-col-alt.g-absent { background: #e0e6ee; }
.shift-grid.st-yokohama .g-lab { color: #3f6396; }
/* 川崎: フォレストグリーン #4A7C3D → セージ系 */
.shift-grid.st-kawasaki thead th { background: #ecf2e7; }
.shift-grid.st-kawasaki .g-day { background: #dfecd6; }
.shift-grid.st-kawasaki .g-day.g-alt { background: #cde0c1; }
.shift-grid.st-kawasaki th.g-daystart, .shift-grid.st-kawasaki td.g-daystart { border-left-color: #a3bd96; }
.shift-grid.st-kawasaki td.g-cell { background: #f3f7f0; }
.shift-grid.st-kawasaki .g-col-alt:not(.g-absent):not(.g-out) { background: #e9f1e3; }
.shift-grid.st-kawasaki .g-col-alt.g-absent { background: #e2e9dc; }
.shift-grid.st-kawasaki .g-lab { color: #4f7442; }
.shift-grid .g-absrow th.g-lab { color: #b0641f; }
.shift-grid .g-abs { color: #8a94a0; font-size: 10px; text-decoration: line-through; }
/* アプリ内確認ダイアログ */
#app-confirm{border:none;border-radius:10px;padding:0;max-width:26rem;box-shadow:0 12px 40px rgba(20,30,45,.25)}
#app-confirm::backdrop{background:rgba(20,30,45,.45)}
#app-confirm .ac-box{padding:1.1rem 1.2rem;display:flex;flex-direction:column;gap:1rem}
#app-confirm .ac-msg{margin:0;font-size:.95rem;color:#22364a;line-height:1.6}
#app-confirm .ac-btns{display:flex;justify-content:flex-end;gap:.5rem}

.legend { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: 12px; color: #5b6b7c; margin: .4rem 0 .2rem; }
.legend .lg { border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; background: #fff; }
.legend .lg-ok { background: #eefaf1; }
.legend .lg-low { background: #fff6e2; }
.legend .lg-empty { background: #fdecec; }
.legend .lg-link { background: #eef4fb; color: #2f6f8f; text-decoration: none; }
.notice-inline { font-size: 13px; color: #8a5a1f; background: #fff6e2; border: 1px solid #f0dcb4; border-radius: 8px; padding: .4rem .6rem; }
.abs-line { font-size: 11px; color: #8a94a0; margin-top: .25rem; }
@media (max-width: 720px) {
  .shift-grid th, .shift-grid td { min-width: 40px; max-width: 60px; padding: 1px 2px; font-size: 10px; }
  .shift-grid .g-slot .g-time { font-size: 8px; }
  .shift-tabs .month-nav { margin-left: 0; width: 100%; justify-content: space-between; }
}

/* 要ヘルプ確認ダイアログ */
.help-dialog { border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.2rem; max-width: 26rem; width: 92vw; }
.help-dialog::backdrop { background: rgba(15, 25, 40, .45); }
.help-dialog h3 { margin: 0 0 .2rem; }
.help-dialog select { width: 100%; margin-bottom: .6rem; }
.help-dialog .form-actions { display: flex; gap: .5rem; margin-top: .8rem; }
.next-status { margin-top: .5rem; }

.join-ui { margin-top: .3rem; }

/* その日のチーム詳細（slotDayView） */
.sd-tbl td { vertical-align: middle; }
.sd-tbl .sd-form { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.sd-tbl .sd-form input[name="reason"] { border: 1px solid var(--line); border-radius: 8px; padding: .3rem .5rem; font-size: .85rem; }
.sd-tbl tr.sd-off td { background: #f7f8fa; }
.sd-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* 実施／中止 */
.status-bar{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;border:1px solid var(--line);background:#fff;border-radius:8px;padding:.6rem .8rem;margin:.8rem 0}
.status-bar .sb-label{color:var(--ink-2);font-size:.9rem}
.status-bar .sb-val{font-size:1rem}
.status-bar .sb-val.off{color:var(--no)}
.status-bar .sb-val.on{color:var(--ok)}
.st-slot{margin-top:.35rem}
.btn-warn{background:var(--coral);border-color:rgba(18,18,18,.12);color:#fff}
.btn-warn:hover{background:#e0603f}
.shift-grid .g-statusrow th.g-lab{color:var(--ink-2)}
.shift-grid td.g-status{font-size:10px;font-weight:700;background:#fafbfc}
.shift-grid td.g-status.off{background:#fdeaea;color:var(--no)}
.shift-grid td.g-status.on{background:#eef7f0;color:var(--ok)}
.shift-grid th.g-cancel{background:#f7d9d9!important}
.shift-grid .g-cancelmark{display:block;color:var(--no);font-size:9px}

/* カレンダー：拠点別・曜日区分・中止表示 */
.cal-d.we{background:#f7f8fa}
.cal-d.cancel{background:#fdeaea}
.cx-badge{display:inline-block;font-size:.66rem;font-weight:700;color:var(--no);border:1px solid #f0c2c2;border-radius:4px;padding:0 .3em;margin-left:.3em}
.slot.sl{background:#fff;border:1px solid var(--line);color:var(--ink)}
.slot.cx{background:#fdeaea;border:1px solid #f0c2c2;color:var(--no);text-decoration:line-through}
.cal-grid .cal-d:nth-child(7n+6),.cal-grid .cal-d:nth-child(7n+7){border-left:1px solid #cfd6dd}
.grid-station{margin:1.6rem 0 .3rem;font-size:1.15rem;color:var(--brand-2);border-left:4px solid var(--brand);padding-left:.5rem}
.grid-sep{border:0;border-top:2px solid var(--line);margin:2rem 0}

/* ---- 会員一覧の定期シフト一括編集 ---- */
.roster-cell { min-width: 180px; }
.roster-picks { display: flex; flex-wrap: wrap; gap: 2px 6px; }
.roster-picks .rp { font-size: 12px; display: inline-flex; align-items: center; gap: 2px; cursor: pointer; padding: 1px 3px; border-radius: 4px; }
.roster-picks .rp:hover { background: var(--accent-soft, #eef3fa); }
.roster-picks .rp input { margin: 0; }

/* ---- 記事のもくじ ---- */
.post-toc { border: 1px solid var(--border, #d7dee8); border-radius: 10px; padding: 10px 14px; margin: 14px 0; background: var(--card, #f7f9fc); }
.post-toc h2 { font-size: 14px; margin: 0 0 6px; }
.post-toc ul { list-style: none; margin: 0; padding: 0; }
.post-toc li { margin: 2px 0; font-size: 14px; }
.post-toc li.toc-l3 { padding-left: 14px; font-size: 13px; }
.post-toc li.toc-l4 { padding-left: 28px; font-size: 13px; }
.post-toc a { text-decoration: none; }

/* ---- プロフィール: 管理者のみセクション / 言語 ---- */
.sec-admin-only { border-top: 2px dashed #b7c2d2; margin-top: 26px; padding-top: 14px; }
.sec-admin-only h2::after { content: " 🔒"; font-size: 13px; }
.lang-row { margin: 4px 0; }
.lang-row input { flex: 1; min-width: 120px; }

/* ---- イベントアンケート ---- */
.pick { display: flex; gap: 8px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--border, #e3e8f0); cursor: pointer; }
.pick:last-child { border-bottom: 0; }
.pick input { width: 18px; height: 18px; }
.chip-x { border: 0; background: none; cursor: pointer; font-size: 14px; padding: 0 2px; color: inherit; }

/* ---- 会員一覧: 定期シフトの折りたたみ編集 ---- */
.roster-det summary { cursor: pointer; list-style: none; }
.roster-det summary::-webkit-details-marker { display: none; }
.roster-det[open] summary { margin-bottom: 4px; }
.roster-det[open] summary::after { content: " ▲"; font-size: 10px; color: #7a8699; }
.roster-det:not([open]) summary::after { content: " ▾"; font-size: 10px; color: #7a8699; }
.cover-prev { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border, #d7dee8); }
.hidden { display: none; }

/* ---- 会員管理: 詳細検索 ---- */
.detail-search { margin-top: 8px; }
.detail-search summary { cursor: pointer; color: #5a6b83; font-size: 14px; }
.ds-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 12px; margin-top: 8px; }
.ds-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: #5a6b83; }
.ds-grid select { width: 100%; }
.ds-btn { justify-content: flex-end; }

.sec-over{border-left:4px solid #c0392b}
.post-adj{display:flex;justify-content:space-between;gap:.8rem;margin-top:1.2rem}
.post-adj a{flex:1;padding:.6rem .8rem;border:1px solid var(--line);border-radius:10px;background:#fff;font-size:.85rem;text-decoration:none;color:var(--ink-2)}
.post-adj a:hover{border-color:var(--brand)}
.post-adj .pa-next{text-align:right}
.post-adj .pa-t{color:var(--ink);font-weight:600}
.post-adj .pa-none{border:none;background:none}
.chip-x{border:none;background:none;color:#c0392b;cursor:pointer;font-size:.8rem;padding:0 .15rem;vertical-align:middle}
.abs-pick{white-space:nowrap}
.pm-row td{padding:.35rem .5rem}
.g-slotlink{display:block;color:inherit;text-decoration:none}
.g-slotlink:hover{text-decoration:underline}
/* シフト更新検知トースト */
.shift-upd{position:fixed;left:50%;bottom:1.1rem;transform:translateX(-50%);z-index:120;display:flex;align-items:center;gap:.6rem;background:var(--card,#fff);border:1px solid var(--border,#ccc);border-left:4px solid #c0392e;border-radius:.5rem;padding:.55rem .9rem;box-shadow:0 4px 14px rgba(0,0,0,.18)}
.shift-upd button{border:1px solid var(--border,#999);background:transparent;border-radius:.4rem;padding:.3rem .7rem;cursor:pointer}

/* 天気（ホームのアコーディオン）: 色合いはシフト表と同じ淡い拠点カラー */
.wx-sec { margin: 1rem 0; }
.wx-det { border: 1px solid var(--border, #d5dae0); border-radius: .6rem; background: var(--card, #fff); padding: .55rem .8rem; }
.wx-det summary { cursor: pointer; font-weight: 600; list-style: none; display: block; }
.wx-det summary::-webkit-details-marker { display: none; }
.wx-det summary::before { content: '▸ '; color: #6b7684; }
.wx-det[open] summary::before { content: '▾ '; }
.wx-sum-hint { color: #6b7684; font-weight: 400; font-size: .85em; }
.wx-digest { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin-top: .4rem; font-size: .82rem; font-weight: 400; }
.wx-dg { padding: .1rem .45rem; border-radius: .35rem; }
.wx-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: .35rem; }
.wx-tbl { border-collapse: collapse; font-size: .72rem; }
.wx-tbl th, .wx-tbl td { border: 1px solid #dfe4e9; padding: .18rem .3rem; text-align: center; }
.wx-tbl thead th { background: #f4f6f8; color: #55606c; min-width: 2.6em; }
.wx-tbl th.wx-rh0 { min-width: 4.6em; }
.wx-tbl th.wx-rh { text-align: left; font-weight: 600; white-space: nowrap; }
.wx-dsub { font-weight: 400; font-size: .85em; opacity: .8; }
.wx-ic { display: block; font-size: 1rem; line-height: 1.2; }
.wx-t { display: block; font-weight: 600; }
.wx-w { display: inline-block; border-radius: .3rem; padding: 0 .25em; font-size: .9em; }
.wx-w-ok { background: #e2f2e4; color: #245b2c; }
.wx-w-warn { background: #fdf0d5; color: #7a5a10; }
.wx-w-bad { background: #fbdcdc; color: #8a1f1f; }
.wx-p { display: block; font-size: .8em; color: #6b7684; }
.wx-p0 { opacity: .4; }
.wx-none { color: #b6bec7; }
.wx-attr { color: #6b7684; font-size: .72rem; margin: .5rem 0 0; }
.wx-st-sakuragicho { background: #efdcd8; color: #8f4a44; }
.wx-st-yokohama { background: #dbe5f2; color: #3f6396; }
.wx-st-kawasaki { background: #dfecd6; color: #4f7442; }
.wx-tbl th.wx-st-sakuragicho, .wx-tbl th.wx-st-yokohama, .wx-tbl th.wx-st-kawasaki { border-left-width: 3px; }
.wx-tbl th.wx-st-sakuragicho { border-left-color: #c9a29b; }
.wx-tbl th.wx-st-yokohama { border-left-color: #9cb3cf; }
.wx-tbl th.wx-st-kawasaki { border-left-color: #a3bd96; }

/* AJAX保存トースト（休みのトグル等、再読み込みなしのフィードバック） */
.wx-toast{position:fixed;left:50%;bottom:1.1rem;transform:translateX(-50%);z-index:130;background:#2f7d3b;color:#fff;border-radius:.5rem;padding:.5rem 1rem;font-size:.9rem;box-shadow:0 4px 14px rgba(0,0,0,.25);opacity:1;transition:opacity .5s}
.wx-toast-out{opacity:0}
.next-shift .chip{margin-left:.4rem}

/* 奉仕者検索の絞り込み: ラベルを入力欄の上に置き、項目ごとにブロック（スマホでは1〜2列へ自然に折返し） */
.ms-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .7rem .9rem; align-items: end; margin: .4rem 0 .9rem; }
.ms-filters .ms-f { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.ms-filters label { font-size: .85rem; font-weight: 600; color: #55606c; }
.ms-filters input, .ms-filters select { width: 100%; height: 38px; font-size: .95rem; box-sizing: border-box; }
.ms-filters .ms-actions { flex-direction: row; gap: .5rem; align-items: center; }


/* ---- 素材ライブラリ / カテゴリーアイコン ---- */
.cat-ico { width: 22px; height: 22px; object-fit: cover; border-radius: 5px; vertical-align: middle; margin-right: .3rem; border: 1px solid var(--line); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .9rem; margin-top: .8rem; }
.media-card { background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; padding: .6rem; display: flex; flex-direction: column; gap: .4rem; }
.media-card img, .media-card video { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; background: #f2f2f0; }
.media-file { height: 120px; display: flex; align-items: center; justify-content: center; font-size: 2rem; background: #f2f2f0; border-radius: 6px; }
.media-rename { display: flex; gap: .3rem; }
.media-rename input { flex: 1; min-width: 0; height: 30px; font-size: .85rem; }
.media-card .hint.sm { font-size: .75rem; margin: 0; }

/* ---- 編集画面の整理: コントロール高さ統一 / ツールバー / 素材挿入行 ---- */
.form-grid .fld input:not([type=checkbox]):not([type=file]):not([type=radio]),.form-grid .fld select{height:38px;box-sizing:border-box;font-size:.95rem}
.ed-tools button{height:31px;display:inline-flex;align-items:center;justify-content:center}
.ed-tools .ed-link{border-color:#9db8d2;background:#eef4fb;font-weight:600}
.media-row{display:flex;gap:.8rem;align-items:flex-end;flex-wrap:wrap;margin-top:.4rem}
.media-filefld{flex:1 1 260px;display:flex;flex-direction:column;gap:.25rem}
.media-alignfld{flex:0 1 300px;display:flex;flex-direction:column;gap:.25rem}
.media-filefld label,.media-alignfld label{font-size:.8rem}
.media-row input[type=file]{height:38px;padding:.35rem .5rem;border:1px solid var(--line);border-radius:8px;background:#fff;font-size:.85rem;box-sizing:border-box}
.media-row select{height:38px;width:100%;font-size:.9rem;box-sizing:border-box}

/* ---- 外部リンクのプレビュー窓 ---- */
.linkwin{width:min(94vw,900px);height:min(82vh,660px);border-radius:12px;border:1px solid var(--line);padding:0;margin:auto}
.linkwin[open]{display:flex;flex-direction:column}
.lw-bar{display:flex;align-items:center;gap:.5rem;padding:.5rem .7rem;border-bottom:1px solid var(--line)}
.lw-title{flex:1;font-weight:600;font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lw-note{margin:0;padding:.35rem .7rem;font-size:.72rem;color:var(--muted,#666);border-bottom:1px solid var(--line)}
.lw-frame{flex:1;width:100%;border:0;background:#fff}

.ed-tools .ed-grp{display:inline-flex;align-items:center;gap:.25rem;flex-wrap:wrap}
.ed-tools{row-gap:.35rem}
.media-dl{margin-top:.15rem}
.media-dl label{font-size:.8rem}

.form-grid .fld select{padding:.3rem .6rem;line-height:1.35}
.form-grid .fld input[type=datetime-local],.form-grid .fld input[type=date]{padding:.25rem .5rem}

/* 変更前の保存ボタンなど: 無効化されたボタンは明確にグレーアウト */
button:disabled, .btn:disabled, button[disabled]:hover {
  opacity: .4;
  cursor: not-allowed;
  filter: grayscale(.6);
  pointer-events: none;
}
