.mobile-page {
  --ink: #20272c; --muted: #626d76; --line: #e0e5e9; --green: #16704b; --blue: #2369a0;
  margin: 0; background: #f3f5f7; color: var(--ink); letter-spacing: 0;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.mobile-page *, .mobile-page *::before, .mobile-page *::after { box-sizing: border-box; letter-spacing: 0; }
.mobile-page [hidden] { display: none !important; }
.mobile-page .shell { width: min(100%, 1000px); margin: 0 auto; padding: 0 20px calc(100px + env(safe-area-inset-bottom)); }
.mobile-page h1, .mobile-page h2, .mobile-page h3 { color: var(--ink); line-height: 1.4; overflow-wrap: anywhere; }
.mobile-page h1 { font-size: 24px; margin: 0; }
.mobile-page h1::after { display: none; }
.mobile-page h2 { font-size: 18px; margin: 0; }
.mobile-page h3 { font-size: 16px; margin: 0; }
.mobile-page a { color: inherit; text-decoration: none; }
.mobile-page p { overflow-wrap: anywhere; }
.mobile-page button, .mobile-page .command { min-height: 46px; border-radius: 6px; padding: 10px 16px; font: inherit; font-weight: 600; line-height: 1.4; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; justify-content: center; background: var(--green); color: white; border: 1px solid transparent; max-width: 100%; }
.mobile-page button:hover { filter: brightness(.96); transform: none; }
.mobile-page button:disabled { opacity: .48; cursor: not-allowed; }
.mobile-page button.ghost, .mobile-page .command.ghost { background: white; border: 1px solid var(--line); color: var(--ink); }
.mobile-page button img, .mobile-page .command img { width: 20px; height: 20px; flex: 0 0 20px; }
.mobile-page button:not(.ghost) > img { filter: brightness(0) invert(1); }
.mobile-page .icon-button, .mobile-page .ot-icon { width: 46px; height: 46px; min-height: 46px; padding: 12px !important; flex: 0 0 46px; }
.mobile-page .icon-button img { filter: none; }
.mobile-page :focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.mobile-page label { display: grid; gap: 8px; margin: 0; font-size: 14px; color: var(--ink); min-width: 0; }
.mobile-page input, .mobile-page textarea, .mobile-page select { width: 100%; min-width: 0; max-width: 100%; min-height: 46px; border: 1px solid #cbd3da; border-radius: 6px; background: #fff; padding: 11px 12px; font: inherit; font-size: 16px; color: var(--ink); }
.mobile-page input[readonly] { background: #f5f6f8; color: var(--muted); }
.mobile-page textarea { resize: vertical; }
.mobile-page input, .mobile-page textarea, .mobile-page select { scroll-margin-block: 90px 120px; }
.mobile-page input[type="date"] { min-width: 150px; }
.mobile-page .grid.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; }
.mobile-page small, .mobile-page .field-tip, .mobile-page .muted { font-size: 13px; color: var(--muted); line-height: 1.6; }
.mobile-header { min-height: 68px; display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.mobile-header .brand-mark { width: 112px; height: auto; display: block; }
.mobile-header .app-name { font-size: 18px; font-weight: 700; border-left: 1px solid #ccd2d8; padding-left: 12px; }
.mobile-header .account-link { margin-left: auto; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 6px; min-height: 44px; }
.mobile-header .account-link img { width: 18px; height: 18px; }
.mobile-header .page-title { flex: 1; font-size: 19px; }
.mobile-header .badge { border: 0; background: transparent; color: var(--muted); padding: 0; font-size: 13px; overflow-wrap: anywhere; }
.mobile-nav { position: fixed; z-index: 20; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 1000px); display: flex; justify-content: space-around; background: #fff; border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.mobile-nav a { min-width: 0; flex: 1; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; color: var(--muted); }
.mobile-nav a img { width: 22px; height: 22px; opacity: .66; }
.mobile-nav a[aria-current="page"] { color: var(--green); font-weight: 700; }
.mobile-nav a[aria-current="page"] img { opacity: 1; filter: invert(29%) sepia(32%) saturate(1000%) hue-rotate(104deg); }
.mobile-page.keyboard-open .mobile-nav { display: none; }
.mobile-page .message { min-height: 0; margin: 0 0 16px; padding: 12px; background: #eaf2f9; border-left: 3px solid var(--blue); color: #214e75; font-size: 14px; }
.mobile-page .message:empty { display: none; }
.mobile-page .message.warn { background: #fff4e8; color: #91510d; border-color: #cf8636; }
.mobile-page .message.ok { color: var(--green); background: #edf6f1; border-color: var(--green); }
.network-state { color: #a3412a; background: #fff1ec; padding: 12px; margin: 0; font-size: 14px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px 0 18px; }
.page-heading p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.todo-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); padding: 16px 0; border-block: 1px solid var(--line); gap: 16px; }
.mobile-page .todo-count { padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); flex-direction: column; align-items: flex-start; font-size: 13px; font-weight: 400; }
.todo-count strong { color: var(--ink); font-size: 26px; font-weight: 650; line-height: 1.2; }
.todo-count[data-attention="true"] strong { color: #b5502b; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 12px; gap: 12px; }
.section-heading a { font-size: 13px; color: var(--blue); min-height: 44px; display: flex; align-items: center; }
.filter-strip { display: flex; gap: 20px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.mobile-page .filter-strip button { flex: 0 0 auto; border: 0; border-radius: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: 14px; padding: 12px 0; font-weight: 500; }
.mobile-page .filter-strip button[aria-pressed="true"] { border-color: var(--green); color: var(--green); font-weight: 650; }
.todo-list { background: white; }
.todo-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; border-bottom: 1px solid var(--line); padding: 18px 16px; }
.todo-row .project-code { font-size: 13px; color: var(--blue); font-weight: 600; margin: 0 0 4px; overflow-wrap: anywhere; }
.todo-row p { font-size: 13px; margin: 8px 0 0; color: var(--muted); }
.todo-row h3 { font-weight: 600; }
.todo-row .todo-action { color: var(--green); grid-column: 1 / -1; font-size: 14px; display: flex; justify-content: space-between; align-items: center; min-height: 44px; border-top: 1px solid #edf0f3; padding-top: 10px; }
.todo-action img { width: 18px; height: 18px; }
.todo-kind { color: #3b6a90; background: #edf3f9; font-size: 12px; padding: 3px 7px; height: fit-content; border-radius: 4px; }
.todo-kind.attention { color: #a54b2d; background: #fff0e8; }
.empty-state { padding: 36px 16px; color: var(--muted); text-align: center; font-size: 14px; }
.empty-state img { display: block; width: 32px; height: 32px; margin: 0 auto 12px; opacity: .5; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; background: white; }
.module-entry { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px 8px; min-height: 112px; text-align: center; font-size: 14px; border-bottom: 1px solid var(--line); position: relative; }
.module-entry img { width: 26px; height: 26px; }
.module-entry:nth-child(3n + 1) img { filter: invert(32%) sepia(25%) saturate(1300%) hue-rotate(166deg); }
.module-entry:nth-child(3n + 2) img { filter: invert(32%) sepia(25%) saturate(1000%) hue-rotate(108deg); }
.module-entry:nth-child(3n + 3) img { filter: invert(36%) sepia(40%) saturate(600%) hue-rotate(345deg); }
.count-dot { min-width: 18px; height: 18px; background: #c3423b; border-radius: 9px; color: white; font-size: 11px; padding: 0 5px; position: absolute; top: 10px; right: 14px; }
.profile-head { display: flex; gap: 16px; align-items: center; padding: 20px 0 28px; }
.profile-avatar { width: 56px; height: 56px; border-radius: 8px; background: #e6ebef; display: grid; place-items: center; font-size: 23px; color: #45545f; }
.profile-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.profile-actions { display: grid; gap: 1px; background: var(--line); }
.mobile-page .profile-actions button, .profile-actions a { border: 0; border-radius: 0; display: flex; justify-content: flex-start; gap: 12px; background: white; color: var(--ink); padding: 16px; min-height: 58px; font-size: 16px; font-weight: 400; }
.profile-actions img { width: 20px; height: 20px; filter: none !important; }
.mobile-page dialog { width: min(540px, calc(100% - 24px)); max-height: calc(100dvh - 32px); overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 20px; color: var(--ink); }
.mobile-page dialog::backdrop { background: #15232d88; }
.mobile-image-dialog { background: #111; }
.mobile-image-dialog > img { display: block; width: 100%; max-height: 76dvh; object-fit: contain; margin-top: 12px; }
.mobile-image-dialog > button { margin-left: auto; }
.mobile-page .mobile-hidden { display: none !important; }
.daily-page .mobile-header { margin-bottom: 0; }
.daily-page #message { position: sticky; top: 0; z-index: 5; margin-top: 12px; }
.daily-page #dailyForm { display: block; }
.form-section { margin: 0; padding: 22px 0; border-bottom: 1px solid var(--line); }
.form-section > h2 { margin-bottom: 18px; }
.form-section > label, .form-section > .grid, .section-fields > label, .section-fields > .grid { margin-bottom: 18px !important; }
.form-section > :last-child, .section-fields > :last-child { margin-bottom: 0 !important; }
.form-section > summary { cursor: pointer; font-size: 17px; font-weight: 650; min-height: 44px; display: flex; justify-content: space-between; align-items: center; list-style: none; }
.form-section > summary::-webkit-details-marker { display: none; }
.form-section > summary::after { content: ""; width: 20px; height: 20px; background: url('/assets/icons/chevron-right.svg') center / contain; flex: 0 0 20px; }
.form-section[open] > summary::after { transform: rotate(90deg); }
.section-fields { padding-top: 18px; }
.task-context { background: #eaf0f6; padding: 14px; margin-top: 12px; border-left: 3px solid var(--blue); }
.task-context strong, .task-context span { display: block; overflow-wrap: anywhere; }
.task-context strong { color: var(--blue); font-size: 14px; }
.task-context span { font-size: 16px; margin: 3px 0 8px; font-weight: 600; }
.task-context p { font-size: 13px; margin: 8px 0 0; }
.task-context summary { font-size: 13px; color: var(--muted); cursor: pointer; min-height: 44px; }
.report-fields { margin-top: 12px; }
.report-fields > summary { font-size: 14px; color: var(--muted); cursor: pointer; min-height: 44px; }
.mobile-page .action-dock { position: fixed; z-index: 15; left: 50%; transform: translateX(-50%); bottom: 0; width: min(100%, 1000px); background: white; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); }
.action-dock > button:last-child { flex: 1; }
.action-dock .dock-note { font-size: 12px; color: var(--muted); max-width: 140px; }
.mobile-page.keyboard-open .action-dock { position: static; transform: none; width: 100%; margin-top: 16px; padding-inline: 0; }
.daily-page .external-labor-panel { background: transparent; box-shadow: none; border: 0; padding: 0; border-radius: 0; }
.daily-page .external-worker-picker { background: transparent; border: 0; padding: 0; margin: 14px 0; }
.daily-page .external-worker-results { max-height: 230px; overflow: auto; }
.daily-page .external-worker-option, .daily-page .external-worker-chip { min-height: 44px; }
.daily-page .external-labor-head { align-items: center; gap: 10px; }
.daily-page .external-labor-head small { display: none; }
.daily-page .dialog-head { align-items: center; }
.daily-page .dialog-head p { display: none; }
.media-picker { position: relative; display: flex !important; align-items: center; gap: 10px; justify-content: center; min-height: 76px; background: white; border: 1px dashed #aebbc6; border-radius: 6px; overflow: hidden; cursor: pointer; }
.media-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.media-picker:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.media-picker:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.media-picker img { width: 24px; height: 24px; }
.daily-page .upload-list { display: grid; gap: 12px; margin: 12px 0; }
.daily-page .photo-upload-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.daily-page .photo-upload-list .upload-item { display: flex; flex-direction: column; align-items: stretch; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: white; gap: 4px; min-width: 0; position: relative; }
.photo-preview { padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: #e5e9ed !important; width: 100%; aspect-ratio: 4 / 3; }
.mobile-page .photo-preview > img { width: 100%; height: 100%; object-fit: contain; filter: none; }
.photo-upload-list .upload-item > span, .photo-upload-list .upload-item > small { padding: 0 8px; overflow-wrap: anywhere; font-size: 12px; }
.photo-tools { display: flex; justify-content: space-between; padding: 4px; }
.photo-tools button { padding: 10px !important; }
.mobile-page .upload-item { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .mobile-page .shell { padding-inline: 14px; }
  .mobile-header { min-height: 60px; margin-bottom: 18px; gap: 8px; }
  .mobile-header .brand-mark { width: 82px; }
  .mobile-header .app-name { font-size: 17px; padding-left: 8px; }
  .mobile-header .account-link { font-size: 13px; max-width: 95px; }
  .mobile-page h1 { font-size: 23px; }
  .mobile-page .grid.two { grid-template-columns: minmax(0, 1fr); }
  .mobile-page .grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-page .action-dock { padding-inline: 14px; }
  .mobile-page .dock-note { max-width: 108px; }
  .daily-page .photo-upload-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-page .dialog-actions { display: flex; }
  .mobile-page .dialog-actions button { flex: 1; }
  .mobile-page dialog.bottom-sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 8px 8px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .mobile-page * { scroll-behavior: auto !important; transition: none !important; } }
