/* Claro 21.6 — responsive, touch, and accessibility hardening. */
:root {
  --soft: #858893;
  --control-line: #69717f;
  --mobile-nav-height: 70px;
  color-scheme: dark;
}

button {
  touch-action: manipulation;
}

.skip {
  min-height: 44px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #c9a4aa;
  outline-offset: 3px;
}

#main:focus {
  outline: none;
}

button:active:not(:disabled) {
  filter: brightness(1.12);
}

.brand {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}

.collapse {
  right: -22px;
  width: 44px;
  min-height: 44px;
}

.days label {
  position: relative;
  min-width: 0;
}

.days label input {
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.days span {
  pointer-events: none;
}

.primary,
.secondary,
.danger,
.compact-action,
.board-add,
.text-button {
  min-height: 44px;
}

.secondary {
  border-color: var(--control-line);
}

.danger {
  border-color: #98606a;
}

.primary:disabled,
.secondary:disabled,
.danger:disabled,
.text-button:disabled,
.move-dialog button:disabled,
.map-toolbar button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.page-head h1,
.map-heading h1 {
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.02;
}

.project-page header > div {
  min-width: 0;
}

.project-page h1 {
  overflow-wrap: anywhere;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.04;
}

.project-tabs button {
  min-width: 44px;
  padding-inline: 8px;
}

.back {
  min-height: 44px;
}

/* A real completion button and a separate details button. */
.task-row {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
}

.task-complete {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
}

.task-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 44px;
  padding: 0 5px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.task-open > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.task-open strong,
.task-open small {
  overflow-wrap: anywhere;
}

.task-row.completed-today {
  opacity: 1;
  background: #141519;
}

.task-row.completed-today small {
  color: #a5a7af;
}

.milestone-list li.done {
  opacity: 1;
  background: #15161a;
}

.milestone-list li.done strong {
  color: #a5a7af;
}

.check,
.milestone-checkmark,
.milestone-check > span {
  border-color: var(--control-line);
}

.editor input,
.editor textarea,
.editor select,
.search-dialog input,
.auth input,
.map-search input,
.progress-input,
.pattern-options button,
.days span {
  border-color: var(--control-line);
}

.search-dialog #results button,
.move-dialog > button,
.mobile-more-dialog > button,
.map-toolbar button,
.node-actions button {
  border-color: #5f6673;
}

.task-complete:focus-visible,
.task-open:focus-visible {
  outline-offset: 1px;
}

.completion-toggle {
  min-height: 44px;
}

.calendar-day.muted {
  opacity: 1;
  background: #121317;
  color: var(--soft);
}

.weekdays,
.calendar-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-day {
  min-width: 0;
}

.calendar-day > span,
.calendar-day > small {
  max-width: 100%;
}

.project-card.parked,
.project-card.completed,
.browse-row.parked,
.browse-row.completed,
.map-node.parked,
.map-node.completed {
  opacity: 1;
  border-color: #4b4145;
  background: #171619;
}

.browse-row.parked strong,
.browse-row.completed strong,
.map-node.parked strong,
.map-node.completed strong {
  color: #a6a1a4;
}

.dialog-close {
  width: 44px;
  height: 44px;
}

.editor header h2,
.search-dialog h2,
.move-dialog h2,
.mobile-more-dialog h2 {
  overflow-wrap: anywhere;
}

.required {
  color: #d6a2a9;
  font-size: 9px;
  font-weight: 600;
}

.field-label {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.editor .goal-progress-editor > label,
.editor .milestone-row > label:not(.milestone-check),
.editor .recurrence-fields > label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  color: #92949c;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.editor .milestone-row > label {
  margin-bottom: 0;
}

.form-error {
  margin-top: 0;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 72px;
}

.password-field button {
  position: absolute;
  top: 2px;
  right: 3px;
  min-width: 62px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #c4a0a6;
  font-size: 12px;
  font-weight: 700;
}

.mobile-more-dialog {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 32px;
}

.mobile-more-dialog > button,
.search-dialog #results button,
.move-dialog > button {
  display: flex;
  width: 100%;
  min-height: 52px;
  padding: 13px;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #30343b;
  border-radius: 10px;
  background: #1b1d22;
  color: var(--text);
  text-align: left;
}

.mobile-more-dialog > button {
  flex-direction: column;
}

.mobile-more-dialog small,
.search-dialog #results small {
  color: var(--muted);
}

