/* みんなのシフト（/calendar）。色・余白は staff.css の :root の変数だけ。2026-10-14 */
[hidden] { display: none !important; }
.calendar-note { margin: 0 0 var(--space-2); }
/* 公開済みの月: 緑の帯で（2026-10-19） */
.calendar-note.is-published { padding: var(--space-1) var(--space-3); border-radius: var(--radius-s); background: var(--ok-bg); color: var(--ok); font-weight: var(--weight-bold); }
.tc-cal-legend { display: flex; gap: var(--space-2); justify-content: flex-end; margin: 0 0 var(--space-2); }
.tc-cal-week, .tc-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tc-cal-week { margin-bottom: var(--space-1); text-align: center; font-size: var(--font-min); color: var(--ink-sub); }
.tc-cal-week span:first-child { color: var(--caution); }
.tc-cal-grid { gap: 2px; background: var(--line); border: var(--card-border); border-radius: var(--radius-s); overflow: hidden; }
.tc-cal-cell { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-height: 76px; padding: 3px 2px 4px; border: 0; background: var(--surface); color: var(--ink); font: inherit; text-align: left; }
.tc-cal-cell.is-blank { background: var(--bg); }
.tc-cal-cell.is-past { background: var(--bg); }
.tc-cal-cell.is-past .tc-cal-tag { opacity: .55; }
.tc-cal-cell.is-closed { background: var(--closed-bg); }
.tc-cal-cell.is-selected { box-shadow: inset 0 0 0 2px var(--ink); }
.tc-cal-date { align-self: flex-start; min-width: 22px; padding: 0 3px; border-radius: 999px; font-size: var(--font-min); font-weight: var(--weight-bold); line-height: 20px; text-align: center; }
.tc-cal-date.is-sun { color: var(--caution); }
.tc-cal-cell.is-today .tc-cal-date { background: var(--ok); color: var(--on-primary); }
.tc-cal-tag { display: block; padding: 0 2px; border-radius: 4px; font-size: 11px; font-weight: var(--weight-bold); line-height: 16px; text-align: center; white-space: nowrap; overflow: hidden; }
.tc-cal-legend .tc-cal-tag { display: inline-block; padding: 0 var(--space-2); }
.tc-kind-full { background: var(--ok); color: var(--on-primary); }
/* 人ごとの色（シフト管理（PC）と同じ淡い色・黒い文字。2026-10-21） */
.tc-person { background: var(--person, var(--surface)); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(23, 20, 18, .28); }
.tc-cal-legend-note { font-size: var(--font-min); color: var(--ink-sub); }
.tc-kind-mid { background: var(--ink); color: var(--on-primary); }
/* マスの中: 上に名前、下に時間（2026-10-19）。スマホのマスは幅およそ50pxなので時間は小さく */
/* 左右の余白は0（375幅で「アヌカム」が0.8px足りず「アヌカ／ム」と折れた。2026-10-23） */
.tc-cal-grid .tc-cal-tag { display: flex; flex-direction: column; padding: 1px 0 2px; line-height: 1.15; }
/* 名前はフルネーム。マスに入らなければ折り返す（切らない。2026-10-21）。
   名字と名前のあいだに空白があればそこで折り返す（日下部／紀美代）。空白が無い名前は入る所で折り返す */
