/* シフト表の自動作成（ZQT Lab.） 色は lab の配色に合わせる */
:root {
  --ink: #1d2733;
  --ink-soft: #4a5866;
  --navy: #1e3a5c;
  --navy-deep: #132a45;
  --gold: #b9893f;
  --gold-pale: #f6ecda;
  --bg: #faf8f4;
  --tint: #eef2f6;
  --line: #d9dfe6;
  --white: #ffffff;
  --red: #b23b3b;
  --red-pale: #fbe6e4;
  --green: #2f7d5b;
  --closed: #eceef0;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.75; font-size: 15px; overflow-wrap: anywhere; }
button, input { font: inherit; color: inherit; }
a { color: var(--navy); }
p { margin: 0 0 .8em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.print-only { display: none; }
[hidden] { display: none !important; }

/* 見出し */
.top { padding: 36px 0 18px; }
.kicker { color: var(--gold); font-weight: 700; font-size: 13px; letter-spacing: .12em; margin: 0 0 2px; }
.top h1 { font-family: var(--serif); font-size: 26px; line-height: 1.4; margin: 0 0 12px; color: var(--navy-deep); word-break: auto-phrase; }
.h1-sub { display: block; font-size: 16px; color: var(--ink-soft); font-family: var(--font); font-weight: 700; margin-top: 4px; }
.h1-type { display: block; width: fit-content; max-width: 100%; margin-top: 8px; padding: 2px 12px; border-radius: 999px; background: var(--gold-pale); color: #7a5212; font-family: var(--font); font-size: 14px; font-weight: 700; }
.lead { color: var(--ink-soft); max-width: 52em; }
.lead strong { color: var(--ink); background: linear-gradient(transparent 62%, var(--gold-pale) 62%); }
.steps { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: st; }
.steps li { counter-increment: st; }
.steps a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; text-decoration: none; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px 3px 4px; color: var(--ink); transition: border-color .2s, transform .2s; }
.steps a::before { content: counter(st); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 11px; font-weight: 700; }
.steps a:hover { border-color: var(--navy); transform: translateY(-1px); }

/* 業種の型のカード */
.type-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.tcard { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 12px 12px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s, background .2s; }
.tcard:hover { border-color: var(--tf); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(19, 42, 69, .10); }
.tcard:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(30, 58, 92, .28); }
.tcard.on { border-color: var(--tf); background: linear-gradient(180deg, var(--tc) 0, #fff 70%); box-shadow: inset 0 0 0 1px var(--tf); }
.tc-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--tc); color: var(--tf); flex: none; transition: transform .25s; }
.tcard.on .tc-ic { background: var(--tf); color: #fff; }
.tcard:hover .tc-ic { transform: rotate(-6deg) scale(1.06); }
.tc-ic svg, .rule-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tc-txt { display: flex; flex-direction: column; min-width: 0; }
.tc-txt b { font-size: 15px; color: var(--navy-deep); line-height: 1.35; }
.tc-txt small { font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
.tc-txt em { font-style: normal; font-size: 11px; line-height: 1.45; color: var(--tf); margin-top: 4px; }
.tc-check { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%; background: var(--tf); opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s cubic-bezier(.2, .9, .3, 1.4); }
.tc-check::after { content: ""; position: absolute; left: 7px; top: 4px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tcard.on .tc-check { opacity: 1; transform: none; }

/* 並びの決まり */
select { height: 40px; min-width: 0; max-width: 100%; padding: 0 30px 0 10px; border: 1px solid #c6ced8; border-radius: 8px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%231e3a5c' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center / 11px 8px; -webkit-appearance: none; appearance: none; cursor: pointer; font: inherit; color: inherit; }
select:focus-visible { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30, 58, 92, .18); }
.rule { align-items: center; gap: 6px 8px; }
.rule-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--tint); color: var(--navy); flex: none; }
.rule.is-set .rule-ic { background: #e1f1ea; color: var(--green); }
.rule-t { font-size: 14px; color: var(--ink-soft); }
.rule-say { flex: 1 1 100%; margin: 0; font-size: 13px; color: var(--navy-deep); background: var(--tint); border-radius: 6px; padding: 4px 10px; }
.rule.is-set .rule-say { background: #e7f3ec; color: #1f5a41; }

/* 見本の帯 */
.sample-bar { display: flex; flex-direction: column; gap: 10px; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 12px; padding: 14px 16px; margin: 0 0 18px; }
.sample-bar.is-sample { border-left-color: var(--gold); background: #fffaf1; }
.sample-bar p { margin: 0; font-size: 14px; }
.sample-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* カード */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px; margin: 0 0 18px; min-width: 0; scroll-margin-top: 12px; }
.card h2 { font-size: 19px; color: var(--navy-deep); display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.card h2 .no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 14px; flex: none; }
.h3 { font-size: 16px; color: var(--navy-deep); margin: 22px 0 6px; }
.h3.red { color: var(--red); }
.lead-s { color: var(--ink-soft); font-size: 14px; }
.note { color: var(--ink-soft); font-size: 13px; margin: 6px 0 8px; }

/* 入力欄 */
.form-row { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-bottom: 12px; }
.fld { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fld > span { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.fld-wide { flex: 1 1 260px; max-width: 460px; }
.fld-num { width: 130px; }
input[type="text"], input[type="number"], input[type="time"], input[type="month"] {
  width: 100%; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid #c6ced8; border-radius: 8px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
input:focus-visible { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30, 58, 92, .18); }
.month-pick { display: flex; align-items: center; gap: 6px; }
.month-pick input { width: 170px; }
.btn-icon { width: 40px; height: 40px; border-radius: 8px; border: 1px solid #c6ced8; background: #fff; cursor: pointer; color: var(--navy); flex: none; }
.btn-icon:hover { background: var(--tint); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid #c6ced8; border-radius: 999px; background: #fff; cursor: pointer; font-size: 14px; user-select: none; transition: background .15s, color .15s, border-color .15s; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(30, 58, 92, .25); }

.rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fcfcfb; min-width: 0; animation: rowIn .3s ease; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.row .sw { width: 32px; height: 40px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; flex: none; }
.f-name { flex: 1 1 140px; }
.f-abbr { width: 56px; }
.f-time { width: 112px; }
.f-num { width: 96px; }
.f-can { flex: 1 1 100%; }
.hours { font-size: 13px; color: var(--ink-soft); height: 40px; display: inline-flex; align-items: center; min-width: 64px; }
.btn-del { height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid #e0c4c1; background: #fff; color: var(--red); cursor: pointer; font-size: 13px; margin-left: auto; }
.btn-del:hover { background: var(--red-pale); }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 700; cursor: pointer; border: 2px solid var(--navy); transition: background .2s, color .2s, transform .15s, box-shadow .2s; text-align: center; line-height: 1.3; }
.btn:active { transform: scale(.97); }
.btn-main { background: var(--navy); color: #fff; }
.btn-main:hover { background: var(--navy-deep); }
.btn-sub { background: #fff; color: var(--navy); }
.btn-sub:hover { background: var(--tint); }
.btn-s { min-height: 36px; font-size: 13px; padding: 0 14px; }
.btn-big { width: 100%; min-height: 56px; font-size: 18px; background: var(--gold); border-color: var(--gold); color: #fff; box-shadow: 0 6px 16px rgba(185, 137, 63, .28); }
.btn-big:hover { background: #a7792f; box-shadow: 0 8px 20px rgba(185, 137, 63, .36); }
.make { margin-bottom: 12px; }
.make .note { margin-top: 10px; }
.make-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.chip-s { min-height: 32px; padding: 0 12px; font-size: 13px; }

/* 表 */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; background: #fff; }
.tbl { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl th, .tbl td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; text-align: center; white-space: nowrap; }
.tbl tr > *:last-child { border-right: none; }
.tbl tbody tr:last-child > *, .tbl tfoot tr:last-child > * { border-bottom: none; }
.tbl thead th { background: var(--tint); font-weight: 700; color: var(--navy-deep); padding: 4px 6px; }
.tbl th.name { position: sticky; left: 0; z-index: 2; background: #f6f7f8; text-align: left; padding: 4px 10px; min-width: 104px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; font-weight: 700; box-shadow: 1px 0 0 var(--line); }
.tbl thead th.name { background: var(--tint); }
.tbl .w0 { color: #b13d3d; }
.tbl .w6 { color: #2a5d9a; }
.tbl th.d { min-width: 34px; line-height: 1.15; padding: 4px 2px; }
.tbl th.d span { display: block; font-size: 13px; }
.tbl th.d small { display: block; font-size: 10px; font-weight: 400; }
.tbl .closed { background: var(--closed); color: #8c959e; }
.tbl th.tot, .tbl td.tot { min-width: 44px; padding: 0 6px; background: #f8f9fa; font-weight: 700; }
.need-week td { padding: 4px; }
.need-week th.name { min-width: 80px; }
input.num { width: 44px; height: 34px; padding: 0 2px; text-align: center; border-radius: 6px; }
.grid input.num { width: 34px; border-color: transparent; background: transparent; }
.grid input.num:hover { border-color: #c6ced8; }
.grid td.chg { background: var(--gold-pale); }
.grid td.chg input.num { font-weight: 700; color: #7a5212; }
.day-need { margin-top: 10px; }
.day-need summary { cursor: pointer; font-weight: 700; color: var(--navy); padding: 6px 0; }

/* マス（希望休・結果） */
.cell { display: block; width: 100%; min-width: 34px; height: 34px; border: none; background: transparent; cursor: pointer; font-weight: 700; font-size: 14px; padding: 0; transition: background .12s, transform .12s; }
.cell:hover { background: var(--tint); }
.cell:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
.cell.hope-on { background: #f2dede; color: var(--red); }
.cell.hope { color: #c08b8b; font-weight: 400; font-size: 12px; }
.cell.ng { box-shadow: inset 0 0 0 2px var(--red); }
.cell.flash { animation: flash .35s ease; }
@keyframes flash { 0% { transform: scale(.8); } 60% { transform: scale(1.08); } 100% { transform: none; } }
.closed .cell { color: #8c959e; }
.result tfoot th.name, .result tfoot td { font-size: 12px; background: #fafbfc; }
.result tfoot tr:first-child > * { border-top: 2px solid #c6ced8; }
.result tfoot td { height: 28px; padding: 0 2px; }
.result tfoot td.short, .sum td.short { background: var(--red-pale); color: var(--red); font-weight: 700; }
.result tfoot td.zero { color: #b3bac1; }
.result tfoot td.over { color: var(--green); font-weight: 700; }
/* 作った時: 左の日から順に埋まっていく（--c は日の列、--r は人の行） */
.result.fill thead th.d { animation: headSweep .5s ease; animation-delay: calc(var(--c, 0) * 24ms); }
@keyframes headSweep { 40% { background-color: #f3dfb8; color: #7a5212; } }
.result.fill tbody td .cell { animation: cellIn .36s cubic-bezier(.2, .9, .3, 1.25) both; animation-delay: calc(var(--c, 0) * 24ms + var(--r, 0) * 12ms); }
.result.fill tbody td .cell:not(.on) { animation-name: cellFade; }
@keyframes cellIn { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@keyframes cellFade { from { opacity: 0; } to { opacity: 1; } }
.result.fill tbody td.tot { animation: cellFade .4s ease both; animation-delay: .8s; }
.result.fill tfoot td[data-col] { animation: cellFade .3s ease both; animation-delay: calc(var(--c, 0) * 24ms + 160ms); }
.result.fill tfoot td.short { animation: cellFade .3s ease both, shortPulse .5s ease 2; animation-delay: calc(var(--c, 0) * 24ms + 160ms), calc(var(--c, 0) * 24ms + 460ms); }
@keyframes shortPulse { 50% { box-shadow: inset 0 0 0 2px var(--red); background: #f7cfc9; } }
/* 足りない枠のカードから選んだ日の列 */
.result th.col-hl { background: var(--gold); color: #fff; }
.result td.col-hl { background: #fff3d6; animation: colHl 1.2s ease 2; }
.result td.col-hl .cell:not(.on) { background: #fff3d6; }
@keyframes colHl { 50% { box-shadow: inset 2px 0 0 var(--gold), inset -2px 0 0 var(--gold); } }
.sum th, .sum td { padding: 6px 10px; }
.sum tfoot tr > * { border-top: 2px solid #c6ced8; font-weight: 700; background: #fafbfc; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-soft); margin: 4px 0; }
.lg { display: inline-flex; align-items: center; gap: 5px; }
.lg b { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 4px; border-radius: 5px; font-size: 12px; }
.lg-hope { background: #fff; color: #c08b8b; border: 1px solid var(--line); font-weight: 400; }
.lg-short { background: var(--red-pale); color: var(--red); }
.empty { padding: 26px 12px; text-align: center; color: var(--ink-soft); background: var(--tint); border-radius: 10px; margin: 8px 0; }
.stale { background: var(--gold-pale); color: #7a5212; border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.out-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.out-btns.dim { opacity: .55; }

.ok { color: var(--green); font-weight: 700; background: #e7f3ec; border-radius: 8px; padding: 8px 12px; margin: 14px 0 0; }
.short-list, .warn-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.short-list li { border: 1px solid #efc9c5; background: #fff7f6; border-radius: 8px; padding: 8px 12px; }
.short-list b { color: var(--red); }
.whys { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.warn-list li { font-size: 14px; border-left: 3px solid var(--red); padding: 2px 10px; }

/* 人が足りない枠のカード */
.short-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin: 22px 0 8px; }
.short-head .h3 { margin: 0; }
.short-sum { margin: 0; font-size: 13px; color: var(--ink-soft); }
.short-sum b { color: var(--red); }
.short-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.sc { display: flex; gap: 12px; min-width: 0; padding: 12px; border: 1px solid #efc9c5; border-left: 4px solid var(--red); border-radius: 12px; background: #fff; box-shadow: 0 2px 8px rgba(178, 59, 59, .06); }
.short-box.cards-in .sc { animation: cardIn .4s ease both; animation-delay: calc(.8s + var(--k, 0) * 60ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sc-date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; flex: none; border-radius: 10px; background: var(--red-pale); color: var(--red); line-height: 1.15; padding: 6px 0; align-self: flex-start; }
.sc-date b { font-size: 24px; font-family: var(--serif); }
.sc-date small { font-size: 11px; font-weight: 700; }
.sc-date.w0 small:last-child { color: #b13d3d; }
.sc-date.w6 small:last-child { color: #2a5d9a; }
.sc-main { flex: 1 1 auto; min-width: 0; }
.sc-ttl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 2px; font-weight: 700; }
.sc-sw { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 6px; font-size: 13px; }
.sc-nm { color: var(--navy-deep); }
.sc-need { color: var(--red); font-size: 14px; }
.sc-need b { font-size: 20px; margin: 0 2px; }
.sc-cnt { font-size: 12px; font-weight: 400; color: var(--ink-soft); margin-left: auto; }
.sc-why { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--ink); }
.sc-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--tint); margin: 0 0 6px; }
.sc-bar i { display: block; min-width: 6px; }
.sc-who { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; line-height: 1.5; }
.sc-who li { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; color: var(--ink-soft); }
.sc-who li.main { color: var(--ink); }
.sc-who .who-k { font-weight: 700; }
.sc-who .who-n span { white-space: nowrap; }
.sc-who .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; transform: translateY(-1px); }
.sc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; border-top: 1px dashed #ead3cf; padding-top: 6px; }
.sc-tip { margin: 0; font-size: 12.5px; color: #7a5212; flex: 1 1 180px; }
.sc-go { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--navy); background: #fff; color: var(--navy); font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s; }
.sc-go:hover { background: var(--tint); }
.sc-more { margin-top: 10px; }
.sc-more summary { cursor: pointer; font-weight: 700; color: var(--navy); padding: 4px 0 8px; }
/* 理由の色（帯と点） */
.r-ok { background: var(--green); }
.r-hope { background: #d9787a; }
.r-other { background: #7f95ab; }
.r-week { background: #d8a24a; }
.r-month { background: #b9822c; }
.r-ren { background: #8b6bb0; }
.r-seq { background: #3c9a9a; }
.r-seq2 { background: #2b7373; }
.r-can { background: #c3cad2; }

/* よくある質問 */
.faq dl { margin: 0; }
.faq dt { font-weight: 700; margin-top: 12px; color: var(--navy-deep); }
.faq dt::before { content: "Q. "; color: var(--gold); }
.faq dd { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }

/* 下の導線（控えめ） */
.foot { padding: 18px 0 28px; font-size: 12px; color: var(--ink-soft); text-align: center; }
.foot p { margin: 0; }

/* 確認と通知 */
.dlg { border: none; border-radius: 14px; padding: 22px 20px 18px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(19, 42, 69, .3); color: var(--ink); }
.dlg::backdrop { background: rgba(19, 42, 69, .45); }
.dlg[open] { animation: dlgIn .2s ease; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.dlg-btns { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); max-width: calc(100vw - 32px); background: var(--navy-deep); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .wrap { padding: 0 24px; }
  .top { padding: 52px 0 24px; }
  .top h1 { font-size: 34px; }
  .h1-sub { display: inline; font-size: 20px; margin-left: 6px; }
  .card { padding: 24px; }
  .sample-bar { flex-direction: row; align-items: center; justify-content: space-between; }
  .sample-btns { flex: none; }
  .btn-big { width: auto; min-width: 320px; }
  .f-can { flex: 1 1 260px; }
  .h1-type { display: inline-block; vertical-align: middle; margin: 0 0 0 10px; font-size: 15px; }
  .type-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .tcard { padding: 14px; }
  .short-cards { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; animation-delay: 0s !important; }
}
/* 「動きを省く」を選んだ時 */
.no-motion *, .no-motion *::before, .no-motion *::after { animation: none !important; transition: none !important; }
html.no-motion { scroll-behavior: auto; }

/* 印刷: シフト表と集計だけを A4 横の1枚に */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  html, body { background: #fff; font-size: 9pt; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print, .toast, .dlg { display: none !important; }
  .print-only { display: block; }
  .wrap { max-width: none; padding: 0; }
  .card { border: none; padding: 0; margin: 0; border-radius: 0; }
  .print-head h1 { font-size: 14pt; margin: 0 0 2mm; font-family: var(--serif); }
  .legend { font-size: 8pt; margin: 0 0 2mm; gap: 1mm 4mm; }
  .lg b { min-width: 0; height: auto; padding: 0 1.2mm; font-size: 8pt; }
  .scroll { overflow: visible; border: 1px solid #999; border-radius: 0; margin: 0 0 3mm; }
  .tbl { width: 100%; font-size: 7.5pt; }
  .tbl th, .tbl td { border-color: #aaa; }
  .result { table-layout: fixed; }
  .result th.name { width: 26mm; min-width: 0; max-width: none; position: static; padding: 0 1.2mm; box-shadow: none; }
  .result th.tot { width: 10mm; min-width: 0; padding: 0; }
  .result th.d { min-width: 0; padding: .6mm 0; }
  .result th.d span { font-size: 7.5pt; }
  .result th.d small { font-size: 6pt; }
  .result .cell { min-width: 0; height: 5.6mm; font-size: 8pt; }
  .result .cell.ng { box-shadow: none; }
  .result tfoot td { height: 4.6mm; font-size: 6.5pt; }
  .result tfoot th.name { font-size: 7pt; }
  .result.fill *, .result .col-hl { animation: none !important; }
  .result th.col-hl, .result td.col-hl { background: transparent; }
  .h3 { font-size: 10pt; margin: 2mm 0 1mm; }
  .sum { font-size: 7.5pt; }
  .sum th, .sum td { padding: .5mm 2mm; }
  .sum th.name { position: static; box-shadow: none; }
  tr { break-inside: avoid; }
}