.save-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: flex;
  max-width: min(620px, calc(100vw - 36px));
  min-height: 54px;
  padding: 8px;
  align-items: center;
  gap: 8px;
  border: 1px solid #84505a;
  border-radius: 12px;
  background: #311b20;
  color: #f3d9dd;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .38);
}

.save-banner > span {
  min-width: 180px;
  padding: 4px 8px;
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.save-banner > button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #a7767e;
  border-radius: 9px;
  background: #4a252c;
  color: #fff0f2;
  font-weight: 700;
  white-space: nowrap;
}

.save-banner[hidden],
.save-banner > button[hidden] {
  display: none;
}

/* Map controls remain usable at the default zoom. */
.focus-strip input {
  min-height: 44px;
  font-size: 14px;
}

.focus-strip label,
.map-search {
  font-size: 12px;
}

.map-tools > button,
.node-actions button {
  font-size: 11px;
}

.map-page {
  position: relative;
}

.focus-strip input:focus-visible {
  outline: 2px solid #c9a4aa;
  outline-offset: 2px;
}

.map-search input {
  min-height: 44px;
  font-size: 14px;
}

.map-toolbar {
  min-height: 56px;
}

.map-toolbar button {
  min-width: 44px;
  height: 44px;
  font-size: 11px;
}

.map-canvas {
  grid-template-rows: 56px minmax(0, 1fr);
}

.node-actions {
  gap: 6px;
}

.node-actions button {
  min-height: 44px;
  font-size: 11px;
}

.node-open small,
.node-kind {
  font-size: 11px;
}

.browse-crumbs button {
  min-width: 44px;
}

.map-node.search-muted {
  opacity: .2;
}

.map-node.search-match {
  outline: 3px solid #c39da3;
  outline-offset: 4px;
}

.orphan-zone > div {
  align-items: flex-start;
}

.orphan-zone .map-level.projects,
.orphan-zone .map-level.tasks {
  margin-top: 28px;
}

.personal-board {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

@media (max-width: 1100px) {
  .page-head h1,
  .browse-head h1,
  .project-page h1 {
    font-size: clamp(36px, 4vw, 44px);
  }

  .map-heading > div:first-child {
    display: block;
  }

  .map-heading h1 {
    font-size: 34px;
  }

  .editor > label,
  .editor .two label,
  .editor .goal-progress-editor > label,
  .editor .milestone-row > label:not(.milestone-check),
  .editor .recurrence-fields > label,
  .auth label,
  .editor legend {
    font-size: 12px;
  }

  .editor input,
  .editor textarea,
  .editor select,
  .search-dialog input,
  .auth input,
  .focus-strip input,
  .map-search input {
    font-size: 16px;
  }
}

/* Tablet portrait: remove nested horizontal project scrollers. */
@media (max-width: 840px) {
  .project-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
  }

  .project-list {
    overflow: hidden;
  }

  .project-list-head {
    display: none;
  }

  .project-list-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 12px;
    min-width: 0;
    min-height: 76px;
    padding: 12px 14px;
  }

  .project-list-row strong {
    grid-column: 1;
    overflow-wrap: anywhere;
  }

  .project-list-row > span:first-of-type {
    grid-column: 1;
    grid-row: 2;
  }

  .project-list-row > span:nth-of-type(2) {
    grid-column: 1;
    grid-row: 3;
  }

  .project-list-row .priority {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .personal-board {
    grid-template-columns: 1fr;
    overflow: visible;
  }
}

