@font-face { font-family: Check Sans; src: url('./fonts/Roboto.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Check Mono; src: url('./fonts/RobotoMono.ttf') format('truetype'); font-weight: 100 700; font-display: swap; }
:root {
  color-scheme: light; font-family: 'Check Sans', sans-serif; font-size: 16px;
  color: #131517; background: #272e30;
  --ink: #131517; --charcoal: #272e30; --grey: #4e5256; --silver: #bec8ce;
  --paper: #f5f5f5; --aqua: #95d3d2; --cyan: #00a0bc; --teal: #017273;
  --magenta: #e72987; --coral: #d84655;
}
* { box-sizing: border-box; }
body { margin: 0; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; }
button { border: 1px solid transparent; border-radius: 9px; min-height: 44px; padding: 0 13px; font-family: 'Check Mono', monospace; font-size: 12px; font-weight: 700; text-transform: uppercase; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
button:disabled, input:disabled { opacity: .43; cursor: default; }
.app-shell { height: 100dvh; max-width: 740px; margin: auto; padding-top: env(safe-area-inset-top); display: flex; flex-direction: column; background: var(--charcoal); }
.app-header { flex: 0 0 auto; display: flex; align-items: center; gap: 11px; padding: 5px 16px 13px; background: var(--charcoal); }
.app-icon { width: 46px; height: 46px; flex-shrink: 0; }
.brand { flex: 1; min-width: 0; }
.brand-title { color: var(--paper); font-size: 22px; font-weight: 700; line-height: 1.15; margin: 0 0 5px; }
.brand-strap { font-family: 'Check Mono', monospace; font-size: 10px; font-weight: 700; line-height: 1.35; color: var(--aqua); margin: 0; letter-spacing: .04em; }
.header-button { color: var(--paper); background: #3b3f42; border-color: var(--grey); font-size: 10px; padding: 0 10px; flex: 0 0 auto; }
nav { flex: 0 0 auto; display: flex; gap: 6px; padding: 10px 12px; background: var(--paper); }
nav button { flex: 1; min-width: 0; background: var(--charcoal); color: var(--silver); padding: 0 5px; }
nav button[aria-current] { color: var(--paper); background: var(--teal); }
main { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); padding: 13px 14px 12px; }
h1 { font-size: 21px; font-weight: 700; line-height: 1.2; margin: 0; }
.progress { font-family: 'Check Mono', monospace; font-size: 10px; line-height: 1.5; color: var(--grey); text-transform: uppercase; margin: 3px 0 11px; letter-spacing: .04em; min-height: 15px; }
.list { display: grid; gap: 10px; }
.task, .history-card { border: 1px solid var(--silver); border-radius: 12px; padding: 13px; background: white; }
.task.tracking { border: 2px solid var(--cyan); padding: 12px; background: #e7f6f3; }
.card-heading { display: flex; align-items: center; gap: 7px; }
.task-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 16px; line-height: 1.4; font-weight: 400; margin: 0; }
.task.completed .task-name, .history-card.done .task-name { text-decoration: line-through; color: var(--grey); }
.reorder-button { background: white; border-color: var(--aqua); color: var(--teal); width: 88px; padding: 0; font-size: 16px; }
.task-meta, .task-status, .history-detail { font-family: 'Check Mono', monospace; font-size: 10px; line-height: 1.5; letter-spacing: .04em; margin: 4px 0 0; overflow-wrap: anywhere; }
.task-meta { color: var(--magenta); font-weight: 700; text-transform: uppercase; }
.task-status { font-size: 11px; color: var(--grey); font-weight: 700; margin-top: 7px; }
.tracking .task-status, .tracking .occurrence-status { color: var(--magenta); }
.completed .task-status, .completed .occurrence-status { color: var(--teal); }
.finished, .subtask { display: flex; align-items: center; gap: 10px; margin: 0; min-height: 44px; font-weight: 400; font-size: 16px; line-height: 1.4; }
.finished input, .subtask input { appearance: none; flex: 0 0 20px; padding: 0; width: 20px; height: 20px; min-height: 0; border: 2px solid var(--silver); border-radius: 2px; background: white; position: relative; }
.finished input:checked, .subtask input:checked { background: var(--cyan); border-color: var(--cyan); }
.finished input:checked::after, .subtask input:checked::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.occurrence-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin-top: 6px; border: 1px solid var(--aqua); border-radius: 9px; background: #95d3d229; }
.tracking .occurrence-row { border: 2px solid var(--cyan); padding: 5px 7px; }
.occurrence-check { flex: 1; min-width: 0; gap: 7px; cursor: pointer; }
.occurrence-text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }
.occurrence-time { font-family: 'Check Mono', monospace; font-size: 13px; font-weight: 700; }
.occurrence-status { display: block; color: var(--grey); font-family: 'Check Mono', monospace; font-size: 10px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.occurrence-row .timer-button { flex: 0 0 88px; padding: 0 8px; font-size: 10px; }
.subtask { margin-left: 24px; font-size: 14px; }
.subtask:has(input:checked) span { color: var(--grey); text-decoration: line-through; }
.card-actions { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 7px; }
.card-actions button { flex: 1; min-width: 68px; font-size: 10px; padding: 0 8px; }
.timer-button { background: var(--cyan); color: var(--paper); }
.timer-button.running { background: var(--magenta); }
.edit-button, .quiet { color: var(--teal); background: white; border-color: var(--aqua); }
.delete, .delete-button { color: var(--coral); background: white; border-color: var(--silver); }
.schedule-time { font-family: 'Check Mono', monospace; font-size: 12px; font-weight: 700; margin: 7px 0 0; }
.schedule-badge, .history-badge { font-family: 'Check Mono', monospace; font-size: 9px; font-weight: 700; padding: 4px 7px; border: 1px solid var(--aqua); border-radius: 7px; color: var(--magenta); white-space: nowrap; }
.schedule .task-name, .history-card .task-name { font-weight: 700; }
.history-day { color: var(--magenta); font-family: 'Check Mono', monospace; font-size: 11px; font-weight: 700; margin: 10px 0 -3px; }
.history-day:first-child { margin-top: 0; }
.history-badge { color: var(--teal); border-color: var(--teal); background: #01727312; }
.history-card.done { border-color: var(--aqua); }
.history-detail { color: var(--teal); margin-top: 6px; }
.empty { text-align: center; padding: 24px 19px; border: 1px solid var(--silver); border-radius: 12px; background: white; color: var(--grey); font-size: 15px; line-height: 1.5; margin: 0; }
footer { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); flex: 0 0 auto; display: flex; gap: 10px; }
footer .primary { flex: 1; }
#feedback-open { flex: 0 0 auto; min-width: 110px; }
.primary { width: 100%; color: var(--paper); background: var(--teal); border-color: var(--teal); }
#notice { font-family: 'Check Mono', monospace; color: var(--teal); font-size: 11px; margin: 10px 0 0; line-height: 1.5; }
#notice:empty { display: none; }
#error, #form-error { color: var(--coral); border: 1px solid var(--coral); padding: 12px; border-radius: 9px; line-height: 1.5; font-size: 14px; }
dialog { color: var(--ink); background: var(--paper); border: 1px solid var(--silver); border-radius: 14px; padding: 18px; width: calc(100% - 32px); max-width: 520px; max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px); overflow: auto; overscroll-behavior: contain; }
dialog::backdrop { background: #13151780; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
h2 { font-size: 20px; margin: 0; }
dialog label, legend { display: block; font-family: 'Check Mono', monospace; font-size: 11px; font-weight: 700; color: var(--grey); text-transform: uppercase; margin: 16px 0 6px; }
input, select, textarea { min-width: 0; width: 100%; min-height: 46px; color: var(--ink); background: white; border: 1px solid var(--silver); border-radius: 8px; padding: 10px 12px; font-size: 16px; }
textarea { resize: vertical; font-family: 'Check Sans', sans-serif; }
select { font-size: 14px; font-weight: 700; background: #edf7f6; border-color: var(--teal); appearance: auto; }
.optional { font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0; }
fieldset legend { padding: 0; }
.days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.days label { position: relative; margin: 0; }
.days input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
.days span { min-height: 44px; display: grid; place-items: center; border: 1px solid var(--aqua); color: var(--teal); background: white; border-radius: 9px; font-size: 12px; }
.days input:checked + span { color: var(--paper); background: var(--teal); border-color: var(--teal); }
.days input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 3px; }
.time-row, .minutes-row { display: flex; gap: 8px; align-items: center; }
.minutes-row input { text-align: center; }
.minutes-row button { flex: 0 0 52px; font-size: 20px; }
form > .primary { margin-top: 24px; }
form > .delete { margin-top: 10px; width: 100%; }
.option { display: block; width: 100%; color: var(--teal); background: white; border-color: var(--aqua); margin: 10px 0; text-align: left; }
.help { font-size: 12px; line-height: 1.6; color: var(--grey); }
.reorder-row { display: flex; gap: 7px; align-items: center; margin: 8px 0; }
.reorder-row span { flex: 1; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
@media (max-width: 370px) { .brand-strap { font-size: 9px; } .app-header { padding-left: 12px; padding-right: 12px; gap: 8px; } .app-icon { width: 40px; height: 40px; } .header-button { padding: 0 7px; } }
@media (prefers-reduced-motion: no-preference) { button { transition: background-color .12s; } }

#confirmation { max-width: 380px; }
#confirmation-message { margin: 12px 0 0; line-height: 1.5; overflow-wrap: anywhere; }
.confirmation-actions { display: flex; gap: 9px; margin-top: 20px; }
.confirmation-actions button { flex: 1; }
.confirm-action { color: var(--paper); background: var(--coral); border-color: var(--coral); }

#support-details { font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 280px; overflow: auto; }
#feedback .feedback-label { font-family: 'Check Sans', sans-serif; text-transform: none; font-size: 17px; color: var(--ink); }
#feedback-message { font-size: 18px; line-height: 1.5; }
#feedback-send { min-height: 52px; font-size: 16px; }
#feedback-status { font-size: 17px; line-height: 1.5; color: var(--teal); margin-bottom: 0; }
#feedback-status.is-sent { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border: 2px solid var(--teal); border-radius: 10px; background: var(--aqua); font-size: 22px; font-weight: 700; transform-origin: left center; }
#feedback-status.is-sent::before { content: ''; width: 8px; height: 15px; border: solid var(--teal); border-width: 0 3px 3px 0; transform: translateY(-3px) rotate(45deg); }
@media (prefers-reduced-motion: no-preference) {
  #feedback-status.is-sent { animation: feedback-sent .7s ease-out; }
  @keyframes feedback-sent { 0% { opacity: .4; transform: scale(.95); } 45% { opacity: 1; transform: scale(1.025); } 100% { transform: scale(1); } }
}
#support summary { color: var(--teal); cursor: pointer; padding: 12px 0; }
#reminders > p { font-size: 17px; line-height: 1.5; }
#reminder-status { color: var(--teal); font-weight: 700; }
#reminders .help { font-size: 14px; }
