/* 管理者専用：週間確定シフトの印刷（A4縦）。見本（水道橋シフトtemplate）の配置・色・罫線に合わせる。
   紙面は mm 指定。位置・幅は weekprint.js が element.style で設定する（CSPで style 属性は使えない）。 */
.wp-overlay{position:fixed;inset:0;z-index:1000;background:#3b3f45;display:flex;flex-direction:column}
.wp-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 12px;background:#fff;border-bottom:1px solid #ccd}
.wp-toolbar button{min-height:44px;padding:0 16px;font-size:1rem;font-weight:800}
.wp-toolbar .wp-print-btn{background:#0b6b4f;color:#fff;border:0;border-radius:10px}
.wp-help{flex:1 1 100%;margin-top:4px;padding:8px 10px;border:1px solid #e0b45a;border-radius:8px;background:#fff7e6;color:#4a3a10;font-size:.85rem;line-height:1.6}.wp-help p{margin:4px 0}.wp-help-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}.wp-help-btn{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border-radius:10px;background:#0b6b4f;color:#fff;font-weight:800;text-decoration:none}.wp-help-row button{min-height:44px}.wp-help-url{width:100%;margin-top:6px;font-size:.8rem;padding:8px}
.wp-msg{flex:1 1 260px;margin:0;font-size:.82rem;line-height:1.5;color:#334}
.wp-stage{flex:1;overflow:auto;padding:12px}
.wp-frame{margin:0 auto;position:relative}
body.wp-open{overflow:hidden}

.wp-sheet{box-sizing:border-box;width:210mm;height:297mm;padding:6mm;background:#fff;color:#000;font-family:"MS PGothic","Hiragino Kaku Gothic ProN","Noto Sans CJK JP","Noto Sans JP",sans-serif;font-weight:700;display:flex;flex-direction:column;page:weekprint;-webkit-print-color-adjust:exact;print-color-adjust:exact;box-shadow:0 2px 14px rgba(0,0,0,.45)}
.wp-sheet *{box-sizing:border-box}
.wp-title{height:8mm;display:flex;align-items:center;justify-content:center;gap:6mm}
.wp-title b{font-size:13pt}.wp-title span{font-size:9pt}
.wp-body{display:flex;flex-direction:column}

/* 1日：左から 名前(19.8mm)｜イベント(28.3mm)｜時間軸・ゲージ。行の高さは weekprint.js が設定 */
.wp-day{display:grid;grid-template-columns:19.8mm 28.3mm 1fr 7mm}
.wp-date{display:flex;align-items:center;justify-content:center;font-size:10.5pt}
.wp-wd{display:flex;align-items:center;font-size:10pt}
.wp-note{display:flex;align-items:center;padding-left:2mm;font-size:7.5pt;font-weight:700}
.wp-evlabel{display:flex;align-items:center;justify-content:center;font-size:8pt;border:.25mm solid #000;border-right:0}
.wp-axis{position:relative;border-top:.25mm solid #000;border-bottom:.25mm solid #000;border-right:.25mm solid #000;font-size:8.5pt}
.wp-axis i{position:absolute;top:0;bottom:0;display:flex;align-items:center;padding-left:.5mm;border-left:.25mm solid #000;font-style:normal;line-height:1}

.wp-name{display:flex;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;font-size:var(--wp-name-font);border:.25mm solid #000;border-top-width:.12mm;border-bottom-width:.12mm;line-height:1}
.wp-name>span{display:inline-block;transform-origin:center;white-space:nowrap}
.wp-name:empty{border-color:#000}

.wp-events{display:flex;flex-direction:column;border:.25mm solid #000;border-top:0;border-right:0}
.wp-ev{flex:1 1 0;min-height:0;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;line-height:1.15;padding:.3mm .6mm;font-size:8pt;border-top:.25mm solid #000}
.wp-ev:first-child{border-top:0}
.wp-ev b{font-size:8.5pt;white-space:nowrap}.wp-ev b span{font-size:7.5pt}
.wp-ev>span{font-size:8pt}
.wp-ev .wp-ev-title{font-size:6.5pt;font-weight:700;max-width:100%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.1}
.wp-ev-two{line-height:1.05}.wp-ev-two b{font-size:7.5pt}.wp-ev-two b span{font-size:7pt}.wp-ev-two .wp-ev-title{font-size:6pt;-webkit-line-clamp:1}
.wp-ev-dome{background:#92d050}.wp-ev-hall{background:#ffe14d}.wp-ev-other{background:#d9e1f2}.wp-ev-none{background:#fff;color:#888}

/* ゲージ：時間軸に合わせた縦線。1時間＝濃い、30分＝中間、15分＝薄い。線は実線の要素（PDFでも細線が潰れない）で、勤務・休憩の帯の上に重ねるので、帯の上でも時刻が読み取れる。右端は24:00の終端線（太め） */
.wp-gauge{position:relative;border-right:.4mm solid #000;border-bottom:.12mm solid #000;border-top:.12mm solid #000}
.wp-lines{position:relative;z-index:2;pointer-events:none}
.wp-lines i{position:absolute;top:0;bottom:0}  /* 幅は border でなく width（border は1px未満が1pxに丸められ、太さの差が消える） */
.wp-ln-h{width:.35mm;background:rgba(0,0,0,.95)}.wp-ln-m{width:.2mm;background:rgba(0,0,0,.65)}.wp-ln-q{width:.12mm;background:rgba(0,0,0,.4)}
.wp-axis{border-right-width:.4mm}
.wp-end{display:flex;align-items:center;padding-left:.8mm;font-size:7pt;line-height:1;white-space:nowrap}

/* 勤務：通常＝ミント、新人＝黄、研修中＝紫（細い黒枠つき）。休憩：ピンク地に斜線（白黒印刷でも勤務部分と区別できる） */
.wp-bar{position:absolute;top:.35mm;bottom:.35mm;display:block;border:.15mm solid #333}
.wp-bar-normal{background:#8be3ce}.wp-bar-newbie{background:#ffe08a}.wp-bar-trainee{background:#cfb6ff}
.wp-bar-break{background:repeating-linear-gradient(135deg,#ff8fb8 0,#ff8fb8 .5mm,#fff .5mm,#fff 1mm);border-color:#c0306a;border-style:dashed}
.wp-legend{display:inline-flex;align-items:center;gap:1.2mm;margin-left:4mm;font-size:7pt}
.wp-legend .wp-bar{position:static;width:6mm;height:2.6mm;margin-left:1.5mm}.wp-legend .wp-bar:first-child{margin-left:0}

@page weekprint{size:A4 portrait;margin:0}
@media print{
 body.wp-printing>*:not(.wp-overlay){display:none!important}
 body.wp-printing{background:#fff!important;margin:0!important;overflow:visible!important}
 body.wp-printing .wp-overlay{position:static;background:none;display:block}
 body.wp-printing .wp-toolbar{display:none}
 body.wp-printing .wp-stage{overflow:visible;padding:0}
 body.wp-printing .wp-frame{width:auto!important;height:auto!important;margin:0}
 body.wp-printing .wp-sheet{transform:none!important;box-shadow:none;margin:0}
}
