@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');
.sync-status { display: inline-flex; align-items: center; min-height: 28px; padding: 0 9px; border: 1px solid #dce3ea; border-radius: 6px; color: #728092; font-size: 11px; white-space: nowrap; }
.sync-status[data-status="ready"] { color: #247552; border-color: #bfe2d1; background: #f1fbf5; }
.sync-status[data-status="syncing"] { color: #8a6718; border-color: #ead9a5; background: #fffaf0; }
.sync-status[data-status="error"] { color: #a04444; border-color: #edc9c9; background: #fff5f5; }
@media (max-width: 720px) { .sync-status { display: none; } }
.auth-message { min-height: 18px; margin: 0; color: #a04444; font-size: 12px; }
.field-hint, .profile-email { margin: 0; color: #9aa5b2; font-size: 10px; }

/* Narrow layouts use the available width instead of compressing desktop rows. */
@media (max-width: 680px) {
  html, body { min-width: 0; overflow-x: hidden; }
  .app-shell { display: block; }
  .sidebar { width: 100%; height: auto; padding: 14px 14px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 4px 14px; }
  .main-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 0; }
  .nav-item { min-width: 0; min-height: 40px; justify-content: center; gap: 5px; padding: 0 5px; }
  .nav-item span:last-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main-content { width: 100%; }
  .topbar { min-height: 64px; height: auto; padding: 12px 14px; gap: 10px; }
  .breadcrumb { min-width: 0; flex: 1; gap: 7px; }
  .breadcrumb strong { max-width: 100%; overflow: hidden; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
  .top-actions { flex: 0 0 auto; gap: 5px; }
  .top-actions .icon-button { width: 34px; height: 34px; }
  .top-actions .primary-button { min-height: 34px; padding: 0 10px; white-space: nowrap; }
  .view-root { width: 100%; padding: 20px 14px 42px; }
  .page-heading { align-items: stretch; gap: 13px; margin-bottom: 20px; }
  .page-heading h1 { max-width: none; margin-top: 5px; font-size: 22px; line-height: 1.35; }
  .page-heading p { line-height: 1.6; }
  .date-chip { width: 100%; justify-content: space-between; box-sizing: border-box; }
  .overview-grid, .content-grid, .plan-layout, .space-content-grid, .space-calendar-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .focus-card { min-height: 176px; padding: 20px 18px; }
  .focus-card h2 { max-width: 90%; font-size: 20px; line-height: 1.45; }
  .focus-footer { right: 18px; bottom: 18px; left: 18px; gap: 8px; }
  .focus-footer small { flex: 0 0 auto; }
  .stat-card, .task-panel, .log-panel, .plan-board, .logs-page, .goal-panel, .space-panel, .space-calendar-panel, .space-day-panel, .milestones-panel { padding: 18px 15px; }
  .section-head { align-items: stretch; gap: 10px; }
  .section-head > .primary-button, .section-head > .secondary-button { width: 100%; }
  .task-row, .agenda-list .task-row { grid-template-columns: 20px minmax(0, 1fr) 28px; grid-template-rows: auto auto; column-gap: 8px; row-gap: 0; min-height: 0; padding: 11px 0; }
  .task-row .check { grid-column: 1; grid-row: 1; }
  .task-row .task-main { grid-column: 2; grid-row: 1; }
  .task-row .task-time { grid-column: 2; grid-row: 2; margin-top: 4px; }
  .task-row .item-actions { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .task-title { overflow: visible; line-height: 1.45; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
  .task-sub { line-height: 1.45; }
  .task-time { white-space: normal; line-height: 1.4; }
  .goal-grid, .milestone-list, .space-summary-grid { grid-template-columns: minmax(0, 1fr); }
  .goal-card-foot { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
  .goal-card-foot .checkin-button { margin-left: auto; }
  .log-form, .quick-log-form { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .log-form .primary-button, .quick-log-form .primary-button { width: 100%; }
  .quick-log-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .recent-log, .log-entry { grid-template-columns: 66px minmax(0, 1fr); gap: 10px; }
  .recent-log .recent-log-actions, .log-entry .log-entry-tools { grid-column: 2; justify-content: start; }
  .recent-log .duration, .log-entry .duration { grid-column: 2; text-align: left; }
  .calendar-board:has(.plan-month-grid), .calendar-board:has(.plan-week-grid), .space-calendar-panel { overflow-x: auto; }
  .plan-month-grid { min-width: 610px; }
  .plan-week-grid { min-width: 680px; }
  .space-calendar-grid { min-width: 560px; }
  .calendar-toolbar { gap: 10px; justify-content: space-between; }
  .calendar-toolbar strong { min-width: 0; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .field-wide { grid-column: auto; }
  .form-actions { flex-wrap: wrap; }
  .form-actions > button { flex: 1 1 120px; }
  .modal { width: 100%; max-height: calc(100dvh - 28px); overflow-y: auto; padding: 20px 17px; }
  .modal h2 { font-size: 19px; }
}

@media (max-width: 390px) {
  .topbar { padding-right: 10px; padding-left: 10px; }
  .breadcrumb { gap: 5px; font-size: 11px; }
  .breadcrumb strong { font-size: 13px; }
  .top-actions .primary-button { padding: 0 8px; font-size: 11px; }
  .view-root { padding-right: 11px; padding-left: 11px; }
  .page-heading h1 { font-size: 20px; }
  .focus-card { padding-right: 15px; padding-left: 15px; }
  .focus-footer { right: 15px; left: 15px; }
}

:root {
  --ink: #1f2937;
  --muted: #8a95a4;
  --line: #e8edf2;
  --surface: #ffffff;
  --canvas: #f6f8fb;
  --blue: #526dff;
  --blue-light: #eef1ff;
  --orange: #ed9d64;
  --green: #62b497;
  --yellow: #f3c764;
  --shadow: 0 12px 34px rgba(31, 48, 77, .06);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: 'DM Sans', 'Noto Sans SC', sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 244px; flex: 0 0 244px; display: flex; flex-direction: column; padding: 31px 17px 18px; background: #fff; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 14px 38px; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--blue); color: #fff; box-shadow: 0 5px 13px rgba(82, 109, 255, .22); }
.brand-mark span { width: 13px; height: 7px; display: block; border-bottom: 2px solid #fff; border-left: 2px solid #fff; transform: rotate(-45deg) translate(1px, -2px); }
.brand strong { display: block; font-size: 17px; letter-spacing: 2px; }
.brand span { display: block; color: #b0b9c5; font-size: 8px; letter-spacing: 1.7px; margin-top: 1px; }
.sidebar-section-label { padding: 0 14px 10px; color: #b1bac5; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; }
.main-nav { margin-bottom: 33px; }
.nav-item, .space-item { width: 100%; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 14px; margin: 3px 0; border-radius: 8px; background: transparent; color: #7d8997; text-align: left; }
.nav-item:hover, .space-item:hover { background: #f7f8fc; color: var(--ink); }
.nav-item.active { background: var(--blue-light); color: var(--blue); font-weight: 600; }
.nav-icon { width: 18px; text-align: center; font-size: 18px; line-height: 1; }
.nav-item em { margin-left: auto; padding: 2px 6px; border-radius: 10px; background: #fff; color: var(--blue); font-size: 10px; font-style: normal; }
.space-list { margin-bottom: 26px; }
.space-item-row { position: relative; display: flex; align-items: center; }
.space-item { height: 36px; flex: 1; min-width: 0; font-size: 13px; }
.space-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-item.active { background: var(--blue-light); color: var(--blue); font-weight: 600; }
.space-item-row > .item-actions { position: absolute; right: 5px; }
.space-item-row > .item-actions .more-button { width: 26px; height: 26px; font-size: 17px; }
.space-item-row > .item-actions .item-menu { top: calc(100% + 4px); right: 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-blue { background: #6882ff; }.dot-yellow { background: #f3c764; }.dot-green { background: #65b694; }.dot-orange { background: #ed9d64; }
.add-space { color: #b3bdc9; margin-top: 5px; }.add-space span { font-size: 19px; font-weight: 300; }
.sidebar-bottom { margin-top: auto; }
.streak-card { padding: 15px; border-radius: 9px; background: #f8f9fd; margin: 0 4px 18px; }
.streak-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #929cab; }.streak-top strong { color: var(--ink); font-size: 12px; }
.streak-bar { height: 5px; overflow: hidden; margin: 11px 0 9px; background: #e7eaf4; border-radius: 4px; }.streak-bar span { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.streak-card small { color: #a5afbd; font-size: 10px; }
.profile { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: transparent; text-align: left; }.profile .avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #1f2937; color: #fff; font-size: 12px; }.profile strong { display: block; font-size: 12px; font-weight: 600; }.profile small { display: block; margin-top: 2px; color: #a5afbd; font-size: 10px; }.profile b { margin-left: auto; color: #a9b2bd; letter-spacing: 2px; }

.main-content { width: calc(100% - 244px); min-width: 0; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 4vw, 58px); border-bottom: 1px solid var(--line); background: rgba(246, 248, 251, .82); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #a1abb8; font-size: 12px; }.breadcrumb strong { color: var(--ink); font-size: 15px; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 8px; }.icon-button { position: relative; width: 35px; height: 35px; background: transparent; color: #96a1ae; border-radius: 50%; font-size: 22px; }.icon-button:hover { color: var(--blue); background: #fff; }.icon-button.has-dot::after { position: absolute; content: ''; width: 5px; height: 5px; right: 7px; top: 7px; border-radius: 50%; background: #ff8e75; border: 2px solid var(--canvas); }.primary-button, .secondary-button { min-height: 36px; padding: 0 15px; border-radius: 6px; font-size: 12px; font-weight: 600; }.primary-button { background: var(--blue); color: white; box-shadow: 0 5px 13px rgba(82, 109, 255, .18); }.primary-button:hover { background: #405be9; }.primary-button span { font-size: 17px; vertical-align: -1px; margin-right: 4px; }.secondary-button { background: #f1f3f7; color: #6f7b88; }.secondary-button:hover { background: #e7eaf0; }
.view-root { max-width: 1380px; margin: 0 auto; padding: 36px clamp(24px, 4vw, 58px) 60px; }
.eyebrow { color: var(--blue); font-size: 10px; font-weight: 700; letter-spacing: 1.4px; }.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }.page-heading h1 { max-width: 820px; margin: 6px 0 0; font-size: 28px; letter-spacing: -0.5px; line-height: 1.3; }.page-heading h1 .quote-heading { color: #27344a; font-weight: 600; }.page-heading p { margin: 9px 0 0; color: var(--muted); font-size: 12px; }.page-heading p .quote-source { color: #98a3b0; font-style: italic; }
.date-chip { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #fff; border: 1px solid var(--line); border-radius: 7px; color: #7b8795; font-size: 12px; }.date-chip strong { color: var(--ink); font-size: 15px; }.date-chip span { color: var(--blue); font-size: 20px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .75fr); gap: 21px; margin-bottom: 21px; }.surface { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); }
.focus-card { min-height: 184px; position: relative; overflow: hidden; padding: 24px 27px; background: #354775; color: #fff; border: 0; box-shadow: none; }.focus-card::after { content: ''; position: absolute; width: 190px; height: 190px; right: 10%; top: -92px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 25px rgba(255,255,255,.025), 0 0 0 50px rgba(255,255,255,.02); }.focus-card .eyebrow { color: #b9c6f7; }.focus-card h2 { position: relative; z-index: 1; margin: 8px 0 6px; font-size: 22px; line-height: 1.4; }.focus-card p { position: relative; z-index: 1; margin: 0; color: #c5cee4; font-size: 12px; }.focus-footer { position: absolute; z-index: 1; right: 26px; bottom: 23px; left: 27px; display: flex; align-items: center; gap: 11px; }.focus-footer small { color: #c3cce0; font-size: 10px; white-space: nowrap; }.focus-progress { flex: 1; height: 5px; background: rgba(255,255,255,.18); border-radius: 5px; }.focus-progress span { display: block; height: 100%; width: 68%; background: #9cafff; border-radius: inherit; }
.focus-card-complete { background: #377d68; }.focus-card-complete::after { border-color: rgba(255,255,255,.12); box-shadow: 0 0 0 25px rgba(255,255,255,.035), 0 0 0 50px rgba(255,255,255,.025); }.focus-card-complete .eyebrow { color: #c1eadc; }.focus-card-complete h2 { color: #fff; }.focus-card-complete p, .focus-card-complete .focus-footer small { color: #c8e6dc; }.focus-card-complete .focus-progress span { background: #a5e1c9; }
.stat-card { padding: 22px 24px; }.card-label { color: #9ba6b3; font-size: 11px; }.stat-number { display: flex; align-items: baseline; gap: 7px; margin: 11px 0 14px; }.stat-number strong { font-size: 34px; letter-spacing: -1px; }.stat-number span { color: #aab4c0; font-size: 12px; }.stat-meta { display: flex; align-items: center; gap: 7px; color: #98a3b0; font-size: 11px; }.trend { color: var(--green); font-weight: 600; }.trend-down { color: #de7569; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }.section-head h3 { margin: 0; font-size: 16px; }.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }.text-button { background: transparent; color: var(--blue); font-size: 11px; padding: 6px 0; }.text-button:hover { text-decoration: underline; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .75fr); gap: 21px; }.task-panel, .log-panel, .plan-board, .logs-page { padding: 22px 25px; }.task-list { border-top: 1px solid var(--line); }.task-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 65px; border-bottom: 1px solid var(--line); }.check { width: 17px; height: 17px; border: 1.5px solid #cbd3dd; border-radius: 50%; background: white; }.check.done { display: grid; place-items: center; border-color: var(--green); background: var(--green); color: #fff; font-size: 11px; }.task-main { min-width: 0; }.task-title { display: block; overflow: hidden; color: #35404e; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }.task-title.done { color: #acb5c0; text-decoration: line-through; }.task-sub { display: block; margin-top: 5px; color: #a5afbb; font-size: 10px; }.task-sub b { font-weight: 500; color: var(--orange); }.task-row[data-priority="high"] .task-sub b { color: #ef8273; }.task-row[data-priority="low"] .task-sub b { color: var(--green); }.task-time { color: #a8b2bd; font-size: 10px; white-space: nowrap; }
.mini-calendar { padding: 22px 23px; }.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }.calendar-head strong { font-size: 14px; }.calendar-nav { display: flex; gap: 2px; }.calendar-nav button { width: 24px; height: 24px; background: transparent; color: #a4afba; font-size: 17px; }.calendar-nav button:hover { color: var(--blue); }.weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }.weekdays { margin-bottom: 9px; color: #b1bac6; font-size: 10px; }.calendar-days button { position: relative; width: 25px; height: 25px; margin: auto; border-radius: 50%; background: transparent; color: #7b8796; font-size: 11px; }.calendar-days button:hover { background: var(--blue-light); color: var(--blue); }.calendar-days button.muted { color: #d2d8df; }.calendar-days button.today { background: var(--blue); color: #fff; box-shadow: 0 3px 8px rgba(82,109,255,.23); }.calendar-days button.marked::after { content: ''; position: absolute; width: 3px; height: 3px; bottom: 1px; left: 50%; transform: translateX(-50%); border-radius: 50%; background: var(--orange); }.calendar-days button.today::after { background: #fff; }
.log-panel { margin-top: 21px; }.log-compose { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border: 1px dashed #dce2eb; border-radius: 7px; color: #b2bbc5; cursor: pointer; }.log-compose:hover { border-color: #9eafff; background: #fafbff; color: var(--blue); }.log-compose-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 6px; background: var(--blue-light); color: var(--blue); font-size: 18px; }.quick-log-form { display: grid; grid-template-columns: 145px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 14px; background: #f8f9fc; border-radius: 7px; }.quick-log-form input, .quick-log-form textarea { min-width: 0; border: 1px solid #e2e7ee; border-radius: 5px; background: #fff; color: var(--ink); outline: none; }.quick-log-form input { height: 36px; padding: 0 10px; font-size: 12px; }.quick-log-form textarea { height: 36px; resize: none; padding: 9px 10px; font-size: 12px; }.quick-log-form input:focus, .quick-log-form textarea:focus { border-color: #a7b3ff; box-shadow: 0 0 0 3px #eef1ff; }.recent-log { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 15px; padding: 17px 0 3px; }.recent-log time { color: #abb5c0; font-size: 10px; }.recent-log strong { display: block; font-size: 12px; font-weight: 600; }.recent-log p { margin: 5px 0 0; color: #929eab; font-size: 11px; line-height: 1.6; }
.goal-panel { margin-top: 21px; padding: 22px 25px; }.goal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }.goal-group + .goal-group { margin-top: 19px; }.goal-group-label { margin: 0 0 10px; color: #97a2af; font-size: 10px; font-weight: 700; letter-spacing: 1px; }.completed-goals { padding-top: 16px; border-top: 1px solid var(--line); }.goal-card { position: relative; padding: 18px 18px 16px 20px; border: 1px solid #e4eaf2; border-left: 4px solid var(--blue); border-radius: 8px; background: #fff; box-shadow: 0 7px 18px rgba(42, 57, 81, .05); transition: transform .18s ease, box-shadow .18s ease; }.goal-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(42, 57, 81, .09); }.goal-card.goal-month { border-left-color: #d78b5f; }.goal-card.goal-month .goal-symbol { background: #fff0e8; color: #cf7848; }.goal-card.goal-month .goal-period { color: #cf7848; }.goal-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }.goal-heading { display: flex; align-items: center; min-width: 0; gap: 10px; }.goal-symbol { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 32px; border-radius: 9px; background: var(--blue-light); color: var(--blue); font-size: 12px; font-weight: 700; }.goal-period { color: var(--blue); font-size: 10px; }.goal-card h4 { overflow: hidden; margin: 4px 0 0; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }.goal-tools { display: flex; align-items: center; gap: 8px; }.goal-count { color: #334155; font-size: 21px; line-height: 1; white-space: nowrap; }.goal-count small { color: #98a3b0; font-size: 10px; font-weight: 500; }.goal-bar { height: 8px; margin: 17px 0 12px; overflow: hidden; border-radius: 5px; background: #e9edf4; }.goal-bar span { display: block; height: 100%; border-radius: inherit; background: var(--blue); transition: width .2s ease; }.goal-month .goal-bar span { background: #d78b5f; }.goal-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; color: #9aa5b2; font-size: 10px; }.goal-card-foot > span { min-width: 0; line-height: 1.5; }.goal-status { color: inherit; font-weight: 600; }.today-checkins { color: #64748b; font-weight: 500; }.goal-card-complete { border-color: #b9dfd0; border-left-color: var(--green); background: #f7fcfa; }.goal-card-complete .goal-symbol { background: #e3f5ed; color: var(--green); }.goal-card-complete .goal-period, .goal-card-complete .goal-status { color: var(--green); }.goal-card-complete .goal-bar span { background: var(--green); }.goal-card-over { border-color: #f1c9a8; border-left-color: var(--orange); background: #fffaf6; }.goal-card-over .goal-symbol { background: #fff0e2; color: #d77e3f; }.goal-card-over .goal-period, .goal-card-over .goal-status { color: #d77e3f; }.goal-card-over .goal-bar span { background: var(--orange); }.checkin-button { min-height: 29px; padding: 0 10px; border: 1px solid #d9dfff; border-radius: 6px; background: var(--blue-light); color: var(--blue); font-size: 10px; font-weight: 700; white-space: nowrap; }.goal-card-over .checkin-button { border-color: #f1d3bd; background: #fff1e7; color: #d77e3f; }.goal-card-complete .checkin-button { border-color: #b9dfd0; background: #e9f7f0; color: #368d72; }.checkin-button:hover { background: #e0e5ff; }.goal-card-over .checkin-button:hover { background: #ffe8d7; }.goal-card-complete .checkin-button:hover { background: #d9f1e5; }.goal-complete { color: var(--green); font-weight: 600; }.goal-plan-section { margin: 5px 0 25px; }.goal-plan-section .goal-grid { margin-top: 12px; }.empty-state { padding: 22px 5px; color: #aab4c0; font-size: 12px; text-align: center; }
.item-actions { position: relative; flex: 0 0 auto; }.more-button { width: 28px; height: 28px; border-radius: 50%; background: transparent; color: #a2adba; font-size: 19px; line-height: 1; }.more-button:hover, .menu-open .more-button { background: #f0f3f8; color: var(--blue); }.item-menu { position: absolute; z-index: 5; top: calc(100% + 3px); right: 0; display: none; min-width: 88px; padding: 5px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 10px 24px rgba(31, 48, 77, .13); }.menu-open .item-menu { display: grid; }.item-menu button { padding: 8px 10px; border-radius: 5px; background: transparent; color: #657282; font-size: 11px; text-align: left; white-space: nowrap; }.item-menu button:hover { background: #f4f6fa; color: var(--blue); }.item-menu .danger-action:hover { background: #fff1ef; color: #de7569; }.task-row { position: relative; grid-template-columns: 22px minmax(0, 1fr) auto auto; }
.quick-log-form[hidden], .log-compose[hidden] { display: none; }.quick-log-actions { display: flex; justify-content: end; gap: 8px; grid-column: 1 / -1; }.recent-log { position: relative; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: start; }.recent-log-actions { display: flex; justify-content: end; }.recent-log-actions .item-menu { top: calc(100% + 2px); }.log-entry-tools { display: flex; align-items: start; justify-content: end; gap: 8px; }.log-entry-tools .item-menu { top: calc(100% + 2px); }.log-edit-form { display: grid; gap: 16px; }.log-edit-form .form-actions { padding-top: 2px; }

.view-tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }.view-tab { padding: 0 16px 12px; background: transparent; color: #9ba6b3; font-size: 12px; border-bottom: 2px solid transparent; }.view-tab.active { color: var(--blue); border-color: var(--blue); font-weight: 600; }.plan-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; }.plan-board { min-height: 430px; }.plan-summary { display: flex; align-items: center; gap: 16px; margin: 7px 0 22px; padding: 14px 16px; border-radius: 7px; background: #f8f9fc; }.ring { width: 45px; height: 45px; display: grid; place-items: center; flex: 0 0 45px; border-radius: 50%; background: conic-gradient(var(--blue) 0 68%, #e4e8f4 68% 100%); }.ring::after { content: '68%'; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: #f8f9fc; color: var(--blue); font-size: 10px; font-weight: 700; }.plan-summary strong { display: block; font-size: 13px; }.plan-summary span { display: block; margin-top: 4px; color: #9da8b5; font-size: 11px; }.plan-group { margin-top: 20px; }.group-title { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--line); }.group-title strong { font-size: 12px; }.group-title span { color: #b0bac5; font-size: 10px; }.plan-item { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 11px; align-items: center; min-height: 57px; border-bottom: 1px solid var(--line); }.plan-item .task-title { font-size: 12px; }.plan-aside { padding: 21px; }.plan-aside h3 { margin: 0 0 18px; font-size: 14px; }.milestone { display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); }.milestone-mark { width: 8px; height: 8px; flex: 0 0 8px; margin-top: 5px; border-radius: 50%; background: var(--blue); }.milestone:nth-child(3) .milestone-mark { background: var(--yellow); }.milestone:nth-child(4) .milestone-mark { background: var(--green); }.milestone strong { display: block; font-size: 11px; }.milestone span { display: block; margin-top: 4px; color: #a4afbb; font-size: 10px; line-height: 1.5; }
.logs-page { min-height: 480px; }.log-form { display: grid; grid-template-columns: 145px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 14px; margin-bottom: 20px; background: #f8f9fc; border-radius: 7px; }.log-form input, .log-form textarea, .field input, .field select, .field textarea { min-width: 0; border: 1px solid #e2e7ee; border-radius: 5px; background: #fff; color: var(--ink); outline: none; }.log-form input { height: 36px; padding: 0 10px; font-size: 12px; }.log-form textarea { height: 36px; resize: none; padding: 9px 10px; font-size: 12px; }.log-form input:focus, .log-form textarea:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: #a7b3ff; box-shadow: 0 0 0 3px #eef1ff; }.log-entry { display: grid; grid-template-columns: 100px minmax(0, 1fr) 70px; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); }.log-entry time { color: #a5afbb; font-size: 11px; }.log-entry time strong { display: block; margin-top: 4px; color: var(--ink); font-size: 13px; }.log-entry h4 { margin: 0; font-size: 13px; }.log-entry p { margin: 7px 0 0; color: #8d99a7; font-size: 11px; line-height: 1.7; }.log-entry .duration { color: #a1abb8; font-size: 10px; text-align: right; }
.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(26, 34, 51, .34); backdrop-filter: blur(3px); }.modal { width: min(520px, 100%); padding: 25px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 22px 60px rgba(27, 39, 64, .2); }.modal-header { display: flex; align-items: start; justify-content: space-between; margin-bottom: 22px; }.modal h2 { margin: 6px 0 0; font-size: 21px; }.modal-close { width: 30px; height: 30px; border-radius: 50%; background: #f3f5f8; color: #8f9aa7; font-size: 20px; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }.field { display: flex; flex-direction: column; gap: 7px; }.field span { color: #778391; font-size: 11px; }.field input, .field select { height: 37px; padding: 0 10px; }.field textarea { padding: 9px 10px; resize: vertical; }.field-wide { grid-column: 1 / -1; }.form-actions { display: flex; justify-content: end; gap: 8px; padding-top: 5px; }
.goal-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }.goal-fields[hidden] { display: none; }
.field[hidden] { display: none; }
.modal-backdrop[hidden] { display: none; }
@media (max-width: 900px) { .sidebar { width: 204px; flex-basis: 204px; }.main-content { width: calc(100% - 204px); }.overview-grid, .content-grid, .plan-layout { grid-template-columns: 1fr; }.mini-calendar { display: none; }.plan-aside { display: none; } }
@media (max-width: 680px) { .app-shell { display: block; }.sidebar { width: 100%; height: auto; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }.sidebar-section-label, .space-list, .sidebar-bottom { display: none; }.main-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0; }.nav-item { justify-content: center; gap: 6px; padding: 0 6px; }.nav-item em { display: none; }.main-content { width: 100%; }.topbar { height: 65px; padding: 0 20px; }.breadcrumb strong { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.view-root { padding: 25px 18px 45px; }.page-heading { align-items: start; flex-direction: column; gap: 15px; }.page-heading h1 { font-size: 24px; }.date-chip { align-self: stretch; }.focus-card { padding: 20px; }.focus-footer { right: 20px; left: 20px; }.task-panel, .logs-page { padding: 19px 17px; }.task-row { grid-template-columns: 20px minmax(0, 1fr) auto; padding: 8px 0; }.task-time { grid-column: 2; grid-row: 2; }.task-row .item-actions { grid-column: 3; grid-row: 1 / span 2; align-self: center; }.goal-panel { padding: 19px 17px; }.goal-grid { grid-template-columns: 1fr; }.goal-card-foot { align-items: flex-end; }.goal-card-foot > span { overflow-wrap: anywhere; }.log-form, .quick-log-form { grid-template-columns: 1fr; }.log-form .primary-button, .quick-log-form .primary-button { width: 100%; }.log-entry { grid-template-columns: 74px minmax(0, 1fr); gap: 11px; }.log-entry .duration { grid-column: 2; text-align: left; }.form-grid, .goal-fields { grid-template-columns: 1fr; }.field-wide { grid-column: auto; } }

/* Calendar planning workspace */
.calendar-plan-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.calendar-board { min-width: 0; padding: 22px 25px 25px; }
.calendar-toolbar { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 4px 0 21px; color: #475569; }
.calendar-toolbar strong { min-width: 170px; color: var(--ink); font-size: 15px; text-align: center; }
.calendar-toolbar button { width: 27px; height: 27px; border-radius: 50%; background: #f1f4f8; color: #83909e; font-size: 19px; line-height: 1; }
.calendar-toolbar button:hover { background: var(--blue-light); color: var(--blue); }
.plan-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.plan-weekday { padding: 10px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #a2acb8; font-size: 10px; text-align: center; }
.plan-day-cell { min-height: 105px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.plan-day-cell.outside-month { background: #fafbfd; }.plan-day-cell.selected-day { background: #f3f6ff; box-shadow: inset 0 0 0 2px #dce3ff; }
.plan-day-number { display: flex; align-items: center; gap: 5px; min-width: 25px; height: 25px; padding: 0 5px; border-radius: 6px; background: transparent; color: #667383; font-size: 11px; font-weight: 600; }.plan-day-number:hover { background: var(--blue-light); color: var(--blue); }.outside-month .plan-day-number { color: #c4ccd5; }.today-number { background: var(--blue) !important; color: #fff !important; }.plan-day-number small { color: #a6b1bd; font-size: 9px; font-weight: 500; }.today-number small { color: #fff; }
.calendar-events { display: grid; gap: 4px; margin-top: 5px; }.calendar-event { overflow: hidden; padding: 4px 6px; border-left: 2px solid var(--blue); border-radius: 3px; background: #eef1ff; color: #5368c5; font-size: 10px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }.calendar-event:hover { background: #dfe5ff; }.calendar-event.done { border-left-color: var(--green); background: #eaf7f1; color: #4f9c82; text-decoration: line-through; }.calendar-more { color: #a0aab6; font-size: 9px; }
.plan-week-grid { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); overflow-x: auto; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }.plan-week-column { min-height: 405px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }.plan-week-column.selected-day { background: #f3f6ff; box-shadow: inset 0 0 0 2px #dce3ff; }.plan-week-header { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 5px; border-bottom: 1px solid var(--line); background: transparent; color: #8995a3; }.plan-week-header:hover { background: var(--blue-light); }.plan-week-header strong { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: #465466; font-size: 13px; }.plan-week-header .today-number { background: var(--blue); color: #fff; }.plan-week-header small { color: #b0bac5; font-size: 9px; }.plan-week-events { display: grid; gap: 6px; padding: 10px 7px; }.calendar-empty { padding-top: 22px; color: #c2cad3; font-size: 10px; text-align: center; }
.plan-day-agenda { min-height: 415px; border: 1px solid var(--line); background: #fff; }.agenda-date { display: flex; align-items: baseline; gap: 9px; padding: 20px; border-bottom: 1px solid var(--line); }.agenda-date span { color: var(--blue); font-size: 11px; }.agenda-date strong { font-size: 20px; }.agenda-list { padding: 0 20px; }.agenda-list .task-row { grid-template-columns: 22px minmax(0, 1fr) auto auto; }
.plan-details { min-height: 330px; padding: 22px 20px; }.details-heading h3 { margin: 7px 0 4px; font-size: 17px; }.details-heading p { margin: 0; color: #9ca7b3; font-size: 11px; }.details-add { width: 100%; margin: 18px 0 21px; }.details-section { padding-top: 17px; border-top: 1px solid var(--line); }.details-section + .details-section { margin-top: 20px; }.details-label { margin-bottom: 8px; color: #99a4b0; font-size: 10px; font-weight: 700; letter-spacing: 1px; }.details-task-list .task-row { min-height: 58px; }.details-goals .goal-grid { grid-template-columns: 1fr; }.details-goals .goal-card { box-shadow: none; }
.milestones-panel { margin-top: 21px; padding: 22px 25px; }.milestone-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }.milestone-list .milestone { position: relative; min-width: 0; display: flex; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; }.milestone-copy { min-width: 0; padding-right: 22px; }.milestone-copy strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.milestone-copy span { display: block; margin-top: 5px; color: #a4afbb; font-size: 10px; }.milestone-copy small { display: block; margin-top: 7px; overflow: hidden; color: #8e9aa7; font-size: 10px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }.milestone-list .item-actions { position: absolute; top: 10px; right: 10px; }.milestone-list .item-menu { top: calc(100% + 3px); }
.milestone-form {}
.space-empty { display: grid; justify-items: center; gap: 12px; padding: 34px 24px; }
.space-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.space-summary { min-height: 112px; padding: 20px 22px; }
.space-summary strong { display: block; margin: 9px 0 3px; color: var(--ink); font-size: 25px; }
.space-summary > span:last-child { color: #98a3b0; font-size: 11px; }
.space-content-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(270px, .85fr); gap: 20px; }
.space-panel { min-width: 0; padding: 22px 25px; }
.space-milestones { display: block; }
.space-milestones .milestone { border-top: 1px solid var(--line); border-bottom: 0; }
.space-calendar-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr); gap: 20px; margin-bottom: 20px; }
.space-calendar-panel, .space-day-panel { min-width: 0; padding: 22px 25px; }
.space-calendar-toolbar { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 4px 0 18px; color: #475569; }
.space-calendar-toolbar strong { min-width: 170px; color: var(--ink); font-size: 15px; text-align: center; }
.space-calendar-toolbar button { width: 27px; height: 27px; border-radius: 50%; background: #f1f4f8; color: #83909e; font-size: 19px; line-height: 1; }
.space-calendar-toolbar button:hover { background: var(--blue-light); color: var(--blue); }
.space-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.space-weekday { padding: 9px 5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #a2adba; font-size: 10px; text-align: center; }
.space-day-cell { min-height: 84px; padding: 9px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; color: var(--ink); text-align: left; vertical-align: top; }
.space-day-cell:hover { background: #f8f9ff; }
.space-day-cell.outside-month { background: #fafbfd; color: #c5ccd5; }
.space-day-cell.selected-day { background: #f3f6ff; box-shadow: inset 0 0 0 2px #dce3ff; }
.space-day-cell.today-day strong { display: inline-grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; }
.space-day-cell > strong { display: inline-block; font-size: 12px; }
.space-day-cell > span { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; color: #9aa5b2; font-size: 9px; line-height: 1.3; }
.space-log-indicator { width: max-content; padding: 2px 4px; border-radius: 3px; background: #eaf7f1; color: #4f9c82; font-style: normal; }
.space-day-heading h3 { margin: 7px 0 4px; font-size: 19px; }
.space-day-heading p { margin: 0; color: #9aa5b2; font-size: 11px; }
.space-day-actions { margin: 18px 0 20px; }
.space-day-actions .primary-button { width: 100%; }
.space-day-section { padding-top: 16px; border-top: 1px solid var(--line); }
.space-day-section + .space-day-section { margin-top: 19px; }
.space-day-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.space-day-section-head strong { font-size: 12px; }
.space-day-section-head span { color: #a5afbb; font-size: 10px; }
.space-day-tasks .task-row { min-height: 55px; }
.space-log-form { display: grid; gap: 8px; padding: 12px; border-radius: 7px; background: #f8f9fc; }
.space-log-form input, .space-log-form textarea { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #e2e7ee; border-radius: 5px; background: #fff; color: var(--ink); outline: none; resize: vertical; font-size: 11px; }
.space-log-form input { height: 35px; }
.space-log-form textarea { min-height: 52px; }
.space-log-form input:focus, .space-log-form textarea:focus { border-color: #a7b3ff; box-shadow: 0 0 0 3px #eef1ff; }
.space-log-form .secondary-button { justify-self: end; }
.space-log-list { margin-top: 12px; }
.space-log-entry { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.space-log-entry strong { display: block; font-size: 11px; }
.space-log-entry p { margin: 5px 0 0; color: #8d99a7; font-size: 10px; line-height: 1.6; }
.space-log-tools { position: relative; display: flex; align-items: start; gap: 5px; color: #a1abb8; font-size: 9px; white-space: nowrap; }
.space-log-tools .item-menu { top: calc(100% + 2px); }
.breakthrough-note { margin-top: 8px; padding: 7px 8px; border-left: 2px solid #d78b5f; background: #fff8f2; color: #8f654b; font-size: 10px; line-height: 1.5; }
.breakthrough-note span { margin-right: 6px; color: #cf7848; font-weight: 700; }
@media (max-width: 1100px) { .calendar-plan-layout { grid-template-columns: 1fr; }.plan-details { min-height: auto; }.milestone-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .space-content-grid, .space-calendar-layout { grid-template-columns: 1fr; }.space-day-panel { min-height: auto; } }
@media (max-width: 680px) { .calendar-board { padding: 19px 15px; }.calendar-board .section-head { align-items: start; gap: 12px; flex-direction: column; }.calendar-board .section-head .primary-button { width: 100%; }.plan-day-cell { min-height: 83px; padding: 5px; }.calendar-event { font-size: 9px; }.plan-month-grid { min-width: 650px; overflow-x: auto; }.calendar-board:has(.plan-month-grid), .calendar-board:has(.plan-week-grid) { overflow-x: auto; }.plan-week-grid { min-width: 720px; }.plan-details { padding: 19px 17px; }.milestones-panel { padding: 19px 17px; }.milestone-list { grid-template-columns: 1fr; }.space-summary-grid { grid-template-columns: 1fr; }.space-panel, .space-calendar-panel, .space-day-panel { padding: 19px 17px; }.space-calendar-grid { min-width: 590px; }.space-calendar-panel { overflow-x: auto; }.space-day-cell { min-height: 72px; padding: 7px 6px; }.space-day-cell > span { margin-top: 8px; } }

/* Keep the complete account sidebar available on phones. */
@media (max-width: 680px) {
  .sidebar-section-label { display: block; padding: 16px 4px 7px; font-size: 9px; }
  .space-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 0 0 10px; }
  .space-item-row { min-width: 0; }
  .space-item { width: 100%; height: 34px; gap: 7px; padding: 0 8px; font-size: 11px; }
  .space-item-row > .item-actions { right: 0; }
  .space-item-row > .item-actions .more-button { width: 25px; height: 25px; }
  .space-item-row > .item-actions .item-menu { top: calc(100% + 2px); }
  .add-space { grid-column: 1 / -1; min-height: 30px; margin: 0; padding: 4px 8px; font-size: 11px; }
  .sidebar-bottom { display: block; margin-top: 0; padding-top: 4px; border-top: 1px solid var(--line); }
  .streak-card { margin: 8px 0 7px; padding: 10px 11px; border-radius: 7px; }
  .streak-top { font-size: 10px; }
  .streak-top strong { font-size: 10px; }
  .streak-bar { margin: 8px 0 6px; }
  .streak-card small { font-size: 9px; }
  .profile { padding: 7px 4px 2px; }
  .profile .avatar { width: 28px; height: 28px; }
  .profile strong { font-size: 11px; }
  .profile small { font-size: 9px; }
}

/* Final mobile overrides: keep content readable after the calendar workspace rules. */
@media (max-width: 680px) {
  html, body { min-width: 0; overflow-x: hidden; }
  .sidebar { width: 100%; height: auto; padding: 14px 14px 12px; }
  .brand { padding: 0 4px 14px; }
  .main-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 0; }
  .nav-item { min-width: 0; min-height: 40px; justify-content: center; gap: 5px; padding: 0 5px; }
  .nav-item span:last-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar { min-height: 64px; height: auto; padding: 12px 14px; gap: 10px; }
  .breadcrumb { min-width: 0; flex: 1; gap: 7px; }
  .breadcrumb strong { max-width: 100%; font-size: 13px; }
  .top-actions { flex: 0 0 auto; gap: 5px; }
  .top-actions .icon-button { width: 34px; height: 34px; }
  .top-actions .primary-button { min-height: 34px; padding: 0 10px; white-space: nowrap; }
  .view-root { width: 100%; padding: 20px 14px 42px; }
  .page-heading { align-items: stretch; gap: 13px; margin-bottom: 20px; }
  .page-heading h1 { max-width: none; font-size: 22px; line-height: 1.35; }
  .page-heading p { line-height: 1.6; }
  .date-chip { width: 100%; box-sizing: border-box; justify-content: space-between; }
  .overview-grid, .content-grid, .plan-layout, .space-content-grid, .space-calendar-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .focus-card { min-height: 176px; padding: 20px 18px; }
  .focus-card h2 { max-width: 90%; font-size: 20px; line-height: 1.45; }
  .focus-footer { right: 18px; bottom: 18px; left: 18px; gap: 8px; }
  .stat-card, .task-panel, .log-panel, .plan-board, .logs-page, .goal-panel, .space-panel, .space-calendar-panel, .space-day-panel, .milestones-panel { padding: 18px 15px; }
  .task-row, .agenda-list .task-row { grid-template-columns: 20px minmax(0, 1fr) 28px; grid-template-rows: auto auto; column-gap: 8px; row-gap: 0; min-height: 0; padding: 11px 0; }
  .task-row .check { grid-column: 1; grid-row: 1; }
  .task-row .task-main { grid-column: 2; grid-row: 1; }
  .task-row .task-time { grid-column: 2; grid-row: 2; margin-top: 4px; }
  .task-row .item-actions { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .task-title { overflow: visible; line-height: 1.45; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
  .task-sub, .task-time { line-height: 1.45; white-space: normal; }
  .goal-grid, .milestone-list, .space-summary-grid { grid-template-columns: minmax(0, 1fr); }
  .goal-card-foot { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
  .goal-card-foot .checkin-button { margin-left: auto; }
  .log-form, .quick-log-form { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .log-form .primary-button, .quick-log-form .primary-button { width: 100%; }
  .quick-log-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .recent-log, .log-entry { grid-template-columns: 66px minmax(0, 1fr); gap: 10px; }
  .recent-log .recent-log-actions, .log-entry .log-entry-tools { grid-column: 2; justify-content: start; }
  .recent-log .duration, .log-entry .duration { grid-column: 2; text-align: left; }
  .calendar-board:has(.plan-month-grid), .calendar-board:has(.plan-week-grid), .space-calendar-panel { overflow-x: auto; }
  .plan-month-grid { min-width: 610px; }
  .plan-week-grid { min-width: 680px; }
  .space-calendar-grid { min-width: 560px; }
  .calendar-toolbar { gap: 10px; justify-content: space-between; }
  .calendar-toolbar strong { min-width: 0; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .field-wide { grid-column: auto; }
  .form-actions { flex-wrap: wrap; }
  .form-actions > button { flex: 1 1 120px; }
  .modal { width: 100%; max-height: calc(100dvh - 28px); overflow-y: auto; padding: 20px 17px; }
}

@media (max-width: 390px) {
  .topbar { padding-right: 10px; padding-left: 10px; }
  .view-root { padding-right: 11px; padding-left: 11px; }
  .page-heading h1 { font-size: 20px; }
  .top-actions .primary-button { padding: 0 8px; font-size: 11px; }
}
