/* Hour comparison: quiet role navigation, photographic work, one clear action. */
:root {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #243c33;
    background: #f7f8f5;
    font-size: 16px;
    line-height: 1.5;
    --ink: #243c33;
    --green: #244e40;
    --muted: #606e66;
    --border: #d7ded6;
    --surface: #fff;
    --soft: #edf1eb;
    --danger: #9a3d23;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button {
    cursor: pointer;
    min-height: 46px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: inherit;
    border-radius: 8px;
    padding: 10px 15px;
    font-weight: 600;
    touch-action: manipulation;
}
button:hover { background: var(--soft); }
button:disabled { opacity: .6; cursor: wait; }
:where(button, input, select, textarea, summary):focus-visible {
    outline: 3px solid #276c56;
    outline-offset: 3px;
}
.primary { background: var(--green); color: white; border-color: var(--green); }
.primary:hover { background: #173c30; }
.ghost { background: transparent; border-color: transparent; font-weight: 500; }
.quiet { color: var(--muted); font-size: 13px; }
#app { max-width: 1680px; margin: auto; padding: 0 32px 56px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; border-bottom: 1px solid var(--border); }
.brand { font-size: 19px; font-weight: 750; letter-spacing: -.5px; }
.brand span { display: inline-block; font-weight: 450; font-size: 14px; color: var(--muted); margin-left: 18px; padding-left: 18px; border-left: 1px solid #b9c5b9; letter-spacing: 0; }
.workspace-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 36px; }
.workspace, .role-sidebar { min-width: 0; }
.role-sidebar { padding: 28px 20px 0 0; border-right: 1px solid var(--border); }
.role-heading { display: flex; justify-content: space-between; align-items: center; margin: 0 0 14px; }
.role-heading h2 { margin: 0; font-size: 13px; font-weight: 650; }
.all-boards { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; text-align: left; }
.all-boards span { font-size: 12px; font-weight: 500; white-space: nowrap; }
.all-boards.selected { color: #fff; background: var(--green); border-color: var(--green); }
.board-grid { display: grid; gap: 6px; margin: 12px 0; }
.board-tile { display: flex; flex-direction: column; gap: 7px; padding: 13px 12px; text-align: left; background: transparent; border-color: transparent; min-width: 0; }
.board-tile:hover { background: var(--soft); }
.board-tile.selected { background: #e6ede3; border-color: #98b29d; }
.board-tile strong { font-size: 14px; max-width: 100%; overflow-wrap: anywhere; }
.counts { display: flex; gap: 12px; color: var(--muted); font-size: 11px; font-weight: 400; font-variant-numeric: tabular-nums; }
.counts b { color: var(--ink); font-size: 14px; font-weight: 650; }
.board-tile .quiet { font-size: 12px; }
.overdue { color: var(--danger); }
.owner-tools { display: flex; flex-direction: column; align-items: stretch; padding-top: 12px; border-top: 1px solid var(--border); }
.owner-tools button { text-align: left; font-size: 13px; }
.recent { color: var(--muted); font-size: 12px; line-height: 1.9; margin: 18px 12px; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 30px 0 22px; }
.page-title > div { min-width: 0; }
.eyebrow { font-size: 10px; letter-spacing: 1.6px; color: var(--muted); font-weight: 650; margin: 0 0 10px; }
h1 { font-size: clamp(28px, 3vw, 38px); line-height: 1.16; letter-spacing: -1.2px; font-weight: 650; margin: 0; overflow-wrap: anywhere; }
h2 { font-size: 18px; font-weight: 650; }
.page-subtitle { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
#new-task { flex-shrink: 0; padding: 12px 20px; }
.board-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 22px 0 20px; flex-wrap: wrap; }
.board-heading > .quiet { order: 2; }
.board-heading h2 { font-size: 15px; margin: 0; }
.task-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
#overdue-filter { font-size: 12px; border: 1px solid var(--border); padding: 8px 12px; }
#overdue-filter span { margin-left: 10px; font-variant-numeric: tabular-nums; }
#overdue-filter[aria-pressed=true] { color: var(--danger); background: #fcefe7; border-color: #c99987; }
.filter-empty { font-size: 14px; color: var(--muted); margin: 0; }
#clear-filter { text-decoration: underline; font-size: 14px; }
.columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.column { min-width: 0; }
.column > h2 { font-size: 11px; letter-spacing: 1.2px; display: flex; align-items: center; gap: 9px; margin: 0 0 16px; padding-top: 12px; border-top: 2px solid #c8d1c5; }
.column > h2 span { margin-left: auto; letter-spacing: 0; border-radius: 4px; background: #e9eee6; padding: 1px 7px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #859182; }
.dot.doing { background: #8c6b24; }
.dot.done { background: #39705a; }
.task { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 18px; box-shadow: 0 2px 3px #243c3304; }
.photo { display: block; padding: 0; border: 0; border-radius: 0; width: 100%; height: 185px; background: #e3e8dc; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; color: var(--muted); font-size: 14px; }
.photo:focus-visible { outline-offset: -4px; }
.card-body { padding: 16px; }
.task-role { font-size: 11px; font-weight: 650; color: var(--muted); margin: 0 0 5px; letter-spacing: .3px; overflow-wrap: anywhere; }
.card-title { display: block; border: 0; padding: 3px 0; min-height: 44px; width: 100%; font-size: 19px; line-height: 1.25; letter-spacing: -.35px; text-align: left; overflow-wrap: anywhere; }
.card-title:hover { background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.description { font-size: 14px; color: var(--muted); margin: 6px 0 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.deadline { display: inline-block; font-size: 13px; color: #4f6154; background: var(--soft); border-radius: 4px; padding: 5px 8px; font-variant-numeric: tabular-nums; }
.deadline.late { color: var(--danger); background: #fcefe7; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.actions button { font-size: 13px; padding: 10px 12px; }
.actions .primary { flex: 1; }
.empty { color: var(--muted); background: #f0f3ed; text-align: center; padding: 32px 12px; border-radius: 8px; font-size: 14px; }
.tabs { display: none; }
.worker .workspace-layout { display: block; }
.worker .workspace { max-width: 1160px; margin: auto; }
.worker .board-heading { margin: 0 0 20px; }
.worker .photo { height: 240px; }
.loading, .welcome { padding: 72px 0; }
.loading { color: var(--muted); }
.welcome { max-width: 600px; }
.welcome h1 { margin-top: 26px; }
.welcome p { color: var(--muted); }
dialog { border: 1px solid var(--border); border-radius: 16px; padding: 28px; width: calc(100% - 32px); max-width: 600px; max-height: 90dvh; color: inherit; background: #fff; box-shadow: 0 24px 80px #16291e30; }
dialog::backdrop { background: #1a2c256b; }
dialog h2 { margin: 0 44px 24px 0; font-size: 24px; letter-spacing: -.6px; }
.close { float: right; font-size: 26px; padding: 0; width: 44px; margin: -10px -10px 6px 12px; }
.full-photo { width: 100%; max-height: 60dvh; object-fit: contain; border-radius: 8px; margin-bottom: 18px; }
.full-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.form-grid { display: grid; gap: 18px; clear: both; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 650; min-width: 0; }
input, textarea, select { min-width: 0; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #abb9ac; border-radius: 7px; background: white; color: inherit; font-size: 16px; }
input[type=file] { border-style: dashed; font-size: 13px; padding: 10px; }
input[type=file]::file-selector-button { background: #edf1eb; border: 0; border-radius: 4px; padding: 7px 10px; margin-right: 10px; color: var(--ink); font: inherit; }
textarea { min-height: 90px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-photo { width: 100%; max-height: 220px; object-fit: contain; border-radius: 8px; background: var(--soft); }
.form-hint { font-size: 12px; font-weight: 400; color: var(--muted); }
.optional-description summary { min-height: 44px; padding: 10px 0; cursor: pointer; font-size: 14px; color: var(--muted); }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.form-actions .primary { flex: 1; }
.danger, .form-error { color: var(--danger); }
.form-error { font-size: 14px; }
.selected-photo, .conflict-review { overflow-wrap: anywhere; }
.selected-photo p:empty, .form-error:empty { display: none; }
.selected-photo p { margin: 4px 0 0; }
.share-link { overflow-wrap: anywhere; font-size: 13px; background: var(--soft); padding: 15px; border-radius: 8px; }
.conflict-review { padding: 16px; background: #fcf0e8; border: 1px solid #cfaa97; border-radius: 8px; font-size: 14px; }
.conflict-review h3 { margin: 0 0 8px; font-size: 16px; }
.conflict-review dt { text-transform: capitalize; font-weight: 650; }
.conflict-review dd { margin: 0 0 8px; white-space: pre-wrap; }
.conflict-review button { border: 1px solid #b18b78; width: 100%; background: white; }
.form-grid:has(.conflict-review) .form-actions { position: static; }
#notice { position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: #243c33; color: white; padding: 13px 22px; border-radius: 8px; box-shadow: 0 4px 24px #0002; max-width: calc(100% - 32px); width: max-content; opacity: 0; pointer-events: none; z-index: 5; font-size: 14px; }
#notice.show { opacity: 1; }
#notice.error { background: #8b3826; }
#connection:not([hidden]) { padding: 12px 24px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; color: #7b351f; background: #fcf0e8; font-size: 14px; }
#connection button { border-color: #b58f7f; font-size: 13px; }
@media (max-width: 1100px) and (min-width: 901px) {
    #app { padding-inline: 24px; }
    .workspace-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 22px; }
    .role-sidebar { padding-right: 14px; }
    .columns { gap: 12px; }
    .card-body { padding: 12px; }
    .photo { height: 150px; }
    .card-title { font-size: 17px; }
    .actions .primary { flex-basis: 100%; }
    .counts { gap: 7px; font-size: 10px; }
    .page-title { flex-wrap: wrap; }
}
@media (max-width: 900px) {
    #app { padding: 0 16px 40px; }
    header { height: 60px; }
    header > .quiet { display: none; }
    .brand { font-size: 17px; }
    .brand span { font-size: 13px; margin-left: 12px; padding-left: 12px; }
    .workspace-layout { display: flex; flex-direction: column; gap: 0; }
    .workspace { display: contents; }
    .page-title { order: 1; margin: 22px 0 18px; gap: 12px; align-items: center; }
    .eyebrow { font-size: 9px; margin-bottom: 7px; }
    h1 { font-size: 29px; letter-spacing: -.8px; }
    .page-subtitle { font-size: 13px; margin-top: 7px; }
    .owner .page-subtitle { display: none; }
    #new-task { font-size: 13px; padding: 10px 13px; }
    .role-sidebar { order: 2; padding: 0; border: 0; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; }
    .role-heading { display: none; }
    .all-boards { flex-direction: column; justify-content: center; align-items: flex-start; padding: 10px; font-size: 13px; }
    .board-grid { display: flex; overflow-x: auto; margin: 0; gap: 6px; padding: 3px; scrollbar-width: thin; }
    .board-tile { flex: 0 0 180px; padding: 9px 11px; border: 1px solid var(--border); gap: 4px; background: white; }
    .board-tile strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .counts { font-size: 10px; gap: 8px; }
    .counts b { font-size: 12px; }
    .board-tile .quiet { font-size: 11px; }
    .owner-tools { grid-column: 1 / -1; display: flex; flex-direction: row; gap: 4px; padding: 0; border: 0; flex-wrap: wrap; }
    .owner-tools button { font-size: 12px; padding: 8px 10px; }
    #sign-out { margin-left: auto; }
    .recent { grid-column: 1 / -1; margin: 0; font-size: 11px; line-height: 1.6; }
    .recent br { display: none; }
    .recent br::after { content: ' · '; }
    .board-heading { order: 3; margin: 20px 0 8px; }
    .board-heading h2 { font-size: 14px; }
    .task-filters { order: 4; margin: 0 0 12px; gap: 6px; }
    #overdue-filter { min-height: 44px; }
    .tabs { order: 5; display: flex; gap: 4px; background: #e8ede5; padding: 4px; margin: 0 0 16px; border-radius: 9px; position: sticky; top: 8px; z-index: 1; }
    .tabs button { flex: 1; min-width: 0; padding: 10px 3px; font-size: 12px; border: 0; background: transparent; border-radius: 6px; }
    .tabs button[aria-selected=true] { background: white; box-shadow: 0 1px 4px #243c3314; }
    .tabs span { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 5px; }
    .columns { order: 6; display: block; }
    .column { display: none; }
    .column.active { display: block; }
    .column > h2 { display: none; }
    .photo { height: 180px; }
    .card-body { padding: 16px; }
    .card-title { font-size: 20px; }
    .description { font-size: 15px; }
    .actions button { min-height: 48px; font-size: 14px; }
    .worker .page-title { margin-bottom: 16px; }
    .worker .board-heading { margin: 0 0 12px; }
    .worker .photo { height: 215px; }
    .worker .task { border-radius: 12px; }
    .worker .actions .primary { min-height: 52px; }
    .worker .workspace { display: block; }
    dialog { padding: 22px; border-radius: 13px; }
    dialog h2 { font-size: 23px; margin-bottom: 18px; }
    .form-grid { gap: 12px; }
    .field-row { grid-template-columns: 1fr; gap: 12px; }
    .form-photo { max-height: 130px; }
    .full-photo { max-height: 45dvh; }
    .form-actions { position: sticky; bottom: 0; background: white; padding-top: 8px; }
}
@media (max-width: 360px) {
    .page-title { flex-wrap: wrap; }
    .owner .page-title { gap: 10px; }
    h1 { font-size: 27px; }
    #new-task { padding-inline: 10px; }
    .role-sidebar { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; }
}