/* Phone portrait and short phone landscape share the same shell. */
@media (max-width: 720px), (max-height: 500px) and (max-width: 900px) {
  :root {
    --mobile-nav-height: calc(70px + env(safe-area-inset-bottom));
  }

  html,
  body,
  #root {
    height: 100%;
    overflow: hidden;
  }

  .app {
    height: 100dvh;
    padding: 0;
  }

  .sidebar,
  .topbar {
    display: none;
  }

  .content {
    width: 100%;
    height: calc(100dvh - var(--mobile-nav-height));
    padding: calc(18px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) calc(var(--mobile-nav-height) + 28px) max(14px, env(safe-area-inset-left));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .content.map-content,
  .content.browse-content {
    height: calc(100dvh - var(--mobile-nav-height));
    padding: 0;
    overflow: hidden;
  }

  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    display: grid;
    height: var(--mobile-nav-height);
    grid-template-columns: repeat(5, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    border-top: 1px solid #292b31;
    background: rgba(15, 16, 19, .97);
    backdrop-filter: blur(15px);
  }

  .mobile-nav button {
    display: flex;
    min-width: 0;
    min-height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: #9a9da7;
    font-size: 10px;
  }

  .mobile-nav button.active {
    color: #e0c9cd;
    background: linear-gradient(180deg, rgba(75, 30, 35, .48), transparent);
  }

  .mobile-nav svg {
    width: 20px;
    height: 20px;
  }

  .page-head,
  .project-page > header {
    margin-top: 0;
  }

  .page-head h1,
  .browse-head h1,
  .project-page h1 {
    font-size: 34px;
    line-height: 1.06;
  }

  .page-head .primary {
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(var(--mobile-nav-height) + 13px);
  }

  .project-page > header {
    display: grid;
    grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
    align-items: start;
    gap: 8px 12px;
  }

  .project-page > header > div {
    grid-column: 2;
  }

  .project-page > header > .secondary {
    grid-column: 2;
    justify-self: start;
  }

  .project-toolbar {
    gap: 8px;
  }

  .project-toolbar span {
    font-size: 12px;
    line-height: 1.45;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow: hidden;
  }

  .weekdays span {
    padding: 7px 0;
    font-size: 11px;
  }

  .calendar-day {
    position: relative;
    min-height: 50px;
    padding: 4px;
    align-items: center;
  }

  .calendar-day > span,
  .calendar-day > small {
    display: none;
  }

  .calendar-day b,
  .calendar-day.today b {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
  }

  .calendar-day.has-items::after {
    position: absolute;
    right: 3px;
    bottom: 3px;
    display: grid;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    place-items: center;
    border-radius: 999px;
    background: #65333b;
    color: #f7e8ea;
    content: attr(data-count);
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
  }

  .calendar-actions .secondary {
    min-width: 44px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .browse-page {
    display: block;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .browse-rail {
    display: flex;
    gap: 7px;
    padding: calc(10px + env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 10px max(10px, env(safe-area-inset-left));
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .browse-rail::-webkit-scrollbar {
    display: none;
  }

  .browse-rail > header {
    display: none;
  }

  .browse-space {
    display: flex;
    width: auto;
    min-height: 46px;
    flex: 0 0 auto;
    padding: 6px 10px;
  }

  .browse-space small {
    display: none;
  }

  .browse-space[data-browse-root] { order: 0; }
  .browse-space[data-browse-journey="independent"] { order: 1; }
  .browse-space[data-browse-journey]:not([data-browse-journey="independent"]) { order: 2; }

  .space-mark {
    width: 31px;
    height: 31px;
  }

  .browse-main {
    padding: 20px max(14px, env(safe-area-inset-right)) calc(var(--mobile-nav-height) + 30px) max(14px, env(safe-area-inset-left));
    overflow: visible;
  }

  .browse-head {
    margin: 12px 0 28px;
  }

  .browse-row {
    min-height: 70px;
    padding: 10px 13px;
  }

  .map-page {
    display: grid;
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    padding: 0;
  }

  .map-heading {
    display: block;
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
    border-bottom: 1px solid #292b30;
  }

  .map-heading > div:first-child {
    display: block;
  }

  .map-heading > div:first-child p,
  .map-heading > div:first-child .eyebrow {
    display: none;
  }

  .map-heading h1 {
    margin: 0 0 7px;
    font-size: 26px;
  }

  .focus-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
  }

  .focus-strip label {
    min-width: 0;
    min-height: 52px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .focus-strip input {
    min-height: 44px;
    font-size: 16px;
  }

  .map-workspace {
    display: block;
    border: 0;
    border-radius: 0;
  }

  .map-tools {
    position: absolute;
    right: max(10px, env(safe-area-inset-right));
    bottom: 10px;
    left: max(10px, env(safe-area-inset-left));
    z-index: 12;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    padding: 8px;
    border: 1px solid #343740;
    border-radius: 14px;
    background: rgba(18, 19, 23, .96);
  }

  .map-tools h2,
  .map-tools > p,
  .map-tools hr,
  .map-search {
    display: none;
  }

  .map-tools > button {
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 5px 2px;
    font-size: 10px;
  }

  .map-tools > button i {
    width: 18px;
    height: 18px;
    margin-bottom: 3px;
  }

  .map-canvas {
    height: 100%;
    grid-template-rows: 52px minmax(0, 1fr);
  }

  .map-toolbar {
    min-height: 52px;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
    overflow-x: auto;
  }

  .map-toolbar button {
    height: 44px;
    white-space: nowrap;
  }

  .map-world {
    gap: 55px;
    padding: 42px 30px 130px;
  }

  .map-node,
  .map-node.task,
  .map-node.repeat,
  .map-node.habit {
    width: 180px;
  }

  .orphan-zone {
    min-width: 350px;
    margin-top: 180px;
  }

  .dialog {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: calc(100dvh - env(safe-area-inset-top));
    transform: none;
    border-radius: 20px 20px 0 0;
  }

  .editor,
  .search-dialog,
  .move-dialog,
  .mobile-more-dialog {
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
    padding-right: max(18px, env(safe-area-inset-right));
    padding-left: max(18px, env(safe-area-inset-left));
  }

  .editor header h2,
  .search-dialog h2,
  .move-dialog h2,
  .mobile-more-dialog h2 {
    margin-bottom: 20px;
    font-size: 28px;
    line-height: 1.08;
  }

  .editor > label,
  .editor .two label,
  .editor .goal-progress-editor > label,
  .editor .milestone-row > label:not(.milestone-check),
  .editor .recurrence-fields > label,
  .auth label {
    font-size: 12px;
  }

  .editor input,
  .editor textarea,
  .editor select,
  .search-dialog input,
  .auth input {
    font-size: 16px;
  }

  .editor .two {
    grid-template-columns: 1fr;
  }

  .editor footer {
    bottom: -24px;
    margin: 22px -18px -24px;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  }

  .dialog-close {
    top: 8px;
    right: max(8px, env(safe-area-inset-right));
    margin: 10px;
  }

  .auth {
    display: block;
    height: 100dvh;
    padding-right: env(safe-area-inset-right);
    padding-left: env(safe-area-inset-left);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .auth > section {
    min-height: 40dvh;
    padding: calc(36px + env(safe-area-inset-top)) 24px 36px;
  }

  .auth h1 {
    font-size: 44px;
  }

  .auth form {
    padding: 28px;
    margin: 24px auto 50px;
  }

  .auth form h2 {
    font-size: 32px;
    line-height: 1.06;
  }

  #toast {
    bottom: calc(var(--mobile-nav-height) + 12px);
    width: min(calc(90vw - env(safe-area-inset-left) - env(safe-area-inset-right)), 420px);
    text-align: center;
  }

  .save-banner {
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(var(--mobile-nav-height) + 12px);
    left: max(12px, env(safe-area-inset-left));
    width: auto;
    max-width: none;
    flex-wrap: wrap;
  }

  .save-banner > span {
    width: 100%;
    flex-basis: 100%;
  }
}

@media (max-width: 720px) {
  .days {
    grid-template-columns: repeat(4, minmax(44px, 1fr));
  }
}

@media (max-height: 500px) and (max-width: 900px) {
  .map-heading {
    padding-block: 5px;
  }

  .map-heading h1 {
    margin: 0;
    font-size: 22px;
  }

  .map-heading .focus-strip {
    display: none;
  }

  .map-tools {
    grid-template-columns: repeat(6, minmax(64px, 1fr));
    overflow-x: auto;
  }

  .map-tools > button {
    min-height: 48px;
  }

  .map-world {
    padding-top: 24px;
  }
}

/* 21.7: Today and Calendar share one calm planner surface. */
.planner-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -12px 0 18px;
}

.planner-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(88px, 1fr));
  padding: 4px;
  border: 1px solid var(--control-line);
  border-radius: 12px;
  background: #121317;
}

.planner-tabs button {
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.planner-tabs button[aria-pressed="true"] {
  background: #342126;
  color: var(--text);
  box-shadow: inset 0 0 0 1px #75454e;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #121317;
}

.week-strip button {
  min-width: 0;
  min-height: 76px;
  padding: 8px 4px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
}

.week-strip button span,
.week-strip button small {
  display: block;
  font-size: 11px;
}

.week-strip button b {
  display: grid;
  width: 32px;
  height: 32px;
  margin: 3px auto;
  place-items: center;
  color: var(--text);
  font-size: 16px;
}

.week-strip button.today b {
  border-radius: 50%;
  background: var(--merlot2);
}

.week-strip button.selected {
  border-color: #84515a;
  background: #23171a;
}

.planner-month > header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  text-align: center;
}

.planner-month > header .secondary {
  width: 44px;
  min-width: 44px;
  padding: 0;
}

.planner-agenda {
  margin-top: 6px;
}

.map-add-toggle,
.map-focus-toggle {
  display: none;
}

.map-page.is-expanded {
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100vw;
  height: 100dvh;
  padding: 0;
  background: var(--bg);
}

.map-page.is-expanded .map-workspace {
  border-radius: 0;
}

@media (max-width: 720px), (max-height: 500px) and (max-width: 900px) {
  .mobile-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .planner-head {
    margin-bottom: 22px;
  }

  .planner-controls {
    margin: 0 0 14px;
  }

  .planner-tabs {
    width: 100%;
  }

  .planner-today {
    flex: 0 0 auto;
  }

  .week-strip {
    gap: 3px;
    padding: 5px;
  }

  .week-strip button {
    min-height: 72px;
    padding-inline: 1px;
  }

  .week-strip button span,
  .week-strip button small {
    font-size: 10px;
  }

  .planner-month .calendar-grid {
    margin-inline: 0;
  }

  .planner-agenda .day-open {
    min-height: 240px;
  }

  .map-heading {
    position: relative;
    min-height: 58px;
  }

  .map-heading .focus-strip {
    display: none;
  }

  .map-page.focus-open .map-heading .focus-strip {
    position: absolute;
    z-index: 20;
    top: calc(100% - 2px);
    right: max(10px, env(safe-area-inset-right));
    left: max(10px, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    border-color: var(--control-line);
    box-shadow: 0 18px 38px rgba(0,0,0,.55);
  }

  .map-workspace,
  .map-canvas {
    min-height: 0;
  }

  .map-toolbar {
    gap: 8px;
  }

  .map-toolbar > span {
    display: none;
  }

  .map-toolbar > div {
    display: flex;
    min-width: 0;
    gap: 4px;
  }

  .map-toolbar button {
    min-width: 44px;
    padding-inline: 8px;
  }

  .map-add-toggle,
  .map-focus-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .map-tools {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    bottom: 10px;
    max-height: 146px;
  }

  .map-page.tools-open .map-tools {
    display: grid;
  }

  .map-world {
    padding-bottom: 64px;
  }

  .map-page.tools-open .map-world {
    padding-bottom: 170px;
  }

  .map-page.is-expanded .map-heading {
    padding-top: max(8px, env(safe-area-inset-top));
  }
}

@media (min-width: 721px) and (max-width: 1100px) {
  .week-strip {
    gap: 6px;
  }

  .calendar-day {
    min-height: 92px;
  }

  .map-page.is-expanded .map-heading {
    padding-top: max(12px, env(safe-area-inset-top));
  }
}
