.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-facts.hour-sheet-view-only { grid-template-columns:repeat(2,minmax(0,1fr)); }
.hour-sheet-peers { margin-top:20px; padding:16px; border:1px solid #e2ecf8; border-radius:14px; }
.hour-sheet-peers h3 { margin:0 0 8px; font-size:15px; }
.hour-sheet-peers>p { margin:0 0 12px; color:#60738c; font-size:12px; line-height:1.65; }
.hour-sheet-peers table { width:100%; table-layout:fixed; border-collapse:collapse; font-variant-numeric:tabular-nums; }
.hour-peer-total { width:72px; }.hour-peer-score { width:100px; }
.hour-sheet-peers th,.hour-sheet-peers td { padding:12px 8px; border-bottom:1px solid #e6edf6; text-align:right; vertical-align:middle; }
.hour-sheet-peers th:first-child { text-align:left; font-weight:500; }
.hour-sheet-peers thead th { color:#60738c; font-size:12px; white-space:nowrap; }
.hour-sheet-peers tbody th { overflow-wrap:anywhere; line-height:1.6; }
.hour-sheet-peers td { white-space:nowrap; }
.hour-sheet-peers tr:last-child>* { border-bottom:0; }
.hour-sheet-peers .is-subject { background:#edf5ff; }
.hour-sheet-peers td strong { font-size:16px; color:#0876e2; }.hour-sheet-peers td strong small { font-size:11px; font-weight:400; }
.hour-peer-tag { display:inline-block; margin-left:6px; padding:1px 5px; border-radius:5px; font-size:10px; color:#2869aa; background:#dfeeff; white-space:nowrap; }
.hour-peer-revised { display:block; margin-top:3px; font-size:10px; color:#287765; }
.hour-sheet-peers .hour-peer-empty { margin:0; }
.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,.hour-sheet-facts.hour-sheet-view-only { grid-template-columns: 1fr; gap: 10px; }.hour-sheet-facts section { padding: 13px; }
  .hour-sheet-peers { padding:12px 6px; }
  .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; } }

/* G6: the hour is an identifiable work record, with its basis and peers together. */
html[data-m3e-theme] #workHourDetailSheet { border-radius:28px; }
html[data-m3e-theme] #workHourDetailSheet>header { padding:16px 22px; border-bottom:1px solid var(--md-outline); }
html[data-m3e-theme] #workHourDetailSheet h2 { font-size:20px; font-weight:700; letter-spacing:-.3px; }
html[data-m3e-theme] #workHourDetailSheet>header button { border-radius:50%; width:44px; min-height:44px; height:44px; padding:0; border:0; background:var(--md-surface-container); color:var(--md-on-surface); }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-identity { flex-wrap:nowrap; align-items:center; gap:14px; margin:0 0 18px; padding:14px 16px; border-radius:20px; background:var(--md-primary-container); color:var(--md-on-primary-container); }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-clock { width:46px; height:46px; flex:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-object { display:grid; gap:5px; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-object strong { font-size:22px; line-height:1.3; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-object>span { font-size:12px; line-height:1.6; color:inherit; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-facts { gap:12px; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-facts section { border:1px solid var(--md-outline); padding:16px; border-radius:18px; background:var(--md-surface-container); color:var(--md-on-surface); }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-facts h3 { margin:0 0 10px; font-size:12px; color:var(--md-muted); font-weight:600; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-facts strong { font-size:32px; letter-spacing:-.8px; line-height:1.1; color:var(--md-primary); font-variant-numeric:tabular-nums; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-facts strong small { font-size:12px; letter-spacing:0; font-weight:500; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-facts p { font-size:12px; line-height:1.7; margin-top:9px; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-facts .hour-sheet-reason { padding:14px 16px; background:var(--m3e-surface); }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-reason h3 { color:var(--md-on-surface); font-size:14px; margin-bottom:6px; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-reason p { margin:0; }
html[data-m3e-theme] #workHourDetailSheet [data-attention="true"] .hour-sheet-reason { color:var(--work-below-ink); background:var(--work-below-bg); border-color:var(--work-red); }
html[data-m3e-theme] #workHourDetailSheet [data-attention="true"] .hour-sheet-reason :is(h3,p) { color:inherit; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-peers { padding:18px; margin-top:16px; border-radius:20px; border:1px solid var(--md-outline); background:var(--m3e-surface); }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-peers h3 { font-size:16px; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-peers table { margin-top:10px; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-peers thead { background:var(--md-surface-container); }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-peers th,html[data-m3e-theme] #workHourDetailSheet .hour-sheet-peers td { border-color:var(--md-outline); padding:12px 10px; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-peers td strong { font-size:17px; }
html[data-m3e-theme] #workHourDetailSheet .hour-peer-tag { border-radius:6px; padding:2px 5px; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-deadline { padding:12px 14px; border-radius:14px; border:1px dashed var(--md-outline); background:var(--md-surface-container); font-size:12px; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-types { gap:9px; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-types label { padding:12px; border-radius:15px; border-color:var(--md-outline); background:var(--md-surface-container); line-height:1.4; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-types label:has(:checked) { background:var(--md-primary-container); color:var(--md-on-primary-container); border-color:var(--md-primary); }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-types input { accent-color:var(--md-primary); flex:none; }
html[data-m3e-theme] #workHourDetailSheet .hour-sheet-statement textarea { border-radius:16px; background:var(--m3e-surface); }
html[data-m3e-theme] #workHourDetailSheet>footer { gap:10px; padding:14px 22px max(14px,env(safe-area-inset-bottom,0px)); border-color:var(--md-outline); background:var(--m3e-surface); }
html[data-m3e-theme] #workHourDetailSheet>footer :is(button,a) { border-radius:18px; min-height:48px; }
@media(max-width:759px) {
 html[data-m3e-theme] #workHourDetailSheet { border-radius:0; }
 html[data-m3e-theme] #workHourDetailSheet>header { padding:10px 16px; }
 html[data-m3e-theme] #workHourDetailSheet .hour-sheet-content { padding:14px 12px; }
 html[data-m3e-theme] #workHourDetailSheet .hour-sheet-identity { gap:10px; padding:12px; margin-bottom:12px; border-radius:16px; }
 html[data-m3e-theme] #workHourDetailSheet .hour-sheet-clock { width:38px; height:38px; }
 html[data-m3e-theme] #workHourDetailSheet .hour-sheet-object strong { font-size:20px; }
 html[data-m3e-theme] #workHourDetailSheet .hour-sheet-facts { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 html[data-m3e-theme] #workHourDetailSheet .hour-sheet-facts section { padding:12px; border-radius:15px; }
 html[data-m3e-theme] #workHourDetailSheet .hour-sheet-facts>section:nth-child(3) { grid-column:1/-1; }
 html[data-m3e-theme] #workHourDetailSheet .hour-sheet-facts strong { font-size:27px; }
 html[data-m3e-theme] #workHourDetailSheet .hour-sheet-peers { padding:14px 8px; border-radius:17px; }
 html[data-m3e-theme] #workHourDetailSheet .hour-sheet-peers :is(th,td) { padding:10px 7px; }
 html[data-m3e-theme] #workHourDetailSheet>footer { padding-inline:12px; }
}
@media(prefers-reduced-motion:no-preference) {
 html[data-m3e-theme] #workHourDetailSheet .hour-sheet-types label { transition:background-color 180ms ease,border-color 180ms ease,border-radius 180ms ease; }
 html[data-m3e-theme] #workHourDetailSheet .hour-sheet-types label:has(:checked) { border-radius:8px; }
}
