.work-hour-detail-sheet {
  position: fixed; inset: auto 0 0; margin: 0 auto; padding: 0; width: min(100%, 1080px); max-width: 100%;
  height: min(760px, 88dvh); max-height: calc(100dvh - env(safe-area-inset-top, 0px)); min-width: 0;
  border: 1px solid #dce7f5; border-radius: 22px 22px 0 0; background: #fff; color: #172943;
  box-shadow: 0 -12px 60px #123b6630; overflow: hidden; box-sizing: border-box; font-size: 14px;
}
.work-hour-detail-sheet[open] { display: flex; flex-direction: column; }
.work-hour-detail-sheet::backdrop { background: #102b4f55; }
.work-hour-detail-sheet * { box-sizing: border-box; min-width: 0; }
.work-hour-detail-sheet header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px; border-bottom: 1px solid #e6edf6; flex: none; }
.work-hour-detail-sheet h2 { margin: 0; font-size: 20px; }
.work-hour-detail-sheet button,.work-hour-detail-sheet footer a { min-height: 44px; padding: 10px 18px; border: 1px solid #c9d9ec; border-radius: 12px; background: #f6f9fd; font: inherit; color: #174778; cursor: pointer; text-decoration: none; text-align: center; }
.work-hour-detail-sheet header button { font-size: 24px; padding: 4px 15px; }
.work-hour-detail-sheet button:disabled { opacity: .55; cursor: wait; }
.work-hour-detail-sheet :focus-visible { outline: 3px solid #3185f3; outline-offset: 2px; }
.hour-sheet-content { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 20px 22px; overflow-wrap: anywhere; }
.hour-sheet-identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-bottom: 18px; }
.hour-sheet-identity strong { font-size: 22px; }.hour-sheet-identity span { color: #60738c; }
.hour-sheet-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.hour-sheet-facts section { padding: 16px; background: #f4f8fd; border: 1px solid #e2ecf8; border-radius: 14px; }
.hour-sheet-facts h3 { margin: 0 0 12px; font-size: 14px; color: #4d6480; }
.hour-sheet-facts strong { font-size: 28px; color: #0876e2; }.hour-sheet-facts small { font-size: 13px; }
.hour-sheet-facts p { margin: 10px 0 0; line-height: 1.7; }.hour-sheet-reason { grid-column: 1 / -1; }
.hour-sheet-deadline { margin: 16px 0 0; line-height: 1.8; color: #60738c; font-size: 12px; }
.hour-sheet-message { flex: none; padding: 0 22px; color: #9a4d0c; line-height: 1.6; overflow-wrap: anywhere; }.hour-sheet-message:not(:empty) { padding-block: 10px; }
.work-hour-detail-sheet footer { display: flex; justify-content: flex-end; gap: 10px; flex: none; padding: 12px 22px max(12px,env(safe-area-inset-bottom,0px)); border-top: 1px solid #e6edf6; background: white; }
.work-hour-detail-sheet .hour-sheet-primary { background: #0876e2; color: white; border-color: #0876e2; }
.work-hour-detail-sheet fieldset { border: 0; padding: 0; margin: 0 0 18px; }.work-hour-detail-sheet legend { font-weight: 650; margin-bottom: 12px; }
.hour-sheet-types { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.hour-sheet-types label { display: flex; align-items: center; gap: 8px; min-height: 48px; border: 1px solid #d6e3f3; border-radius: 10px; padding: 10px; cursor: pointer; }.hour-sheet-types label:has(:checked) { background: #e9f3ff; border-color: #0876e2; }
.hour-sheet-statement { display: grid; gap: 10px; font-weight: 650; }.hour-sheet-statement textarea { width: 100%; resize: vertical; min-height: 120px; border: 1px solid #c9d9ec; border-radius: 12px; padding: 12px; font: inherit; line-height: 1.7; }
@media(max-width:759px) {
  .work-hour-detail-sheet { height: 90dvh; border-radius: 18px 18px 0 0; }
  .work-hour-detail-sheet header,.hour-sheet-content { padding: 14px 16px; }
  .hour-sheet-facts { grid-template-columns: 1fr; gap: 10px; }.hour-sheet-facts section { padding: 13px; }
  .hour-sheet-facts h3 { margin-bottom: 6px; }.hour-sheet-facts strong { font-size: 24px; }
  .hour-sheet-types { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .work-hour-detail-sheet footer { padding-inline: 16px; }.work-hour-detail-sheet footer > * { flex: 1; }
}
@media(max-height:500px) { .work-hour-detail-sheet { height: 96dvh; } .work-hour-detail-sheet header { padding-block: 6px; } }
