:root {
  font-family: "Yu Gothic UI", "Hiragino Sans", Meiryo, sans-serif;
  color: #172d28;
  background: #eef2ee;
  --green: #123e35;
  --muted: #4d635b;
  --line: #cad7d0;
}
* { box-sizing: border-box }
[hidden] { display: none !important }
body { margin: 0 }
.site-head { background: var(--green); color: #fff }
.head-inner { max-width: 840px; margin: auto; padding: .8rem 1.15rem; display: flex; align-items: center; justify-content: space-between; gap: .6rem }
.brand { font-weight: 750 }
.brand span { font-weight: 500; margin-left: .4rem; color: #c3e4d4 }
#account { display: flex; gap: .55rem; align-items: center; font-size: .85rem }
#account button { background: transparent; color: white; border-color: #8eb2a3 }
main { max-width: 840px; margin: auto; padding: 1rem 1rem 3rem }
.intro { padding: .65rem 0 .8rem }
h1 { font-size: clamp(1.65rem, 6.5vw, 2.4rem); margin: 0; letter-spacing: .035em }
h2 { margin: 0 0 .7rem; font-size: 1.25rem }
h3 { margin: 0 0 .55rem; font-size: 1.01rem }
p { margin: 0 0 .85rem; line-height: 1.55 }
p:last-child { margin-bottom: 0 }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; margin-bottom: .85rem }
.muted { color: var(--muted); font-size: .9rem }
label { display: grid; gap: .4rem; font-weight: 650; min-width: 0 }
input, select, button, .button {
  font: inherit; color: inherit; min-height: 44px; max-width: 100%; min-width: 0;
  border: 1px solid #a6b9af; border-radius: 8px; padding: .5rem .65rem; background: #fff;
}
input, select { width: 100% }
input[type=file] { border-style: dashed; background: #f3f7f3; font-size: .95rem }
button, .button { cursor: pointer; font-weight: 700; text-decoration: none; text-align: center; display: inline-grid; place-items: center }
button:disabled { opacity: .65; cursor: wait }
.primary, button[aria-current=page] { background: var(--green); color: white; border-color: var(--green) }
form, .stack { display: grid; gap: .8rem }
.pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem }
nav, .actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem }
nav:empty { display: none }
.actions:last-child { margin-bottom: 0 }
#notice:not(:empty) { background: #d8eee4; border-radius: 8px; padding: .75rem; margin-bottom: .7rem; overflow-wrap: anywhere }
#notice.error { background: #ffe8e2; color: #632515 }
.preview { display: block; max-width: 100%; max-height: 300px; border: 1px solid var(--line); border-radius: 8px }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) 6rem; gap: .4rem .55rem; padding: .55rem; align-items: center; border-radius: 8px; background: #edf4ef }
.entry small { grid-column: 1/-1; font-weight: 500; overflow-wrap: anywhere }
.flagged { padding: .55rem; border-radius: 8px }
.flagged .entry { padding: 0; background: transparent }
.yellow { background: #ffed9d }
.orange { background: #ffcfaa }
.check { display: flex; align-items: center; gap: .4rem; grid-column: 1/-1; font-size: .9rem }
.check input { width: 1.2rem; min-height: 32px }
.list { display: grid; gap: .55rem; padding-left: 1.1rem; overflow-wrap: anywhere }
.scroll { overflow-x: auto }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .88rem }
td, th { padding: .5rem; border-bottom: 1px solid var(--line) }
:focus-visible { outline: 3px solid #3b826d; outline-offset: 2px }
#print-area { display: none }
.reader-method, #page form + .muted { margin-top: .75rem }
.preview + .button { margin-bottom: .8rem }
.status-summary { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .85rem }
.count-status { display: inline-block; padding: .35rem .55rem; border-radius: 6px; font-weight: 650 }
[data-state=合格] { background: #e2f2e8 }
[data-state=不一致] { background: #fce4e0 }
[data-state=枚数超過] { background: #ffedbb }
[data-state=未登録] { background: #f1f3f0 }
[data-state=要確認], .manifest-warning { background: #ffedbb; color: #5b3802; font-weight: 700 }
.manifest-warning { padding: .3rem }
.reconciliation { width: 100%; table-layout: fixed; margin-top: .65rem }
.reconciliation :is(th,td) { padding: .45rem .22rem; text-align: right; white-space: normal; overflow-wrap: anywhere }
.reconciliation :is(th,td):first-child { text-align: left; width: 31% }
.reconciliation small { display: block }
.reconciliation button { padding: .2rem .25rem; font-size: .75rem; margin-top: .25rem }
.reconciliation td.manifest-detail-cell { padding: .5rem .55rem; width: auto }
.manifest-ticket { padding: .65rem; border: 1px solid var(--line); margin-top: .55rem; border-radius: 8px }
.manifest-ticket p { margin: .3rem 0 }
.manifest-ticket details { margin-top: .5rem }
.manifest-ticket form { margin: .55rem 0 0 }
.manifest-ticket > button { display: block; margin-top: .5rem }
summary { cursor: pointer; padding-block: .35rem }
#page .panel > button + .stack:not(:empty) { margin-top: .7rem }

@page { size: A4 portrait; margin: 8mm }
@media print {
  body { background: white; color: black }
  body > :not(#print-area) { display: none !important }
  #print-area { display: block; font-size: 8pt; print-color-adjust: exact; -webkit-print-color-adjust: exact }
  #print-area h1 { font-size: 16pt }
  #print-area p { margin: 2mm 0 3mm }
  #print-area table { width: 100%; border-collapse: collapse; table-layout: fixed }
  #print-area :is(th,td) { text-align: center; border: 1px solid #555; padding: 0 .25mm; white-space: normal; overflow-wrap: anywhere }
  #print-area thead th { height: 6mm; line-height: 1.15 }
  #print-area thead tr:first-child th:first-child { width: 17mm }
  #print-area thead tr:first-child th:last-child { width: 14mm }
  #print-area tbody th { font-size: 7pt }
  #print-area tbody tr { height: 6.4mm; break-inside: avoid }
  #print-area .holiday { background: #dadada }
}
/* 日立工場の撮影画面 */
.field-mode { color:#16201c; background:#f3f5f4; font-size:20px }
.field-mode :is(.site-head,.intro,#nav) { display:none }
.field-mode main { max-width:480px; min-height:100dvh; padding:0 }
.field-mode #notice:not(:empty) { margin:12px 16px }
.field-mode #page { display:grid; gap:12px; padding:0 16px 18px }
.field-mode #page :is(h1,h2,p) { margin:0 }
.field-mode #page h1 { font-size:32px; letter-spacing:0 }
.field-mode #page button { display:grid; width:100%; min-height:64px; font-size:24px; color:#fff; background:#16201c; border:0 }
.field-mode #page .field-big { display:flex; align-items:center; gap:14px; min-height:124px; padding:12px 16px; font-size:30px; text-align:left; line-height:1.3 }
.field-big b { flex:none; display:grid; place-items:center; width:60px; height:60px; border-radius:50%; background:white; font-size:36px }
.field-big small { display:block; font-size:20px }
.field-mode #page .field-one { background:#0f6244 }
.field-mode #page .field-two { background:#1b4a8a }
.field-one b { color:#0f6244 }
.field-two b { color:#1b4a8a }
.field-head { display:flex; justify-content:space-between; align-items:baseline; gap:8px; background:#fff; border-bottom:2px solid #c9d2cd; padding:10px 16px; margin-inline:-16px }
.field-mode #page .field-head h1 { font-size:22px }
.field-head span { color:#4a5650 }
.field-today { background:#fff; border:2px solid #c9d2cd; border-radius:8px; padding:8px 12px }
.field-mode .field-today h2 { font-size:22px }
.field-row { display:flex; align-items:center; justify-content:space-between; gap:4px; min-height:58px; border-top:1px solid #c9d2cd; font-weight:700 }
.field-row:first-of-type { margin-top:6px }
.field-row b { flex-shrink:0 }
.field-done { color:#0f6244 }
.field-yet { color:#a8360b; border:2px dashed; border-radius:8px; padding:4px 12px }
.field-banner { padding:8px 12px; background:#e4f1ea; color:#0f6244; border-radius:8px; font-weight:700 }
.field-help { display:grid; place-items:center; min-height:64px; text-align:center; font-weight:700; color:inherit; background:#fff; border:2px solid #c9d2cd; border-radius:8px }
.field-mode #page.field-result { min-height:100dvh; align-content:center; text-align:center; gap:16px; padding-block:28px }
.field-mark,.field-symbol { display:grid; place-items:center; margin-inline:auto; width:150px; height:150px; color:#fff; background:#0f6244; border-radius:50%; font-size:104px; font-weight:700; line-height:1 }
.field-mode #page.field-result h1 { font-size:clamp(28px,9vw,42px) }
.field-mode #page .field-outline,.field-mode #page .field-subtle { color:#16201c; background:#fff; border:2px solid #16201c }
.field-mode #page .field-subtle { border-color:transparent; background:transparent; font-size:20px }
.field-mode #page.field-problem { background:#fbeae2 }
.field-mode #page .field-again,.field-symbol { background:#a8360b }
.field-mode #page.field-camera { min-height:100dvh; background:#0c0f0e; color:#fff; padding-top:12px; text-align:center; align-content:start }
.field-mode #page.field-camera h1 { font-size:28px }
.field-finder { display:grid; place-items:center; position:relative; height:min(51dvh,450px); background:#46504b; overflow:hidden }
.field-finder video { position:absolute; inset:0; width:100%; height:100%; object-fit:contain }
.field-frame { position:relative; height:86%; max-width:84%; aspect-ratio:210 / 297; border:4px solid #f6d54d; border-radius:8px }
.field-controls { display:grid; grid-template-columns:104px 1fr 104px; align-items:center; gap:4px }
.field-mode #page.field-camera .field-controls .field-outline { background:transparent; color:#fff; border-color:#fff; font-size:20px }
.field-mode #page .field-shutter { justify-self:center; padding:0; background:transparent; font-size:20px }
.field-shutter::before { content:''; width:92px; height:92px; background:white; border:5px double #222; border-radius:50% }
.field-camera .field-help { color:#16201c }
.morning-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin-bottom:12px }
.morning-summary b { padding:6px; border:1px solid #a8360b; border-radius:8px; color:#8e2e0b; text-align:center }
.morning-day { border:1px solid var(--line); border-radius:8px; padding:10px; gap:4px }
.morning-day :is(h3,p) { margin:0 }
.today-office { font-size:20px }
.today-office h2 { font-size:26px }
.today-office h3 { font-size:27px }
.today-office .today-match { color:#0f6244 }
.today-office .today-check { color:#a8360b }
.today-office button,.today-office .today-numbers summary { min-height:56px; font-size:20px }
.today-office > button { width:100%; margin-block:8px }
.today-numbers { margin-top:12px }
.today-numbers summary { padding:12px; border-radius:8px; background:#e9f0ed; font-weight:700; cursor:pointer }
.today-numbers .morning-day { margin-top:8px }
.today-numbers .morning-day h3 { font-size:22px }
.manual-day { border:1px solid var(--line); border-radius:8px; padding:8px }
.manual-day summary { padding:6px; font-size:20px; font-weight:700; cursor:pointer }
.manual-day .entry { margin-top:4px; background:#edf4ef }
.office-start main { display:flex; flex-direction:column }
.office-start #nav { order:1 }
.office-start .intro { display:none }
