:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #18332c; background: #f3f5f1; font-synthesis: none; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #f3f5f1; }
button, input, textarea, select { font: inherit; } button { cursor: pointer; } a { color: inherit; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 20; padding: .7rem 1rem; border-radius: 10px; background: #173c34; color: #fff; }
.skip-link:focus { top: 1rem; }
.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 clamp(1rem, 4vw, 2.5rem); border-bottom: 1px solid #d9e0da; background: rgba(250, 251, 248, .94); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: .72rem; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #173c34; color: #fff; font-weight: 850; }
.brand strong, .brand small { display: block; } .brand strong { letter-spacing: -.02em; } .brand small { margin-top: .08rem; color: #667a73; font-size: .73rem; }
.icon-button { width: 42px; height: 42px; border: 1px solid #cbd6ce; border-radius: 12px; background: #fff; color: #173c34; font-size: 1.25rem; font-weight: 800; }
.icon-button:disabled { cursor: wait; opacity: .55; }
.workspace { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-width: 0; min-height: calc(100vh - 72px); }
.sidebar { padding: 2rem 1.25rem; border-right: 1px solid #d9e0da; background: #e9eee9; }
.sidebar-heading, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sidebar-heading { margin: 0 .5rem 1rem; color: #50675f; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.activity-nav { display: grid; gap: .35rem; } .activity-group { margin-top: .55rem; }
.activity-group-title { margin: .75rem .55rem .35rem; color: #73837d; font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.activity-link { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: .72rem .75rem; border: 0; border-radius: 10px; background: transparent; color: #29473e; text-align: left; }
.activity-link:hover, .activity-link:focus-visible { background: #fff; outline: none; } .activity-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-content { width: min(1180px, 100%); min-width: 0; padding: clamp(1.4rem, 4vw, 3rem); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.5rem; }
.page-actions { display: flex; align-items: center; gap: .65rem; }
.eyebrow { margin: 0 0 .35rem; color: #658077; font-size: .72rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; } h1 { margin-bottom: .5rem; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.02; letter-spacing: -.055em; } h2 { margin-bottom: 0; font-size: 1.12rem; letter-spacing: -.015em; }
.muted { margin-bottom: 0; color: #6a7c76; font-size: .86rem; }
.view-switch { display: inline-flex; flex: none; padding: .25rem; border: 1px solid #d6dfd8; border-radius: 12px; background: #e9eee9; }
.view-button { padding: .6rem .8rem; border: 0; border-radius: 9px; background: transparent; color: #5c716a; font-weight: 750; }
.view-button.is-active { background: #fff; color: #173c34; box-shadow: 0 2px 8px rgba(30, 55, 47, .08); }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.summary-card { padding: 1.05rem 1.15rem; border: 1px solid #dfe5df; border-radius: 16px; background: #fff; }
.summary-card span { display: block; color: #6a7c76; font-size: .78rem; } .summary-card strong { display: block; margin-top: .25rem; font-size: 1.7rem; }
.summary-card.is-urgent { border-color: #ead5c0; background: #fff9f1; } .summary-card.is-urgent strong { color: #a34f20; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .8fr); gap: 1rem; align-items: start; }
.side-stack { display: grid; gap: 1rem; }
.panel { padding: 1.2rem; border: 1px solid #dfe5df; border-radius: 18px; background: #fff; box-shadow: 0 14px 35px rgba(31, 54, 47, .055); }
.count-badge { display: inline-grid; min-width: 1.75rem; min-height: 1.75rem; place-items: center; padding: 0 .45rem; border-radius: 999px; background: #e7eee8; color: #39564d; font-size: .75rem; font-weight: 800; }
.work-list, .compact-list, .link-groups, .loading-list { display: grid; gap: .65rem; margin-top: 1rem; }
.time-section + .time-section, .type-section + .type-section { margin-top: 1.35rem; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 .55rem; color: #50675f; font-size: .8rem; font-weight: 820; }
.task-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem; align-items: start; padding: .85rem .9rem; border: 1px solid #e3e8e3; border-radius: 13px; background: #fbfcfa; }
.task-card[role="button"] { cursor: pointer; } .task-card[role="button"]:hover, .task-card[role="button"]:focus-visible { border-color: #78958a; outline: none; }
.status-dot { width: 10px; height: 10px; margin-top: .35rem; border-radius: 50%; background: #739488; box-shadow: 0 0 0 4px #e7eee9; }
.task-card.is-completed { opacity: .58; } .task-card.is-cancelled { opacity: .48; } .task-card.is-overdue .status-dot { background: #b64c3c; box-shadow: 0 0 0 4px #f6e6e1; }
.task-name { margin: 0; font-size: .93rem; font-weight: 760; line-height: 1.35; }
.next-task { display: inline-block; margin: .32rem 0 0; padding: .22rem .42rem; border: 1px solid #a9b9b1; border-radius: 7px; color: #263f37; font-size: .72rem; font-weight: 720; }
.next-task.is-undated { border-color: #173c34; background: #173c34; color: #fff; }
.task-meta { display: flex; flex-wrap: wrap; gap: .3rem .6rem; margin-top: .3rem; color: #71817b; font-size: .72rem; }
.task-deadline { color: #4f655d; font-size: .75rem; font-weight: 730; white-space: nowrap; } .task-card.is-overdue .task-deadline { color: #a23d31; }
.note-item { padding: .72rem .8rem; border-radius: 11px; background: #f4f7f4; } .note-item.is-due { border-left: 3px solid #bd5d3e; }
.note-item p { margin: 0; font-size: .86rem; line-height: 1.45; } .note-item small { display: block; margin-top: .25rem; color: #74847e; }
.quick-note-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: .65rem; }
.quick-note-complete { white-space: nowrap; }
.link-group-title { margin: .9rem 0 .4rem; color: #667a73; font-size: .74rem; font-weight: 800; } .link-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.link-pill { display: inline-flex; padding: .5rem .65rem; border: 1px solid #dce4dd; border-radius: 10px; color: #25493d; background: #fbfcfa; font-size: .78rem; text-decoration: none; }
.link-pill:hover, .link-pill:focus-visible { border-color: #78958a; outline: none; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: 1rem 1.1rem; border-radius: 14px; }
.notice p { margin: .25rem 0 0; } .notice-error { border: 1px solid #e8c8c1; background: #fff4f1; color: #86372e; }
.notice button { flex: none; padding: .6rem .8rem; border: 0; border-radius: 9px; background: #853f36; color: #fff; font-weight: 750; }
.work-dialog { width: min(680px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 0; border-radius: 18px; color: #18332c; box-shadow: 0 24px 70px rgba(20, 45, 37, .25); }
.work-dialog::backdrop { background: rgba(18, 38, 32, .48); } .work-form { display: grid; gap: 1rem; padding: 1.3rem; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.work-form label { display: grid; gap: .4rem; color: #50675f; font-size: .78rem; font-weight: 760; }
.work-form input, .work-form textarea, .work-form select { width: 100%; padding: .7rem .75rem; border: 1px solid #cbd6ce; border-radius: 10px; background: #fff; color: #18332c; }
.work-form textarea { resize: vertical; } .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.form-status { min-height: 1.25rem; margin: 0; color: #657a72; font-size: .8rem; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: .55rem;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  padding: .68rem 1rem;
  border-radius: 11px;
  font: inherit;
  font-weight: 780;
  cursor: pointer;
}

.primary-button {
  border: 1px solid #173c34;
  background: #173c34;
  color: #fff;
}

.secondary-button {
  border: 1px solid #cbd8d0;
  background: #f7faf7;
  color: #25493d;
}

.primary-button:hover {
  background: #214a40;
}

.secondary-button:hover {
  background: #eef4ef;
  border-color: #aebfb5;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: .6;
}

.activity-info-row {
  display: grid;
  gap: .22rem;
  padding: .85rem .9rem;
}

.activity-info-label {
  color: #71847c;
  font-size: .72rem;
  font-weight: 720;
  line-height: 1.3;
}

.activity-info-value {
  color: #18332c;
  font-size: 1rem;
  font-weight: 780;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.activity-info-link {
  color: #285e50;
  text-decoration: underline;
  text-decoration-color: #a9beb5;
  text-underline-offset: 3px;
}
.relation-heading, .relation-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.relation-heading h3 { margin: 0; font-size: .95rem; } .relation-list { display: grid; gap: .8rem; margin-top: .7rem; }
.relation-card { padding: .78rem; border: 1px solid #dfe5df; border-radius: 13px; background: #f8faf7; }
.relation-card.is-selected { border-color: #78958a; background: #f2f7f3; }
.relation-context { display: flex; flex-wrap: wrap; gap: .18rem .48rem; margin: 0; color: #6b7d76; font-size: .72rem; line-height: 1.35; }
.relation-context strong { color: #435e55; font-size: .76rem; font-weight: 780; }
.relation-select { padding: .34rem .52rem; border: 1px solid #cbd6ce; border-radius: 8px; background: #fff; color: #25493d; font-size: .7rem; font-weight: 730; }
.relation-select:disabled { cursor: default; border-color: #78958a; background: #e4eee7; }
.relation-facts { display: flex; flex-wrap: wrap; gap: .35rem .8rem; margin-top: .65rem; color: #5f746c; font-size: .75rem; }
.relation-edit-fields { margin-top: .8rem; } .relation-subtasks { margin-top: .8rem; padding-top: .7rem; border-top: 1px solid #dfe5df; }
.relation-subtitle { margin: 0 0 .45rem; color: #50675f; font-size: .76rem; font-weight: 800; }
.subtask-create { display: grid; grid-template-columns: minmax(0, 1fr) 145px auto; gap: .4rem; margin-bottom: .55rem; }
.subtask-create input, .subtask-list input { min-width: 0; padding: .48rem .52rem; border: 1px solid #cbd6ce; border-radius: 8px; }
.subtask-list { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.subtask-list li { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .5rem; padding: .48rem .55rem; border-radius: 8px; background: #fff; font-size: .78rem; }
.subtask-list li.is-waiting { border-left: 3px solid #b77b28; background: #fffaf0; }
.task-readonly { display: flex; min-width: 0; align-items: baseline; gap: .42rem; flex-wrap: wrap; } .task-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #18332c; font-size: .88rem; font-weight: 790; line-height: 1.35; } .task-row-due { color: #71817b; font-size: .7rem; white-space: nowrap; }
.waiting-badge { padding: .16rem .38rem; border-radius: 999px; background: #f1dfbd; color: #79551b; font-size: .68rem; font-weight: 800; } .waiting-badge.is-due { background: #f5d2c8; color: #923d2f; }
.compact-task-actions { display: flex; align-items: center; gap: .18rem; } .task-more { position: relative; } .task-more summary { list-style: none; cursor: pointer; } .task-more summary::-webkit-details-marker { display: none; }
.task-menu { position: absolute; z-index: 3; right: 0; top: calc(100% + .25rem); display: grid; min-width: 120px; gap: .25rem; padding: .4rem; border: 1px solid #cbd6ce; border-radius: 9px; background: #fff; box-shadow: 0 8px 22px rgba(25,48,40,.16); }
.subtask-inline-editor { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,1fr) 140px auto auto; gap: .4rem; }
.task-action { min-height: 30px; padding: .28rem .42rem; border: 1px solid #aebdb6; border-radius: 7px; background: #edf3ee; color: #496158; font-size: .66rem; font-weight: 730; }
.task-action.subtle { background: #fff; } .task-add-toggle { margin: .5rem 0; padding: .45rem .6rem; border: 1px dashed #9eb1a8; border-radius: 8px; background: transparent; color: #25493d; font-size: .75rem; font-weight: 760; } .completed-heading { margin-top: .8rem; }
.completed-tasks li { grid-template-columns: 1fr auto; }
.subtask-list li.is-completed { opacity: .58; } .subtask-list small { color: #71817b; white-space: nowrap; }
.empty-state { margin: 1rem 0 0; padding: 2rem 1rem; border: 1px dashed #cbd6ce; border-radius: 12px; color: #71817b; text-align: center; }
.skeleton { overflow: hidden; position: relative; border-radius: 9px; background: #e7ece7; } .skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.62), transparent); animation: shimmer 1.4s infinite; }
.skeleton-line { height: 42px; } .skeleton-line.short { width: 72%; } .task-skeleton { height: 66px; } @keyframes shimmer { 100% { transform: translateX(100%); } }
@media (max-width: 900px) { .workspace { grid-template-columns: minmax(0, 1fr); } .sidebar { width: 100%; min-width: 0; overflow: hidden; padding: .7rem 1rem; border-right: 0; border-bottom: 1px solid #d9e0da; } .sidebar-heading { display: none; } .activity-nav { display: flex; width: 100%; min-width: 0; max-width: 100%; gap: .45rem; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: thin; } .activity-group { display: contents; } .activity-group-title { display: none; } .activity-link { flex: 0 0 auto; width: auto; max-width: 190px; border: 1px solid #d5dfd7; background: #f8faf7; } .content-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) { .topbar { min-height: 62px; } .workspace { min-height: calc(100vh - 62px); } .main-content { width: 100%; max-width: 100%; padding: 1.15rem 1rem 2rem; } .page-heading { min-width: 0; align-items: stretch; flex-direction: column; } .page-actions { min-width: 0; align-items: stretch; flex-direction: column; } .view-switch { max-width: 100%; align-self: flex-start; } .summary-grid { min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); } .summary-card, .content-grid, .panel { min-width: 0; } .task-card { grid-template-columns: auto minmax(0, 1fr); } .task-deadline { grid-column: 2; } .form-grid, .subtask-create, .subtask-inline-editor { grid-template-columns: 1fr; } .compact-task-row { grid-template-columns: minmax(0,1fr) auto !important; } .compact-task-actions { flex-wrap: nowrap; } .relation-card-heading { align-items: center; } h1 { font-size: 2.25rem; overflow-wrap: anywhere; } }
@media (prefers-reduced-motion: reduce) { .skeleton::after { animation: none; } }


/* Activity info dialog: context line is sufficient; hide redundant heading area. */
#activityInfoDialogTitle:empty {
  display: none;
}

/* =========================================================
   Desktop Density Pass 1
   Desktop only. Mobile/tablet behavior remains unchanged.
   ========================================================= */
@media (min-width: 901px) {
  /* Main workspace */
  .main-content {
    padding: 2rem 2.35rem 2.5rem;
  }

  .page-heading {
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .page-actions {
    gap: .45rem;
  }

  /* Sidebar activity navigation */
  .sidebar {
    padding: 1.45rem 1rem;
  }

  .sidebar-heading {
    margin: 0 .45rem .7rem;
    font-size: .72rem;
  }

  .activity-nav {
    gap: .18rem;
  }

  .activity-group {
    margin-top: .38rem;
  }

  .activity-group-title {
    margin: .58rem .5rem .22rem;
    font-size: .67rem;
  }

  .activity-link {
    padding: .52rem .6rem;
    border-radius: 8px;
    font-size: .86rem;
    line-height: 1.25;
  }

  /* Activity tools */
  #activityInfoActions {
    gap: .35rem;
  }

  #venueInfoButton,
  #hotelInfoButton {
    min-height: 34px;
    padding: .42rem .62rem;
    border-radius: 8px;
    font-size: .76rem;
  }

  /* Time / type segmented control */
  .view-switch {
    padding: .18rem;
    border-radius: 9px;
  }

  .view-button {
    padding: .42rem .62rem;
    border-radius: 7px;
    font-size: .76rem;
  }

  /* Summary cards */
  .summary-grid {
    gap: .65rem;
    margin-bottom: .8rem;
  }

  .summary-card {
    padding: .72rem .9rem;
    border-radius: 13px;
  }

  .summary-card span {
    font-size: .7rem;
  }

  .summary-card strong {
    margin-top: .12rem;
    font-size: 1.35rem;
    line-height: 1.15;
  }

  /* Main panels */
  .content-grid {
    gap: .8rem;
  }

  .side-stack {
    gap: .8rem;
  }

  .panel {
    padding: .95rem;
    border-radius: 15px;
  }

  .panel-heading {
    gap: .65rem;
  }

  .panel-heading .eyebrow {
    margin-bottom: .2rem;
    font-size: .66rem;
  }

  .panel-heading h2 {
    font-size: 1rem;
  }

  .count-badge {
    min-width: 1.5rem;
    min-height: 1.5rem;
    padding: 0 .38rem;
    font-size: .68rem;
  }

  /* Work category sections */
  .work-list,
  .compact-list,
  .link-groups,
  .loading-list {
    gap: .48rem;
    margin-top: .72rem;
  }

  .time-section + .time-section,
  .type-section + .type-section {
    margin-top: 1rem;
  }

  .section-title {
    margin-bottom: .38rem;
    font-size: .72rem;
    font-weight: 780;
  }

  /* Work cards: preserve work-name prominence */
  .task-card {
    gap: .58rem;
    padding: .65rem .72rem;
    border-radius: 11px;
  }

  .status-dot {
    width: 8px;
    height: 8px;
    margin-top: .32rem;
    box-shadow: 0 0 0 3px #e7eee9;
  }

  .task-card.is-overdue .status-dot {
    box-shadow: 0 0 0 3px #f6e6e1;
  }

  .task-name {
    font-size: .9rem;
    font-weight: 780;
  }

  .next-task {
    margin-top: .24rem;
    padding: .17rem .36rem;
    font-size: .67rem;
  }

  .task-meta {
    gap: .22rem .5rem;
    margin-top: .22rem;
    color: #7b8984;
    font-size: .66rem;
  }

  .task-deadline {
    font-size: .68rem;
  }

  /* Right-side empty panels */
  .empty-state {
    margin-top: .7rem;
    padding: 1.35rem .8rem;
    font-size: .8rem;
  }
}


/* =========================================================
   Desktop top structure / global more menu
   ========================================================= */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: .45rem;
}

.more-menu-wrap {
  position: relative;
}

.more-menu {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  z-index: 30;
  width: 180px;
  padding: .38rem;
  border: 1px solid #d6dfd8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(30, 55, 47, .14);
}

.more-menu[hidden] {
  display: none;
}

.more-menu button {
  display: block;
  width: 100%;
  padding: .62rem .7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #29473e;
  text-align: left;
  font-size: .82rem;
  font-weight: 720;
}

.more-menu button:hover,
.more-menu button:focus-visible {
  outline: none;
  background: #eef3ef;
}

.page-context {
  min-width: 0;
}

.home-marker {
  display: flex;
  align-items: center;
  gap: .42rem;
  color: #31564b;
  font-size: .78rem;
  font-weight: 820;
  letter-spacing: .04em;
}

.home-marker > span:first-child {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #6f9b8c;
}

#locationMarkerText {
  min-width: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.new-work-icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #173c34;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
}

.new-work-icon-button:hover,
.new-work-icon-button:focus-visible {
  outline: none;
  background: #214d43;
}

.activity-tools {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

.compact-tool-button {
  min-height: 34px;
  padding: .4rem .58rem;
  border: 1px solid #d6dfd8;
  border-radius: 8px;
  background: #f7f9f6;
  color: #48635a;
  font-size: .75rem;
  font-weight: 730;
}

.compact-tool-button:hover,
.compact-tool-button:focus-visible {
  outline: none;
  background: #fff;
  border-color: #bfcfc4;
}

@media (min-width: 901px) {
  .page-heading {
    align-items: center;
    min-height: 38px;
    margin-bottom: .75rem;
  }

  .page-context .muted {
    margin-top: .22rem;
    font-size: .7rem;
  }

  .page-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 620px) {
  .topbar-actions {
    gap: .3rem;
  }

  .topbar-actions .icon-button {
    width: 38px;
    height: 38px;
  }

  .page-heading {
    gap: .75rem;
  }

  .page-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .activity-tools {
    flex-wrap: wrap;
  }

  .new-work-icon-button {
    width: 38px;
    height: 38px;
  }

  .more-menu {
    width: min(180px, calc(100vw - 2rem));
  }
}


/* =========================================================
   Location marker + mobile information priority
   ========================================================= */
.panel-single-label {
  margin-bottom: 0;
  letter-spacing: .08em;
}

@media (max-width: 900px) {
  /*
   * Desktop remains:
   *   Work | Quick Notes + Common Links
   *
   * Narrow/mobile becomes:
   *   Quick Notes -> Work -> Common Links
   */
  .content-grid {
    display: grid;
  }

  .content-grid > .panel:first-child {
    order: 2;
  }

  .content-grid > .side-stack {
    display: contents;
  }

  .content-grid > .side-stack > .panel:first-child {
    order: 1;
  }

  .content-grid > .side-stack > .panel:last-child {
    order: 3;
  }
}

@media (max-width: 620px) {
  .panel-single-label {
    font-size: .76rem;
  }
}

/* =========================================================
   Mobile top navigation pass
   - Full activity names in horizontally scrollable pill tabs
   - Unified action toolbar sizing
   Desktop remains unchanged
   ========================================================= */
@media (max-width: 620px) {

  /* Activity shortcut rail */
  .sidebar {
    padding: .62rem 1rem;
  }

  .activity-nav {
    gap: .42rem;
    padding: .08rem 0 .28rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .activity-nav::-webkit-scrollbar {
    display: none;
  }

  .activity-link {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    min-height: 38px;
    padding: .48rem .72rem;
    border: 1px solid #d2ddd5;
    border-radius: 999px;
    background: #f8faf7;
    color: #29473e;
    font-size: .78rem;
    font-weight: 720;
    line-height: 1.2;
    scroll-snap-align: start;
  }

  .activity-link span {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }

  .activity-link.is-active {
    border-color: #9eb7aa;
    background: #dfe9e2;
    color: #173c34;
    font-weight: 800;
  }

  /* Top action row */
  .page-actions {
    gap: .38rem;
  }

  .activity-tools {
    gap: .28rem;
  }

  .compact-tool-button,
  .view-button {
    min-height: 36px;
    padding: .42rem .58rem;
    font-size: .76rem;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
  }

  .compact-tool-button {
    border-radius: 9px;
  }

  .view-switch {
    padding: .16rem;
    border-radius: 10px;
  }

  .view-button {
    border-radius: 8px;
  }

  .new-work-icon-button {
    width: 36px;
    height: 36px;
  }
}

.quick-note-reminder-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: .65rem; margin-top: .35rem; }
@media (max-width: 520px) { .quick-note-reminder-grid { grid-template-columns: 1fr 1fr; } .quick-note-reminder-grid input { grid-column: 1 / -1; } }

/* All quick notes dialog */
#allQuickNotesDialog .work-form { gap: .55rem; padding: 1.15rem 1.2rem 1.25rem; }
#allQuickNotesDialog .dialog-heading { align-items: center; }
#allQuickNotesDialog #allQuickNotes { margin-top: .15rem; gap: .5rem; }
#allQuickNotesDialog .note-item { padding: .78rem .9rem; border: 1px solid #e5ebe6; border-radius: 12px; background: #f8faf8; }
#allQuickNotesDialog .note-item.is-due { border-left: 2px solid #bd6b50; }
#allQuickNotesDialog .note-item p { font-size: .86rem; line-height: 1.42; }
#allQuickNotesDialog .note-item small { margin-top: .2rem; color: #82918c; font-size: .72rem; }
