:root {
  color: #171717;
  background: #fff;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f7f7f7; }
button, input, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }

.app-shell { min-height: 100dvh; max-width: 560px; margin: auto; background: #fff; padding: 26px 18px 96px; }
.topbar { display: flex; align-items: end; justify-content: space-between; margin: 0 2px 22px; }
.eyebrow { margin: 0 0 3px; color: #707070; font-size: 10px; font-weight: 700; letter-spacing: 1.1px; }
.eyebrow:empty { display: none; }
h1 { margin: 0; font-family: "Newsreader", serif; font-size: 35px; font-weight: 700; line-height: 1; letter-spacing: 0; }
.tab-content { min-height: calc(100dvh - 175px); }
.tabbar { position: fixed; z-index: 4; bottom: 0; left: 50%; display: grid; grid-template-columns: repeat(3, 1fr); width: min(100%, 560px); transform: translateX(-50%); padding: 9px 20px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid #e9e9e9; background: rgba(255,255,255,.96); backdrop-filter: blur(14px); }
.tab-button { display: grid; gap: 5px; place-items: center; border: 0; background: transparent; color: #929292; font-size: 11px; }
.tab-button i { font-size: 17px; }
.tab-button.active { color: #111; font-weight: 700; }

.feed { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; height: calc(100dvh - 175px); }
.feed-card { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; padding: 20px; border: 4px solid #181818; border-radius: 8px; background: #fff; }
.card-body { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.card-profile { margin: 0; color: #717171; font-size: 12px; font-weight: 600; }
.card-date { flex: 0 0 auto; color: #656565; font-size: 12px; }
.card-text { max-width: 92%; margin: 0; font-family: "Newsreader", serif; font-size: 26px; line-height: 1.1; }
.detail-list { display: grid; gap: 8px; margin: 24px 0 0; padding-left: 20px; overflow-y: auto; color: #3c3c3c; font-size: 14px; line-height: 1.35; }
.detail-list li::marker { color: #111; }
.feed-actions { display: grid; gap: 10px; margin-top: 14px; }
.detail-composer { display: flex; align-items: center; gap: 8px; padding: 6px 7px 6px 14px; border: 1px solid #cfcfcf; border-radius: 99px; background: #fff; }
.detail-composer input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; }
.detail-composer button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 50%; background: #171717; color: #fff; }
.task-action-section { padding: 7px; border: 1px solid #e0e0e0; border-radius: 7px; background: #f5f5f5; }
.feed-task-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.feed-task-controls button { display: grid; gap: 4px; min-height: 48px; place-content: center; border: 1px solid #d3d3d3; border-radius: 5px; background: #fff; color: #2b2b2b; font-size: 10px; line-height: 1; }
.feed-task-controls button i { font-size: 13px; }
.feed-task-controls .delete-task-button { color: #8b2424; }
.feed-task-controls .complete-task-button { border-color: #171717; background: #171717; color: #fff; }
.empty-state { display: grid; min-height: 250px; place-content: center; text-align: center; color: #707070; }
.empty-state i { margin-bottom: 13px; font-size: 25px; }
.empty-state p { margin: 0; font-family: "Newsreader", serif; font-size: 22px; color: #252525; }
.empty-state span { margin-top: 7px; font-size: 13px; }

.calendar-list { display: grid; gap: 26px; padding: 3px 2px 160px; }
.calendar-view { position: relative; }
.calendar-today { position: sticky; z-index: 2; top: 12px; display: block; width: max-content; margin: -60px 0 30px auto; padding: 7px 9px; border: 1px solid #d5d5d5; border-radius: 5px; background: #fff; color: #333; font-size: 12px; font-weight: 600; }
.calendar-day { display: grid; gap: 10px; }
.date-heading { display: flex; align-items: baseline; gap: 10px; }
.date-heading strong { font-family: "Newsreader", serif; font-size: 25px; }
.calendar-day.active .date-heading { width: fit-content; padding: 6px 10px; border-radius: 4px; background: #171717; }
.calendar-day.active .date-heading strong { color: #fff; font-weight: 700; }
.calendar-task { padding: 13px 14px; border-left: 2px solid #222; background: #f7f7f7; cursor: pointer; font-size: 14px; line-height: 1.35; }
.calendar-task.done { color: #27803a; border-color: #27803a; }

.profiles { position: relative; }
.profile-workspace-header { display: flex; align-items: start; }
.profile-switcher { display: flex; flex: 1; align-items: center; gap: 8px; overflow-x: auto; padding: 1px 1px 14px; scrollbar-width: none; }
.profile-chip, .icon-button { flex: 0 0 auto; border: 1px solid #dedede; border-radius: 99px; background: #fff; }
.profile-chip { padding: 8px 12px; color: #5b5b5b; font-size: 13px; }
.profile-chip.selected { border-color: #181818; background: #181818; color: white; }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; }
.manage-profiles-button { position: absolute; top: -57px; right: 0; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid #dedede; border-radius: 5px; background: #fff; font-size: 12px; }
.profile-tools { display: flex; align-items: center; margin: 0 0 16px; }
.profile-count { color: #767676; font-size: 12px; }
.profile-actions { display: flex; gap: 8px; }
.profile-actions button { border: 0; background: none; color: #626262; font-size: 12px; text-decoration: underline; }
.task-list { display: grid; gap: 8px; padding-bottom: 75px; }
.task-note { display: flex; align-items: flex-start; gap: 11px; padding: 14px 10px; border: 1px solid #ececec; border-radius: 7px; background: #fff; cursor: grab; }
.task-note.dragging { opacity: .4; }
.task-note.selected { outline: 2px solid #181818; outline-offset: 1px; }
.task-content { flex: 1; min-width: 0; }
.task-copy { display: block; }
.task-note-notes { display: grid; gap: 3px; margin: 6px 0 0; padding-left: 17px; color: #6a6a6a; font-size: 12px; line-height: 1.3; }
.task-note.done .task-copy, .task-note.done .task-note-notes { color: #27803a; }
.select-check { display: none; margin-top: 2px; }
.selection-mode .select-check { display: inline-block; }
.task-copy { flex: 1; font-size: 14px; line-height: 1.4; }
.task-date { flex: 0 0 auto; color: #808080; font-size: 11px; white-space: nowrap; }
.composer { position: fixed; z-index: 3; bottom: 74px; left: 50%; display: flex; align-items: center; gap: 8px; width: min(calc(100% - 36px), 524px); transform: translateX(-50%); padding: 7px 8px 7px 16px; border: 1px solid #cfcfcf; border-radius: 99px; background: #fff; box-shadow: 0 5px 18px rgba(0,0,0,.08); }
.composer input[type="text"] { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; }
.composer input[type="date"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.composer button { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 50%; background: #171717; color: #fff; }
.composer .date-trigger { background: transparent; color: #333; }
.selection-toolbar { position: fixed; z-index: 5; top: 13px; left: 50%; display: flex; align-items: center; justify-content: space-between; width: min(calc(100% - 24px), 536px); transform: translateX(-50%); padding: 12px 13px; border: 1px solid #e1e1e1; border-radius: 8px; background: white; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.selection-toolbar strong { font-size: 13px; }
.selection-toolbar button { margin-left: 10px; border: 0; background: none; font-size: 13px; }
.danger { color: #9a2323; }

.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: end center; padding: 16px; background: rgba(0,0,0,.35); }
.modal { width: min(100%, 530px); padding: 20px; border-radius: 8px; background: white; }
.modal h2 { margin: 0 0 16px; font-family: "Newsreader", serif; font-size: 26px; }
.modal label { display: grid; gap: 7px; margin-bottom: 13px; font-size: 12px; font-weight: 600; }
.modal input, .modal textarea { width: 100%; padding: 11px; border: 1px solid #d6d6d6; border-radius: 5px; outline: none; resize: vertical; }
.modal textarea { min-height: 95px; }
.modal .task-title-field, .modal .task-notes-field { min-height: 0; overflow: hidden; resize: none; line-height: 1.4; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.modal-actions button { padding: 9px 13px; border: 1px solid #d0d0d0; border-radius: 5px; background: #fff; font-size: 13px; }
.modal-actions .primary { border-color: #171717; background: #171717; color: white; }
.modal-warning { margin: 0; color: #555; font-size: 14px; line-height: 1.45; }
.task-action-card { display: grid; gap: 16px; }
.task-action-title { margin: 0; font-family: "Newsreader", serif; font-size: 25px; line-height: 1.15; }
.task-action-notes { display: grid; gap: 4px; margin: -7px 0 0; padding-left: 18px; color: #666; font-size: 13px; }
.task-action-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.task-action-buttons button { display: grid; gap: 5px; min-height: 52px; place-content: center; border: 1px solid #d0d0d0; border-radius: 5px; background: #fff; font-size: 11px; }
.task-action-buttons button i { font-size: 14px; }
.task-action-buttons .primary { border-color: #171717; background: #171717; color: #fff; }
.profile-delete-link { margin-top: 20px; padding: 0; border: 0; background: none; font-size: 13px; text-decoration: underline; }
.modal-actions .danger-button { border-color: #8b2424; background: #8b2424; color: #fff; }
.profile-manager-list { display: grid; gap: 6px; }
.profile-manager-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 1px solid #e4e4e4; border-radius: 5px; font-size: 14px; }
.profile-manager-row > div { display: flex; gap: 5px; }
.profile-icon-action { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 4px; background: #f3f3f3; }
.create-profile-button { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; margin-top: 12px; padding: 10px; border: 1px solid #171717; border-radius: 5px; background: #171717; color: #fff; font-size: 13px; }

@media (min-width: 561px) { body { padding: 20px 0; } .app-shell { min-height: calc(100dvh - 40px); border: 1px solid #e5e5e5; border-radius: 8px; } .tabbar { bottom: 20px; border: 1px solid #e9e9e9; border-bottom: 0; border-radius: 8px 8px 0 0; } }