.workflow { width: min(100% - 2 * var(--gutter), 1040px); margin: 0 auto; padding: clamp(22px, 4vw, 46px) 0 50px; }
.task-workflow { max-width: 540px; }
.workflow-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.workflow-heading h1 { margin: 0 0 6px; font-size: clamp(28px, 5vw, 43px); line-height: 1.18; letter-spacing: .025em; }
.workflow-heading p, .step p { margin: 0; color: var(--muted); line-height: 1.6; }
.status-tag { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 8px; border: 1px solid #655344; border-radius: 5px; background: #382e26; color: #f2e4d3; font-size: 13px; font-weight: 700; white-space: nowrap; }
.status-tag[data-state='approved'] { color: #b8f1da; background: #214d49; border-color: #4e9783; }
.status-tag[data-state='rejected'] { color: #ffbfd4; background: #5a2949; border-color: #995074; }
.status-tag[data-state='pending'] { color: #ffe099; background: #514041; border-color: #986d53; }
.notice { padding: 9px 12px; margin: 0 0 13px; border: 1px solid #594d40; border-radius: 5px; background: #302820; color: #edddc7; overflow-wrap: anywhere; line-height: 1.5; }
.notice.error { border-color: #9a5549; background: #472b25; color: #ffe0d6; }
.step { margin: 0 0 13px; padding: clamp(14px, 3vw, 24px); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.step h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 9px; font-size: clamp(18px, 2.4vw, 22px); line-height: 1.35; }
.copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.button-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step > .button-row { margin-top: 12px; }
.resource-list { color: var(--muted); line-height: 1.65; padding-left: 23px; }

.upload-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.upload-slot { min-width: 0; }
.upload-slot img, .review-preview img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 4px; background: var(--raised); }
.upload-slot img { aspect-ratio: 9 / 20; background: #efe2ce; }
.file-picker { position: relative; }
.file-input { width: 1px; height: 1px; position: absolute; top: 0; left: 0; padding: 0; clip-path: inset(50%); }
.remove-upload { width: 100%; margin-top: 5px; min-height: 32px; font-size: 13px; }

.stack-form { display: grid; gap: 11px; }
.stack-form .action { justify-self: start; }
.stack-form .step { margin-bottom: 0; }
.workflow label:not(.upload-picker, .check-row) { display: grid; gap: 5px; font-size: 14px; color: var(--muted); }
.workflow input:not([type='checkbox']):not([type='file']), .workflow select, .workflow textarea {
  min-width: 0; width: 100%; min-height: 37px; padding: 7px 9px; border: 1px solid #625341;
  border-radius: 5px; background: var(--bg); color: var(--text); line-height: 1.4;
}
.workflow textarea { resize: vertical; }
.auth-panel { max-width: 520px; }
.auth-panel p { margin-bottom: 12px; }
.admin-tabs { display: flex; flex-wrap: wrap; margin-bottom: 16px; gap: 7px; }
.admin-tabs [aria-pressed='true'] { color: var(--accent); border-color: #98794f; background: #382e25; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 10px; }
.section-heading h2 { margin: 0; }
.section-heading .button-row { flex-wrap: nowrap; }
.section-heading select { min-width: 86px; }
.section-heading button { white-space: nowrap; }
.entry-list { display: grid; gap: 7px; margin-top: 10px; }
.entry-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 7px; }
.entry-row button { min-height: 34px; font-size: 13px; }
.check-row { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.check-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.form-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; }
.keyword-list { max-height: 330px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 8px; scrollbar-gutter: stable; }
.submission-list { display: grid; gap: 8px; }
.submission { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.submission summary { padding: 10px; cursor: pointer; overflow-wrap: anywhere; }
.submission summary > span, .submission summary > strong { margin-inline-end: 8px; }
.submission-date { color: var(--muted); font-size: 13px; }
.submission-body { display: grid; gap: 8px; padding: 4px 10px 10px; }
.submission-body p { overflow-wrap: anywhere; }
.review-preview { display: block; min-width: 0; }
.review-form { display: grid; gap: 8px; }
.empty-state { padding: 14px 0; }
.report-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 13px 0; }
.report-table { overflow: auto; }
.report-table table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 14px; }
.report-table th, .report-table td { padding: 8px 7px; border-bottom: 1px solid var(--line); text-align: left; }
.report-table thead th { color: var(--muted); }

.task-page { --task-border: #494255; --task-surface: #282432; --task-muted: #ddd0d5; background: #191720; min-height: 100vh; }
.task-topbar { border-bottom: 1px solid #38313c; background: #211d28; }
.task-topbar-inner { width: min(100% - 2 * var(--gutter), 540px); min-height: 45px; display: flex; justify-content: space-between; align-items: center; margin-inline: auto; gap: 8px; }
.task-timer { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #e3d7d9; }
#task-clock { min-width: 5ch; color: var(--accent); font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; }
.task-page .workflow { padding-top: clamp(23px, 4vw, 35px); }
.task-page .workflow-heading { display: grid; place-items: center; justify-content: center; gap: 7px; text-align: center; margin-bottom: 20px; }
.task-page .workflow-heading h1 { color: #ffd18b; font-size: clamp(24px, 4vw, 30px); letter-spacing: .01em; }
.task-page .workflow-heading p { color: var(--task-muted); font-size: 14px; }
.task-phase { color: var(--task-muted); white-space: nowrap; font-size: 13px; }
.task-phase::before { display: inline-block; content: ''; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #c7a77b; vertical-align: 1px; }
.task-phase[data-state='approved']::before { background: #93d2a6; }
.task-phase[data-state='rejected']::before { background: #f8836f; }
.task-sheet { display: grid; gap: 12px; }
.task-step { --task-pad: clamp(13px, 3vw, 19px); position: relative; padding: var(--task-pad); border: 1px solid var(--task-border); border-radius: 13px; background: var(--task-surface); }
.task-step-number { position: absolute; top: var(--task-pad); left: var(--task-pad); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: #ffd18b; color: #462519; font-size: 14px; font-weight: 750; }
.task-step-body h2 { min-height: 24px; margin: 0 0 8px; padding-left: 33px; color: #fff7f4; font-size: clamp(16px, 2.4vw, 19px); line-height: 24px; }
.task-step-body p { margin: 0; color: var(--task-muted); font-size: 14px; line-height: 1.6; }
.task-step-body strong { color: #ffd49b; }
.task-step-body > .action, .task-step-body > .copy-row, .task-step-body > .button-row, .task-step-body > .upload-grid { margin-top: 11px; }
.task-step-body > .notice { margin: 8px 0 0; padding: 7px 9px; border-color: #5a4746; background: #35292d; color: #f2dfd6; }
.task-step-body > .notice.error { border-color: #854950; background: #442832; color: #ffdfdc; }
.task-step-body .step-status { margin-top: 7px; font-size: 14px; overflow-wrap: anywhere; }
.task-step-body .step-status:empty { display: none; }
.task-sheet .copy-row { padding: 7px; border: 1px solid #53455a; border-radius: 9px; background: #1f1b25; }
.task-sheet textarea { background: transparent; border-color: transparent; resize: vertical; font-size: 14px; }
.task-sheet .secondary { background: #352c3c; border-color: #5c4b5e; }
.task-sheet .secondary:hover { border-color: #ffd49b; }
.xhs-action { width: 100%; min-height: 51px; gap: 6px; background: #ba3b55; color: #fff5f8; }
.xhs-action:hover { background: #cb475f; }
#copy-text { gap: 4px; }
#comment-hint { margin-top: 4px; }
.upload-layout { display: grid; gap: 12px; margin-top: 13px; }
.upload-example { margin: 0; min-width: 0; }
.upload-example figcaption { margin-bottom: 7px; color: #ffd49b; font-size: 13px; font-weight: 700; text-align: center; }
.upload-example a { display: block; border-radius: 10px; }
.comment-example { display: block; width: 100%; height: auto; border-radius: inherit; background: #fff; }
.example-empty { display: grid; place-items: center; min-height: 96px; padding: 12px; border: 1px dashed var(--task-border); border-radius: 10px; color: var(--task-muted); font-size: 13px; }
.admin-example { margin-top: 13px; }
.admin-example img { display: block; max-width: 100%; max-height: 260px; border-radius: 6px; }
.upload-picker { display: grid; justify-items: center; gap: 6px; padding: 18px 8px; border: 1px dashed #896478; border-radius: 10px; background: #262132; color: #fff7f4; text-align: center; cursor: pointer; }
.upload-picker > strong { color: #fff7f4; }
.upload-picker span { color: var(--task-muted); font-size: 13px; }
.upload-picker .upload-cloud { font-size: 25px; line-height: 1.1; }
.upload-actions #submit-task { width: 100%; min-height: 48px; }
.feedback-entry { width: 100%; min-height: 44px; margin-top: 9px; }
.task-sheet .feedback-entry { color: #ffd18b; border-color: #98794f; }
.feedback-open .task-activity, .feedback-open .copy-toast { display: none; }
.feedback-sheet h1 { margin: 0 0 16px; color: #ffd18b; font-size: 22px; }
.feedback-sheet .stack-form { gap: 7px; }
.feedback-sheet label span { display: inline; color: #ffd18b; }
.feedback-sheet label[for] { display: block; margin-top: 5px; }
.feedback-sheet input, .feedback-sheet textarea { font-size: 16px; }
.feedback-sheet .action { width: 100%; min-height: 44px; margin-top: 6px; }
.feedback-count, .feedback-privacy { color: var(--task-muted); font-size: 13px; }
.feedback-count { text-align: right; }
.feedback-privacy { text-align: center; }
.feedback-sheet .notice { margin: 10px 0 0; }
.feedback-dialog { width: min(calc(100% - 30px), 360px); padding: 20px; border: 1px solid var(--task-border); border-radius: 13px; color: #fff7f4; background: var(--task-surface); text-align: center; }
.feedback-dialog::backdrop { background: #0e0b13b8; }
.feedback-dialog h2 { margin: 0; font-size: 18px; }
.feedback-dialog p { margin: 10px 0 16px; }
.feedback-dialog .button-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feedback-dialog button { min-height: 44px; padding-inline: 7px; }
.feedback-admin-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.task-step-body .upload-retention { display: flex; justify-content: center; flex-wrap: wrap; gap: 3px 13px; margin-top: 9px; font-size: 12px; }
.file-input:not(:disabled) + .upload-picker:hover { background: #493447; }
.file-input:focus-visible + .upload-picker { outline: 2px solid #ffd18b; outline-offset: 2px; }
.file-input:disabled + .upload-picker { opacity: .7; cursor: default; }
.copy-toast { position: fixed; z-index: 5; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: calc(100% - 24px); border: 1px solid #58a875; padding: 9px 17px; border-radius: 8px; background: #246b45; color: #f6fff8; font-size: 15px; font-weight: 750; box-shadow: 0 5px 20px #100d17a6; pointer-events: none; }
.copy-toast:empty { display: none; }
.task-activity { position: fixed; inset: auto max(12px, env(safe-area-inset-right)) max(15vh, calc(env(safe-area-inset-bottom) + 12px)) auto; z-index: 4; display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid #ebd2ce; border-radius: 12px; background: #fff8f3; color: #322530; box-shadow: 0 8px 28px #100d17a6; pointer-events: none; }
.task-activity > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #965878; color: #fff; font-size: 14px; font-weight: 700; }
.task-activity strong, .task-activity small { display: block; font-size: 12px; }
.task-activity small { color: #6d5563; }
@media (prefers-reduced-motion: no-preference) {
  .task-activity { animation: activity-in .2s ease-out; }
  @keyframes activity-in { from { opacity: 0; transform: translateX(10px); } }
}

@media (max-width: 420px) {
  .workflow-heading { align-items: start; gap: 8px; }
  .form-columns { grid-template-columns: minmax(0, 1fr); }
  .task-sheet .copy-row { gap: 4px; }
  .task-sheet .copy-row .action { padding-inline: 9px; }
  .entry-row { gap: 4px; }
  .entry-row button { padding-inline: 6px; }
  .report-table th, .report-table td { padding-inline: 4px; }
}