.tc-tag-name { font-size: 11px; letter-spacing: -.05em; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
/* 時間は全部書き、始まりと終わりで2行（calendar.js の shortTime が改行を入れる。2026-10-23） */
.tc-tag-time { font-size: 9px; font-weight: var(--weight-body); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: pre-line; }
.tc-kind-other { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tc-cal-more { font-size: 10px; color: var(--ink-sub); text-align: center; line-height: 14px; }
.tc-cal-closed { font-size: 11px; color: var(--ink-sub); text-align: center; }
.tc-day-detail { margin-top: var(--space-4); }
.tc-day-list { list-style: none; margin: 0; padding: 0; }
.tc-day-row { display: flex; align-items: center; gap: var(--space-3); min-height: var(--tap); border-top: 1px solid var(--closed-bg); }
.tc-day-row:first-child { border-top: 0; }
.tc-day-row .tc-cal-tag { flex: none; min-width: 4.5em; font-size: var(--font-min); line-height: 22px; border-radius: 999px; }
.tc-day-time { flex: none; min-width: 6.5em; font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
/* 名前は「…」で切らずに折り返す（320幅で「アヌカ…」になっていた。2026-10-21） */
.tc-day-row strong { min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
.tc-day-detail .sub-text { margin: 0; }

/* 祝日（2026-10-20）。日付はレンガ色。名前はPCの広いマスだけ（スマホの狭いマスでは色だけ・押すと下の詳しくに名前） */
.tc-cal-hol { display: none; }
@media (min-width: 700px) { .tc-cal-hol { display: block; align-self: flex-start; margin: -2px 0 2px 3px; font-size: 13px; line-height: 1.3; color: var(--caution); font-weight: var(--weight-bold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; } }

/* 公開前の案（?draft=1）。公開済みの緑と見分けられるよう、点線の枠と淡い黄土の地（2026-10-21） */
.calendar-note.is-draft { padding: var(--space-1) var(--space-3); border-radius: var(--radius-s); background: #f4ecd8; border: 1px dashed var(--ink-sub); color: var(--ink); font-weight: var(--weight-bold); }

/* ［公開済み］［案（公開前）］の切り替え（2026-10-21）。役割のある人にだけ出る */
.tc-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 var(--space-2); border: 1.5px solid var(--ink); border-radius: var(--radius-s); overflow: hidden; }
.tc-mode button { min-height: 40px; border: 0; background: var(--surface); color: var(--ink); font: inherit; font-size: var(--font-sub); font-weight: var(--weight-bold); cursor: pointer; }
.tc-mode button + button { border-left: 1.5px solid var(--ink); }
.tc-mode button[aria-pressed="true"] { background: var(--ink); color: var(--on-primary); }

/* 公開したシフトの印刷（2026-10-26 柴山さん。PCのお店の管理の みんなのシフト）。A4横・1か月を1枚に */
.tc-cal-tag.tc-extra { display: none; }
.print-row { display: flex; justify-content: flex-end; margin: 0 0 var(--space-2); }
.print-button { width: auto; display: inline-flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 var(--space-4); font-size: var(--font-sub); }
.print-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.print-head { display: none; }
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  html, body { background: #fff !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* 画面の「ふわっと出る」動きは印刷では止める。動きの始まり（透明）のまま印刷されて、見出しが丸ごと消えていた（2026-10-26） */
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .print-head, .print-head * { opacity: 1 !important; }
  .sidebar, #office-nav, .embed-title, .month-controls, .tc-mode, .calendar-note, .tc-cal-legend, .print-row, #day-detail, #page-message, .skeleton-page, .demo-bar, [class*="demo-bar"] { display: none !important; }
  /* PCの画面は右に「その日の詳しく」の列（340px）を取っている。印刷ではその列を消すので、場所も取らない＝カレンダーをページの真ん中に（2026-10-26 柴山さん「カレンダーが寄っているので中央に」） */
  .office-embed #calendar-content:not([hidden]) { display: block !important; width: 100% !important; margin: 0 auto !important; }
  .site, .embed-shell, main.app { display: block !important; margin: 0 !important; padding: 0 !important; max-width: none !important; width: auto !important; }
  /* PCの画面の外枠の線（.site の左右1px）は印刷では消す＝縦に飛び出して見えていた */
  .site, .embed-shell { border: 0 !important; box-shadow: none !important; }
  .print-head { display: flex !important; align-items: center; gap: 4mm; margin: 0 0 3mm; }
  .print-head .print-brand { display: inline-flex; align-items: center; gap: 2mm; }
  .print-head .print-mark { width: 11mm; height: 11mm; }
  .print-head .print-name { font-size: 15pt; font-weight: 700; letter-spacing: .3em; }
  .print-head .print-title { padding: 1mm 4mm; background: #171412; color: #fff; font-size: 14pt; letter-spacing: .12em; }
  .print-head .print-sub { margin-left: auto; font-size: 8.5pt; color: #5f5952; }
  /* 曜日は黒い帯に白抜き。カレンダーは二重線の枠、マスの区切りは細い線（黒く太いすき間をやめる） */
  .tc-cal-week { margin: 0 !important; background: #171412; border: 1.6mm double #171412; border-bottom: 0; } /* 帯とカレンダーの間にすき間を作らない（左右の二重線をつなげる） */
  .tc-cal-week span { color: #fff !important; font-weight: 700; letter-spacing: .1em; }
  .tc-cal-week span:first-child { color: #f3c9bb !important; }
  .tc-cal-grid { break-inside: avoid; gap: 0 !important; background: #fff !important; border: 1.6mm double #171412 !important; border-top: 0 !important; border-radius: 0 !important; }
  .tc-cal-grid > .tc-cal-cell { border-right: 1px solid #b9b2a8 !important; border-bottom: 1px solid #b9b2a8 !important; }
  .tc-cal-grid > .tc-cal-cell:nth-child(7n) { border-right: 0 !important; }
  .tc-cal-grid > .tc-cal-cell:nth-last-child(-n+7) { border-bottom: 0 !important; }
  .tc-cal-cell.is-blank { background: #f7f5f0 !important; }
  .tc-cal-cell { min-height: 0 !important; height: auto !important; break-inside: avoid; }
  .tc-cal-cell.is-past, .tc-cal-cell.is-past * { opacity: 1 !important; }
  .tc-cal-cell.is-selected, .tc-cal-cell.is-today { outline: none !important; box-shadow: none !important; }
  .tc-cal-tag.tc-extra { display: block; }
  .tc-cal-more { display: none !important; }
  .tc-cal-tag { font-size: 7.5pt; line-height: 1.2; padding: 1px 2px; margin-top: 2px; }
  /* 1日に人が多い月（12月など）でも1枚に収める（2026-11-20 柴山さん「12月が1枚に入りきらない」）: 名前と時刻を1行に。
     それでも高いときは calendar.js の beforeprint が --print-zoom で全体を縮める */
  .tc-cal-grid .tc-cal-tag { flex-direction: row !important; justify-content: center; align-items: baseline; gap: 1.2mm; padding: 0 2px !important; line-height: 1.25 !important; }
  .tc-tag-time { font-weight: 400; }
  #calendar-content { zoom: var(--print-zoom, 1); }
  #ask-root, .ask-tab, .ask-fab { display: none !important; }
  .tc-cal-cell { padding: 2px 3px 3px !important; background: #fff !important; }
  .tc-cal-cell.is-closed { background: #ece9e3 !important; }
  .tc-cal-date { font-size: 10pt !important; width: auto !important; height: auto !important; background: none !important; color: inherit; }
  .tc-cal-date { color: #171412 !important; } /* 今日の白抜きの丸をやめたので、数字は黒に */
  .tc-cal-date.is-sun { color: #a2472f !important; }
  .tc-cal-hol { font-size: 7pt !important; }
  .tc-cal-week span { padding: 1mm 0 !important; font-size: 9pt; }
}
