:root {
  color-scheme: light;
  --bg: #f6f5f1; --card: #fff; --ink: #1d1d1b; --muted: #62615b; --line: #dcdad2;
  --ok: #1f7a3a; --ok-bg: #e6f3e9; --wait: #685400; --wait-bg: #fff6d6;
  --alert: #b3261e; --alert-bg: #fbe9e7; --accent: #1f7a3a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, "Hiragino Sans", "Yu Gothic UI", sans-serif; }
/* 英語・ベトナム語は、声調の字を持つ字体を先に（日本語の字体だけだと字がくずれる）。日本語の名前は後ろの字体で出る */
html:lang(vi) body, html:lang(en) body { font-family: "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, system-ui, "Hiragino Sans", "Yu Gothic UI", sans-serif; }
main { max-width: 560px; margin: 0 auto; padding: 0 12px 80px; }
.top { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: center; gap: 8px; max-width: 560px; margin: auto; padding: 10px 12px;
  background: var(--card); border-bottom: 1px solid var(--line); }
.who { font-weight: 600; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 14px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.tabs { display: flex; max-width: 560px; margin: 8px auto; padding: 0 12px; gap: 6px; }
button { font: inherit; cursor: pointer; overflow-wrap: anywhere; }
button:disabled { cursor: default; opacity: .55; }
.tab { flex: 1; min-width: 0; min-height: 48px; padding: 8px 4px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); border-radius: 8px; }
.tab-count { display: inline-block; min-width: 24px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; }
.tab.on { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); font-weight: 700; }
.banner { max-width: 560px; margin: 8px auto; padding: 10px 12px; border-radius: 8px;
  background: var(--alert-bg); color: var(--alert); font-weight: 600; overflow-wrap: anywhere; }
.banner.warn { background: var(--wait-bg); color: var(--wait); }
.day-progress { margin: 18px 0; font-weight: 700; }
progress { display: block; width: 100%; height: 10px; margin-top: 6px; border: 0; border-radius: 5px;
  background: var(--line); accent-color: var(--ok); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--ok); }
progress::-moz-progress-bar { background: var(--ok); }
.work-section { margin: 22px 0; }
.section-title { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.section-help { margin: 4px 0 8px; }
.work { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: 8px; padding: 12px 8px; margin: 8px 0; }
.section-2 .work { background: var(--wait-bg); }
.section-2 .section-title { color: var(--wait); }
.section-3 .work { background: var(--alert-bg); border-left-color: var(--alert); }
.section-3 .section-title { color: var(--alert); }
.section-4 .work { border-left-color: var(--ok); }
.section-4 .section-title { color: var(--ok); }
.work.changed { border-left-color: var(--alert); }
.work-info { min-width: 0; }
.work-summary { display: block; min-height: 48px; cursor: pointer; list-style: none; }
.work-summary::-webkit-details-marker { display: none; }
.work-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 8px; }
.customer { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.quantity { margin-left: auto; font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.work-item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px; overflow-wrap: anywhere; }
.badge { font-size: 14px; padding: 1px 6px; border-radius: 5px; background: #ecebe6; color: var(--muted); }
.badge.alert { background: var(--alert-bg); color: var(--alert); }
.note { color: var(--muted); font-size: 14px; }
.memo { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 14px; overflow-wrap: anywhere; }
.work-details { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px;
  margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }
.work-details dt, .work-details dd { margin: 0; overflow-wrap: anywhere; }
.work-act { grid-column: 2; justify-self: end; display: flex; flex-wrap: wrap; gap: 8px; }
.row-message { grid-column: 2; margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.caution-message { grid-column: 2; min-width: 0; }
.caution-message p + p { margin-top: 6px; }
.caution-reasons { margin: 6px 0; padding-left: 20px; overflow-wrap: anywhere; }
.caution-link { display: inline-block; min-height: 48px; padding: 12px 0; color: var(--accent); overflow-wrap: anywhere; }
.caution-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.error { color: var(--alert); }
.work-mark { width: 48px; min-height: 48px; text-align: center; font-size: 30px; color: var(--ok); }
.btn-ship { width: 48px; height: 48px; padding: 0; border: 2px solid var(--ok); border-radius: 50%; background: var(--card); }
.btn-ship:active { background: var(--ok-bg); }
.btn-cancel { min-height: 48px; font-size: 14px; color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.btn-small { min-height: 48px; font-size: 14px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); border-radius: 8px; padding: 8px 12px; }
.btn-small.ghost { color: var(--muted); background: #ecebe6; }
button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.press { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 10px 0; overflow-wrap: anywhere; }
.press-status { font-weight: 700; margin: 2px 0; }
.status-受けました .press-status { color: var(--ok); }
.status-押せませんでした .press-status, .status-責任者に連絡してください .press-status,
.status-記録が読めませんでした .press-status, .status-記録が変わりました .press-status { color: var(--alert); }
.foot { position: fixed; bottom: 0; left: 0; right: 0; max-width: 560px; margin: auto; padding: 6px 12px;
  font-size: 14px; color: var(--muted); background: var(--card); border-top: 1px solid var(--line); text-align: center; }
dialog { width: calc(100% - 32px); max-width: 480px; padding: 24px; border: 1px solid var(--line);
  border-radius: 12px; color: var(--ink); background: var(--card); overflow-wrap: anywhere; }
dialog::backdrop { background: rgb(0 0 0 / .45); }
dialog:not([open]) { display: none; }
.ask-actions { display: grid; gap: 12px; }
.btn-confirm { min-height: 56px; padding: 12px; border: 0; border-radius: 8px; background: var(--ok); color: white; font-weight: 700; }
.login { max-width: 480px; margin: 40px auto; padding: 0 16px; }
.dev-list { list-style: none; padding: 0; display: grid; gap: 8px; }
