.check-entry { display: flex; align-items: flex-start; gap: 4px; padding: 4px 0; min-width: 0; }
.check-entry .check-row { flex: 1; min-width: 0; margin: 0; }
.check-entry .check-row span { overflow-wrap: anywhere; }
.check-row-actions { display: flex; flex-shrink: 0; gap: 2px; }
.check-action { display: grid; place-items: center; width: 36px; min-height: 44px; background: #eaf5fa; color: var(--accent); border-radius: 9px; border: 1px solid var(--accent-border); }
.check-action .icon { width: 15px; height: 15px; }
.check-action.danger { color: #98412e; background: #fff2ed; border-color: #edcfc2; }
.checklist-content { padding: 20px; overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.checklist-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 13px; }
.checklist-heading h3 { font-size: 14px; margin: 0; }
#checklist-summary { color: var(--muted); font-size: 12px; }
.check-items { display: grid; gap: 6px; }
.check-row { display: flex; gap: 10px; align-items: center; padding: 11px 12px; min-height: 48px; border: 1px solid #e6eff3; border-radius: 13px; background: white; cursor: pointer; border-color: #d1e3ec; }
.check-row input { width: 19px; height: 19px; flex: 0 0 auto; margin: 0; }
.check-row span { font-size: 14px; overflow-wrap: anywhere; }
.check-row:has(input:checked) { background: #f0fbf6; border-color: #b8ddcb; }
.check-row input:checked { accent-color: #238366; }
.check-row input:checked + span { text-decoration: none; color: #238366; }
.add-check-form { display: flex; gap: 8px; margin-top: 14px; }
.add-check-form input { min-width: 0; flex: 1; padding: 11px 12px; border: 1px solid #dcebf1; background: white; border-radius: 12px; height: 45px; border-color: #c3d8e3; }
.add-check-form button { width: 45px; height: 45px; border-radius: 12px; display: grid; place-items: center; background: #e4f6fa; color: var(--accent); border: 1px solid var(--accent-border); }
.checklist-tip { font-size: 12px; color: var(--muted); margin: 13px 0 0; }
.step-card { border: 1px solid #cce5f0; border-radius: 13px; background: white; overflow: hidden; }
.step-heading { position: relative; display: flex; align-items: center; gap: 6px; padding: 6px 10px; min-height: 44px; isolation: isolate; }
.step-heading strong { flex: 1; min-width: 0; color: var(--ink); font-size: 15px; line-height: 1.4; font-weight: 750; overflow-wrap: anywhere; }
.step-card[data-state="doing"] { border-color: #78c9e4; }
.step-card[data-state="doing"] .step-heading strong { color: var(--accent); }
.step-card[data-state="done"] { border-color: #8cdcc5; }
.step-card[data-state="done"] .step-heading strong { color: #13795e; }
.step-heading .check-action { width: 32px; min-height: 32px; border-radius: 8px; background: transparent; border-color: transparent; opacity: .8; }
.step-heading .check-action:hover,.step-heading .check-action:focus-visible { background: #e8f7fc; opacity: 1; }
.step-heading .check-action .icon { width: 15px; height: 15px; }
.step-fill { position: absolute; z-index: -1; inset: 0 auto 0 0; background: linear-gradient(105deg,#dbefff,#d8f8ed); transition: width .4s ease; }
.step-controls { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 2px 8px 5px; }
.step-status-slider { position: relative; flex: 0 1 180px; width: 180px; min-width: 148px; height: 48px; border-radius: 12px; }
.step-slider-track { position: absolute; left: 13px; right: 13px; top: 18px; height: 8px; border: 1px solid #c5e6ed; border-radius: 8px; background: #e3f1f5; box-sizing: border-box; pointer-events: none; }
.step-slider-progress { display: block; width: calc(var(--step-position,0) * 50%); height: 100%; border-radius: inherit; background: linear-gradient(90deg,#2a9cfa,#43d6af); transition: width .18s ease; }
.step-state-range { -webkit-appearance: none; appearance: none; display: block; position: relative; z-index: 1; width: 100%; height: 44px; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: pointer; touch-action: pan-y; }
.step-state-range::-webkit-slider-runnable-track { height: 8px; border: 0; border-radius: 8px; background: transparent; }
.step-state-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: -9px; border: 1px solid #aad9e5; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px #17677d30,0 0 0 3px #d9f8f470; transition: box-shadow .15s ease; }
.step-state-range::-moz-range-track { height: 8px; border: 0; border-radius: 8px; background: transparent; }
.step-state-range::-moz-range-progress { background: transparent; }
.step-state-range::-moz-range-thumb { width: 24px; height: 24px; border: 1px solid #aad9e5; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px #17677d30,0 0 0 3px #d9f8f470; }
.step-state-range:focus-visible { outline: 2px solid #35b7d4; outline-offset: 2px; }
.step-state-range:active::-webkit-slider-thumb { box-shadow: 0 2px 6px #17677d35,0 0 0 5px #8dded54a; }
.step-state-range:active::-moz-range-thumb { box-shadow: 0 2px 6px #17677d35,0 0 0 5px #8dded54a; }
.step-slider-label { position: absolute; top: 35px; left: 0; right: 0; pointer-events: none; text-align: center; font-size: 11px; line-height: 12px; font-weight: 750; color: #137d9b; white-space: nowrap; }
.step-status-slider[data-slider-state="done"] .step-slider-label { color: #138166; }
.step-status-slider:has(.step-state-range:disabled) { opacity: .65; }
.step-state-range:disabled { cursor: default; }
.step-media-row { display: flex; align-items: center; gap: 6px; min-width: 0; margin-left: auto; }
.step-stack { display: inline-flex; align-items: center; min-height: 38px; min-width: 38px; padding: 3px; background: transparent; border-radius: 10px; position: relative; }
.step-stack:hover,.step-stack:focus-visible { background: #e9f8ff; }
.step-avatar,.step-photo { display: inline-grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; box-sizing: border-box; overflow: hidden; background: linear-gradient(135deg,#d9eeff,#d8f7ed); color: #157298; border: 2px solid white; font-size: 13px; font-weight: 700; box-shadow: 0 1px 4px #19779528; }
.step-avatar { border-radius: 50%; }
.step-avatar.unassigned { border: 1.5px dashed #77bcce; font-size: 18px; }
.step-avatar img,.step-photo img { width: 100%; height: 100%; object-fit: cover; }
.step-photo { border-radius: 8px; }
.step-stack .step-avatar + .step-avatar,.step-stack .step-photo + .step-photo { margin-left: -12px; }
.step-stack-count { display: grid; place-items: center; min-width: 25px; height: 25px; margin-left: -10px; border: 2px solid white; border-radius: 50%; background: #d5f5ed; color: #146c86; font-size: 10px; font-weight: 750; z-index: 1; }
.step-add-image { display: grid; place-items: center; width: 38px; min-height: 38px; padding: 7px; color: #1485a4; background: #ecf9fd; border-radius: 10px; }
.step-add-file { position: relative; display: grid; place-items: center; width: 38px; min-height: 38px; padding: 7px; color: #1485a4; background: #ecf9fd; border-radius: 10px; }
.step-file-count { position: absolute; top: -2px; right: -3px; display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 3px; border: 2px solid #fff; border-radius: 12px; background: #d3f6eb; color: #157b68; font-size: 10px; font-weight: 750; box-sizing: content-box; }
.step-file-browser-dialog { width: min(720px,calc(100vw - 24px)); max-height: 88dvh; margin: auto; padding: 18px; box-sizing: border-box; overflow-y: auto; border: 1px solid #c9e4ee; border-radius: 22px; background: #f7fcff; }
.step-file-step { margin: 0 0 14px; color: var(--ink); font-size: 14px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.step-file-toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.step-file-selection-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.step-file-toolbar button,.step-file-actions button { min-height: 44px; padding: 9px 12px; border: 1px solid #c5e2ed; border-radius: 11px; background: #e8f6fc; color: #167b99; font-weight: 700; font-size: 12px; }
.step-file-actions .step-file-add { display: grid; place-items: center; flex: 0 0 44px; width: 44px; min-height: 44px; padding: 9px; margin-left: auto; }
#step-files-selected-count { color: #527b8d; font-size: 12px; }
.step-file-status { margin: 9px 0; color: #426f82; font-size: 13px; line-height: 1.5; }
.step-file-status[data-error] { color: #a04734; }
.step-file-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(120px,1fr)); gap: 10px; }
.step-file-tile { display: grid; align-content: start; min-width: 0; padding: 8px; border: 1px solid #cfe5ee; border-radius: 14px; background: #fff; color: var(--ink); }
.step-file-tile[data-file-selected="true"] { border-color: #3db8d0; background: linear-gradient(125deg,#e4f4ff,#e2faef); box-shadow: 0 0 0 2px #2ab6d517; }
.step-file-pick { position: relative; display: grid; align-content: start; gap: 7px; width: 100%; min-width: 0; padding: 2px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.step-file-pick:focus-visible { outline: 2px solid #2badd5; outline-offset: 3px; }
.step-file-pick[data-file-holding]::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 3px; border-radius: 8px; background: linear-gradient(90deg,#269aff,#44dcb0); animation: step-file-hold 1s linear forwards; }
@keyframes step-file-hold { to { width: 100%; } }
.step-file-tile-actions { display: flex; gap: 6px; margin-top: 8px; }
.step-file-tile-actions button { display: flex; justify-content: center; align-items: center; gap: 4px; flex: 1; min-width: 0; min-height: 40px; padding: 6px 4px; border: 1px solid #c6e5ef; border-radius: 8px; color: #147fa0; background: #eaf7fc; font-size: 12px; font-weight: 700; }
.step-file-tile-actions .icon { width: 14px; height: 14px; }
.step-file-tile-actions button:disabled { color: #78919e; background: #f0f5f7; }
.step-file-thumbnail { display: grid; place-items: center; width: 100%; aspect-ratio: 1.3; border-radius: 9px; background: #edf7fc; overflow: hidden; color: #2c8dac; }
.step-file-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.step-file-thumbnail .icon { width: 35px; height: 35px; }
.step-file-thumbnail.file-word { color: #327bb8; background: #eaf3fc; }
.step-file-thumbnail.file-sheet { color: #249274; background: #e9f8f0; }
.step-file-thumbnail.file-pdf { color: #af5a4f; background: #fff0ec; }
.step-file-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 12px; font-weight: 700; line-height: 1.45; }
.step-file-meta { font-size: 10px; line-height: 1.4; color: #638091; }
.step-file-actions { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 7px; margin: 15px -18px -18px; padding: 12px 18px; border-top: 1px solid #cfe5ee; background: #f7fcff; box-shadow: 0 -5px 14px #164c6510; }
.step-file-actions button { display: flex; align-items: center; justify-content: center; gap: 6px; flex: 1; }
.step-file-actions .step-file-remove { color: #a24833; border-color: #eccdbf; background: #fff0e9; }
.step-file-actions button:disabled { color: #78919e; background: #f0f5f7; border-color: #d9e7ed; }
.step-file-empty { grid-column: 1 / -1; padding: 18px; margin: 0; border: 1px dashed #cbe2eb; border-radius: 13px; text-align: center; color: #5d7f8f; font-size: 13px; }
.step-file-preview { margin-top: 16px; border: 1px solid #c8e3ec; border-radius: 14px; overflow: hidden; background: #fff; }
.step-file-preview-heading { display: flex; align-items: center; gap: 9px; padding: 10px 12px; background: #eaf6fb; }
.step-file-preview-heading strong { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.step-file-preview-heading button { width: 40px; height: 40px; border: 0; border-radius: 50%; color: #247993; background: #fff; font-size: 23px; }
#step-file-preview-content { padding: 12px; max-height: 65dvh; overflow: auto; }
#step-file-preview-content img,#step-file-preview-content video { display: block; max-width: 100%; max-height: 60dvh; margin: auto; object-fit: contain; }
#step-file-preview-content iframe { display: block; width: 100%; min-height: 55dvh; border: 0; }
#step-file-preview-content table { border-collapse: collapse; font-size: 12px; }
#step-file-preview-content td,#step-file-preview-content th { padding: 7px; border: 1px solid #d6e5ec; white-space: pre-wrap; overflow-wrap: anywhere; }
.file-preview-document { color: var(--ink); font-size: 14px; line-height: 1.75; overflow-x: auto; }
.file-preview-document p { margin: 0 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.file-preview-document h1,.file-preview-document h2,.file-preview-document h3 { line-height: 1.4; margin: 16px 0 10px; }
.file-preview-document table { border-collapse: collapse; max-width: none; margin: 12px 0; }
.file-preview-document td,.file-preview-document th { border: 1px solid #d3e5ed; padding: 8px 10px; min-width: 70px; text-align: left; font-size: 12px; }
.file-preview-image { display: block; max-width: 100%; max-height: 65vh; object-fit: contain; margin: auto; }
.file-preview-pdf { width: 100%; height: 55vh; border: 0; }
.file-preview-text { margin: 0; white-space: pre-wrap; overflow: auto; overflow-wrap: anywhere; font-size: 13px; line-height: 1.65; color: var(--ink); }
.file-preview-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.file-preview-tabs button { min-height: 44px; padding: 9px 12px; border: 1px solid #c7e2ed; border-radius: 10px; color: #247e9b; background: #edf7fc; font-size: 12px; font-weight: 700; }
.file-preview-tabs button[aria-pressed="true"] { border-color: #54bdd1; background: linear-gradient(120deg,#def2ff,#dff9ed); }
.file-preview-slide { margin-bottom: 12px; padding: 16px; border: 1px solid #d7e8ef; border-radius: 12px; background: #fff; }
.file-preview-note { margin: 10px 0; color: #5e7e90; font-size: 12px; line-height: 1.55; }
.step-details-dialog { width: min(640px,calc(100vw - 24px)); max-height: 88dvh; padding: 16px; border: 1px solid #d2e9f2; border-radius: 22px; background: #f8fcff; color: #204c61; overflow-y: auto; }
.step-details-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.step-details-heading h3 { flex: 1; margin: 0; font-size: 17px; }
.step-dialog-close { min-width: 44px; min-height: 44px; border-radius: 50%; background: #e7f5fc; color: #247993; font-size: 25px; }
.step-people-menu { display: grid; gap: 7px; }
.step-people-menu > button { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 12px; text-align: left; border: 1px solid #d4e9f2; border-radius: 13px; background: white; color: #285a70; font-weight: 600; }
.step-people-menu > button[aria-pressed="true"] { background: linear-gradient(115deg,#dcefff,#d7f7eb); border-color: #52bbd3; box-shadow: 0 0 0 2px #6bdad71a; }
.step-dialog-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.step-dialog-actions button { flex: 1; min-height: 46px; border-radius: 12px; padding: 8px 12px; background: #e5f5fc; color: #1d6c86; font-weight: 650; }
.step-dialog-actions .primary-button { background: linear-gradient(110deg,#2997ff,#45d9b2); color: white; }
.step-dialog-error { color: #ac4938; font-size: 13px; }
.step-dialog-error:empty { display: none; }
.step-gallery-grid { display: grid; grid-template-columns: repeat(var(--gallery-columns),minmax(0,1fr)); gap: 9px; }
.step-gallery-grid figure { position: relative; margin: 0; min-width: 0; }
.step-gallery-grid figure > button:first-child { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 1px solid #cde5ee; border-radius: 13px; overflow: hidden; background: #eaf8fc; }
.step-gallery-grid img { width: 100%; height: 100%; object-fit: cover; }
.step-gallery-grid[data-count="3"] figure:first-child { grid-row: span 2; }
.step-gallery-grid[data-count="3"] figure:first-child > button:first-child { aspect-ratio: auto; height: calc(100% - 25px); }
.step-gallery-grid figcaption { padding: 6px 0; color: #588294; font-size: 11px; }
.step-gallery-remove { position: absolute; top: 4px; right: 4px; width: 44px; min-height: 44px; border-radius: 12px; font-size: 22px; background: #ffffffe8; color: #9e5141; }
.step-photo-view { display: grid; gap: 8px; }
.step-photo-view img { width: 100%; max-height: 60dvh; object-fit: contain; border-radius: 13px; background: #edf7fa; }
.step-photo-view strong { overflow-wrap: anywhere; font-size: 13px; }
.step-photo-view time { font-size: 12px; color: #588294; }
@media(max-width:480px){.step-status-slider{flex-basis:160px;width:160px;min-width:148px}.step-media-row{gap:5px}.step-controls{gap:4px}.step-details-dialog{padding:12px}.step-gallery-grid{gap:6px}.step-gallery-grid figcaption{font-size:10px}}
@media(pointer:coarse){.step-heading .check-action{width:40px;min-height:40px}.step-stack,.step-add-image,.step-add-file{min-width:44px;min-height:44px}.step-stack{padding:6px}}
@media(prefers-reduced-motion:reduce){.step-fill,.step-slider-progress{transition:none}.step-state-range::-webkit-slider-thumb{transition:none}}
.sync-review-button { position: fixed; z-index: 1100; bottom: calc(88px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); min-height: 44px; max-width: calc(100vw - 24px); padding: 10px 18px; border: 1px solid #53bed0; border-radius: 16px; background: #dcf5fa; color: #126b89; box-shadow: 0 4px 18px #1b7d9e30; font-weight: 700; }
.sync-review-dialog { padding: 18px; max-height: 88dvh; overflow-y: auto; }
.sync-review-dialog h3 { margin-top: 0; overflow-wrap: anywhere; }
.sync-review-dialog p { font-size: 13px; color: var(--muted); }
.sync-review-dialog fieldset { display: grid; gap: 6px; padding: 10px; margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.sync-review-dialog fieldset button { display: grid; gap: 5px; text-align: left; padding: 12px; min-height: 48px; border: 1px solid #cfe5ed; border-radius: 10px; background: white; color: var(--ink); overflow-wrap: anywhere; }
.sync-review-dialog fieldset button[aria-pressed="true"] { background: linear-gradient(110deg,#d4edff,#d4f7ec); border-color: #42b8d0; }
.sync-review-dialog fieldset span { white-space: pre-wrap; font-size: 13px; max-height: 160px; overflow-y: auto; }
