/* 介護のかふね ヘルパー日報 — 共通の見た目
   ロゴの色：むらさき #7F77B1 / きいろ #F5DB69 / みどり #7EC076 / クリーム #F7F6F0 */
:root {
  --main: #7EC076;        /* みどり（ロゴの葉っぱ） */
  --main-dk: #3B7F37;     /* 文字・ボタン用（白い文字が読める濃さ） */
  --main-lt: #E8F4E5;
  --purple: #7F77B1;      /* ロゴの文字色。差し色だけに使う */
  --yellow: #F5DB69;
  --yellow-lt: #FDF5D3;
  --green: #7EC076;
  --green-dk: #3E8A3A;
  --green-lt: #E8F4E5;
  --red: #C8463F;
  --red-lt: #FBE7E5;
  --cream: #F7F6F0;
  --ink: #36313F;
  --sub: #6E6878;
  --line: #E3E0D6;
  --card: #FFFFFF;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 50, 80, .06), 0 2px 8px rgba(60, 50, 80, .05);
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--cream); }
body { font-size: 17px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--main-dk); }
h1, h2, h3 { line-height: 1.35; margin: 0; }
.hidden { display: none !important; }

/* ヘッダー */
.topbar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--yellow); border-bottom: 5px solid var(--main); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
.brand img { width: 42px; height: 42px; }
.brand .name { font-weight: 800; color: var(--main); font-size: 20px; letter-spacing: .02em; line-height: 1.1; }
.brand .name small { display: block; font-size: 12px; font-weight: 700; color: var(--sub); letter-spacing: .05em; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 14px; color: var(--ink); text-align: right; line-height: 1.3; }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 2px solid transparent; border-radius: 12px; padding: 10px 18px; font-weight: 700; cursor: pointer; background: #fff; border-color: var(--line); min-height: 48px; text-decoration: none; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--main-dk); border-color: var(--main-dk); color: #fff; }
.btn.primary:hover { background: #326D2F; }
.btn.go { background: var(--green-dk); border-color: var(--green-dk); color: #fff; }
.btn.danger { color: var(--red); border-color: #EDC3BF; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--main-dk); }
.btn.small { min-height: 36px; padding: 4px 12px; font-size: 14px; border-radius: 10px; }
.btn.big { width: 100%; min-height: 64px; font-size: 21px; border-radius: 16px; }
.btn:disabled { opacity: .5; cursor: default; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.badge.cancel { background: var(--red-lt); color: var(--red); }
.badge.ok { background: var(--green-lt); color: var(--green-dk); }
.badge.warn { background: var(--yellow-lt); color: #8A6A00; }
.muted { color: var(--sub); }
.small { font-size: 14px; }

/* 入力 */
.field { margin-bottom: 18px; }
.field > label, .label { display: block; font-weight: 800; margin-bottom: 8px; font-size: 18px; }
.label .step { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--main-dk); color: #fff; align-items: center; justify-content: center; font-size: 15px; margin-right: 6px; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], input[type=month], select, textarea {
  width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; min-height: 50px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--main); box-shadow: 0 0 0 3px var(--main-lt); }
textarea { min-height: 80px; resize: vertical; }

/* えらぶボタン（タップで選ぶ） */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.choices.tight { grid-template-columns: repeat(4, 1fr); }
.choice { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 8px; min-height: 56px; font-weight: 700; cursor: pointer; text-align: center; font-size: 18px; }
.choice.on { border-color: var(--main-dk); background: var(--main-lt); color: var(--main-dk); box-shadow: inset 0 0 0 1px var(--main-dk); }
.choice .sub { display: block; font-size: 12px; font-weight: 500; color: var(--sub); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 700; z-index: 100; box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: calc(100% - 32px); text-align: center; }
.toast.err { background: var(--red); }
.error-box { background: var(--red-lt); color: var(--red); border-radius: 12px; padding: 10px 14px; font-weight: 700; margin-bottom: 14px; white-space: pre-line; }

/* ログイン */
.login-wrap { max-width: 420px; margin: 0 auto; padding: 24px 16px 40px; }
.login-logo { display: block; width: 100%; max-width: 380px; margin: 8px auto 4px; }
.login-title { text-align: center; color: var(--main-dk); font-size: 22px; margin: 4px 0 20px; }

/* ========== ヘルパーさんの画面（スマホ） ========== */
.phone { max-width: 560px; margin: 0 auto; padding: 14px 16px 120px; }
.datebar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.datebar .day { flex: 1; text-align: center; font-weight: 800; font-size: 20px; }
.datebar .day small { display: block; font-size: 13px; color: var(--green-dk); font-weight: 700; }
.datebar .btn { min-width: 64px; padding: 6px 8px; font-size: 14px; }
.visit { display: flex; gap: 12px; align-items: stretch; padding: 14px; margin-bottom: 10px; cursor: pointer; border-left: 6px solid var(--main); }
.visit .time { min-width: 86px; font-weight: 800; font-size: 18px; line-height: 1.25; }
.visit .time small { display: block; font-weight: 700; font-size: 13px; color: var(--sub); }
.visit .body { flex: 1; min-width: 0; }
.visit .who { font-size: 19px; font-weight: 800; }
.visit .memo { font-size: 14px; color: var(--sub); margin-top: 2px; }
.visit .edit { align-self: center; color: var(--main-dk); font-weight: 700; font-size: 14px; }
.visit.canceled { opacity: .75; border-left-color: var(--red); }
.empty { text-align: center; padding: 30px 10px; color: var(--sub); }
.empty .big-emoji { font-size: 44px; }
.sumbar { display: flex; justify-content: space-between; padding: 12px 16px; background: var(--yellow-lt); border-radius: 12px; font-weight: 700; margin: 6px 0 16px; }
.closed-note { background: var(--yellow-lt); padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; font-weight: 700; color: #7A5D00; }

.timepick { display: flex; align-items: center; gap: 8px; }
.timepick select { font-size: 24px; font-weight: 800; text-align: center; min-height: 60px; width: 88px; }
.timepick .colon { font-size: 22px; font-weight: 800; white-space: nowrap; }
.endshow { margin-top: 12px; padding: 12px 16px; border-radius: 12px; background: var(--green-lt); font-size: 19px; font-weight: 800; color: var(--green-dk); text-align: center; }
.endshow .big { font-size: 26px; }
.other-min { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.other-min input { width: 110px; font-size: 22px; font-weight: 800; text-align: center; }
.check-line { display: flex; align-items: center; gap: 12px; padding: 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 700; }
.check-line input { width: 26px; height: 26px; accent-color: var(--red); }
.check-line.on { border-color: var(--red); background: var(--red-lt); color: var(--red); }
.stickybar { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); z-index: 30; }
.stickybar .inner { max-width: 560px; margin: 0 auto; display: flex; gap: 10px; }
.search { margin-bottom: 10px; }
.done-panel { text-align: center; padding: 30px 10px; }
.done-panel .mark { width: 72px; height: 72px; border-radius: 50%; background: var(--main-dk); color: #fff; font-size: 40px; display: inline-flex; align-items: center; justify-content: center; }
.month-list .row { display: flex; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; background: #fff; }
.month-list .row:first-child { border-radius: 12px 12px 0 0; }
.month-list .row:last-child { border-radius: 0 0 12px 12px; border-bottom: 0; }

/* ========== 管理画面（パソコン） ========== */
.admin { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 66px); }
.side { background: #fff; border-right: 1px solid var(--line); padding: 14px 10px; }
.side a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 700; margin-bottom: 2px; }
.side a:hover { background: var(--cream); }
.side a.on { background: var(--yellow-lt); color: var(--main-dk); box-shadow: inset 4px 0 0 var(--main); }
.side .group { font-size: 12px; color: var(--sub); font-weight: 700; padding: 14px 12px 4px; letter-spacing: .05em; }
.main { padding: 20px 28px 60px; max-width: 1200px; }
.main h1 { font-size: 24px; margin-bottom: 4px; }
.main .lead { color: var(--sub); margin-bottom: 18px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type=month], .toolbar select { width: auto; min-height: 44px; }
.steps { display: grid; gap: 12px; }
.stepcard { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; }
.stepcard .num { width: 44px; height: 44px; border-radius: 50%; background: var(--main-lt); color: var(--main-dk); font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.stepcard.done .num { background: var(--green-dk); color: #fff; }
.stepcard h3 { font-size: 18px; }
table.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); font-size: 15px; }
.tbl th { background: var(--main-lt); color: #2F6A2C; text-align: left; padding: 10px; font-size: 14px; white-space: nowrap; }
.tbl td { padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: #FBFAF6; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tfoot td { font-weight: 800; background: var(--yellow-lt); }
.tbl input { min-height: 38px; padding: 4px 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { text-align: center; }
.stat .v { font-size: 30px; font-weight: 800; color: var(--main-dk); }
.diff { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: start; margin-bottom: 10px; border-left: 6px solid var(--yellow); }
.diff.resolved { border-left-color: var(--green); opacity: .8; }
.diff .side-box { background: var(--cream); border-radius: 10px; padding: 8px 12px; font-size: 15px; }
.diff .side-box h4 { margin: 0 0 4px; font-size: 13px; color: var(--sub); }
.diff .problem { font-weight: 800; color: #8A5A00; margin-bottom: 8px; }
.diff .actions { display: flex; flex-direction: column; gap: 6px; min-width: 190px; }
.modal-bg { position: fixed; inset: 0; background: rgba(40, 30, 50, .4); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow: auto; }
.modal { background: #fff; border-radius: 16px; padding: 22px; width: 100%; max-width: 640px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal h2 { margin-bottom: 14px; font-size: 21px; }
.modal .foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; max-height: 220px; overflow: auto; border: 2px solid var(--line); border-radius: 12px; padding: 8px; }
.checklist label { display: flex; gap: 6px; align-items: center; font-weight: 500; font-size: 15px; margin: 0; }
.help { font-size: 14px; color: var(--sub); margin-top: 4px; font-weight: 500; }
.legs { font-size: 13px; color: var(--sub); }

@media (max-width: 820px) {
  .admin { grid-template-columns: 1fr; }
  .side { display: flex; overflow-x: auto; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .side .group { display: none; }
  .side a { white-space: nowrap; margin: 0; }
  .main { padding: 16px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .diff { grid-template-columns: 1fr; }
}

/* 表が狭いときに崩れないように */
.main { min-width: 0; overflow-x: auto; }
.tbl td.num, .tbl td:first-child, .tbl td .small, .tbl td .chip { white-space: nowrap; }

/* ロゴ画像（元のロゴを高解像度にしたもの） */
.brand img.logo-img { width: auto; height: 46px; border-radius: 8px; }
.brand .appname { font-weight: 800; font-size: 15px; color: var(--main-dk); background: #fff; border-radius: 999px; padding: 2px 12px; white-space: nowrap; }
.login-logo { border-radius: 14px; box-shadow: var(--shadow); }
.login-title { color: var(--main-dk); }
@media (max-width: 420px) { .brand img.logo-img { height: 44px; } .topbar { padding: 6px 10px; } .topbar .who { font-size: 13px; } .helper-page .brand .appname { display: none; } }
.topbar label, .topbar .who { white-space: nowrap; }
@media (max-width: 820px) { .topbar { flex-wrap: wrap; } .topbar .appname { display: none; } }
.check-line.green input { accent-color: var(--main-dk); }
.check-line.green.on { border-color: var(--main-dk); background: var(--main-lt); color: var(--main-dk); }
.subq { border-top: 1px dashed var(--line); margin-top: 14px; }

/* ================= 動き ================= */
:root { --ease: cubic-bezier(.22,.9,.3,1); --spring: cubic-bezier(.34,1.56,.64,1); }
/* 押したときに少し沈む（指で押した感じ） */
.btn, .choice, .check-line, #side a, .card.visit, .month-list .row, tr.clickable { transition: transform .12s var(--ease), background-color .18s, border-color .18s, box-shadow .18s, color .18s; }
.btn:active, .choice:active, .check-line:active, .card.visit:active { transform: scale(.97); }
.month-list .row:active, tr.clickable:active { transform: scale(.995); }
@media (hover: hover) { .card.visit:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); } }

/* 画面の切り替え：ヘッダーと下のボタンは動かさず、中身だけ */
.topbar { view-transition-name: topbar; }
.stickybar { view-transition-name: actionbar; }
.side { view-transition-name: sidebar; }
::view-transition-group(root) { animation-duration: .34s; animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .34s; animation-timing-function: var(--ease); }
@keyframes vt-in-right { from { transform: translateX(36%); opacity: 0; } }
@keyframes vt-out-left { to { transform: translateX(-18%); opacity: 0; } }
@keyframes vt-in-left { from { transform: translateX(-36%); opacity: 0; } }
@keyframes vt-out-right { to { transform: translateX(18%); opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes vt-fade-out { to { opacity: 0; } }
html[data-nav=forward]::view-transition-old(root), html[data-nav=next]::view-transition-old(root) { animation-name: vt-out-left; }
html[data-nav=forward]::view-transition-new(root), html[data-nav=next]::view-transition-new(root) { animation-name: vt-in-right; }
html[data-nav=back]::view-transition-old(root), html[data-nav=prev]::view-transition-old(root) { animation-name: vt-out-right; }
html[data-nav=back]::view-transition-new(root), html[data-nav=prev]::view-transition-new(root) { animation-name: vt-in-left; }
html[data-nav=fade]::view-transition-old(root) { animation: .18s ease both vt-fade-out; }
html[data-nav=fade]::view-transition-new(root) { animation: .32s var(--ease) both vt-fade-in; }
::view-transition-group(actionbar) { animation-duration: .3s; animation-timing-function: var(--ease); }

/* 下の大きなボタンの帯：下からスッと出る */
@keyframes bar-up { from { transform: translateY(100%); } }
.stickybar:not(.hidden) { animation: bar-up .32s var(--ease); }

/* ダイアログ：ふわっと出て、すっと消える（Macのウィンドウのように） */
@keyframes bg-in { from { opacity: 0; } }
@keyframes bg-out { to { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(8px) scale(.97); } }
.modal-bg { animation: bg-in .2s ease both; }
.modal { animation: modal-in .32s var(--spring) both; transform-origin: 50% 30%; }
.modal-bg.closing { animation: bg-out .18s ease both; }
.modal-bg.closing .modal { animation: modal-out .18s ease both; }

/* お知らせ：下からふわっと */
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, 10px); } }
.toast { animation: toast-in .3s var(--spring) both; }
.toast.out { animation: toast-out .22s ease both; }

/* 登録できた！のチェック：ぽんっと出る */
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.done-panel .mark { animation: pop .5s var(--spring) both; }
.done-panel h2, .done-panel p { animation: rise .4s var(--ease) .12s both; }

/* 選んだ時に出てくる「身体は何分？」などの続き */
.subq.appear { animation: rise .3s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- トグルスイッチ（つまみが左右にすべり、色が変わる） ---------- */
input.toggle { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 56px; height: 34px; margin: 0; border-radius: 999px; background: #D9D6CC; cursor: pointer; transition: background-color .28s var(--ease); }
input.toggle::before { content: ''; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.22); transition: transform .32s var(--spring), width .18s var(--ease); }
input.toggle:checked { background: var(--main-dk); }
input.toggle.red:checked { background: var(--red); }
input.toggle:checked::before { transform: translateX(22px); }
input.toggle:active::before { width: 34px; }               /* 押している間、つまみが少しのびる */
input.toggle:checked:active::before { transform: translateX(16px); }
input.toggle:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.switch-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 700; transition: border-color .25s, background-color .25s, color .25s; }
.switch-line.on { border-color: var(--main-dk); background: var(--main-lt); color: var(--main-dk); }
.switch-line.red.on { border-color: var(--red); background: var(--red-lt); color: var(--red); }

/* ---------- シェイク（まだ選んでいない所・まちがいを、左右に揺らして赤く） ---------- */
@keyframes shake { 0%,100% { transform: translateX(0); } 15% { transform: translateX(-9px); } 30% { transform: translateX(8px); } 45% { transform: translateX(-6px); } 60% { transform: translateX(5px); } 75% { transform: translateX(-3px); } 90% { transform: translateX(2px); } }
.shake { animation: shake .45s var(--ease); }
.need { box-shadow: 0 0 0 3px var(--red) !important; transition: box-shadow .3s; }
.need > .label { color: var(--red); }
input.need, .field input.need { border-color: var(--red) !important; box-shadow: 0 0 0 2px var(--red-lt) !important; }

/* ---------- 登録ボタン：ぐるぐる → 丸く塗りつぶし → チェック ---------- */
.btn.sending { position: relative; color: transparent !important; pointer-events: none; white-space: nowrap; overflow: hidden; min-width: 0; transition: width .32s var(--ease), border-radius .32s var(--ease), padding .32s var(--ease); }
.btn.sending .send-mark { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.send-mark svg { width: 40px; height: 40px; overflow: visible; }
.send-mark .ring { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 70 200; transform-origin: 50% 50%; animation: spin .8s linear infinite; }
.send-mark .disc { fill: #fff; transform-origin: 50% 50%; transform: scale(0); }
.send-mark .tick { fill: none; stroke: var(--main-dk); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; }
.btn.sending.done .ring { animation: none; stroke-dasharray: 120 0; transition: stroke-dasharray .2s; }
.btn.sending.done .disc { transform: scale(1); transition: transform .28s var(--spring) .12s; }
.btn.sending.done .tick { stroke-dashoffset: 0; transition: stroke-dashoffset .28s var(--ease) .3s; }
@keyframes spin { to { transform: rotate(360deg); } }
.field label.switch-line, label.switch-line { display: flex; margin: 0; font-size: 17px; }
.switch-line > span { flex: 1; line-height: 1.5; }

/* ---------- リップル（押した所から波が広がる） ---------- */
.ripple-layer { position: fixed; z-index: 90; overflow: hidden; pointer-events: none; }
.ripple-layer span { position: absolute; border-radius: 50%; background: rgba(59,127,55,.22); transform: scale(0); animation: ripple .6s var(--ease) forwards; }
.ripple-layer.light span { background: rgba(255,255,255,.35); }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ---------- ボトムシート（スマホは下から板がせり上がる。パソコンは真ん中の窓） ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(40,30,50,.42); display: flex; align-items: center; justify-content: center; padding: 16px; animation: bg-in .22s ease both; }
.sheet { background: #fff; border-radius: 20px; padding: 18px 20px 20px; width: 100%; max-width: 420px; box-shadow: 0 20px 50px rgba(0,0,0,.25); animation: modal-in .32s var(--spring) both; touch-action: none; transition: transform .25s var(--ease); }
.sheet .grip { display: none; width: 44px; height: 5px; border-radius: 99px; background: #D6D2C7; margin: 0 auto 14px; }
.sheet-text { font-size: 20px; font-weight: 800; text-align: center; margin: 6px 0 4px; }
.sheet-btns { display: grid; gap: 10px; margin-top: 18px; }
.btn.danger-fill { background: var(--red); border-color: var(--red); color: #fff; }
.sheet-bg.as-sheet { align-items: flex-end; padding: 0; }
.sheet-bg.as-sheet .sheet { max-width: none; border-radius: 22px 22px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); animation: sheet-up .38s var(--ease) both; }
.sheet-bg.as-sheet .grip { display: block; }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
.sheet-bg.closing { animation: bg-out .24s ease both; }
.sheet-bg.closing .sheet { animation: modal-out .2s ease both; }
.sheet-bg.as-sheet.closing .sheet { animation: sheet-down .26s var(--ease) both; }

/* ---------- スケルトン（読み込み中の骨組みに、光が横に流れる） ---------- */
.sk { background: linear-gradient(90deg, #ECE9E1 25%, #F7F5F0 45%, #ECE9E1 65%); background-size: 300% 100%; border-radius: 8px; animation: shimmer 1.3s linear infinite; }
.sk-card { display: flex; gap: 14px; align-items: center; border-left-color: #E3E0D6 !important; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- チェックアニメ（今月やること：終わった手順に上から順にチェック） ---------- */
@keyframes check-in { 0% { transform: scale(.4); background: var(--line); color: transparent; } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }
.stepcard.done .num { animation: check-in .5s var(--spring) both; animation-delay: var(--d, 0s); }

/* ---------- 通知バッジ（突き合わせの、まだ確認していない数） ---------- */
#side a { position: relative; }
.nbadge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; vertical-align: 2px; }
.nbadge.pop { animation: badge-pop .55s var(--spring) both; }
.nbadge.out { animation: badge-out .2s ease both; }
@keyframes badge-pop { 0% { transform: scale(0) rotate(-20deg); } 60% { transform: scale(1.25) rotate(8deg); } 80% { transform: rotate(-4deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes badge-out { to { transform: scale(0); opacity: 0; } }
.side a .nbadge { margin-left: auto; }

/* ===== 2026-12 画面の見直し ===== */
/* 手順の丸：えらび終わると ✓ */
.label .step.done { background: var(--main); }
.label .step.pop { animation: pop .34s var(--ease); }
/* 選択ボタン：長い名前でも変な所で折れない */
.choice { line-height: 1.3; word-break: keep-all; overflow-wrap: anywhere; }
.choice .nowrap { white-space: nowrap; }
.choices.tight .choice { padding-left: 4px; padding-right: 4px; }
/* 下の帯：いまの内容のまとめ ＋ 登録ボタン */
.stickybar .inner { flex-direction: column; gap: 8px; }
.bar-sum { font-size: 15px; text-align: center; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-sum.todo { color: var(--sub); font-weight: 700; }
.bar-sum.ok { color: var(--main-dk); }
.bar-sum.ok::before { content: "✓ "; font-weight: 800; }
/* キーボードで動かす人のための枠 */
.btn:focus-visible, .choice:focus-visible, .side a:focus-visible, a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
/* ログアウトなど、上の帯のリンクを押しやすく */
.topbar .who a { display: inline-block; padding: 6px 0 6px 10px; }
/* 事務所：メニューのアイコン */
.side a .ico { width: 20px; height: 20px; flex: none; color: var(--sub); }
.side a.on .ico { color: var(--main-dk); }
/* 表：よこに長いときは、名前の列を止めたままスクロール */
.tblwrap { overflow-x: auto; border-radius: 12px; box-shadow: var(--shadow); }
.tblwrap > table.tbl { box-shadow: none; }
.tbl.sticky1 th:first-child, .tbl.sticky1 td:first-child { position: sticky; left: 0; z-index: 1; }
.tbl.sticky1 td:first-child { background: #fff; }
.tbl.sticky1 tfoot td:first-child { background: var(--yellow-lt); }
.tbl th small { display: block; font-weight: 500; font-size: 11px; opacity: .8; }
.tbl .unit { font-size: 12px; color: var(--sub); margin-left: 2px; font-weight: 500; }
.tbl .dash { color: #C9C6BC; }
/* 登録の窓：位置の欄、オン・オフの行、担当のチェック */
.locrow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.locrow .field { margin: 0; }
.locrow .field > label { font-size: 14px; margin-bottom: 4px; }
.locrow .btn { white-space: nowrap; min-height: 48px; }
@media (max-width: 560px) { .locrow { grid-template-columns: 1fr 1fr; } .locrow .btn { grid-column: 1 / -1; } }
.toggle-row { display: flex; gap: 12px; align-items: center; font-weight: 700; margin-top: 12px; cursor: pointer; }
.toggle-row small { display: block; font-weight: 500; color: var(--sub); font-size: 13px; }
.checklist label { padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.checklist label:hover { background: var(--cream); }
.checklist input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--main-dk); flex: none; }
.choice .long { font-size: 15px; white-space: nowrap; }
.side a span:not(.nbadge) { white-space: nowrap; }

/* ログイン：名前をえらぶ（2026-12） */
.name-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.name-btn { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.3; min-height: 56px; padding: 10px 8px; font-size: 18px; }
.who { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 14px; }
.who b { font-size: 24px; }
@media (max-width: 340px) { .name-grid { grid-template-columns: 1fr; } }
